diff --git a/src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java b/src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java index e705c6db..8b00f522 100644 --- a/src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java +++ b/src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java @@ -494,17 +494,15 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification project.setProjectId(data.getProjectId()); project.setFinalCustomerId(data.getFinalCustomerNo()); projectDao.updateProjectFinalCustomerNo(project); - // customerPartNo - // 判断是否存在CustomerPartNo - String customerPartNo = technicalSpecificationMapper.queryCustomerPartNo(data.getSite(),data.getPartNo(),data.getCustomerId()); + // 客户料号与项目物料一致,按项目物料临时料号同步 plm_customer_part_info + String customerPartKey = StringUtils.hasText(data.getTestPartNo()) ? data.getTestPartNo() : data.getPartNo(); + String customerPartNo = technicalSpecificationMapper.queryCustomerPartNo(data.getSite(), customerPartKey, data.getCustomerId()); if (StringUtils.isEmpty(customerPartNo)) { - // 不存在数据 新增 if (StringUtils.hasText(data.getCustomerPartNo())){ - technicalSpecificationMapper.saveCustomerPartNo(data.getSite(),data.getPartNo(),data.getCustomerId(),data.getCustomerPartNo(),sysUserEntity.getUsername()); + technicalSpecificationMapper.saveCustomerPartNo(data.getSite(), customerPartKey, data.getCustomerId(), data.getCustomerPartNo(), sysUserEntity.getUsername()); } } else { - //存在数据修改 - technicalSpecificationMapper.updateCustomerPartNo(data.getSite(),data.getPartNo(),data.getCustomerId(),data.getCustomerPartNo(),sysUserEntity.getUsername()); + technicalSpecificationMapper.updateCustomerPartNo(data.getSite(), customerPartKey, data.getCustomerId(), data.getCustomerPartNo(), sysUserEntity.getUsername()); } // 技术参数卡 technicalSpecificationMapper.updateBMcustomerInfo(data); diff --git a/src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml b/src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml index eb9f3156..27b4bdb7 100644 --- a/src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml +++ b/src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml @@ -534,6 +534,7 @@ b.final_customer_id finalCustomerNo, dbo.plm_get_dictDataLabel('finalCustomer', b.final_customer_id, a.site) finalCustomerDesc, c.final_part_no as part_no, + a.test_part_no, c.part_desc, c.material_number, c.part_type as part_family,