Explorar el Código

人员列表更新

lamphua hace 1 semana
padre
commit
194b2b772b

+ 40
- 3
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java Ver fichero

71
     {
71
     {
72
         startPage();
72
         startPage();
73
         List<SysUser> list = userService.selectUserList(user);
73
         List<SysUser> list = userService.selectUserList(user);
74
+        // 如果指定了部门ID,根据备注中的部门信息添加用户
75
+        if (user.getDeptId() != null) {
76
+            SysDept dept = deptService.selectDeptById(user.getDeptId());
77
+            if (dept != null) {
78
+                // 查询所有用户
79
+                SysUser allUser = user;
80
+                allUser.setDeptId(null);
81
+                List<SysUser> allUsers = userService.selectUserList(allUser);
82
+                for (SysUser sysUser : allUsers) {
83
+                    // 检查用户备注中的部门信息
84
+                    if (sysUser.getRemark() != null) {
85
+                        String remark = sysUser.getRemark();
86
+                        // 提取备注中的部门信息
87
+                        if (remark.contains("隶属部门:" + dept.getDeptName()) || 
88
+                            remark.contains("合同部门:" + dept.getDeptName()) || 
89
+                            remark.contains("工作部门:" + dept.getDeptName())) {
90
+                            // 确保用户不重复添加
91
+                            if (!containsUser(list, sysUser)) {
92
+                                list.add(sysUser);
93
+                            }
94
+                        }
95
+                    }
96
+                }
97
+            }
98
+        }
74
         if (user.getDeptId() != null && user.getDeptId() == 101L) {
99
         if (user.getDeptId() != null && user.getDeptId() == 101L) {
75
             list.addAll(postService.selectDsSecretary(user));
100
             list.addAll(postService.selectDsSecretary(user));
76
         }
101
         }
80
         if (user.getDeptId() != null && user.getDeptId() == 103L) {
105
         if (user.getDeptId() != null && user.getDeptId() == 103L) {
81
             list = postService.selectGmAssistant(user);
106
             list = postService.selectGmAssistant(user);
82
         }
107
         }
83
-        if (user.getDeptId() != null && user.getDeptId() == 115L) {
84
-            list.addAll(postService.selectDispatch(user));
85
-        }
86
         for (SysUser sysUser : list) {
108
         for (SysUser sysUser : list) {
87
             StringBuilder postName = new StringBuilder();
109
             StringBuilder postName = new StringBuilder();
88
             List<Long> userPostList = postService.selectPostListByUserId(sysUser.getUserId());
110
             List<Long> userPostList = postService.selectPostListByUserId(sysUser.getUserId());
514
     {
536
     {
515
         return success(deptService.selectDeptTreeListNew(dept));
537
         return success(deptService.selectDeptTreeListNew(dept));
516
     }
538
     }
539
+
540
+    /**
541
+     * 检查列表中是否包含指定用户
542
+     */
543
+    private boolean containsUser(List<SysUser> userList, SysUser user) {
544
+        if (userList == null || user == null || user.getUserId() == null) {
545
+            return false;
546
+        }
547
+        for (SysUser existingUser : userList) {
548
+            if (existingUser.getUserId() != null && existingUser.getUserId().equals(user.getUserId())) {
549
+                return true;
550
+            }
551
+        }
552
+        return false;
553
+    }
517
 }
554
 }

+ 6
- 4
oa-back/ruoyi-llm/src/main/java/com/ruoyi/web/llm/service/impl/LangChainMilvusServiceImpl.java Ver fichero

84
         if (milvusServiceUrl == null || milvusServiceUrl.isEmpty()) {
84
         if (milvusServiceUrl == null || milvusServiceUrl.isEmpty()) {
85
             throw new IllegalArgumentException("milvusServiceUrl 配置不能为空");
85
             throw new IllegalArgumentException("milvusServiceUrl 配置不能为空");
86
         }
86
         }
87
-    //    milvusClient = new MilvusClientV2(
88
-    //            ConnectConfig.builder()
89
-    //                    .uri(milvusServiceUrl)
90
-    //                    .build());
87
+//        milvusClient = new MilvusClientV2(
88
+//                ConnectConfig.builder()
89
+//                        .uri(milvusServiceUrl)
90
+//                        .build());
91
     }
91
     }
