lamphua 2 nedēļas atpakaļ
vecāks
revīzija
98c119b345
30 mainītis faili ar 372 papildinājumiem un 82 dzēšanām
  1. 2
    0
      oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcDeviceController.java
  2. 25
    0
      oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcProjectController.java
  3. 4
    4
      oa-back/ruoyi-agent/src/main/java/com/ruoyi/agent/service/impl/McpServiceImpl.java
  4. 2
    2
      oa-back/ruoyi-llm/src/main/java/com/ruoyi/web/llm/controller/CmcAgentController.java
  5. 3
    2
      oa-back/ruoyi-llm/src/main/java/com/ruoyi/web/llm/controller/SessionController.java
  6. 53
    4
      oa-back/ruoyi-llm/src/main/java/com/ruoyi/web/llm/service/impl/LangChainMilvusServiceImpl.java
  7. 4
    4
      oa-back/ruoyi-llm/src/main/java/com/ruoyi/web/llm/service/impl/MilvusServiceImpl.java
  8. 1
    1
      oa-back/ruoyi-system/src/main/java/com/ruoyi/llm/service/ICmcAgentService.java
  9. 68
    29
      oa-back/ruoyi-system/src/main/java/com/ruoyi/llm/service/impl/CmcAgentServiceImpl.java
  10. 88
    5
      oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcBudget.java
  11. 27
    3
      oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcBudgetMapper.xml
  12. 2
    1
      oa-ui/src/api/llm/agent.js
  13. 1
    1
      oa-ui/src/utils/request.js
  14. 1
    1
      oa-ui/src/views/file/filesProject/project.vue
  15. 11
    4
      oa-ui/src/views/file/index.vue
  16. 4
    1
      oa-ui/src/views/file/index/projectLayer.vue
  17. 1
    0
      oa-ui/src/views/flowable/form/budget/addBudget.vue
  18. 12
    1
      oa-ui/src/views/flowable/form/budget/adjust/budgetAdjust.vue
  19. 1
    1
      oa-ui/src/views/flowable/form/budget/adjust/components/CarCost.vue
  20. 1
    1
      oa-ui/src/views/flowable/form/budget/adjust/components/DeviceCost.vue
  21. 1
    1
      oa-ui/src/views/flowable/form/budget/adjust/components/InnerStaffCost.vue
  22. 1
    1
      oa-ui/src/views/flowable/form/budget/adjust/components/OuterStaffCost.vue
  23. 3
    3
      oa-ui/src/views/flowable/form/budget/adjust/components/otherCost.vue
  24. 10
    3
      oa-ui/src/views/flowable/form/budget/components/chooseDevice.vue
  25. 2
    2
      oa-ui/src/views/flowable/form/finance/borrowForm.vue
  26. 11
    3
      oa-ui/src/views/llm/agent/AgentDetail.vue
  27. 7
    1
      oa-ui/src/views/oa/device/detail.vue
  28. 9
    1
      oa-ui/src/views/oa/device/index.vue
  29. 9
    2
      oa-ui/src/views/oa/supply/deviceList.vue
  30. 8
    0
      oa-ui/src/views/oa/supply/index.vue

+ 2
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcDeviceController.java Parādīt failu

@@ -111,6 +111,8 @@ public class CmcDeviceController extends BaseController
111 111
         statusObject.put("已停用", cmcDeviceService.selectCmcDeviceList(cmcDevice).size());
112 112
         cmcDevice.setStatus("4");
113 113
         statusObject.put("已报废", cmcDeviceService.selectCmcDeviceList(cmcDevice).size());
114
+        cmcDevice.setStatus("5");
115
+        statusObject.put("已处置", cmcDeviceService.selectCmcDeviceList(cmcDevice).size());
114 116
         //整体
