From 9d27d3439ea42d34a9cf9602f1a2c0b5e9bb75a2 Mon Sep 17 00:00:00 2001 From: wangwh <2397901735@qq.com> Date: Mon, 23 Sep 2024 20:29:43 +0800 Subject: [PATCH] 全部签收接口优化、首页-统计数量添加返回字段、首页督办修复、查询案件督办信息接口添加字段 --- dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/service/CaseInfoUnfoldService.java | 38 ++++++++++++++++++++++++++++++++++---- 1 files changed, 34 insertions(+), 4 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 24c7c05..e58da8b 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 @@ -1,5 +1,6 @@ package cn.huge.module.cases.service; +import cn.huge.base.common.dto.SelectTermDTO; import cn.huge.base.common.exception.ServiceException; import cn.huge.base.common.utils.DateUtils; import cn.huge.base.common.utils.IdUtils; @@ -14,6 +15,7 @@ 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.CtUnitDTO; import cn.huge.module.cust.dto.CtUserDTO; import cn.huge.module.mediate.constant.AuditBaseConstsEnum; import cn.huge.module.mediate.constant.CaseBaseConsts; @@ -24,6 +26,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.google.common.collect.Maps; import org.apache.commons.lang3.StringUtils; +import org.apache.el.stream.Stream; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -33,10 +36,8 @@ import org.springframework.data.domain.PageRequest; import org.springframework.transaction.annotation.Transactional; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; +import java.util.stream.Collectors; /** * @title: 纠纷信息扩展表业务逻辑处理 @@ -245,4 +246,33 @@ } } + /** + * 联合处置申请-查询组织 + * @param caseId + * @return + */ + public List<SelectTermDTO> superviceUnitChoose(String caseId) { + try { + CaseInfoUnfold caseInfoUnfold = getById(caseId); + List<String> unitIdList = new ArrayList<>(); + unitIdList.add(caseInfoUnfold.getMediateUnitId()); + if(StringUtils.isNotBlank(caseInfoUnfold.getAssistUnitId())){ + unitIdList.addAll(Arrays.stream(caseInfoUnfold.getAssistUnitId().split(",")).map(String::valueOf).collect(Collectors.toList())); + } + List<SelectTermDTO> selectTermDTOList = new ArrayList<>(); + for (String unitId : unitIdList) { + CtUnitDTO ctUnitDTO = custClient.getUnitById(unitId); + SelectTermDTO unitSelectTerm = new SelectTermDTO(); + unitSelectTerm.setValue(ctUnitDTO.getId()); + unitSelectTerm.setLabel(ctUnitDTO.getUnitName()); + unitSelectTerm.setParentId(ctUnitDTO.getParentId()); + unitSelectTerm.setCheckable(true); + selectTermDTOList.add(unitSelectTerm); + } + return selectTermDTOList; + }catch (Exception e){ + log.error("[CaseInfoUnfoldService.superviceUnitChoose] 调用失败,异常信息:"+e, e); + throw new ServiceException("CaseInfoUnfoldService.superviceUnitChoose", e); + } + } } -- Gitblit v1.8.0