浏览代码

部门树更新

lamphua 3 周前
父节点
当前提交
e252ea0480

+ 3
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java 查看文件

81
         if (user.getDeptId() != null && user.getDeptId() == 103L) {
81
         if (user.getDeptId() != null && user.getDeptId() == 103L) {
82
             list = postService.selectGmAssistant(user);
82
             list = postService.selectGmAssistant(user);
83
         }
83
         }
84
+        if (user.getDeptId() != null && user.getDeptId() == 115L) {
85
+            list.addAll(postService.selectDispatch(user));
86
+        }
84
         for (SysUser sysUser : list) {
87
         for (SysUser sysUser : list) {
85
             StringBuilder postName = new StringBuilder();
88
             StringBuilder postName = new StringBuilder();
86
             List<Long> userPostList = postService.selectPostListByUserId(sysUser.getUserId());
89
             List<Long> userPostList = postService.selectPostListByUserId(sysUser.getUserId());

+ 6
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/system/domain/TreeSelectNew.java 查看文件

55
         SysUser gmAssistant = new SysUser();
55
         SysUser gmAssistant = new SysUser();
56
         gmAssistant.setStatus("0");
56
         gmAssistant.setStatus("0");
57
         List<SysUser> gmAssistantList = userPostMapper.selectGmAssistant(gmAssistant);
57
         List<SysUser> gmAssistantList = userPostMapper.selectGmAssistant(gmAssistant);
58
+        SysUser dispatch = new SysUser();
59
+        dispatch.setStatus("0");
60
+        List<SysUser> dispatchList = userPostMapper.selectDispatch(dispatch);
58
         if (dept.getDeptId() == 101L) {
61
         if (dept.getDeptId() == 101L) {
59
             list.addAll(dsSecretaryList);
62
             list.addAll(dsSecretaryList);
60
         }
63
         }
64
         if (dept.getDeptId() == 103L) {
67
         if (dept.getDeptId() == 103L) {
65
             list = gmAssistantList;
68
             list = gmAssistantList;
66
         }
69
         }
70
+        if (dept.getDeptId() == 115L) {
71
+            list.addAll(dispatchList);
72
+        }
67
         String count = "(" + (list == null ? 0 : list.size()) + ")";
73
         String count = "(" + (list == null ? 0 : list.size()) + ")";
68
         this.label = dept.getDeptName() + count;
74
         this.label = dept.getDeptName() + count;
69
         this.children = dept.getChildren().stream().map(TreeSelectNew::new).collect(Collectors.toList());
75
         this.children = dept.getChildren().stream().map(TreeSelectNew::new).collect(Collectors.toList());

+ 8
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java 查看文件

68
      */
68
      */
69
     public List<SysUser> selectDsSecretary(SysUser user);
69
     public List<SysUser> selectDsSecretary(SysUser user);
70
 
70
 
71
+    /**
72
+     * 查询德方派遣员工集合
73
+     *
74
+     * @param
75
+     * @return 德方派遣员工列表
76
+     */
77
+    public List<SysUser> selectDispatch(SysUser user);
78
+
71
     /**
79
     /**
72
      * 根据岗位查询用户
80
      * 根据岗位查询用户
73
      *
81
      *

+ 8
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysPostService.java 查看文件

124
      */
124
      */
125
     public List<SysUser> selectDsSecretary(SysUser user);
125
     public List<SysUser> selectDsSecretary(SysUser user);
126
 
126
 
127
+    /**
128
+     * 查询德方派遣员工集合
129
+     *
130
+     * @param
131
+     * @return 德方派遣员工列表
132
+     */
133
+    public List<SysUser> selectDispatch(SysUser user);
134
+
127
     /**
135
     /**
128
      * 根据岗位查询用户
136
      * 根据岗位查询用户
129
      *
137
      *

+ 11
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPostServiceImpl.java 查看文件

211
         return userPostMapper.selectDsSecretary(user);
211
         return userPostMapper.selectDsSecretary(user);
212
     }
212
     }
213
 
213
 
214
+    /**
215
+     * 查询德方派遣员工集合
216
+     *
217
+     * @param
218
+     * @return 德方派遣员工列表
219
+     */
220
+    @Override
221
+    public List<SysUser> selectDispatch(SysUser user) {
222
+        return userPostMapper.selectDispatch(user);
223
+    }
224
+
214
     /**
225
     /**
215
      * 根据岗位查询用户
226
      * 根据岗位查询用户
216
      *
227
      *

+ 31
- 0
oa-back/ruoyi-system/src/main/resources/mapper/system/SysUserPostMapper.xml 查看文件

96
 		</if>
96
 		</if>
97
 	</select>
97
 	</select>
98
 
98
 
99
+	<select id="selectDispatch" parameterType="SysUser" resultMap="SysUserResult">
100
+		select u.*, d.dept_name
101
+		from sys_user u
102
+		left join sys_dept d on u.dept_id = d.dept_id
103
+		where u.remark like '%德方%'
104
+		<if test="userId != null and userId != 0">
105
+			AND u.user_id = #{userId}
106
+		</if>
107
+		<if test="userName != null and userName != ''">
108
+			AND u.user_name like concat('%', #{userName}, '%')
109
+		</if>
110
+		<if test="nickName != null and nickName != ''">
111
+			AND u.nick_name like concat('%', #{nickName}, '%')
112
+		</if>
113
+		<if test="status != null and status != ''">
114
+			AND u.status = #{status}
115
+		</if>
116
+		<if test="phonenumber != null and phonenumber != ''">
117
+			AND u.phonenumber like concat('%', #{phonenumber}, '%')
118
+		</if>
119
+		<if test="degree != null and degree != ''">
120
+			AND u.degree = #{degree}
121
+		</if>
122
+		<if test="titles != null and titles != ''">
123
+			AND find_in_set(#{titles}, u.titles)
124
+		</if>
125
+		<if test="certificates != null and certificates != ''">
126
+			AND find_in_set(#{certificates}, u.certificates)
127
+		</if>
128
+	</select>
129
+
99
 	<select id="selectGmAssistant" parameterType="SysUser" resultMap="SysUserResult">
130
 	<select id="selectGmAssistant" parameterType="SysUser" resultMap="SysUserResult">
100
 		select u.*, d.dept_name
131
 		select u.*, d.dept_name
101
 		from sys_user u
132
 		from sys_user u

+ 1
- 1
oa-ui-app/main.js 查看文件

19
 // 创建全局的 publicData 对象
19
 // 创建全局的 publicData 对象
20
 Vue.prototype.publicData = {
20
 Vue.prototype.publicData = {
21
   partySecretary: 4, // 党委书记
21
   partySecretary: 4, // 党委书记
22
-  leagueSecretary: 15, // 团书记
22
+  leagueSecretary: 15, // 团支部书记
23
   gm: 7, //总经理
23
   gm: 7, //总经理
24
   chairman: 2,//董事长
24
   chairman: 2,//董事长
25
   zg: 9,
25
   zg: 9,

+ 3
- 0
oa-ui/src/views/oa/staff/index.vue 查看文件

171
             </template>
171
             </template>
172
           </el-table-column>
172
           </el-table-column>
173
 
173
 
174
+          <el-table-column label="备注" align="center" key="remark" prop="remark" v-if="columns[22].visible"
175
+            :show-overflow-tooltip="true"></el-table-column>
174
           <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
176
           <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
175
             <template slot-scope="scope" v-if="scope.row.userId !== 1">
177
             <template slot-scope="scope" v-if="scope.row.userId !== 1">
176
               <el-button size="mini" type="text" icon="el-icon-view" v-hasPermi="['system:user:query']"
178
               <el-button size="mini" type="text" icon="el-icon-view" v-hasPermi="['system:user:query']"
488
         { key: 19, label: `初始学历`, visible: false },
490
         { key: 19, label: `初始学历`, visible: false },
489
         { key: 20, label: `初始学历专业`, visible: false },
491
         { key: 20, label: `初始学历专业`, visible: false },
490
         { key: 21, label: `初始学历毕业院校`, visible: false },
492
         { key: 21, label: `初始学历毕业院校`, visible: false },
493
+        { key: 22, label: `备注`, visible: false },
491
       ],
494
       ],
492
       // 表单校验
495
       // 表单校验
493
       rules: {
496
       rules: {

+ 8
- 1
oa-ui/src/views/oa/staff/info.vue 查看文件

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2024-03-22 14:50:46
3
  * @Date: 2024-03-22 14:50:46
4
  * @LastEditors: wrh
4
  * @LastEditors: wrh
5
- * @LastEditTime: 2025-05-19 16:50:50
5
+ * @LastEditTime: 2025-11-18 15:52:46
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div class="bg" v-loading="loading">
8
   <div class="bg" v-loading="loading">
89
           </div>
89
           </div>
90
           <div>{{ form.contact + form.telephone }}</div>
90
           <div>{{ form.contact + form.telephone }}</div>
91
         </div>
91
         </div>
92
+        <div class="info-item">
93
+          <div class="item-label">
94
+            <svg-icon icon-class="log" class="info-icon"></svg-icon>
95
+            <div class="item-label">备注:</div>
96
+          </div>
97
+          <div>{{ form.remark }}</div>
98
+        </div>
92
       </el-col>
99
       </el-col>
93
       <el-col :span="15" class="stateInfo">
100
       <el-col :span="15" class="stateInfo">
94
         <el-tabs v-model="activeName" @tab-click="handleClick">
101
         <el-tabs v-model="activeName" @tab-click="handleClick">

正在加载...
取消
保存