Эх сурвалжийг харах

PSSR照明/电伴热添加序号字段

wangggziwen 6 сар өмнө
parent
commit
d79debc419

+ 9 - 9
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrAboveallController.java

@@ -272,15 +272,15 @@ public class TPssrAboveallController extends BaseController {
      * 生成照明、电伴热数据
      */
     private void genZmdbr(Long subId, String userId) {
-        tPssrLightingService.insertTPssrLighting(new TPssrLighting(subId, "照明灯外观完好,干净,无破损。", "1", userId, new Date()));
-        tPssrLightingService.insertTPssrLighting(new TPssrLighting(subId, "照明灯无锈蚀。", "1", userId, new Date()));
-        tPssrLightingService.insertTPssrLighting(new TPssrLighting(subId, "照明灯具固定牢固,无松动。", "1", userId, new Date()));
-        tPssrLightingService.insertTPssrLighting(new TPssrLighting(subId, "照明导线完好,无破损。", "1", userId, new Date()));
-        tPssrLightingService.insertTPssrLighting(new TPssrLighting(subId, "照明开关完好。", "1", userId, new Date()));
-        tPssrLightingService.insertTPssrLighting(new TPssrLighting(subId, "照明设备可以正常打开或者关闭。", "1", userId, new Date()));
-        tPssrLightingService.insertTPssrLighting(new TPssrLighting(subId, "现场电伴热带无破损断裂,无变形", "2", userId, new Date()));
-        tPssrLightingService.insertTPssrLighting(new TPssrLighting(subId, "电伴热带与管道设备紧密贴合,无缝隙", "2", userId, new Date()));
-        tPssrLightingService.insertTPssrLighting(new TPssrLighting(subId, "电源接线盒牢固密封,接线端子无松动锈蚀。", "2", userId, new Date()));
+        tPssrLightingService.insertTPssrLighting(new TPssrLighting(1L, subId, "照明灯外观完好,干净,无破损。", "1", userId, new Date()));
+        tPssrLightingService.insertTPssrLighting(new TPssrLighting(2L, subId, "照明灯无锈蚀。", "1", userId, new Date()));
+        tPssrLightingService.insertTPssrLighting(new TPssrLighting(3L, subId, "照明灯具固定牢固,无松动。", "1", userId, new Date()));
+        tPssrLightingService.insertTPssrLighting(new TPssrLighting(4L, subId, "照明导线完好,无破损。", "1", userId, new Date()));
+        tPssrLightingService.insertTPssrLighting(new TPssrLighting(5L, subId, "照明开关完好。", "1", userId, new Date()));
+        tPssrLightingService.insertTPssrLighting(new TPssrLighting(6L, subId, "照明设备可以正常打开或者关闭。", "1", userId, new Date()));
+        tPssrLightingService.insertTPssrLighting(new TPssrLighting(1L, subId, "现场电伴热带无破损断裂,无变形", "2", userId, new Date()));
+        tPssrLightingService.insertTPssrLighting(new TPssrLighting(2L, subId, "电伴热带与管道设备紧密贴合,无缝隙", "2", userId, new Date()));
+        tPssrLightingService.insertTPssrLighting(new TPssrLighting(3L, subId, "电源接线盒牢固密封,接线端子无松动锈蚀。", "2", userId, new Date()));
     }
 
     /**

+ 12 - 1
master/src/main/java/com/ruoyi/project/pssr/domain/TPssrLighting.java

@@ -22,7 +22,8 @@ public class TPssrLighting extends BaseEntity
     public TPssrLighting() {
     }
 
-    public TPssrLighting(Long subId, String checkContent,String lightingType, String createrCode, Date createdate) {
+    public TPssrLighting(Long serialNumber, Long subId, String checkContent,String lightingType, String createrCode, Date createdate) {
+        this.serialNumber = serialNumber;
         this.subId = subId;
         this.checkContent = checkContent;
         this.lightingType = lightingType;
@@ -31,6 +32,8 @@ public class TPssrLighting extends BaseEntity
         this.approveStatus = 0L;
     }
 
+    private Long serialNumber;
+
     /** 唯一标识ID */
     private Long id;
 
@@ -116,6 +119,14 @@ public class TPssrLighting extends BaseEntity
 
     private String reason;
 
+    public Long getSerialNumber() {
+        return serialNumber;
+    }
+
+    public void setSerialNumber(Long serialNumber) {
+        this.serialNumber = serialNumber;
+    }
+
     public String getReason() {
         return reason;
     }

+ 7 - 1
master/src/main/resources/mybatis/pssr/TPssrLightingMapper.xml

@@ -28,10 +28,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="lightingType"    column="lighting_type"    />
         <result property="confirm1Name"    column="confirm1_name"    />
         <result property="confirm2Name"    column="confirm2_name"    />
+        <result property="serialNumber"    column="serial_number"    />
     </resultMap>
 
     <sql id="selectTPssrLightingVo">
-        select d.id, u1.nick_name confirm1_name, u2.nick_name confirm2_name, d.confirm1, d.confirm2, d.lighting_type, d.sub_id, d.approve_id, d.check_content, d.check_result, d.check_des, d.change_result, d.confirm, d.confirmation_date, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.approve_status ,s.dept_name from t_pssr_lighting d
+        select d.id, d.serial_number, u1.nick_name confirm1_name, u2.nick_name confirm2_name, d.confirm1, d.confirm2, d.lighting_type, d.sub_id, d.approve_id, d.check_content, d.check_result, d.check_des, d.change_result, d.confirm, d.confirmation_date, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.approve_status ,s.dept_name from t_pssr_lighting d
       left join sys_dept s on s.dept_id = d.dept_id
       left join sys_user u1 on u1.user_id = d.CONFIRM1
       left join sys_user u2 on u2.user_id = d.CONFIRM2
@@ -58,6 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="confirm1 != null  and confirm1 != ''"> and confirm1 = #{confirm1}</if>
             <if test="confirm2 != null  and confirm2 != ''"> and confirm2 = #{confirm2}</if>
             <if test="lightingType != null  and lightingType != ''"> and lighting_type = #{lightingType}</if>
+            <if test="serialNumber != null  and serialNumber != ''"> and serial_number = #{serialNumber}</if>
             and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->
@@ -95,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="confirm1 != null">confirm1,</if>
             <if test="confirm2 != null">confirm2,</if>
             <if test="lightingType != null">lighting_type,</if>
+            <if test="serialNumber != null">serial_number,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -117,6 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="confirm1 != null">#{confirm1},</if>
             <if test="confirm2 != null">#{confirm2},</if>
             <if test="lightingType != null">#{lightingType},</if>
+            <if test="serialNumber != null">#{serialNumber},</if>
          </trim>
     </insert>
 
@@ -142,6 +146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="confirm1 != null">confirm1 = #{confirm1},</if>
             <if test="confirm2 != null">confirm2 = #{confirm2},</if>
             <if test="lightingType != null">lighting_type = #{lightingType},</if>
+            <if test="serialNumber != null">serial_number = #{serialNumber},</if>
         </trim>
         where id = #{id}
     </update>
@@ -157,6 +162,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updaterCode != null">updater_code = #{updaterCode},</if>
             <if test="updatedate != null">updatedate = #{updatedate},</if>
             <if test="remarks != null">remarks = #{remarks},</if>
+            <if test="serialNumber != null">serial_number = #{serialNumber},</if>
         </trim>
         where id in
         <foreach item="id" collection="ids" open="(" separator="," close=")">

+ 5 - 1
ui/src/views/pssr/lighting/index.vue

@@ -138,7 +138,8 @@
           <el-tag v-if="scope.row.approveStatus==2" type="success">已确认2</el-tag>
         </template>
       </el-table-column>
-      <el-table-column label="检查内容" align="center" prop="checkContent" :show-overflow-tooltip="true"/>
+      <el-table-column label="序号" align="center" prop="serialNumber" :show-overflow-tooltip="true" width="80"/>
+      <el-table-column label="检查内容" align="center" prop="checkContent" :show-overflow-tooltip="true" width="400"/>
       <el-table-column label="检查结果" align="center" prop="checkResult" :show-overflow-tooltip="true"/>
       <el-table-column label="确认人1" align="center" prop="confirm1" :show-overflow-tooltip="true"
                        width="150">
@@ -198,6 +199,9 @@
     <!-- 添加或修改照明对话框 -->
     <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="序号">
+          <el-input v-model="form.serialNumber" placeholder="请输入序号" />
+        </el-form-item>
         <el-form-item label="检查内容">
           <el-input type="textarea" v-model="form.checkContent" :min-height="192"/>
         </el-form-item>