Forráskód Böngészése

-修改法规管理

jiangbiao 2 éve
szülő
commit
bbad26eff7

+ 10 - 0
master/src/main/java/com/ruoyi/project/check/domain/TCheckLawitems.java

@@ -109,6 +109,8 @@ public class TCheckLawitems extends BaseEntity {
      * 维护人
      */
     @Excel(name = "维护人")
+    private String updater;
+
     private Long updaterCode;
 
     /**
@@ -254,6 +256,14 @@ public class TCheckLawitems extends BaseEntity {
         return updatedate;
     }
 
+    public String getUpdater() {
+        return updater;
+    }
+
+    public void setUpdater(String updater) {
+        this.updater = updater;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

+ 37 - 35
master/src/main/resources/mybatis/check/TCheckLawitemsMapper.xml

@@ -25,53 +25,55 @@
     </resultMap>
 
     <sql id="selectTCheckLawitemsVo">
-        select id,
-               law_id,
-               plant_type,
-               point_type,
-               medium_type,
-               `general`,
-               serious,
-               detection_frequency,
-               strat_fix,
-               end_fix,
-               remarks,
-               dept_id,
-               del_flag,
-               creater_code,
-               createdate,
-               updater_code,
-               updatedate
-        from t_check_lawitems
+        select d.id,
+               d.law_id,
+               d.plant_type,
+               d.point_type,
+               d.medium_type,
+               d.`general`,
+               d.serious,
+               d.detection_frequency,
+               d.strat_fix,
+               d.end_fix,
+               d.remarks,
+               d.dept_id,
+               d.del_flag,
+               d.creater_code,
+               d.createdate,
+               d.updater_code,
+               d.updatedate,
+               su.user_name updater
+        from t_check_lawitems d
+        left join sys_user su on su.user_id=d.updater_code
     </sql>
 
     <select id="selectTCheckLawitemsList" parameterType="TCheckLawitems" resultMap="TCheckLawitemsResult">
         <include refid="selectTCheckLawitemsVo"/>
         <where>
-            <if test="lawId != null  and lawId != ''">and law_id = #{lawId}</if>
-            <if test="plantType != null  and plantType != ''">and plant_type = #{plantType}</if>
-            <if test="pointType != null  and pointType != ''">and point_type = #{pointType}</if>
-            <if test="mediumType != null  and mediumType != ''">and medium_type = #{mediumType}</if>
-            <if test="general != null  and general != ''">and general = #{general}</if>
-            <if test="serious != null  and serious != ''">and serious = #{serious}</if>
-            <if test="detectionFrequency != null  and detectionFrequency != ''">and detection_frequency =
+            <if test="lawId != null  and lawId != ''">and d.law_id = #{lawId}</if>
+            <if test="plantType != null  and plantType != ''">and d.plant_type = #{plantType}</if>
+            <if test="pointType != null  and pointType != ''">and d.point_type = #{pointType}</if>
+            <if test="mediumType != null  and mediumType != ''">and d.medium_type = #{mediumType}</if>
+            <if test="general != null  and general != ''">and d.`general` = #{general}</if>
+            <if test="serious != null  and serious != ''">and d.serious = #{serious}</if>
+            <if test="detectionFrequency != null  and detectionFrequency != ''">and d.detection_frequency =
                 #{detectionFrequency}
             </if>
-            <if test="stratFix != null  and stratFix != ''">and strat_fix = #{stratFix}</if>
-            <if test="endFix != null  and endFix != ''">and end_fix = #{endFix}</if>
-            <if test="remarks != null  and remarks != ''">and remarks = #{remarks}</if>
-            <if test="deptId != null ">and dept_id = #{deptId}</if>
-            <if test="createrCode != null ">and creater_code = #{createrCode}</if>
-            <if test="createdate != null ">and createdate = #{createdate}</if>
-            <if test="updaterCode != null ">and updater_code = #{updaterCode}</if>
-            <if test="updatedate != null ">and updatedate = #{updatedate}</if>
-            and del_flag = 0
+            <if test="stratFix != null  and stratFix != ''">and d.strat_fix = #{stratFix}</if>
+            <if test="endFix != null  and endFix != ''">and d.end_fix = #{endFix}</if>
+            <if test="remarks != null  and remarks != ''">and d.remarks = #{remarks}</if>
+            <if test="deptId != null ">and d.dept_id = #{deptId}</if>
+            <if test="createrCode != null ">and d.creater_code = #{createrCode}</if>
+            <if test="createdate != null ">and d.createdate = #{createdate}</if>
+            <if test="updaterCode != null ">and d.updater_code = #{updaterCode}</if>
+            <if test="updatedate != null ">and d.updatedate = #{updatedate}</if>
+            and d.del_flag = 0
         </where>
     </select>
 
     <select id="selectTCheckLawitemsById" parameterType="Long" resultMap="TCheckLawitemsResult">
         <include refid="selectTCheckLawitemsVo"/>
-        where id = #{id}
+        where d.id = #{id}
     </select>
 
     <insert id="insertTCheckLawitems" parameterType="TCheckLawitems" useGeneratedKeys="true" keyProperty="id">

+ 23 - 20
ui/src/views/check/lawitems/index.vue

@@ -24,7 +24,8 @@
         </el-select>
       </el-form-item>
       <el-form-item label="介质状态" prop="mediumType">
-        <el-select v-model="queryParams.mediumType" @change="handleQuery" placeholder="请选择介质状态" clearable size="small"
+        <el-select v-model="queryParams.mediumType" @change="handleQuery" placeholder="请选择介质状态" clearable
+                   size="small"
                    style="width: 100%">
           <el-option
             v-for="dict in mediumTypeOptions"
@@ -99,14 +100,17 @@
                        :formatter="pointFormat"/>
       <el-table-column label="介质状态" align="center" prop="mediumType" :show-overflow-tooltip="true" width="130"
                        :formatter="mediumTypeFormat"/>
-      <el-table-column label="一般泄露标准(ppm)" align="center" prop="general" :show-overflow-tooltip="true" width="140"/>
-      <el-table-column label="严重泄漏标准(ppm)" align="center" prop="serious" :show-overflow-tooltip="true" width="140"/>
+      <el-table-column label="一般泄露标准(ppm)" align="center" prop="general" :show-overflow-tooltip="true"
+                       width="140"/>
+      <el-table-column label="严重泄漏标准(ppm)" align="center" prop="serious" :show-overflow-tooltip="true"
+                       width="140"/>
       <el-table-column label="监测频次" align="center" prop="detectionFrequency" :show-overflow-tooltip="true"
                        width="130" :formatter="detectionFormat"/>
-      <el-table-column label="首次维修时限(天)" align="center" prop="stratFix" :show-overflow-tooltip="true" width="130"/>
+      <el-table-column label="首次维修时限(天)" align="center" prop="stratFix" :show-overflow-tooltip="true"
+                       width="130"/>
       <el-table-column label="最终维修时限(天)" align="center" prop="endFix" :show-overflow-tooltip="true" width="130"/>
       <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true" width="130"/>
-      <el-table-column label="维护人" align="center" prop="updaterCode" :show-overflow-tooltip="true" width="130"/>
+      <el-table-column label="维护人" align="center" prop="updater" :show-overflow-tooltip="true" width="130"/>
       <el-table-column label="维护时间" align="center" prop="updatedate" width="180">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.updatedate, '{y}-{m}-{d}') }}</span>
@@ -181,17 +185,16 @@
         <el-form-item label="严重泄漏标准(ppm)" prop="serious">
           <el-input v-model="form.serious" placeholder="请输入严重泄漏标准"/>
         </el-form-item>
-        <el-form-item label="监测频次" prop="detectionFrequency">
-          <el-form-item label="检测频次" prop="detectionFrequency">
-            <el-select v-model="form.detectionFrequency" placeholder="请选择检测频次" clearable size="small" style="width: 100%">
-              <el-option
-                v-for="dict in detectionFrequencyOptions"
-                :key="dict.dictValue"
-                :label="dict.dictLabel"
-                :value="dict.dictValue"
-              />
-            </el-select>
-          </el-form-item>
+        <el-form-item label="检测频次" prop="detectionFrequency">
+          <el-select v-model="form.detectionFrequency" placeholder="请选择检测频次" clearable size="small"
+                     style="width: 100%">
+            <el-option
+              v-for="dict in detectionFrequencyOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            />
+          </el-select>
         </el-form-item>
         <el-form-item label="首次维修时限(天)" prop="stratFix">
           <el-input v-model="form.stratFix" placeholder="请输入首次维修时限"/>
@@ -218,7 +221,7 @@ export default {
   name: "Lawitems",
   data() {
     return {
-      disabledBotton:false,
+      disabledBotton: false,
       plantTypeOptions: [],
       pointOptions: [],
       mediumTypeOptions: [],
@@ -370,14 +373,14 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd() {
-      this.disabledBotton=false
+      this.disabledBotton = false
       this.reset();
       this.open = true;
       this.title = "添加法规项";
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      this.disabledBotton=false
+      this.disabledBotton = false
       this.reset();
       const id = row.id || this.ids
       getLawitems(id).then(response => {
@@ -388,7 +391,7 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
-      this.disabledBotton=true
+      this.disabledBotton = true
       this.$refs["form"].validate(valid => {
         if (valid) {
           this.form.lawId = this.row.id