Sfoglia il codice sorgente

徐明浩
特种设备-压力管道年检报告-同步、导入批量更新增加默认值
特种设备-压力容器年检报告-同步、导入批量更新增加默认值

徐明浩 3 anni fa
parent
commit
e8a0cff624

+ 34 - 17
master/src/main/java/com/ruoyi/project/sems/controller/TReportYlgdController.java

@@ -2,6 +2,7 @@ package com.ruoyi.project.sems.controller;
 
 import java.io.IOException;
 import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -162,6 +163,7 @@ public class TReportYlgdController extends BaseController {
         Workbook workbook = ExcelUtils.getWorkBook(file);
         Sheet sheet = workbook.getSheetAt(0);
         List<TReportYlgd> list = new ArrayList<>();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
 
         int rowNum = sheet.getPhysicalNumberOfRows();
         int failNumber = 0;
@@ -188,56 +190,71 @@ public class TReportYlgdController extends BaseController {
                         //位号
                         entity.setDevno(cellValue);
                     } else if (j == 3) {
-                        //位号
+                        //1
                         entity.setPj1(cellValue);
                     } else if (j == 4) {
-                        //位号
+                        //2
                         entity.setPj2(cellValue);
                     } else if (j == 5) {
-                        //位号
+                        //3
                         entity.setPj3(cellValue);
                     } else if (j == 6) {
-                        //位号
+                        //4
                         entity.setPj4(cellValue);
                     } else if (j == 7) {
-                        //位号
+                        //5
                         entity.setPj5(cellValue);
                     } else if (j == 8) {
-                        //位号
+                        //安全附件仪表及检查情况6
                         entity.setPj6(cellValue);
                     } else if (j == 9) {
-                        //位号
+                        //安全附件仪表及检查情况7
                         entity.setPj7(cellValue);
                     } else if (j == 10) {
-                        //位号
+                        //安全附件仪表及检查情况8
                         entity.setPj8(cellValue);
                     } else if (j == 11) {
-                        //位号
+                        //安全附件仪表及检查情况9
                         entity.setPj9(cellValue);
                     } else if (j == 12) {
-                        //位号
+                        //安全附件仪表及检查情况10
                         entity.setPj10(cellValue);
                     } else if (j == 13) {
-                        //位号
+                        //安全附件仪表及检查情况11
                         entity.setPj11(cellValue);
                     } else if (j == 14) {
-                        //位号
+                        //12
                         entity.setPj12(cellValue);
                     } else if (j == 15) {
-                        //位号
+                        //13
                         entity.setPj13(cellValue);
                     } else if (j == 16) {
-                        //位号
+                        //14
                         entity.setPj14(cellValue);
                     } else if (j == 17) {
-                        //位号
+                        //15
                         entity.setPj15(cellValue);
                     } else if (j == 18) {
-                        //位号
+                        //16
                         entity.setPj16(cellValue);
                     } else if (j == 19) {
-                        //位号
+                        //17
                         entity.setPj17(cellValue);
+                    } else if (j == 20) {
+                        //备注
+                        entity.setRemarks(cellValue);
+                    } else if (j == 21) {
+                        //检查日期
+                        entity.setCheckDate(cellValue != null ? sdf.parse(cellValue) : null);
+                    } else if (j == 22) {
+                        //下次年度检查日期
+                        entity.setNextCheckDate(cellValue != null ? sdf.parse(cellValue) : null);
+                    } else if (j == 23) {
+                        //问题及处理
+                        entity.setProblem(cellValue);
+                    } else if (j == 24) {
+                        //检查结论
+                        entity.setCon(cellValue);
                     }
                 }
                 entity.setCreaterCode(userId);

+ 49 - 32
master/src/main/java/com/ruoyi/project/sems/controller/TReportYlrqController.java

