|
@@ -505,7 +505,10 @@ public class BomProcedureVersionServiceImpl extends SuperServiceImpl<BomProcedur
|
|
|
tpTray.setProcedureId(bean.getId());
|
|
|
tpTray.setGroupId(groupBean.getId());
|
|
|
tpTray.setBizType("1");
|
|
|
- bomProcedureTrayService.save(tray);
|
|
|
+ if(bBom!=null){
|
|
|
+ tpTray.setTrayId(bBom.getTrayId());
|
|
|
+ }
|
|
|
+ bomProcedureTrayService.save(tpTray);
|
|
|
|
|
|
}
|
|
|
|
|
@@ -606,43 +609,43 @@ public class BomProcedureVersionServiceImpl extends SuperServiceImpl<BomProcedur
|
|
|
bomProcedureProgramService.saveBatch(pList);
|
|
|
|
|
|
//保存程序对应的位置程序
|
|
|
- for(BomProcedureProgram programBean:pList){
|
|
|
- List<BomProcedureProgramGroup> programGroupList = programBean.getProgramGroupList();
|
|
|
- if(programGroupList != null && programGroupList.size() > 0){
|
|
|
- List<BomProcedureProgramGroup> pgList = programGroupList.stream().map((map) -> {
|
|
|
- BomProcedureProgramGroup item = new BomProcedureProgramGroup();
|
|
|
- BeanUtil.copyProperties(map, item);
|
|
|
- item.setMainId(programBean.getId());
|
|
|
- item.setSubmittedFileName(attachmentMap.get(item.getFilePath()));
|
|
|
- item.setId(null);
|
|
|
- return item;
|
|
|
- }).collect(Collectors.toList());
|
|
|
- bomProcedureProgramGroupService.saveBatch(pgList);
|
|
|
-
|
|
|
- //保存位置程序组内明细
|
|
|
- for(BomProcedureProgramGroup pgBean : pgList){
|
|
|
- //位置
|
|
|
- List<Long> positionList = pgBean.getPositionList();
|
|
|
- if(positionList != null && positionList.size() >0){
|
|
|
- for(Long id : positionList){
|
|
|
- BomProcedureProgramGroupDetail groupDetailBean = new BomProcedureProgramGroupDetail();
|
|
|
- groupDetailBean.setMainId(programBean.getId());
|
|
|
- groupDetailBean.setGroupId(pgBean.getId());
|
|
|
- groupDetailBean.setTrayPositionId(id);
|
|
|
- bomProcedureProgramGroupDetailService.save(groupDetailBean);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- //程序附件,表业务id放入map
|
|
|
- for(BomProcedureProgramGroup ppg:pgList){
|
|
|
- if(StrUtil.isNotEmpty(ppg.getFilePath())){
|
|
|
- attMap.put(ppg.getFilePath(),ppg.getId());
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+// for(BomProcedureProgram programBean:pList){
|
|
|
+// List<BomProcedureProgramGroup> programGroupList = programBean.getProgramGroupList();
|
|
|
+// if(programGroupList != null && programGroupList.size() > 0){
|
|
|
+// List<BomProcedureProgramGroup> pgList = programGroupList.stream().map((map) -> {
|
|
|
+// BomProcedureProgramGroup item = new BomProcedureProgramGroup();
|
|
|
+// BeanUtil.copyProperties(map, item);
|
|
|
+// item.setMainId(programBean.getId());
|
|
|
+// item.setSubmittedFileName(attachmentMap.get(item.getFilePath()));
|
|
|
+// item.setId(null);
|
|
|
+// return item;
|
|
|
+// }).collect(Collectors.toList());
|
|
|
+// bomProcedureProgramGroupService.saveBatch(pgList);
|
|
|
+//
|
|
|
+// //保存位置程序组内明细
|
|
|
+// for(BomProcedureProgramGroup pgBean : pgList){
|
|
|
+// //位置
|
|
|
+// List<Long> positionList = pgBean.getPositionList();
|
|
|
+// if(positionList != null && positionList.size() >0){
|
|
|
+// for(Long id : positionList){
|
|
|
+// BomProcedureProgramGroupDetail groupDetailBean = new BomProcedureProgramGroupDetail();
|
|
|
+// groupDetailBean.setMainId(programBean.getId());
|
|
|
+// groupDetailBean.setGroupId(pgBean.getId());
|
|
|
+// groupDetailBean.setTrayPositionId(id);
|
|
|
+// bomProcedureProgramGroupDetailService.save(groupDetailBean);
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// }
|
|
|
+//
|
|
|
+// //程序附件,表业务id放入map
|
|
|
+// for(BomProcedureProgramGroup ppg:pgList){
|
|
|
+// if(StrUtil.isNotEmpty(ppg.getFilePath())){
|
|
|
+// attMap.put(ppg.getFilePath(),ppg.getId());
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
//更改附件表业务id
|