forked from gzzfw/backEnd/gz-dyh

wangwh
2024-10-08 fb7dcd20fbde955782f33909f1d2d9c39b48afc0
dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/service/CaseAssistApplyService.java
@@ -3,6 +3,7 @@
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.consts.CaseTaskConsts;
import cn.huge.module.cases.domain.dto.FrontPageListDTO;
import cn.huge.module.cases.domain.po.*;
@@ -310,26 +311,27 @@
    /**
     * 根据案件编号查询联合处置申请
     * @param caseId 条件
     * @param id 主键编号
     * @return long
     */
    public CaseAssistApply caseAssistApplyByCaseId(String caseId){
    public CaseAssistApply caseAssistApplyById(String id){
        try {
            QueryWrapper<CaseAssistApply> caseAssistApplyQueryWrapper = new QueryWrapper<>();
            caseAssistApplyQueryWrapper.eq("case_id", caseId).eq("apply_status", 0)
                    .orderByDesc("create_time");
            caseAssistApplyQueryWrapper.eq("id", id);
            CaseAssistApply caseAssistApply = mapper.selectOne(caseAssistApplyQueryWrapper);
            if(ObjectUtils.isNotEmpty(caseAssistApply)){
            Map<String, Object> terms = new HashMap<>();
            terms.put("mainId", caseId);
                terms.put("mainId", caseAssistApply.getCaseId());
            terms.put("ownerIds", "'" + caseAssistApply.getId() + "'");
            List<FileIdInfoBaseDTO> fileIdInfoBaseDTOList = sysClient.listIdInfoByOwnerIdList(terms);
            if (CollectionUtils.isNotEmpty(fileIdInfoBaseDTOList)) {
                caseAssistApply.setFileInfoBaseDTOList(fileIdInfoBaseDTOList.get(0).getFileList());
            }
            }
            return caseAssistApply;
        }catch(Exception e ){
            log.error("[CaseAssistApplyService.caseAssistApplyByCaseId]调用失败,异常信息:"+e, e);
            throw new ServiceException("CaseAssistApplyService.caseAssistApplyByCaseId", e);
            log.error("[CaseAssistApplyService.caseAssistApplyById]调用失败,异常信息:"+e, e);
            throw new ServiceException("CaseAssistApplyService.caseAssistApplyById", e);
        }
    }