浏览代码

-修改表字段

jiangbiao 2 年之前
父节点
当前提交
ed1a884d03

+ 1 - 1
master/src/main/java/com/ruoyi/project/base/controller/TBaseDeviceController.java

@@ -160,7 +160,7 @@ public class TBaseDeviceController extends BaseController
                         //装置名称
                         TBasePlant tBasePlant = tBasePlantService.selectTBasePlantByName(cellValue);
                         if (tBasePlant == null) {return AjaxResult.success("未找到对应装置!请检查装置名称无误后重新提交!",0);}
-                        plantId = tBasePlant.getId();
+                        plantId = tBasePlant.getPlantId();
                         entity.setPlantId(plantId);
                     } else if (j == 1) {
                         //  区域名称

+ 1 - 1
master/src/main/java/com/ruoyi/project/base/controller/TBasePointController.java

@@ -175,7 +175,7 @@ public class TBasePointController extends BaseController {
                         if (tBasePlant == null) {
                             return AjaxResult.success("未找到对应装置!请检查装置无误后重新提交!", 0);
                         }
-                        plantId = tBasePlant.getId();
+                        plantId = tBasePlant.getPlantId();
                         entity.setPlantId(plantId);
                     } else if (j == 1 || j == 2) {
                         if (StringUtils.isEmpty(cellValue))

+ 6 - 6
master/src/main/java/com/ruoyi/project/base/domain/TBasePlant.java

@@ -18,7 +18,7 @@ public class TBasePlant extends BaseEntity
     private static final long serialVersionUID = 1L;
 
     /** 唯一标识id */
-    private Long id;
+    private Long plantId;
 
     /** 编号 */
     @Excel(name = "编号")
@@ -80,14 +80,14 @@ public class TBasePlant extends BaseEntity
         this.updater = updater;
     }
 
-    public void setId(Long id)
+    public void setPlantId(Long plantId)
     {
-        this.id = id;
+        this.plantId = plantId;
     }
 
-    public Long getId()
+    public Long getPlantId()
     {
-        return id;
+        return plantId;
     }
     public void setPlantCode(String plantCode)
     {
@@ -210,7 +210,7 @@ public class TBasePlant extends BaseEntity
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
+            .append("id", getPlantId())
             .append("plantNum", getPlantCode())
             .append("plantName", getPlantName())
             .append("proAbility", getProAbility())

+ 3 - 3
master/src/main/java/com/ruoyi/project/task/controller/TTaskInspectionPlanController.java

@@ -118,13 +118,13 @@ public class TTaskInspectionPlanController extends BaseController {
         String year = String.valueOf(calendar.get(Calendar.YEAR)); // 获取当前年份
         for (TBasePlant tBasePlant : tBasePlantService.selectAllPlantName()) {// 查询已审核所有装置
             // 查询今年当前季度是否有监测计划
-            QueryWrapper<TTaskInspectionPlan> plansWrapper = new QueryWrapper<TTaskInspectionPlan>().eq("year", year).eq("quarter", nowQuarter).eq("plant_id", tBasePlant.getId()).eq("del_flag", 0);
+            QueryWrapper<TTaskInspectionPlan> plansWrapper = new QueryWrapper<TTaskInspectionPlan>().eq("year", year).eq("quarter", nowQuarter).eq("plant_id", tBasePlant.getPlantId()).eq("del_flag", 0);
             List<TTaskInspectionPlan> plans = tTaskInspectionPlanService.list(plansWrapper);
             if (CollectionUtils.isNotEmpty(plans)) {// 有则跳过
                 continue;
             }
             TTaskInspectionPlan tTaskInspectionPlan = new TTaskInspectionPlan();
-            tTaskInspectionPlan.setPlantId(tBasePlant.getId());
+            tTaskInspectionPlan.setPlantId(tBasePlant.getPlantId());
             // 查询最后一个计划编号
             plansWrapper.clear();
             plansWrapper.eq("del_flag", 0).orderByDesc("code");
@@ -152,7 +152,7 @@ public class TTaskInspectionPlanController extends BaseController {
             // 检测开始时间 TODO:改成传过来的
             tTaskInspectionPlan.setStartTime(new Date());
             // 统计当前装置下的所有(动)密封点
-            QueryWrapper<TBasePoint> points = new QueryWrapper<TBasePoint>().eq("plant_id", tBasePlant.getId()).eq("del_flag", 0).eq("approve_status", 2);
+            QueryWrapper<TBasePoint> points = new QueryWrapper<TBasePoint>().eq("plant_id", tBasePlant.getPlantId()).eq("del_flag", 0).eq("approve_status", 2);
             // TODO: 当1、3季度时需要加上动密封点的判断
 //            if (nowQuarter == 1 && nowQuarter == 3) {
 //                points.eq("","");

+ 1 - 1
master/src/main/resources/mybatis/base/TBaseDeviceMapper.xml

@@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectTBaseDeviceList" parameterType="TBaseDevice" resultMap="TBaseDeviceResult">
         select d.dev_id, d.plant_id,bp.plant_name,bp.plant_type,bp.plant_code, d.region_id,br.region_code,br.region_name, d.dev_code, d.dev_describe, d.remarks, d.approve_status, d.approve_time, d.dept_id, d.del_flag, d.creater_code, d.createdate, d.updater_code,su.user_name updater, d.updatedate,d.material,d.material_status,d.response_factor,d.response_factor_from from t_base_device d
         left join sys_user su on su.user_id = d.updater_code
-        left join t_base_plant bp on bp.id = d.plant_id
+        left join t_base_plant bp on bp.plant_id = d.plant_id
         left join t_base_region br on br.id = d.region_id
         <where>
             <if test="plantId != null "> and d.plant_id = #{plantId}</if>

+ 10 - 10
master/src/main/resources/mybatis/base/TBasePlantMapper.xml

@@ -5,7 +5,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 <mapper namespace="com.ruoyi.project.base.mapper.TBasePlantMapper">
 
     <resultMap type="TBasePlant" id="TBasePlantResult">
-        <result property="id"    column="id"    />
+        <result property="plantId"    column="plant_id"    />
         <result property="plantCode"    column="plant_code"    />
         <result property="plantName"    column="plant_name"    />
         <result property="proAbility"    column="pro_ability"    />
@@ -23,15 +23,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTBasePlantVo">
-        select id, plant_code, plant_name, pro_ability, plant_type, remarks, approve_status, approve_time, dept_id, del_flag, creater_code, createdate, updater_code, updatedate from t_base_plant
+        select plant_id, plant_code, plant_name, pro_ability, plant_type, remarks, approve_status, approve_time, dept_id, del_flag, creater_code, createdate, updater_code, updatedate from t_base_plant
     </sql>
 
     <select id="selectAllPlantName" resultMap="TBasePlantResult">
-        select d.id,d.plant_name from t_base_plant d where del_flag=0 and approve_status=1
+        select d.plant_id,d.plant_name from t_base_plant d where del_flag=0 and approve_status=1
     </select>
 
     <select id="selectTBasePlantList" parameterType="TBasePlant" resultMap="TBasePlantResult">
-        select d.id, d.plant_code, d.plant_name, d.pro_ability, d.plant_type, d.remarks, d.approve_status, d.approve_time, d.dept_id, d.del_flag, d.creater_code, d.createdate, su.user_name updater, d.updatedate from t_base_plant d
+        select d.plant_id, d.plant_code, d.plant_name, d.pro_ability, d.plant_type, d.remarks, d.approve_status, d.approve_time, d.dept_id, d.del_flag, d.creater_code, d.createdate, su.user_name updater, d.updatedate from t_base_plant d
         left join sys_user su on su.user_id = d.updater_code
         <where>
             <if test="plantCode != null  and plantCode != ''"> and plant_code = #{plantCode}</if>
@@ -52,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectTBasePlantById" parameterType="Long" resultMap="TBasePlantResult">
         <include refid="selectTBasePlantVo"/>
-        where id = #{id}
+        where plant_id = #{plantId}
     </select>
 
     <select id="selectTBasePlantByName" parameterType="String" resultMap="TBasePlantResult">
@@ -111,17 +111,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updaterCode != null">updater_code = #{updaterCode},</if>
             <if test="updatedate != null">updatedate = #{updatedate},</if>
         </trim>
-        where id = #{id}
+        where plant_id = #{plantId}
     </update>
 
     <delete id="deleteTBasePlantById" parameterType="Long">
-        update t_base_plant set del_flag=1 where id = #{id}
+        update t_base_plant set del_flag=1 where plant_id = #{plantId}
     </delete>
 
     <delete id="deleteTBasePlantByIds" parameterType="String">
-        update t_base_plant set del_flag=1 where id in
-        <foreach item="id" collection="array" open="(" separator="," close=")">
-            #{id}
+        update t_base_plant set del_flag=1 where plant_id in
+        <foreach item="plantId" collection="array" open="(" separator="," close=")">
+            #{plant_id}
         </foreach>
     </delete>
 </mapper>

+ 1 - 1
master/src/main/resources/mybatis/base/TBasePointMapper.xml

@@ -60,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectTBasePointList" parameterType="TBasePoint" resultMap="TBasePointResult">
         select d.id, d.net_test_value, d.leakage_degree, d.plant_id,bp.plant_name,bp.plant_type,bp.plant_code, d.region_id,br.region_code,br.region_name, d.dev_id,bd.dev_code,bd.`dev_describe` dev_name,d.medium, d.medium_type, d.point_type, d.layer, d.group_position, d.point_position, d.group_code, d.extend_code, d.sub_point_type, d.dia, d.unarrive, d.unarrive_reason, d.keep_warm, d.temperature, d.pressure, d.run_time, d.pid_no, d.pid_url, d.pic_no, d.pic_url, d.toc_mark, d.methane_mark, d.vocs_mark, d.remarks, d.approve_status, d.approve_time, d.dept_id, d.del_flag, d.creater_code, d.createdate, su.user_name updater, d.updatedate from t_base_point d
         left join sys_user su on su.user_id = d.updater_code
-        left join t_base_plant bp on bp.id = d.plant_id
+        left join t_base_plant bp on bp.plant_id = d.plant_id
         left join t_base_region br on br.id = d.region_id
         left join t_base_device bd on bd.dev_id = d.dev_id
         <where>

+ 1 - 1
master/src/main/resources/mybatis/base/TBaseRegionMapper.xml

@@ -33,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectTBaseRegionList" parameterType="TBaseRegion" resultMap="TBaseRegionResult">
         select d.id, d.plant_id,bp.plant_name,bp.plant_type,bp.plant_code,su.user_name updater, d.region_code, d.region_name, d.remarks, d.approve_status, d.approve_time, d.dept_id, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate from t_base_region d
         left join sys_user su on su.user_id = d.updater_code
-        left join t_base_plant bp on bp.id = d.plant_id
+        left join t_base_plant bp on bp.plant_id = d.plant_id
         <where>
             <if test="plantId != null "> and plant_id = #{plantId}</if>
             <if test="regionCode != null  and regionCode != ''"> and region_code = #{regionCode}</if>

+ 1 - 1
master/src/main/resources/mybatis/check/TCheckEnvironmentMapper.xml

@@ -38,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectTCheckEnvironmentList" parameterType="TCheckEnvironment" resultMap="TCheckEnvironmentResult">
         select d.*,su.user_name updater,bp.plant_code plantCode,bp.plant_name plantName,ci.model instrumentModel,ci.code instrumentCode from t_check_environment d
         left join sys_user su on su.user_id=d.updater_code
-        left join t_base_plant bp on bp.id =d.plant_id
+        left join t_base_plant bp on bp.plant_id =d.plant_id
         left join t_check_instrument ci on ci.id=d.instrument_id
         <where>
             <if test="plantId != null "> and plant_id = #{plantId}</if>

+ 1 - 1
master/src/main/resources/mybatis/task/TTaskInspectionMapper.xml

@@ -36,7 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectTTaskInspectionList" parameterType="TTaskInspection" resultMap="TTaskInspectionResult">
         select d.*,ip.inspection_plan_name,bp.plant_name from t_task_inspection d
         left join t_task_inspection_plan ip on d.plan_id=ip.id
-        left join t_base_plant bp on d.plant_id=bp.id
+        left join t_base_plant bp on d.plant_id=bp.plant_id
         <where>
             <if test="plantId != null "> and d.plant_id = #{plantId}</if>
             <if test="planId != null "> and d.plan_id = #{planId}</if>

+ 1 - 1
master/src/main/resources/mybatis/task/TTaskInspectionPlanMapper.xml

@@ -33,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectTTaskInspectionPlanList" parameterType="TTaskInspectionPlan" resultMap="TTaskInspectionPlanResult">
         select d.*,bp.plant_name,su.user_name creater from t_task_inspection_plan d
-        left join t_base_plant bp on bp.id=d.plant_id
+        left join t_base_plant bp on bp.plant_id=d.plant_id
         left join sys_user su on su.user_id=d.creater_code
         <where>
             <if test="plantId != null "> and d.plant_id = #{plantId}</if>

+ 4 - 4
ui/src/views/base/device/index.vue

@@ -6,9 +6,9 @@
                    placeholder="请选择装置" clearable size="small">
           <el-option
             v-for="plant in plantOperation"
-            :key="plant.id"
+            :key="plant.plantId"
             :label="plant.plantName"
-            :value="plant.id"
+            :value="plant.plantId"
           />
         </el-select>
       </el-form-item>
@@ -174,9 +174,9 @@
                      @change="getAllRegion(form.plantId)">
             <el-option
               v-for="dict in plantOperation"
-              :key="dict.id"
+              :key="dict.plantId"
               :label="dict.plantName"
-              :value="dict.id"
+              :value="dict.plantId"
             />
           </el-select>
         </el-form-item>

+ 6 - 6
ui/src/views/base/plant/index.vue

@@ -318,7 +318,7 @@ export default {
     // 表单重置
     reset() {
       this.form = {
-        id: null,
+        plantId: null,
         plantCode: null,
         plantName: null,
         proAbility: null,
@@ -347,7 +347,7 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
+      this.ids = selection.map(item => item.plantId)
       this.status = selection.map(item => item.approveStatus)
       this.single = selection.length !== 1
       this.multiple = !selection.length
@@ -367,8 +367,8 @@ export default {
         })
         return;
       }
-      const id = row.id || this.ids
-      getPlant(id).then(response => {
+      const plantId = row.plantId || this.ids
+      getPlant(plantId).then(response => {
         this.form = response.data;
         this.open = true;
         this.title = "修改装置";
@@ -378,7 +378,7 @@ export default {
     submitForm() {
       this.$refs["form"].validate(valid => {
         if (valid) {
-          if (this.form.id != null) {
+          if (this.form.plantId != null) {
             updatePlant(this.form).then(response => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
@@ -396,7 +396,7 @@ export default {
     },
     /** 删除按钮操作 */
     handleDelete(row) {
-      const ids = row.id || this.ids;
+      const ids = row.plantId || this.ids;
       if(row.approveStatus===undefined){
         for (let i = 0; i < this.status.length; i++) {
           if (this.status[i] != 0) {

+ 4 - 4
ui/src/views/base/point/index.vue

@@ -6,9 +6,9 @@
                    placeholder="请选择装置" clearable size="small">
           <el-option
             v-for="plant in plantOperation"
-            :key="plant.id"
+            :key="plant.plantId"
             :label="plant.plantName"
-            :value="plant.id"
+            :value="plant.plantId"
           />
         </el-select>
       </el-form-item>
@@ -295,9 +295,9 @@
                          @change="getAllRegion(form.plantId)">
                 <el-option
                   v-for="dict in plantOperation"
-                  :key="dict.id"
+                  :key="dict.plantId"
                   :label="dict.plantName"
-                  :value="dict.id"
+                  :value="dict.plantId"
                 />
               </el-select>
             </el-form-item>

+ 2 - 2
ui/src/views/base/region/index.vue

@@ -149,9 +149,9 @@
           <el-select v-model="form.plantId" placeholder="请选择装置" clearable size="small" style="width: 100%">
             <el-option
               v-for="dict in plantOperation"
-              :key="dict.id"
+              :key="dict.plantId"
               :label="dict.plantName"
-              :value="dict.id"
+              :value="dict.plantId"
             />
           </el-select>
         </el-form-item>

+ 10 - 8
ui/src/views/check/environment/index.vue

@@ -2,12 +2,14 @@
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
       <el-form-item label="装置" prop="plantId">
-        <el-input
-          v-model="queryParams.plantId"
-          placeholder="请输入装置"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
+        <el-select v-model="queryParams.plantId" @change="handleQuery" placeholder="请选择装置" clearable size="small" style="width: 85%">
+          <el-option
+            v-for="dict in plantOperation"
+            :key="dict.plantId"
+            :label="dict.plantName"
+            :value="dict.plantId"
+          />
+        </el-select>
       </el-form-item>
       <el-form-item label="仪器id" prop="instrumentId">
         <el-input
@@ -163,9 +165,9 @@
               <el-select v-model="form.plantId" placeholder="请选择装置" clearable size="small" style="width: 85%">
                 <el-option
                   v-for="dict in plantOperation"
-                  :key="dict.id"
+                  :key="dict.plantId"
                   :label="dict.plantName"
-                  :value="dict.id"
+                  :value="dict.plantId"
                 />
               </el-select>
               &nbsp;<el-checkbox v-model="checked">特殊</el-checkbox>

+ 2 - 2
ui/src/views/task/plan/index.vue

@@ -129,9 +129,9 @@
           <el-select v-model="form.plantId" placeholder="请选择装置" clearable size="small" style="width: 100%">
             <el-option
               v-for="dict in plantOperation"
-              :key="dict.id"
+              :key="dict.plantId"
               :label="dict.plantName"
-              :value="dict.id"
+              :value="dict.plantId"
             />
           </el-select>
         </el-form-item>