ソースを参照

-根据区域筛选执行人

jiangbiao 1 年間 前
コミット
45f64cfc54

+ 46 - 0
master/src/main/java/com/ruoyi/project/plant/domain/TStaffmgr.java

@@ -138,6 +138,52 @@ public class TStaffmgr extends BaseEntity
 
     private String region;
 
+
+    /** 裂解 */
+    private String boiler;
+
+    /** 压缩 */
+    private String cracking;
+
+    /** 分离 */
+    private String hotarea;
+
+    /** PGU */
+    private String coldarea;
+
+    public String getBoiler() {
+        return boiler;
+    }
+
+    public void setBoiler(String boiler) {
+        this.boiler = boiler;
+    }
+
+    public String getCracking() {
+        return cracking;
+    }
+
+    public void setCracking(String cracking) {
+        this.cracking = cracking;
+    }
+
+    public String getHotarea() {
+        return hotarea;
+    }
+
+    public void setHotarea(String hotarea) {
+        this.hotarea = hotarea;
+    }
+
+    public String getColdarea() {
+        return coldarea;
+    }
+
+    public void setColdarea(String coldarea) {
+        this.coldarea = coldarea;
+    }
+
+
     public String getUserId() {
         return userId;
     }

+ 10 - 3
master/src/main/java/com/ruoyi/project/system/controller/SysUserController.java

@@ -1,6 +1,5 @@
 package com.ruoyi.project.system.controller;
 
-import com.alibaba.fastjson.JSON;
 import com.ruoyi.common.constant.UserConstants;
 import com.ruoyi.common.utils.*;
 import com.ruoyi.common.utils.file.FileUploadUtils;
@@ -67,8 +66,16 @@ public class SysUserController extends BaseController
     @GetMapping("/listUserPost")
     public List<SysUser> listUserPost(TStaffmgr tStaffmgr)
     {
-        List<SysUser> list = userService.selectUserPost(tStaffmgr);
-        return list;
+        if ("裂解".equals(tStaffmgr.getRegion())){
+            tStaffmgr.setBoiler("1");
+        } else if ("压缩".equals(tStaffmgr.getRegion())) {
+            tStaffmgr.setCracking("1");
+        } else if ("分离".equals(tStaffmgr.getRegion())) {
+            tStaffmgr.setHotarea("1");
+        }else  if ("芳烃抽提".equals(tStaffmgr.getRegion())||"汽油加氢".equals(tStaffmgr.getRegion())) {
+            tStaffmgr.setColdarea("1");
+        }
+        return userService.selectUserPost(tStaffmgr);
     }
 
     @GetMapping("/listUserByMgrRegion")

+ 5 - 0
master/src/main/resources/mybatis/system/SysUserMapper.xml

@@ -54,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		select b.USER_ID ,b.NICK_NAME ,b.STAFFID from T_STAFFMGR a
 		left join SYS_USER b on a.STAFFID=b.STAFFID
 		left join sys_dept d on a.dept_id = d.dept_id
+		left join T_WORKLICENSE e on e.EMPLOYEEID=a.STAFFID
 		<where>
 			<if test="actualposts != null  and actualposts != ''">
 				and a.actualpost in
@@ -63,6 +64,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 				</foreach>
 			</if>
 			<if test="deptId != null  and deptId != ''"> and a.dept_id=#{deptId}</if>
+			<if test="boiler != null"> and e.boiler=1</if>
+			<if test="cracking != null"> and e.cracking=1</if>
+			<if test="hotarea != null"> and e.hotarea=1</if>
+			<if test="coldarea != null"> and e.coldarea=1</if>
 			and a.DEL_FLAG=0
 			and b.USER_ID is not null
 		</where>

+ 20 - 9
ui/src/views/apply/safetychange/index.vue

@@ -255,7 +255,7 @@
         </el-form-item>
         <el-form-item label="安全评估人" prop="safaer">
           <el-select v-model="form.safaer" placeholder="请选择临时措施执行人" clearable size="small" filterable
-                     style="width: 100%">
+                     style="width: 100%" @change="getExecutorList">
             <el-option
               v-for="item in safaerList"
               :key="item.USERID"
@@ -622,12 +622,6 @@ export default {
     this.getDicts("apply_approve_status").then(response => {
       this.approveStatusList = response.data;
     });
-    listUserPost({
-      actualposts: "20,36,10,11,28,30,32,38,15,12,34",
-      deptId: 103
-    }).then(response => {
-      this.executorList = response;
-    });
     listUserByMgrRegion().then(response => {
       this.safaerList = response;
     });
@@ -665,6 +659,23 @@ export default {
         this.approveStatusFlag = 'danger';
       }
     },
+    getExecutorList(val){
+      console.log(val)
+      let region='';
+      for (let item of this.safaerList) {
+        if (val==item.USERID) {
+          region = item.REGION;
+          break;
+        }
+      }
+      listUserPost({
+        actualposts: "20,36,10,11,28,30,32,38,15,12,34",
+        region:region,
+        deptId: 103
+      }).then(response => {
+        this.executorList = response;
+      });
+    },
     getExecutorName(userId) {
       for (let item of this.executorList) {
         if (userId === item.userId) {
@@ -858,7 +869,7 @@ export default {
     },
     /** 导出按钮操作 */
     handleExport() {
-      const queryParams = this.queryParams;
+      let queryParams = this.queryParams;
       queryParams.ids=null;
       this.$confirm('是否确认导出所有组织保护措施状态变更申请数据项?', "警告", {
         confirmButtonText: "确定",
@@ -878,7 +889,7 @@ export default {
           type: "warning"
         })
       }
-      const queryParams = this.queryParams;
+      let queryParams = this.queryParams;
       queryParams.ids=this.ids;
       this.$confirm('是否确认导出选中的组织保护措施状态变更申请数据项?', "警告", {
         confirmButtonText: "确定",