@@ -2,6 +2,7 @@ package com.ruoyi.project.sems.controller;
 
 import java.io.IOException;
 import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -122,6 +123,7 @@ public class TReportYlrqController extends BaseController {
         Workbook workbook = ExcelUtils.getWorkBook(file);
         Sheet sheet = workbook.getSheetAt(0);
         List<TReportYlrq> list = new ArrayList<>();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
 
         int rowNum = sheet.getPhysicalNumberOfRows();
         int failNumber = 0;
@@ -148,101 +150,116 @@ public class TReportYlrqController extends BaseController {
                         //位号
                         entity.setDevno(cellValue);
                     } else if (j == 3) {
-                        //位号
+                        //容器管理1
                         entity.setPj1(cellValue);
                     } else if (j == 4) {
-                        //位号
+                        //容器管理2
                         entity.setPj2(cellValue);
                     } else if (j == 5) {
-                        //位号
+                        //容器管理3
                         entity.setPj3(cellValue);
                     } else if (j == 6) {
-                        //位号
+                        //容器管理4
                         entity.setPj4(cellValue);
                     } else if (j == 7) {
-                        //位号
+                        //容器管理5
                         entity.setPj5(cellValue);
                     } else if (j == 8) {
-                        //位号
+                        //容器管理6
                         entity.setPj6(cellValue);
                     } else if (j == 9) {
-                        //位号
+                        //容器管理7
                         entity.setPj7(cellValue);
                     } else if (j == 10) {
-                        //位号
+                        //本体及运行情况8
                         entity.setPj8(cellValue);
                     } else if (j == 11) {
-                        //位号
+                        //本体及运行情况9
                         entity.setPj9(cellValue);
                     } else if (j == 12) {
-                        //位号
+                        //本体及运行情况10
                         entity.setPj10(cellValue);
                     } else if (j == 13) {
-                        //位号
+                        //本体及运行情况11
                         entity.setPj11(cellValue);
                     } else if (j == 14) {
-                        //位号
+                        //本体及运行情况12
                         entity.setPj12(cellValue);
                     } else if (j == 15) {
-                        //位号
+                        //本体及运行情况13
                         entity.setPj13(cellValue);
                     } else if (j == 16) {
-                        //位号
+                        //本体及运行情况14
                         entity.setPj14(cellValue);
                     } else if (j == 17) {
-                        //位号
+                        //本体及运行情况15
                         entity.setPj15(cellValue);
                     } else if (j == 18) {
-                        //位号
+                        //本体及运行情况16
                         entity.setPj16(cellValue);
                     } else if (j == 19) {
-                        //位号
+                        //本体及运行情况17
                         entity.setPj17(cellValue);
                     } else if (j == 20) {
-                        //位号
+                        //本体及运行情况18
                         entity.setPj18(cellValue);
                     } else if (j == 21) {
-                        //位号
+                        //本体及运行情况19
                         entity.setPj19(cellValue);
                     } else if (j == 22) {
-                        //位号
+                        //本体及运行情况20
                         entity.setPj20(cellValue);
                     } else if (j == 23) {
-                        //位号
+                        //本体及运行情况21
                         entity.setPj21(cellValue);
                     } else if (j == 24) {
-                        //位号
+                        //本体及运行情况22
                         entity.setPj22(cellValue);
                     } else if (j == 25) {
-                        //位号
+                        //本体及运行情况23
                         entity.setPj23(cellValue);
                     } else if (j == 26) {
-                        //位号
+                        //本体及运行情况24
                         entity.setPj24(cellValue);
                     } else if (j == 27) {
-                        //位号
+                        //安全附件及设施25
                         entity.setPj25(cellValue);
                     } else if (j == 28) {
-                        //位号
+                        //安全附件及设施26
                         entity.setPj26(cellValue);
                     } else if (j == 29) {
-                        //位号
+                        //安全附件及设施27
                         entity.setPj27(cellValue);
                     } else if (j == 30) {
-                        //位号
+                        //安全附件及设施28
                         entity.setPj28(cellValue);
                     } else if (j == 31) {
-                        //位号
+                        //安全附件及设施29
                         entity.setPj29(cellValue);
                     } else if (j == 32) {
-                        //位号
+                        //安全附件及设施30
                         entity.setPj30(cellValue);
                     } else if (j == 33) {
-                        //位号
+                        //安全附件及设施31
                         entity.setPj31(cellValue);
                     } else if (j == 34) {
-                        //位号
+                        //其他32
                         entity.setPj32(cellValue);
+                    } else if (j == 35) {
+                        //备注
+                        entity.setRemarks(cellValue);
+                    } else if (j == 36) {
+                        //检查日期
+                        entity.setCheckDate(cellValue != null ? sdf.parse(cellValue) : null);
+                    } else if (j == 37) {
+                        //下次年度检查日期
+                        entity.setNextCheckDate(cellValue != null ? sdf.parse(cellValue) : null);
+                    } else if (j == 38) {
+                        //问题及处理
+                        entity.setProblem(cellValue);
+                    } else if (j == 39) {
+                        //检查结论
+                        entity.setCon(cellValue);
                     }
                 }
                 entity.setCreaterCode(userId);

