liuyc il y a 2 ans
Parent
commit
159955e9a0

+ 6 - 2
blade-service/blade-control/src/main/java/org/springblade/control/controller/LogHistoryController.java

@@ -33,7 +33,7 @@ public class LogHistoryController extends BladeController {
         if (ObjectUtil.isNotEmpty(stringListMap)) {
             return R.data(logHistoryService.logList(dto));
         }
-        return null;
+        return R.fail(200, "未查询到数据");
     }
 
     @PostMapping("/submit")
@@ -68,7 +68,11 @@ public class LogHistoryController extends BladeController {
     @ApiOperationSupport(order = 6)
     @ApiOperation(value = "日志任务列表-获取当前用户当日的任务信息")
     public R<List<TaskPlanInfoVO>> logTaskList() {
-        return R.data(logHistoryService.logTaskList());
+        List<TaskPlanInfoVO> taskPlanInfoVOS = logHistoryService.logTaskList();
+        if (taskPlanInfoVOS.size() > 0) {
+            return R.data(logHistoryService.logTaskList());
+        }
+        return R.fail(200, "未查询到数据");
     }
 
 

+ 5 - 5
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/WbsTreeContractController.java

@@ -183,7 +183,7 @@ public class WbsTreeContractController extends BladeController {
     @ApiOperationSupport(order = 9)
     @ApiOperation(value = "客户端懒加载获取合同段树(统计颜色、填报数量)", notes = "传入父级parentId、合同段contractId、关联contractIdRelation")
     @ApiImplicitParams(value = {
-            @ApiImplicitParam(name = "primaryKeyId", value = "监理合同前端要的"),
+            @ApiImplicitParam(name = "primaryKeyId"),
             @ApiImplicitParam(name = "parentId", value = "父节点id,为空则查询第一级节点"),
             @ApiImplicitParam(name = "contractId", value = "合同段id"),
             @ApiImplicitParam(name = "contractIdRelation", value = "合同段关联id(监理、业主合同关联施工合同id)"),
@@ -196,10 +196,10 @@ public class WbsTreeContractController extends BladeController {
         }
         List<WbsTreeContractLazyVO> vos;
         /*String dataInfoId;
-        if (("1").equals(classifyType)) { //质检合同段
-            dataInfoId = contractId + "_" + parentId + "_" + tableOwner;
-        } else { //监理合同段
-            dataInfoId = contractIdRelation + "_" + parentId + "_" + tableOwner;
+        if (("1").equals(classifyType)) {
+            dataInfoId = contractId + "_" + parentId + "_" + classifyType + "_" + tableOwner;
+        } else {
+            dataInfoId = contractIdRelation + "_" + parentId + "_" + classifyType + "_" + tableOwner;
         }
         Object data = redisTemplate.opsForValue().get("blade-manager::contract:wbstree:" + dataInfoId);
         if (data != null) {

+ 12 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/WbsTreeContractServiceImpl.java

@@ -595,7 +595,12 @@ public class WbsTreeContractServiceImpl extends BaseServiceImpl<WbsTreeContractM
                         ));
 
                         //获取当前合同段所有填报资料信息
-                        List<WbsTreeContractLazyQueryInfoVO> queryInfoList = jdbcTemplate.query("select wbs_id,status from u_information_query where type = 1 and contract_id = " + contractId + " and classify = " + tableOwner, new BeanPropertyRowMapper<>(WbsTreeContractLazyQueryInfoVO.class));
+                        List<WbsTreeContractLazyQueryInfoVO> queryInfoList;
+                        if (ObjectUtil.isEmpty(tableOwner)) {
+                            queryInfoList = jdbcTemplate.query("select wbs_id,status from u_information_query where type = 1 and contract_id = " + contractId, new BeanPropertyRowMapper<>(WbsTreeContractLazyQueryInfoVO.class));
+                        } else {
+                            queryInfoList = jdbcTemplate.query("select wbs_id,status from u_information_query where type = 1 and contract_id = " + contractId + " and classify = " + tableOwner, new BeanPropertyRowMapper<>(WbsTreeContractLazyQueryInfoVO.class));
+                        }
                         Map<Long, Integer> queryInfoMaps = queryInfoList.stream()
                                 .collect(Collectors.toMap(WbsTreeContractLazyQueryInfoVO::getWbsId, WbsTreeContractLazyQueryInfoVO::getStatus, (existingValue, newValue) -> existingValue));
                         List<Long> pKeyIdList = new ArrayList<>(queryInfoMaps.keySet());
@@ -717,7 +722,12 @@ public class WbsTreeContractServiceImpl extends BaseServiceImpl<WbsTreeContractM
                                 ));
 
                                 //获取当前合同段所有填报资料信息
-                                List<WbsTreeContractLazyQueryInfoVO> queryInfoList = jdbcTemplate.query("select wbs_id,status from u_information_query where type = 1 and contract_id = " + sgContractId + " and classify = " + tableOwner, new BeanPropertyRowMapper<>(WbsTreeContractLazyQueryInfoVO.class));
+                                List<WbsTreeContractLazyQueryInfoVO> queryInfoList;
+                                if (ObjectUtil.isEmpty(tableOwner)) {
+                                    queryInfoList = jdbcTemplate.query("select wbs_id,status from u_information_query where type = 1 and contract_id = " + sgContractId, new BeanPropertyRowMapper<>(WbsTreeContractLazyQueryInfoVO.class));
+                                } else {
+                                    queryInfoList = jdbcTemplate.query("select wbs_id,status from u_information_query where type = 1 and contract_id = " + sgContractId + " and classify = " + tableOwner, new BeanPropertyRowMapper<>(WbsTreeContractLazyQueryInfoVO.class));
+                                }
                                 Map<Long, Integer> queryInfoMaps = queryInfoList.stream()
                                         .collect(Collectors.toMap(WbsTreeContractLazyQueryInfoVO::getWbsId, WbsTreeContractLazyQueryInfoVO::getStatus, (existingValue, newValue) -> existingValue));
                                 List<Long> pKeyIdList = new ArrayList<>(queryInfoMaps.keySet());