Sfoglia il codice sorgente

修改表头存储代码 自测完毕 还差导出

daili 3 anni fa
parent
commit
0cff965752

+ 2 - 0
application-facade/src/main/java/com/factory/web/entity/vo/req/web/AddIniPlanReq.java

@@ -109,6 +109,8 @@ public class AddIniPlanReq {
     @ApiModelProperty(value = "版本id",example = "1")
     private Long versionId;
 
+    @ApiModelProperty(value = "受控文件id")
+    private Long controlledDocumentId;
     @TableField(exist = false)
     @ApiModelProperty(value = "工作站")
     private List<AddIniPlanWorkReq> versionWorks;

+ 0 - 1
application-facade/src/main/java/com/factory/web/mapper/ini/BentelerIniVersionMapper.java

@@ -13,7 +13,6 @@ import com.factory.web.entity.vo.res.pad.ini.getNowCheckStatusRes;
 import com.factory.web.entity.vo.res.web.ini.PagePlanRes;
 import com.factory.web.entity.vo.res.web.ini.getCheckResutGreadRes;
 import com.factory.web.entity.vo.res.web.ini.unAuditListRes;
-import com.sun.deploy.util.VersionID;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 

+ 22 - 12
application-facade/src/main/java/com/factory/web/service/impl/ini/BentelerIniVersionServiceImpl.java

@@ -111,7 +111,7 @@ public class BentelerIniVersionServiceImpl extends ServiceImpl<BentelerIniVersio
                                     (theList2, item2) -> {
                                         Collection<Integer> union = CollectionUtils.union(theList2, item2.getCheckType());
                                         theList2.addAll(union);
-                                    },
+                                        },
                                     ArrayList::addAll
                             )
                     );
@@ -296,8 +296,18 @@ public class BentelerIniVersionServiceImpl extends ServiceImpl<BentelerIniVersio
 
     @Override
     public ResponseBean addIniVersion(AddIniPlanReq req) {
+
         Long versionId = req.getVersionId();
         Long planId = versionService.getById(versionId).getPlanId();
+
+        //获取待审核版本  并删除
+        BentelerIniVersion unAuditVersion = versionMapper.getPlan_UnAuditVersion(planId);
+        if (unAuditVersion != null) {
+            Long versionId_DB = unAuditVersion.getId();
+            versionService.removeById(versionId_DB);
+
+        }
+
         String name = planService.getById(planId).getName();
         if (!req.getName().equals(name)) {
             if (planNameRepetition(req.getName())) {
@@ -319,13 +329,7 @@ public class BentelerIniVersionServiceImpl extends ServiceImpl<BentelerIniVersio
                 versionItem.setVersionId(version_req.getId());
             });
             versionItemService.saveBatch(versionItems);
-            //获取待审核版本  并删除
-            BentelerIniVersion unAuditVersion = versionMapper.getPlan_UnAuditVersion(planId);
-            if (unAuditVersion != null) {
-                Long versionId_DB = unAuditVersion.getId();
-                versionService.removeById(versionId_DB);
 
-            }
         });
         return ResponseBeanBuilder.ok();
     }
@@ -593,15 +597,21 @@ public class BentelerIniVersionServiceImpl extends ServiceImpl<BentelerIniVersio
         }
         BentelerIniVersion version = BentelerIniVersion.builder()
                 .planId(plan.getId())
-                .allChecktype(Convert.toStr(allCheckType))
-                .baseMap(JSONUtil.toJsonStr(baseMap))
                 .checkStatus(CheckStatus.未完成.value)
-                .beginDate(req.getBeginDate())
-                .endDate(req.getEndDate())
-                .guideDocumentId(req.getGuideDocumentId())
                 .principleOne(principleOne)
                 .principleTwo(principleTwo)
+                .checkBegintime(req.getCheckBegintime())
+                .checkEndtime(req.getCheckEndtime())
+                .remindIniPad(req.getRemindIniPad())
+                .remindTwoPad(req.getRemindTwoPad())
+                .upgradeTime(req.getUpgradeTime())
+                .beginDate(req.getBeginDate())
+                .endDate(req.getEndDate())
+                .allChecktype(Convert.toStr(allCheckType))
                 .reviewStatus(reviewStatus.value)
+                .baseMap(JSONUtil.toJsonStr(baseMap))
+                .guideDocumentId(req.getGuideDocumentId())
+                .controlledDocumentId(req.getControlledDocumentId())
                 .build();
         //item
         ArrayList<BentelerIniWorkstation> workstations = new ArrayList<>();