|  |  | @ -16,8 +16,8 @@ import com.dsic.gj_erp.bean.jhgk.DmDhqdp; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.dsic.gj_erp.bean.jhgk.DmSygdMx; |  |  |  | import com.dsic.gj_erp.bean.jhgk.DmSygdMx; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.dsic.gj_erp.bean.jhgk.DmSygdxq; |  |  |  | import com.dsic.gj_erp.bean.jhgk.DmSygdxq; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.dsic.gj_erp.bean.jhgk.DmSygdxqOld; |  |  |  | import com.dsic.gj_erp.bean.jhgk.DmSygdxqOld; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.dsic.gj_erp.exception.ServiceException; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.dsic.gj_erp.mapper.jhgk.DmSygdxqMapper; |  |  |  | import com.dsic.gj_erp.mapper.jhgk.DmSygdxqMapper; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.dsic.gj_erp.pc.dto.data.Bom; |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.dsic.gj_erp.service.jcsj.DmBomService; |  |  |  | import com.dsic.gj_erp.service.jcsj.DmBomService; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.dsic.gj_erp.service.jcsj.DmCbxxpService; |  |  |  | import com.dsic.gj_erp.service.jcsj.DmCbxxpService; | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.dsic.gj_erp.service.jhgk.DmDhqdpService; |  |  |  | import com.dsic.gj_erp.service.jhgk.DmDhqdpService; | 
			
		
	
	
		
		
			
				
					|  |  | @ -171,6 +171,7 @@ public class DmSygdxqServiceImpl extends ServiceImpl<DmSygdxqMapper, DmSygdxq> i | 
			
		
	
		
		
			
				
					
					|  |  |  |                             .eq(DmBom::getPl, xq.getDcPl()) |  |  |  |                             .eq(DmBom::getPl, xq.getDcPl()) | 
			
		
	
		
		
			
				
					
					|  |  |  |                             .eq(DmBom::getFd, xq.getDcFd()) |  |  |  |                             .eq(DmBom::getFd, xq.getDcFd()) | 
			
		
	
		
		
			
				
					
					|  |  |  |                     ); |  |  |  |                     ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     bomList.forEach(item->item.setDcch(xq.getDcCh()));//系列船获取bom船号修正为当前船只
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                     xq.setBomList(bomList); |  |  |  |                     xq.setBomList(bomList); | 
			
		
	
		
		
			
				
					
					|  |  |  |                 }else{//bom不存在从订货清单获取数据
 |  |  |  |                 }else{//bom不存在从订货清单获取数据
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                     List<DmDhqdp> list = dhqdpService.list(Wrappers.<DmDhqdp>lambdaQuery().eq(DmDhqdp::getDcCh, xq.getDcCh())); |  |  |  |                     List<DmDhqdp> list = dhqdpService.list(Wrappers.<DmDhqdp>lambdaQuery().eq(DmDhqdp::getDcCh, xq.getDcCh())); | 
			
		
	
	
		
		
			
				
					|  |  | @ -178,19 +179,27 @@ public class DmSygdxqServiceImpl extends ServiceImpl<DmSygdxqMapper, DmSygdxq> i | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                     List<DmBom> bomList=new ArrayList<>(); |  |  |  |                     List<DmBom> bomList=new ArrayList<>(); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     collect.forEach(item->{ |  |  |  |                     collect.forEach(item->{ | 
			
		
	
		
		
			
				
					
					|  |  |  |                         int num = item.getSdzs().intValue(); |  |  |  |                         if (item.getKdzlsl()==null){ | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                         for (int i=0;i<num;i++){ |  |  |  |                             return; | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         String[] kdzlsls=item.getKdzlsl().split("/"); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         for (String kdzlsl:kdzlsls){ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                             Optional.ofNullable(kdzlsl).ifPresent(it->{ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 String kd= String.valueOf(it.charAt(1)); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 String kw= String.valueOf(it.charAt(0)); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 String kw4= String.valueOf(it.charAt(2)); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 String zl=String.valueOf(it.charAt(3)); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 String sl=kdzlsl.split("=")[1]; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                 try { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                     int slI = Integer.parseInt(sl); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                                     for (int i=0;i<slI;i++){ | 
			
		
	
		
		
			
				
					
					|  |  |  |                                         DmBom bom = new DmBom(); |  |  |  |                                         DmBom bom = new DmBom(); | 
			
		
	
		
		
			
				
					
					|  |  |  |                                         bom.setDcch(dcch); |  |  |  |                                         bom.setDcch(dcch); | 
			
		
	
		
		
			
				
					
					|  |  |  |                                         bom.setPl(pl); |  |  |  |                                         bom.setPl(pl); | 
			
		
	
		
		
			
				
					
					|  |  |  |                                         bom.setWpcz(item.getWpxh()); |  |  |  |                                         bom.setWpcz(item.getWpxh()); | 
			
		
	
		
		
			
				
					
					|  |  |  |                                         bom.setWpgg(StrUtil.format("{}*{}*{}",item.getThickness(),item.getWidth(),item.getLength())); |  |  |  |                                         bom.setWpgg(StrUtil.format("{}*{}*{}",item.getThickness(),item.getWidth(),item.getLength())); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |                             Optional.ofNullable(item.getKdzlsl()).ifPresent(it->{ |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 String kd= String.valueOf(it.charAt(1)); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 String kw= String.valueOf(it.charAt(0)); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 String kw4= String.valueOf(it.charAt(2)); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                 String zl=String.valueOf(it.charAt(3)); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                         switch (kd){ |  |  |  |                                         switch (kd){ | 
			
		
	
		
		
			
				
					
					|  |  |  |                                             case "1": |  |  |  |                                             case "1": | 
			
		
	
		
		
			
				
					
					|  |  |  |                                                 this.handlerFor1(bom,zl,kw,kw4); |  |  |  |                                                 this.handlerFor1(bom,zl,kw,kw4); | 
			
		
	
	
		
		
			
				
					|  |  | @ -211,16 +220,20 @@ public class DmSygdxqServiceImpl extends ServiceImpl<DmSygdxqMapper, DmSygdxq> i | 
			
		
	
		
		
			
				
					
					|  |  |  |                                                 this.handlerFor8(bom,zl,kw,kw4); |  |  |  |                                                 this.handlerFor8(bom,zl,kw,kw4); | 
			
		
	
		
		
			
				
					
					|  |  |  |                                                 break; |  |  |  |                                                 break; | 
			
		
	
		
		
			
				
					
					|  |  |  |                                         } |  |  |  |                                         } | 
			
		
	
		
		
			
				
					
					|  |  |  |                             }); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |                                         bomList.add(bom); |  |  |  |                                         bomList.add(bom); | 
			
		
	
		
		
			
				
					
					|  |  |  |                                     } |  |  |  |                                     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |                                 }catch (Exception ignored){} | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                             }); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                         } | 
			
		
	
		
		
			
				
					
					|  |  |  |                     }); |  |  |  |                     }); | 
			
		
	
		
		
			
				
					
					|  |  |  |                     xq.setBomList(bomList); |  |  |  |                     xq.setBomList(bomList); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  |                 } | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 if (ObjUtil.isEmpty(xq.getBomList())){ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     throw new ServiceException(10001,StrUtil.format("船只:{},批次{}无法从系列船或订货清单获取基础数据,请先核对数据后再次排产!",xq.getDcCh(),xq.getDcPl())); | 
			
		
	
		
		
			
				
					
					|  |  |  |                 } |  |  |  |                 } | 
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             } | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |         } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |         return xqWithBom; |  |  |  |         return xqWithBom; | 
			
		
	
		
		
			
				
					
					|  |  |  |     } |  |  |  |     } | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | 
 |