Browse Source

LY 周会议 权限

ly 1 năm trước cách đây
mục cha
commit
1fa597977b
21 tập tin đã thay đổi với 446 bổ sung147 xóa
  1. 3 1
      master/src/main/java/com/ruoyi/project/plant/controller/TStaffmgrController.java
  2. 89 33
      master/src/main/java/com/ruoyi/project/plant/controller/weekMeeting/TMtActionlistController.java
  3. 60 7
      master/src/main/java/com/ruoyi/project/plant/controller/weekMeeting/TMtKeymaintenanceController.java
  4. 78 26
      master/src/main/java/com/ruoyi/project/plant/controller/weekMeeting/TMtMessageattentionController.java
  5. 10 0
      master/src/main/java/com/ruoyi/project/plant/domain/TMtActionlist.java
  6. 10 0
      master/src/main/java/com/ruoyi/project/plant/domain/TMtKeymaintenance.java
  7. 9 0
      master/src/main/java/com/ruoyi/project/plant/domain/TMtMessageattention.java
  8. 8 0
      master/src/main/java/com/ruoyi/project/plant/mapper/TStaffmgrMapper.java
  9. 1 0
      master/src/main/java/com/ruoyi/project/sems/controller/TApproveController.java
  10. 3 2
      master/src/main/java/com/ruoyi/project/sems/controller/TReportYlgdController.java
  11. 3 2
      master/src/main/java/com/ruoyi/project/sems/controller/TReportYlrqController.java
  12. 6 2
      master/src/main/resources/mybatis/plant/TMtActionlistMapper.xml
  13. 6 2
      master/src/main/resources/mybatis/plant/TMtKeymaintenanceMapper.xml
  14. 6 3
      master/src/main/resources/mybatis/plant/TMtMessageattentionMapper.xml
  15. 21 1
      master/src/main/resources/mybatis/plant/TStaffmgrMapper.xml
  16. 1 7
      master/src/main/resources/mybatis/sems/TSpecdevCcMapper.xml
  17. 0 7
      master/src/main/resources/mybatis/sems/TSpecdevDtMapper.xml
  18. 0 7
      master/src/main/resources/mybatis/sems/TSpecdevDzsbMapper.xml
  19. 45 16
      ui/src/views/components/meeting/actionlist.vue
  20. 43 16
      ui/src/views/components/meeting/keymaintenance.vue
  21. 44 15
      ui/src/views/components/meeting/messageattention.vue

+ 3 - 1
master/src/main/java/com/ruoyi/project/plant/controller/TStaffmgrController.java

@@ -212,7 +212,9 @@ public class TStaffmgrController extends BaseController
         return getDataTable(list);
     }
 
