Browse Source

外部报验-报验点和构件增加英文名称

wangming 1 year ago
parent
commit
4de4faf4e6

+ 28 - 3
business-common/src/main/java/com/rongwei/bscommon/sys/service/impl/ZhcxOutsideInspectionItpServiceImpl.java

@@ -7,13 +7,10 @@ import cn.hutool.core.io.file.FileNameUtil;
 import cn.hutool.core.util.IdUtil;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
-import cn.hutool.json.JSONUtil;
 import cn.hutool.core.util.ZipUtil;
-import com.aspose.words.Document;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.rongwei.bscommon.sys.feign.SysNotifyFeginService;
 import com.rongwei.bscommon.sys.service.*;
 import com.rongwei.bscommon.sys.utils.ZhcxCommon;
 import com.rongwei.bsentity.domain.*;
@@ -95,6 +92,9 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
     @Autowired
     private ZhcxItpProjectNodeStateService zhcxItpProjectNodeStateService;
 
+    @Autowired
+    private ZhcxItpProjectNodesService itpProjectNodesService;
+
     /**
      * 拆单
      *
@@ -812,6 +812,31 @@ public class ZhcxOutsideInspectionItpServiceImpl extends ServiceImpl<ZhcxOutside
         ZhcxOutsideInspectionItpDo updateEntity = new ZhcxOutsideInspectionItpDo();
         updateEntity.setId(itpDo.getId());
         updateEntity.setInspectioncode(genCode());
+        //构件
+        ZhcxItpProjectNodesDo structre = itpProjectNodesService.getById(itpDo.getStructureid());
+        if(ObjectUtil.isNotNull(structre)) {
+            StringBuilder sb = new StringBuilder();
+            if(ObjectUtil.isNotEmpty(structre.getPnodeid())) {
+                ZhcxItpProjectNodesDo pstructre = itpProjectNodesService.getById(structre.getPnodeid());
+                if(ObjectUtil.isNotEmpty(pstructre) && ObjectUtil.isNotEmpty(pstructre.getEnname())) {
+                    sb.append(pstructre.getEnname());
+                    sb.append("/");
+                }
+            }
+            if(ObjectUtil.isNotEmpty(structre.getEnname())) {
+                sb.append(structre.getEnname());
+            }
+
+            if(ObjectUtil.isNotEmpty(sb)) {
+                updateEntity.setStructureenname(sb.toString());
+            }
+
+        }
+        //报验点
+        ZhcxItpProjectNodesDo inspectionContentPoint = itpProjectNodesService.getById(itpDo.getInspectioncontentid());
+        if(ObjectUtil.isNotNull(inspectionContentPoint) && ObjectUtil.isNotEmpty(inspectionContentPoint.getNodename())) {
+            updateEntity.setInspectionenpoint(inspectionContentPoint.getNodename());
+        }
         updateById(updateEntity);
 
         //操作记录

+ 17 - 0
business-entity/src/main/java/com/rongwei/bsentity/domain/ZhcxOutsideInspectionItpDo.java

@@ -313,5 +313,22 @@ public class ZhcxOutsideInspectionItpDo extends BaseDo {
     @TableField("INSPECTIONPOINT")
     private String inspectionpoint;
 
+    /**
+     * 客户编号
+     */
+    @TableField("CUSTOMERCODE")
+    private String customercode;
+
+    /**
+     * 构件英文名
+     */
+    @TableField("STRUCTUREENNAME")
+    private String structureenname;
+
+    /**
+     * 报验点英文名
+     */
+    @TableField("INSPECTIONENPOINT")
+    private String inspectionenpoint;
 
 }