ariesy 更新最新代码

release
yefei 2 years ago
parent 3bf0065316
commit 316ef99e0d
  1. 2
      dxhy-erp/src/main/java/com/dxhy/erp/config/ErpWebConfiguration.java
  2. 47
      dxhy-erp/src/main/java/com/dxhy/erp/controller/SDNYMainProcessController.java
  3. 2
      dxhy-erp/src/main/java/com/dxhy/erp/entity/TdxSaleRecordInvoice.java
  4. 25
      dxhy-erp/src/main/java/com/dxhy/erp/service/SNPushCheckRecordService.java
  5. 12
      dxhy-erp/src/main/resources/bootstrap-std.yaml
  6. 26
      dxhy-export-domestic/src/main/java/com/dxhy/domestic/controller/DomesticInvoiceDrawbackController.java
  7. 2
      dxhy-sign/src/main/resources/mapper/SignInvoiceMapper.xml

@ -59,7 +59,7 @@ public class ErpWebConfiguration implements WebMvcConfigurer {
*/ */
private ArrayList<String> getIncludePathPatterns() { private ArrayList<String> getIncludePathPatterns() {
ArrayList<String> list = new ArrayList<>(); ArrayList<String> list = new ArrayList<>();
String[] urls = {"/order/**"}; String[] urls = {"/order/**,/sn/**"};
Collections.addAll(list, urls); Collections.addAll(list, urls);
return list; return list;
} }

@ -8,6 +8,7 @@ import com.dxhy.common.constant.ConfigureConstant;
import com.dxhy.common.controller.AbstractController; import com.dxhy.common.controller.AbstractController;
import com.dxhy.common.enums.SNFplxEnum; import com.dxhy.common.enums.SNFplxEnum;
import com.dxhy.common.util.InvoiceUtil; import com.dxhy.common.util.InvoiceUtil;
import com.dxhy.common.util.UserInfoUtil;
import com.dxhy.common.utils.R; import com.dxhy.common.utils.R;
import com.dxhy.erp.dao.TdxSaleRecordInvoiceDao; import com.dxhy.erp.dao.TdxSaleRecordInvoiceDao;
import com.dxhy.erp.entity.TDxInvoiceReimburse; import com.dxhy.erp.entity.TDxInvoiceReimburse;
@ -73,14 +74,14 @@ public class SDNYMainProcessController extends AbstractController {
@SysLog("发票查验") @SysLog("发票查验")
public ResponseEntity<String> singleInvoiceCheck(@RequestBody Map<String, String> pramsMap) throws ParseException { public ResponseEntity<String> singleInvoiceCheck(@RequestBody Map<String, String> pramsMap) throws ParseException {
log.info("传入的参数为:{}", pramsMap); log.info("传入的参数为:{}", pramsMap);
String userid = "101833"; // String userid = "101833";
String dbName = "business"; // String dbName = "business";
String company = "BIGB"; // String company = "BIGB";
// 入参统一在入口处理 // 入参统一在入口处理
// String userid = getLoginName(); String userid = getLoginName();
// String dbName = getUserInfo().getDbName(); String dbName = getUserInfo().getDbName();
// String company = getUserInfo().getCompany(); String company = getUserInfo().getCompany();
JSONObject checkInvoiceResult = null; JSONObject checkInvoiceResult = null;
InvoiceUtil iu = new InvoiceUtil(pramsMap.get("invoiceCode")); InvoiceUtil iu = new InvoiceUtil(pramsMap.get("invoiceCode"));
String fplxdm = iu.getFplxdm(); String fplxdm = iu.getFplxdm();
@ -229,10 +230,12 @@ public class SDNYMainProcessController extends AbstractController {
checkInvoice.put("invoiceNumber", checkInvoice.get("invoiceNo").toString()); checkInvoice.put("invoiceNumber", checkInvoice.get("invoiceNo").toString());
String kprq = checkInvoice.get("invoiceDate").toString(); String kprq = checkInvoice.get("invoiceDate").toString();
String str = new SimpleDateFormat("yyyy-MM-dd").format(kprq); SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US);
log.info("开票日期为:{} ", str); Date date = sdf.parse(kprq);
String formatStr = new SimpleDateFormat("yyyy-MM-dd").format(date);
log.info("开票日期为:{} ", formatStr);
checkInvoice.put("billingDate", str); checkInvoice.put("billingDate", formatStr);
checkInvoice.put("purchaserName", checkInvoice.get("gfName")); checkInvoice.put("purchaserName", checkInvoice.get("gfName"));
checkInvoice.put("purchaserTaxNo", checkInvoice.get("gfTaxNo")); checkInvoice.put("purchaserTaxNo", checkInvoice.get("gfTaxNo"));
checkInvoice.put("purchaserBank", checkInvoice.get("gfBankAndNo")); checkInvoice.put("purchaserBank", checkInvoice.get("gfBankAndNo"));
@ -347,20 +350,20 @@ public class SDNYMainProcessController extends AbstractController {
log.info("影像系统同步数据:{}", JSONObject.toJSONString(snRequestObject)); log.info("影像系统同步数据:{}", JSONObject.toJSONString(snRequestObject));
String userid = "101833"; // String userid = "101833";
String dbName = "business"; // String dbName = "business";
String company = "BIGB"; // String company = "BIGB";
String taxNo = "9111112222333344DD"; // String taxNo = "9111112222333344DD";
// // 入参统一在入口处理 // // 入参统一在入口处理
// String userid = getLoginName(); String userid = getLoginName();
// String dbName = getUserInfo().getDbName(); String dbName = getUserInfo().getDbName();
// String company = getUserInfo().getCompany(); String company = getUserInfo().getCompany();
// List<String> gfshAll = UserInfoUtil.getGfshAll(getUserInfo().getOrg()); List<String> gfshAll = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
// String gfsh = ""; String gfsh = "";
// if (gfshAll.size() > 0) { if (gfshAll.size() > 0) {
// gfsh = gfshAll.get(0); gfsh = gfshAll.get(0);
// } }
String result = ""; String result = "";
@ -391,7 +394,7 @@ public class SDNYMainProcessController extends AbstractController {
for (SNInvoice invoice : invoiceInfoList) { for (SNInvoice invoice : invoiceInfoList) {
String fplxdm = ""; String fplxdm = "";
String snFplx = ""; String snFplx = "";
result = snPushCheckRecordService.updateInvoicePoll(company, taxNo, reimburse, invoice, fplxdm, imageId, compCode); result = snPushCheckRecordService.updateInvoicePoll(company, gfsh, reimburse, invoice, fplxdm, imageId, compCode);
//价税分离判断 //价税分离判断
if (!"ok".equals(result) && !"0000".equals(result)) { if (!"ok".equals(result) && !"0000".equals(result)) {

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
@ -42,6 +43,7 @@ public class TdxSaleRecordInvoice implements Serializable {
/** /**
* 开票日期 * 开票日期
*/ */
@DateTimeFormat(pattern="yyyy-MM-dd")
private Date invoiceDate; private Date invoiceDate;
/** /**

@ -104,7 +104,17 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter {
return post; return post;
} }
public String pushInvoiceToRecordInvoice(SNInvoice snInvoice, String taxNo, String company) throws Exception { public String pushInvoiceToRecordInvoice(SNInvoice snInvoice, String taxNo, String company,String compCode) throws Exception {
BaseTDxRecordInvoice recordInvoice = new BaseTDxRecordInvoice();
DynamicContextHolder.push(DbConstant.BASICS_READ);
SysDeptEntity orgByCompCode = sysDeptDao.getOrgByCompCode(compCode);
log.info("查询的组织信息为:{}",JSONObject.toJSONString(orgByCompCode));
recordInvoice.setGfTaxNo(orgByCompCode.getTaxno());
recordInvoice.setGfName(orgByCompCode.getTaxname());
recordInvoice.setGfAddressAndPhone(orgByCompCode.getAddress() + orgByCompCode.getPhone());
recordInvoice.setGfBankAndNo(orgByCompCode.getBank() + orgByCompCode.getAccount());
QueryWrapper<BaseTDxTaxCurrent> currentWrapper = new QueryWrapper<>(); QueryWrapper<BaseTDxTaxCurrent> currentWrapper = new QueryWrapper<>();
currentWrapper.eq("taxno", taxNo); currentWrapper.eq("taxno", taxNo);
@ -135,7 +145,7 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter {
String gfmc = snInvoice.getPurchaserName(); String gfmc = snInvoice.getPurchaserName();
String invoiceType = snInvoice.getInvoiceType(); String invoiceType = snInvoice.getInvoiceType();
BaseTDxRecordInvoice recordInvoice = new BaseTDxRecordInvoice();
recordInvoice.setUuid(fpdm + fphm); recordInvoice.setUuid(fpdm + fphm);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
if (kprq != null) { if (kprq != null) {
@ -593,13 +603,15 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter {
reimburse = convertToReimburse(invoice, reimburse, fplxdm, company); reimburse = convertToReimburse(invoice, reimburse, fplxdm, company);
log.info("插库的发票信息:{}",reimburse);
DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE); DynamicContextHolder.push("business" + DbConstant.BUSINESS_WRITE);
int insert = 0; int insert = 0;
QueryWrapper wrapper = new QueryWrapper(); QueryWrapper wrapper = new QueryWrapper();
wrapper.eq("uuid", reimburse.getUuid()); wrapper.eq("uuid", reimburse.getUuid());
TDxInvoiceReimburse reimburse1 = tDxInvoiceReimburseService.getBaseMapper().selectOne(wrapper); TDxInvoiceReimburse reimburse1 = tDxInvoiceReimburseService.getBaseMapper().selectOne(wrapper);
if (reimburse1 != null) { if (reimburse1 != null) {
insert = tDxInvoiceReimburseService.getBaseMapper().updateById(reimburse1); insert = tDxInvoiceReimburseService.getBaseMapper().updateById(reimburse);
} else { } else {
insert = tDxInvoiceReimburseService.getBaseMapper().insert(reimburse); insert = tDxInvoiceReimburseService.getBaseMapper().insert(reimburse);
} }
@ -616,7 +628,7 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter {
log.info("可查验发票,更新底账库完成"); log.info("可查验发票,更新底账库完成");
} else { } else {
//不可查验发票,未入库,插入票池 //不可查验发票,未入库,插入票池
this.pushInvoiceToRecordInvoice(invoice, taxNo, company); this.pushInvoiceToRecordInvoice(invoice, taxNo, company,compCode);
log.info("不可查验发票,插入底账库成功"); log.info("不可查验发票,插入底账库成功");
} }
@ -653,11 +665,6 @@ public class SNPushCheckRecordService extends AbstractServiceAdapter {
reimburse.setXfAddressAndPhone(invoice.getSalesAddressPhone()); reimburse.setXfAddressAndPhone(invoice.getSalesAddressPhone());
reimburse.setXfBankAndNo(invoice.getSalesBank()); reimburse.setXfBankAndNo(invoice.getSalesBank());
reimburse.setGfTaxNo(invoice.getPurchaserTaxNo());
reimburse.setGfName(invoice.getPurchaserName());
reimburse.setGfAddressAndPhone(invoice.getPurchaserAddressPhone());
reimburse.setGfBankAndNo(invoice.getPurchaserBank());
reimburse.setTaxRate(invoice.getTaxRate()); reimburse.setTaxRate(invoice.getTaxRate());
reimburse.setIsDeduction(invoice.getIsDeductible()); reimburse.setIsDeduction(invoice.getIsDeductible());

@ -4,13 +4,13 @@ spring:
nacos: nacos:
config: config:
# Nacos config 地址 # Nacos config 地址
server-addr: 172.31.36.143:33000 server-addr: 172.31.36.147:33000
# Nacos config 命名空间,对应配置中的名称(dxhy-jxpt-namespace) # Nacos config 命名空间,对应配置中的名称(dxhy-jxpt-namespace)
namespace: b271ba8e-84d9-4393-88b8-9271aff9465c namespace: eb6eab27-62a4-4ccf-8640-b8e91df0a1a6
# Nacos config 分组 # Nacos config 分组
group: dxhy-erp-group group: dxhy-erp-group
# Nacos config 登录用户名 # Nacos config 登录用户名
username: admin username: nacos
# Nacos config 登录密码 # Nacos config 登录密码
password: Invoice.nacos.!1 password: Invoice.nacos.!1
# Nacos config 配置文件前缀 # Nacos config 配置文件前缀
@ -19,9 +19,9 @@ spring:
file-extension: yaml file-extension: yaml
# Nacos discovery 配置 # Nacos discovery 配置
discovery: discovery:
server-addr: 172.31.36.143:33000 server-addr: 172.31.36.147:33000
# Nacos config 登录用户名 # Nacos config 登录用户名
username: admin username: nacos
# Nacos config 登录密码 # Nacos config 登录密码
password: Invoice.nacos.!1 password: Invoice.nacos.!1
namespace: b271ba8e-84d9-4393-88b8-9271aff9465c namespace: eb6eab27-62a4-4ccf-8640-b8e91df0a1a6

@ -42,22 +42,20 @@ public class DomesticInvoiceDrawbackController extends AbstractController {
/** /**
* 退税手工认证列表接口 * 退税手工认证列表接口
* *
* @param dto * @param dto 参数
* 参数
*/ */
@PostMapping("/authentication_list") @PostMapping("/authentication_list")
@ApiOperation(value = "退税手工认证列表接口") @ApiOperation(value = "退税手工认证列表接口")
public ResponseEntity<R> authenticationList(@RequestBody @Valid AuthenticationConditionDTO dto) { public ResponseEntity<R> authenticationList(@RequestBody @Valid AuthenticationConditionDTO dto) {
CommonListResponseVO<ManualAuthenticationListVO> resultVO = CommonListResponseVO<ManualAuthenticationListVO> resultVO =
domesticInvoiceDrawbackService.authenticationList(dto, getUserInfo()); domesticInvoiceDrawbackService.authenticationList(dto, getUserInfo());
return ResponseEntity.ok(R.ok().put("data", responseResult(JSON.toJSONString(resultVO)))); return ResponseEntity.ok(R.ok().put("data", responseResult(JSON.toJSONString(resultVO))));
} }
/** /**
* 退税手工认证接口 * 退税手工认证接口
* *
* @param dto * @param dto 参数
* 参数
*/ */
@PostMapping("/authentication") @PostMapping("/authentication")
@ApiOperation(value = "退税手工认证接口") @ApiOperation(value = "退税手工认证接口")
@ -70,8 +68,7 @@ public class DomesticInvoiceDrawbackController extends AbstractController {
/** /**
* 退税导入认证信息查询接口 * 退税导入认证信息查询接口
* *
* @param datalist * @param datalist 参数
* 参数
*/ */
@ResponseBody @ResponseBody
@PostMapping("/import_authentication_check") @PostMapping("/import_authentication_check")
@ -79,24 +76,24 @@ public class DomesticInvoiceDrawbackController extends AbstractController {
public ResponseEntity<R> importAuthenticationCheck(@RequestBody Map<String, String> datalist) { public ResponseEntity<R> importAuthenticationCheck(@RequestBody Map<String, String> datalist) {
List<AuthenticationImportDTO> dtoList = List<AuthenticationImportDTO> dtoList =
JSON.parseArray(datalist.get("datalist"), AuthenticationImportDTO.class); JSON.parseArray(datalist.get("datalist"), AuthenticationImportDTO.class);
dtoList.forEach(dto -> { dtoList.forEach(dto -> {
dto.setInvoiceCode(dto.getInvoiceCode().replace(" ", "")); if (dto.getInvoiceCode() != null)
dto.setInvoiceCode(dto.getInvoiceCode().replace(" ", ""));
dto.setInvoiceDate(dto.getInvoiceDate().replace(" ", "")); dto.setInvoiceDate(dto.getInvoiceDate().replace(" ", ""));
dto.setInvoiceNo(dto.getInvoiceNo().replace(" ", "")); dto.setInvoiceNo(dto.getInvoiceNo().replace(" ", ""));
dto.setTaxAmount(dto.getTaxAmount().replace(" ", "")); dto.setTaxAmount(dto.getTaxAmount().replace(" ", ""));
}); });
String menuId = datalist.get("menuId"); String menuId = datalist.get("menuId");
CommonListResponseVO<ImportAuthenticationListVO> resultList = CommonListResponseVO<ImportAuthenticationListVO> resultList =
domesticInvoiceDrawbackService.importAuthenticationCheck(dtoList, getUserInfo(), menuId); domesticInvoiceDrawbackService.importAuthenticationCheck(dtoList, getUserInfo(), menuId);
return ResponseEntity.ok(R.ok().put("data", responseResult(JSON.toJSONString(resultList)))); return ResponseEntity.ok(R.ok().put("data", responseResult(JSON.toJSONString(resultList))));
} }
/** /**
* 退税认证查询接口 * 退税认证查询接口
* *
* @param dto * @param dto 参数
* 参数
*/ */
@PostMapping("/authentication_check") @PostMapping("/authentication_check")
@ApiOperation(value = "退税认证查询接口") @ApiOperation(value = "退税认证查询接口")
@ -105,15 +102,14 @@ public class DomesticInvoiceDrawbackController extends AbstractController {
dto.setCompany(getUserInfo().getCompany()); dto.setCompany(getUserInfo().getCompany());
} }
CommonListResponseVO<AuthenticationCheckListVO> responseVO = CommonListResponseVO<AuthenticationCheckListVO> responseVO =
domesticInvoiceDrawbackService.authenticationCheck(dto, getUserInfo()); domesticInvoiceDrawbackService.authenticationCheck(dto, getUserInfo());
return ResponseEntity.ok(R.ok().put("data", responseResult(JSON.toJSONString(responseVO)))); return ResponseEntity.ok(R.ok().put("data", responseResult(JSON.toJSONString(responseVO))));
} }
/** /**
* 请求结果加密封装 * 请求结果加密封装
* *
* @param json * @param json json
* json
*/ */
private String responseResult(String json) { private String responseResult(String json) {
String jsonString = null; String jsonString = null;

@ -32,7 +32,7 @@
<select id="selectQsfpList" parameterType="java.util.Map" <select id="selectQsfpList" parameterType="java.util.Map"
resultMap="BaseResultMap" databaseId="mysql"> resultMap="BaseResultMap" databaseId="mysql">
SELECT SELECT
r.id,t.notes,t.qs_type,t.qs_status,t.qs_date,t.user_name,t.invoice_code,t.invoice_no,t.ele_invoice_no,t.uuid,t.invoice_date,t.invoice_type,t.invoice_amount,t.tax_amount t.id,t.notes,t.qs_type,t.qs_status,t.qs_date,t.user_name,t.invoice_code,t.invoice_no,t.ele_invoice_no,t.uuid,t.invoice_date,t.invoice_type,t.invoice_amount,t.tax_amount
,t.dept_id,t.dept_name,t.scan_id,t.gf_name,t.xf_name,t.gf_tax_no,t.xf_tax_no,t.check_code,t.remark,t.create_date,t.total_amount, ,t.dept_id,t.dept_name,t.scan_id,t.gf_name,t.xf_name,t.gf_tax_no,t.xf_tax_no,t.check_code,t.remark,t.create_date,t.total_amount,
t.voucher_number,img.image_path t.voucher_number,img.image_path
FROM t_dx_invoice t FROM t_dx_invoice t

Loading…
Cancel
Save