forked from gzzfw/backEnd/gz-dyh

wangwh
2024-10-08 fb7dcd20fbde955782f33909f1d2d9c39b48afc0
联合处置申请查询修改
2 files modified
51 ■■■■■ changed files
dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/controller/web/CaseAssistApplyWebController.java 25 ●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/service/CaseAssistApplyService.java 26 ●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/controller/web/CaseAssistApplyWebController.java
@@ -201,21 +201,6 @@
    }
    /**
    * 根据编号查询单个
    * @url {ctx}/api/web/caseAssistApply/getById
    * @param id 主键编号
    * @return Object
    */
    @GetMapping("/getById")
    public Object getById(@RequestParam(value = "id") String id) {
        try {
            return ReturnSucUtils.getRepInfo(service.getById(id));
        } catch (Exception e) {
            return ReturnFailUtils.getRepInfo();
        }
    }
    /**
    * 根据主键单个
    * @url {ctx}/api/web/caseAssistApply/deleteById
    * @param id 主键编号
@@ -281,14 +266,14 @@
    /**
     * 根据案件编号查询联合处置申请
     * @url {ctx}/api/web/caseAssistApply/getByCaseId
     * @param caseId 主键编号
     * @url {ctx}/api/web/caseAssistApply/getById
     * @param id 主键编号
     * @return Object
     */
    @GetMapping("/getByCaseId")
    public Object getByCaseId(@RequestParam(value = "caseId") String caseId) {
    @GetMapping("/getById")
    public Object getByCaseId(@RequestParam(value = "id") String id) {
        try {
            return ReturnSucUtils.getRepInfo(service.caseAssistApplyByCaseId(caseId));
            return ReturnSucUtils.getRepInfo(service.caseAssistApplyById(id));
        } catch (Exception e) {
            return ReturnFailUtils.getRepInfo();
        }
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);
            Map<String, Object> terms = new HashMap<>();
            terms.put("mainId", caseId);
            terms.put("ownerIds", "'" + caseAssistApply.getId() + "'");
            List<FileIdInfoBaseDTO> fileIdInfoBaseDTOList = sysClient.listIdInfoByOwnerIdList(terms);
            if (CollectionUtils.isNotEmpty(fileIdInfoBaseDTOList)) {
                caseAssistApply.setFileInfoBaseDTOList(fileIdInfoBaseDTOList.get(0).getFileList());
            if(ObjectUtils.isNotEmpty(caseAssistApply)){
                Map<String, Object> terms = new HashMap<>();
                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);
        }
    }