-    @PreAuthorize("@ss.hasPermi('plant:staffmgr:list')")
+    /**
+     * 通过部门查询人员列表
+     */
     @GetMapping("/listByDeptAndTeam")
     public TableDataInfo listByDeptAndTeam(TStaffmgr tStaffmgr)
     {

+ 89 - 33
master/src/main/java/com/ruoyi/project/plant/controller/weekMeeting/TMtActionlistController.java

@@ -3,10 +3,13 @@ package com.ruoyi.project.plant.controller.weekMeeting;
 import java.util.*;
 
 import com.alibaba.fastjson.JSON;
+import com.ruoyi.common.utils.DictUtils;
 import com.ruoyi.framework.security.service.SysPermissionService;
 import com.ruoyi.project.common.domain.DataEntity;
 import com.ruoyi.project.plant.controller.TMtMeetingController;
+import com.ruoyi.project.plant.domain.TStaffmgr;
 import com.ruoyi.project.plant.mapper.TMtActionlistMapper;
+import com.ruoyi.project.plant.mapper.TStaffmgrMapper;
 import com.ruoyi.project.system.domain.SysDictData;
 import com.ruoyi.project.system.domain.SysUser;
 import com.ruoyi.project.system.service.ISysDictTypeService;
@@ -34,8 +37,7 @@ import javax.annotation.Resource;
  */
 @RestController
 @RequestMapping("/plant/actionlist")
-public class TMtActionlistController extends BaseController
-{
+public class TMtActionlistController extends BaseController {
     @Autowired
     private ITMtActionlistService tMtActionlistService;
     @Resource
@@ -48,13 +50,16 @@ public class TMtActionlistController extends BaseController
     private SysPermissionService permissionService;
     @Autowired
     private TMtMeetingController tMtMeetingController;
+    @Resource
+    private TStaffmgrMapper tStaffmgrMapper;
+
+
     /**
      * 查询装置会议执行列表
      */
     @PreAuthorize("@ss.hasPermi('plant:meeting:list')")
     @GetMapping("/list")
-    public TableDataInfo list(TMtActionlist tMtActionlist)
-    {
+    public TableDataInfo list(TMtActionlist tMtActionlist) {
         // 权限集合
         SysUser s = sysUserService.selectUserById(getUserId());
         Set<String> permissions = permissionService.getMenuPermission(s);
@@ -65,19 +70,44 @@ public class TMtActionlistController extends BaseController
         logger.info(JSON.toJSONString(tMtActionlist));
         startPage();
         List<TMtActionlist> list = tMtActionlistService.selectTMtActionlistList(tMtActionlist);
+        List<SysDictData> dictList = iSysDictTypeService.selectDictDataByType("ACTUALPOST");
+
+        for (TMtActionlist t : list
+        ) {
+            //指定人
+            if ("1".equals(t.getIsPerson())) {
+                if (StringUtils.isNotEmpty(t.getResponsible())) {
+                    String[] respArr = t.getResponsible().split(",");
+                    for (int i = 0; i < respArr.length; i++) {
+                        SysUser user = sysUserService.selectUserByStaffId(respArr[i]);
+                        if (user != null) {
+                            if (i == 0) {
+                                t.setRespName(user.getNickName());
+                            } else {
+                                t.setRespName(t.getRespName() + "," + user.getNickName());
+                            }
+                        }
+                    }
+                }
+            }
+            //指定岗位
+            else if ("2".equals(t.getIsPerson())) {
+                if (StringUtils.isNotEmpty(t.getPosition())) {
+                    String[] arr = t.getPosition().split(",");
+                    for (int i = 0; i < arr.length; i++) {
+                        if (i == 0) {
+                            t.setRespName(DictUtils.getDictVale(dictList ,arr[i]));
+                        }else {
+                            t.setRespName(t.getRespName() + "," + DictUtils.getDictVale(dictList ,arr[i]));
+                        }
+
+                    }
 
-        for (TMtActionlist t:list
-             ) {
-            if (StringUtils.isNotEmpty(t.getResponsible())) {
-                t.setRespName(t.getResponsible());
-                SysUser user = sysUserService.selectUserByStaffId(t.getResponsible());
-                if (user != null) {
-                    t.setRespName(user.getNickName());
                 }
             }
 
             if (t.getUpdaterCode() != null) {
-                SysUser updater = sysUserService.selectUserById( Long.parseLong(t.getUpdaterCode()));
+                SysUser updater = sysUserService.selectUserById(Long.parseLong(t.getUpdaterCode()));
                 t.setUpdaterCode(updater.getNickName());
             }
         }
@@ -87,21 +117,20 @@ public class TMtActionlistController extends BaseController
 
     //情况统计
     @GetMapping("/actionStatusData")
-    public List<DataEntity> actionStatusData(@RequestParam Map param)
-    {
-        param.put("params" , new HashMap<>());
+    public List<DataEntity> actionStatusData(@RequestParam Map param) {
+        param.put("params", new HashMap<>());
         logger.info(JSON.toJSONString(param));
         List<DataEntity> list = tMtActionlistMapper.selectAcitonStatusData(param);
         List<SysDictData> dictList = iSysDictTypeService.selectDictDataByType("ACTION_STATUS");
-        for (DataEntity d: list
+        for (DataEntity d : list
         ) {
-            for (SysDictData s: dictList
+            for (SysDictData s : dictList
             ) {
-                if (StringUtils.isBlank(d.getDataName())){
+                if (StringUtils.isBlank(d.getDataName())) {
                     d.setDataName("未知");
                     break;
                 }
-                if (s.getDictValue().equals(d.getDataName())){
+                if (s.getDictValue().equals(d.getDataName())) {
                     d.setDataName(s.getDictLabel());
                     break;
                 }
@@ -116,8 +145,7 @@ public class TMtActionlistController extends BaseController
     @PreAuthorize("@ss.hasPermi('plant:meeting:export')")
     @Log(title = "装置会议执行", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
-    public AjaxResult export(TMtActionlist tMtActionlist)
-    {
+    public AjaxResult export(TMtActionlist tMtActionlist) {
         List<TMtActionlist> list = tMtActionlistService.selectTMtActionlistList(tMtActionlist);
         ExcelUtil<TMtActionlist> util = new ExcelUtil<TMtActionlist>(TMtActionlist.class);
         return util.exportExcel(list, "actionlist");
@@ -127,8 +155,7 @@ public class TMtActionlistController extends BaseController
      * 获取装置会议执行详细信息
      */
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
         return AjaxResult.success(tMtActionlistService.selectTMtActionlistById(id));
     }
 
@@ -137,14 +164,30 @@ public class TMtActionlistController extends BaseController
      */
     @Log(title = "装置会议执行", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody TMtActionlist tMtActionlist)
-    {
+    public AjaxResult add(@RequestBody TMtActionlist tMtActionlist) {
         tMtActionlist.setUpdatedate(new Date());
         tMtActionlist.setUpdaterCode(getUserId() + "");
         tMtActionlist.setCreaterCode(getUserId() + "");
-        if (tMtActionlist.getIsHis() == 1) {
-            tMtMeetingController.getReport(null,tMtActionlist.getMeetingId());
+        if (tMtActionlist.getIsHis() != null && tMtActionlist.getIsHis() == 1) {
+            tMtMeetingController.getReport(null, tMtActionlist.getMeetingId());
         }
+
+        //指定岗位
+        if ("2".equals(tMtActionlist.getIsPerson())) {
+            if (StringUtils.isNotEmpty(tMtActionlist.getPosition())) {
+                TStaffmgr t = new TStaffmgr();
+                t.setDeptId(103l);
+                t.setActualposts(tMtActionlist.getPosition());
+                List<TStaffmgr> staffmgrList = tStaffmgrMapper.selectTStaffmgrListByDeptId(t);
+                String respStr = "";
+                for (TStaffmgr s : staffmgrList
+                     ) {
+                    respStr = respStr + s.getStaffid() + ",";
+                }
+                tMtActionlist.setResponsible(respStr);
+            }
+        }
+
         return toAjax(tMtActionlistService.insertTMtActionlist(tMtActionlist));
     }
 
@@ -153,12 +196,26 @@ public class TMtActionlistController extends BaseController
      */
     @Log(title = "装置会议执行", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody TMtActionlist tMtActionlist)
-    {
+    public AjaxResult edit(@RequestBody TMtActionlist tMtActionlist) {
         tMtActionlist.setUpdatedate(new Date());
         tMtActionlist.setUpdaterCode(getUserId() + "");
         if (tMtActionlist.getIsHis() == 1) {
-            tMtMeetingController.getReport(null,tMtActionlist.getMeetingId());
+            tMtMeetingController.getReport(null, tMtActionlist.getMeetingId());
+        }
+        //指定岗位
+        if ("2".equals(tMtActionlist.getIsPerson())) {
+            if (StringUtils.isNotEmpty(tMtActionlist.getPosition())) {
+                TStaffmgr t = new TStaffmgr();
+                t.setDeptId(103l);
+                t.setActualposts(tMtActionlist.getPosition());
+                List<TStaffmgr> staffmgrList = tStaffmgrMapper.selectTStaffmgrListByDeptId(t);
+                String respStr = "";
+                for (TStaffmgr s : staffmgrList
+                ) {
+                    respStr = respStr + s.getStaffid() + ",";
+                }
+                tMtActionlist.setResponsible(respStr);
+            }
         }
         return toAjax(tMtActionlistService.updateTMtActionlist(tMtActionlist));
     }
@@ -167,9 +224,8 @@ public class TMtActionlistController extends BaseController
      * 删除装置会议执行
      */
     @Log(title = "装置会议执行", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(tMtActionlistService.deleteTMtActionlistByIds(ids));
     }
 }

+ 60 - 7
master/src/main/java/com/ruoyi/project/plant/controller/weekMeeting/TMtKeymaintenanceController.java

@@ -3,11 +3,14 @@ package com.ruoyi.project.plant.controller.weekMeeting;
 import java.util.*;
 
 import com.alibaba.fastjson.JSON;
+import com.ruoyi.common.utils.DictUtils;
 import com.ruoyi.framework.security.service.SysPermissionService;
 import com.ruoyi.project.common.domain.DataEntity;
 import com.ruoyi.project.plant.controller.TMtMeetingController;
 import com.ruoyi.project.plant.domain.TMtActionlist;
+import com.ruoyi.project.plant.domain.TStaffmgr;
 import com.ruoyi.project.plant.mapper.TMtKeymaintenanceMapper;
+import com.ruoyi.project.plant.mapper.TStaffmgrMapper;
 import com.ruoyi.project.system.domain.SysDictData;
 import com.ruoyi.project.system.domain.SysUser;
 import com.ruoyi.project.system.service.ISysDictTypeService;
@@ -49,6 +52,8 @@ public class TMtKeymaintenanceController extends BaseController
     private SysPermissionService permissionService;
     @Autowired
     private TMtMeetingController tMtMeetingController;
+    @Resource
+    private TStaffmgrMapper tStaffmgrMapper;
     /**
      * 查询下周关键维修工作列表
      */
@@ -65,13 +70,31 @@ public class TMtKeymaintenanceController extends BaseController
         }
         startPage();
         List<TMtKeymaintenance> list = tMtKeymaintenanceService.selectTMtKeymaintenanceList(tMtKeymaintenance);
+        List<SysDictData> dictList = iSysDictTypeService.selectDictDataByType("ACTUALPOST");
+
         for (TMtKeymaintenance t:list
         ) {
-            if (StringUtils.isNotEmpty(t.getResponsible())) {
-                t.setRespName(t.getResponsible());
-                SysUser user = sysUserService.selectUserByStaffId(t.getResponsible());
-                if (user != null) {
-                    t.setRespName(user.getNickName());
+            //指定人
+            if ("1".equals(t.getIsPerson())) {
+                if (StringUtils.isNotEmpty(t.getResponsible())) {
+                    t.setRespName(t.getResponsible());
+                    SysUser user = sysUserService.selectUserByStaffId(t.getResponsible());
+                    if (user != null) {
+                        t.setRespName(user.getNickName());
+                    }
+                }
+            }
+            //指定岗位
+            else if ("2".equals(t.getIsPerson())) {
+                if (StringUtils.isNotEmpty(t.getPosition())) {
+                    String[] arr = t.getPosition().split(",");
+                    for (int i = 0; i < arr.length; i++) {
+                        if (i == 0) {
+                            t.setRespName(DictUtils.getDictVale(dictList ,arr[i]));
+                        }else {
+                            t.setRespName(t.getRespName() + "," + DictUtils.getDictVale(dictList ,arr[i]));
+                        }
+                    }
                 }
             }
             if (t.getUpdaterCode() != null) {
@@ -139,9 +162,24 @@ public class TMtKeymaintenanceController extends BaseController
         tMtKeymaintenance.setUpdatedate(new Date());
         tMtKeymaintenance.setUpdaterCode(getUserId() + "");
         tMtKeymaintenance.setCreaterCode(getUserId() + "");
-        if (tMtKeymaintenance.getIsHis() == 1) {
+        if (tMtKeymaintenance.getIsHis() != null && tMtKeymaintenance.getIsHis() == 1) {
             tMtMeetingController.getReport(null,tMtKeymaintenance.getMeetingId());
         }
+        //指定岗位
+        if ("2".equals(tMtKeymaintenance.getIsPerson())) {
+            if (StringUtils.isNotEmpty(tMtKeymaintenance.getPosition())) {
+                TStaffmgr t = new TStaffmgr();
+                t.setDeptId(103l);
+                t.setActualposts(tMtKeymaintenance.getPosition());
+                List<TStaffmgr> staffmgrList = tStaffmgrMapper.selectTStaffmgrListByDeptId(t);
+                String respStr = "";
+                for (TStaffmgr s : staffmgrList
+                ) {
+                    respStr = respStr + s.getStaffid() + ",";
+                }
+                tMtKeymaintenance.setResponsible(respStr);
+            }
+        }
         return toAjax(tMtKeymaintenanceService.insertTMtKeymaintenance(tMtKeymaintenance));
     }
 
@@ -154,9 +192,24 @@ public class TMtKeymaintenanceController extends BaseController
     {
         tMtKeymaintenance.setUpdatedate(new Date());
         tMtKeymaintenance.setUpdaterCode(getUserId() + "");
-        if (tMtKeymaintenance.getIsHis() == 1) {
+        if (tMtKeymaintenance.getIsHis() != null && tMtKeymaintenance.getIsHis() == 1) {
             tMtMeetingController.getReport(null,tMtKeymaintenance.getMeetingId());
         }
+        //指定岗位
+        if ("2".equals(tMtKeymaintenance.getIsPerson())) {
+            if (StringUtils.isNotEmpty(tMtKeymaintenance.getPosition())) {
+                TStaffmgr t = new TStaffmgr();
+                t.setDeptId(103l);
+                t.setActualposts(tMtKeymaintenance.getPosition());
+                List<TStaffmgr> staffmgrList = tStaffmgrMapper.selectTStaffmgrListByDeptId(t);
+                String respStr = "";
+                for (TStaffmgr s : staffmgrList
+                ) {
+                    respStr = respStr + s.getStaffid() + ",";
+                }
+                tMtKeymaintenance.setResponsible(respStr);
+            }
+        }
         return toAjax(tMtKeymaintenanceService.updateTMtKeymaintenance(tMtKeymaintenance));
     }
 

+ 78 - 26
master/src/main/java/com/ruoyi/project/plant/controller/weekMeeting/TMtMessageattentionController.java

@@ -4,10 +4,15 @@ import java.util.Date;
 import java.util.List;
 import java.util.Set;
 
+import com.ruoyi.common.utils.DictUtils;
 import com.ruoyi.framework.security.service.SysPermissionService;
 import com.ruoyi.project.plant.controller.TMtMeetingController;
 import com.ruoyi.project.plant.domain.TMtKeymaintenance;
+import com.ruoyi.project.plant.domain.TStaffmgr;
+import com.ruoyi.project.plant.mapper.TStaffmgrMapper;
+import com.ruoyi.project.system.domain.SysDictData;
 import com.ruoyi.project.system.domain.SysUser;
+import com.ruoyi.project.system.service.ISysDictTypeService;
 import com.ruoyi.project.system.service.ISysUserService;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -29,6 +34,8 @@ import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.web.page.TableDataInfo;
 
+import javax.annotation.Resource;
+
 /**
  * 信息提醒Controller
  *
@@ -37,8 +44,7 @@ import com.ruoyi.framework.web.page.TableDataInfo;
  */
 @RestController
 @RequestMapping("/plant/messageattention")
-public class TMtMessageattentionController extends BaseController
-{
+public class TMtMessageattentionController extends BaseController {
     @Autowired
     private ITMtMessageattentionService tMtMessageattentionService;
     @Autowired
@@ -47,13 +53,16 @@ public class TMtMessageattentionController extends BaseController
     private SysPermissionService permissionService;
     @Autowired
     private TMtMeetingController tMtMeetingController;
+    @Autowired
+    private ISysDictTypeService iSysDictTypeService;
+    @Resource
+    private TStaffmgrMapper tStaffmgrMapper;
     /**
      * 查询信息提醒列表
      */
     @PreAuthorize("@ss.hasPermi('plant:meeting:list')")
     @GetMapping("/list")
-    public TableDataInfo list(TMtMessageattention tMtMessageattention)
-    {
+    public TableDataInfo list(TMtMessageattention tMtMessageattention) {
         // 权限集合
         SysUser s = sysUserService.selectUserById(getUserId());
         Set<String> permissions = permissionService.getMenuPermission(s);
@@ -62,17 +71,35 @@ public class TMtMessageattentionController extends BaseController
         }
         startPage();
         List<TMtMessageattention> list = tMtMessageattentionService.selectTMtMessageattentionList(tMtMessageattention);
-        for (TMtMessageattention t:list
+        List<SysDictData> dictList = iSysDictTypeService.selectDictDataByType("ACTUALPOST");
+
+        for (TMtMessageattention t : list
         ) {
-            if (StringUtils.isNotEmpty(t.getResponsible())) {
-                t.setRespName(t.getResponsible());
-                SysUser user = sysUserService.selectUserByStaffId(t.getResponsible());
-                if (user != null) {
-                    t.setRespName(user.getNickName());
+            //指定人
+            if ("1".equals(t.getIsPerson())) {
+                if (StringUtils.isNotEmpty(t.getResponsible())) {
+                    t.setRespName(t.getResponsible());
+                    SysUser user = sysUserService.selectUserByStaffId(t.getResponsible());
+                    if (user != null) {
+                        t.setRespName(user.getNickName());
+                    }
+                }
+            }
+            //指定岗位
+            else if ("2".equals(t.getIsPerson())) {
+                if (StringUtils.isNotEmpty(t.getPosition())) {
+                    String[] arr = t.getPosition().split(",");
+                    for (int i = 0; i < arr.length; i++) {
+                        if (i == 0) {
+                            t.setRespName(DictUtils.getDictVale(dictList, arr[i]));
+                        } else {
+                            t.setRespName(t.getRespName() + "," + DictUtils.getDictVale(dictList, arr[i]));
+                        }
+                    }
                 }
             }
             if (t.getUpdaterCode() != null) {
-                SysUser updater = sysUserService.selectUserById( Long.parseLong(t.getUpdaterCode()));
+                SysUser updater = sysUserService.selectUserById(Long.parseLong(t.getUpdaterCode()));
                 t.setUpdaterCode(updater.getNickName());
             }
         }
@@ -85,8 +112,7 @@ public class TMtMessageattentionController extends BaseController
     @PreAuthorize("@ss.hasPermi('plant:meeting:export')")
     @Log(title = "信息提醒", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
-    public AjaxResult export(TMtMessageattention tMtMessageattention)
-    {
+    public AjaxResult export(TMtMessageattention tMtMessageattention) {
         List<TMtMessageattention> list = tMtMessageattentionService.selectTMtMessageattentionList(tMtMessageattention);
         ExcelUtil<TMtMessageattention> util = new ExcelUtil<TMtMessageattention>(TMtMessageattention.class);
         return util.exportExcel(list, "messageattention");
@@ -97,8 +123,7 @@ public class TMtMessageattentionController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('plant:meeting:query')")
     @GetMapping(value = "/{id}")
-    public AjaxResult getInfo(@PathVariable("id") Long id)
-    {
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
         return AjaxResult.success(tMtMessageattentionService.selectTMtMessageattentionById(id));
     }
 
@@ -107,13 +132,27 @@ public class TMtMessageattentionController extends BaseController
      */
     @Log(title = "信息提醒", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody TMtMessageattention tMtMessageattention)
-    {
+    public AjaxResult add(@RequestBody TMtMessageattention tMtMessageattention) {
         tMtMessageattention.setUpdatedate(new Date());
         tMtMessageattention.setUpdaterCode(getUserId() + "");
         tMtMessageattention.setCreaterCode(getUserId() + "");
-        if (tMtMessageattention.getIsHis() == 1) {
-            tMtMeetingController.getReport(null,tMtMessageattention.getMeetingId());
+        if (tMtMessageattention.getIsHis() != null && tMtMessageattention.getIsHis() == 1) {
+            tMtMeetingController.getReport(null, tMtMessageattention.getMeetingId());
+        }
+        //指定岗位
+        if ("2".equals(tMtMessageattention.getIsPerson())) {
+            if (StringUtils.isNotEmpty(tMtMessageattention.getPosition())) {
+                TStaffmgr t = new TStaffmgr();
+                t.setDeptId(103l);
+                t.setActualposts(tMtMessageattention.getPosition());
+                List<TStaffmgr> staffmgrList = tStaffmgrMapper.selectTStaffmgrListByDeptId(t);
+                String respStr = "";
+                for (TStaffmgr s : staffmgrList
+                ) {
+                    respStr = respStr + s.getStaffid() + ",";
+                }
+                tMtMessageattention.setResponsible(respStr);
+            }
         }
         return toAjax(tMtMessageattentionService.insertTMtMessageattention(tMtMessageattention));
     }
@@ -123,12 +162,26 @@ public class TMtMessageattentionController extends BaseController
      */
     @Log(title = "信息提醒", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody TMtMessageattention tMtMessageattention)
-    {
+    public AjaxResult edit(@RequestBody TMtMessageattention tMtMessageattention) {
         tMtMessageattention.setUpdatedate(new Date());
         tMtMessageattention.setUpdaterCode(getUserId() + "");
-        if (tMtMessageattention.getIsHis() == 1) {
-            tMtMeetingController.getReport(null,tMtMessageattention.getMeetingId());
+        if (tMtMessageattention.getIsHis() != null && tMtMessageattention.getIsHis() == 1) {
+            tMtMeetingController.getReport(null, tMtMessageattention.getMeetingId());
+        }
+        //指定岗位
+        if ("2".equals(tMtMessageattention.getIsPerson())) {
+            if (StringUtils.isNotEmpty(tMtMessageattention.getPosition())) {
+                TStaffmgr t = new TStaffmgr();
+                t.setDeptId(103l);
+                t.setActualposts(tMtMessageattention.getPosition());
+                List<TStaffmgr> staffmgrList = tStaffmgrMapper.selectTStaffmgrListByDeptId(t);
+                String respStr = "";
+                for (TStaffmgr s : staffmgrList
+                ) {
+                    respStr = respStr + s.getStaffid() + ",";
+                }
+                tMtMessageattention.setResponsible(respStr);
+            }
         }
         return toAjax(tMtMessageattentionService.updateTMtMessageattention(tMtMessageattention));
     }
@@ -138,9 +191,8 @@ public class TMtMessageattentionController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('plant:meeting:remove')")
     @Log(title = "信息提醒", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{ids}")
-    public AjaxResult remove(@PathVariable Long[] ids)
-    {
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
         return toAjax(tMtMessageattentionService.deleteTMtMessageattentionByIds(ids));
     }
 }

+ 10 - 0
master/src/main/java/com/ruoyi/project/plant/domain/TMtActionlist.java

@@ -28,6 +28,8 @@ public class TMtActionlist extends BaseEntity
     @Excel(name = "责任人")
     private String responsible;
 
+    private String position;
+
     /** 责任人姓名 */
     private String respName;
 
@@ -96,6 +98,14 @@ public class TMtActionlist extends BaseEntity
         this.isPerson = isPerson;
     }
 
+    public String getPosition() {
+        return position;
+    }
+
+    public void setPosition(String position) {
+        this.position = position;
+    }
+
     public String getRespName() {
         return respName;
     }

+ 10 - 0
master/src/main/java/com/ruoyi/project/plant/domain/TMtKeymaintenance.java

@@ -87,6 +87,16 @@ public class TMtKeymaintenance extends BaseEntity
     @Excel(name = "部门名称")
     private String deptName;
 
+    private String position;
+
+    public String getPosition() {
+        return position;
+    }
+
+    public void setPosition(String position) {
+        this.position = position;
+    }
+
     public String getIsPerson() {
         return isPerson;
     }

+ 9 - 0
master/src/main/java/com/ruoyi/project/plant/domain/TMtMessageattention.java

@@ -83,6 +83,15 @@ public class TMtMessageattention extends BaseEntity
 
     /** 指定人 */
     private String isPerson;
+    private String position;
+
+    public String getPosition() {
+        return position;
+    }
+
+    public void setPosition(String position) {
+        this.position = position;
+    }
 
     public String getIsPerson() {
         return isPerson;

+ 8 - 0
master/src/main/java/com/ruoyi/project/plant/mapper/TStaffmgrMapper.java

@@ -60,6 +60,14 @@ public interface TStaffmgrMapper
     @DataScope(deptAlias = "d")
     public List<TStaffmgr> selectTStaffmgrList(TStaffmgr tStaffmgr);
 
+    /**
+     * 查询人员管理列表
+     *
+     * @param tStaffmgr 人员管理
+     * @return 人员管理集合
+     */
+    public List<TStaffmgr> selectTStaffmgrListByDeptId(TStaffmgr tStaffmgr);
+
     @DataScope(deptAlias = "d")
     public List<TStaffmgr> selectAllTStaffmgrList(TStaffmgr tStaffmgr);
 

+ 1 - 0
master/src/main/java/com/ruoyi/project/sems/controller/TApproveController.java

@@ -767,6 +767,7 @@ public class TApproveController extends BaseController {
         String data = sdf.format(dt) + userid;
         tApprove.setApNo(data);
         tApprove.setUserId(userid);
+        tApprove.setDevId(null);
         tApproveService.insertTApprove(tApprove);
 
         //修改设备申请状态

+ 3 - 2
master/src/main/java/com/ruoyi/project/sems/controller/TReportYlgdController.java

@@ -11,6 +11,7 @@ import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
 
 import com.alibaba.fastjson.JSON;
+import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.file.ExcelUtils;
 import com.ruoyi.common.utils.file.FileUploadUtils;
@@ -537,10 +538,10 @@ public class TReportYlgdController extends BaseController {
                         entity.setRemarks(cellValue);
                     } else if (j == 21) {
                         //检查日期
-                        entity.setCheckDate(cellValue != null ? sdf.parse(cellValue) : null);
+                        entity.setCheckDate(cellValue != null ? new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue) : null);
                     } else if (j == 22) {
                         //下次年度检查日期
-                        entity.setNextCheckDate(cellValue != null ? sdf.parse(cellValue) : null);
+                        entity.setNextCheckDate(cellValue != null ? new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue) : null);
                     } else if (j == 23) {
                         //问题及处理
                         entity.setProblem(cellValue);

+ 3 - 2
master/src/main/java/com/ruoyi/project/sems/controller/TReportYlrqController.java

@@ -11,6 +11,7 @@ import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
 
 import com.alibaba.fastjson.JSON;
+import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.file.ExcelUtils;
 import com.ruoyi.common.utils.file.FileUploadUtils;
@@ -550,10 +551,10 @@ public class TReportYlrqController extends BaseController {
                         entity.setRemarks(cellValue);
                     } else if (j == 36) {
                         //检查日期
-                        entity.setCheckDate(cellValue != null ? sdf.parse(cellValue) : null);
+                        entity.setCheckDate(cellValue != null ? new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue) : null);
                     } else if (j == 37) {
                         //下次年度检查日期
-                        entity.setNextCheckDate(cellValue != null ? sdf.parse(cellValue) : null);
+                        entity.setNextCheckDate(cellValue != null ? new SimpleDateFormat(DateUtils.getDateFormat(cellValue)).parse(cellValue) : null);
                     } else if (j == 38) {
                         //问题及处理
                         entity.setProblem(cellValue);

+ 6 - 2
master/src/main/resources/mybatis/plant/TMtActionlistMapper.xml

@@ -23,17 +23,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="isHis"    column="is_his"    />
         <result property="isPerson"    column="is_person"    />
         <result property="deptName" column="dept_name" />
+        <result property="position" column="position" />
     </resultMap>
 
     <sql id="selectTMtActionlistVo">
-        select d.id, d.plant_code,d.is_person, d.responsible, d.action, d.deadline, d.status, d.inputdate, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.meeting_id, d.is_his ,s.dept_name from t_mt_actionlist d
+        select d.id, d.plant_code,d.position,d.is_person, d.responsible, d.action, d.deadline, d.status, d.inputdate, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.meeting_id, d.is_his ,s.dept_name from t_mt_actionlist d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
     <select id="selectTMtActionlistList" parameterType="TMtActionlist" resultMap="TMtActionlistResult">
         <include refid="selectTMtActionlistVo"/>
         <where>
-            <if test="responsible != null  and responsible != ''"> and (responsible = #{responsible} or  is_person = '2' )</if>
+            <if test="responsible != null  and responsible != ''"> and responsible like concat(concat('%', #{responsible}), '%')</if>
             <if test="action != null  and action != ''"> and action = #{action}</if>
             <if test="deadline != null "> and deadline = #{deadline}</if>
             <if test="status != null  and status != ''"> and d.status = #{status}</if>
@@ -83,6 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="meetingId != null">meeting_id,</if>
             <if test="isHis != null">is_his,</if>
             <if test="isPerson != null">is_person,</if>
+            <if test="position != null">position,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -102,6 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="meetingId != null">#{meetingId},</if>
             <if test="isHis != null">#{isHis},</if>
             <if test="isPerson != null">#{isPerson},</if>
+            <if test="position != null">#{position},</if>
          </trim>
     </insert>
 
@@ -124,6 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="meetingId != null">meeting_id = #{meetingId},</if>
             <if test="isHis != null">is_his = #{isHis},</if>
             <if test="isPerson != null">is_person = #{isPerson},</if>
+            <if test="position != null">position = #{position},</if>
         </trim>
         where id = #{id}
     </update>

+ 6 - 2
master/src/main/resources/mybatis/plant/TMtKeymaintenanceMapper.xml

@@ -23,17 +23,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="isHis"    column="is_his"    />
         <result property="deptName" column="dept_name" />
         <result property="isPerson"    column="is_person"    />
+        <result property="position" column="position" />
     </resultMap>
 
     <sql id="selectTMtKeymaintenanceVo">
-        select d.id, d.plant_code, d.is_person,d.responsible, d.action, d.deadline, d.status, d.inputdate, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.meeting_id, d.is_his ,s.dept_name from t_mt_keymaintenance d
+        select d.id, d.plant_code,d.position, d.is_person,d.responsible, d.action, d.deadline, d.status, d.inputdate, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.meeting_id, d.is_his ,s.dept_name from t_mt_keymaintenance d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
     <select id="selectTMtKeymaintenanceList" parameterType="TMtKeymaintenance" resultMap="TMtKeymaintenanceResult">
         <include refid="selectTMtKeymaintenanceVo"/>
         <where>
-            <if test="responsible != null  and responsible != ''"> and (responsible = #{responsible} or  is_person = '2' )</if>
+            <if test="responsible != null  and responsible != ''"> and responsible like concat(concat('%', #{responsible}), '%')</if>
             <if test="deadline != null "> and deadline = #{deadline}</if>
             <if test="status != null  and status != ''"> and d.status = #{status}</if>
             <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
@@ -73,6 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="meetingId != null">meeting_id,</if>
             <if test="isHis != null">is_his,</if>
             <if test="isPerson != null">is_person,</if>
+            <if test="position != null">position,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -92,6 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="meetingId != null">#{meetingId},</if>
             <if test="isHis != null">#{isHis},</if>
             <if test="isPerson != null">#{isPerson},</if>
+            <if test="position != null">#{position},</if>
          </trim>
     </insert>
 
@@ -114,6 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="meetingId != null">meeting_id = #{meetingId},</if>
             <if test="isHis != null">is_his = #{isHis},</if>
             <if test="isPerson != null">is_person = #{isPerson},</if>
+            <if test="position != null">position = #{position},</if>
         </trim>
         where id = #{id}
     </update>

+ 6 - 3
master/src/main/resources/mybatis/plant/TMtMessageattentionMapper.xml

@@ -23,17 +23,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="isHis"    column="is_his"    />
         <result property="deptName" column="dept_name" />
         <result property="isPerson"    column="is_person"    />
+        <result property="position" column="position" />
     </resultMap>
 
     <sql id="selectTMtMessageattentionVo">
-        select d.id, d.plant_code, d.is_person,d.responsible, d.action, d.deadline, d.status, d.inputdate, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks ,s.dept_name from t_mt_messageattention d
+        select d.id, d.plant_code,d.position, d.is_person,d.responsible, d.action, d.deadline, d.status, d.inputdate, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks ,s.dept_name from t_mt_messageattention d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
     <select id="selectTMtMessageattentionList" parameterType="TMtMessageattention" resultMap="TMtMessageattentionResult">
         <include refid="selectTMtMessageattentionVo"/>
         <where>
-            <if test="responsible != null  and responsible != ''"> and (responsible = #{responsible} or  is_person = '2' )</if>
+            <if test="responsible != null  and responsible != ''"> and responsible like concat(concat('%', #{responsible}), '%')</if>
             <if test="action != null  and action != ''"> and action like concat(concat('%', #{action}), '%')</if>
             <if test="deadline != null  and deadline != ''"> and deadline = #{deadline}</if>
             <if test="status != null  and status != ''"> and status = #{status}</if>
@@ -73,6 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="meetingId != null">meeting_id,</if>
             <if test="isHis != null">is_his,</if>
             <if test="isPerson != null">is_person,</if>
+            <if test="position != null">position,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -92,7 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="meetingId != null">#{meetingId},</if>
             <if test="isHis != null">#{isHis},</if>
             <if test="isPerson != null">#{isPerson},</if>
-
+            <if test="position != null">#{position},</if>
          </trim>
     </insert>
 
@@ -115,6 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="meetingId != null">meeting_id = #{meetingId},</if>
             <if test="isHis != null">is_his = #{isHis},</if>
             <if test="isPerson != null">is_person = #{isPerson},</if>
+            <if test="position != null">position = #{position},</if>
         </trim>
         where id = #{id}
     </update>

+ 21 - 1
master/src/main/resources/mybatis/plant/TStaffmgrMapper.xml

@@ -81,9 +81,10 @@
     <select id="selectTStaffmgrListByDeptAndTeam" parameterType="TStaffmgr" resultMap="TStaffmgrResult">
         select u.user_id, d.id, d.plant_code,d.left_date, d.staffid, d.name, d.photo, d.sex, d.birthday, d.unit, d.team, d.actualpost, d.contact, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.education, d.en_ability, d.accident_num, d.mail, d.skill_score, d.p_id , d.special_duty, d.region, s.dept_name from t_staffmgr d
         left join sys_dept s on s.dept_id = d.dept_id
-        inner join sys_user u on d.staffid = u.staffid
+        inner join sys_user u on d.staffid = u.staffid and u.del_flag = 0
         <where>
             <if test="deptId != null and deptId != ''"> and d.unit = #{deptId} </if>
+            <if test="unit != null and unit != ''"> and d.dept_id = #{unit} </if>
             <if test="team != null  and team != ''"> and d.team = #{team} </if>
             and d.del_flag = 0
         </where>
@@ -180,6 +181,25 @@
         ORDER BY s0.DICT_SORT, s1.DICT_SORT ,s.DICT_SORT , d.staffid
     </select>
 
+
+    <select id="selectTStaffmgrListByDeptId" parameterType="TStaffmgr" resultMap="TStaffmgrResult">
+        <include refid="selectTStaffmgrVo"/>
+
+        <where>
+            <if test="actualpost != null  and actualpost != ''"> and actualpost = #{actualpost}</if>
+            <if test="actualposts != null  and actualposts != ''">
+                and
+                actualpost in
+                <foreach collection="actualposts.split(',')" item="item" index="index"
+                         open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </if>
+            <if test="deptId != null and deptId != ''"> and d.dept_id = #{deptId} </if>
+            and d.del_flag = 0
+        </where>
+    </select>
+
     <select id="selectAllTStaffmgrList" parameterType="TStaffmgr" resultMap="TStaffmgrResult">
         <include refid="selectTStaffmgrVo"/>
         Left join SYS_DICT_DATA s0 on d.UNIT = s0.DICT_VALUE and s0.DICT_TYPE ='STAFF_UNIT'

+ 1 - 7
master/src/main/resources/mybatis/sems/TSpecdevCcMapper.xml

@@ -372,13 +372,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                  open="(" close=")" separator=",">
             #{plant}
         </foreach>
-        <if test="unitIds.size() > 0">
-            and t.unit in
-            <foreach collection="unitIds" item="unitId" index="index"
-                     open="(" close=")" separator=",">
-                #{unitId}
-            </foreach>
-        </if>
+
         GROUP BY to_char(t.NEXT_WARN_DATE,'yyyyMM')
     </select>
 

+ 0 - 7
master/src/main/resources/mybatis/sems/TSpecdevDtMapper.xml

@@ -331,13 +331,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                  open="(" close=")" separator=",">
             #{plant}
         </foreach>
-        <if test="unitIds.size() > 0">
-            and t.unit in
-            <foreach collection="unitIds" item="unitId" index="index"
-                     open="(" close=")" separator=",">
-                #{unitId}
-            </foreach>
-        </if>
         GROUP BY to_char(t.NEXT_WARN_DATE,'yyyyMM')
     </select>
 

+ 0 - 7
master/src/main/resources/mybatis/sems/TSpecdevDzsbMapper.xml

@@ -321,13 +321,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                  open="(" close=")" separator=",">
             #{plant}
         </foreach>
-        <if test="unitIds.size() > 0">
-            and t.unit in
-            <foreach collection="unitIds" item="unitId" index="index"
-                     open="(" close=")" separator=",">
-                #{unitId}
-            </foreach>
-        </if>
         GROUP BY to_char(t.NEXT_WARN_DATE,'yyyyMM')
     </select>
 

+ 45 - 16
ui/src/views/components/meeting/actionlist.vue

@@ -121,14 +121,14 @@
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
-            v-if="checkPermi(['plant:meeting:edit']) || scope.row.responsible == getStaffId()"
+            v-if="checkPermi(['plant:meeting:edit']) || getStaffId(scope.row.responsible)"
           >{{ $t('修改') }}</el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
-            v-if="checkPermi(['plant:meeting:remove']) || scope.row.responsible == getStaffId()"
+            v-if="checkPermi(['plant:meeting:remove']) || getStaffId(scope.row.responsible)"
           >{{ $t('删除') }}</el-button>
         </template>
       </el-table-column>
@@ -143,24 +143,30 @@
     />
 
     <!-- 添加或修改装置会议执行对话框 -->
-    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="title" :visible.sync="open" width="700px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
 
         <el-form-item :label="$t('责任人')" prop="responsible">
-          <el-select v-if="form.isPerson == '1' " style="width: 150px" v-model="form.responsible" filterable :placeholder="$t('请选择') + $t('负责人姓名')" filterable >
+          <el-select v-if="form.isPerson == '1' " multiple style="width: 220px" v-model="respList" filterable :placeholder="$t('请选择') + $t('负责人姓名')" filterable >
             <el-option
               v-for="dict in stffmgrOptions"
-              :key="dict.userId"
-              :label="dict.nickName"
-              :value="dict.staffId">
-              <span style="float: left">{{ dict.nickName }}</span>
+              :key="dict.id"
+              :label="dict.name"
+              :value="dict.staffid">
+              <span style="float: left">{{ dict.name }}</span>
               <span style="float: right; color: #8492a6; font-size: 13px">{{ dict.staffid }}</span>
             </el-option>
           </el-select>
-          <el-input v-else v-model="form.responsible"  style="width: 150px" :placeholder="$t('请输入') + $t('负责人姓名')" />
-
-          <el-checkbox style="margin-left: 50px" true-label="1" false-label="2" v-model="form.isPerson">指定责任人</el-checkbox>
-
+          <el-select v-else style="width: 220px" multiple v-model="positionList" filterable placeholder="请选择岗位" filterable >
+            <el-option
+              v-for="dict in actualpostOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            />
+          </el-select>
+            <el-radio @change="changeIsPerson"  style="margin-left: 50px" v-model="form.isPerson" label="1">指定人员</el-radio>
+            <el-radio @change="changeIsPerson" v-model="form.isPerson" label="2">指定岗位</el-radio>
         </el-form-item>
         <el-form-item :label="$t('行动')" prop="action">
           <el-input v-model="form.action" :placeholder="$t('请输入') + $t('行动')" />
@@ -264,6 +270,7 @@
     updateActionlist
   } from "@/api/plant/actionlist";
   import {treeselect} from "@/api/system/dept";
+  import {listStaffmgrByDeptAndTeam} from "@/api/plant/staffmgr";
   import {getToken} from "@/utils/auth";
   import Treeselect from "@riophae/vue-treeselect";
   import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -303,6 +310,9 @@
       // 装置字典
       plantCodeOptions: [],
       stffmgrOptions: [],
+      actualpostOptions: [],
+      respList: [],
+      positionList: [],
       // 状态字典
       statusOptions: [],
         // 用户导入参数
@@ -364,6 +374,9 @@
     this.getDicts("ACTION_STATUS").then(response => {
       this.statusOptions = response.data;
     });
+    this.getDicts("ACTUALPOST").then(response => {
+      this.actualpostOptions = response.data;
+    });
   },
   methods: {
     /** 查询装置会议执行列表 */
@@ -375,14 +388,19 @@
         this.loading = false;
       });
     },
-    getStaffId(){
-      return this.$store.state.user.staffId
+    getStaffId(resp){
+      return resp.includes(this.$store.state.user.staffId)
     },
     //获取人员表
     getStaffmar() {
-      listPostUser(this.queryParams).then(response => {
-        this.stffmgrOptions = response;
+      let param = {unit: '103'}
+      listStaffmgrByDeptAndTeam(param).then(response => {
+        this.stffmgrOptions = response.rows;
       });
+    },
+    changeIsPerson(){
+      this.respList = []
+      this.positionList = []
     },
      /** 查询部门下拉树结构 */
      getTreeselect() {
@@ -423,7 +441,10 @@
         meetingId: null,
         isHis: null,
         isPerson: '1',
+        position: null,
       };
+      this.respList = []
+      this.positionList = []
       this.resetForm("form");
     },
     /** 搜索按钮操作 */
@@ -458,6 +479,12 @@
       const id = row.id || this.ids
       getActionlist(id).then(response => {
         this.form = response.data;
+        if (response.data.responsible){
+          this.respList = response.data.responsible.split(",")
+        }
+        if (response.data.position) {
+          this.positionList = response.data.position.split(",")
+        }
         this.open = true;
         this.title = this.$t('修改')  + this.$t('装置会议执行');
       });
@@ -466,6 +493,8 @@
     submitForm() {
       this.$refs["form"].validate(valid => {
         if (valid) {
+          this.form.responsible = this.respList.join(",")
+          this.form.position = this.positionList.join(",")
           if (this.form.id != null) {
             updateActionlist(this.form).then(response => {
               this.msgSuccess(this.$t('修改成功'));

+ 43 - 16
ui/src/views/components/meeting/keymaintenance.vue

@@ -112,14 +112,14 @@
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
-            v-if="checkPermi(['plant:meeting:edit']) || scope.row.responsible == getStaffId()"
+            v-if="checkPermi(['plant:meeting:edit']) || getStaffId(scope.row.responsible)"
           >{{ $t('修改') }}</el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
-            v-if="checkPermi(['plant:meeting:remove']) || scope.row.responsible == getStaffId()"
+            v-if="checkPermi(['plant:meeting:edit']) || getStaffId(scope.row.responsible)"
 
           >{{ $t('删除') }}</el-button>
         </template>
@@ -139,20 +139,26 @@
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
 
         <el-form-item :label="$t('责任人')" prop="responsible">
-          <el-select v-if="form.isPerson == '1' " style="width: 150px" v-model="form.responsible" filterable :placeholder="$t('请选择') + $t('负责人姓名')" filterable >
+          <el-select v-if="form.isPerson == '1' " multiple style="width: 220px" v-model="respList" filterable :placeholder="$t('请选择') + $t('负责人姓名')" filterable >
             <el-option
               v-for="dict in stffmgrOptions"
-              :key="dict.userId"
-              :label="dict.nickName"
-              :value="dict.staffId">
-              <span style="float: left">{{ dict.nickName }}</span>
+              :key="dict.id"
+              :label="dict.name"
+              :value="dict.staffid">
+              <span style="float: left">{{ dict.name }}</span>
               <span style="float: right; color: #8492a6; font-size: 13px">{{ dict.staffid }}</span>
             </el-option>
           </el-select>
-          <el-input v-else v-model="form.responsible"  style="width: 150px" :placeholder="$t('请输入') + $t('负责人姓名')" />
-
-          <el-checkbox style="margin-left: 50px" true-label="1" false-label="2" v-model="form.isPerson">指定责任人</el-checkbox>
-
+          <el-select v-else style="width: 220px" multiple v-model="positionList" filterable placeholder="请选择岗位" filterable >
+            <el-option
+              v-for="dict in actualpostOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            />
+          </el-select>
+          <el-radio @change="changeIsPerson"  style="margin-left: 50px" v-model="form.isPerson" label="1">指定人员</el-radio>
+          <el-radio @change="changeIsPerson" v-model="form.isPerson" label="2">指定岗位</el-radio>
         </el-form-item>
         <el-form-item :label="$t('行动')" prop="action">
           <el-input v-model="form.action" :placeholder="$t('请输入') + $t('行动')" />
@@ -257,7 +263,7 @@
   import {treeselect} from "@/api/system/dept";
   import {getToken} from "@/utils/auth";
   import {checkPermi} from "@/utils/permission";
-
+  import {listStaffmgrByDeptAndTeam} from "@/api/plant/staffmgr";
   import Treeselect from "@riophae/vue-treeselect";
   import "@riophae/vue-treeselect/dist/vue-treeselect.css";
   import KeyStatusData from "./keyStatusData";
@@ -285,6 +291,8 @@
       total: 0,
       // 下周关键维修工作表格数据
       keymaintenanceList: [],
+      respList: [],
+      positionList: [],
       // 弹出层标题
       title: "",
       // 部门树选项
@@ -296,6 +304,7 @@
       plantCodeOptions: [],
       // 状态字典
       statusOptions: [],
+      actualpostOptions: [],
         // 用户导入参数
         upload: {
             // 是否显示弹出层(用户导入)
@@ -358,6 +367,9 @@
     this.getDicts("ACTION_STATUS").then(response => {
       this.statusOptions = response.data;
     });
+    this.getDicts("ACTUALPOST").then(response => {
+      this.actualpostOptions = response.data;
+    });
   },
   methods: {
     /** 查询下周关键维修工作列表 */
@@ -369,14 +381,19 @@
         this.loading = false;
       });
     },
-    getStaffId(){
-      return this.$store.state.user.staffId
+    getStaffId(resp){
+      return resp.includes(this.$store.state.user.staffId)
     },
     //获取人员表
     getStaffmar() {
-      listPostUser(this.queryParams).then(response => {
-        this.stffmgrOptions = response;
+      let param = {unit: '103'}
+      listStaffmgrByDeptAndTeam(param).then(response => {
+        this.stffmgrOptions = response.rows;
       });
+    },
+    changeIsPerson(){
+      this.respList = []
+      this.positionList = []
     },
      /** 查询部门下拉树结构 */
      getTreeselect() {
@@ -418,6 +435,8 @@
         isHis: null,
         isPerson: '1',
       };
+      this.respList = []
+      this.positionList = []
       this.resetForm("form");
     },
     /** 搜索按钮操作 */
@@ -452,6 +471,12 @@
       const id = row.id || this.ids
       getKeymaintenance(id).then(response => {
         this.form = response.data;
+        if (response.data.responsible){
+          this.respList = response.data.responsible.split(",")
+        }
+        if (response.data.position) {
+          this.positionList = response.data.position.split(",")
+        }
         this.open = true;
         this.title = this.$t('修改') + this.$t('下周关键维修工作');
       });
@@ -460,6 +485,8 @@
     submitForm() {
       this.$refs["form"].validate(valid => {
         if (valid) {
+          this.form.responsible = this.respList.join(",")
+          this.form.position = this.positionList.join(",")
           if (this.form.id != null) {
             updateKeymaintenance(this.form).then(response => {
               this.msgSuccess(this.$t('修改成功'));

+ 44 - 15
ui/src/views/components/meeting/messageattention.vue

@@ -52,7 +52,7 @@
           size="mini"
           :disabled="single"
           @click="handleUpdate"
-          v-if="checkPermi(['plant:meeting:edit']) || scope.row.responsible == getStaffId()"
+          v-if="checkPermi(['plant:meeting:edit']) || getStaffId(scope.row.responsible)"
         >{{ $t('修改') }}</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -62,7 +62,7 @@
           size="mini"
           :disabled="multiple"
           @click="handleDelete"
-          v-hasPermi="['plant:meeting:remove']"
+          v-if="checkPermi(['plant:meeting:edit']) || getStaffId(scope.row.responsible)"
         >{{ $t('删除') }}</el-button>
       </el-col>
 	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@@ -119,20 +119,26 @@
     <el-dialog  :close-on-click-modal="false" v-dialogDrag :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="$t('责任人')" prop="responsible">
-          <el-select v-if="form.isPerson == '1' " style="width: 150px" v-model="form.responsible" filterable :placeholder="$t('请选择') + $t('负责人姓名')" filterable >
+          <el-select v-if="form.isPerson == '1' " multiple style="width: 220px" v-model="respList" filterable :placeholder="$t('请选择') + $t('负责人姓名')" filterable >
             <el-option
               v-for="dict in stffmgrOptions"
-              :key="dict.userId"
-              :label="dict.nickName"
-              :value="dict.staffId">
-              <span style="float: left">{{ dict.nickName }}</span>
+              :key="dict.id"
+              :label="dict.name"
+              :value="dict.staffid">
+              <span style="float: left">{{ dict.name }}</span>
               <span style="float: right; color: #8492a6; font-size: 13px">{{ dict.staffid }}</span>
             </el-option>
           </el-select>
-          <el-input v-else v-model="form.responsible"  style="width: 150px" :placeholder="$t('请输入') + $t('负责人姓名')" />
-
-          <el-checkbox style="margin-left: 50px" true-label="1" false-label="2" v-model="form.isPerson">指定责任人</el-checkbox>
-
+          <el-select v-else style="width: 220px" multiple v-model="positionList" filterable placeholder="请选择岗位" filterable >
+            <el-option
+              v-for="dict in actualpostOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            />
+          </el-select>
+          <el-radio @change="changeIsPerson"  style="margin-left: 50px" v-model="form.isPerson" label="1">指定人员</el-radio>
+          <el-radio @change="changeIsPerson" v-model="form.isPerson" label="2">指定岗位</el-radio>
         </el-form-item>
         <el-form-item :label="$t('行动')" prop="action">
           <el-input v-model="form.action" :placeholder="$t('请输入') + $t('行动')" />
@@ -217,6 +223,8 @@
   import "@riophae/vue-treeselect/dist/vue-treeselect.css";
   import {checkPermi} from "@/utils/permission";
   import {listPostUser} from "@/api/system/user";
+  import {listStaffmgrByDeptAndTeam} from "@/api/plant/staffmgr";
+
 
   export default {
   name: "Messageattention",
@@ -247,6 +255,9 @@
       // 装置字典
       plantCodeOptions: [],
       stffmgrOptions: [],
+      actualpostOptions: [],
+      respList: [],
+      positionList: [],
       // 状态字典
       statusOptions: [],
         // 用户导入参数
@@ -307,6 +318,9 @@
     this.getDicts("ACTION_STATUS").then(response => {
       this.statusOptions = response.data;
     });
+    this.getDicts("ACTUALPOST").then(response => {
+      this.actualpostOptions = response.data;
+    });
   },
   methods: {
     /** 查询信息提醒列表 */
@@ -332,15 +346,20 @@
     statusFormat(row, column) {
       return this.selectDictLabel(this.statusOptions, row.status);
     },
-    getStaffId(){
-      return this.$store.state.user.staffId
+    getStaffId(resp){
+      return resp.includes(this.$store.state.user.staffId)
     },
     //获取人员表
     getStaffmar() {
-      listPostUser(this.queryParams).then(response => {
-        this.stffmgrOptions = response;
+      let param = {unit: '103'}
+      listStaffmgrByDeptAndTeam(param).then(response => {
+        this.stffmgrOptions = response.rows;
       });
     },
+    changeIsPerson(){
+      this.respList = []
+      this.positionList = []
+    },
     // 取消按钮
     cancel() {
       this.open = false;
@@ -366,6 +385,8 @@
         isHis: null,
         isPerson: '1',
       };
+      this.respList = []
+      this.positionList = []
       this.resetForm("form");
     },
     /** 搜索按钮操作 */
@@ -400,6 +421,12 @@
       const id = row.id || this.ids
       getMessageattention(id).then(response => {
         this.form = response.data;
+        if (response.data.responsible){
+          this.respList = response.data.responsible.split(",")
+        }
+        if (response.data.position) {
+          this.positionList = response.data.position.split(",")
+        }
         this.open = true;
         this.title = this.$t('修改')  + this.$t('信息提醒');
       });
@@ -408,6 +435,8 @@
     submitForm() {
       this.$refs["form"].validate(valid => {
         if (valid) {
+          this.form.responsible = this.respList.join(",")
+          this.form.position = this.positionList.join(",")
           if (this.form.id != null) {
             updateMessageattention(this.form).then(response => {
               this.msgSuccess(this.$t('修改成功'));