ly hace 3 años
padre
commit
1c59b2fbc4

+ 13 - 0
master/src/main/java/com/ruoyi/project/plant/controller/TStaffmgrController.java

@@ -135,6 +135,19 @@ public class TStaffmgrController extends BaseController
         return AjaxResult.success(tStaffmgrService.selectMentorList(tStaffmgr));
     }
 
+    /**
+     * 查询人员管理列表--包含离职人员
+     */
+    @GetMapping("/listAll")
+    public TableDataInfo listAll(TStaffmgr tStaffmgr)
+    {
+        ServletUtils.getParameter("sexs");
+        startPage();
+        logger.info("staffmgr:" + tStaffmgr);
+        List<TStaffmgr> list = tStaffmgrMapper.selectTStaffmgrListAll(tStaffmgr);
+        return getDataTable(list);
+    }
+
     /**
      * 查询人员管理列表
      */

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

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

+ 12 - 0
master/src/main/resources/mybatis/plant/TStaffmgrMapper.xml

@@ -124,6 +124,18 @@
         ORDER BY s0.DICT_SORT, s1.DICT_SORT ,s.DICT_SORT
     </select>
 
+
+    <select id="selectTStaffmgrListAll" 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'
+        LEFT JOIN SYS_DICT_DATA s on d.ACTUALPOST = s.DICT_VALUE and s.DICT_TYPE = 'ACTUALPOST'
+        LEFT JOIN SYS_DICT_DATA s1 on d.team = s1.DICT_VALUE and s1.DICT_TYPE = 'TEAM_DIVIDE'
+        <where>
+            and d.del_flag in (0 , 9)
+        </where>
+        ORDER BY s0.DICT_SORT, s1.DICT_SORT ,s.DICT_SORT
+    </select>
+
     <select id="selectRecordList" parameterType="TStaffmgr" resultMap="TStaffmgrResult">
         <include refid="selectTStaffmgrVo"/>
         LEFT JOIN SYS_DICT_DATA s on d.ACTUALPOST = s.DICT_VALUE and s.DICT_TYPE = 'ACTUALPOST'

+ 9 - 0
ui/src/api/plant/staffmgr.js

@@ -34,6 +34,15 @@ export function listStaffmgr(query) {
   })
 }
 
+// 查询人员管理列表
+export function listStaffmgrAll(query) {
+  return request({
+    url: '/plant/staffmgr/listAll',
+    method: 'get',
+    params: query
+  })
+}
+
 // 查询人员公司级培训时间列表
 export function selectTimeStaffmgr(query) {
   return request({

+ 11 - 2
ui/src/views/training/training/index.vue

@@ -518,7 +518,7 @@
 import { listTraining, getTraining, delTraining, addTraining, updateTraining, exportTraining } from "@/api/training/training";
 import nonAdd from './trainingNon'
 import newAdd from './trainingNew'
-import { listStaffmgr } from "@/api/plant/staffmgr";
+import {listStaffmgrAll, listStaffmgr } from "@/api/plant/staffmgr";
 import { treeselect } from "@/api/system/dept";
 import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
@@ -579,6 +579,8 @@ export default {
       haveDesignated: '',
       //人员表联查
       stffmgrOptions: undefined,
+      //人员表联查-包含离职
+      stffmgrAllOptions: undefined,
       // 用户导入参数
       upload: {
         downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
@@ -735,6 +737,7 @@ export default {
    },
   created() {
     this.getStaffmar();
+    this.getStaffmarAll();
     //设置表格高度对应屏幕高度
     this.$nextTick(() => {
       this.clientHeight = (document.body.clientHeight - 80) * 0.8
@@ -801,7 +804,7 @@ export default {
           if (value.trainer != null) {
             let staffId = value.trainer.split(",");
             staffId.forEach(function (id, index) {
-              _this.stffmgrOptions.forEach(function (item) {
+              _this.stffmgrAllOptions.forEach(function (item) {
                 if (item.staffid === id) {
                   if (index === 0) {
                     parentName = item.name
@@ -860,6 +863,12 @@ export default {
     getStaffmar() {
       listStaffmgr(this.staffmgrQueryParams).then(response => {
         this.stffmgrOptions = response.rows;
+      });
+    },
+    //获取人员表--包含离职
+    getStaffmarAll() {
+      listStaffmgrAll(this.staffmgrQueryParams).then(response => {
+        this.stffmgrAllOptions = response.rows;
         this.getList();
       });
     },