Browse Source

2026-09-24

技术参数卡-》客户信息-》客户料号回写优化
master
fengyuan_yang 18 hours ago
parent
commit
e4ef479d36
  1. 12
      src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java
  2. 1
      src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml

12
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);

1
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,

Loading…
Cancel
Save