From a2a0d4f361068a717e2f86ac3c55d7d48612d3f9 Mon Sep 17 00:00:00 2001
From: xusd <hugeinfo123>
Date: Sun, 08 Sep 2024 10:58:08 +0800
Subject: [PATCH] AI相关接口修正
---
dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/service/CaseInfoUnfoldService.java | 45 ++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 42 insertions(+), 3 deletions(-)
diff --git a/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/service/CaseInfoUnfoldService.java b/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/service/CaseInfoUnfoldService.java
index bccd552..5ce5c6d 100644
--- a/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/service/CaseInfoUnfoldService.java
+++ b/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/service/CaseInfoUnfoldService.java
@@ -3,24 +3,28 @@
import cn.huge.base.common.exception.ServiceException;
import cn.huge.base.common.utils.DateUtils;
import cn.huge.base.common.utils.IdUtils;
-import cn.huge.module.cases.domain.po.CaseInfo;
+import cn.huge.base.common.utils.ObjectUtils;
+import cn.huge.module.cases.domain.po.CaseAssistApply;
+import cn.huge.module.cases.domain.dto.TransactResultDTO;
import cn.huge.module.client.api.impl.CustClientImpl;
+import cn.huge.module.client.api.impl.SysClientImpl;
import cn.huge.module.client.api.impl.UtilsClientImpl;
import cn.huge.module.cases.dao.mapper.CaseInfoUnfoldMapper;
import cn.huge.module.cases.domain.po.CaseInfoUnfold;
import cn.huge.module.cust.dto.CtUserDTO;
+import cn.huge.module.mediate.constant.CaseBaseConsts;
+import cn.huge.module.sys.dto.FileIdInfoBaseDTO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;
import org.springframework.transaction.annotation.Transactional;
-import javax.annotation.PostConstruct;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
@@ -47,6 +51,12 @@
@Autowired
private CustClientImpl custClient;
+
+ @Autowired
+ private CaseAssistApplyService assistApplyService;
+
+ @Autowired
+ private SysClientImpl sysClient;
/**
* 更新对象
@@ -159,4 +169,33 @@
throw new ServiceException("CaseInfoUnfoldService.choosePrincipal", e);
}
}
+
+ public TransactResultDTO getTransactResult(String caseId){
+ //查询办理结果信息
+ QueryWrapper<CaseInfoUnfold>caseInfoUnfoldQueryWrapper = new QueryWrapper<>();
+ caseInfoUnfoldQueryWrapper.eq("case_id", caseId);
+ CaseInfoUnfold caseInfoUnfold = this.getOne(caseInfoUnfoldQueryWrapper);
+
+ TransactResultDTO transactResultDTO = new TransactResultDTO();
+ BeanUtils.copyProperties(caseInfoUnfold, transactResultDTO);
+ if(ObjectUtils.isNotEmpty(transactResultDTO)){
+ QueryWrapper<CaseAssistApply> caseAssistApplyQueryWrapper = new QueryWrapper<>();
+ caseAssistApplyQueryWrapper.select("apply_assist_unit_name").eq("case_id", caseId).eq("apply_status", 1)
+ .eq("audit_result", CaseBaseConsts.AUDIT_RESULT_1);
+ CaseAssistApply caseAssistApply = assistApplyService.getOne(caseAssistApplyQueryWrapper);
+
+ if(ObjectUtils.isNotEmpty(caseAssistApply)){
+ transactResultDTO.setApplyAssistUnitName(caseAssistApply.getApplyAssistUnitName());
+ }
+ }
+ Map<String, Object> terms = new HashMap<>();
+ terms.put("mainId", caseId);
+ terms.put("ownerIds", "'"+caseId+"'");
+ List<FileIdInfoBaseDTO> fileIdInfoBaseDTOList = sysClient.listIdInfoByOwnerIdList(terms);
+ if(ObjectUtils.isNotEmpty(fileIdInfoBaseDTOList)){
+ transactResultDTO.setFileInfoBaseDTOList(fileIdInfoBaseDTOList.get(0).getFileList());
+ }
+ return transactResultDTO;
+ }
+
}
--
Gitblit v1.8.0