lamphua 2 settimane fa
parent
commit
98c119b345
30 ha cambiato i file con 372 aggiunte e 82 eliminazioni
  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 Vedi File

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

+ 25
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcProjectController.java Vedi File

9
 
9
 
10
 import com.alibaba.fastjson2.JSONArray;
10
 import com.alibaba.fastjson2.JSONArray;
11
 import com.alibaba.fastjson2.JSONObject;
11
 import com.alibaba.fastjson2.JSONObject;
12
+import com.ruoyi.common.core.domain.entity.SysRole;
12
 import com.ruoyi.common.core.domain.entity.SysUser;
13
 import com.ruoyi.common.core.domain.entity.SysUser;
13
 import com.ruoyi.common.utils.StringUtils;
14
 import com.ruoyi.common.utils.StringUtils;
14
 import com.ruoyi.file.domain.FilesAchievement;
15
 import com.ruoyi.file.domain.FilesAchievement;
15
 import com.ruoyi.file.service.IFilesAchievementService;
16
 import com.ruoyi.file.service.IFilesAchievementService;
16
 import com.ruoyi.oa.domain.*;
17
 import com.ruoyi.oa.domain.*;
17
 import com.ruoyi.oa.service.*;
18
 import com.ruoyi.oa.service.*;
19
+import com.ruoyi.system.domain.SysUserRole;
18
 import com.ruoyi.system.service.ISysDeptService;
20
 import com.ruoyi.system.service.ISysDeptService;
21
+import com.ruoyi.system.service.ISysRoleService;
19
 import com.ruoyi.system.service.ISysUserService;
22
 import com.ruoyi.system.service.ISysUserService;
20
 import com.ruoyi.web.controller.qyweixin.MessageController;
23
 import com.ruoyi.web.controller.qyweixin.MessageController;
21
 import org.springframework.beans.factory.annotation.Autowired;
24
 import org.springframework.beans.factory.annotation.Autowired;
58
     @Autowired
61
     @Autowired
59
     private ISysUserService userService;
62
     private ISysUserService userService;
60
 
63
 
64
+    @Autowired
65
+    private ISysRoleService roleService;
66
+
61
     @Autowired
67
     @Autowired
62
     private ICmcManageDeptService cmcManageDeptService;
68
     private ICmcManageDeptService cmcManageDeptService;
63
 
69
 
349
     @PutMapping
355
     @PutMapping
350
     public AjaxResult edit(@RequestBody CmcProject cmcProject)
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
         return toAjax(cmcProjectService.updateCmcProject(cmcProject));
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 Vedi File

