From 7e55595765999873c45279ad093f6915ad3475b3 Mon Sep 17 00:00:00 2001 From: yishiqihuasheng <1191093413@qq.com> Date: Fri, 2 Jun 2023 10:47:49 +0800 Subject: [PATCH] =?UTF-8?q?po=E6=8E=A5=E5=8F=A3=E5=85=BC=E5=AE=B9=E5=8F=91?= =?UTF-8?q?=E7=A5=A8=E5=8F=B7=E7=A0=81=E4=B8=BA=E5=8F=91=E7=A5=A8=E5=8F=B7?= =?UTF-8?q?=E7=A0=81=E5=92=8C=E5=8F=91=E7=A5=A8=E4=BB=A3=E7=A0=81=E6=8B=BC?= =?UTF-8?q?=E4=B8=B2=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/BaseInvoiceController.java | 28 ++++++++++++++++++- .../service/impl/InvoiceAuthServiceImpl.java | 22 +++++++++++++-- 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java b/dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java index ac966283..95572f32 100644 --- a/dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.java +++ b/dxhy-base/src/main/java/com/dxhy/base/controller/BaseInvoiceController.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 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 { diff --git a/dxhy-erp/src/main/java/com/dxhy/erp/service/impl/InvoiceAuthServiceImpl.java b/dxhy-erp/src/main/java/com/dxhy/erp/service/impl/InvoiceAuthServiceImpl.java index f80d945f..7a0733c0 100644 --- a/dxhy-erp/src/main/java/com/dxhy/erp/service/impl/InvoiceAuthServiceImpl.java +++ b/dxhy-erp/src/main/java/com/dxhy/erp/service/impl/InvoiceAuthServiceImpl.java @@ -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 implements InvoiceAuthService { @@ -339,7 +342,15 @@ public class InvoiceAuthServiceImpl extends MpBaseServiceImpl{}",zdata1.getZFPHM().length()); + + String fphm = zdata1.getZFPHM(); + if (StringHelper.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 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; DynamicContextHolder.push("business"+DbConstant.BUSINESS_READ); if(fplxList.contains(zdata1.getZFPLX())){ TdxRecordInvoice recordInvoiceByUuid = tDxrecordInvoiceDao.getRecordInvoiceByUuid(uuid);