115 117
         if (cmcDeviceApproval.getApplyDate() == null) {
116 118
             //每年派车次数

+ 25
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcProjectController.java Parādīt failu

@@ -9,13 +9,16 @@ import javax.servlet.http.HttpServletResponse;
9 9
 
10 10
 import com.alibaba.fastjson2.JSONArray;
11 11
 import com.alibaba.fastjson2.JSONObject;
12
+import com.ruoyi.common.core.domain.entity.SysRole;
12 13
 import com.ruoyi.common.core.domain.entity.SysUser;
13 14
 import com.ruoyi.common.utils.StringUtils;
14 15
 import com.ruoyi.file.domain.FilesAchievement;
15 16
 import com.ruoyi.file.service.IFilesAchievementService;
16 17
 import com.ruoyi.oa.domain.*;
17 18
 import com.ruoyi.oa.service.*;
19
+import com.ruoyi.system.domain.SysUserRole;
18 20
 import com.ruoyi.system.service.ISysDeptService;
21
+import com.ruoyi.system.service.ISysRoleService;
19 22
 import com.ruoyi.system.service.ISysUserService;
20 23
 import com.ruoyi.web.controller.qyweixin.MessageController;
21 24
 import org.springframework.beans.factory.annotation.Autowired;
@@ -58,6 +61,9 @@ public class CmcProjectController extends BaseController
58 61
     @Autowired
59 62
     private ISysUserService userService;
60 63
 
64
+    @Autowired
65
+    private ISysRoleService roleService;
66
+
61 67
     @Autowired
62 68
     private ICmcManageDeptService cmcManageDeptService;
63 69
 
@@ -349,6 +355,25 @@ public class CmcProjectController extends BaseController
349 355
     @PutMapping
350 356
     public AjaxResult edit(@RequestBody CmcProject cmcProject)
351 357
     {
358
+        if (cmcProject.getProjectLeader() != null) {
359
+            SysUser user = userService.selectUserById(cmcProject.getProjectLeader());
360
+            List<SysRole> sysRoleList = user.getRoles();
361
+            Long[] roles = new Long[sysRoleList.size()];
362
+            boolean isProjectLeader = false;
363
+            for (int i = 0; i < sysRoleList.size(); i++) {
364
+                roles[i] = sysRoleList.get(i).getRoleId();
365
+                if (sysRoleList.get(i).getRoleId() == 15L) {
366
+                    isProjectLeader = true;
367
+                }
368
+            }
369
+            //新增项目负责人角色
370
+            if (!isProjectLeader) {
371
+                Long[] newRoles = new Long[roles.length + 1];
372
+                System.arraycopy(roles, 0, newRoles, 0, roles.length);
373
+                newRoles[newRoles.length - 1] = 15L;
374
+                userService.insertUserAuth(user.getUserId(), newRoles);
375
+            }
376
+        }
352 377
         return toAjax(cmcProjectService.updateCmcProject(cmcProject));
353 378
     }
354 379
 

+ 4
- 4
oa-back/ruoyi-agent/src/main/java/com/ruoyi/agent/service/impl/McpServiceImpl.java Parādīt failu

@@ -80,10 +80,10 @@ public class McpServiceImpl implements IMcpService {
80 80
         if (milvusServiceUrl == null || milvusServiceUrl.isEmpty()) {
81 81
             throw new IllegalStateException("Milvus service URL 未配置");
82 82
         }
83
-//        milvusClient = new MilvusClientV2(
84
-//                ConnectConfig.builder()
85
-//                        .uri(milvusServiceUrl)
86
-//                        .build());
83
+        milvusClient = new MilvusClientV2(
84
+                ConnectConfig.builder()
85
+                        .uri(milvusServiceUrl)
86
+                        .build());
87 87
     }
88 88
     /**
89 89
      * 调用LLM+RAG(外部文件+知识库)生成回答

+ 2
- 2
oa-back/ruoyi-llm/src/main/java/com/ruoyi/web/llm/controller/CmcAgentController.java Parādīt failu

@@ -94,9 +94,9 @@ public class CmcAgentController extends BaseController
94 94
      * @return
95 95
      */
96 96
     @PostMapping("/modifyFile")
97
-    public AjaxResult uploadModifyFile(MultipartFile file, String agentName) throws IOException
97
+    public AjaxResult uploadModifyFile(String topicId, MultipartFile file, String agentName) throws IOException
98 98
     {
99
-        return success(cmcAgentService.uploadModifyFile(file, agentName));
99
+        return success(cmcAgentService.uploadModifyFile(topicId, file, agentName));
100 100
     }
101 101
 
102 102
     /**

+ 3
- 2
oa-back/ruoyi-llm/src/main/java/com/ruoyi/web/llm/controller/SessionController.java Parādīt failu

@@ -91,8 +91,9 @@ public class SessionController extends BaseController
91 91
                 "2. 如果需要查询数据,调用SQLQuery工具并传入正确的SQL语句  \n" +
92 92
                 "3. 生成标准MYSQL查询语句,根据语义和字段类型使用COUNT/SUM/AVG等聚合函数  \n" +
93 93
                 "4. 如果单表字段不满足查询需求,根据OA系统表结构信息进行多张表连接查询  \n" +
94
-                "5. 给生成的字段取一个简短的中文名称  \n" +
95
-                "6. 输出格式:使用[]包含sql文本,例如:[select 1 from dual]\n";
94
+                "5. 如果字段值由逗号隔开,根据OA系统表结构信息进行多张表连接查询,采用concat方式多值匹配  \n" +
95
+                "6. 给生成的字段取一个简短的中文名称  \n" +
96
+                "7. 输出格式:使用[]包含sql文本,例如:[select 1 from dual]\n";
96 97
         messages.add(ChatMessage.ofUser(prompt));
97 98
         ChatSession chatSession =  InMemoryChatSession.builder().messages(messages).build();
98 99
         ChatResponse response = chatModel.prompt(chatSession).call();

+ 53
- 4
oa-back/ruoyi-llm/src/main/java/com/ruoyi/web/llm/service/impl/LangChainMilvusServiceImpl.java Parādīt failu

@@ -80,10 +80,10 @@ public class LangChainMilvusServiceImpl implements ILangChainMilvusService
80 80
         if (milvusServiceUrl == null || milvusServiceUrl.isEmpty()) {
81 81
             throw new IllegalArgumentException("milvusServiceUrl 配置不能为空");
82 82
         }
83
-//        milvusClient = new MilvusClientV2(
84
-//                ConnectConfig.builder()
85
-//                        .uri(milvusServiceUrl)
86
-//                        .build());
83
+        milvusClient = new MilvusClientV2(
84
+                ConnectConfig.builder()
85
+                        .uri(milvusServiceUrl)
86
+                        .build());
87 87
     }
88 88
 
89 89
     /**
@@ -139,6 +139,19 @@ public class LangChainMilvusServiceImpl implements ILangChainMilvusService
139 139
                     data.add(jsonObject);
140 140
                 }
141 141
 
142
+                // 添加一条包含所有二、三级标题的记录
143
+                String titlesContent = extractAllTitles(transferFile);
144
+                if (!titlesContent.trim().isEmpty()) {
145
+                    JSONObject titlesJsonObj = new JSONObject();
146
+                    titlesJsonObj.put("file_name", file.getOriginalFilename());
147
+                    titlesJsonObj.put("file_type", "标题");
148
+                    titlesJsonObj.put("content", titlesContent);
149
+                    titlesJsonObj.put("embedding", embeddingModel.embed(titlesContent).content().vectorAsList());
150
+                    String titlesJsonString = titlesJsonObj.toJSONString();
151
+                    JsonObject titlesJsonObject = JsonParser.parseString(titlesJsonString).getAsJsonObject();
152
+                    data.add(titlesJsonObject);
153
+                }
154
+
142 155
                 // 加载集合
143 156
                 LoadCollectionReq loadCollectionReq = LoadCollectionReq.builder()
144 157
                         .collectionName(collectionName)
@@ -422,6 +435,42 @@ public class LangChainMilvusServiceImpl implements ILangChainMilvusService
422 435
         return searchResultList;
423 436
     }
424 437
 
438
+    /**
439
+     * 提取文档中的所有二、三级标题
440
+     */
441
+    private String extractAllTitles(File transferFile) throws Exception {
442
+        StringBuilder titlesBuilder = new StringBuilder();
443
+        String filename = transferFile.getName().toLowerCase();
444
+        
445
+        if (filename.endsWith(".docx")) {
446
+            try (XWPFDocument document = new XWPFDocument(new FileInputStream(transferFile))) {
447
+                for (XWPFParagraph paragraph : document.getParagraphs()) {
448
+                    String text = paragraph.getText().trim();
449
+                    if (text.isEmpty()) continue;
450
+                    if (paragraph.getStyle() != null) {
451
+                        if (paragraph.getStyle().equals("2") || paragraph.getStyle().equals("3")) {
452
+                            titlesBuilder.append(text).append("\n");
453
+                        }
454
+                    }
455
+                }
456
+            }
457
+        } else if (filename.endsWith(".doc")) {
458
+            try (HWPFDocument document = new HWPFDocument(new FileInputStream(transferFile))) {
459
+                Range range = document.getRange();
460
+                for (int i = 0; i < range.numParagraphs(); i++) {
461
+                    Paragraph paragraph = range.getParagraph(i);
462
+                    String text = paragraph.text().trim();
463
+                    if (text.isEmpty()) continue;
464
+                    short styleIndex = paragraph.getStyleIndex();
465
+                    if (styleIndex == 2 || styleIndex == 3) {
466
+                        titlesBuilder.append(text).append("\n");
467
+                    }
468
+                }
469
+            }
470
+        }
471
+        return titlesBuilder.toString();
472
+    }
473
+
425 474
     /**
426 475
      * 检索知识库
427 476
      */

+ 4
- 4
oa-back/ruoyi-llm/src/main/java/com/ruoyi/web/llm/service/impl/MilvusServiceImpl.java Parādīt failu

@@ -34,10 +34,10 @@ public class MilvusServiceImpl implements IMilvusService {
34 34
         if (milvusServiceUrl == null || milvusServiceUrl.isEmpty()) {
35 35
             throw new IllegalArgumentException("milvusServiceUrl 配置不能为空");
36 36
         }
37
-//        milvusClient = new MilvusClientV2(
38
-//                ConnectConfig.builder()
39
-//                        .uri(milvusServiceUrl)
40
-//                        .build());
37
+        milvusClient = new MilvusClientV2(
38
+                ConnectConfig.builder()
39
+                        .uri(milvusServiceUrl)
40
+                        .build());
41 41
     }
42 42
 
43 43
     /**

+ 1
- 1
oa-back/ruoyi-system/src/main/java/com/ruoyi/llm/service/ICmcAgentService.java Parādīt failu

@@ -53,7 +53,7 @@ public interface ICmcAgentService
53 53
      * @param file 文件
54 54
      * @return 结果
55 55
      */
56
-    public JSONObject uploadModifyFile(MultipartFile file, String agentName) throws IOException;
56
+    public JSONObject uploadModifyFile(String topicId, MultipartFile file, String agentName) throws IOException;
57 57
 
58 58
     /**
59 59
      * 上传多文件

+ 68
- 29
oa-back/ruoyi-system/src/main/java/com/ruoyi/llm/service/impl/CmcAgentServiceImpl.java Parādīt failu

@@ -8,6 +8,7 @@ import com.ruoyi.common.utils.SnowFlake;
8 8
 import com.ruoyi.llm.domain.CmcAgent;
9 9
 import com.ruoyi.llm.domain.CmcChat;
10 10
 import com.ruoyi.llm.domain.CmcDocument;
11
+import com.ruoyi.llm.domain.CmcTopic;
11 12
 import com.ruoyi.llm.mapper.CmcAgentMapper;
12 13
 import com.ruoyi.llm.mapper.CmcChatMapper;
13 14
 import com.ruoyi.llm.mapper.CmcDocumentMapper;
@@ -37,6 +38,7 @@ import org.apache.poi.hwpf.usermodel.Paragraph;
37 38
 import org.apache.poi.hwpf.usermodel.Range;
38 39
 import org.apache.poi.xwpf.usermodel.*;
39 40
 import org.apache.xmlbeans.XmlCursor;
41
+import org.checkerframework.checker.units.qual.C;
40 42
 import org.noear.solon.ai.chat.ChatModel;
41 43
 import org.noear.solon.ai.chat.ChatResponse;
42 44
 import org.noear.solon.ai.chat.ChatSession;
@@ -47,7 +49,9 @@ import org.springframework.beans.factory.annotation.Value;
47 49
 import org.springframework.stereotype.Service;
48 50
 import org.springframework.web.multipart.MultipartFile;
49 51
 
52
+import javax.annotation.PostConstruct;
50 53
 import java.io.*;
54
+import java.math.BigInteger;
51 55
 import java.nio.file.Files;
52 56
 import java.nio.file.Path;
53 57
 import java.nio.file.Paths;
@@ -82,6 +86,19 @@ public class CmcAgentServiceImpl implements ICmcAgentService
82 86
     @Value("${milvusService.url}")
83 87
     private String milvusServiceUrl;
84 88
 
89
+    private MilvusClientV2 milvusClient;
90
+
91
+    @PostConstruct
92
+    public void initMilvusClient() {
93
+        if (milvusServiceUrl == null || milvusServiceUrl.isEmpty()) {
94
+            throw new IllegalArgumentException("milvusServiceUrl 配置不能为空");
95
+        }
96
+        milvusClient = new MilvusClientV2(
97
+                ConnectConfig.builder()
98
+                        .uri(milvusServiceUrl)
99
+                        .build());
100
+    }
101
+
85 102
     /**
86 103
      * 查询智能体
87 104
      *
@@ -194,7 +211,7 @@ public class CmcAgentServiceImpl implements ICmcAgentService
194 211
      * @return 结果
195 212
      */
196 213
     @Override
197
-    public JSONObject uploadModifyFile(MultipartFile file, String agentName) throws IOException {
214
+    public JSONObject uploadModifyFile(String topicId, MultipartFile file, String agentName) throws IOException {
198 215
         processValue = "";
199 216
         String prefixPath = "/upload/agent/" + agentName;
200 217
         File profilePath = new File( RuoYiConfig.getProfile() + prefixPath);
@@ -211,7 +228,10 @@ public class CmcAgentServiceImpl implements ICmcAgentService
211 228
             Files.deleteIfExists(inputFilePath);
212 229
             file.transferTo(transferFile);
213 230
         }
214
-        processValue = "上传完成:100%";
231
+        processValue = "文件上传完成:100%";
232
+        CmcChat chat = new CmcChat();
233
+        chat.setTopicId(topicId);
234
+        String inputPath = RuoYiConfig.getProfile() + cmcChatMapper.selectCmcChatList(chat).get(0).getInput().split(":")[1];
215 235
         CmcDocument cmcDocument = new CmcDocument();
216 236
         cmcDocument.setDocumentId(new SnowFlake().generateId());
217 237
         cmcDocument.setChatId(chatId);
@@ -228,14 +248,17 @@ public class CmcAgentServiceImpl implements ICmcAgentService
228 248
             cmcChat.setUserId(SecurityUtils.getUserId());
229 249
             cmcChatMapper.insertCmcChat(cmcChat);
230 250
             InputStream fileInputStream = new FileInputStream(profilePath + "/" + file.getOriginalFilename());
251
+            String firstParagraphText = "";
231 252
             try (XWPFDocument doc = new XWPFDocument(fileInputStream)) {
253
+                firstParagraphText = doc.getParagraphs().get(1).getText();
232 254
                 // 保存文档到本地文件系统
233 255
                 try (FileOutputStream out = new FileOutputStream(profilePath + "/" + file.getOriginalFilename())) {
234 256
                     doc.write(out);
235 257
                 }
236 258
             }
237 259
             List<String> subTitles = extractSubTitles(profilePath + "/" + file.getOriginalFilename(), "技术文件");
238
-            message = generateAnswerWithDocumentAndCollection(profilePath + "/" + file.getOriginalFilename(), subTitles);
260
+            List<String> firstParagraphSubTitles = extractSubTitles(profilePath + "/" + file.getOriginalFilename(), firstParagraphText);
261
+            message = generateAnswerWithDocumentAndCollection(inputPath,profilePath + "/" + file.getOriginalFilename(), subTitles, firstParagraphSubTitles);
239 262
         }
240 263
         jsonObject.put("assistantMessage", message);
241 264
         return jsonObject;
@@ -337,8 +360,8 @@ public class CmcAgentServiceImpl implements ICmcAgentService
337 360
     /**
338 361
      * 调用LLM生成回答 - 针对技术文件章节内容生成
339 362
      */
340
-    public String generateAnswerWithDocumentAndCollection(String templatePath, List<String> titles) throws IOException {
341
-        File profilePath = new File(templatePath);
363
+    public String generateAnswerWithDocumentAndCollection(String uploadFilePath, String templatePath, List<String> titles, List<String> firstParagraphSubTitles) throws IOException {
364
+        File profilePath = new File(uploadFilePath);
342 365
 
343 366
         // 构建招标文件内容的嵌入向量存储
344 367
         InMemoryEmbeddingStore<TextSegment> embeddingStore = new InMemoryEmbeddingStore<>();
@@ -356,10 +379,13 @@ public class CmcAgentServiceImpl implements ICmcAgentService
356 379
         for (String title : titles) {
357 380
             try {
358 381
                 // 1. 从招标文件中检索相关内容
359
-                List<String> tenderContent = retrieveFromTenderDocument(embeddingStore, title);
360
-
382
+                List<String> tenderContent = new ArrayList<>();
383
+                if (firstParagraphSubTitles.contains(title))
384
+                    retrieveFromTenderDocument(embeddingStore, title, firstParagraphSubTitles);
385
+                else
386
+                    tenderContent.add(segments.get(0).text());
361 387
                 // 2. 从知识库中检索相似章节内容
362
-                List<JSONObject> knowledgeContexts = retrieveFromMilvus("technical", title, 10);
388
+                List<JSONObject> knowledgeContexts = retrieveFromMilvus("technical", title, 10, "file_type != '标题'", firstParagraphSubTitles);
363 389
 
364 390
                 // 3. 构建针对该章节的提示语
365 391
                 String prompt = buildChapterPrompt(title, tenderContent, knowledgeContexts);
@@ -372,7 +398,7 @@ public class CmcAgentServiceImpl implements ICmcAgentService
372 398
                 allGeneratedContent.append(title).append("\n").append(chapterContent).append("\n\n");
373 399
 
374 400
                 // 更新进度
375
-                processValue = "生成章节内容中: " + Double.parseDouble(String.format("%.2f%n", (double) (titles.indexOf(title) + 1)  / titles.size() * 100)) + "%";
401
+                processValue = "生成【" + title + "】章节内容中: " + Double.parseDouble(String.format("%.2f%n", (double) (titles.indexOf(title) + 1)  / titles.size() * 100)) + "%";
376 402
                 successTitles.add(title);
377 403
 
378 404
             } catch (Exception e) {
@@ -407,7 +433,7 @@ public class CmcAgentServiceImpl implements ICmcAgentService
407 433
     /**
408 434
      * 从招标文件中检索与指定标题相关的内容
409 435
      */
410
-    private List<String> retrieveFromTenderDocument(InMemoryEmbeddingStore<TextSegment> embeddingStore, String title) {
436
+    private List<String> retrieveFromTenderDocument(InMemoryEmbeddingStore<TextSegment> embeddingStore, String title, List<String> firstParagraphSubTitles) {
411 437
         List<String> relevantContent = new ArrayList<>();
412 438
 
413 439
         try {
@@ -427,7 +453,6 @@ public class CmcAgentServiceImpl implements ICmcAgentService
427 453
         } catch (Exception e) {
428 454
             System.err.println("从招标文件检索内容时出错: " + e.getMessage());
429 455
         }
430
-
431 456
         return relevantContent;
432 457
     }
433 458
 
@@ -577,21 +602,22 @@ public class CmcAgentServiceImpl implements ICmcAgentService
577 602
             if (line.contains("6."))
578 603
                 chapter2List.add(line.replace("*", "").replace("#", "").replace("-", ""));
579 604
         }
605
+        processValue = "已生成二级标题:100%";
580 606
         for (String chapter2 : chapter2List) {
581 607
             String orderNum = chapter2.split(" ")[0];
582 608
             StringBuilder sb = new StringBuilder("二级标题如下:\n").append(chapter2)
583
-                    .append("\n 请以上述二级标题作为检索词,到技术知识库中检索最相似的片段,结合检索结果编排该二级标题下的三级标题,严格按以下格式,仅输出三级标题列表:\n")
609
+                    .append("\n 请以上述二级标题作为检索词,到技术知识库中检索最相似的标题,结合检索结果编排该二级标题下的三级标题,严格按以下格式,仅输出三级标题列表:\n")
584 610
                     .append(orderNum).append(".1 XX\n")
585 611
                     .append(orderNum).append(".2 XX\n")
586 612
                     .append(orderNum).append(".3 XX\n");
587 613
 
588
-            List<JSONObject> contexts = retrieveFromMilvus("technical", chapter2, 10);
614
+            List<JSONObject> contexts = retrieveFromMilvus("technical", chapter2, 10, "file_type == '标题'", new ArrayList<>());
589 615
             for (JSONObject context : contexts) {
590 616
                 sb.append("参考内容").append(": ")
591 617
                         .append(context.getString("content")).append("\n\n");
592 618
             }
593 619
             chapter3.append(generateAnswer(sb.toString()));
594
-            processValue = "分析中:" + Double.parseDouble(String.format("%.2f%n", (double) (chapter2List.indexOf(chapter2) + 1)  / chapter2List.size() * 100)) + "%";
620
+            processValue = "正在根据技术文档知识库生成二级标题下三级标题:" + Double.parseDouble(String.format("%.2f%n", (double) (chapter2List.indexOf(chapter2) + 1)  / chapter2List.size() * 100)) + "%";
595 621
         }
596 622
         String sb = "二级标题如下:\n" + chapters2 +
597 623
                 "\n 三级标题如下:" + chapter3 +
@@ -636,25 +662,23 @@ public class CmcAgentServiceImpl implements ICmcAgentService
636 662
      * 从Milvus检索相关文档
637 663
      * @return
638 664
      */
639
-    public List<JSONObject> retrieveFromMilvus(String collectionName, String query, int topK) {
665
+    public List<JSONObject> retrieveFromMilvus(String collectionName, String query, int topK, String filter, List<String> firstParagraphSubTitles) {
640 666
         List<JSONObject> resultList = new ArrayList<>();
641
-        List<List<SearchResp.SearchResult>> searchResultList = retrieve(collectionName, query, topK);
642
-        searchResultList.forEach(searchResult -> {
643
-            JSONObject result = new JSONObject();
644
-            result.put("content", searchResult.get(0).getEntity().get("content"));
645
-            resultList.add(result);
646
-        });
667
+        if (firstParagraphSubTitles.isEmpty() || (!firstParagraphSubTitles.isEmpty() && !firstParagraphSubTitles.contains(query))) {
668
+            List<List<SearchResp.SearchResult>> searchResultList = retrieve(collectionName, query, topK, filter);
669
+            searchResultList.forEach(searchResult -> {
670
+                JSONObject result = new JSONObject();
671
+                result.put("content", searchResult.get(0).getEntity().get("content"));
672
+                resultList.add(result);
673
+            });
674
+        }
647 675
         return resultList;
648 676
     }
649 677
 
650 678
     /**
651 679
      * 检索知识库
652 680
      */
653
-    private List<List<SearchResp.SearchResult>> retrieve(String collectionName, String query, int topK) {
654
-        MilvusClientV2 milvusClient = new MilvusClientV2(
655
-                ConnectConfig.builder()
656
-                        .uri(milvusServiceUrl)
657
-                        .build());
681
+    private List<List<SearchResp.SearchResult>> retrieve(String collectionName, String query, int topK, String filter) {
658 682
         List<BaseVector> queryVector = Collections.singletonList(new FloatVec(embeddingModel.embed(query).content().vector()));
659 683
 
660 684
         //  加载集合
@@ -675,6 +699,19 @@ public class CmcAgentServiceImpl implements ICmcAgentService
675 699
                 .metricType(IndexParam.MetricType.COSINE)
676 700
                 .searchParams(searchParams)
677 701
                 .build();
702
+        
703
+        if (filter != null && !filter.isEmpty()) {
704
+            searchReq = SearchReq.builder()
705
+                    .collectionName(collectionName)
706
+                    .data(queryVector)
707
+                    .topK(topK)
708
+                    .filter(filter)
709
+                    .outputFields(Arrays.asList("file_name", "file_type", "content"))
710
+                    .annsField("embedding")
711
+                    .metricType(IndexParam.MetricType.COSINE)
712
+                    .searchParams(searchParams)
713
+                    .build();
714
+        }
678 715
 
679 716
         SearchResp searchResp = milvusClient.search(searchReq);
680 717
         List<List<SearchResp.SearchResult>> searchResultList = searchResp.getSearchResults();
@@ -827,11 +864,13 @@ public class CmcAgentServiceImpl implements ICmcAgentService
827 864
             }
828 865
 
829 866
 
867
+            processValue = "已获取最低级别子标题列表:100%";
830 868
             return subTitles;
831 869
 
832 870
         }
833 871
     }
834 872
 
873
+
835 874
     // 检查一个标题是否是叶子节点(没有更低级别的子标题)
836 875
     private boolean isLeafNode(XWPFDocument doc, XWPFParagraph p, int level) {
837 876
         int index = doc.getPosOfParagraph(p);
@@ -887,7 +926,7 @@ public class CmcAgentServiceImpl implements ICmcAgentService
887 926
 
888 927
                     if (paragraph.getStyle() != null) {
889 928
                         // 二级标题(样式2)开始新的分段
890
-                        if (paragraph.getStyle().equals("2")) {
929
+                        if (paragraph.getStyle().equals("3")) {
891 930
                             // 保存当前二级标题下的内容
892 931
                             if (currentLevel2Content.length() != 0) {
893 932
                                 // 检查当前二级标题内容的字节数
@@ -907,7 +946,7 @@ public class CmcAgentServiceImpl implements ICmcAgentService
907 946
                                         // 检查是否是三级标题
908 947
                                         boolean isLevel3Title = false;
909 948
                                         for (XWPFParagraph p : xwpfDocument.getParagraphs()) {
910
-                                            if (p.getText().trim().equals(para.trim()) && p.getStyle() != null && p.getStyle().equals("3")) {
949
+                                            if (p.getText().trim().equals(para.trim()) && p.getStyle() != null && p.getStyle().equals("4")) {
911 950
                                                 isLevel3Title = true;
912 951
                                                 break;
913 952
                                             }
@@ -973,7 +1012,7 @@ public class CmcAgentServiceImpl implements ICmcAgentService
973 1012
                             
974 1013
                             boolean isLevel3Title = false;
975 1014
                             for (XWPFParagraph p : xwpfDocument.getParagraphs()) {
976
-                                if (p.getText().trim().equals(para.trim()) && p.getStyle() != null && p.getStyle().equals("3")) {
1015
+                                if (p.getText().trim().equals(para.trim()) && p.getStyle() != null && p.getStyle().equals("4")) {
977 1016
                                     isLevel3Title = true;
978 1017
                                     break;
979 1018
                                 }

+ 88
- 5
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcBudget.java Parādīt failu

@@ -38,6 +38,10 @@ public class CmcBudget extends BaseEntity
38 38
 //    @Excel(name = "间接成本")
39 39
     private BigDecimal fixCost;
40 40
 
41
+    /** 内业绩效额 */
42
+//    @Excel(name = "内业绩效额")
43
+    private BigDecimal settleExpense;
44
+
41 45
     /** 人员成本 */
42 46
     @Excel(name = "人员成本")
43 47
     private BigDecimal staffCost;
@@ -50,6 +54,10 @@ public class CmcBudget extends BaseEntity
50 54
     @Excel(name = "设备成本")
51 55
     private BigDecimal deviceCost;
52 56
 
57
+    /** 经营相关费用 */
58
+    @Excel(name = "经营相关费用")
59
+    private BigDecimal businessCost;
60
+
53 61
     /** 现场开支 */
54 62
     @Excel(name = "现场开支")
55 63
     private BigDecimal siteCost;
@@ -58,10 +66,6 @@ public class CmcBudget extends BaseEntity
58 66
 //    @Excel(name = "直接成本")
59 67
     private BigDecimal directExpense;
60 68
 
61
-    /** 预结算额 */
62
-    @Excel(name = "预结算额")
63
-    private BigDecimal settleExpense;
64
-
65 69
     /** 外协费用 */
66 70
     @Excel(name = "外协费用")
67 71
     private BigDecimal outExpense;
@@ -179,12 +183,32 @@ public class CmcBudget extends BaseEntity
179 183
     @Excel(name = "预算附件")
180 184
     private String document;
181 185
 
186
+    /** 人员核算成本 */
187
+    @Excel(name = "人员核算成本")
188
+    private BigDecimal staffAdjust;
189
+
190
+    /** 车辆核算成本 */
191
+    @Excel(name = "车辆核算成本")
192
+    private BigDecimal carAdjust;
193
+
194
+    /** 设备核算成本 */
195
+    @Excel(name = "设备核算成本")
196
+    private BigDecimal deviceAdjust;
197
+
198
+    /** 经营相关核算费用 */
199
+    @Excel(name = "经营相关核算费用")
200
+    private BigDecimal businessAdjust;
201
+
182 202
     /** 现场开支核算 */
183 203
     @Excel(name = "现场开支核算 ")
184 204
     private BigDecimal siteAdjust;
185 205
 
206
+    /** 现场外开支核算 */
207
+    @Excel(name = "现场外开支核算 ")
208
+    private BigDecimal otherCost;
209
+
186 210
     /** 内业核算绩效总额 */
187
-    @Excel(name = "内业核算绩效总额")
211
+//    @Excel(name = "内业核算绩效总额")
188 212
     private BigDecimal settleAdjust;
189 213
 
190 214
     /** 外协核算费用 */
@@ -329,6 +353,15 @@ public class CmcBudget extends BaseEntity
329 353
     {
330 354
         return businessExpense;
331 355
     }
356
+    public void setBusinessCost(BigDecimal businessCost)
357
+    {
358
+        this.businessCost = businessCost;
359
+    }
360
+
361
+    public BigDecimal getBusinessCost()
362
+    {
363
+        return businessCost;
364
+    }
332 365
     public void setTaxExpense(BigDecimal taxExpense)
333 366
     {
334 367
         this.taxExpense = taxExpense;
@@ -677,6 +710,51 @@ public class CmcBudget extends BaseEntity
677 710
     {
678 711
         return travelAdjust;
679 712
     }
713
+    public void setStaffAdjust(BigDecimal staffAdjust)
714
+    {
715
+        this.staffAdjust = staffAdjust;
716
+    }
717
+
718
+    public BigDecimal getStaffAdjust()
719
+    {
720
+        return staffAdjust;
721
+    }
722
+    public void setCarAdjust(BigDecimal carAdjust)
723
+    {
724
+        this.carAdjust = carAdjust;
725
+    }
726
+
727
+    public BigDecimal getCarAdjust()
728
+    {
729
+        return carAdjust;
730
+    }
731
+    public void setDeviceAdjust(BigDecimal deviceAdjust)
732
+    {
733
+        this.deviceAdjust = deviceAdjust;
734
+    }
735
+
736
+    public BigDecimal getDeviceAdjust()
737
+    {
738
+        return deviceAdjust;
739
+    }
740
+    public void setBusinessAdjust(BigDecimal businessAdjust)
741
+    {
742
+        this.businessAdjust = businessAdjust;
743
+    }
744
+
745
+    public BigDecimal getBusinessAdjust()
746
+    {
747
+        return businessAdjust;
748
+    }
749
+    public void setOtherCost(BigDecimal otherCost)
750
+    {
751
+        this.otherCost = otherCost;
752
+    }
753
+
754
+    public BigDecimal getOtherCost()
755
+    {
756
+        return otherCost;
757
+    }
680 758
     public void setProcInstId(String procInstId)
681 759
     {
682 760
         this.procInstId = procInstId;
@@ -699,6 +777,7 @@ public class CmcBudget extends BaseEntity
699 777
                 .append("settleExpense", getSettleExpense())
700 778
                 .append("outExpense", getOutExpense())
701 779
                 .append("businessExpense", getBusinessExpense())
780
+                .append("businessCost", getBusinessCost())
702 781
                 .append("rentExpense", getRentExpense())
703 782
                 .append("otherExpense", getOtherExpense())
704 783
                 .append("outRemark", getOutRemark())
@@ -711,6 +790,10 @@ public class CmcBudget extends BaseEntity
711 790
                 .append("compiler", getCompiler())
712 791
                 .append("auditor", getAuditor())
713 792
                 .append("createTime", getCreateTime())
793
+                .append("staffAdjust", getStaffAdjust())
794
+                .append("carAdjust", getCarAdjust())
795
+                .append("deviceAdjust", getDeviceAdjust())
796
+                .append("businessAdjust", getBusinessAdjust())
714 797
                 .toString();
715 798
     }
716 799
 }

+ 27
- 3
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcBudgetMapper.xml Parādīt failu

@@ -14,6 +14,7 @@
14 14
         <result property="settleExpense"    column="settle_expense"    />
15 15
         <result property="outExpense"    column="out_expense"    />
16 16
         <result property="businessExpense"    column="business_expense"    />
17
+        <result property="businessCost"    column="business_cost"    />
17 18
         <result property="taxExpense"    column="tax_expense"    />
18 19
         <result property="rentExpense"    column="rent_expense"    />
19 20
         <result property="otherExpense"    column="other_expense"    />
@@ -49,7 +50,12 @@
49 50
         <result property="letterAdjust"    column="letter_adjust"    />
50 51
         <result property="winAdjust"    column="win_adjust"    />
51 52
         <result property="travelAdjust"    column="travel_adjust"    />
53
+        <result property="staffAdjust"    column="staff_adjust"    />
54
+        <result property="carAdjust"    column="car_adjust"    />
55
+        <result property="deviceAdjust"    column="device_adjust"    />
56
+        <result property="businessAdjust"    column="business_adjust"    />
52 57
         <result property="siteCost"    column="site_cost"    />
58
+        <result property="otherCost"    column="other_cost"    />
53 59
         <result property="siteAdjust"    column="site_adjust"    />
54 60
         <result property="procInstId"    column="proc_inst_id"    />
55 61
         <association property="compilerUser"    javaType="SysUser"         resultMap="CompilerResult" />
@@ -86,11 +92,11 @@
86 92
     </resultMap>
87 93
 
88 94
     <sql id="selectCmcBudgetVo">
89
-        select b.budget_id, b.project_id, p.project_number, p.project_name, b.staff_cost, b.car_cost, b.device_cost, b.fix_cost, b.settle_expense, b.out_expense, b.business_expense, b.tax_expense,
90
-               b.rent_expense, b.other_expense, b.out_remark, b.business_remark, b.tax_remark, b.rent_remark, b.other_remark, b.direct_expense, b.total_budget, b.compiler, b.site_cost, b.site_adjust,
95
+        select b.budget_id, b.project_id, p.project_number, p.project_name, b.staff_cost, b.car_cost, b.device_cost, b.fix_cost, b.settle_expense, b.out_expense, b.business_expense, b.business_cost, b.tax_expense,
96
+               b.rent_expense, b.other_expense, b.out_remark, b.business_remark, b.tax_remark, b.rent_remark, b.other_remark, b.direct_expense, b.total_budget, b.compiler, b.site_cost, b.other_cost, b.site_adjust,
91 97
                u.nick_name as compiler_nick_name, b.manager, u1.nick_name as manager_nick_name, b.auditor, u2.nick_name as zjl_nick_name, b.approver, u3.nick_name as dsz_nick_name, b.create_time, b.manager_time, b.zjl_time, b.dsz_time,
92 98
                b.manager_comment, b.zjl_comment, b.dsz_comment, b.remark, b.document, b.letter_expense, b.win_expense, b.travel_expense, b.settle_adjust, b.letter_remark, b.travel_remark, b.win_remark,
93
-               b.out_adjust, b.tax_adjust, b.letter_adjust, b.win_adjust, b.travel_adjust, b.proc_inst_id from cmc_budget as b
99
+               b.out_adjust, b.tax_adjust, b.letter_adjust, b.win_adjust, b.travel_adjust, b.staff_adjust, b.car_adjust, b.device_adjust, b.business_adjust, b.proc_inst_id from cmc_budget as b
94 100
             left join sys_user as u on u.user_id = b.compiler
95 101
             left join sys_user as u1 on u1.user_id = b.manager
96 102
             left join sys_user as u2 on u2.user_id = b.auditor
@@ -138,6 +144,7 @@
138 144
             <if test="settleExpense != null">settle_expense,</if>
139 145
             <if test="outExpense != null">out_expense,</if>
140 146
             <if test="businessExpense != null">business_expense,</if>
147
+            <if test="businessCost != null">business_cost,</if>
141 148
             <if test="taxExpense != null">tax_expense,</if>
142 149
             <if test="rentExpense != null">rent_expense,</if>
143 150
             <if test="otherExpense != null">other_expense,</if>
@@ -172,8 +179,13 @@
172 179
             <if test="letterAdjust != null">letter_adjust,</if>
173 180
             <if test="winAdjust != null">win_adjust,</if>
174 181
             <if test="travelAdjust != null">travel_adjust,</if>
182
+            <if test="staffAdjust != null">staff_adjust,</if>
183
+            <if test="carAdjust != null">car_adjust,</if>
184
+            <if test="deviceAdjust != null">device_adjust,</if>
185
+            <if test="businessAdjust != null">business_adjust,</if>
175 186
             <if test="procInstId != null">proc_inst_id,</if>
176 187
             <if test="siteCost != null">site_cost,</if>
188
+            <if test="otherCost != null">other_cost,</if>
177 189
             <if test="siteAdjust != null">site_adjust,</if>
178 190
             create_time
179 191
         </trim>
@@ -187,6 +199,7 @@
187 199
             <if test="settleExpense != null">#{settleExpense},</if>
188 200
             <if test="outExpense != null">#{outExpense},</if>
189 201
             <if test="businessExpense != null">#{businessExpense},</if>
202
+            <if test="businessCost != null">#{businessCost},</if>
190 203
             <if test="taxExpense != null">#{taxExpense},</if>
191 204
             <if test="rentExpense != null">#{rentExpense},</if>
192 205
             <if test="otherExpense != null">#{otherExpense},</if>
@@ -221,8 +234,13 @@
221 234
             <if test="letterAdjust != null">#{letterAdjust},</if>
222 235
             <if test="winAdjust != null">#{winAdjust},</if>
223 236
             <if test="travelAdjust != null">#{travelAdjust},</if>
237
+            <if test="staffAdjust != null">#{staffAdjust},</if>
238
+            <if test="carAdjust != null">#{carAdjust},</if>
239
+            <if test="deviceAdjust != null">#{deviceAdjust},</if>
240
+            <if test="businessAdjust != null">#{businessAdjust},</if>
224 241
             <if test="procInstId != null">#{procInstId},</if>
225 242
             <if test="siteCost != null">#{siteCost},</if>
243
+            <if test="otherCost != null">#{otherCost},</if>
226 244
             <if test="siteAdjust != null">#{siteAdjust},</if>
227 245
             sysdate()
228 246
         </trim>
@@ -239,6 +257,7 @@
239 257
             <if test="settleExpense != null">settle_expense = #{settleExpense},</if>
240 258
             <if test="outExpense != null">out_expense = #{outExpense},</if>
241 259
             <if test="businessExpense != null">business_expense = #{businessExpense},</if>
260
+            <if test="businessCost != null">business_cost = #{businessCost},</if>
242 261
             <if test="taxExpense != null">tax_expense = #{taxExpense},</if>
243 262
             <if test="rentExpense != null">rent_expense = #{rentExpense},</if>
244 263
             <if test="otherExpense != null">other_expense = #{otherExpense},</if>
@@ -274,8 +293,13 @@
274 293
             <if test="letterAdjust != null">letter_adjust = #{letterAdjust},</if>
275 294
             <if test="winAdjust != null">win_adjust = #{winAdjust},</if>
276 295
             <if test="travelAdjust != null">travel_adjust = #{travelAdjust},</if>
296
+            <if test="staffAdjust != null">staff_adjust = #{staffAdjust},</if>
297
+            <if test="carAdjust != null">car_adjust = #{carAdjust},</if>
298
+            <if test="deviceAdjust != null">device_adjust = #{deviceAdjust},</if>
299
+            <if test="businessAdjust != null">business_adjust = #{businessAdjust},</if>
277 300
             <if test="procInstId != null">proc_inst_id = #{procInstId},</if>
278 301
             <if test="siteCost != null">site_cost = #{siteCost},</if>
302
+            <if test="otherCost != null">other_cost = #{otherCost},</if>
279 303
             <if test="siteAdjust != null">site_adjust = #{siteAdjust},</if>
280 304
         </trim>
281 305
         where budget_id = #{budgetId}

+ 2
- 1
oa-ui/src/api/llm/agent.js Parādīt failu

@@ -65,8 +65,9 @@ export function uploadFile(file, agentName) {
65 65
 }
66 66
 
67 67
 // 上传单文件
68
-export function uploadModifyFile(file, agentName) {
68
+export function uploadModifyFile(topicId, file, agentName) {
69 69
   const formData = new FormData()
70
+  formData.append('topicId', topicId)
70 71
   formData.append('file', file)
71 72
   formData.append('agentName', agentName)
72 73
   return request({

+ 1
- 1
oa-ui/src/utils/request.js Parādīt failu

@@ -17,7 +17,7 @@ const service = axios.create({
17 17
   // axios中请求配置有baseURL选项,表示请求URL公共部分
18 18
   baseURL: process.env.VUE_APP_BASE_API,
19 19
   // 超时
20
-  timeout: 300000 //5分钟
20
+  timeout: 1800000 //30分钟
21 21
 })
22 22
 
23 23
 // request拦截器

+ 1
- 1
oa-ui/src/views/file/filesProject/project.vue Parādīt failu

@@ -451,7 +451,7 @@ export default {
451 451
   /* ------------------------------------------------------------------------------------------------------------ */
452 452
   /* 获取项目列表 */
453 453
   methods: {
454
-    getProList() {
454
+    async getProList() {
455 455
       this.loading = true;
456 456
       if (this.$store.getters.roles.includes('projectLeader') && !this.$store.getters.roles.includes('leader')) {
457 457
         this.queryParams.projectLeader = this.$store.getters.userId

+ 11
- 4
oa-ui/src/views/file/index.vue Parādīt failu

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-06-21 18:51:49
4 4
  * @LastEditors: wrh
5
- * @LastEditTime: 2024-09-06 15:52:46
5
+ * @LastEditTime: 2026-02-03 11:35:08
6 6
 -->
7 7
 <template>
8 8
   <div class="warpper-container">
@@ -342,6 +342,10 @@ export default {
342 342
       pageNum: 1,
343 343
       pageSize: 10000,
344 344
     }
345
+    if (this.$store.getters.roles.includes('projectLeader') && !this.$store.getters.roles.includes('leader')) {
346
+      param.projectLeader = this.$store.getters.userId
347
+      this.queryParams.projectLeader = this.$store.getters.userId
348
+    }
345 349
     this.getProjectCluster(param); //地图数据集cluster对应allproTableData,此值不变    
346 350
     this.getProjectList(this.queryParams); //项目列表对应projectList,此值随搜索变化
347 351
   },
@@ -499,8 +503,8 @@ export default {
499 503
             that.map.removeInteraction(that.drawBox);
500 504
           }
501 505
         } else if (e && e.keyCode == 13) {
502
-        let newArray = that.seletctedCluters.join(',');
503
-          getInfoByProjectNumbers({projectNumber: newArray, pageSize: that.queryParams.pageSize, pageNum: that.queryParams.pageNum}).then(res => {
506
+          let newArray = that.seletctedCluters.join(',');
507
+          getInfoByProjectNumbers({ projectNumber: newArray, pageSize: that.queryParams.pageSize, pageNum: that.queryParams.pageNum }).then(res => {
504 508
             if (res.total > 0) {
505 509
               that.projectList = res.rows;
506 510
               that.total = res.total;
@@ -786,7 +790,7 @@ export default {
786 790
       this.queryParams.pageNum = val
787 791
       if (this.seletctedCluters != []) {
788 792
         let newArray = this.seletctedCluters.join(',');
789
-        getInfoByProjectNumbers({projectNumber: newArray, pageSize: this.queryParams.pageSize, pageNum: this.queryParams.pageNum}).then(res => {
793
+        getInfoByProjectNumbers({ projectNumber: newArray, pageSize: this.queryParams.pageSize, pageNum: this.queryParams.pageNum }).then(res => {
790 794
           if (res.total > 0) {
791 795
             this.projectList = res.rows;
792 796
             this.total = res.total;
@@ -962,6 +966,9 @@ export default {
962 966
           projectType: this.searchVal
963 967
         }
964 968
       }
969
+      if (this.$store.getters.roles.includes('projectLeader') && !this.$store.getters.roles.includes('leader')) {
970
+        param.projectLeader = this.$store.getters.userId
971
+      }
965 972
       listProject(param).then(res => {
966 973
         let data = res.rows;
967 974
         this.projectList = data;

+ 4
- 1
oa-ui/src/views/file/index/projectLayer.vue Parādīt failu

@@ -4,7 +4,7 @@
4 4
  * @Author: ysh
5 5
  * @Date: 2022-10-20 17:27:09
6 6
  * @LastEditors: wrh
7
- * @LastEditTime: 2025-01-02 09:29:11
7
+ * @LastEditTime: 2026-02-03 10:50:07
8 8
 -->
9 9
 <template>
10 10
   <div class="layer-box">
@@ -99,6 +99,9 @@ export default {
99 99
         pageNum: 1,
100 100
         pageSize: 99999999
101 101
       }
102
+      if (this.$store.getters.roles.includes('projectLeader') && !this.$store.getters.roles.includes('leader')) {
103
+        param.projectLeader = this.$store.getters.userId
104
+      }
102 105
       listProject(param).then(res => {
103 106
         if (res.code == 200) {
104 107
           let alldata = res.rows;

+ 1
- 0
oa-ui/src/views/flowable/form/budget/addBudget.vue Parādīt failu

@@ -437,6 +437,7 @@ export default {
437 437
       this.$set(this.budgetForm, "winExpense", val.winExpense);
438 438
       this.$set(this.budgetForm, "taxExpense", val.taxExpense);
439 439
       this.$set(this.budgetForm, "travelExpense", val.travelExpense);
440
+      this.$set(this.budgetForm, "businessCost", val.outExpense + val.letterExpense + val.winExpense + val.taxExpense + val.travelExpense);
440 441
     },
441 442
     getFixCost() {
442 443
       const staffCost = this.safeNumber(this.budgetForm.staffCost);

+ 12
- 1
oa-ui/src/views/flowable/form/budget/adjust/budgetAdjust.vue Parādīt failu

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2025-05-07 11:01:39
4 4
  * @LastEditors: wrh
5
- * @LastEditTime: 2025-12-31 16:45:31
5
+ * @LastEditTime: 2026-02-02 11:09:36
6 6
 -->
7 7
 <template>
8 8
   <div class="main">
@@ -741,6 +741,8 @@ export default {
741 741
       let innerSum = this.innerStaffList.reduce((sum, staff) => sum + (Number(staff.amountAdjust) || 0), 0)
742 742
       let outerSum = this.outerStaffList.reduce((sum, staff) => sum + (Number(staff.amountAdjust) || 0), 0)
743 743
       this.checkStaffCost = (innerSum + outerSum).toFixed(2);
744
+      // 计算人员核算成本
745
+      this.budgetForm.staffAdjust = this.checkStaffCost;
744 746
       this.getTotalBudgetAdjust();
745 747
     },
746 748
 
@@ -750,18 +752,24 @@ export default {
750 752
       let innerSum = this.innerStaffList.reduce((sum, staff) => sum + (Number(staff.amountAdjust) || 0), 0)
751 753
       let outerSum = this.outerStaffList.reduce((sum, staff) => sum + (Number(staff.amountAdjust) || 0), 0)
752 754
       this.checkStaffCost = (innerSum + outerSum).toFixed(2);
755
+      // 计算人员核算成本
756
+      this.budgetForm.staffAdjust = this.checkStaffCost;
753 757
       this.getTotalBudgetAdjust();
754 758
     },
755 759
     // 处理车辆数据变化
756 760
     handleCarChange(newList) {
757 761
       this.carList = newList;
758 762
       this.checkCarCost = this.carList.reduce((sum, car) => sum + (Number(car.amountAdjust) || 0), 0).toFixed(2);
763
+      // 计算车辆核算成本
764
+      this.budgetForm.carAdjust = this.checkCarCost;
759 765
       this.getTotalBudgetAdjust();
760 766
     },
761 767
     // 处理设备数据变化
762 768
     handleDeviceChange(newList) {
763 769
       this.deviceList = newList;
764 770
       this.checkDeviceCost = this.deviceList.reduce((sum, device) => sum + (Number(device.amountAdjust) || 0), 0).toFixed(2);
771
+      // 计算设备核算成本
772
+      this.budgetForm.deviceAdjust = this.checkDeviceCost;
765 773
       this.getTotalBudgetAdjust();
766 774
     },
767 775
     // 处理现场开支数据变化
@@ -796,12 +804,15 @@ export default {
796 804
         Number(newData.winAdjust || 0) +
797 805
         Number(newData.taxAdjust || 0) +
798 806
         Number(newData.travelAdjust || 0);
807
+      // 计算经营相关核算成本
808
+      this.budgetForm.businessAdjust = this.checkJYAmount;
799 809
       this.getTotalBudgetAdjust();
800 810
     },
801 811
     // 处理预算外开销数据变化
802 812
     handleOtherChange(newList) {
803 813
       this.otherList = newList;
804 814
       this.checkOtherCost = this.otherList.reduce((sum, other) => sum + (Number(other.amountAdjust) || 0), 0).toFixed(2);
815
+      this.budgetForm.otherCost = this.checkOtherCost
805 816
       this.getTotalBudgetAdjust();
806 817
     },
807 818
     getTotalBudgetAdjust() {

+ 1
- 1
oa-ui/src/views/flowable/form/budget/adjust/components/CarCost.vue Parādīt failu

@@ -97,7 +97,7 @@ export default {
97 97
       this.isOpenCar = true;
98 98
     },
99 99
     removeCar(car, index) {
100
-      this.$confirm('确移除【' + car.car.licensePlate + '】吗', '提示', {
100
+      this.$confirm('确移除【' + car.car.licensePlate + '】吗', '提示', {
101 101
         confirmButtonText: '确定',
102 102
         cancelButtonText: '取消',
103 103
         type: 'warning'

+ 1
- 1
oa-ui/src/views/flowable/form/budget/adjust/components/DeviceCost.vue Parādīt failu

@@ -95,7 +95,7 @@ export default {
95 95
       this.isOpenDevice = true;
96 96
     },
97 97
     removeDevice(device, index) {
98
-      this.$confirm('确移除【' + device.device.name + '】吗', '提示', {
98
+      this.$confirm('确移除【' + device.device.name + '】吗', '提示', {
99 99
         confirmButtonText: '确定',
100 100
         cancelButtonText: '取消',
101 101
         type: 'warning'

+ 1
- 1
oa-ui/src/views/flowable/form/budget/adjust/components/InnerStaffCost.vue Parādīt failu

@@ -138,7 +138,7 @@ export default {
138 138
       this.$emit('update:staffList', this.staffList);
139 139
     },
140 140
     removeStaff(staff, index) {
141
-      this.$confirm('确移除【' + staff.user.nickName + '】吗', '提示', {
141
+      this.$confirm('确移除【' + staff.user.nickName + '】吗', '提示', {
142 142
         confirmButtonText: '确定',
143 143
         cancelButtonText: '取消',
144 144
         type: 'warning'

+ 1
- 1
oa-ui/src/views/flowable/form/budget/adjust/components/OuterStaffCost.vue Parādīt failu

@@ -152,7 +152,7 @@ export default {
152 152
       this.$emit('update:staffList', this.staffList);
153 153
     },
154 154
     removeStaff(staff, index) {
155
-      this.$confirm('确移除【' + staff.user.nickName + '】吗', '提示', {
155
+      this.$confirm('确移除【' + staff.user.nickName + '】吗', '提示', {
156 156
         confirmButtonText: '确定',
157 157
         cancelButtonText: '取消',
158 158
         type: 'warning'

+ 3
- 3
oa-ui/src/views/flowable/form/budget/adjust/components/otherCost.vue Parādīt failu

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: ysh
3 3
  * @Date: 2025-05-16 10:34:57
4
- * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-05-16 11:06:49
4
+ * @LastEditors: wrh
5
+ * @LastEditTime: 2026-02-02 14:54:12
6 6
 -->
7 7
 <template>
8 8
   <div class="other-cost">
@@ -92,7 +92,7 @@ export default {
92 92
       });
93 93
     },
94 94
     removeOther(other, index) {
95
-      this.$confirm('确移除【' + other.name + '】吗', '提示', {
95
+      this.$confirm('确移除【' + other.name + '】吗', '提示', {
96 96
         confirmButtonText: '确定',
97 97
         cancelButtonText: '取消',
98 98
         type: 'warning'

+ 10
- 3
oa-ui/src/views/flowable/form/budget/components/chooseDevice.vue Parādīt failu

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: ysh
3 3
  * @Date: 2024-06-21 18:51:51
4
- * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-07-03 16:38:50
4
+ * @LastEditors: wrh
5
+ * @LastEditTime: 2026-02-03 15:32:30
6 6
 -->
7 7
 <template>
8 8
   <div>
@@ -17,6 +17,7 @@
17 17
           <el-option :value="'2'" label="维修中"></el-option>
18 18
           <el-option :value="'3'" label="已停用"></el-option>
19 19
           <el-option :value="'4'" label="已报废"></el-option>
20
+          <el-option :value="'5'" label="已处置"></el-option>
20 21
         </el-select>
21 22
       </el-form-item>
22 23
       <el-form-item label="设备名称:">
@@ -206,6 +207,9 @@ export default {
206 207
       if (row == '4') {
207 208
         return '已报废'
208 209
       }
210
+      if (row == '5') {
211
+        return '已处置'
212
+      }
209 213
     },
210 214
     statusType(row) {
211 215
       if (row == '0') {
@@ -215,7 +219,7 @@ export default {
215 219
         return 'success'
216 220
       }
217 221
       if (row == '2') {
218
-        return 'info'
222
+        return 'primary'
219 223
       }
220 224
       if (row == '3') {
221 225
         return 'danger'
@@ -223,6 +227,9 @@ export default {
223 227
       if (row == '4') {
224 228
         return 'info'
225 229
       }
230
+      if (row == '5') {
231
+        return ''
232
+      }
226 233
     },
227 234
     formatChooseList() {
228 235
       if (this.chooseList.name) {

+ 2
- 2
oa-ui/src/views/flowable/form/finance/borrowForm.vue Parādīt failu

@@ -105,7 +105,7 @@
105 105
                 <el-input v-model="detail.applyAmount" :disabled="taskName != '借款申请'"></el-input>
106 106
               </td>
107 107
               <td v-if="form.borrowUsage == 0 || form.borrowUsage == 1">
108
-                <el-input v-model="detail.managerAmount" :disabled="taskName != '分管审核'"
108
+                <el-input v-model="detail.managerAmount" :disabled="taskName != '分管审核' && taskName != '总经理审核'"
109 109
                   @blur="calculateManagerAmount(detail)"></el-input>
110 110
               </td>
111 111
               <td>
@@ -150,7 +150,7 @@
150 150
             <el-col :span="12" :xs="24">
151 151
               <el-form-item label="核准金额" prop="managerAmount">
152 152
                 <el-input v-model="form.managerAmount" placeholder="请输入核准金额"
153
-                  :disabled="taskName != '分管审核' && taskName != '党工团审核'" />
153
+                  :disabled="taskName != '分管审核' && taskName != '总经理审核' && taskName != '党工团审核'" />
154 154
                 <span style="color:#E74C3C" v-if="exceed && form.managerAmount && form.borrowUsage == 0">超过预算金额:{{
155 155
                   getMoreAmount('1') }}</span>
156 156
               </el-form-item>

+ 11
- 3
oa-ui/src/views/llm/agent/AgentDetail.vue Parādīt failu

@@ -2,7 +2,7 @@
2 2
  * @Author: wrh
3 3
  * @Date: 2025-01-01 00:00:00
4 4
  * @LastEditors: wrh
5
- * @LastEditTime: 2026-01-19 15:28:10
5
+ * @LastEditTime: 2026-02-07 15:49:42
6 6
 -->
7 7
 <template>
8 8
   <div class="agent-detail-container" v-loading="loading">
@@ -92,6 +92,8 @@
92 92
                       </el-button>
93 93
                   </div>
94 94
                   <div v-if="percentageDisplay">
95
+                    <p class="upload-tip"> </p>
96
+                    <p class="upload-tip">{{step}}</p>
95 97
                     <el-progress :percentage="percentage" :stroke-width="25" :text-inside="true">
96 98
                       <el-button text>{{ progress }}</el-button>
97 99
                     </el-progress>
@@ -143,6 +145,8 @@
143 145
                       </el-button>
144 146
                   </div>
145 147
                   <div v-if="percentageDisplay">
148
+                    <p class="upload-tip"> </p>
149
+                    <p class="upload-tip">{{step}}</p>
146 150
                     <el-progress :percentage="percentage" :stroke-width="25" :text-inside="true">
147 151
                       <el-button text>{{ progress }}</el-button>
148 152
                     </el-progress>
@@ -220,6 +224,7 @@ export default {
220 224
       chatTitle: '智能体新对话',
221 225
       percentage: 0,
222 226
       progress: "",
227
+      step: "",
223 228
       percentageDisplay: false,
224 229
       techUploadDisplay: false,
225 230
       selectDocument: '',
@@ -373,6 +378,7 @@ export default {
373 378
 
374 379
         if (hasMessages) {
375 380
           this.$message.success(`已加载话题"${topic.topic}"的对话记录`)
381
+          this.techUploadDisplay = true;
376 382
         } else {
377 383
           this.$message.info('该话题暂无对话记录')
378 384
         }
@@ -576,6 +582,7 @@ export default {
576 582
             getProcessValue().then(res => {
577 583
               if (res.code == 200 & res.msg.includes(":")) {
578 584
                 this.progress = res.msg;
585
+                this.step = res.msg.split(":")[0]
579 586
                 this.percentage = Number(res.msg.split(":")[1].replace("%", ""))
580 587
               }
581 588
             });
@@ -601,7 +608,7 @@ export default {
601 608
               isHtml: true // 标记这是HTML内容
602 609
             }
603 610
             this.chatMessages.push(uploadMessage);
604
-            if (this.agentInfo.agentName.includes('技术文件'))
611
+            if (this.agentInfo.agentName.includes('技术'))
605 612
               this.techUploadDisplay = true;
606 613
             // this.$message.success('文件上传成功');
607 614
             let topicRes = await addTopic({ agentId: this.agentId, topic: fileName });
@@ -669,6 +676,7 @@ export default {
669 676
             getProcessValue().then(res => {
670 677
               if (res.code == 200 & res.msg.includes(":")) {
671 678
                 this.progress = res.msg;
679
+                this.step = res.msg.split(":")[0]
672 680
                 this.percentage = Number(res.msg.split(":")[1].replace("%", ""))
673 681
               }
674 682
             });
@@ -678,7 +686,7 @@ export default {
678 686
         const file = this.chatFileList[0].raw // 只取第一个文件
679 687
         const fileName = file.name;
680 688
         try {
681
-          const response = await uploadModifyFile(file, this.agentInfo.agentName)
689
+          const response = await uploadModifyFile(this.currentTopicId, file, this.agentInfo.agentName)
682 690
           const chatId = response.data.chatId; //获取保存后的chatId
683 691
           // 解析返回的数据
684 692
           if (response.data && response.data.assistantMessage) {

+ 7
- 1
oa-ui/src/views/oa/device/detail.vue Parādīt failu

@@ -890,8 +890,11 @@ export default {
890 890
       if (row == '4') {
891 891
         return '已报废'
892 892
       }
893
+      if (row == '5') {
894
+        return '已处置'
895
+      }
893 896
     },
894
-    statusTypeStyle(row) {
897
+    statusType(row) {
895 898
       if (row == '0') {
896 899
         return 'warning'
897 900
       }
@@ -907,6 +910,9 @@ export default {
907 910
       if (row == '4') {
908 911
         return 'info'
909 912
       }
913
+      if (row == '5') {
914
+        return ''
915
+      }
910 916
     }
911 917
   },
912 918
 }

+ 9
- 1
oa-ui/src/views/oa/device/index.vue Parādīt failu

@@ -13,6 +13,8 @@
13 13
           </el-option>
14 14
           <el-option key="4" label="已报废" value="4">
15 15
           </el-option>
16
+          <el-option key="5" label="已处置" value="5">
17
+          </el-option>
16 18
         </el-select>
17 19
       </el-form-item>
18 20
       <el-form-item label="出厂编号" prop="name">
@@ -235,7 +237,7 @@ export default {
235 237
       // cmc设备信息表格数据
236 238
       deviceList: [],
237 239
       deptList: [],
238
-      statusList: [{ id: '0', name: '被领用' }, { id: '1', name: '可领用' }, { id: '2', name: '维修中' }, { id: '3', name: '已停用' }, { id: '4', name: '已报废' }],
240
+      statusList: [{ id: '0', name: '被领用' }, { id: '1', name: '可领用' }, { id: '2', name: '维修中' }, { id: '3', name: '已停用' }, { id: '4', name: '已报废' }, { id: '5', name: '已处置' }],
239 241
       // 弹出层标题
240 242
       title: "",
241 243
       // 是否显示弹出层
@@ -402,6 +404,9 @@ export default {
402 404
       if (row == '4') {
403 405
         return '已报废'
404 406
       }
407
+      if (row == '5') {
408
+        return '已处置'
409
+      }
405 410
     },
406 411
     statusTypeStyle(row) {
407 412
       if (row == '0') {
@@ -419,6 +424,9 @@ export default {
419 424
       if (row == '4') {
420 425
         return 'info'
421 426
       }
427
+      if (row == '5') {
428
+        return ''
429
+      }
422 430
     }
423 431
   }
424 432
 };

+ 9
- 2
oa-ui/src/views/oa/supply/deviceList.vue Parādīt failu

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: ysh
3 3
  * @Date: 2024-06-21 18:51:51
4
- * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2025-03-06 17:03:13
4
+ * @LastEditors: wrh
5
+ * @LastEditTime: 2026-02-03 15:35:12
6 6
 -->
7 7
 <template>
8 8
   <div>
@@ -23,6 +23,7 @@
23 23
           <el-option :value="'2'" label="维修中"></el-option>
24 24
           <el-option :value="'3'" label="已停用"></el-option>
25 25
           <el-option :value="'4'" label="已报废"></el-option>
26
+          <el-option :value="'5'" label="已处置"></el-option>
26 27
         </el-select>
27 28
       </el-form-item>
28 29
       <el-form-item label="设备名称:">
@@ -181,6 +182,9 @@ export default {
181 182
       if (row == '4') {
182 183
         return '已报废'
183 184
       }
185
+      if (row == '5') {
186
+        return '已处置'
187
+      }
184 188
     },
185 189
     statusType(row) {
186 190
       if (row == '0') {
@@ -198,6 +202,9 @@ export default {
198 202
       if (row == '4') {
199 203
         return 'info'
200 204
       }
205
+      if (row == '5') {
206
+        return ''
207
+      }
201 208
     },
202 209
     formatChooseList() {
203 210
       if (this.chooseList.name) {

+ 8
- 0
oa-ui/src/views/oa/supply/index.vue Parādīt failu

@@ -13,6 +13,8 @@
13 13
           </el-option>
14 14
           <el-option key="4" label="已报废" value="4">
15 15
           </el-option>
16
+          <el-option key="5" label="已处置" value="5">
17
+          </el-option>
16 18
         </el-select>
17 19
       </el-form-item>
18 20
       <el-form-item label="设备编码" prop="deviceNumber">
@@ -388,6 +390,9 @@ export default {
388 390
       if (row == '4') {
389 391
         return '已报废'
390 392
       }
393
+      if (row == '5') {
394
+        return '已处置'
395
+      }
391 396
     },
392 397
     statusTypeStyle(row) {
393 398
       if (row == '0') {
@@ -405,6 +410,9 @@ export default {
405 410
       if (row == '4') {
406 411
         return 'info'
407 412
       }
413
+      if (row == '5') {
414
+        return ''
415
+      }
408 416
     }
409 417
   }
410 418
 };

Notiek ielāde…
Atcelt
Saglabāt