From 76588b47385846e61aa8c6d1c62f35fe5b09f2a1 Mon Sep 17 00:00:00 2001 From: ruanqi Date: Tue, 22 Oct 2024 17:18:22 +0800 Subject: [PATCH] 1127 --- .../spring/modules/base/service/Impl/BaseServiceImpl.java | 3 ++- .../service/Impl/TechnicalSpecificationServiceImpl.java | 2 +- .../sampleManagement/TechnicalSpecificationMapper.xml | 6 ++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/spring/modules/base/service/Impl/BaseServiceImpl.java b/src/main/java/com/spring/modules/base/service/Impl/BaseServiceImpl.java index 3a3b2bb4..ac8afc41 100644 --- a/src/main/java/com/spring/modules/base/service/Impl/BaseServiceImpl.java +++ b/src/main/java/com/spring/modules/base/service/Impl/BaseServiceImpl.java @@ -464,8 +464,9 @@ public class BaseServiceImpl implements BaseService { for (int i = 0; i < data.getAccessProjectList().size(); i++) { if(i!=data.getAccessProjectList().size()-1){ sql=sql+"'"+data.getAccessProjectList().get(i).getProjectId()+"',"; + }else { + sql=sql+"'"+data.getAccessProjectList().get(i).getProjectId()+"'"; } - sql=sql+"'"+data.getAccessProjectList().get(i).getProjectId()+"'"; } sql=sql+")"; data.setSql(sql); 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 d09b565f..18c2610e 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 @@ -483,7 +483,7 @@ public class TechnicalSpecificationServiceImpl implements TechnicalSpecification throw new RuntimeException("物料编码在物料视图view_Project_Part中有重复!请联系管理员"); } if(bomDetailEntity.size()==0){ - throw new RuntimeException("物料编码在物料视图view_Project_Part中查询不到!请联系管理员"); + throw new RuntimeException("物料编码在物料视图view_Project_Part中查询不到或者工艺路线不是Buildable状态!请联系管理员"); } List list= technicalSpecificationMapper.searchBMRoute(bomDetailEntity.get(0)); map.put("rows",list); diff --git a/src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml b/src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml index 0ee2a318..1fc96bf6 100644 --- a/src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml +++ b/src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml @@ -107,7 +107,7 @@ AND b.bu_no like #{query.buNo} - order by a.code_no desc + order by a.code_no desc, a.rev_no desc @@ -913,7 +913,9 @@ id select a.site,a.routing_type,a.routing_revision, a.routing_alternative_no alternativeNo,b.final_part_no partNo from plm_technical_specification_sheet a left join view_Project_final_Part b on a.site=b.site and a.test_part_no=b.test_part_no - where a.site=#{site} and a.code_no=#{codeNo} and a.project_id=b.project_id + left join plm_bom_detail c on a.site=c.site and b.final_part_no=c.part_no and a.eng_chg_level=c.eng_chg_level and a.bom_alternative_no=c.alternative_no and a.bom_type=c.bom_type + + where a.site=#{site} and a.code_no=#{codeNo} and a.project_id=b.project_id and a.status='Buildable'