From 3d049c68ef3b6a6a5870f3c28dd86247a000f201 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Mon, 23 Jun 2025 10:12:17 +0800 Subject: [PATCH] =?UTF-8?q?2025-06-23=20=E6=8A=80=E6=9C=AF=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E5=8D=A1=20=E6=8E=A7=E5=88=B6=E5=8F=AA=E8=AF=BB?= =?UTF-8?q?=E6=9C=AA=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TechnicalSpecificationServiceImpl.java | 4 +- .../resources/mapper/project/ProjectDao.xml | 4 +- .../TechnicalSpecificationMapper.xml | 92 +++++++++---------- 3 files changed, 48 insertions(+), 52 deletions(-) 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 869be9eb..54c0351d 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 @@ -464,12 +464,12 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification // customerPartNo // 判断是否存在CustomerPartNo String customerPartNo = technicalSpecificationMapper.queryCustomerPartNo(data.getSite(),data.getPartNo(),data.getCustomerId()); - if (StringUtils.isEmpty(customerPartNo)){ + if (StringUtils.isEmpty(customerPartNo)) { // 不存在数据 新增 if (StringUtils.hasText(data.getCustomerPartNo())){ technicalSpecificationMapper.saveCustomerPartNo(data.getSite(),data.getPartNo(),data.getCustomerId(),data.getCustomerPartNo(),sysUserEntity.getUsername()); } - }else { + } else { //存在数据修改 technicalSpecificationMapper.updateCustomerPartNo(data.getSite(),data.getPartNo(),data.getCustomerId(),data.getCustomerPartNo(),sysUserEntity.getUsername()); } diff --git a/src/main/resources/mapper/project/ProjectDao.xml b/src/main/resources/mapper/project/ProjectDao.xml index a871bcbe..1c80434c 100644 --- a/src/main/resources/mapper/project/ProjectDao.xml +++ b/src/main/resources/mapper/project/ProjectDao.xml @@ -766,7 +766,9 @@ update_by,update_date,priority,site,id,project_desc,customer_remark,remark,need_ - update plm_project_info set final_customer_id = #{finalCustomerId} where site = #{site} and project_id = #{projectId} + update plm_project_info + set final_customer_id = #{finalCustomerId} + where site = #{site} and project_id = #{projectId} @@ -512,38 +511,36 @@ @@ -2392,18 +2389,18 @@ - insert into plm_customer_part_info(site, customer_no, part_no, customer_part_no, create_date, create_by) - values (#{site}, #{customerId}, #{partNo}, #{customerPartNo}, getdate(), #{username}) + insert into plm_customer_part_info + (site, customer_no, part_no, customer_part_no, create_date, create_by) + values + (#{site}, #{customerId}, #{partNo}, #{customerPartNo}, getdate(), #{username}) update plm_customer_part_info set customer_part_no = #{customerPartNo}, - update_by = #{username}, - update_date = getdate() - where site = #{site} - and customer_no = #{customerId} - and part_no = #{partNo} + update_by = #{username}, + update_date = getdate() + where site = #{site} and customer_no = #{customerId} and part_no = #{partNo} +