Merge remote-tracking branch 'sdny/0602L' into release

# Conflicts:
#	dxhy-erp/src/main/java/com/dxhy/erp/service/impl/InvoiceAuthServiceImpl.java
release
zhenghaiyang@ele-cloud.com 2 years ago
commit aed46a4684
  1. 28
      dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java
  2. 44
      dxhy-erp/src/main/java/com/dxhy/erp/service/impl/InvoiceAuthServiceImpl.java

@ -840,6 +840,21 @@ public class BaseInvoiceController extends AbstractController {
String menuId = (String)map.get("menuId");
String company = (String)map.get("company");
int curr = 0;
if (map.get("curr") != null){
curr = (int) map.get("curr");
}else {
ResponseEntity.ok(R.error("分页数据不能为空"));
}
int size = 0;
if (map.get("size")!= null){
size = (int) map.get("size");
}else {
ResponseEntity.ok(R.error("分页大小不能为空"));
}
if (StringUtils.isNotBlank(inAccountStatus)){
return ResponseEntity.ok(R.error("入账状态不能为空"));
}
@ -851,7 +866,13 @@ public class BaseInvoiceController extends AbstractController {
try {
BigDecimal tax = new BigDecimal(maxTax);
} catch (NumberFormatException e) {
return ResponseEntity.ok(R.error("输入税额上线格式不对,请重新输入"));
return ResponseEntity.ok(R.error("输入税额上限格式不对,请重新输入"));
}
String allIn = "88";
if (map.get("sign") != null && "99".equals((String)map.get("sign"))){
allIn = "99";
}
@ -890,6 +911,9 @@ public class BaseInvoiceController extends AbstractController {
pramsMap.put("menuId", menuId);
pramsMap.put("menuId", "118061");
pramsMap.put("maxTax",maxTax);
pramsMap.put("sign",allIn);
pramsMap.put("curr",curr);
pramsMap.put("size",size);
pramsMap.put("business", getUserInfo().getBusiness());
pramsMap.put("dbName", getUserInfo().getDbName());
List<Tax> taxList = getUserInfo().getOrg();
@ -901,6 +925,8 @@ public class BaseInvoiceController extends AbstractController {
} else {
gfshList = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
}
if (ObjectUtils.isNotEmpty(gfshList)){
pramsMap.put("gfsh", gfshList);
}else {

@ -10,6 +10,7 @@ import com.dxhy.common.datasource.config.DynamicContextHolder;
import com.dxhy.common.enums.FplxEnum;
import com.dxhy.common.enums.ReturnCodeEnum;
import com.dxhy.common.service.impl.MpBaseServiceImpl;
import com.dxhy.common.util.StringHelper;
import com.dxhy.common.util.pojo.Authorize;
import com.dxhy.common.util.pojo.GlobalInfo;
import com.dxhy.erp.dao.*;
@ -19,6 +20,7 @@ import com.dxhy.erp.model.auth.InterfaceCode;
import com.dxhy.erp.service.InvoiceAuthService;
import com.dxhy.erp.service.TDxInvoiceReimburseService;
import com.dxhy.erp.utils.CheckUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;
@ -34,6 +36,7 @@ import java.util.*;
*/
@SuppressWarnings({"AlibabaMethodTooLong", "AlibabaUndefineMagicConstant"})
@Service
@Slf4j
public class InvoiceAuthServiceImpl extends MpBaseServiceImpl<RecordInvoiceDao, RecordInvoice>
implements InvoiceAuthService {
@ -339,7 +342,15 @@ public class InvoiceAuthServiceImpl extends MpBaseServiceImpl<RecordInvoiceDao,
fplxList.add("31");
fplxList.add("32");
for(ZDATA zdata1:zdata){
String uuid = zdata1.getZFPDM()+zdata1.getZFPHM();
log.info("zdata1.getZFPHM()===>{}",zdata1.getZFPHM().length());
String fphm = zdata1.getZFPHM();
if (org.apache.commons.lang3.StringUtils.isNotBlank(fphm) && fphm.length() > 8 && !("26".equals(zdata1.getZFPLX()) || "27".equals(zdata1.getZFPLX()))){
fphm = fphm.substring(fphm.length() - 8);
log.info("非全电但是号码");
}
log.info("发票号码{}",fphm);
String uuid = zdata1.getZFPDM()+fphm;
zdata1.setZFPLX(convertFpzldm(zdata1.getZFPLX()));
TdxRecordInvoice recordInvoiceByUuid = tDxrecordInvoiceDao.getRecordInvoiceByUuid(uuid);
//查询票池
@ -361,7 +372,14 @@ public class InvoiceAuthServiceImpl extends MpBaseServiceImpl<RecordInvoiceDao,
for(ZDATA zdata1:zdata){
//成功或者失败标识
boolean flag = false;
String uuid = zdata1.getZFPDM()+zdata1.getZFPHM();
log.info("zdata1.getZFPHM(){}",zdata1.getZFPHM().length());
String fphm = zdata1.getZFPHM();
if (org.apache.commons.lang3.StringUtils.isNotBlank(fphm) && fphm.length() > 8 && !("26".equals(zdata1.getZFPLX()) || "27".equals(zdata1.getZFPLX()))){
fphm = fphm.substring(fphm.length() - 8);
log.info("非全电但是号码");
}
log.info("发票号码{}",fphm);
String uuid = zdata1.getZFPDM()+fphm;
//销项标识
String xxbs = zdata1.getXXBS();
DynamicContextHolder.push("business"+DbConstant.BUSINESS_READ);
@ -422,17 +440,17 @@ public class InvoiceAuthServiceImpl extends MpBaseServiceImpl<RecordInvoiceDao,
tDxInvoiceReimburseService.getBaseMapper().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);
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){

Loading…
Cancel
Save