浏览代码

更换数据库为云剑数据库

yaoyq 3 年之前
父节点
当前提交
43d3459160

+ 41 - 38
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/productionReadyCenter/service/impl/BomProcedureVersionServiceImpl.java

@@ -505,7 +505,10 @@ public class BomProcedureVersionServiceImpl extends SuperServiceImpl<BomProcedur
                     tpTray.setProcedureId(bean.getId());
                     tpTray.setProcedureId(bean.getId());
                     tpTray.setGroupId(groupBean.getId());
                     tpTray.setGroupId(groupBean.getId());
                     tpTray.setBizType("1");
                     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);
                 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
             //更改附件表业务id

+ 23 - 0
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/productionReadyCenter/entity/BomProcedureProgram.java

@@ -91,6 +91,12 @@ public class BomProcedureProgram extends Entity<Long> {
     @Excel(name = "运行时长")
     @Excel(name = "运行时长")
     private Float runTime;
     private Float runTime;
 
 
+    @ApiModelProperty(value = "加工时长")
+    @TableField("work_time")
+    @Excel(name = "加工时长")
+    private Float workTime;
+
+
     /**
     /**
      * 工艺ID
      * 工艺ID
      */
      */
@@ -116,6 +122,23 @@ public class BomProcedureProgram extends Entity<Long> {
     private String positions;
     private String positions;
 
 
 
 
+    /**
+     * 文件路径
+     */
+    @ApiModelProperty(value = "文件路径")
+    @TableField("file_path")
+    @Excel(name = "文件路径")
+    private String filePath;
+
+    /**
+     * 原始文件名
+     */
+    @ApiModelProperty(value = "原始文件名")
+    @TableField("submitted_file_name")
+    @Excel(name = "原始文件名")
+    private String submittedFileName;
+
+
     @Builder
     @Builder
     public BomProcedureProgram(Long id, LocalDateTime createTime, Long createUser, LocalDateTime updateTime, Long updateUser, 
     public BomProcedureProgram(Long id, LocalDateTime createTime, Long createUser, LocalDateTime updateTime, Long updateUser, 
                     Long resourceId, Long procedureTrayGroupId, Integer prority, String programType, Float runTime, Long procedureId) {
                     Long resourceId, Long procedureTrayGroupId, Integer prority, String programType, Float runTime, Long procedureId) {