From 32fe0661356b89437fe73b44e5a8f6b6c749a2e5 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Tue, 3 Jun 2025 16:01:14 +0800 Subject: [PATCH] 2025-06-03 --- .../MasterPartInformationServiceImpl.java | 40 ++++++++++++------- .../impl/QuotationInformationServiceImpl.java | 8 ++-- 2 files changed, 29 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/spring/modules/part/service/impl/MasterPartInformationServiceImpl.java b/src/main/java/com/spring/modules/part/service/impl/MasterPartInformationServiceImpl.java index 993fe436..33153133 100644 --- a/src/main/java/com/spring/modules/part/service/impl/MasterPartInformationServiceImpl.java +++ b/src/main/java/com/spring/modules/part/service/impl/MasterPartInformationServiceImpl.java @@ -258,18 +258,16 @@ public class MasterPartInformationServiceImpl extends ServiceImpl().eq("part_no", data.getPartNo())); // 检查物料模板 List mpData = masterPartInformationMapper.queryCodeNo(data); - if (!mpData.isEmpty()) { + if (mpData.isEmpty() || !mpData.get(0).getCodeNo().equals(data.getCodeNo())) { // 修改了物料模板 - if (!mpData.get(0).getCodeNo().equals(data.getCodeNo())) { - PartSubPropertiesValueData valueData = new PartSubPropertiesValueData(); - BeanUtils.copyProperties(data,valueData); - // 删除物料的属性和属性值 - partInformationMapper.deletePartSubPropertiesValueHeader(valueData); - partInformationMapper.deletePartSubPropertiesValue(valueData); - // 重新加载属性和属性值 - partInformationMapper.savePartSubPropertiesValueHeader(valueData); - partInformationMapper.savePartSubPropertiesValue(valueData); - } + PartSubPropertiesValueData valueData = new PartSubPropertiesValueData(); + BeanUtils.copyProperties(data,valueData); + // 删除物料的属性和属性值 + partInformationMapper.deletePartSubPropertiesValueHeader(valueData); + partInformationMapper.deletePartSubPropertiesValue(valueData); + // 重新加载属性和属性值 + partInformationMapper.savePartSubPropertiesValueHeader(valueData); + partInformationMapper.savePartSubPropertiesValue(valueData); } // 修改物料 masterPartInformationMapper.masterPartInformationEdit(data); @@ -298,7 +296,8 @@ public class MasterPartInformationServiceImpl extends ServiceImpl addMasterPartModelResponse = technicalClassBean.modifyTechnicalClass(srv, partIfsCatalogModel); - if (!"200".equals(addMasterPartModelResponse.get("resultCode"))) { - throw new RuntimeException("IFS 物料件模板新增异常:" + addMasterPartModelResponse.get("resultMsg")); + Map getMasterPartModelResponse = technicalClassBean.getTechnicalClass(srv, partIfsCatalogModel); + if (!"200".equals(getMasterPartModelResponse.get("resultCode"))) { + // 新增 + Map addMasterPartModelResponse = technicalClassBean.syncTechnicalClass(srv, partIfsCatalogModel); + if (!"200".equals(addMasterPartModelResponse.get("resultCode"))) { + throw new RuntimeException("IFS 物料件模板新增异常:" + addMasterPartModelResponse.get("resultMsg")); + } + } else { + // 修改 + Map updateMasterPartModelResponse = technicalClassBean.modifyTechnicalClass(srv, partIfsCatalogModel); + if (!"200".equals(updateMasterPartModelResponse.get("resultCode"))) { + throw new RuntimeException("IFS 物料件模板修改异常:" + updateMasterPartModelResponse.get("resultMsg")); + } } + } } } diff --git a/src/main/java/com/spring/modules/quotation/service/impl/QuotationInformationServiceImpl.java b/src/main/java/com/spring/modules/quotation/service/impl/QuotationInformationServiceImpl.java index 5bb40bc2..dd830c9e 100644 --- a/src/main/java/com/spring/modules/quotation/service/impl/QuotationInformationServiceImpl.java +++ b/src/main/java/com/spring/modules/quotation/service/impl/QuotationInformationServiceImpl.java @@ -741,7 +741,7 @@ public class QuotationInformationServiceImpl extends ServiceImpl controlList = requestManageService.getProcessSelect(cData); if (!controlList.isEmpty()) { for (int i = 0; i < controlList.size(); i++) { - checkProcessControl(controlList.get(i).getRoleId(),controlList.get(i).getSite(),data.getQuotationBatchNo()); + checkProcessControl(controlList.get(i).getRoleId(), controlList.get(i).getSite(), data.getQuotationBatchNo(), data.getQuotationAmount()); } } // 4、 接口:流程提交接口(同意) / 流程退回接口(驳回) @@ -799,7 +799,7 @@ public class QuotationInformationServiceImpl extends ServiceImpl quoteList = baseMapper.queryQuoteByQuotationBatchNo(site,quotationBatchNo); @@ -808,8 +808,8 @@ public class QuotationInformationServiceImpl extends ServiceImpl