diff --git a/order-management-common/src/main/java/com/dxhy/order/model/InvoiceInfo.java b/order-management-common/src/main/java/com/dxhy/order/model/InvoiceInfo.java index c3ad1cc3..81bdfa31 100644 --- a/order-management-common/src/main/java/com/dxhy/order/model/InvoiceInfo.java +++ b/order-management-common/src/main/java/com/dxhy/order/model/InvoiceInfo.java @@ -103,4 +103,5 @@ public class InvoiceInfo { private String source; //@ApiModelProperty("身份证号码/组织机构代码") private String idcardNo; + private String checkFilter; } diff --git a/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/PushInvoiceServiceImpl.java b/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/PushInvoiceServiceImpl.java index 7be886a1..2f48e66b 100644 --- a/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/PushInvoiceServiceImpl.java +++ b/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/manager/service/impl/PushInvoiceServiceImpl.java @@ -666,6 +666,7 @@ public class PushInvoiceServiceImpl implements PushInvoiceService { invoiceInfo.setCheckCode(StringUtils.isNotBlank(ddfpxx.getJYM())?ddfpxx.getJYM():""); // String state = "1".equals(ddfpxx.getZFBZ()) ? "1" : "1".equals(ddfpxx.getCHBZ()) ? "2" : "0"; invoiceInfo.setState("0"); + invoiceInfo.setCheckFilter("1"); invoiceInfo.setRemarks(StringUtils.isNotBlank(ddfpxx.getBZ())?ddfpxx.getBZ():""); //invoiceInfo.setSource(ddfpxx.getDDLX()); invoiceInfo.setMachineCode(ddfpxx.getJQBH()); diff --git a/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/validate/service/impl/ValidateOrderInfoServiceImpl.java b/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/validate/service/impl/ValidateOrderInfoServiceImpl.java index 8822ca9f..2e8f0bb1 100644 --- a/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/validate/service/impl/ValidateOrderInfoServiceImpl.java +++ b/order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/validate/service/impl/ValidateOrderInfoServiceImpl.java @@ -135,7 +135,6 @@ public class ValidateOrderInfoServiceImpl implements ValidateOrderInfoService { checkResultMap.put(OrderManagementConstant.ERRORCODE, OrderInfoContentEnum.SUCCESS.getKey()); OrderInfo orderInfo = commonOrderInfo.getOrderInfo(); - orderInfo.setInterfaceType(commonOrderInfo.getInterfaceType()); List orderItemInfo = commonOrderInfo.getOrderItemInfo(); if (Double.parseDouble(orderInfo.getKphjje()) <= 0) { checkResultMap = CheckParamUtil.generateErrorMap(orderInfo.getFpqqlsh(), "", OrderInfoContentEnum.INVOICE_HJJE_ZERO_ERROR); diff --git a/order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/AllocateInvoiceInterfaceServiceImplV3.java b/order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/AllocateInvoiceInterfaceServiceImplV3.java index 9a48ed62..f12bc682 100644 --- a/order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/AllocateInvoiceInterfaceServiceImplV3.java +++ b/order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/AllocateInvoiceInterfaceServiceImplV3.java @@ -379,7 +379,7 @@ public class AllocateInvoiceInterfaceServiceImplV3 implements AllocateInvoiceInt //价税分离后订单信息补全处理 completeOrderInfo(orderInfo, orderBatchRequest.getFpzldm(), kpjh, sldid, orderItemInfos.get(0).getKce(), terminalCode); - taxSeparationService.setInterfaceType(ConfigureConstant.STRING_0000); + taxSeparationService.getOrderInfo().setInterfaceType(ConfigureConstant.STRING_0000); //校验价税分离后的数据 Map checkInvParam = validateOrderInfoService.checkInvoiceData(taxSeparationService); if (!ConfigureConstant.STRING_0000.equals(checkInvParam.get(OrderManagementConstant.ERRORCODE))) { diff --git a/order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/SDEnregyServiceImpl.java b/order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/SDEnregyServiceImpl.java index a2973f0c..3aafed83 100644 --- a/order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/SDEnregyServiceImpl.java +++ b/order-management-consumer/src/main/java/com/dxhy/order/consumer/openapi/service/impl/SDEnregyServiceImpl.java @@ -3,7 +3,10 @@ package com.dxhy.order.consumer.openapi.service.impl; import cn.hutool.http.HttpRequest; import cn.hutool.http.HttpResponse; import com.alibaba.fastjson.JSONObject; +import com.dxhy.order.baseservice.module.base.dao.DictionaryMapper; +import com.dxhy.order.baseservice.module.base.model.DictionaryEntity; import com.dxhy.order.baseservice.module.base.service.BaseService; +import com.dxhy.order.baseservice.module.base.service.DictionaryService; import com.dxhy.order.baseservice.module.buyer.dao.BuyerMapper; import com.dxhy.order.baseservice.module.buyer.model.BuyerEntity; import com.dxhy.order.baseservice.module.buyer.model.BuyerEntityDetail; @@ -71,6 +74,10 @@ public class SDEnregyServiceImpl extends SDEnregyServiceAbstract { @Resource private TaxClassCodeMapper taxClassCodeMapper; + + @Resource + private DictionaryService dictionaryService; + // ===========物料相关开始=========== // 物料主动查询接口 @Value("${mdm.groupTaxCode.url}") @@ -312,10 +319,22 @@ public class SDEnregyServiceImpl extends SDEnregyServiceAbstract { public List matchRule(List mdmGmfxxtbReqBOS){ List list = Lists.newArrayList(); + // 物料单位中英文转换字典 + List dictData = dictionaryService.cacheDictionaries("productUnitConversion"); for (int i = 0; i < mdmGmfxxtbReqBOS.size(); i++) { MdmSyncGroupTaxCodeReqBO reqBO = mdmGmfxxtbReqBOS.get(i); CommodityCodeEntity commodityCodeEntity = new CommodityCodeEntity(); commodityCodeEntity.setWlflbm(reqBO.getCATEGORYCODE()); + // 进行单位中英文转换 + if (dictData!=null && dictData.size()>0) { + log.info("进行单位中英文转换,转换前:{}",reqBO.getDESC5()); + DictionaryEntity dictionaryEntity = dictData.stream().filter(item->item.getCode().equals(reqBO.getDESC5())).findFirst().get(); + if (dictionaryEntity!=null) { + reqBO.setDESC5(dictionaryEntity.getValue()); + } + log.info("进行单位中英文转换,转换后:{}",reqBO.getDESC5()); + } + // 1.先去所有子公司库中匹配税编,以第一条为准;如果未匹配到,再去根据物料编码匹配 // DecimalFormat g=new DecimalFormat("000000000000000000"); // String code = g.format(Integer.valueOf(reqBO.getCODE()));