Browse Source

1127

master
ruanqi 1 year ago
parent
commit
76588b4738
  1. 3
      src/main/java/com/spring/modules/base/service/Impl/BaseServiceImpl.java
  2. 2
      src/main/java/com/spring/modules/sampleManagement/service/Impl/TechnicalSpecificationServiceImpl.java
  3. 6
      src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml

3
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++) { for (int i = 0; i < data.getAccessProjectList().size(); i++) {
if(i!=data.getAccessProjectList().size()-1){ if(i!=data.getAccessProjectList().size()-1){
sql=sql+"'"+data.getAccessProjectList().get(i).getProjectId()+"',"; sql=sql+"'"+data.getAccessProjectList().get(i).getProjectId()+"',";
}else {
sql=sql+"'"+data.getAccessProjectList().get(i).getProjectId()+"'";
} }
sql=sql+"'"+data.getAccessProjectList().get(i).getProjectId()+"'";
} }
sql=sql+")"; sql=sql+")";
data.setSql(sql); data.setSql(sql);

2
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中有重复!请联系管理员"); throw new RuntimeException("物料编码在物料视图view_Project_Part中有重复!请联系管理员");
} }
if(bomDetailEntity.size()==0){ if(bomDetailEntity.size()==0){
throw new RuntimeException("物料编码在物料视图view_Project_Part中查询不到!请联系管理员");
throw new RuntimeException("物料编码在物料视图view_Project_Part中查询不到或者工艺路线不是Buildable状态!请联系管理员");
} }
List<RoutingComponentVo> list= technicalSpecificationMapper.searchBMRoute(bomDetailEntity.get(0)); List<RoutingComponentVo> list= technicalSpecificationMapper.searchBMRoute(bomDetailEntity.get(0));
map.put("rows",list); map.put("rows",list);

6
src/main/resources/mapper/sampleManagement/TechnicalSpecificationMapper.xml

@ -107,7 +107,7 @@
AND b.bu_no like #{query.buNo} AND b.bu_no like #{query.buNo}
</if> </if>
</where> </where>
order by a.code_no desc
order by a.code_no desc, a.rev_no desc
</select> </select>
<insert id="saveTechnicalSpecificationSheet"> <insert id="saveTechnicalSpecificationSheet">
@ -913,7 +913,9 @@ id
select a.site,a.routing_type,a.routing_revision, select a.site,a.routing_type,a.routing_revision,
a.routing_alternative_no alternativeNo,b.final_part_no partNo 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 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'
</select> </select>

Loading…
Cancel
Save