添加销项标识判断

release
yishiqihuasheng 2 years ago
parent 263b98c910
commit e8006c2e0d
  1. 2
      dxhy-erp/src/main/java/com/dxhy/erp/model/ZDATA.java
  2. 29
      dxhy-erp/src/main/java/com/dxhy/erp/service/impl/InvoiceAuthServiceImpl.java

@ -36,4 +36,6 @@ public class ZDATA {
private String BELNR;
@JsonProperty(value = "BUDAT")
private String BUDAT;
@JsonProperty(value = "XXBS")
private String XXBS;
}

@ -362,8 +362,10 @@ public class InvoiceAuthServiceImpl extends MpBaseServiceImpl<RecordInvoiceDao,
//成功或者失败标识
boolean flag = false;
String uuid = zdata1.getZFPDM()+zdata1.getZFPHM();
//销项标识
String xxbs = zdata1.getXXBS();
DynamicContextHolder.push("business"+DbConstant.BUSINESS_READ);
if(fplxList.contains(zdata1.getZFPLX())){
if(fplxList.contains(zdata1.getZFPLX()) && !"X".equalsIgnoreCase(xxbs)){
TdxRecordInvoice recordInvoiceByUuid = tDxrecordInvoiceDao.getRecordInvoiceByUuid(uuid);
if(recordInvoiceByUuid!=null){
UpdateWrapper updateWrapper = new UpdateWrapper();
@ -419,17 +421,20 @@ public class InvoiceAuthServiceImpl extends MpBaseServiceImpl<RecordInvoiceDao,
DynamicContextHolder.push("business"+DbConstant.BUSINESS_WRITE);
tDxInvoiceReimburseService.getBaseMapper().update(null,updateWrapper);
}
DynamicContextHolder.push("business"+DbConstant.BUSINESS_WRITE);
UpdateWrapper updateWrapper = new UpdateWrapper();
updateWrapper.set("sn_voucher_number",zdata1.getBELNR());
updateWrapper.set("posting_time",zdata1.getBUDAT());
updateWrapper.set("account_period",zdata1.getBUDAT().substring(0,7));
updateWrapper.set("bzdh",zdata1.getZBZDH());
updateWrapper.set("inaccount_status",zdata1.getZYWZT());
updateWrapper.set("comp_code",zdata1.getZGSDM());
updateWrapper.set("bzr",zdata1.getZJBRT());
updateWrapper.eq("uuid",uuid);
tdxSaleRecordInvoiceDao.update(null,updateWrapper);
if ("X".equalsIgnoreCase(xxbs)){
DynamicContextHolder.push("business"+DbConstant.BUSINESS_WRITE);
UpdateWrapper updateWrapper = new UpdateWrapper();
updateWrapper.set("sn_voucher_number",zdata1.getBELNR());
updateWrapper.set("posting_time",zdata1.getBUDAT());
updateWrapper.set("account_period",zdata1.getBUDAT().substring(0,7));
updateWrapper.set("bzdh",zdata1.getZBZDH());
updateWrapper.set("inaccount_status",zdata1.getZYWZT());
updateWrapper.set("comp_code",zdata1.getZGSDM());
updateWrapper.set("bzr",zdata1.getZJBRT());
updateWrapper.eq("uuid",uuid);
tdxSaleRecordInvoiceDao.update(null,updateWrapper);
}
if(!flag){
promsg.append("票据号码:"+zdata1.getZFPHM()+"绑定成功! ");
}

Loading…
Cancel
Save