From a88b63c52833433e9270f7641cb39aea9f872172 Mon Sep 17 00:00:00 2001
From: liyj <15602261488@163.com>
Date: Mon, 23 Sep 2024 15:35:35 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/gzdyh_test' into gzdyh_test

---
 dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/service/CaseSuperviseService.java |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/service/CaseSuperviseService.java b/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/service/CaseSuperviseService.java
index 4e37cc7..9347be4 100644
--- a/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/service/CaseSuperviseService.java
+++ b/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/service/CaseSuperviseService.java
@@ -3,8 +3,11 @@
 import cn.huge.base.common.exception.ServiceException;
 import cn.huge.base.common.utils.DateUtils;
 import cn.huge.base.common.utils.IdUtils;
+import cn.huge.base.common.utils.ObjectUtils;
 import cn.huge.module.cases.domain.dto.FileRelateDTO;
 import cn.huge.module.cases.domain.dto.QuiltUnitDTO;
+import cn.huge.module.cases.domain.po.CaseInfo;
+import cn.huge.module.cases.domain.po.CaseInfoUnfold;
 import cn.huge.module.client.api.impl.CustClientImpl;
 import cn.huge.module.client.api.impl.SysClientImpl;
 import cn.huge.module.client.api.impl.UtilsClientImpl;
@@ -57,6 +60,9 @@
 
     @Autowired
     private SysClientImpl sysClient;
+
+    @Autowired
+    private CaseInfoService caseInfoService;
 
     /**
     * 条件更新对象
@@ -142,7 +148,7 @@
     public void addCaseSupervise(CaseSupervise caseSupervise, String userId){
         try{
             List<QuiltUnitDTO> quiltUnitDTOList = caseSupervise.getQuiltUnitDTOList();
-            Integer timeTerm = sysClient.getTimeLimit("dyh_case_supervise", SyTimeEnum.SY_TIME_5.getIndex());
+            Integer timeTerm = sysClient.getTimeLimitHour(SyTimeEnum.SY_TIME_5.getIndex());
             List<CaseSupervise> caseSuperviseList = new ArrayList<>();
             List<FileRelateDTO> fileRelateDTOList = sysClient.listFileRelateByOwnerId(caseSupervise.getId());
             int count = 0;
@@ -228,6 +234,18 @@
             }
             long countSuperviseList = mapper.countCaseSupervise(terms);
             List<CaseSupervise> caseSuperviseList = mapper.pageCaseSupervise(terms, page);
+            CaseInfo caseInfo = new CaseInfo();
+            if(1 != type && CollectionUtils.isNotEmpty(caseSuperviseList)){
+                QueryWrapper<CaseInfo>caseInfoQueryWrapper = new QueryWrapper<>();
+                caseInfoQueryWrapper.eq("id", caseId);
+                caseInfo = caseInfoService.getOne(caseInfoQueryWrapper);
+                for(CaseSupervise caseSupervise: caseSuperviseList){
+                    if(ObjectUtils.isNotEmpty(caseInfo)){
+                        caseSupervise.setCaseGrade(caseInfo.getCaseLevel());
+                    }
+                }
+
+            }
 
             Map<String, Object>map = new HashMap<>();
             map.put("mainId", caseId);
@@ -283,7 +301,7 @@
         try {
             CaseSupervise caseSupervise = mapper.selectById(id);
             Map<String, Object> terms = new HashMap<>();
-            terms.put("mainId", "'" + caseSupervise.getCaseId() + "'");
+            terms.put("mainId", caseSupervise.getCaseId());
             terms.put("ownerIds", "'" + id + "'");
             List<FileIdTypeInfoBaseDTO> fileIdTypeInfoBaseDTOList = sysClient.listIdTypeInfoByOwnerIdList(terms);
             if(CollectionUtils.isNotEmpty(fileIdTypeInfoBaseDTOList)){

--
Gitblit v1.8.0