+ 14 - 5
master/src/main/resources/mybatis/sems/TReportYlgdMapper.xml

@@ -108,9 +108,13 @@
     <select id="selectTReportYlgdList" parameterType="TReportYlgd" resultMap="TReportYlgdResult">
         <include refid="selectTReportYlgdVo"/>
         <where>
-            <if test="plantCode != null  and plantCode != ''"> and y.plant_code like concat(concat('%', #{plantCode}), '%')</if>
-            <if test="approveStatus != null  and approveStatus != '' or approveStatus== 0"> and d.approve_status = #{approveStatus}</if>
-            <if test="unit != null and unit != ''"> and y.unit like concat(concat('%', #{unit}), '%')</if>
+            <if test="plantCode != null  and plantCode != ''">and y.plant_code like concat(concat('%', #{plantCode}),
+                '%')
+            </if>
+            <if test="approveStatus != null  and approveStatus != '' or approveStatus== 0">and d.approve_status =
+                #{approveStatus}
+            </if>
+            <if test="unit != null and unit != ''">and y.unit like concat(concat('%', #{unit}), '%')</if>
             and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->
@@ -149,6 +153,11 @@
             <if test="pj15 != null">pj15 = #{pj15},</if>
             <if test="pj16 != null">pj16 = #{pj16},</if>
             <if test="pj17 != null">pj17 = #{pj17},</if>
+            <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="checkDate != null">check_date = #{checkDate},</if>
+            <if test="nextCheckDate != null">next_check_date = #{nextCheckDate},</if>
+            <if test="problem != null">problem = #{problem},</if>
+            <if test="con != null">con = #{con},</if>
         </trim>
         where dev_id = (
         select id
@@ -202,7 +211,7 @@
             <if test="createdate != null">createdate,</if>
             <if test="updaterCode != null">updater_code,</if>
             <if test="updatedate != null">updatedate,</if>
-            pj1,pj2,pj3,pj4,pj5,pj6,pj7,pj8,pj9,pj10,pj11,pj12,pj13,pj14,pj15,pj16,pj17
+            pj1,pj2,pj3,pj4,pj5,pj6,pj7,pj8,pj9,pj10,pj11,pj12,pj13,pj14,pj15,pj16,pj17,con
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -221,7 +230,7 @@
             <if test="updaterCode != null">#{updaterCode},</if>
             <if test="updatedate != null">#{updatedate},</if>
             <![CDATA[
-            '√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√',]]>
+            '√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','1']]>
         </trim>
     </insert>
 

+ 7 - 2
master/src/main/resources/mybatis/sems/TReportYlrqMapper.xml

@@ -205,7 +205,7 @@
             <if test="updaterCode != null">updater_code,</if>
             <if test="updatedate != null">updatedate,</if>
             pj1,pj2,pj3,pj4,pj5,pj6,pj7,pj8,pj9,pj10,pj11,pj12,pj13,pj14,pj15,pj16,pj17,
-            pj18,pj19,pj20,pj21,pj22,pj23,pj24,pj25,pj26,pj27,pj28,pj29,pj30,pj31,pj32
+            pj18,pj19,pj20,pj21,pj22,pj23,pj24,pj25,pj26,pj27,pj28,pj29,pj30,pj31,pj32,con
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -220,7 +220,7 @@
             <if test="updaterCode != null">#{updaterCode},</if>
             <if test="updatedate != null">#{updatedate},</if>
             <![CDATA[
-            '√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√']]>
+            '√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','√','1']]>
         </trim>
     </insert>
 
@@ -276,6 +276,11 @@
             <if test="pj30 != null">pj30 = #{pj30},</if>
             <if test="pj31 != null">pj31 = #{pj31},</if>
             <if test="pj32 != null">pj32 = #{pj32},</if>
+            <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="checkDate != null">check_date = #{checkDate},</if>
+            <if test="nextCheckDate != null">next_check_date = #{nextCheckDate},</if>
+            <if test="problem != null">problem = #{problem},</if>
+            <if test="con != null">con = #{con},</if>
         </trim>
         where dev_id = (
         select id

BIN
master/src/main/resources/static/template/sems/reportYlgd.xlsx


BIN
master/src/main/resources/static/template/sems/reportYlrq.xlsx