lamphua 1 тиждень тому
джерело
коміт
194b2b772b

+ 40
- 3
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java Переглянути файл

@@ -71,6 +71,31 @@ public class SysUserController extends BaseController
71 71
     {
72 72
         startPage();
73 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 99
         if (user.getDeptId() != null && user.getDeptId() == 101L) {
75 100
             list.addAll(postService.selectDsSecretary(user));
76 101
         }
@@ -80,9 +105,6 @@ public class SysUserController extends BaseController
80 105
         if (user.getDeptId() != null && user.getDeptId() == 103L) {
81 106
             list = postService.selectGmAssistant(user);
82 107
         }
83
-        if (user.getDeptId() != null && user.getDeptId() == 115L) {
84
-            list.addAll(postService.selectDispatch(user));
85
-        }
86 108
         for (SysUser sysUser : list) {
87 109
             StringBuilder postName = new StringBuilder();
88 110
             List<Long> userPostList = postService.selectPostListByUserId(sysUser.getUserId());
@@ -514,4 +536,19 @@ public class SysUserController extends BaseController
514 536
     {
515 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 Переглянути файл

@@ -84,10 +84,10 @@ public class LangChainMilvusServiceImpl implements ILangChainMilvusService
84 84
         if (milvusServiceUrl == null || milvusServiceUrl.isEmpty()) {
85 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 93
     @PostConstruct
@@ -158,6 +158,7 @@ public class LangChainMilvusServiceImpl implements ILangChainMilvusService
158 158
                     fastjsonObj.put("file_name", file.getOriginalFilename());
159 159
                     String[] fileName = file.getOriginalFilename().split("\\.");
160 160
                     fastjsonObj.put("file_type", fileName[fileName.length - 1]);
161
+                    fastjsonObj.put("title", text.split("\n")[0]);
161 162
                     fastjsonObj.put("content", text);
162 163
                     fastjsonObj.put("embedding", embeddingModel.embed(text).content().vectorAsList());
163 164
                     String jsonString = fastjsonObj.toJSONString();
@@ -171,6 +172,7 @@ public class LangChainMilvusServiceImpl implements ILangChainMilvusService
171 172
                     JSONObject titlesJsonObj = new JSONObject();
172 173
                     titlesJsonObj.put("file_name", file.getOriginalFilename());
173 174
                     titlesJsonObj.put("file_type", "标题");
175
+                    titlesJsonObj.put("title", "");
174 176
                     titlesJsonObj.put("content", titlesContent);
175 177
                     titlesJsonObj.put("embedding", embeddingModel.embed(titlesContent).content().vectorAsList());
176 178
                     String titlesJsonString = titlesJsonObj.toJSONString();

+ 10
- 4
oa-back/ruoyi-llm/src/main/java/com/ruoyi/web/llm/service/impl/MilvusServiceImpl.java Переглянути файл

@@ -35,10 +35,10 @@ public class MilvusServiceImpl implements IMilvusService {
35 35
         if (milvusServiceUrl == null || milvusServiceUrl.isEmpty()) {
36 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 44
     @PreDestroy
@@ -81,6 +81,12 @@ public class MilvusServiceImpl implements IMilvusService {
81 81
                 .maxLength(10)
82 82
                 .build());
83 83
 
84
+        schema.addField(AddFieldReq.builder()
85
+                .fieldName("title")
86
+                .dataType(DataType.VarChar)
87
+                .maxLength(256)
88
+                .build());
89
+
84 90
         schema.addField(AddFieldReq.builder()
85 91
                 .fieldName("content")
86 92
                 .dataType(DataType.VarChar)

+ 34
- 8
oa-back/ruoyi-system/src/main/java/com/ruoyi/system/domain/TreeSelectNew.java Переглянути файл

@@ -7,6 +7,7 @@ import com.ruoyi.common.core.domain.entity.SysUser;
7 7
 import com.ruoyi.common.utils.spring.SpringUtils;
8 8
 import com.ruoyi.system.mapper.SysUserMapper;
9 9
 import com.ruoyi.system.mapper.SysUserPostMapper;
10
+import com.ruoyi.system.service.ISysDeptService;
10 11
 
11 12
 import java.io.Serializable;
12 13
 import java.util.List;
@@ -42,7 +43,25 @@ public class TreeSelectNew implements Serializable
42 43
         SysUser sysUser = new SysUser();
43 44
         sysUser.setDeptId(dept.getDeptId());
44 45
         SysUserMapper userMapper = SpringUtils.getBean(SysUserMapper.class);
46
+        // 查询所有用户
45 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 65
         SysUserPostMapper userPostMapper = SpringUtils.getBean(SysUserPostMapper.class);
47 66
         SysUser dsSecretary = new SysUser();
48 67
         dsSecretary.setStatus("0");
@@ -53,11 +72,6 @@ public class TreeSelectNew implements Serializable
53 72
         SysUser gmAssistant = new SysUser();
54 73
         gmAssistant.setStatus("0");
55 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 75
         if (dept.getDeptId() == 101L) {
62 76
             list.addAll(dsSecretaryList);
63 77
         }
@@ -67,14 +81,26 @@ public class TreeSelectNew implements Serializable
67 81
         if (dept.getDeptId() == 103L) {
68 82
             list = gmAssistantList;
69 83
         }
70
-        if (dept.getDeptId() == 115L) {
71
-            list.addAll(dispatchList);
72
-        }
73 84
         String count = "(" + (list == null ? 0 : list.size()) + ")";
74 85
         this.label = dept.getDeptName() + count;
75 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 104
     public TreeSelectNew(SysMenu menu)
79 105
     {
80 106
         this.id = menu.getMenuId();

+ 0
- 8
oa-back/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java Переглянути файл

@@ -68,14 +68,6 @@ public interface SysUserPostMapper
68 68
      */
69 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 Переглянути файл

@@ -124,14 +124,6 @@ public interface ISysPostService
124 124
      */
125 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 Переглянути файл

@@ -211,17 +211,6 @@ public class SysPostServiceImpl implements ISysPostService
211 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 Переглянути файл

@@ -96,37 +96,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
96 96
 		</if>
97 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 99
 	<select id="selectGmAssistant" parameterType="SysUser" resultMap="SysUserResult">
131 100
 		select u.*, d.dept_name
132 101
 		from sys_user u

+ 2
- 2
oa-ui/src/views/flowable/form/finance/borrowForm.vue Переглянути файл

@@ -856,7 +856,7 @@ export default {
856 856
               }
857 857
               message = "您有一条新的借款申请: \n>" +
858 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 860
                 "借款说明:" + (this.form.applyReason ? this.form.applyReason : this.form.remark) + " \n>" +
861 861
                 "\n>" +
862 862
                 "已办流程:<font color='comment'>" + this.taskName + "</font> \n>";
@@ -888,7 +888,7 @@ export default {
888 888
               }
889 889
               message = "您有一条新的借款申请: \n>" +
890 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 892
                 "借款说明:" + (this.form.applyReason ? this.form.applyReason : this.form.remark) + " \n>" +
893 893
                 "\n>" +
894 894
                 "已办流程:<font color='comment'>" + this.taskName + "</font> \n>";

Завантаження…
Відмінити
Зберегти