forked from gzzfw/backEnd/gz-dyh

liyj
2024-09-22 df5414b84bf33c55a3aab890baaa0bd8eabcd70c
dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/service/CaseTaskService.java
@@ -22,6 +22,8 @@
import cn.huge.module.cust.constant.UserBaseConsts;
import cn.huge.module.cust.dto.CtUnitDTO;
import cn.huge.module.cust.dto.CtUserDTO;
import cn.huge.module.draft.domain.po.CasedraftInfo;
import cn.huge.module.draft.service.CasedraftInfoService;
import cn.huge.module.mediate.constant.AuditBaseConsts;
import cn.huge.module.mediate.constant.AuditBaseConstsEnum;
import cn.huge.module.disp.constant.DispBaseConstsEnum;
@@ -99,6 +101,8 @@
    private CaseAssistInfoService caseAssistInfoService;
    @Autowired
    private CaseDismissService caseDismissService;
    @Autowired
    private CasedraftInfoService casedraftInfoService;
    /**
    * 更新对象
@@ -759,6 +763,16 @@
            long countAppearReview = caseAppearService.countAppearReview(loginUser.getUnitId());
            long countAssistReview = caseAssistApplyService.countAssistReview(loginUser.getUnitId());
            frontPageCountDTO.setWaitReview(countApplyReview+countReturnReview+countAppearReview+countAssistReview);
            // 已办
            Map<String, Object> ybTerms = new HashMap<>();
            ybTerms.put("handleUnitId", loginUser.getUnitId());
            long alreadyDone = mapper.countMyTaskYb(ybTerms);
            frontPageCountDTO.setAlreadyDone(alreadyDone);
            // 已办
            Map<String, Object> cgTerms = new HashMap<>();
            cgTerms.put("inputUnitId", loginUser.getUnitId());
            long caseDraft = casedraftInfoService.countTerms(cgTerms);
            frontPageCountDTO.setCaseDraft(caseDraft);
            return frontPageCountDTO;
        }catch (Exception e) {
            log.error("[CaseTaskService.getCountList]调用失败,异常信息:" + e, e);
@@ -2608,4 +2622,22 @@
    public List<SignTaskDTO> listIdByTerms(Map<String, Object> terms){
        return mapper.listIdByTerms(terms);
    }
    /**
     * web端-工作台-已办事项
     * @param page 分页对象
     * @param terms 条件
     * @return Page
     */
    public Page<FrontPageListYBDTO> pageMyTaskYb(PageRequest page, Map<String, Object> terms){
        try {
            long total = mapper.countMyTaskYb(terms);
            List<FrontPageListYBDTO> frontPageListYBDTOList = mapper.pageMyTaskYb(page, terms);
            return new PageImpl<FrontPageListYBDTO>(frontPageListYBDTOList, page, total);
        }catch (Exception e) {
            log.error("[CaseTaskService.pageMyTaskYb]调用失败,异常信息:" + e, e);
            throw new ServiceException("CaseTaskService.pageMyTaskYb", e);
        }
    }
}