开始
This commit is contained in:
+5
-3
@@ -19,8 +19,8 @@
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
@@ -46,7 +46,6 @@
|
||||
<orderEntry type="module" module-name="excel" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:4.0.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi:4.0.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:4.0.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:3.0.1" level="project" />
|
||||
@@ -77,7 +76,6 @@
|
||||
<orderEntry type="library" name="Maven: org.unbescape:unbescape:1.1.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.thymeleaf.extras:thymeleaf-extras-java8time:3.0.4.RELEASE" level="project" />
|
||||
<orderEntry type="module" module-name="fileUpload" />
|
||||
<orderEntry type="library" name="Maven: com.cwhelp.modules:bss:2.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.4.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.1.4.RELEASE" level="project" />
|
||||
@@ -160,5 +158,9 @@
|
||||
<orderEntry type="library" name="Maven: net.sf.ehcache:ehcache:2.10.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.26" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jsoup:jsoup:1.11.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.56" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -51,16 +51,6 @@
|
||||
<artifactId>fileUpload</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.cwhelp.modules</groupId>
|
||||
<artifactId>bss</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.cwhelp.modules</groupId>
|
||||
<artifactId>bss</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
+146
@@ -0,0 +1,146 @@
|
||||
package com.cwhelp.admin.business.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cwhelp.admin.business.validator.BssVatInvoiceCheckValid;
|
||||
import com.cwhelp.admin.business.validator.BssVatInvoiceValid;
|
||||
import com.cwhelp.common.enums.StatusEnum;
|
||||
import com.cwhelp.common.utils.EntityBeanUtil;
|
||||
import com.cwhelp.common.utils.HttpYoushangFapiaoUtil;
|
||||
import com.cwhelp.common.utils.ResultVoUtil;
|
||||
import com.cwhelp.common.utils.StatusUtil;
|
||||
import com.cwhelp.common.vo.ResultVo;
|
||||
import com.cwhelp.modules.business.domain.BssVatInvoice;
|
||||
import com.cwhelp.modules.business.service.BssVatInvoiceService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Example;
|
||||
import org.springframework.data.domain.ExampleMatcher;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
* @date 2019/08/26
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/bss/vatInvoice")
|
||||
public class BssVatInvoiceController {
|
||||
|
||||
@Autowired
|
||||
private BssVatInvoiceService bssVatInvoiceService;
|
||||
|
||||
/**
|
||||
* 列表页面
|
||||
*/
|
||||
@GetMapping("/index")
|
||||
@RequiresPermissions("bss:vatInvoice:index")
|
||||
public String index(Model model, BssVatInvoice bssVatInvoice) {
|
||||
|
||||
// 创建匹配器,进行动态查询匹配
|
||||
ExampleMatcher matcher = ExampleMatcher.matching();
|
||||
|
||||
// 获取数据列表
|
||||
Example<BssVatInvoice> example = Example.of(bssVatInvoice, matcher);
|
||||
Page<BssVatInvoice> list = bssVatInvoiceService.getPageList(example);
|
||||
|
||||
// 封装数据
|
||||
model.addAttribute("list", list.getContent());
|
||||
model.addAttribute("page", list);
|
||||
return "/business/vatInvoice/index";
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转到添加页面
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
@RequiresPermissions("bss:vatInvoice:add")
|
||||
public String toAdd() {
|
||||
return "/business/vatInvoice/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转到编辑页面
|
||||
*/
|
||||
@GetMapping("/edit/{id}")
|
||||
@RequiresPermissions("bss:vatInvoice:edit")
|
||||
public String toEdit(@PathVariable("id") BssVatInvoice bssVatInvoice, Model model) {
|
||||
model.addAttribute("bssVatInvoice", bssVatInvoice);
|
||||
return "/business/vatInvoice/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查验录入
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/check")
|
||||
@RequiresPermissions("bss:vatInvoice:add")
|
||||
public String check(@Validated BssVatInvoiceCheckValid checkValid, BssVatInvoice bssVatInvoice){
|
||||
JSONObject params = new JSONObject();
|
||||
//发票代码
|
||||
params.put("fpdm", bssVatInvoice.getInvoiceCode());
|
||||
//发票号码
|
||||
params.put("fphm", bssVatInvoice.getInvoiceNo());
|
||||
//开票日期
|
||||
params.put("kprq", bssVatInvoice.getInvoiceDate());
|
||||
//开具金额(不含税)
|
||||
params.put("kjje", bssVatInvoice.getInvoiceMoney());
|
||||
//校验码
|
||||
params.put("jym", bssVatInvoice.getCheckCode());
|
||||
JSONObject vatInfoiceInfo = HttpYoushangFapiaoUtil.getVatInfoiceInfo(params);
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存添加/修改的数据
|
||||
* @param valid 验证对象
|
||||
*/
|
||||
@PostMapping({"/add","/edit"})
|
||||
@RequiresPermissions({"bss:vatInvoice:add","bss:vatInvoice:edit"})
|
||||
@ResponseBody
|
||||
public ResultVo save(@Validated BssVatInvoiceValid valid, BssVatInvoice bssVatInvoice) {
|
||||
// 复制保留无需修改的数据
|
||||
if (bssVatInvoice.getId() != null) {
|
||||
BssVatInvoice beBssVatInvoice = bssVatInvoiceService.getById(bssVatInvoice.getId());
|
||||
EntityBeanUtil.copyProperties(beBssVatInvoice, bssVatInvoice);
|
||||
}
|
||||
|
||||
// 保存数据
|
||||
bssVatInvoiceService.save(bssVatInvoice);
|
||||
return ResultVoUtil.SAVE_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转到详细页面
|
||||
*/
|
||||
@GetMapping("/detail/{id}")
|
||||
@RequiresPermissions("bss:vatInvoice:detail")
|
||||
public String toDetail(@PathVariable("id") BssVatInvoice bssVatInvoice, Model model) {
|
||||
model.addAttribute("bssVatInvoice",bssVatInvoice);
|
||||
return "/business/vatInvoice/detail";
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置一条或者多条数据的状态
|
||||
*/
|
||||
@RequestMapping("/status/{param}")
|
||||
@RequiresPermissions("bss:vatInvoice:status")
|
||||
@ResponseBody
|
||||
public ResultVo status(
|
||||
@PathVariable("param") String param,
|
||||
@RequestParam(value = "ids", required = false) List<Long> ids) {
|
||||
// 更新状态
|
||||
StatusEnum statusEnum = StatusUtil.getStatusEnum(param);
|
||||
if (bssVatInvoiceService.updateStatus(statusEnum, ids)) {
|
||||
return ResultVoUtil.success(statusEnum.getMessage() + "成功");
|
||||
} else {
|
||||
return ResultVoUtil.error(statusEnum.getMessage() + "失败,请重新操作");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,10 +13,6 @@ import javax.validation.constraints.NotEmpty;
|
||||
public class BssTaxinfoValid implements Serializable {
|
||||
@NotEmpty(message = "纳税人识别号不能为空")
|
||||
private String taxNo;
|
||||
@NotEmpty(message = "开户行及账号不能为空")
|
||||
private String account;
|
||||
@NotEmpty(message = "地址、电话不能为空")
|
||||
private String addressPhone;
|
||||
@NotEmpty(message = "名称不能为空")
|
||||
private String name;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.cwhelp.admin.business.validator;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
* @date 2019/08/26
|
||||
*/
|
||||
@Data
|
||||
public class BssVatInvoiceCheckValid implements Serializable {
|
||||
@NotEmpty(message = "发票代码不能为空")
|
||||
private String invoiceCode;
|
||||
@NotEmpty(message = "发票号码不能为空")
|
||||
private String invoiceNo;
|
||||
@NotEmpty(message = "发票日期不能为空")
|
||||
@Pattern(regexp = "[0-9]{4}-[0-9]{2}-[0-9]{2}", message = "日期格式不正确")
|
||||
private String invoiceDate;
|
||||
@NotEmpty(message = "校验码不能为空")
|
||||
private String checkCode;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.cwhelp.admin.business.validator;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author yan.y
|
||||
* @date 2019/08/26
|
||||
*/
|
||||
@Data
|
||||
public class BssVatInvoiceValid implements Serializable {
|
||||
@NotEmpty(message = "发票代码不能为空")
|
||||
private String invoiceCode;
|
||||
@NotEmpty(message = "发票类型不能为空")
|
||||
private String invoiceType;
|
||||
@NotEmpty(message = "发票号码不能为空")
|
||||
private String invoiceNo;
|
||||
@NotEmpty(message = "发票日期不能为空")
|
||||
@Pattern(regexp = "[0-9]{4}-[0-9]{2}-[0-9]{2}", message = "日期格式不正确")
|
||||
private String invoiceDate;
|
||||
@NotEmpty(message = "校验码不能为空")
|
||||
private String checkCode;
|
||||
@NotEmpty(message = "发票金额不能为空")
|
||||
private String invoiceMoney;
|
||||
@NotEmpty(message = "税额不能为空")
|
||||
private String taxAmount;
|
||||
@NotEmpty(message = "总金额不能为空")
|
||||
private String totalAmount;
|
||||
@NotEmpty(message = "总金额(大写)不能为空")
|
||||
private String totalAmountCn;
|
||||
}
|
||||
@@ -36,11 +36,12 @@ spring:
|
||||
thymeleaf:
|
||||
prefix: classpath:/templates
|
||||
suffix: .html
|
||||
mode: HTML
|
||||
mode: LEGACYHTML5
|
||||
encoding: utf-8
|
||||
servlet.content-type: text/html
|
||||
cache: false
|
||||
|
||||
|
||||
## 文件上传配置
|
||||
servlet:
|
||||
multipart:
|
||||
|
||||
@@ -0,0 +1,213 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
|
||||
<link rel="stylesheet" th:href="@{/css/generate.code.css}">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-form timo-compile" style="padding-top: 0px;">
|
||||
<div class="layui-tab layui-tab-card">
|
||||
<ul class="layui-tab-title">
|
||||
<li class="layui-this">手工录入</li>
|
||||
<li>查验录入</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content" style="height: 100%;">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<!-- <form th:action="@{/bss/vatInvoice/add}">-->
|
||||
<fieldset id="basic" class="layui-elem-field layui-form">
|
||||
<legend class="code-legend">基本信息</legend>
|
||||
<div class="layui-field-box">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">项目路径</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="projectPath" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">项目包名</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="packagePath" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">作者名称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="author" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">父级菜单</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input select-tree" type="text" name="genPMenu" value="顶级菜单" data-value="0" placeholder="请选择父级菜单">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">模块名称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="genModule" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">业务名称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="genTitle" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">表前缀</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="tablePrefix" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">表名称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="tableName" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">实体类</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="tableEntity" autocomplete="off" class="layui-input tableEntity">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">访问地址</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="requestMapping" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">模块结构</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="radio" name="moduleType" value="1" title="独立模块" checked="">
|
||||
<input type="radio" name="moduleType" value="2" title="后台模块">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="panel">
|
||||
<div class="panel-header">
|
||||
<div class="title">实体类</div>
|
||||
<div class="control">
|
||||
<button class="field-add layui-btn layui-btn-primary layui-btn-xs">
|
||||
<i class="fa fa-plus-circle"></i>添加
|
||||
</button>
|
||||
<button class="field-del layui-btn layui-btn-primary layui-btn-xs">
|
||||
<i class="fa fa-minus-circle"></i>删除
|
||||
</button>
|
||||
</div>
|
||||
<div class="entity"><span class="bindTableEntity"></span>(<span class="bindTablePrefix"></span><span class="bindTableName"></span>)</div>
|
||||
</div>
|
||||
<div class="panel-body panel-body-entity">
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="20">#</th>
|
||||
<th width="100">字段名称</th>
|
||||
<th width="100">字段标题</th>
|
||||
<th width="100">数据类型</th>
|
||||
<th width="100">查询(可选)</th>
|
||||
<th width="100">列表显示</th>
|
||||
<th>字段验证(可选)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="entity">
|
||||
<tr>
|
||||
<td class="entity-number" th:text="1"></td>
|
||||
<td class="entity-name"><input type="text" name="name"/></td>
|
||||
<td class="entity-title"><input type="text" name="title"/></td>
|
||||
<td class="layui-form entity-type">
|
||||
<input type="text" name="title"/>
|
||||
</td>
|
||||
<td class="layui-form entity-query">
|
||||
<input type="text" name="title"/>
|
||||
</td>
|
||||
<td class="layui-form entity-show">
|
||||
<input type="text" name="title"/>
|
||||
</td>
|
||||
<td class="entity-verify">
|
||||
<input type="text" name="title"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="layui-form-item timo-finally">
|
||||
<button class="layui-btn ajax-submit"><i class="fa fa-check-circle"></i> 保存</button>
|
||||
<button class="layui-btn btn-secondary close-popup"><i class="fa fa-times-circle"></i> 关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="layui-tab-item">
|
||||
<form th:action="@{/bss/vatInvoice/check}">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label required">发票代码</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" type="text" name="invoiceCode" placeholder="请输入发票代码" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label required">发票号码</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" type="text" name="invoiceNo" placeholder="请输入发票号码" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label required">开票时间</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" class="layui-input" name="invoiceDate" placeholder="yyyy-MM-dd">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">开具金额(不含税)</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" type="text" name="invoiceMoney" placeholder="请输入开具金额(不含税)" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label required">校验码</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" type="text" name="checkCode" placeholder="请输入校验码" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item timo-finally">
|
||||
<button class="layui-btn ajax-submit"><i class="fa fa-check-circle"></i> 保存</button>
|
||||
<button class="layui-btn btn-secondary close-popup"><i class="fa fa-times-circle"></i> 关闭</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script th:replace="/common/template :: script"></script>
|
||||
<script type="text/javascript" th:src="@{/js/plugins/jquery-3.3.1.min.js}"></script>
|
||||
<script type="text/javascript" th:src="@{/lib/zTree_v3/js/jquery.ztree.core.min.js}"></script>
|
||||
<script type="text/javascript" th:src="@{/js/timoTree.js}"></script>
|
||||
<script type="text/javascript">
|
||||
// 树形菜单
|
||||
$.fn.selectTree({
|
||||
rootTree: '顶级菜单'
|
||||
});
|
||||
|
||||
// 验证下拉选择器
|
||||
layui.config({
|
||||
base: '[[@{/lib/formSelects-v4/}]]'
|
||||
}).extend({
|
||||
formSelects: 'formSelects-v4.min'
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" th:src="@{/js/generate.code.js}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,65 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
|
||||
</head>
|
||||
<body>
|
||||
<div class="timo-detail-page">
|
||||
<div class="timo-detail-title">基本信息</div>
|
||||
<table class="layui-table timo-detail-table">
|
||||
<colgroup>
|
||||
<col width="100px"><col>
|
||||
<col width="100px"><col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>主键ID</th>
|
||||
<td th:text="${bssVatInvoice.id}"></td>
|
||||
<th>发票代码</th>
|
||||
<td th:text="${bssVatInvoice.invoiceCode}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>发票号码</th>
|
||||
<td th:text="${bssVatInvoice.invoiceNo}"></td>
|
||||
<th>发票日期</th>
|
||||
<td th:text="${bssVatInvoice.invoiceDate}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>校验码</th>
|
||||
<td th:text="${bssVatInvoice.checkCode}"></td>
|
||||
<th>机器编码</th>
|
||||
<td th:text="${bssVatInvoice.machineNo}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>发票金额</th>
|
||||
<td th:text="${bssVatInvoice.invoiceMoney}"></td>
|
||||
<th>税额</th>
|
||||
<td th:text="${bssVatInvoice.taxAmount}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>总金额</th>
|
||||
<td th:text="${bssVatInvoice.totalAmount}"></td>
|
||||
<th>总金额(大写)</th>
|
||||
<td th:text="${bssVatInvoice.totalAmountCn}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>购买方纳税人信息</th>
|
||||
<td th:text="${bssVatInvoice?.buyTaxInfo?.name}"></td>
|
||||
<th>销售方纳税人信息</th>
|
||||
<td th:text="${bssVatInvoice?.salerTaxInfo?.name}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>创建时间</th>
|
||||
<td th:text="${bssVatInvoice.createDate}"></td>
|
||||
<th>更新时间</th>
|
||||
<td th:text="${bssVatInvoice.updateDate}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>备注</th>
|
||||
<td th:text="${bssVatInvoice.remark}" colspan="3"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<script th:replace="/common/template :: script"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,89 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-form timo-compile">
|
||||
<form th:action="@{/bss/vatInvoice/add}">
|
||||
<input type="hidden" name="id" th:if="${bssVatInvoice}" th:value="${bssVatInvoice.id}">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">发票代码</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" type="text" name="invoiceCode" placeholder="请输入发票代码" th:value="${bssVatInvoice?.invoiceCode}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">发票号码</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" type="text" name="invoiceNo" placeholder="请输入发票号码" th:value="${bssVatInvoice?.invoiceNo}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">发票日期</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" type="text" name="invoiceDate" placeholder="请输入发票日期" th:value="${bssVatInvoice?.invoiceDate}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">校验码</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" type="text" name="checkCode" placeholder="请输入校验码" th:value="${bssVatInvoice?.checkCode}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">机器编码</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" type="text" name="machineNo" placeholder="请输入机器编码" th:value="${bssVatInvoice?.machineNo}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">发票金额</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" type="text" name="invoiceMoney" placeholder="请输入发票金额" th:value="${bssVatInvoice?.invoiceMoney}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">税额</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" type="text" name="taxAmount" placeholder="请输入税额" th:value="${bssVatInvoice?.taxAmount}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">总金额</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" type="text" name="totalAmount" placeholder="请输入总金额" th:value="${bssVatInvoice?.totalAmount}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">总金额(大写)</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" type="text" name="totalAmountCn" placeholder="请输入总金额(大写)" th:value="${bssVatInvoice?.totalAmountCn}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">购买方纳税人信息</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" type="text" name="buyTaxInfo" placeholder="请输入购买方纳税人信息" th:value="${bssVatInvoice?.buyTaxInfo?.name}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">销售方纳税人信息</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" type="text" name="salerTaxInfo" placeholder="请输入销售方纳税人信息" th:value="${bssVatInvoice?.salerTaxInfo?.name}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">备注</label>
|
||||
<div class="layui-input-block">
|
||||
<textarea placeholder="请输入内容" class="layui-textarea" name="remark">[[${bssVatInvoice?.remark}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item timo-finally">
|
||||
<button class="layui-btn ajax-submit"><i class="fa fa-check-circle"></i> 保存</button>
|
||||
<button class="layui-btn btn-secondary close-popup"><i class="fa fa-times-circle"></i> 关闭</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script th:replace="/common/template :: script"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,88 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
|
||||
</head>
|
||||
<body class="timo-layout-page">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header timo-card-header">
|
||||
<span><i class="fa fa-bars"></i> 增值税发票信息管理</span>
|
||||
<i class="layui-icon layui-icon-refresh refresh-btn"></i>
|
||||
</div>
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-row timo-card-screen">
|
||||
<div class="pull-left layui-form-pane timo-search-box">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">状态</label>
|
||||
<div class="layui-input-block timo-search-status">
|
||||
<select class="timo-search-select" name="status" mo:dict="SEARCH_STATUS" mo-selected="${param.status}"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<button class="layui-btn timo-search-btn">
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-right screen-btn-group">
|
||||
<button class="layui-btn open-popup" data-title="添加增值税发票信息" th:attr="data-url=@{/bss/vatInvoice/add}" data-size="max">
|
||||
<i class="fa fa-plus"></i> 添加</button>
|
||||
<div class="btn-group">
|
||||
<button class="layui-btn">操作<span class="caret"></span></button>
|
||||
<dl class="layui-nav-child layui-anim layui-anim-upbit">
|
||||
<dd><a class="ajax-status" th:href="@{/bss/vatInvoice/status/ok}">启用</a></dd>
|
||||
<dd><a class="ajax-status" th:href="@{/bss/vatInvoice/status/freezed}">冻结</a></dd>
|
||||
<dd><a class="ajax-status" th:href="@{/bss/vatInvoice/status/delete}">删除</a></dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="timo-table-wrap">
|
||||
<table class="layui-table timo-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="timo-table-checkbox">
|
||||
<label class="timo-checkbox"><input type="checkbox">
|
||||
<i class="layui-icon layui-icon-ok"></i></label>
|
||||
</th>
|
||||
<th>发票类型</th>
|
||||
<th>发票代码</th>
|
||||
<th>发票号码</th>
|
||||
<th>发票日期</th>
|
||||
<th>发票金额</th>
|
||||
<th>税额</th>
|
||||
<th>总金额</th>
|
||||
<th>总金额(大写)</th>
|
||||
<th>购买方纳税人信息</th>
|
||||
<th>销售方纳税人信息</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="item:${list}">
|
||||
<td><label class="timo-checkbox"><input type="checkbox" th:value="${item.id}">
|
||||
<i class="layui-icon layui-icon-ok"></i></label></td>
|
||||
<td th:text="${item.invoiceType}">发票类型</td>
|
||||
<td th:text="${item.invoiceCode}">发票代码</td>
|
||||
<td th:text="${item.invoiceNo}">发票号码</td>
|
||||
<td th:text="${item.invoiceDate}">发票日期</td>
|
||||
<td th:text="${item.invoiceMoney}">发票金额</td>
|
||||
<td th:text="${item.taxAmount}">税额</td>
|
||||
<td th:text="${item.totalAmount}">总金额</td>
|
||||
<td th:text="${item.totalAmountCn}">总金额(大写)</td>
|
||||
<td th:text="${item?.buyTaxInfo?.name}">购买方纳税人信息</td>
|
||||
<td th:text="${item?.salerTaxInfo?.name}">销售方纳税人信息</td>
|
||||
<td>
|
||||
<a class="open-popup" data-title="编辑增值税发票信息" th:attr="data-url=@{'/bss/vatInvoice/edit/'+${item.id}}" data-size="auto" href="#">编辑</a>
|
||||
<a class="open-popup" data-title="详细信息" th:attr="data-url=@{'/bss/vatInvoice/detail/'+${item.id}}" data-size="800,600" href="#">详细</a>
|
||||
<a class="ajax-get" data-msg="您是否确认删除" th:href="@{/bss/vatInvoice/status/delete(ids=${item.id})}">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div th:replace="/common/fragment :: page"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script th:replace="/common/template :: script"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -31,7 +31,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li class="layui-nav-item timo-nav-user">
|
||||
<a class="timo-header-nickname" th:text="${user.nickname}">TIMO</a>
|
||||
<a class="timo-header-nickname" th:text="${user.nickname}">财务帮</a>
|
||||
<div class="layui-nav-child">
|
||||
<div class="timo-nav-child-box">
|
||||
<div><a class="open-popup" data-title="个人信息" th:attr="data-url=@{/userInfo}"
|
||||
|
||||
@@ -100,58 +100,12 @@
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md8">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">项目介绍</div>
|
||||
<div class="layui-card-body project-introduce">
|
||||
<blockquote class="layui-elem-quote layui-quote-nm">
|
||||
Cwhelp后台管理系统,基于SpringBoot2.0 + Spring Data Jpa + Thymeleaf + Shiro 开发的后台管理系统,采用分模块的方式便于开发和维护,目前支持的功能有:权限管理、部门管理、字典管理、日志记录、文件上传、代码生成等!
|
||||
</blockquote>
|
||||
<div>
|
||||
<h4>技术选型</h4>
|
||||
<ol>
|
||||
<li>后端技术:SpringBoot + Spring Data Jpa + Thymeleaf + Shiro + EhCache</li>
|
||||
<li>前端技术:Layui + Jquery + zTree + Font-awesome</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div>
|
||||
<h4>功能列表</h4>
|
||||
<ol>
|
||||
<li>用户管理:用于管理后台系统的用户,可进行增删改查等操作。</li>
|
||||
<li>角色管理:分配权限的最小单元,通过角色给用户分配权限。</li>
|
||||
<li>菜单管理:用于配置系统菜单,同时也作为权限资源。</li>
|
||||
<li>部门管理:通过不同的部门来管理和区分用户。</li>
|
||||
<li>字典管理:对一些需要转换的数据进行统一管理,如:男、女等。</li>
|
||||
<li>行为日志:用于记录用户对系统的操作,同时监视系统运行时发生的错误。</li>
|
||||
<li>文件上传:内置了文件上传接口,方便开发者使用文件上传功能。</li>
|
||||
<li>代码生成:可以帮助开发者快速开发项目,减少不必要的重复操作,花更多精力注重业务实现。</li>
|
||||
<li>表单构建:通过拖拽的方式快速构建一个表单模块。</li>
|
||||
<li>数据接口:根据业务代码自动生成相关的api接口文档</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-col-md4">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">更新日志</div>
|
||||
<div class="layui-card-body">
|
||||
<ul class="layui-timeline">
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<h3 class="layui-timeline-title">v2.0.1</h3>
|
||||
<p>
|
||||
1.项目初始化<br>
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<div class="layui-timeline-title">yan.y</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.cwhelp.common.utils;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* @author: yan.y
|
||||
* @Description:
|
||||
* @Date: Created in 01:00 2019-08-27
|
||||
* @Modified by:
|
||||
*/
|
||||
public class HttpYoushangFapiaoUtilTest {
|
||||
|
||||
@Test
|
||||
public void getVatInfoiceInfo() {
|
||||
JSONObject params = new JSONObject();
|
||||
params.put("fpdm","031001800304");
|
||||
params.put("fphm","00073818");
|
||||
params.put("kprq","2019-06-26");
|
||||
params.put("kjje","");
|
||||
params.put("jym","554287");
|
||||
JSONObject fapiaoInfo = HttpYoushangFapiaoUtil.getVatInfoiceInfo(params);
|
||||
String code = fapiaoInfo.getString("code");
|
||||
Assert.assertEquals("200",code);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user