From 3a1670ea2d47c13729793890a55c0441e3faa252 Mon Sep 17 00:00:00 2001 From: gaorl Date: Tue, 20 Jun 2023 16:50:53 +0800 Subject: [PATCH 1/4] =?UTF-8?q?feature=EF=BC=9A=E6=9B=B4=E6=96=B0=E7=89=A9?= =?UTF-8?q?=E6=96=99=E4=BC=98=E6=83=A0=E6=94=BF=E7=AD=96=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/commodity/service/impl/CommodityServiceImpl.java | 1 + .../src/main/resources/mybatis/mapper/CommodityMapper.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/commodity/service/impl/CommodityServiceImpl.java b/order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/commodity/service/impl/CommodityServiceImpl.java index 199b2490..ae66cb8f 100644 --- a/order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/commodity/service/impl/CommodityServiceImpl.java +++ b/order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/commodity/service/impl/CommodityServiceImpl.java @@ -134,6 +134,7 @@ public class CommodityServiceImpl implements CommodityService { } if(StringUtils.isBlank(codeEntity.getYhzcbs())|| "0".equals(codeEntity.getYhzcbs())){ codeEntity.setZzstsgl(""); + codeEntity.setLslbs(""); } codeEntity.setXhfNsrsbh(null);//不更新税号 codeEntity.setModifyTime(new Date()); diff --git a/order-management-base-service/src/main/resources/mybatis/mapper/CommodityMapper.xml b/order-management-base-service/src/main/resources/mybatis/mapper/CommodityMapper.xml index c00360d4..6dc936ff 100644 --- a/order-management-base-service/src/main/resources/mybatis/mapper/CommodityMapper.xml +++ b/order-management-base-service/src/main/resources/mybatis/mapper/CommodityMapper.xml @@ -297,7 +297,7 @@ tax_classification_name = #{commodityCode.ssflMc,jdbcType=VARCHAR}, - + preferential_policies_type = #{commodityCode.lslbs,jdbcType=VARCHAR}, From f7b85a3c7b6c5fafa59b570fe6e0ce50e4d8daa1 Mon Sep 17 00:00:00 2001 From: wangrangrang Date: Tue, 20 Jun 2023 17:27:12 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=90=88=E5=B9=B6=E6=8B=86=E5=88=86?= =?UTF-8?q?=E6=88=90=E5=93=81=E6=B2=B9=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/manager/service/impl/InvoiceServiceImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/InvoiceServiceImpl.java b/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/InvoiceServiceImpl.java index 068b13b3..893cef57 100644 --- a/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/InvoiceServiceImpl.java +++ b/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/InvoiceServiceImpl.java @@ -59,7 +59,6 @@ import org.springframework.util.CollectionUtils; import javax.annotation.Resource; import java.math.BigDecimal; -import java.text.DecimalFormat; import java.util.*; import java.util.stream.Collectors; @@ -174,7 +173,7 @@ public class InvoiceServiceImpl implements InvoiceService { // return R.error("结算单:"+commonOrderInfo.getOrderInfo().getDdh()+"购方信息为空,请补全!"); // } String kcp = baseServiceConfig.getKcp(); - boolean kcpMark = kcp.contains(commonOrderInfo.getOrderItemInfo().get(0).getSpbm()); + boolean kcpMark; List cpyOrderItems = new ArrayList(); List nocpyOrderItems = new ArrayList(); for(OrderItemInfo orderItemInfo: commonOrderInfo.getOrderItemInfo()){ From 55061b56f883014a094359b951342acb593bc07d Mon Sep 17 00:00:00 2001 From: WangQi <1021674882@qq.com> Date: Wed, 21 Jun 2023 10:03:04 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E8=B4=AD=E6=96=B9=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=9F=A5=E4=B8=8D=E5=88=B0=E8=B7=B3=E8=BF=87=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/InvoiceServiceImpl.java | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/InvoiceServiceImpl.java b/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/InvoiceServiceImpl.java index 893cef57..3b8c58ef 100644 --- a/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/InvoiceServiceImpl.java +++ b/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/InvoiceServiceImpl.java @@ -1594,25 +1594,27 @@ public class InvoiceServiceImpl implements InvoiceService { orderInfoIdList.stream().forEach(id->{ OrderInfo orderInfo = orderInfoMapper.selectOrderInfoByOrderId(id, null); BuyerEntity buyerEntity = buyerMapper.queryBuyerInfoByGhfIdAndEntId(orderInfo.getGhfId(), orderInfo.getEntId()); - if (buyerEntity == null) { - throw new RuntimeException("结算单:"+orderInfo.getDdh()+"购方信息为空,请补全!"); - } - if (OrderInfoEnum.CHECK_BANK_FLAG_YES.getKey().equals(buyerEntity.getCheckBankFlag())) { - log.info("开始校验客户信息完整"); - if (StrUtil.isBlank(orderInfo.getGhfNsrsbh())) { - throw new RuntimeException("结算单:"+orderInfo.getDdh()+"购方纳税人识别号为空,请补全!"); - } - if (StrUtil.isBlank(orderInfo.getGhfDz())) { - throw new RuntimeException("结算单:"+orderInfo.getDdh()+"购方地址为空,请补全!"); - } - if (StrUtil.isBlank(orderInfo.getGhfDh())) { - throw new RuntimeException("结算单:"+orderInfo.getDdh()+"购方电话为空,请补全!"); - } - if (StrUtil.isBlank(orderInfo.getGhfYh())) { - throw new RuntimeException("结算单:"+orderInfo.getDdh()+"购方开户行为空,请补全!"); - } - if (StrUtil.isBlank(orderInfo.getGhfZh())) { - throw new RuntimeException("结算单:"+orderInfo.getDdh()+"购方银行账号为空,请补全!"); +// if (buyerEntity == null) { +// throw new RuntimeException("结算单:"+orderInfo.getDdh()+"购方信息为空,请补全!"); +// } + if (buyerEntity != null) { + if (OrderInfoEnum.CHECK_BANK_FLAG_YES.getKey().equals(buyerEntity.getCheckBankFlag())) { + log.info("开始校验客户信息完整"); + if (StrUtil.isBlank(orderInfo.getGhfNsrsbh())) { + throw new RuntimeException("结算单:"+orderInfo.getDdh()+"购方纳税人识别号为空,请补全!"); + } + if (StrUtil.isBlank(orderInfo.getGhfDz())) { + throw new RuntimeException("结算单:"+orderInfo.getDdh()+"购方地址为空,请补全!"); + } + if (StrUtil.isBlank(orderInfo.getGhfDh())) { + throw new RuntimeException("结算单:"+orderInfo.getDdh()+"购方电话为空,请补全!"); + } + if (StrUtil.isBlank(orderInfo.getGhfYh())) { + throw new RuntimeException("结算单:"+orderInfo.getDdh()+"购方开户行为空,请补全!"); + } + if (StrUtil.isBlank(orderInfo.getGhfZh())) { + throw new RuntimeException("结算单:"+orderInfo.getDdh()+"购方银行账号为空,请补全!"); + } } } }); From 956d66287ac730aa4b7e8e7a7b22f7be1fd41a18 Mon Sep 17 00:00:00 2001 From: gaorl Date: Wed, 21 Jun 2023 11:03:35 +0800 Subject: [PATCH 4/4] =?UTF-8?q?feature=EF=BC=9A=E7=94=9F=E6=88=90=E9=A2=84?= =?UTF-8?q?=E5=88=B6=E4=B8=8D=E6=A0=A1=E9=AA=8C=E5=AE=B9=E5=B7=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/InvoiceServiceImpl.java | 57 ++++++++++--------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/InvoiceServiceImpl.java b/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/InvoiceServiceImpl.java index 3b8c58ef..f54c4e05 100644 --- a/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/InvoiceServiceImpl.java +++ b/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/InvoiceServiceImpl.java @@ -299,34 +299,35 @@ public class InvoiceServiceImpl implements InvoiceService { orderSplit.stream().forEach(splitEn -> { List orderItemInfo = splitEn.getOrderItemInfo(); orderItemInfo.stream().forEach(splitItem -> { - List collect = commonOrderInfo.getOrderItemInfo().stream().filter(oi -> oi.getXmmc().equals(splitItem.getXmmc()) && - ((StrUtil.isBlank(oi.getGgxh()) && StrUtil.isBlank(splitItem.getGgxh())) || oi.getGgxh().equals(splitItem.getGgxh())) && - ((StrUtil.isBlank(oi.getXmdw()) && StrUtil.isBlank(splitItem.getXmdw())) || oi.getXmdw().equals(splitItem.getXmdw())) && - ((StrUtil.isBlank(oi.getSl()) && StrUtil.isBlank(splitItem.getSl())) || oi.getSl().equals(splitItem.getSl()))).collect(Collectors.toList()); - if (collect.size() == 1) { - List ruleSplitEntityList = ruleSplitService.queryRuleSplit(commonOrderInfo.getOrderInfo().getXhfNsrsbh(), pageInvoiceReq.getUserId()); - log.info("税号:{},用户ID:{},查询的拆分限额信息结果:{}", commonOrderInfo.getOrderInfo().getXhfNsrsbh(), - pageInvoiceReq.getUserId(), JsonUtils.getInstance().toJsonString(ruleSplitEntityList)); - String djce = ConfigureConstant.STRING_0; - if(ruleSplitEntityList.size() != 0){ - djce = StrUtil.isBlank(ruleSplitEntityList.get(0).getDjce())?ConfigureConstant.STRING_0:ruleSplitEntityList.get(0).getDjce(); - } - if(ObjectUtil.isNotNull(collect.get(0).getXmdj()) && StrUtil.isNotBlank(collect.get(0).getXmdj()) && - ObjectUtil.isNotNull(splitItem.getXmdj()) && StrUtil.isNotBlank(splitItem.getXmdj())){ - BigDecimal abs = new BigDecimal(collect.get(0).getXmdj()).subtract(new BigDecimal(splitItem.getXmdj())).abs(); - if (abs.compareTo(new BigDecimal(djce)) > 0) { - Map map = new HashMap(); - map.put("ddh", commonOrderInfo.getOrderInfo().getDdh()); - map.put("ghfMc", commonOrderInfo.getOrderInfo().getGhfMc()); - map.put("xhfMc", commonOrderInfo.getOrderInfo().getXhfMc()); - map.put("jshj", commonOrderInfo.getOrderInfo().getKphjje()); - djOverflowList.add(map); - } - } - } else { - log.error("{}校验单价容差范围发生错误:在原结算单中未匹配到唯一明细,找到了{}条", LOGGER_MSG, collect.size()); - throw new RuntimeException("校验单价容差范围发生错误:在原结算单中未匹配到唯一明细"); - } +// List collect = commonOrderInfo.getOrderItemInfo().stream().filter(oi -> oi.getXmmc().equals(splitItem.getXmmc()) && +// ((StrUtil.isBlank(oi.getGgxh()) && StrUtil.isBlank(splitItem.getGgxh())) || oi.getGgxh().equals(splitItem.getGgxh())) && +// ((StrUtil.isBlank(oi.getXmdw()) && StrUtil.isBlank(splitItem.getXmdw())) || oi.getXmdw().equals(splitItem.getXmdw())) && +// ((StrUtil.isBlank(oi.getSl()) && StrUtil.isBlank(splitItem.getSl())) || oi.getSl().equals(splitItem.getSl()))).collect(Collectors.toList()); +// if (collect.size() == 1) { +// List ruleSplitEntityList = ruleSplitService.queryRuleSplit(commonOrderInfo.getOrderInfo().getXhfNsrsbh(), pageInvoiceReq.getUserId()); +// log.info("税号:{},用户ID:{},查询的拆分限额信息结果:{}", commonOrderInfo.getOrderInfo().getXhfNsrsbh(), +// pageInvoiceReq.getUserId(), JsonUtils.getInstance().toJsonString(ruleSplitEntityList)); +// String djce = ConfigureConstant.STRING_0; +// if(ruleSplitEntityList.size() != 0){ +// djce = StrUtil.isBlank(ruleSplitEntityList.get(0).getDjce())?ConfigureConstant.STRING_0:ruleSplitEntityList.get(0).getDjce(); +// } +// if(ObjectUtil.isNotNull(collect.get(0).getXmdj()) && StrUtil.isNotBlank(collect.get(0).getXmdj()) && +// ObjectUtil.isNotNull(splitItem.getXmdj()) && StrUtil.isNotBlank(splitItem.getXmdj())){ +// BigDecimal abs = new BigDecimal(collect.get(0).getXmdj()).subtract(new BigDecimal(splitItem.getXmdj())).abs(); +// if (abs.compareTo(new BigDecimal(djce)) > 0) { +// Map map = new HashMap(); +// map.put("ddh", commonOrderInfo.getOrderInfo().getDdh()); +// map.put("ghfMc", commonOrderInfo.getOrderInfo().getGhfMc()); +// map.put("xhfMc", commonOrderInfo.getOrderInfo().getXhfMc()); +// map.put("jshj", commonOrderInfo.getOrderInfo().getKphjje()); +// djOverflowList.add(map); +// } +// } +// } +// else { +// log.error("{}校验单价容差范围发生错误:在原结算单中未匹配到唯一明细,找到了{}条", LOGGER_MSG, collect.size()); +// throw new RuntimeException("校验单价容差范围发生错误:在原结算单中未匹配到唯一明细"); +// } }); }); }