80
         if (milvusServiceUrl == null || milvusServiceUrl.isEmpty()) {
80
         if (milvusServiceUrl == null || milvusServiceUrl.isEmpty()) {
81
             throw new IllegalStateException("Milvus service URL 未配置");
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
      * 调用LLM+RAG(外部文件+知识库)生成回答
89
      * 调用LLM+RAG(外部文件+知识库)生成回答

+ 2
- 2
oa-back/ruoyi-llm/src/main/java/com/ruoyi/web/llm/controller/CmcAgentController.java Vedi File

94
      * @return
94
      * @return
95
      */
95
      */
96
     @PostMapping("/modifyFile")
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 Vedi File

91
                 "2. 如果需要查询数据,调用SQLQuery工具并传入正确的SQL语句  \n" +
91
                 "2. 如果需要查询数据,调用SQLQuery工具并传入正确的SQL语句  \n" +
92
                 "3. 生成标准MYSQL查询语句,根据语义和字段类型使用COUNT/SUM/AVG等聚合函数  \n" +
92
                 "3. 生成标准MYSQL查询语句,根据语义和字段类型使用COUNT/SUM/AVG等聚合函数  \n" +
93
                 "4. 如果单表字段不满足查询需求,根据OA系统表结构信息进行多张表连接查询  \n" +
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
         messages.add(ChatMessage.ofUser(prompt));
97
         messages.add(ChatMessage.ofUser(prompt));
97
         ChatSession chatSession =  InMemoryChatSession.builder().messages(messages).build();
98
         ChatSession chatSession =  InMemoryChatSession.builder().messages(messages).build();
98
         ChatResponse response = chatModel.prompt(chatSession).call();
99
         ChatResponse response = chatModel.prompt(chatSession).call();

+ 53
- 4
oa-back/ruoyi-llm/src/main/java/com/ruoyi/web/llm/service/impl/LangChainMilvusServiceImpl.java Vedi File

80
         if (milvusServiceUrl == null || milvusServiceUrl.isEmpty()) {
80
         if (milvusServiceUrl == null || milvusServiceUrl.isEmpty()) {
81
             throw new IllegalArgumentException("milvusServiceUrl 配置不能为空");
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
                     data.add(jsonObject);
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
                 LoadCollectionReq loadCollectionReq = LoadCollectionReq.builder()
156
                 LoadCollectionReq loadCollectionReq = LoadCollectionReq.builder()
144
                         .collectionName(collectionName)
157
                         .collectionName(collectionName)
422
         return searchResultList;
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 Vedi File

34
         if (milvusServiceUrl == null || milvusServiceUrl.isEmpty()) {
34
         if (milvusServiceUrl == null || milvusServiceUrl.isEmpty()) {
35
             throw new IllegalArgumentException("milvusServiceUrl 配置不能为空");
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 Vedi File

53
      * @param file 文件
53
      * @param file 文件
54
      * @return 结果
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 Vedi File

8
 import com.ruoyi.llm.domain.CmcAgent;
8
 import com.ruoyi.llm.domain.CmcAgent;
9
 import com.ruoyi.llm.domain.CmcChat;
9
 import com.ruoyi.llm.domain.CmcChat;
10
 import com.ruoyi.llm.domain.CmcDocument;
10
 import com.ruoyi.llm.domain.CmcDocument;
11
+import com.ruoyi.llm.domain.CmcTopic;
11
 import com.ruoyi.llm.mapper.CmcAgentMapper;
12
 import com.ruoyi.llm.mapper.CmcAgentMapper;
12
 import com.ruoyi.llm.mapper.CmcChatMapper;
13
 import com.ruoyi.llm.mapper.CmcChatMapper;
13
 import com.ruoyi.llm.mapper.CmcDocumentMapper;
14
 import com.ruoyi.llm.mapper.CmcDocumentMapper;
37
 import org.apache.poi.hwpf.usermodel.Range;
38
 import org.apache.poi.hwpf.usermodel.Range;
38
 import org.apache.poi.xwpf.usermodel.*;
39
 import org.apache.poi.xwpf.usermodel.*;
39
 import org.apache.xmlbeans.XmlCursor;
40
 import org.apache.xmlbeans.XmlCursor;
41
+import org.checkerframework.checker.units.qual.C;
40
 import org.noear.solon.ai.chat.ChatModel;
42
 import org.noear.solon.ai.chat.ChatModel;
41
 import org.noear.solon.ai.chat.ChatResponse;
43
 import org.noear.solon.ai.chat.ChatResponse;
42
 import org.noear.solon.ai.chat.ChatSession;
44
 import org.noear.solon.ai.chat.ChatSession;
47
 import org.springframework.stereotype.Service;
49
 import org.springframework.stereotype.Service;
48
 import org.springframework.web.multipart.MultipartFile;
50
 import org.springframework.web.multipart.MultipartFile;
49
 
51
 
52
+import javax.annotation.PostConstruct;
50
 import java.io.*;
53
 import java.io.*;
54
+import java.math.BigInteger;
51
 import java.nio.file.Files;
55
 import java.nio.file.Files;
52
 import java.nio.file.Path;
56
 import java.nio.file.Path;
53
 import java.nio.file.Paths;
57
 import java.nio.file.Paths;
82
     @Value("${milvusService.url}")
86
     @Value("${milvusService.url}")
83
     private String milvusServiceUrl;
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
      * @return 结果
211
      * @return 结果
195
      */
212
      */
196
     @Override
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
         processValue = "";
215
         processValue = "";
199
         String prefixPath = "/upload/agent/" + agentName;
216
         String prefixPath = "/upload/agent/" + agentName;
200
         File profilePath = new File( RuoYiConfig.getProfile() + prefixPath);
217
         File profilePath = new File( RuoYiConfig.getProfile() + prefixPath);
211
             Files.deleteIfExists(inputFilePath);
228
             Files.deleteIfExists(inputFilePath);
212
             file.transferTo(transferFile);
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
         CmcDocument cmcDocument = new CmcDocument();
235
         CmcDocument cmcDocument = new CmcDocument();
216
         cmcDocument.setDocumentId(new SnowFlake().generateId());
236
         cmcDocument.setDocumentId(new SnowFlake().generateId());
217
         cmcDocument.setChatId(chatId);
237
         cmcDocument.setChatId(chatId);
228
             cmcChat.setUserId(SecurityUtils.getUserId());
248
             cmcChat.setUserId(SecurityUtils.getUserId());
229
             cmcChatMapper.insertCmcChat(cmcChat);
249
             cmcChatMapper.insertCmcChat(cmcChat);
230
             InputStream fileInputStream = new FileInputStream(profilePath + "/" + file.getOriginalFilename());
250
             InputStream fileInputStream = new FileInputStream(profilePath + "/" + file.getOriginalFilename());
251
+            String firstParagraphText = "";
231
             try (XWPFDocument doc = new XWPFDocument(fileInputStream)) {
252
             try (XWPFDocument doc = new XWPFDocument(fileInputStream)) {
253
+                firstParagraphText = doc.getParagraphs().get(1).getText();
232
                 // 保存文档到本地文件系统
254
                 // 保存文档到本地文件系统
233
                 try (FileOutputStream out = new FileOutputStream(profilePath + "/" + file.getOriginalFilename())) {
255
                 try (FileOutputStream out = new FileOutputStream(profilePath + "/" + file.getOriginalFilename())) {
234
                     doc.write(out);
256
                     doc.write(out);
235
                 }
257
                 }
236
             }
258
             }
237
             List<String> subTitles = extractSubTitles(profilePath + "/" + file.getOriginalFilename(), "技术文件");
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
         jsonObject.put("assistantMessage", message);
263
         jsonObject.put("assistantMessage", message);
241
         return jsonObject;
264
         return jsonObject;
337
     /**
360
     /**
338
      * 调用LLM生成回答 - 针对技术文件章节内容生成
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
         InMemoryEmbeddingStore<TextSegment> embeddingStore = new InMemoryEmbeddingStore<>();
367
         InMemoryEmbeddingStore<TextSegment> embeddingStore = new InMemoryEmbeddingStore<>();
356
         for (String title : titles) {
379
         for (String title : titles) {
357
             try {
380
             try {
358
                 // 1. 从招标文件中检索相关内容
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
                 // 2. 从知识库中检索相似章节内容
387
                 // 2. 从知识库中检索相似章节内容
362
-                List<JSONObject> knowledgeContexts = retrieveFromMilvus("technical", title, 10);
388
+                List<JSONObject> knowledgeContexts = retrieveFromMilvus("technical", title, 10, "file_type != '标题'", firstParagraphSubTitles);
363
 
389
 
364
                 // 3. 构建针对该章节的提示语
390
                 // 3. 构建针对该章节的提示语
365
                 String prompt = buildChapterPrompt(title, tenderContent, knowledgeContexts);
391
                 String prompt = buildChapterPrompt(title, tenderContent, knowledgeContexts);
372
                 allGeneratedContent.append(title).append("\n").append(chapterContent).append("\n\n");
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
                 successTitles.add(title);
402
                 successTitles.add(title);
377
 
403
 
378
             } catch (Exception e) {
404
             } catch (Exception e) {
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
         List<String> relevantContent = new ArrayList<>();
437
         List<String> relevantContent = new ArrayList<>();
412
 
438
 
413
         try {
439
         try {
427
         } catch (Exception e) {
453
         } catch (Exception e) {
428
             System.err.println("从招标文件检索内容时出错: " + e.getMessage());
454
             System.err.println("从招标文件检索内容时出错: " + e.getMessage());
429
         }
455
         }
430
-
431
         return relevantContent;
456
         return relevantContent;
432
     }
457
     }
433
 
458
 
577
             if (line.contains("6."))
602
             if (line.contains("6."))
578
                 chapter2List.add(line.replace("*", "").replace("#", "").replace("-", ""));
603
                 chapter2List.add(line.replace("*", "").replace("#", "").replace("-", ""));
579
         }
604
         }
605
+        processValue = "已生成二级标题:100%";
580
         for (String chapter2 : chapter2List) {
606
         for (String chapter2 : chapter2List) {
581
             String orderNum = chapter2.split(" ")[0];
607
             String orderNum = chapter2.split(" ")[0];
582
             StringBuilder sb = new StringBuilder("二级标题如下:\n").append(chapter2)
608
             StringBuilder sb = new StringBuilder("二级标题如下:\n").append(chapter2)
583
-                    .append("\n 请以上述二级标题作为检索词,到技术知识库中检索最相似的片段,结合检索结果编排该二级标题下的三级标题,严格按以下格式,仅输出三级标题列表:\n")
609
+                    .append("\n 请以上述二级标题作为检索词,到技术知识库中检索最相似的标题,结合检索结果编排该二级标题下的三级标题,严格按以下格式,仅输出三级标题列表:\n")
584
                     .append(orderNum).append(".1 XX\n")
610
                     .append(orderNum).append(".1 XX\n")
585
                     .append(orderNum).append(".2 XX\n")
611
                     .append(orderNum).append(".2 XX\n")
586
                     .append(orderNum).append(".3 XX\n");
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
             for (JSONObject context : contexts) {
615
             for (JSONObject context : contexts) {
590
                 sb.append("参考内容").append(": ")
616
                 sb.append("参考内容").append(": ")
591
                         .append(context.getString("content")).append("\n\n");
617
                         .append(context.getString("content")).append("\n\n");
592
             }
618
             }
593
             chapter3.append(generateAnswer(sb.toString()));
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
         String sb = "二级标题如下:\n" + chapters2 +
622
         String sb = "二级标题如下:\n" + chapters2 +
597
                 "\n 三级标题如下:" + chapter3 +
623
                 "\n 三级标题如下:" + chapter3 +
636
      * 从Milvus检索相关文档
662
      * 从Milvus检索相关文档
637
      * @return
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
         List<JSONObject> resultList = new ArrayList<>();
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
         return resultList;
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
         List<BaseVector> queryVector = Collections.singletonList(new FloatVec(embeddingModel.embed(query).content().vector()));
682
         List<BaseVector> queryVector = Collections.singletonList(new FloatVec(embeddingModel.embed(query).content().vector()));
659
 
683
 
660
         //  加载集合
684
         //  加载集合
675
                 .metricType(IndexParam.MetricType.COSINE)
699
                 .metricType(IndexParam.MetricType.COSINE)
676
                 .searchParams(searchParams)
700
                 .searchParams(searchParams)
677
                 .build();
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
         SearchResp searchResp = milvusClient.search(searchReq);
716
         SearchResp searchResp = milvusClient.search(searchReq);
680
         List<List<SearchResp.SearchResult>> searchResultList = searchResp.getSearchResults();
717
         List<List<SearchResp.SearchResult>> searchResultList = searchResp.getSearchResults();
827
             }
864
             }
828
 
865
 
829
 
866
 
867
+            processValue = "已获取最低级别子标题列表:100%";
830
             return subTitles;
868
             return subTitles;
831
 
869
 
832
         }
870
         }
833
     }
871
     }
834
 
872
 
873
+
835
     // 检查一个标题是否是叶子节点(没有更低级别的子标题)
874
     // 检查一个标题是否是叶子节点(没有更低级别的子标题)
836
     private boolean isLeafNode(XWPFDocument doc, XWPFParagraph p, int level) {
875
     private boolean isLeafNode(XWPFDocument doc, XWPFParagraph p, int level) {
837
         int index = doc.getPosOfParagraph(p);
876
         int index = doc.getPosOfParagraph(p);
887
 
926
 
888
                     if (paragraph.getStyle() != null) {
927
                     if (paragraph.getStyle() != null) {
889
                         // 二级标题(样式2)开始新的分段
928
                         // 二级标题(样式2)开始新的分段
890
-                        if (paragraph.getStyle().equals("2")) {
929
+                        if (paragraph.getStyle().equals("3")) {
891
                             // 保存当前二级标题下的内容
930
                             // 保存当前二级标题下的内容
892
                             if (currentLevel2Content.length() != 0) {
931
                             if (currentLevel2Content.length() != 0) {
893
                                 // 检查当前二级标题内容的字节数
932
                                 // 检查当前二级标题内容的字节数
907
                                         // 检查是否是三级标题
946
                                         // 检查是否是三级标题
908
                                         boolean isLevel3Title = false;
947
                                         boolean isLevel3Title = false;
909
                                         for (XWPFParagraph p : xwpfDocument.getParagraphs()) {
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
                                                 isLevel3Title = true;
950
                                                 isLevel3Title = true;
912
                                                 break;
951
                                                 break;
913
                                             }
952
                                             }
973
                             
1012
                             
974
                             boolean isLevel3Title = false;
1013
                             boolean isLevel3Title = false;
975
                             for (XWPFParagraph p : xwpfDocument.getParagraphs()) {
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
                                     isLevel3Title = true;
1016
                                     isLevel3Title = true;
978
                                     break;
1017
                                     break;
979
                                 }
1018
                                 }

+ 88
- 5
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcBudget.java Vedi File

38
 //    @Excel(name = "间接成本")
38
 //    @Excel(name = "间接成本")
39
     private BigDecimal fixCost;
39
     private BigDecimal fixCost;
40
 
40
 
41
+    /** 内业绩效额 */
42
+//    @Excel(name = "内业绩效额")
43
+    private BigDecimal settleExpense;
44
+
41
     /** 人员成本 */
45
     /** 人员成本 */
42
     @Excel(name = "人员成本")
46
     @Excel(name = "人员成本")
43
     private BigDecimal staffCost;
47
     private BigDecimal staffCost;
50
     @Excel(name = "设备成本")
54
     @Excel(name = "设备成本")
51
     private BigDecimal deviceCost;
55
     private BigDecimal deviceCost;
52
 
56
 
57
+    /** 经营相关费用 */
58
+    @Excel(name = "经营相关费用")
59
+    private BigDecimal businessCost;
60
+
53
     /** 现场开支 */
61
     /** 现场开支 */
54
     @Excel(name = "现场开支")
62
     @Excel(name = "现场开支")
55
     private BigDecimal siteCost;
63
     private BigDecimal siteCost;
58
 //    @Excel(name = "直接成本")
66
 //    @Excel(name = "直接成本")
59
     private BigDecimal directExpense;
67
     private BigDecimal directExpense;
60
 
68
 
61
-    /** 预结算额 */
62
-    @Excel(name = "预结算额")
63
-    private BigDecimal settleExpense;
64
-
65
     /** 外协费用 */
69
     /** 外协费用 */
66
     @Excel(name = "外协费用")
70
     @Excel(name = "外协费用")
67
     private BigDecimal outExpense;
71
     private BigDecimal outExpense;
179
     @Excel(name = "预算附件")
183
     @Excel(name = "预算附件")
180
     private String document;
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
     @Excel(name = "现场开支核算 ")
203
     @Excel(name = "现场开支核算 ")
184
     private BigDecimal siteAdjust;
204
     private BigDecimal siteAdjust;
185
 
205
 
206
+    /** 现场外开支核算 */
207
+    @Excel(name = "现场外开支核算 ")
208
+    private BigDecimal otherCost;
209
+
186
     /** 内业核算绩效总额 */
210
     /** 内业核算绩效总额 */
187
-    @Excel(name = "内业核算绩效总额")
211
+//    @Excel(name = "内业核算绩效总额")
188
     private BigDecimal settleAdjust;
212
     private BigDecimal settleAdjust;
189
 
213
 
190
     /** 外协核算费用 */
214
     /** 外协核算费用 */
329
     {
353
     {
330
         return businessExpense;
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
     public void setTaxExpense(BigDecimal taxExpense)
365
     public void setTaxExpense(BigDecimal taxExpense)
333
     {
366
     {
334
         this.taxExpense = taxExpense;
367
         this.taxExpense = taxExpense;
677
     {
710
     {
678
         return travelAdjust;
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
     public void setProcInstId(String procInstId)
758
     public void setProcInstId(String procInstId)
681
     {
759
     {
682
         this.procInstId = procInstId;
760
         this.procInstId = procInstId;
699
                 .append("settleExpense", getSettleExpense())
777
                 .append("settleExpense", getSettleExpense())
700
                 .append("outExpense", getOutExpense())
778
                 .append("outExpense", getOutExpense())
701
                 .append("businessExpense", getBusinessExpense())
779
                 .append("businessExpense", getBusinessExpense())
780
+                .append("businessCost", getBusinessCost())
702
                 .append("rentExpense", getRentExpense())
781
                 .append("rentExpense", getRentExpense())
703
                 .append("otherExpense", getOtherExpense())
782
                 .append("otherExpense", getOtherExpense())
704
                 .append("outRemark", getOutRemark())
783
                 .append("outRemark", getOutRemark())
711
                 .append("compiler", getCompiler())
790
                 .append("compiler", getCompiler())
712
                 .append("auditor", getAuditor())
791
                 .append("auditor", getAuditor())
713
                 .append("createTime", getCreateTime())
792
                 .append("createTime", getCreateTime())
793
+                .append("staffAdjust", getStaffAdjust())
794
+                .append("carAdjust", getCarAdjust())
795
+                .append("deviceAdjust", getDeviceAdjust())
796
+                .append("businessAdjust", getBusinessAdjust())
714
                 .toString();
797
                 .toString();
715
     }
798
     }
716
 }
799
 }

+ 27
- 3
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcBudgetMapper.xml Vedi File

14
         <result property="settleExpense"    column="settle_expense"    />
14
         <result property="settleExpense"    column="settle_expense"    />
15
         <result property="outExpense"    column="out_expense"    />
15
         <result property="outExpense"    column="out_expense"    />
16
         <result property="businessExpense"    column="business_expense"    />
16
         <result property="businessExpense"    column="business_expense"    />
17
+        <result property="businessCost"    column="business_cost"    />
17
         <result property="taxExpense"    column="tax_expense"    />
18
         <result property="taxExpense"    column="tax_expense"    />
18
         <result property="rentExpense"    column="rent_expense"    />
19
         <result property="rentExpense"    column="rent_expense"    />
19
         <result property="otherExpense"    column="other_expense"    />
20
         <result property="otherExpense"    column="other_expense"    />
49
         <result property="letterAdjust"    column="letter_adjust"    />
50
         <result property="letterAdjust"    column="letter_adjust"    />
50
         <result property="winAdjust"    column="win_adjust"    />
51
         <result property="winAdjust"    column="win_adjust"    />
51
         <result property="travelAdjust"    column="travel_adjust"    />
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
         <result property="siteCost"    column="site_cost"    />
57
         <result property="siteCost"    column="site_cost"    />
58
+        <result property="otherCost"    column="other_cost"    />
53
         <result property="siteAdjust"    column="site_adjust"    />
59
         <result property="siteAdjust"    column="site_adjust"    />
54
         <result property="procInstId"    column="proc_inst_id"    />
60
         <result property="procInstId"    column="proc_inst_id"    />
55
         <association property="compilerUser"    javaType="SysUser"         resultMap="CompilerResult" />
61
         <association property="compilerUser"    javaType="SysUser"         resultMap="CompilerResult" />
86
     </resultMap>
92
     </resultMap>
87
 
93
 
88
     <sql id="selectCmcBudgetVo">
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
                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,
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
                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,
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
             left join sys_user as u on u.user_id = b.compiler
100
             left join sys_user as u on u.user_id = b.compiler
95
             left join sys_user as u1 on u1.user_id = b.manager
101
             left join sys_user as u1 on u1.user_id = b.manager
96
             left join sys_user as u2 on u2.user_id = b.auditor
102
             left join sys_user as u2 on u2.user_id = b.auditor
138
             <if test="settleExpense != null">settle_expense,</if>
144
             <if test="settleExpense != null">settle_expense,</if>
139
             <if test="outExpense != null">out_expense,</if>
145
             <if test="outExpense != null">out_expense,</if>
140
             <if test="businessExpense != null">business_expense,</if>
146
             <if test="businessExpense != null">business_expense,</if>
147
+            <if test="businessCost != null">business_cost,</if>
141
             <if test="taxExpense != null">tax_expense,</if>
148
             <if test="taxExpense != null">tax_expense,</if>
142
             <if test="rentExpense != null">rent_expense,</if>
149
             <if test="rentExpense != null">rent_expense,</if>
143
             <if test="otherExpense != null">other_expense,</if>
150
             <if test="otherExpense != null">other_expense,</if>
172
             <if test="letterAdjust != null">letter_adjust,</if>
179
             <if test="letterAdjust != null">letter_adjust,</if>
173
             <if test="winAdjust != null">win_adjust,</if>
180
             <if test="winAdjust != null">win_adjust,</if>
174
             <if test="travelAdjust != null">travel_adjust,</if>
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
             <if test="procInstId != null">proc_inst_id,</if>
186
             <if test="procInstId != null">proc_inst_id,</if>
176
             <if test="siteCost != null">site_cost,</if>
187
             <if test="siteCost != null">site_cost,</if>
188
+            <if test="otherCost != null">other_cost,</if>
177
             <if test="siteAdjust != null">site_adjust,</if>
189
             <if test="siteAdjust != null">site_adjust,</if>
178
             create_time
190
             create_time
179
         </trim>
191
         </trim>
187
             <if test="settleExpense != null">#{settleExpense},</if>
199
             <if test="settleExpense != null">#{settleExpense},</if>
188
             <if test="outExpense != null">#{outExpense},</if>
200
             <if test="outExpense != null">#{outExpense},</if>
189
             <if test="businessExpense != null">#{businessExpense},</if>
201
             <if test="businessExpense != null">#{businessExpense},</if>
202
+            <if test="businessCost != null">#{businessCost},</if>
190
             <if test="taxExpense != null">#{taxExpense},</if>
203
             <if test="taxExpense != null">#{taxExpense},</if>
191
             <if test="rentExpense != null">#{rentExpense},</if>
204
             <if test="rentExpense != null">#{rentExpense},</if>
192
             <if test="otherExpense != null">#{otherExpense},</if>
205
             <if test="otherExpense != null">#{otherExpense},</if>
221
             <if test="letterAdjust != null">#{letterAdjust},</if>
234
             <if test="letterAdjust != null">#{letterAdjust},</if>
222
             <if test="winAdjust != null">#{winAdjust},</if>
235
             <if test="winAdjust != null">#{winAdjust},</if>
223
             <if test="travelAdjust != null">#{travelAdjust},</if>
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
             <if test="procInstId != null">#{procInstId},</if>
241
             <if test="procInstId != null">#{procInstId},</if>
225
             <if test="siteCost != null">#{siteCost},</if>
242
             <if test="siteCost != null">#{siteCost},</if>
243
+            <if test="otherCost != null">#{otherCost},</if>
226
             <if test="siteAdjust != null">#{siteAdjust},</if>
244
             <if test="siteAdjust != null">#{siteAdjust},</if>
227
             sysdate()
245
             sysdate()
228
         </trim>
246
         </trim>
239
             <if test="settleExpense != null">settle_expense = #{settleExpense},</if>
257
             <if test="settleExpense != null">settle_expense = #{settleExpense},</if>
240
             <if test="outExpense != null">out_expense = #{outExpense},</if>
258
             <if test="outExpense != null">out_expense = #{outExpense},</if>
241
             <if test="businessExpense != null">business_expense = #{businessExpense},</if>
259
             <if test="businessExpense != null">business_expense = #{businessExpense},</if>
260
+            <if test="businessCost != null">business_cost = #{businessCost},</if>
242
             <if test="taxExpense != null">tax_expense = #{taxExpense},</if>
261
             <if test="taxExpense != null">tax_expense = #{taxExpense},</if>
243
             <if test="rentExpense != null">rent_expense = #{rentExpense},</if>
262
             <if test="rentExpense != null">rent_expense = #{rentExpense},</if>
244
             <if test="otherExpense != null">other_expense = #{otherExpense},</if>
263
             <if test="otherExpense != null">other_expense = #{otherExpense},</if>
274
             <if test="letterAdjust != null">letter_adjust = #{letterAdjust},</if>
293
             <if test="letterAdjust != null">letter_adjust = #{letterAdjust},</if>
275
             <if test="winAdjust != null">win_adjust = #{winAdjust},</if>
294
             <if test="winAdjust != null">win_adjust = #{winAdjust},</if>
276
             <if test="travelAdjust != null">travel_adjust = #{travelAdjust},</if>
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
             <if test="procInstId != null">proc_inst_id = #{procInstId},</if>
300
             <if test="procInstId != null">proc_inst_id = #{procInstId},</if>
278
             <if test="siteCost != null">site_cost = #{siteCost},</if>
301
             <if test="siteCost != null">site_cost = #{siteCost},</if>
302
+            <if test="otherCost != null">other_cost = #{otherCost},</if>
279
             <if test="siteAdjust != null">site_adjust = #{siteAdjust},</if>
303
             <if test="siteAdjust != null">site_adjust = #{siteAdjust},</if>
280
         </trim>
304
         </trim>
281
         where budget_id = #{budgetId}
305
         where budget_id = #{budgetId}

+ 2
- 1
oa-ui/src/api/llm/agent.js Vedi File

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

+ 1
- 1
oa-ui/src/utils/request.js Vedi File

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

+ 1
- 1
oa-ui/src/views/file/filesProject/project.vue Vedi File

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

+ 11
- 4
oa-ui/src/views/file/index.vue Vedi File

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

+ 4
- 1
oa-ui/src/views/file/index/projectLayer.vue Vedi File

4
  * @Author: ysh
4
  * @Author: ysh
5
  * @Date: 2022-10-20 17:27:09
5
  * @Date: 2022-10-20 17:27:09
6
  * @LastEditors: wrh
6
  * @LastEditors: wrh
7
- * @LastEditTime: 2025-01-02 09:29:11
7
+ * @LastEditTime: 2026-02-03 10:50:07
8
 -->
8
 -->
9
 <template>
9
 <template>
10
   <div class="layer-box">
10
   <div class="layer-box">
99
         pageNum: 1,
99
         pageNum: 1,
100
         pageSize: 99999999
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
       listProject(param).then(res => {
105
       listProject(param).then(res => {
103
         if (res.code == 200) {
106
         if (res.code == 200) {
104
           let alldata = res.rows;
107
           let alldata = res.rows;

+ 1
- 0
oa-ui/src/views/flowable/form/budget/addBudget.vue Vedi File

437
       this.$set(this.budgetForm, "winExpense", val.winExpense);
437
       this.$set(this.budgetForm, "winExpense", val.winExpense);
438
       this.$set(this.budgetForm, "taxExpense", val.taxExpense);
438
       this.$set(this.budgetForm, "taxExpense", val.taxExpense);
439
       this.$set(this.budgetForm, "travelExpense", val.travelExpense);
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
     getFixCost() {
442
     getFixCost() {
442
       const staffCost = this.safeNumber(this.budgetForm.staffCost);
443
       const staffCost = this.safeNumber(this.budgetForm.staffCost);

+ 12
- 1
oa-ui/src/views/flowable/form/budget/adjust/budgetAdjust.vue Vedi File

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

+ 1
- 1
oa-ui/src/views/flowable/form/budget/adjust/components/CarCost.vue Vedi File

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

+ 1
- 1
oa-ui/src/views/flowable/form/budget/adjust/components/DeviceCost.vue Vedi File

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

+ 1
- 1
oa-ui/src/views/flowable/form/budget/adjust/components/InnerStaffCost.vue Vedi File

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

+ 1
- 1
oa-ui/src/views/flowable/form/budget/adjust/components/OuterStaffCost.vue Vedi File

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

+ 3
- 3
oa-ui/src/views/flowable/form/budget/adjust/components/otherCost.vue Vedi File

1
 <!--
1
 <!--
2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2025-05-16 10:34:57
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
 <template>
7
 <template>
8
   <div class="other-cost">
8
   <div class="other-cost">
92
       });
92
       });
93
     },
93
     },
94
     removeOther(other, index) {
94
     removeOther(other, index) {
95
-      this.$confirm('确移除【' + other.name + '】吗', '提示', {
95
+      this.$confirm('确移除【' + other.name + '】吗', '提示', {
96
         confirmButtonText: '确定',
96
         confirmButtonText: '确定',
97
         cancelButtonText: '取消',
97
         cancelButtonText: '取消',
98
         type: 'warning'
98
         type: 'warning'

+ 10
- 3
oa-ui/src/views/flowable/form/budget/components/chooseDevice.vue Vedi File

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

+ 2
- 2
oa-ui/src/views/flowable/form/finance/borrowForm.vue Vedi File

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

+ 11
- 3
oa-ui/src/views/llm/agent/AgentDetail.vue Vedi File

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

+ 7
- 1
oa-ui/src/views/oa/device/detail.vue Vedi File

890
       if (row == '4') {
890
       if (row == '4') {
891
         return '已报废'
891
         return '已报废'
892
       }
892
       }
893
+      if (row == '5') {
894
+        return '已处置'
895
+      }
893
     },
896
     },
894
-    statusTypeStyle(row) {
897
+    statusType(row) {
895
       if (row == '0') {
898
       if (row == '0') {
896
         return 'warning'
899
         return 'warning'
897
       }
900
       }
907
       if (row == '4') {
910
       if (row == '4') {
908
         return 'info'
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 Vedi File

13
           </el-option>
13
           </el-option>
14
           <el-option key="4" label="已报废" value="4">
14
           <el-option key="4" label="已报废" value="4">
15
           </el-option>
15
           </el-option>
16
+          <el-option key="5" label="已处置" value="5">
17
+          </el-option>
16
         </el-select>
18
         </el-select>
17
       </el-form-item>
19
       </el-form-item>
18
       <el-form-item label="出厂编号" prop="name">
20
       <el-form-item label="出厂编号" prop="name">
235
       // cmc设备信息表格数据
237
       // cmc设备信息表格数据
236
       deviceList: [],
238
       deviceList: [],
237
       deptList: [],
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
       title: "",
242
       title: "",
241
       // 是否显示弹出层
243
       // 是否显示弹出层
402
       if (row == '4') {
404
       if (row == '4') {
403
         return '已报废'
405
         return '已报废'
404
       }
406
       }
407
+      if (row == '5') {
408
+        return '已处置'
409
+      }
405
     },
410
     },
406
     statusTypeStyle(row) {
411
     statusTypeStyle(row) {
407
       if (row == '0') {
412
       if (row == '0') {
419
       if (row == '4') {
424
       if (row == '4') {
420
         return 'info'
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 Vedi File

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

+ 8
- 0
oa-ui/src/views/oa/supply/index.vue Vedi File

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

Loading…
Annulla
Salva