92
     
92
     
93
     @PostConstruct
93
     @PostConstruct
158
                     fastjsonObj.put("file_name", file.getOriginalFilename());
158
                     fastjsonObj.put("file_name", file.getOriginalFilename());
159
                     String[] fileName = file.getOriginalFilename().split("\\.");
159
                     String[] fileName = file.getOriginalFilename().split("\\.");
160
                     fastjsonObj.put("file_type", fileName[fileName.length - 1]);
160
                     fastjsonObj.put("file_type", fileName[fileName.length - 1]);
161
+                    fastjsonObj.put("title", text.split("\n")[0]);
161
                     fastjsonObj.put("content", text);
162
                     fastjsonObj.put("content", text);
162
                     fastjsonObj.put("embedding", embeddingModel.embed(text).content().vectorAsList());
163
                     fastjsonObj.put("embedding", embeddingModel.embed(text).content().vectorAsList());
163
                     String jsonString = fastjsonObj.toJSONString();
164
                     String jsonString = fastjsonObj.toJSONString();
171
                     JSONObject titlesJsonObj = new JSONObject();
172
                     JSONObject titlesJsonObj = new JSONObject();
172
                     titlesJsonObj.put("file_name", file.getOriginalFilename());
173
                     titlesJsonObj.put("file_name", file.getOriginalFilename());
173
                     titlesJsonObj.put("file_type", "标题");
174
                     titlesJsonObj.put("file_type", "标题");
175
+                    titlesJsonObj.put("title", "");
174
                     titlesJsonObj.put("content", titlesContent);
176
                     titlesJsonObj.put("content", titlesContent);
175
                     titlesJsonObj.put("embedding", embeddingModel.embed(titlesContent).content().vectorAsList());
177
                     titlesJsonObj.put("embedding", embeddingModel.embed(titlesContent).content().vectorAsList());
176
                     String titlesJsonString = titlesJsonObj.toJSONString();
178
                     String titlesJsonString = titlesJsonObj.toJSONString();

+ 10
- 4
oa-back/ruoyi-llm/src/main/java/com/ruoyi/web/llm/service/impl/MilvusServiceImpl.java Ver fichero

35
         if (milvusServiceUrl == null || milvusServiceUrl.isEmpty()) {
35
         if (milvusServiceUrl == null || milvusServiceUrl.isEmpty()) {
36
             throw new IllegalArgumentException("milvusServiceUrl 配置不能为空");
36
             throw new IllegalArgumentException("milvusServiceUrl 配置不能为空");
37
         }
37
         }
38
-    //    milvusClient = new MilvusClientV2(
39
-    //            ConnectConfig.builder()
40
-    //                    .uri(milvusServiceUrl)
41
-    //                    .build());
38
+//        milvusClient = new MilvusClientV2(
39
+//                ConnectConfig.builder()
40
+//                        .uri(milvusServiceUrl)
41
+//                        .build());
42
     }
42
     }
43
     
43
     
44
     @PreDestroy
44
     @PreDestroy
81
                 .maxLength(10)
81
                 .maxLength(10)
82
                 .build());
82
                 .build());
83
 
83
 
