Browse Source

档案文件统计

qianxb 1 year ago
parent
commit
0acf168d70

+ 20 - 6
blade-service/blade-business/src/main/java/org/springblade/business/feignClient/ArchiveFileClientImpl.java

@@ -131,19 +131,33 @@ public class ArchiveFileClientImpl implements ArchiveFileClient {
         List<ArchiveFileVO> list = fileMapper.getAllArchiveFileByContractType(projectId);
         List<ContractInfo> infos = contractClient.queryContractListByIds(Arrays.asList(projectId));
         int key1 = 0, key2 = 0, key3 = 0;
+        int key4 = 0, key5 = 0, key6 = 0;
         //判断文件属于1施工,2监理,还是3业主
         if (list != null && list.size() > 0) {
             for (ArchiveFileVO l : list) {
                 String type = l.getContractType();
                 if (StringUtils.isBlank(type)) {
                     //业主
-                    key3++;
+                    if (l.getSourceType() != null && l.getSourceType() == 1){
+                        key4++;
+                    }else {
+                        key3++;
+                    }
                 } else if ("S".equals(type)) {
                     //监理
-                    key2++;
+                    if (l.getSourceType() != null && l.getSourceType() == 1){
+                        key5++;
+                    }else {
+                        key2++;
+                    }
+
                 } else if ("C".equals(type)) {
                     //施工
-                    key1++;
+                    if (l.getSourceType() != null && l.getSourceType() == 1){
+                        key6++;
+                    }else {
+                        key1++;
+                    }
                 } else if (type.length() > 10) {
                     for (ContractInfo info : infos) {
                         if (type.equals(info.getId() + "")) {
@@ -197,15 +211,15 @@ public class ArchiveFileClientImpl implements ArchiveFileClient {
         List<Map<String, Object>> mapList = new ArrayList<>();
         Map<String, Object> map = new HashMap<>();
         map.put("title", "施工");
-        map.put("key1", 0);
+        map.put("key1", key6);
         map.put("key2", key1);
         Map<String, Object> map2 = new HashMap<>();
         map2.put("title", "监理");
-        map2.put("key1", 0);
+        map2.put("key1", key5);
         map2.put("key2", key2);
         Map<String, Object> map3 = new HashMap<>();
         map3.put("title", "业主");
-        map3.put("key1", 0);
+        map3.put("key1", key4);
         map3.put("key2", key3);
         mapList.add(map);
         mapList.add(map2);