浏览代码

2022-11-4 16:06:00 分析系统提交代码 报告管理系统所需接口开发完毕

沈永艺 2 年之前
父节点
当前提交
16446f08c9

+ 2 - 0
PAS/src/main/java/cn/cslg/pas/controller/AdminController.java

@@ -176,5 +176,7 @@ public class AdminController {
         return clientService.delete2(id);
     }
 
+
+
 }
 

+ 6 - 0
PAS/src/main/java/cn/cslg/pas/controller/ClientController.java

@@ -52,5 +52,11 @@ public class ClientController {
         return clientService.delete(id);
     }
 
+    @GetMapping("/getAllClient")
+    @Operation(summary = "获取所有的客户列表")
+    public String getAllClient() {
+        return clientService.getAllClient();
+    }
+
 }
 

+ 10 - 4
PAS/src/main/java/cn/cslg/pas/controller/CommonController.java

@@ -72,6 +72,12 @@ public class CommonController {
         return Response.success(map);
     }
 
+    @GetMapping("/getDictMessage")
+    @Operation(summary = "获取字典项信息")
+    public String getDictMessage() {
+        return systemDictService.getDictMessage();
+    }
+
     @GetMapping("getDictTreeByParentDictValue")
     @Operation(summary = "获取字典项之间的级联关系")
     public String getDictTreeByParentDictValue(@RequestParam(value = "value") List<String> value, String type, Integer flag) {
@@ -86,7 +92,7 @@ public class CommonController {
         return Response.success(JsonUtils.jsonToMap(str));
     }
 
-    @Permission(roles = {1,2,4})
+    @Permission(roles = {1, 2, 4})
     @checkAuth(FunId = "/workspace/folder/analyticSystem/chartAnalysis/moreMenu/export")
     @PostMapping("export")
     @Operation(summary = "导出分析结果")
@@ -215,15 +221,15 @@ public class CommonController {
 
     @GetMapping("downloadPoi")
     @Operation(summary = "下载word文件")
-    public  void  downloadPoi( @RequestBody PoiVO poiVO) throws IOException, InvalidFormatException {
+    public void downloadPoi(@RequestBody PoiVO poiVO) throws IOException, InvalidFormatException {
 
         poiService.writeFile(poiVO);
     }
 
     @GetMapping("readPoi")
     @Operation(summary = "回显word文件")
-    public  PoiVO  readPoi() throws IOException {
+    public PoiVO readPoi() throws IOException {
 
-     return    poiService.readWordFile();
+        return poiService.readWordFile();
     }
 }

+ 9 - 0
PAS/src/main/java/cn/cslg/pas/service/ClientService.java

@@ -83,6 +83,7 @@ public class ClientService extends ServiceImpl<ClientMapper, Client> {
         queryWrapper.eq(Client::getTenantId, tenantId);
         return this.list(queryWrapper);
     }
+
     public String add(Client client) {
         client.setCreateBy(loginUtils.getId());
         client.setCreateTime(DateUtils.getDateTime());
@@ -136,4 +137,12 @@ public class ClientService extends ServiceImpl<ClientMapper, Client> {
         this.removeById(id);
         return Response.success();
     }
+
+    /**
+     * @author 沈永艺
+     * @description 获取所有的客户列表
+     */
+    public String getAllClient() {
+        return Response.success(this.list());
+    }
 }

+ 13 - 1
PAS/src/main/java/cn/cslg/pas/service/SystemDictService.java

@@ -1,7 +1,7 @@
 package cn.cslg.pas.service;
 
+import cn.cslg.pas.common.utils.Response;
 import cn.cslg.pas.domain.SystemDict;
-import cn.cslg.pas.domain.SystemDictAssociate;
 import cn.cslg.pas.mapper.SystemDictMapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -10,7 +10,10 @@ import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
 
 /**
  * <p>
@@ -44,4 +47,13 @@ public class SystemDictService extends ServiceImpl<SystemDictMapper, SystemDict>
         return "";
     }
 
+    public String getDictMessage() {
+        List<SystemDict> systemDictList = this.list();
+        Map<String, Object> map = new HashMap<>();
+        for (SystemDict systemDict : systemDictList) {
+            map.put(systemDict.getType(), systemDictList.stream().filter(item -> item.getType().equals(systemDict.getType())).collect(Collectors.toList()));
+        }
+        return Response.success(map);
+    }
+
 }