84
+        schema.addField(AddFieldReq.builder()
85
+                .fieldName("title")
86
+                .dataType(DataType.VarChar)
87
+                .maxLength(256)
88
+                .build());
89
+
84
         schema.addField(AddFieldReq.builder()
90
         schema.addField(AddFieldReq.builder()
85
                 .fieldName("content")
91
                 .fieldName("content")
86
                 .dataType(DataType.VarChar)
92
                 .dataType(DataType.VarChar)

+ 34
- 8
oa-back/ruoyi-system/src/main/java/com/ruoyi/system/domain/TreeSelectNew.java Ver fichero

7
 import com.ruoyi.common.utils.spring.SpringUtils;
7
 import com.ruoyi.common.utils.spring.SpringUtils;
8
 import com.ruoyi.system.mapper.SysUserMapper;
8
 import com.ruoyi.system.mapper.SysUserMapper;
9
 import com.ruoyi.system.mapper.SysUserPostMapper;
9
 import com.ruoyi.system.mapper.SysUserPostMapper;
10
+import com.ruoyi.system.service.ISysDeptService;
10
 
11
 
11
 import java.io.Serializable;
12
 import java.io.Serializable;
12
 import java.util.List;
13
 import java.util.List;
42
         SysUser sysUser = new SysUser();
43
         SysUser sysUser = new SysUser();
43
         sysUser.setDeptId(dept.getDeptId());
44
         sysUser.setDeptId(dept.getDeptId());
44
         SysUserMapper userMapper = SpringUtils.getBean(SysUserMapper.class);
45
         SysUserMapper userMapper = SpringUtils.getBean(SysUserMapper.class);
46
+        // 查询所有用户
45
         List<SysUser> list = userMapper.selectUserServingList(sysUser);
47
         List<SysUser> list = userMapper.selectUserServingList(sysUser);
48
+        List<SysUser> allUsers = userMapper.selectUserServingList(new SysUser());
49
+        // 筛选出属于当前部门的用户
50
+        for (SysUser user : allUsers) {
51
+            // 检查用户备注中的部门信息
52
+            if (user.getRemark() != null) {
53
+                String remark = user.getRemark();
54
+                // 提取备注中的部门信息
55
+                if (remark.contains("隶属部门:" + dept.getDeptName()) || 
56
+                    remark.contains("合同部门:" + dept.getDeptName()) || 
57
+                    remark.contains("工作部门:" + dept.getDeptName())) {
58
+                    // 确保用户不重复添加
59
+                    if (!containsUser(list, user)) {
60
+                        list.add(user);
61
+                    }
62
+                }
63
+            }
64
+        }
46
         SysUserPostMapper userPostMapper = SpringUtils.getBean(SysUserPostMapper.class);
65
         SysUserPostMapper userPostMapper = SpringUtils.getBean(SysUserPostMapper.class);
47
         SysUser dsSecretary = new SysUser();
66
         SysUser dsSecretary = new SysUser();
48
         dsSecretary.setStatus("0");
67
         dsSecretary.setStatus("0");
53
         SysUser gmAssistant = new SysUser();
72
         SysUser gmAssistant = new SysUser();
54
         gmAssistant.setStatus("0");
73
         gmAssistant.setStatus("0");
55
         List<SysUser> gmAssistantList = userPostMapper.selectGmAssistant(gmAssistant);
74
         List<SysUser> gmAssistantList = userPostMapper.selectGmAssistant(gmAssistant);
56
-        SysUser dispatch = new SysUser();
57
-        dispatch.setStatus("0");
58
-        List<SysUser> dispatchList = userPostMapper.selectDispatch(dispatch);
59
-        dispatch.setStatus("3");
60
-        dispatchList.addAll(userPostMapper.selectDispatch(dispatch));
61
         if (dept.getDeptId() == 101L) {
75
         if (dept.getDeptId() == 101L) {
62
             list.addAll(dsSecretaryList);
76
             list.addAll(dsSecretaryList);
63
         }
77
         }
67
         if (dept.getDeptId() == 103L) {
81
         if (dept.getDeptId() == 103L) {
68
             list = gmAssistantList;
82
             list = gmAssistantList;
69
         }
83
         }
70
-        if (dept.getDeptId() == 115L) {
71
-            list.addAll(dispatchList);
72
-        }
73
         String count = "(" + (list == null ? 0 : list.size()) + ")";
84
         String count = "(" + (list == null ? 0 : list.size()) + ")";
74
         this.label = dept.getDeptName() + count;
85
         this.label = dept.getDeptName() + count;
75
         this.children = dept.getChildren().stream().map(TreeSelectNew::new).collect(Collectors.toList());
86
         this.children = dept.getChildren().stream().map(TreeSelectNew::new).collect(Collectors.toList());
76
     }
87
     }
77
 
88
 
89
+    /**
90
+     * 检查列表中是否包含指定用户
91
+     */
92
+    private boolean containsUser(List<SysUser> userList, SysUser user) {
93
+        if (userList == null || user == null || user.getUserId() == null) {
94
+            return false;
95
+        }
96
+        for (SysUser existingUser : userList) {
97
+            if (existingUser.getUserId() != null && existingUser.getUserId().equals(user.getUserId())) {
98
+                return true;
99
+            }
100
+        }
101
+        return false;
102
+    }
103
+
78
     public TreeSelectNew(SysMenu menu)
104
     public TreeSelectNew(SysMenu menu)
79
     {
105
     {
80
         this.id = menu.getMenuId();
106
         this.id = menu.getMenuId();

+ 0
- 8
oa-back/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java Ver fichero

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
-
79
     /**
71
     /**
80
      * 根据岗位查询用户
72
      * 根据岗位查询用户
81
      *
73
      *

+ 0
- 8
oa-back/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysPostService.java Ver fichero

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
-
135
     /**
127
     /**
136
      * 根据岗位查询用户
128
      * 根据岗位查询用户
137
      *
129
      *

+ 0
- 11
oa-back/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPostServiceImpl.java Ver fichero

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
-
225
     /**
214
     /**
226
      * 根据岗位查询用户
215
      * 根据岗位查询用户
227
      *
216
      *

+ 0
- 31
oa-back/ruoyi-system/src/main/resources/mapper/system/SysUserPostMapper.xml Ver fichero

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
-
130
 	<select id="selectGmAssistant" parameterType="SysUser" resultMap="SysUserResult">
99
 	<select id="selectGmAssistant" parameterType="SysUser" resultMap="SysUserResult">
131
 		select u.*, d.dept_name
100
 		select u.*, d.dept_name
132
 		from sys_user u
101
 		from sys_user u

+ 2
- 2
oa-ui/src/views/flowable/form/finance/borrowForm.vue Ver fichero

856
               }
856
               }
857
               message = "您有一条新的借款申请: \n>" +
857
               message = "您有一条新的借款申请: \n>" +
858
                 "申请人:<font color='info'>" + this.getUserName(this.form.applier) + "</font> \n>" +
858
                 "申请人:<font color='info'>" + this.getUserName(this.form.applier) + "</font> \n>" +
859
-                "借款金额:<font color='warning'>" + this.form.applyAmount + "</font> 元 \n>" +
859
+                "借款金额:<font color='warning'>" + this.form.managerAmount ? this.form.managerAmount : this.form.applyAmount + "</font> 元 \n>" +
860
                 "借款说明:" + (this.form.applyReason ? this.form.applyReason : this.form.remark) + " \n>" +
860
                 "借款说明:" + (this.form.applyReason ? this.form.applyReason : this.form.remark) + " \n>" +
861
                 "\n>" +
861
                 "\n>" +
862
                 "已办流程:<font color='comment'>" + this.taskName + "</font> \n>";
862
                 "已办流程:<font color='comment'>" + this.taskName + "</font> \n>";
888
               }
888
               }
889
               message = "您有一条新的借款申请: \n>" +
889
               message = "您有一条新的借款申请: \n>" +
890
                 "申请人:<font color='info'>" + this.getUserName(this.form.applier) + "</font> \n>" +
890
                 "申请人:<font color='info'>" + this.getUserName(this.form.applier) + "</font> \n>" +
891
-                "借款金额:<font color='warning'>" + this.form.applyAmount + "</font> 元 \n>" +
891
+                "借款金额:<font color='warning'>" + this.form.managerAmount ? this.form.managerAmount : this.form.applyAmount + "</font> 元 \n>" +
892
                 "借款说明:" + (this.form.applyReason ? this.form.applyReason : this.form.remark) + " \n>" +
892
                 "借款说明:" + (this.form.applyReason ? this.form.applyReason : this.form.remark) + " \n>" +
893
                 "\n>" +
893
                 "\n>" +
894
                 "已办流程:<font color='comment'>" + this.taskName + "</font> \n>";
894
                 "已办流程:<font color='comment'>" + this.taskName + "</font> \n>";

Loading…
Cancelar
Guardar