| | |
| | | CASE_CANAL_2("22_00001-2", "线上来访"), |
| | | |
| | | /** |
| | | * 事项来源,22_00001-1:大厅来访,22_00001-2:线上来访 |
| | | */ |
| | | VISIT_WAY_1("24_00002-1", "来访"), |
| | | VISIT_WAY_2("24_00002-2", "线上"), |
| | | |
| | | /** |
| | | * 当事人地位 |
| | | */ |
| | | PERSON_TYPE_1("15_020008-1", "申请方当事人"), |
| | |
| | | */ |
| | | void updateDispNormCauseTargetUnitName(@Param("unitName") String unitName, @Param("unitName") String unitId); |
| | | |
| | | /** |
| | | * 查询某一单位下所有管辖单位 |
| | | * @param unitId 单位编号 |
| | | * @return String |
| | | */ |
| | | List<CtUnit> listAllChild(@Param("unitId") String unitId); |
| | | } |
| | |
| | | set target_unit_name = #{unitName} |
| | | where target_unit_id = #{unitId} |
| | | </update> |
| | | |
| | | <!-- 查询某一单位下下一级所有管辖单位--> |
| | | <select id="listAllChild" resultMap="dataResult"> |
| | | WITH RECURSIVE unit_hierarchy(id, parent_id, name) AS ( |
| | | -- 锚成员 (起始点) |
| | | SELECT |
| | | id , |
| | | parent_id, |
| | | unit_name |
| | | FROM |
| | | dyh_ct_unit |
| | | WHERE |
| | | id = #{unitId} |
| | | |
| | | UNION ALL |
| | | |
| | | -- 递归成员 |
| | | SELECT |
| | | u.id, |
| | | u.parent_id, |
| | | u.unit_name |
| | | FROM |
| | | dyh_ct_unit u |
| | | JOIN |
| | | unit_hierarchy h ON u.parent_id = h.id where u.delete_status = 0 |
| | | ) |
| | | SELECT |
| | | id AS id, |
| | | parent_id AS parent_id, |
| | | name AS unit_name |
| | | FROM |
| | | unit_hierarchy; |
| | | </select> |
| | | </mapper> |
| | |
| | | // 获取当前登录用户 |
| | | CtUserDTO loginUser = ctUserService.clientGetUserAll(userId); |
| | | // 组织条件 |
| | | QueryWrapper<CtUnit> ctUnitQueryWrapper = new QueryWrapper<>(); |
| | | if (RoleBaseEnum.checkAdminPower(loginUser)){ |
| | | ctUnitQueryWrapper.eq("cust_id", loginUser.getCustId()).select("id", "unit_name", "parent_id"); |
| | | }else { |
| | | ctUnitQueryWrapper.eq("id", loginUser.getUnitId()).select("id", "unit_name", "parent_id"); |
| | | } |
| | | List<CtUnit> ctUnitList = this.list(ctUnitQueryWrapper); |
| | | List<CtUnit> ctUnitList = mapper.listAllChild(loginUser.getUnitId()); |
| | | List<SelectTermDTO> unitSelectTerms = new ArrayList<>(); |
| | | |
| | | List<String> unitIdList= ctUnitList.stream().map(CtUnit::getId).collect(Collectors.toList()); |
| | |
| | | } |
| | | |
| | | /** |
| | | * PC端-选择经办人 |
| | | * @url {ctx}/api/web/caseInfoUnfold/choosePrincipal? |
| | | * @param caseId 纠纷编号 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/choosePrincipal") |
| | | public Object choosePrincipal(@RequestParam(value = "caseId") String caseId, @RequestParam(value = "userId") String userId) { |
| | | try { |
| | | service.choosePrincipal(caseId, userId); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询办理结果 |
| | | * @url {ctx}/api/web/caseInfoUnfold/getTransactResult |
| | | * @param caseId 事项ID |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * PC端-选择经办人 |
| | | * @url {ctx}/api/web/caseInfoUnfold/choosePrincipal? |
| | | * @param caseId 纠纷编号 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/choosePrincipal") |
| | | public Object choosePrincipal(@RequestParam(value = "caseId") String caseId, @RequestParam(value = "userId") String userId) { |
| | | try { |
| | | service.choosePrincipal(caseId, userId); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | |
| | | import cn.huge.module.cases.domain.po.CaseReturn; |
| | | import cn.huge.module.cases.domain.po.CaseTask; |
| | | import cn.huge.module.cases.domain.po.CaseWindupApply; |
| | | import cn.huge.module.cases.service.CaseAppearService; |
| | | import cn.huge.module.cases.service.CaseReturnService; |
| | | import cn.huge.module.cases.service.CaseTaskService; |
| | | import cn.huge.module.cases.service.CaseWindupApplyService; |
| | | import cn.huge.module.cases.service.*; |
| | | import cn.huge.module.client.api.SysClient; |
| | | import cn.huge.module.client.api.impl.CustClientImpl; |
| | | import cn.huge.module.client.api.impl.SysClientImpl; |
| | | import cn.huge.module.cust.dto.CtUserDTO; |
| | | import cn.huge.module.sys.dto.FileIdTypeInfoBaseDTO; |
| | | import com.google.common.collect.Maps; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | private CaseAppearService caseAppearService; |
| | | @Autowired |
| | | private SysClientImpl sysClient; |
| | | @Autowired |
| | | private CustClientImpl custClient; |
| | | @Autowired |
| | | private CaseSuperviseService superviseService; |
| | | |
| | | /** |
| | | * web端-任务处理页面-初始化tab和按钮 |
| | |
| | | @GetMapping("/getTabButton") |
| | | public Object getTabButton(@RequestParam(value = "caseTaskId") String caseTaskId, @CurrentUser String userId) { |
| | | try { |
| | | return ReturnSucUtils.getRepInfo(service.webGetTabButton("caseTaskId", userId)); |
| | | return ReturnSucUtils.getRepInfo(service.webGetTabButton(caseTaskId, userId)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * web端-查询流程进度 |
| | | * web端-首页-查询待办数量 |
| | | * @url {ctx}/api/web/caseTask/getCountList |
| | | * @return Object |
| | | */ |
| | |
| | | * @param page 页码 |
| | | * @param size 每页数量 |
| | | * @param status 状态,1:待分派,2:已分派 |
| | | * @param sortType 排序方式(1:正序;2:倒序) |
| | | * @param sortColmn 排序字段(1:流转时间;2:分派时限;3:事项等级) |
| | | * @return |
| | | */ |
| | | @GetMapping("/pageMyTaskFp") |
| | | public Object pageMyTaskFp(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size, |
| | | @RequestParam(value = "status") int status, @CurrentUser String userId) { |
| | | @RequestParam(value = "status") int status, @CurrentUser String userId, |
| | | @RequestParam(value = "sortType") int sortType, @RequestParam(value = "sortColmn") int sortColmn) { |
| | | try { |
| | | Map<String, Object> terms = Maps.newHashMap(); |
| | | // 流程/分派时间区间 |
| | |
| | | if (StringUtils.isNotBlank(partyName)){ |
| | | terms.put("partyName", partyName); |
| | | } |
| | | return ReturnSucUtils.getRepInfo(); |
| | | Sort sort = null; |
| | | String sortName = null; |
| | | switch (sortColmn){ |
| | | case 1: |
| | | sortName = "t1.create_time"; |
| | | break; |
| | | case 2: |
| | | sortName = "t1.expire_time"; |
| | | break; |
| | | case 3: |
| | | sortName = "t2.case_level"; |
| | | break; |
| | | } |
| | | switch (sortType){ |
| | | case 1: |
| | | sort = Sort.by(Sort.Direction.ASC, sortName); |
| | | break; |
| | | case 2: |
| | | sort = Sort.by(Sort.Direction.DESC, sortName); |
| | | break; |
| | | } |
| | | if(ObjectUtils.isEmpty(sort)){ |
| | | sort = Sort.by(Sort.Direction.DESC, "t1.create_time"); |
| | | } |
| | | PageRequest pageRequest = PageRequest.of(page-1, size, sort); |
| | | CtUserDTO loginUser = custClient.clientGetUserAll(userId); |
| | | terms.put("candeUnitId",loginUser.getUnitId()); |
| | | terms.put("status", status); |
| | | return ReturnSucUtils.getRepInfo(service.pageMyTaskFp(pageRequest, terms)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | |
| | | * @param page 页码 |
| | | * @param size 每页数量 |
| | | * @param status 状态,1:待签收,2:已签收 |
| | | * @param sortType 排序方式(1:正序;2:倒序) |
| | | * @param sortColmn 排序字段(1:流转时间;2:分派时限;3:事项等级) |
| | | * @return |
| | | */ |
| | | @GetMapping("/pageMyTaskQs") |
| | | public Object pageMyTaskQs(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size, |
| | | @RequestParam(value = "status") int status, @CurrentUser String userId) { |
| | | @RequestParam(value = "status") int status, @CurrentUser String userId, |
| | | @RequestParam(value = "sortType") int sortType, @RequestParam(value = "sortColmn") int sortColmn) { |
| | | try { |
| | | Map<String, Object> terms = Maps.newHashMap(); |
| | | // 流程/签收时间区间 |
| | |
| | | if (StringUtils.isNotBlank(partyName)){ |
| | | terms.put("partyName", partyName); |
| | | } |
| | | return ReturnSucUtils.getRepInfo(); |
| | | Sort sort = null; |
| | | String sortName = null; |
| | | switch (sortColmn){ |
| | | case 1: |
| | | sortName = "t1.create_time"; |
| | | break; |
| | | case 2: |
| | | sortName = "t1.expire_time"; |
| | | break; |
| | | case 3: |
| | | sortName = "t2.case_level"; |
| | | break; |
| | | } |
| | | switch (sortType){ |
| | | case 1: |
| | | sort = Sort.by(Sort.Direction.ASC, sortName); |
| | | break; |
| | | case 2: |
| | | sort = Sort.by(Sort.Direction.DESC, sortName); |
| | | break; |
| | | } |
| | | if(ObjectUtils.isEmpty(sort)){ |
| | | sort = Sort.by(Sort.Direction.DESC, "t1.create_time"); |
| | | } |
| | | PageRequest pageRequest = PageRequest.of(page-1, size, sort); |
| | | CtUserDTO loginUser = custClient.clientGetUserAll(userId); |
| | | terms.put("candeUnitId",loginUser.getUnitId()); |
| | | terms.put("signStatus", status); |
| | | return ReturnSucUtils.getRepInfo(service.pageMyTaskQs(pageRequest, terms)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | |
| | | * @param page 页码 |
| | | * @param size 每页数量 |
| | | * @param status 状态,1:待受理,2:已受理 |
| | | * @param sortType 排序方式(1:正序;2:倒序) |
| | | * @param sortColmn 排序字段(1:流转时间;2:分派时限;3:事项等级) |
| | | * @return |
| | | */ |
| | | @GetMapping("/pageMyTaskSl") |
| | | public Object pageMyTaskSl(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size, |
| | | @RequestParam(value = "sortType") int sortType, @RequestParam(value = "sortColmn") int sortColmn, |
| | | @RequestParam(value = "status") int status, @CurrentUser String userId) { |
| | | try { |
| | | Map<String, Object> terms = Maps.newHashMap(); |
| | |
| | | if (StringUtils.isNotBlank(partyName)){ |
| | | terms.put("partyName", partyName); |
| | | } |
| | | return ReturnSucUtils.getRepInfo(); |
| | | Sort sort = null; |
| | | String sortName = null; |
| | | switch (sortColmn){ |
| | | case 1: |
| | | sortName = "t1.create_time"; |
| | | break; |
| | | case 2: |
| | | sortName = "t1.expire_time"; |
| | | break; |
| | | case 3: |
| | | sortName = "t2.case_level"; |
| | | break; |
| | | } |
| | | switch (sortType){ |
| | | case 1: |
| | | sort = Sort.by(Sort.Direction.ASC, sortName); |
| | | break; |
| | | case 2: |
| | | sort = Sort.by(Sort.Direction.DESC, sortName); |
| | | break; |
| | | } |
| | | if(ObjectUtils.isEmpty(sort)){ |
| | | sort = Sort.by(Sort.Direction.DESC, "t1.create_time"); |
| | | } |
| | | PageRequest pageRequest = PageRequest.of(page-1, size, sort); |
| | | CtUserDTO loginUser = custClient.clientGetUserAll(userId); |
| | | terms.put("candeUnitId",loginUser.getUnitId()); |
| | | terms.put("status", status); |
| | | return ReturnSucUtils.getRepInfo(service.pageMyTaskSl(pageRequest, terms)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * web端-工作台-查询待办任务-办理任务 |
| | | * @url {ctx}/api/web/caseTask/pageMyTaskBl |
| | | * web端-工作台-查询待办任务-办理中 |
| | | * @url {ctx}/api/web/caseTask/pageMyTaskBlz |
| | | * @param page 页码 |
| | | * @param size 每页数量 |
| | | * @param status 状态,1:办理中,2:结案申请,3:已结案 |
| | | * @param sortType 排序方式(1:正序;2:倒序) |
| | | * @param sortColmn 排序字段(1:流转时间/已办天数;2:分派时限;3:事项等级) |
| | | * @return |
| | | */ |
| | | @GetMapping("/pageMyTaskBl") |
| | | public Object pageMyTaskBl(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size, |
| | | @RequestParam(value = "status") int status, @CurrentUser String userId) { |
| | | @GetMapping("/pageMyTaskBlz") |
| | | public Object pageMyTaskBlz(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size, |
| | | @RequestParam(value = "sortType") int sortType, @RequestParam(value = "sortColmn") int sortColmn, |
| | | @CurrentUser String userId) { |
| | | try { |
| | | Map<String, Object> terms = Maps.newHashMap(); |
| | | // 流程/结案申请/结案时间区间 |
| | |
| | | if (StringUtils.isNotBlank(partyName)){ |
| | | terms.put("partyName", partyName); |
| | | } |
| | | return ReturnSucUtils.getRepInfo(); |
| | | Sort sort = null; |
| | | String sortName = null; |
| | | switch (sortColmn){ |
| | | case 1: |
| | | sortName = "t1.create_time"; |
| | | break; |
| | | case 2: |
| | | sortName = "t1.expire_time"; |
| | | break; |
| | | case 3: |
| | | sortName = "t2.case_level"; |
| | | break; |
| | | } |
| | | switch (sortType){ |
| | | case 1: |
| | | sort = Sort.by(Sort.Direction.ASC, sortName); |
| | | break; |
| | | case 2: |
| | | sort = Sort.by(Sort.Direction.DESC, sortName); |
| | | break; |
| | | } |
| | | if(ObjectUtils.isEmpty(sort)){ |
| | | sort = Sort.by(Sort.Direction.DESC, "t1.create_time"); |
| | | } |
| | | |
| | | PageRequest pageRequest = PageRequest.of(page-1, size, sort); |
| | | CtUserDTO loginUser = custClient.clientGetUserAll(userId); |
| | | terms.put("candeUnitId",loginUser.getUnitId()); |
| | | return ReturnSucUtils.getRepInfo(service.pageMyTaskBlz(pageRequest, terms)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * web端-工作台-查询待办任务-办理任务 |
| | | * @url {ctx}/api/web/caseTask/pageMyTaskBl |
| | | * @param page 页码 |
| | | * @param size 每页数量 |
| | | * @param status 状态,1:结案申请,2:已结案 |
| | | * @param sortType 排序方式(1:正序;2:倒序) |
| | | * @param sortColmn 排序字段(1:结案申请时间;2:事项等级) |
| | | * @return |
| | | */ |
| | | @GetMapping("/pageMyTaskBl") |
| | | public Object pageMyTaskBl(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size, |
| | | @RequestParam(value = "status") int status, @CurrentUser String userId, |
| | | @RequestParam(value = "sortType") int sortType, @RequestParam(value = "sortColmn") int sortColmn) { |
| | | try { |
| | | Map<String, Object> terms = Maps.newHashMap(); |
| | | // 流程/结案申请/结案时间区间 |
| | | String timeStart = request.getParameter("timeStart"); |
| | | String timeEnd = request.getParameter("timeEnd"); |
| | | if(StringUtils.isNotBlank(timeStart) && StringUtils.isNotBlank(timeEnd)) { |
| | | terms.put("timeStart", timeStart); |
| | | terms.put("timeEnd", timeEnd); |
| | | } |
| | | // 查询申请方/被申请方关键词 |
| | | String partyName = request.getParameter("partyName"); |
| | | if (StringUtils.isNotBlank(partyName)){ |
| | | terms.put("partyName", partyName); |
| | | } |
| | | Sort sort = null; |
| | | String sortName = null; |
| | | switch (sortColmn){ |
| | | case 1: |
| | | sortName = "t1.apply_time"; |
| | | break; |
| | | case 2: |
| | | sortName = "t1.case_level"; |
| | | break; |
| | | } |
| | | switch (sortType){ |
| | | case 1: |
| | | sort = Sort.by(Sort.Direction.ASC, sortName); |
| | | break; |
| | | case 2: |
| | | sort = Sort.by(Sort.Direction.DESC, sortName); |
| | | break; |
| | | } |
| | | if(ObjectUtils.isEmpty(sort)){ |
| | | sort = Sort.by(Sort.Direction.DESC, "t1.create_time"); |
| | | } |
| | | PageRequest pageRequest = PageRequest.of(page-1, size, sort); |
| | | CtUserDTO loginUser = custClient.clientGetUserAll(userId); |
| | | terms.put("applyUnitId",loginUser.getUnitId()); |
| | | terms.put("applyStatus", status); |
| | | return ReturnSucUtils.getRepInfo(service.pageMyTaskBl(pageRequest, terms)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | |
| | | * @param size 每页数量 |
| | | * @param status 状态,1:待审核,2:已审核 |
| | | * @param type 审核类型,1:回退审核,2:上报审核,3:结案审核,4:联合处置审核 |
| | | * @param sortType 排序方式(1:正序;2:倒序) |
| | | * @return |
| | | */ |
| | | @GetMapping("/pageMyTaskSh") |
| | | public Object pageMyTaskSh(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size, |
| | | @RequestParam(value = "status") int status, @RequestParam(value = "type") int type, |
| | | @CurrentUser String userId) { |
| | | @CurrentUser String userId, @RequestParam(value = "sortType") int sortType) { |
| | | try { |
| | | Map<String, Object> terms = Maps.newHashMap(); |
| | | // 回退/上报/结案申请/联合处置申请/审核时间区间 |
| | |
| | | if (StringUtils.isNotBlank(partyName)){ |
| | | terms.put("partyName", partyName); |
| | | } |
| | | return ReturnSucUtils.getRepInfo(); |
| | | Sort sort = null; |
| | | String sortName = null; |
| | | switch (type){ |
| | | case 1: |
| | | sortName = "t1.return_time"; |
| | | break; |
| | | case 2: |
| | | sortName = "t1.appear_time"; |
| | | break; |
| | | case 3: |
| | | sortName = "t1.apply_time"; |
| | | break; |
| | | case 4: |
| | | sortName = "t1.apply_time"; |
| | | break; |
| | | } |
| | | switch (sortType){ |
| | | case 1: |
| | | sort = Sort.by(Sort.Direction.ASC, sortName); |
| | | break; |
| | | case 2: |
| | | sort = Sort.by(Sort.Direction.DESC, sortName); |
| | | break; |
| | | } |
| | | if(ObjectUtils.isEmpty(sort)){ |
| | | sort = Sort.by(Sort.Direction.DESC, "t1.create_time"); |
| | | } |
| | | PageRequest pageRequest = PageRequest.of(page-1, size, sort); |
| | | CtUserDTO loginUser = custClient.clientGetUserAll(userId); |
| | | terms.put("auditUnitId",loginUser.getUnitId()); |
| | | terms.put("applyStatus", status); |
| | | return ReturnSucUtils.getRepInfo(service.pageMyTaskSh(pageRequest, type, terms)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * web端-工作台-查询待办任务-督办 |
| | | * @url {ctx}/api/web/caseTask/pageMyTaskDb |
| | | * @param page 页码 |
| | | * @param size 每页数量 |
| | | * @param status 状态,0:未回复,1:已回复 |
| | | * @param sortType 排序方式(1:正序;2:倒序) |
| | | * @param sortColmn 排序字段(1:督办时间/回复时限;2:事项等级) |
| | | * @return |
| | | */ |
| | | @GetMapping("/pageMyTaskDb") |
| | | public Object pageMyTaskDb(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size, |
| | | @RequestParam(value = "status") int status, @CurrentUser String userId, |
| | | @RequestParam(value = "sortType") int sortType, @RequestParam(value = "sortColmn") int sortColmn) { |
| | | try { |
| | | Map<String, Object> terms = Maps.newHashMap(); |
| | | // 流程/结案申请/结案时间区间 |
| | | String timeStart = request.getParameter("timeStart"); |
| | | String timeEnd = request.getParameter("timeEnd"); |
| | | if(StringUtils.isNotBlank(timeStart) && StringUtils.isNotBlank(timeEnd)) { |
| | | terms.put("timeStart", timeStart); |
| | | terms.put("timeEnd", timeEnd); |
| | | } |
| | | // 查询申请方/被申请方关键词 |
| | | String partyName = request.getParameter("partyName"); |
| | | if (StringUtils.isNotBlank(partyName)){ |
| | | terms.put("partyName", partyName); |
| | | } |
| | | Sort sort = null; |
| | | String sortName = null; |
| | | switch (sortColmn){ |
| | | case 1: |
| | | sortName = "t1.sup_time"; |
| | | break; |
| | | case 2: |
| | | sortName = "t1.case_level"; |
| | | break; |
| | | } |
| | | switch (sortType){ |
| | | case 1: |
| | | sort = Sort.by(Sort.Direction.ASC, sortName); |
| | | break; |
| | | case 2: |
| | | sort = Sort.by(Sort.Direction.DESC, sortName); |
| | | break; |
| | | } |
| | | if(ObjectUtils.isEmpty(sort)){ |
| | | sort = Sort.by(Sort.Direction.DESC, "t1.create_time"); |
| | | } |
| | | PageRequest pageRequest = PageRequest.of(page-1, size, sort); |
| | | CtUserDTO loginUser = custClient.clientGetUserAll(userId); |
| | | terms.put("quiltUnitId",loginUser.getUnitId()); |
| | | terms.put("supStatus", status); |
| | | |
| | | return ReturnSucUtils.getRepInfo(superviseService.pageMyTaskDb(pageRequest, terms)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | |
| | | package cn.huge.module.cases.dao.mapper; |
| | | |
| | | import cn.huge.module.cases.domain.dto.FrontPageListDTO; |
| | | import cn.huge.module.cases.domain.po.CaseAppear; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | */ |
| | | List<CaseAppear> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 首页查询 |
| | | * @param auditUnitId 审核组织编号 |
| | | * @return long |
| | | */ |
| | | long countAppearReview(@Param("auditUnitId") String auditUnitId); |
| | | |
| | | /** |
| | | * 首页-待审核条件统计 |
| | | * @param terms 条件 |
| | | * @return long |
| | | */ |
| | | long countMyTaskAppearReview(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 首页-待审核分页查询 |
| | | * @param page 分页对象 |
| | | * @param terms 条件 |
| | | * @return List<FrontPageListDTO> |
| | | */ |
| | | List<FrontPageListDTO> pageMyTaskAppearReview(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | } |
| | |
| | | package cn.huge.module.cases.dao.mapper; |
| | | |
| | | import cn.huge.module.cases.domain.dto.FrontPageListDTO; |
| | | import cn.huge.module.cases.domain.po.CaseAssistApply; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | */ |
| | | List<CaseAssistApply> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 首页查询 |
| | | * @param auditUnitId 审核组织编号 |
| | | * @return long |
| | | */ |
| | | long countAssistReview(@Param("auditUnitId") String auditUnitId); |
| | | |
| | | /** |
| | | * 首页-待审核条件统计 |
| | | * @param terms 条件 |
| | | * @return long |
| | | */ |
| | | long countMyTaskAssistReview(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 首页-待审核分页查询 |
| | | * @param page 分页对象 |
| | | * @param terms 条件 |
| | | * @return List<FrontPageListDTO> |
| | | */ |
| | | List<FrontPageListDTO> pageMyTaskAssistReview(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | } |
| | |
| | | package cn.huge.module.cases.dao.mapper; |
| | | |
| | | import cn.huge.module.cases.domain.dto.FrontPageListDTO; |
| | | import cn.huge.module.cases.domain.po.CaseReturn; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | */ |
| | | List<CaseReturn> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 首页查询 |
| | | * @param auditUnitId 审核组织编号 |
| | | * @return long |
| | | */ |
| | | long countReturnReview(@Param("auditUnitId") String auditUnitId); |
| | | |
| | | /** |
| | | * 首页-待审核条件统计 |
| | | * @param terms 条件 |
| | | * @return long |
| | | */ |
| | | long countMyTaskReturnReview(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 首页-待审核分页查询 |
| | | * @param page 分页对象 |
| | | * @param terms 条件 |
| | | * @return List<FrontPageListDTO> |
| | | */ |
| | | List<FrontPageListDTO> pageMyTaskReturnReview(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | } |
| | |
| | | List<CaseSupervise> pageCaseSupervise(@Param("caseId") String caseId, @Param("page") PageRequest page, @Param("supStatus") int supStatus, @Param("quiltUnitId") String quiltUnitId); |
| | | |
| | | /** |
| | | * 首页督办条件统计 |
| | | * @param terms 条件 |
| | | */ |
| | | long countMyTaskDb(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 首页督办分页查询 |
| | | * @param page 分页对象 |
| | | * @param terms 条件 |
| | | * @return List<CaseSupervise> |
| | | */ |
| | | List<CaseSupervise> pageMyTaskDb(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 首页-督办数量 |
| | | * @param supStatus 回复状态 |
| | | * @param quiltUnitId 被督办组织编号 |
| | |
| | | package cn.huge.module.cases.dao.mapper; |
| | | |
| | | import cn.huge.module.cases.domain.dto.FrontPageCountDTO; |
| | | import cn.huge.module.cases.domain.dto.FrontPageListDTO; |
| | | import cn.huge.module.cases.domain.po.CaseTask; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | * @return long |
| | | */ |
| | | FrontPageCountDTO countTaskList(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 首页-受分派条件统计 |
| | | * @param terms 条件 |
| | | * @return long |
| | | */ |
| | | long countMyTaskFp(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 首页-受分派分页查询 |
| | | * @param page 分页对象 |
| | | * @param terms 条件 |
| | | * @return List<FrontPageListDTO> |
| | | */ |
| | | List<FrontPageListDTO> pageMyTaskFp(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 首页-受签收条件统计 |
| | | * @param terms 条件 |
| | | * @return long |
| | | */ |
| | | long countMyTaskQs(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 首页-受签收分页查询 |
| | | * @param page 分页对象 |
| | | * @param terms 条件 |
| | | * @return List<FrontPageListDTO> |
| | | */ |
| | | List<FrontPageListDTO> pageMyTaskQs(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 首页-受待理条件统计 |
| | | * @param terms 条件 |
| | | * @return long |
| | | */ |
| | | long countMyTaskSl(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 首页-受待理分页查询 |
| | | * @param page 分页对象 |
| | | * @param terms 条件 |
| | | * @return List<FrontPageListDTO> |
| | | */ |
| | | List<FrontPageListDTO> pageMyTaskSl(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 首页-待审核条件统计 |
| | | * @param terms 条件 |
| | | * @return long |
| | | */ |
| | | long countMyTaskProcessing(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 首页-待审核分页查询 |
| | | * @param page 分页对象 |
| | | * @param terms 条件 |
| | | * @return List<FrontPageListDTO> |
| | | */ |
| | | List<FrontPageListDTO> pageMyTaskProcessing(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | } |
| | |
| | | package cn.huge.module.cases.dao.mapper; |
| | | |
| | | import cn.huge.module.cases.domain.dto.FrontPageListDTO; |
| | | import cn.huge.module.cases.domain.po.CaseAssistApply; |
| | | import cn.huge.module.cases.domain.po.CaseWindupApply; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | */ |
| | | List<CaseWindupApply> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 首页查询 |
| | | * @param auditUnitId 审核组织编号 |
| | | * @return long |
| | | */ |
| | | long countApplyReview(@Param("auditUnitId") String auditUnitId); |
| | | |
| | | /** |
| | | * 首页-待审核条件统计 |
| | | * @param terms 条件 |
| | | * @return long |
| | | */ |
| | | long countMyTaskApplyReview(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 首页-待审核分页查询 |
| | | * @param page 分页对象 |
| | | * @param terms 条件 |
| | | * @return List<FrontPageListDTO> |
| | | */ |
| | | List<FrontPageListDTO> pageMyTaskApplyReview(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 首页-待审核条件统计 |
| | | * @param terms 条件 |
| | | * @return long |
| | | */ |
| | | long countMySubmitApplyReview(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 首页-待审核分页查询 |
| | | * @param page 分页对象 |
| | | * @param terms 条件 |
| | | * @return List<FrontPageListDTO> |
| | | */ |
| | | List<FrontPageListDTO> pageMySubmitApplyReview(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | } |
| | |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | |
| | | <!-- 首页统计 --> |
| | | <select id="countAppearReview" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(1) |
| | | from |
| | | <include refid="table-name" /> |
| | | where |
| | | delete_status = 0 |
| | | and apply_status = 0 |
| | | and audit_unit_id = #{auditUnitId} |
| | | </select> |
| | | |
| | | <!-- 首页-待审核结果集 --> |
| | | <resultMap id="MyTaskApplyReviewResult" type="cn.huge.module.cases.domain.dto.FrontPageListDTO"> |
| | | <result property="ownerId" column="ownerId"/> |
| | | <result property="caseId" column="caseId"/> |
| | | <result property="turnaroundTime" column="turnaroundTime"/> |
| | | <result property="timeLimit" column="timeLimit"/> |
| | | <result property="caseGrade" column="caseGrade"/> |
| | | <result property="caseSource" column="caseSource"/> |
| | | <result property="caseType" column="caseType"/> |
| | | <result property="plaintiffs" column="plaintiffs"/> |
| | | <result property="defendants" column="defendants"/> |
| | | <result property="processingDays" column="processingDays"/> |
| | | <result property="mediResult" column="mediResult"/> |
| | | <result property="organizingUnit" column="organizingUnit"/> |
| | | <result property="cooperatingUnit" column="cooperatingUnit"/> |
| | | <result property="manager" column="manager"/> |
| | | <result property="mediResult" column="mediResult"/> |
| | | <result property="backUnit" column="backUnit"/> |
| | | <result property="reason" column="reason"/> |
| | | <result property="opinion" column="opinion"/> |
| | | </resultMap> |
| | | |
| | | <!-- 首页-待审核统计 --> |
| | | <select id="countMyTaskAppearReview" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(t1.id) |
| | | from |
| | | dyh_case_appear t1 left join dyh_case_info t2 on t1.case_id = t2.id |
| | | where |
| | | t1.delete_status = 0 |
| | | and t1.apply_status = #{terms.applyStatus} |
| | | and t1.audit_unit_id = #{terms.auditUnitId} |
| | | <if test="terms.timeStart != null and terms.timeStart !='' and terms.timeEnd != null and terms.timeEnd !=''"> |
| | | and (DATE_FORMAT(t1.appear_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.timeStart} |
| | | and DATE_FORMAT(t1.appear_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.timeEnd}) |
| | | </if> |
| | | <if test="terms.partyName != null and terms.partyName !=''"> |
| | | and (concat(t2.plaintiffs, t2.pagents, t2.defendants, t2.dagents) like concat('%', #{terms.partyName}, '%') |
| | | </if> |
| | | </select> |
| | | <!-- 首页-待审核分页查询 --> |
| | | <select id="pageMyTaskAppearReview" resultMap="MyTaskApplyReviewResult"> |
| | | SELECT t1.case_task_id as ownerId, t1.case_id as caseId, |
| | | t1.appear_time as turnaroundTime, t1.appear_unit_name as organizingUnit, t1.appear_content as opinion, |
| | | t2.case_level as caseGrade, t2.canal_name as caseSource, t2.case_type_name as caseType, |
| | | concat(t2.plaintiffs, t2.pagents) as plaintiffs, concat(t2.defendants, t2.dagents) as defendants |
| | | FROM |
| | | dyh_case_appear t1 left join dyh_case_info t2 on t1.case_id = t2.id |
| | | where |
| | | t1.delete_status = 0 |
| | | and t1.apply_status = #{terms.applyStatus} |
| | | and t1.audit_unit_id = #{terms.auditUnitId} |
| | | <if test="terms.timeStart != null and terms.timeStart !='' and terms.timeEnd != null and terms.timeEnd !=''"> |
| | | and (DATE_FORMAT(t1.appear_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.timeStart} |
| | | and DATE_FORMAT(t1.appear_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.timeEnd}) |
| | | </if> |
| | | <if test="terms.partyName != null and terms.partyName !=''"> |
| | | and (concat(t2.plaintiffs, t2.pagents, t2.defendants, t2.dagents) like concat('%', #{terms.partyName}, '%') |
| | | </if> |
| | | <if test="page.sort != null"> |
| | | <foreach collection="page.sort" item="s" index="index" separator="," open="order by "> |
| | | isnull(${s.property}), ${s.property} ${s.direction} |
| | | </foreach> |
| | | </if> |
| | | <if test="page.sort == null"> |
| | | order by isnull(t1.create_time), t1.create_time desc |
| | | </if> |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | </mapper> |
| | |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | |
| | | <!-- 首页统计 --> |
| | | <select id="countAssistReview" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(1) |
| | | from |
| | | <include refid="table-name" /> |
| | | where |
| | | delete_status = 0 |
| | | and apply_status = 0 |
| | | and audit_unit_id = #{auditUnitId} |
| | | </select> |
| | | |
| | | <!-- 首页-待审核 --> |
| | | <resultMap id="MyTaskApplyReviewResult" type="cn.huge.module.cases.domain.dto.FrontPageListDTO"> |
| | | <result property="ownerId" column="ownerId"/> |
| | | <result property="caseId" column="caseId"/> |
| | | <result property="turnaroundTime" column="turnaroundTime"/> |
| | | <result property="timeLimit" column="timeLimit"/> |
| | | <result property="caseGrade" column="caseGrade"/> |
| | | <result property="caseSource" column="caseSource"/> |
| | | <result property="caseType" column="caseType"/> |
| | | <result property="plaintiffs" column="plaintiffs"/> |
| | | <result property="defendants" column="defendants"/> |
| | | <result property="processingDays" column="processingDays"/> |
| | | <result property="mediResult" column="mediResult"/> |
| | | <result property="organizingUnit" column="organizingUnit"/> |
| | | <result property="cooperatingUnit" column="cooperatingUnit"/> |
| | | <result property="manager" column="manager"/> |
| | | <result property="mediResult" column="mediResult"/> |
| | | <result property="backUnit" column="backUnit"/> |
| | | <result property="reason" column="reason"/> |
| | | <result property="opinion" column="opinion"/> |
| | | </resultMap> |
| | | |
| | | <!-- 首页-待审核统计 --> |
| | | <select id="countMyTaskAssistReview" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(t1.id) |
| | | from |
| | | dyh_case_assist_apply t1 left join dyh_case_info t2 on t1.case_id = t2.id |
| | | where |
| | | t1.delete_status = 0 |
| | | and t1.apply_status = #{terms.applyStatus} |
| | | and t1.audit_unit_id = #{terms.auditUnitId} |
| | | <if test="terms.timeStart != null and terms.timeStart !='' and terms.timeEnd != null and terms.timeEnd !=''"> |
| | | and (DATE_FORMAT(t1.apply_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.timeStart} |
| | | and DATE_FORMAT(t1.apply_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.timeEnd}) |
| | | </if> |
| | | <if test="terms.partyName != null and terms.partyName !=''"> |
| | | and (concat(t2.plaintiffs, t2.pagents, t2.defendants, t2.dagents) like concat('%', #{terms.partyName}, '%') |
| | | </if> |
| | | </select> |
| | | <!-- 首页-待审核分页查询 --> |
| | | <select id="pageMyTaskAssistReview" resultMap="MyTaskApplyReviewResult"> |
| | | SELECT t1.id as ownerId, t1.case_id as CaseId, |
| | | t1.apply_time as turnaroundTime, t1.apply_unit_name as organizingUnit, t1.apply_assist_unit_name as cooperatingUnit, |
| | | t1.apply_content as reason,t2.case_level as caseGrade, t2.canal_name as caseSource, t2.case_type_name as caseType, |
| | | concat(t2.plaintiffs, t2.pagents) as plaintiffs, concat(t2.defendants, t2.dagents) as defendants |
| | | FROM |
| | | dyh_case_assist_apply t1 left join dyh_case_info t2 on t1.case_id = t2.id |
| | | where |
| | | t1.delete_status = 0 |
| | | and t1.apply_status = #{terms.applyStatus} |
| | | and t1.audit_unit_id = #{terms.auditUnitId} |
| | | <if test="terms.timeStart != null and terms.timeStart !='' and terms.timeEnd != null and terms.timeEnd !=''"> |
| | | and (DATE_FORMAT(t1.apply_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.timeStart} |
| | | and DATE_FORMAT(t1.apply_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.timeEnd}) |
| | | </if> |
| | | <if test="terms.partyName != null and terms.partyName !=''"> |
| | | and (concat(t2.plaintiffs, t2.pagents, t2.defendants, t2.dagents) like concat('%', #{terms.partyName}, '%') |
| | | </if> |
| | | <if test="page.sort != null"> |
| | | <foreach collection="page.sort" item="s" index="index" separator="," open="order by "> |
| | | isnull(${s.property}), ${s.property} ${s.direction} |
| | | </foreach> |
| | | </if> |
| | | <if test="page.sort == null"> |
| | | order by isnull(t1.create_time), t1.create_time desc |
| | | </if> |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | </mapper> |
| | |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | |
| | | <!-- 首页统计 --> |
| | | <select id="countReturnReview" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(1) |
| | | from |
| | | <include refid="table-name" /> |
| | | where |
| | | delete_status = 0 |
| | | and return_status = 0 |
| | | and audit_unit_id = #{auditUnitId} |
| | | </select> |
| | | |
| | | <!-- 首页-待审核结果集 --> |
| | | <resultMap id="MyTaskApplyReviewResult" type="cn.huge.module.cases.domain.dto.FrontPageListDTO"> |
| | | <result property="ownerId" column="ownerId"/> |
| | | <result property="caseId" column="caseId"/> |
| | | <result property="turnaroundTime" column="turnaroundTime"/> |
| | | <result property="timeLimit" column="timeLimit"/> |
| | | <result property="caseGrade" column="caseGrade"/> |
| | | <result property="caseSource" column="caseSource"/> |
| | | <result property="caseType" column="caseType"/> |
| | | <result property="plaintiffs" column="plaintiffs"/> |
| | | <result property="defendants" column="defendants"/> |
| | | <result property="processingDays" column="processingDays"/> |
| | | <result property="mediResult" column="mediResult"/> |
| | | <result property="organizingUnit" column="organizingUnit"/> |
| | | <result property="cooperatingUnit" column="cooperatingUnit"/> |
| | | <result property="manager" column="manager"/> |
| | | <result property="mediResult" column="mediResult"/> |
| | | <result property="backUnit" column="backUnit"/> |
| | | <result property="reason" column="reason"/> |
| | | <result property="opinion" column="opinion"/> |
| | | </resultMap> |
| | | |
| | | <!-- 首页-待审核统计 --> |
| | | <select id="countMyTaskReturnReview" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(t1.id) |
| | | from |
| | | dyh_case_return t1 left join dyh_case_info t2 on t1.case_id = t2.id |
| | | where |
| | | t1.delete_status = 0 |
| | | and t1.return_status = #{terms.applyStatus} |
| | | and t1.audit_unit_id = #{terms.auditUnitId} |
| | | <if test="terms.timeStart != null and terms.timeStart !='' and terms.timeEnd != null and terms.timeEnd !=''"> |
| | | and (DATE_FORMAT(t1.return_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.timeStart} |
| | | and DATE_FORMAT(t1.return_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.timeEnd}) |
| | | </if> |
| | | <if test="terms.partyName != null and terms.partyName !=''"> |
| | | and (concat(t2.plaintiffs, t2.pagents, t2.defendants, t2.dagents) like concat('%', #{terms.partyName}, '%') |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 首页-待审核条件统计 --> |
| | | <select id="pageMyTaskReturnReview" resultMap="MyTaskApplyReviewResult"> |
| | | SELECT t1.case_task_id as ownerId, t1.case_id as caseId, |
| | | t1.return_time as turnaroundTime, t1.return_unit_name as organizingUnit, t1.return_content as reason, |
| | | t2.case_level as caseGrade, t2.canal_name as caseSource, t2.case_type_name as caseType, |
| | | concat(t2.plaintiffs, t2.pagents) as plaintiffs, concat(t2.defendants, t2.dagents) as defendants |
| | | FROM |
| | | dyh_case_return t1 left join dyh_case_info t2 on t1.case_id = t2.id |
| | | where |
| | | t1.delete_status = 0 |
| | | and t1.return_status = #{terms.applyStatus} |
| | | and t1.audit_unit_id = #{terms.auditUnitId} |
| | | <if test="terms.timeStart != null and terms.timeStart !='' and terms.timeEnd != null and terms.timeEnd !=''"> |
| | | and (DATE_FORMAT(t1.return_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.timeStart} |
| | | and DATE_FORMAT(t1.return_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.timeEnd}) |
| | | </if> |
| | | <if test="terms.partyName != null and terms.partyName !=''"> |
| | | and (concat(t2.plaintiffs, t2.pagents, t2.defendants, t2.dagents) like concat('%', #{terms.partyName}, '%') |
| | | </if> |
| | | <if test="page.sort != null"> |
| | | <foreach collection="page.sort" item="s" index="index" separator="," open="order by "> |
| | | isnull(${s.property}), ${s.property} ${s.direction} |
| | | </foreach> |
| | | </if> |
| | | <if test="page.sort == null"> |
| | | order by isnull(t1.create_time), t1.create_time desc |
| | | </if> |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | </mapper> |
| | |
| | | <result property="id" column="id"/> |
| | | <result property="caseId" column="case_id"/> |
| | | <result property="supContent" column="sup_content"/> |
| | | <result property="supUnitId" column="sup_unit_id"/> |
| | | <result property="supUnitName" column="sup_unit_name"/> |
| | | <result property="supUserId" column="sup_user_id"/> |
| | | <result property="supUserName" column="sup_user_name"/> |
| | | <result property="supTime" column="sup_time"/> |
| | |
| | | id, |
| | | case_id, |
| | | sup_content, |
| | | sup_unit_id, |
| | | sup_unit_name, |
| | | sup_user_id, |
| | | sup_user_name, |
| | | sup_time, |
| | |
| | | <sql id="set-part"> |
| | | <if test="entity.caseId != null">case_id = #{entity.caseId},</if> |
| | | <if test="entity.supContent != null">sup_content = #{entity.supContent},</if> |
| | | <if test="entity.supUnitId != null">sup_unit_id = #{entity.supUnitId},</if> |
| | | <if test="entity.supUnitName != null">sup_unit_name = #{entity.supUnitName},</if> |
| | | <if test="entity.supUserId != null">sup_user_id = #{entity.supUserId},</if> |
| | | <if test="entity.supUserName != null">sup_user_name = #{entity.supUserName},</if> |
| | | <if test="entity.supTime != null">sup_time = #{entity.supTime},</if> |
| | |
| | | </if> |
| | | <if test="terms.supContent != null and terms.supContent !=''"> |
| | | and sup_content = #{terms.supContent} |
| | | </if> |
| | | <if test="terms.supUnitId != null and terms.supUnitId !=''"> |
| | | and sup_unit_id = #{terms.supUnitId} |
| | | </if> |
| | | <if test="terms.supUnitName != null and terms.supUnitName !=''"> |
| | | and sup_unit_name = #{terms.supUnitName} |
| | | </if> |
| | | <if test="terms.supUserId != null and terms.supUserId !=''"> |
| | | and sup_user_id = #{terms.supUserId} |
| | |
| | | from |
| | | <include refid="table-name" /> |
| | | where case_id = #{caseId} |
| | | and delete_status = '0' |
| | | and delete_status = 0 |
| | | and sup_status = #{supStatus} |
| | | and quilt_unit_id = #{quiltUnitId} |
| | | </select> |
| | |
| | | FROM |
| | | <include refid="table-name" /> |
| | | where case_id = #{caseId} |
| | | and delete_status = '0' |
| | | and delete_status = 0 |
| | | and sup_status = #{supStatus} |
| | | and quilt_unit_id = #{quiltUnitId} |
| | | <if test="page.sort != null"> |
| | | <foreach collection="page.sort" item="s" index="index" separator="," open="order by "> |
| | | isnull(${s.property}), ${s.property} ${s.direction} |
| | | </foreach> |
| | | </if> |
| | | <if test="page.sort == null"> |
| | | order by isnull(sup_time), sup_time desc |
| | | </if> |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | |
| | | <!-- 首页督办条件统计 --> |
| | | <select id="countMyTaskDb" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(1) |
| | | from |
| | | dyh_case_supervise t1 left join dyh_case_info t2 on t1.case_id = t2.id |
| | | where |
| | | delete_status = 0 |
| | | and sup_status = #{terms.supStatus} |
| | | and quilt_unit_id = #{terms.quiltUnitId} |
| | | </select> |
| | | |
| | | <!-- 首页督办分页查询 --> |
| | | <select id="pageMyTaskDb" resultMap="dataResult"> |
| | | SELECT |
| | | t1.sup_time as turnaroundTime, t1.DATEADD(hour, t1.replyTerm, t1.sup_time) as timeLimit, t1.sup_unit_name as organizingUnit, |
| | | t1.sup_content as opinion, t2.case_level as caseGrade, t2.canal_name as caseSource, |
| | | t2.case_type_name as caseType, concat(t2.plaintiffs, t2.pagents) as plaintiffs, |
| | | concat(t2.defendants, t2.dagents) as defendants |
| | | FROM |
| | | dyh_case_supervise t1 left join dyh_case_info t2 on t1.case_id = t2.id |
| | | where |
| | | t1.delete_status = 0 |
| | | and t1.sup_status = #{terms.supStatus} |
| | | and t1.quilt_unit_id = #{terms.quiltUnitId} |
| | | <if test="terms.timeStart != null and terms.timeStart !='' and terms.timeEnd != null and terms.timeEnd !=''"> |
| | | and (DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.timeStart} |
| | | and DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.timeEnd}) |
| | | </if> |
| | | <if test="terms.partyName != null and terms.partyName !=''"> |
| | | and (concat(t2.plaintiffs, t2.pagents, t2.defendants, t2.dagents) like concat('%', #{terms.partyName}, '%') |
| | | </if> |
| | | <if test="page.sort != null"> |
| | | <foreach collection="page.sort" item="s" index="index" separator="," open="order by "> |
| | | isnull(${s.property}), ${s.property} ${s.direction} |
| | |
| | | from |
| | | <include refid="table-name" /> |
| | | where |
| | | delete_status = '0' |
| | | delete_status = 0 |
| | | and sup_status = #{supStatus} |
| | | and quilt_unit_id = #{quiltUnitId} |
| | | </select> |
| | |
| | | |
| | | <!-- 结果集--> |
| | | <resultMap id="FrontPageCountResult" type="cn.huge.module.cases.domain.dto.FrontPageCountDTO"> |
| | | <result property="waitDisp" column="waitDisp"/> |
| | | <result property="waitSign" column="waitSign"/> |
| | | <result property="waitAccept" column="waitAccept"/> |
| | | <result property="waitAccept" column="waitAccept"/> |
| | |
| | | <!-- 查询任务数量 --> |
| | | <select id="countTaskList" resultMap="FrontPageCountResult"> |
| | | select |
| | | count(case when node_id = 'ZJ_DFP' or node_id = 'QJ_DFP' or node_id = 'SJ_DFP' then id end) as waitDisp, |
| | | count(case when sign_status = 1 then id end) as waitSign, |
| | | count(case when node_id = then id end) as waitAccept, |
| | | count(case when node_id = then id end) as Processing |
| | | count(case when node_id = 'ZJ_DSL' or node_id = 'QJ_DFP' or node_id = 'SJ_DFP' then id end) as waitAccept, |
| | | count(case when node_id = 'BLFK' then id end) as Processing |
| | | from |
| | | <include refid="table-name" /> |
| | | where |
| | | cande_unit_id = #{terms.candeUnitId} |
| | | and (cande_dept_id = #{terms.candeDeptId} or cande_dept_id is null) |
| | | <if test="terms.candeDeptId != null and terms.candeDeptId !=''"> |
| | | and (cande_dept_id = #{terms.candeDeptId}) |
| | | </if> |
| | | and delete_status = '0' |
| | | and status = '1' |
| | | </select> |
| | | |
| | | <!-- 首页-待办理结果集 --> |
| | | <resultMap id="MyTaskApplyReviewResult" type="cn.huge.module.cases.domain.dto.FrontPageListDTO"> |
| | | <result property="ownerId" column="ownerId"/> |
| | | <result property="caseId" column="caseId"/> |
| | | <result property="turnaroundTime" column="turnaroundTime"/> |
| | | <result property="timeLimit" column="timeLimit"/> |
| | | <result property="caseGrade" column="caseGrade"/> |
| | | <result property="caseSource" column="caseSource"/> |
| | | <result property="caseType" column="caseType"/> |
| | | <result property="plaintiffs" column="plaintiffs"/> |
| | | <result property="defendants" column="defendants"/> |
| | | <result property="processingDays" column="processingDays"/> |
| | | <result property="mediResult" column="mediResult"/> |
| | | <result property="organizingUnit" column="organizingUnit"/> |
| | | <result property="cooperatingUnit" column="cooperatingUnit"/> |
| | | <result property="manager" column="manager"/> |
| | | <result property="mediResult" column="mediResult"/> |
| | | <result property="backUnit" column="backUnit"/> |
| | | <result property="reason" column="reason"/> |
| | | <result property="opinion" column="opinion"/> |
| | | <result property="process" column="process"/> |
| | | </resultMap> |
| | | |
| | | <!-- 首页-待分派条件统计 --> |
| | | <select id="countMyTaskFp" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(t1.id) |
| | | from |
| | | dyh_case_task t1 left join dyh_case_info t2 on t1.case_id = t2.id |
| | | where |
| | | cande_unit_id = #{terms.candeUnitId} |
| | | and (t1.node_id = 'ZJ_DFP' or t1.node_id = 'QJ_DFP' or t1.node_id = 'SJ_DFP') |
| | | and t1.delete_status = 0 |
| | | and t1.status = #{terms.status} |
| | | <if test="terms.timeStart != null and terms.timeStart !='' and terms.timeEnd != null and terms.timeEnd !=''"> |
| | | and (DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.timeStart} |
| | | and DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.timeEnd}) |
| | | </if> |
| | | <if test="terms.partyName != null and terms.partyName !=''"> |
| | | and (concat(t2.plaintiffs, t2.pagents, t2.defendants, t2.dagents) like concat('%', #{terms.partyName}, '%') |
| | | </if> |
| | | </select> |
| | | <!-- 首页-待分派分页查询 --> |
| | | <select id="pageMyTaskFp" resultMap="MyTaskApplyReviewResult"> |
| | | SELECT t1.id as ownerId, t1.case_id as caseId, |
| | | t1.create_time as turnaroundTime, t1.expire_time as timeLimit, t2.case_level as caseGrade, t2.canal_name as caseSource, |
| | | t2.case_type_name as caseType, concat(t2.plaintiffs, t2.pagents) as plaintiffs, concat(t2.defendants, t2.dagents) as defendants |
| | | FROM |
| | | dyh_case_task t1 left join dyh_case_info t2 on t1.case_id = t2.id |
| | | where |
| | | t1.cande_unit_id = #{terms.candeUnitId} |
| | | and (t1.node_id = 'ZJ_DFP' or t1.node_id = 'QJ_DFP' or t1.node_id = 'SJ_DFP') |
| | | and t1.delete_status = 0 |
| | | and t1.status = #{terms.status} |
| | | <if test="terms.timeStart != null and terms.timeStart !='' and terms.timeEnd != null and terms.timeEnd !=''"> |
| | | and (DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.timeStart} |
| | | and DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.timeEnd}) |
| | | </if> |
| | | <if test="terms.partyName != null and terms.partyName !=''"> |
| | | and (concat(t2.plaintiffs, t2.pagents, t2.defendants, t2.dagents) like concat('%', #{terms.partyName}, '%') |
| | | </if> |
| | | <if test="page.sort != null"> |
| | | <foreach collection="page.sort" item="s" index="index" separator="," open="order by "> |
| | | isnull(${s.property}), ${s.property} ${s.direction} |
| | | </foreach> |
| | | </if> |
| | | <if test="page.sort == null"> |
| | | order by isnull(t1.create_time), t1.create_time desc |
| | | </if> |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | |
| | | <!-- 首页-待签收条件统计 --> |
| | | <select id="countMyTaskQs" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(t1.id) |
| | | from |
| | | dyh_case_task t1 left join dyh_case_info t2 on t1.case_id = t2.id |
| | | where |
| | | t1.cande_unit_id = #{terms.candeUnitId} |
| | | and t1.sign_status = #{terms.signStatus} |
| | | and t1.delete_status = 0 |
| | | and t1.status = '1' |
| | | <if test="terms.timeStart != null and terms.timeStart !='' and terms.timeEnd != null and terms.timeEnd !=''"> |
| | | and (DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.timeStart} |
| | | and DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.timeEnd}) |
| | | </if> |
| | | <if test="terms.partyName != null and terms.partyName !=''"> |
| | | and (concat(t2.plaintiffs, t2.pagents, t2.defendants, t2.dagents) like concat('%', #{terms.partyName}, '%') |
| | | </if> |
| | | </select> |
| | | <!-- 首页-待签收分页查询 --> |
| | | <select id="pageMyTaskQs" resultMap="MyTaskApplyReviewResult"> |
| | | SELECT t1.id as ownerId, t1.case_id as caseId, |
| | | t1.create_time as turnaroundTime, t1.expire_time as timeLimit, t2.case_level as caseGrade, t2.canal_name as caseSource, |
| | | t2.case_type_name as caseType, concat(t2.plaintiffs, t2.pagents) as plaintiffs, |
| | | concat(t2.defendants, t2.dagents) as defendants |
| | | FROM |
| | | dyh_case_task t1 left join dyh_case_info t2 on t1.case_id = t2.id |
| | | where |
| | | t1.cande_unit_id = #{terms.candeUnitId} |
| | | and t1.sign_status = #{terms.signStatus} |
| | | and t1.delete_status = 0 |
| | | and t1.status = '1' |
| | | <if test="terms.timeStart != null and terms.timeStart !='' and terms.timeEnd != null and terms.timeEnd !=''"> |
| | | and (DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.timeStart} |
| | | and DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.timeEnd}) |
| | | </if> |
| | | <if test="terms.partyName != null and terms.partyName !=''"> |
| | | and (concat(t2.plaintiffs, t2.pagents, t2.defendants, t2.dagents) like concat('%', #{terms.partyName}, '%') |
| | | </if> |
| | | <if test="page.sort != null"> |
| | | <foreach collection="page.sort" item="s" index="index" separator="," open="order by "> |
| | | isnull(${s.property}), ${s.property} ${s.direction} |
| | | </foreach> |
| | | </if> |
| | | <if test="page.sort == null"> |
| | | order by isnull(t1.create_time), t1.create_time desc |
| | | </if> |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | |
| | | <!-- 首页-待受理条件统计 --> |
| | | <select id="countMyTaskSl" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(t1.id) |
| | | from |
| | | dyh_case_task t1 left join dyh_case_info t2 on t1.case_id = t2.id |
| | | where |
| | | t1.cande_unit_id = #{terms.candeUnitId} |
| | | and (t1.node_id = 'ZJ_DSL' or t1.node_id = 'QJ_DFP' or t1.node_id = 'SJ_DFP') |
| | | and t1.delete_status = 0 |
| | | and t1.sign_status != 1 |
| | | and t1.status = #{terms.status} |
| | | <if test="terms.timeStart != null and terms.timeStart !='' and terms.timeEnd != null and terms.timeEnd !=''"> |
| | | and (DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.timeStart} |
| | | and DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.timeEnd}) |
| | | </if> |
| | | <if test="terms.partyName != null and terms.partyName !=''"> |
| | | and (concat(t2.plaintiffs, t2.pagents, t2.defendants, t2.dagents) like concat('%', #{terms.partyName}, '%') |
| | | </if> |
| | | </select> |
| | | <!-- 首页-待受理分页查询 --> |
| | | <select id="pageMyTaskSl" resultMap="MyTaskApplyReviewResult"> |
| | | SELECT t1.id as ownerId, t1.case_id as caseId, |
| | | t1.create_time as turnaroundTime, t1.expire_time as timeLimit, |
| | | t2.case_level as caseGrade, t2.canal_name as caseSource, |
| | | t2.case_type_name as caseType, concat(t2.plaintiffs, t2.pagents) as plaintiffs, |
| | | concat(t2.defendants, t2.dagents) as defendants |
| | | FROM |
| | | dyh_case_task t1 left join dyh_case_info t2 on t1.case_id = t2.id |
| | | where |
| | | t1.cande_unit_id = #{terms.candeUnitId} |
| | | and (t1.node_id = 'ZJ_DSL' or t1.node_id = 'QJ_DFP' or t1.node_id = 'SJ_DFP') |
| | | and t1.delete_status = 0 |
| | | and t1.sign_status != 1 |
| | | and t1.status = #{terms.status} |
| | | <if test="terms.timeStart != null and terms.timeStart !='' and terms.timeEnd != null and terms.timeEnd !=''"> |
| | | and (DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.timeStart} |
| | | and DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.timeEnd}) |
| | | </if> |
| | | <if test="terms.partyName != null and terms.partyName !=''"> |
| | | and (concat(t2.plaintiffs, t2.pagents, t2.defendants, t2.dagents) like concat('%', #{terms.partyName}, '%') |
| | | </if> |
| | | <if test="page.sort != null"> |
| | | <foreach collection="page.sort" item="s" index="index" separator="," open="order by "> |
| | | isnull(${s.property}), ${s.property} ${s.direction} |
| | | </foreach> |
| | | </if> |
| | | <if test="page.sort == null"> |
| | | order by isnull(t1.create_time), t1.create_time desc |
| | | </if> |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | |
| | | <!-- 首页-办理中条件统计 --> |
| | | <select id="countMyTaskProcessing" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(t1.id) |
| | | from |
| | | dyh_case_task t1 left join dyh_case_info t2 on t1.case_id = t2.id |
| | | where |
| | | t1.cande_unit_id = #{terms.candeUnitId} |
| | | and t1.node_id = 'BLFK' |
| | | and t1.delete_status = 0 |
| | | and t1.status = 1 |
| | | <if test="terms.timeStart != null and terms.timeStart !='' and terms.timeEnd != null and terms.timeEnd !=''"> |
| | | and (DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.timeStart} |
| | | and DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.timeEnd}) |
| | | </if> |
| | | <if test="terms.partyName != null and terms.partyName !=''"> |
| | | and (concat(t2.plaintiffs, t2.pagents, t2.defendants, t2.dagents) like concat('%', #{terms.partyName}, '%') |
| | | </if> |
| | | </select> |
| | | <!-- 首页-办理中分页查询 --> |
| | | <select id="pageMyTaskProcessing" resultMap="MyTaskApplyReviewResult"> |
| | | SELECT t1.id as ownerId, t1.case_id as caseId, |
| | | t1.create_time as turnaroundTime, t1.cande_unit_name as organizingUnit, t2.case_level as caseGrade, t2.canal_name as caseSource, |
| | | t2.case_type_name as caseType, concat(t2.plaintiffs, t2.pagents) as plaintiffs, |
| | | concat(t2.defendants, t2.dagents) as defendants |
| | | FROM |
| | | dyh_case_task t1 left join dyh_case_info t2 on t1.case_id = t2.id |
| | | where |
| | | t1.cande_unit_id = #{terms.candeUnitId} |
| | | and t1.node_id = 'BLFK' |
| | | and t1.delete_status = 0 |
| | | and t1.status = 1 |
| | | <if test="terms.timeStart != null and terms.timeStart !='' and terms.timeEnd != null and terms.timeEnd !=''"> |
| | | and (DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.timeStart} |
| | | and DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.timeEnd}) |
| | | </if> |
| | | <if test="terms.partyName != null and terms.partyName !=''"> |
| | | and (concat(t2.plaintiffs, t2.pagents, t2.defendants, t2.dagents) like concat('%', #{terms.partyName}, '%') |
| | | </if> |
| | | <if test="page.sort != null"> |
| | | <foreach collection="page.sort" item="s" index="index" separator="," open="order by "> |
| | | isnull(${s.property}), ${s.property} ${s.direction} |
| | | </foreach> |
| | | </if> |
| | | <if test="page.sort == null"> |
| | | order by isnull(t1.create_time), t1.create_time desc |
| | | </if> |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | |
| | | |
| | | |
| | | </mapper> |
| | |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | |
| | | <!-- 首页统计 --> |
| | | <select id="countApplyReview" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(1) |
| | | from |
| | | <include refid="table-name" /> |
| | | where |
| | | delete_status = 0 |
| | | and apply_status = 0 |
| | | and audit_unit_id = #{auditUnitId} |
| | | </select> |
| | | |
| | | <!-- 首页-待审核结果集 --> |
| | | <resultMap id="MyTaskApplyReviewResult" type="cn.huge.module.cases.domain.dto.FrontPageListDTO"> |
| | | <result property="ownerId" column="ownerId"/> |
| | | <result property="caseId" column="caseId"/> |
| | | <result property="turnaroundTime" column="turnaroundTime"/> |
| | | <result property="timeLimit" column="timeLimit"/> |
| | | <result property="caseGrade" column="caseGrade"/> |
| | | <result property="caseSource" column="caseSource"/> |
| | | <result property="caseType" column="caseType"/> |
| | | <result property="plaintiffs" column="plaintiffs"/> |
| | | <result property="defendants" column="defendants"/> |
| | | <result property="processingDays" column="processingDays"/> |
| | | <result property="mediResult" column="mediResult"/> |
| | | <result property="organizingUnit" column="organizingUnit"/> |
| | | <result property="cooperatingUnit" column="cooperatingUnit"/> |
| | | <result property="manager" column="manager"/> |
| | | <result property="mediResult" column="mediResult"/> |
| | | <result property="backUnit" column="backUnit"/> |
| | | <result property="reason" column="reason"/> |
| | | <result property="opinion" column="opinion"/> |
| | | <result property="process" column="process"/> |
| | | </resultMap> |
| | | |
| | | <!-- 首页-待审核条件统计 --> |
| | | <select id="countMyTaskApplyReview" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(t1.id) |
| | | from |
| | | dyh_case_windup_apply t1 left join dyh_case_info t2 on t1.case_id = t2.id |
| | | where |
| | | t1.delete_status = 0 |
| | | and t1.apply_status = #{terms.applyStatus} |
| | | and t1.audit_unit_id = #{terms.auditUnitId} |
| | | <if test="terms.timeStart != null and terms.timeStart !='' and terms.timeEnd != null and terms.timeEnd !=''"> |
| | | and (DATE_FORMAT(t1.apply_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.timeStart} |
| | | and DATE_FORMAT(t1.apply_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.timeEnd}) |
| | | </if> |
| | | <if test="terms.partyName != null and terms.partyName !=''"> |
| | | and (concat(t2.plaintiffs, t2.pagents, t2.defendants, t2.dagents) like concat('%', #{terms.partyName}, '%') |
| | | </if> |
| | | </select> |
| | | <!-- 首页-待审核分页查询 --> |
| | | <select id="pageMyTaskApplyReview" resultMap="MyTaskApplyReviewResult"> |
| | | SELECT t1.case_task_id as ownerId, t1.case_id as caseId, |
| | | t1.apply_time as turnaroundTime, t1.apply_unit_name as organizingUnit, t1.medi_result_name as mediResult, |
| | | t1.fail_reason as reason, t2.case_level as caseGrade, t2.canal_name as caseSource, |
| | | t2.case_type_name as caseType, concat(t2.plaintiffs, t2.pagents) as plaintiffs, |
| | | concat(t2.defendants, t2.dagents) as defendants |
| | | FROM |
| | | dyh_case_windup_apply t1 left join dyh_case_info t2 on t1.case_id = t2.id |
| | | where |
| | | t1.delete_status = 0 |
| | | and t1.apply_status = #{terms.applyStatus} |
| | | and t1.audit_unit_id = #{terms.auditUnitId} |
| | | <if test="terms.timeStart != null and terms.timeStart !='' and terms.timeEnd != null and terms.timeEnd !=''"> |
| | | and (DATE_FORMAT(t1.apply_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.timeStart} |
| | | and DATE_FORMAT(t1.apply_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.timeEnd}) |
| | | </if> |
| | | <if test="terms.partyName != null and terms.partyName !=''"> |
| | | and (concat(t2.plaintiffs, t2.pagents, t2.defendants, t2.dagents) like concat('%', #{terms.partyName}, '%') |
| | | </if> |
| | | <if test="page.sort != null"> |
| | | <foreach collection="page.sort" item="s" index="index" separator="," open="order by "> |
| | | isnull(${s.property}), ${s.property} ${s.direction} |
| | | </foreach> |
| | | </if> |
| | | <if test="page.sort == null"> |
| | | order by isnull(t1.create_time), t1.create_time desc |
| | | </if> |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | |
| | | <!-- 首页-结案申请条件统计 --> |
| | | <select id="countMySubmitApplyReview" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(t1.id) |
| | | from |
| | | dyh_case_windup_apply t1 left join dyh_case_info t2 on t1.case_id = t2.id |
| | | where |
| | | t1.delete_status = 0 |
| | | and t1.apply_status = #{terms.applyStatus} |
| | | and t1.apply_unit_id = #{terms.applyUnitId} |
| | | <if test="terms.timeStart != null and terms.timeStart !='' and terms.timeEnd != null and terms.timeEnd !=''"> |
| | | and (DATE_FORMAT(t1.apply_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.timeStart} |
| | | and DATE_FORMAT(t1.apply_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.timeEnd}) |
| | | </if> |
| | | <if test="terms.partyName != null and terms.partyName !=''"> |
| | | and (concat(t2.plaintiffs, t2.pagents, t2.defendants, t2.dagents) like concat('%', #{terms.partyName}, '%') |
| | | </if> |
| | | </select> |
| | | <!-- 首页-结案申请分页查询 --> |
| | | <select id="pageMySubmitApplyReview" resultMap="MyTaskApplyReviewResult"> |
| | | SELECT t1.case_task_id as ownerId, t1.case_id as caseId, t2.process_name as process, |
| | | t1.apply_time as turnaroundTime, t2.case_level as caseGrade, t2.canal_name as caseSource, t2.case_type_name as caseType, |
| | | t1.apply_unit_name as organizingUnit, t1.medi_result_name as mediResult,t1.fail_reason as reason, |
| | | concat(t2.plaintiffs, t2.pagents) as plaintiffs, |
| | | concat(t2.defendants, t2.dagents) as defendants |
| | | FROM |
| | | dyh_case_windup_apply t1 left join dyh_case_info t2 on t1.case_id = t2.id |
| | | where |
| | | t1.delete_status = 0 |
| | | and t1.apply_status = #{terms.applyStatus} |
| | | and t1.apply_unit_id = #{terms.applyUnitId} |
| | | <if test="terms.timeStart != null and terms.timeStart !='' and terms.timeEnd != null and terms.timeEnd !=''"> |
| | | and (DATE_FORMAT(t1.apply_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.timeStart} |
| | | and DATE_FORMAT(t1.apply_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.timeEnd}) |
| | | </if> |
| | | <if test="terms.partyName != null and terms.partyName !=''"> |
| | | and (concat(t2.plaintiffs, t2.pagents, t2.defendants, t2.dagents) like concat('%', #{terms.partyName}, '%') |
| | | </if> |
| | | <if test="page.sort != null"> |
| | | <foreach collection="page.sort" item="s" index="index" separator="," open="order by "> |
| | | isnull(${s.property}), ${s.property} ${s.direction} |
| | | </foreach> |
| | | </if> |
| | | <if test="page.sort == null"> |
| | | order by isnull(t1.create_time), t1.create_time desc |
| | | </if> |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | </mapper> |
| | |
| | | /** |
| | | * 待分派 |
| | | */ |
| | | private Long waitDispatch; |
| | | private Long waitDisp; |
| | | |
| | | /** |
| | | * 待签收 |
| | |
| | | @Data |
| | | public class FrontPageListDTO { |
| | | /** |
| | | * 所属编号 |
| | | */ |
| | | private String ownerId; |
| | | |
| | | /** |
| | | * 事项ID |
| | | */ |
| | | private String caseId; |
| | | |
| | | /** |
| | | * 流转时间 |
| | | */ |
| | | private Date turnaroundTime; |
| | |
| | | /** |
| | | * 已办天数 |
| | | */ |
| | | private Integer processingDays; |
| | | private Long processingDays; |
| | | |
| | | /** |
| | | * 承办部门 |
| | |
| | | */ |
| | | private String opinion; |
| | | |
| | | |
| | | /** |
| | | * 事项状态 |
| | | */ |
| | | private String process; |
| | | } |
| | |
| | | |
| | | /** |
| | | * 督办人编号 |
| | | */ |
| | | @TableField(value = "sup_unit_id") |
| | | private String supUnitId; |
| | | |
| | | /** |
| | | * 督办人名称 |
| | | */ |
| | | @TableField(value = "sup_unit_name") |
| | | private String supUnitName; |
| | | |
| | | /** |
| | | * 督办人编号 |
| | | */ |
| | | @TableField(value = "sup_user_id") |
| | | private String supUserId; |
| | |
| | | * @return Page |
| | | */ |
| | | public Map<String, Object> listFeedback(String id) { |
| | | try { |
| | | Map<String, Object> result = new HashMap<>(); |
| | | |
| | | CaseInfoUnfold caseInfoUnfold = unfoldService.getById(id); |
| | | if(ObjectUtils.isNotEmpty(caseInfoUnfold)){ |
| | | result.put("manager", caseInfoUnfold.getMediator()); |
| | | } |
| | | QueryWrapper<CaseFeedback> caseFeedbackQueryWrapper = new QueryWrapper<>(); |
| | | caseFeedbackQueryWrapper.eq("case_id", id); |
| | | List<CaseFeedback> caseFeedbackList = mapper.selectList(caseFeedbackQueryWrapper); |
| | |
| | | } |
| | | result.put("caseFeedbackList", caseFeedbackList); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("[caseFeedbackService.listFeedback]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("caseFeedbackService.listFeedback", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | caseInfo.setDagents(dagents.toString()); |
| | | caseInfo.setCaseRef(utilsClient.createCaseRef()); |
| | | caseInfo.setCanal(CaseBaseConstsEnum.CASE_CANAL_1.getIndex()); |
| | | caseInfo.setCaseDes(CaseBaseConstsEnum.CASE_CANAL_1.getDes()); |
| | | //todo case_title生成、经纬度转换、来访形式 |
| | | caseInfo.setCanalName(CaseBaseConstsEnum.CASE_CANAL_1.getDes()); |
| | | caseInfo.setVisitWay(CaseBaseConstsEnum.VISIT_WAY_1.getIndex()); |
| | | caseInfo.setVisitWayName(CaseBaseConstsEnum.VISIT_WAY_1.getDes()); |
| | | //todo case_title生成、经纬度转换 |
| | | if(0 == registerSaveDTO.getOperateType()){ |
| | | caseInfo.setInputUnitId(loginUser.getUnitId()); |
| | | caseInfo.setInputUnitName(loginUser.getUnitName()); |
| | |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | caseSuperviseNew.setSupUserId(loginUser.getId()); |
| | | caseSuperviseNew.setSupUserName(loginUser.getTrueName()); |
| | | caseSuperviseNew.setSupUnitId(loginUser.getUnitId()); |
| | | caseSuperviseNew.setSupUnitId(loginUser.getUnitName()); |
| | | caseSuperviseNew.setSupTime(nowDate); |
| | | caseSuperviseNew.setQuiltUnitId(quiltUnitDTO.getQuiltUnitId()); |
| | | caseSuperviseNew.setQuiltUnitName(quiltUnitDTO.getQuiltUnitName()); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 首页-督办 |
| | | * @param page |
| | | * @param terms |
| | | */ |
| | | public Page<CaseSupervise> pageMyTaskDb(PageRequest page, Map<String, Object> terms){ |
| | | try{ |
| | | long countSuperviseList = mapper.countMyTaskDb(terms); |
| | | List<CaseSupervise> caseSuperviseList = mapper.pageMyTaskDb(page, terms); |
| | | return new PageImpl<CaseSupervise>(caseSuperviseList, page, countSuperviseList); |
| | | }catch (Exception e){ |
| | | log.error("[CaseSuperviseService.pageReplied]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseSuperviseService.pageReplied", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询督办数量 |
| | | * @param supStatus 回复状态 |
| | | * @param quiltUnitId 被督办组织编号 |
| | |
| | | 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.dao.mapper.*; |
| | | import cn.huge.module.cases.domain.dto.*; |
| | | import cn.huge.base.common.utils.ObjectUtils; |
| | | import cn.huge.module.cases.domain.dto.CaseFlowDTO; |
| | | import cn.huge.module.cases.domain.dto.TabButtonDTO; |
| | | import cn.huge.module.cases.domain.dto.TabButtonInfoDTO; |
| | | import cn.huge.module.cases.domain.po.CaseAssistApply; |
| | | import cn.huge.module.cases.domain.po.CaseInfoUnfold; |
| | | import cn.huge.module.cases.domain.dto.*; |
| | | import cn.huge.module.cases.domain.po.*; |
| | | 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.CaseTaskMapper; |
| | | import cn.huge.module.cases.domain.po.CaseTask; |
| | | import cn.huge.module.constant.BaseConsts; |
| | | 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.mediate.constant.AuditBaseConsts; |
| | | import cn.huge.module.mediate.constant.AuditBaseConstsEnum; |
| | | import cn.huge.module.mediate.constant.CaseBaseConsts; |
| | | import cn.huge.module.disp.constant.DispBaseConstsEnum; |
| | | import cn.huge.module.disp.dto.CaseDispBaseDTO; |
| | | import cn.huge.module.disp.dto.DispCaseBaseDTO; |
| | |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Sort; |
| | | import org.springframework.stereotype.Service; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.data.domain.Page; |
| | |
| | | import org.springframework.data.domain.PageRequest; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.time.temporal.ChronoUnit; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | private CaseInfoUnfoldService caseInfoUnfoldService; |
| | | @Autowired |
| | | private CaseWindupApplyService caseWindupApplyService; |
| | | |
| | | @Autowired |
| | | private CaseWindupApplyMapper caseWindupApplyMapper; |
| | | |
| | | @Autowired |
| | | private CaseReturnMapper caseReturnMapper; |
| | | |
| | | @Autowired |
| | | private CaseAppearMapper caseAppearMapper; |
| | | |
| | | @Autowired |
| | | private CaseAssistApplyMapper caseAssistApplyMapper; |
| | | |
| | | @Autowired |
| | | private CaseAssistApplyService assistApplyService; |
| | | |
| | | /** |
| | | * 更新对象 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 按条件统计 |
| | | * 获取首页统计数量 |
| | | * @param userId 用户编号 |
| | | * @return long |
| | | */ |
| | | public Map<String, Long> getCountList(String userId){ |
| | | public FrontPageCountDTO getCountList(String userId){ |
| | | try { |
| | | CtUserDTO loginUser = custClient.clientGetUserAll(userId); |
| | | Map<String, Object> terms = new HashMap<>(); |
| | | terms.put("candeUnitId", loginUser.getUnitId()); |
| | | terms.put("candeDeptId", loginUser.getDeptId()); |
| | | mapper.countTaskList(terms); |
| | | superviseService.countCaseSuperviseList(0,loginUser.getUnitId()); |
| | | Map<String, Long> result = new HashMap<>(); |
| | | return result; |
| | | FrontPageCountDTO frontPageCountDTO = mapper.countTaskList(terms); |
| | | long supervise = superviseService.countCaseSuperviseList(0,loginUser.getUnitId()); |
| | | frontPageCountDTO.setSupervise(supervise); |
| | | long countApplyReview = caseWindupApplyMapper.countApplyReview(loginUser.getUnitId()); |
| | | long countReturnReview = caseReturnMapper.countReturnReview(loginUser.getUnitId()); |
| | | long countAppearReview = caseAppearMapper.countAppearReview(loginUser.getUnitId()); |
| | | long countAssistReview = caseAssistApplyMapper.countAssistReview(loginUser.getUnitId()); |
| | | frontPageCountDTO.setWaitReview(countApplyReview+countReturnReview+countAppearReview+countAssistReview); |
| | | return frontPageCountDTO; |
| | | }catch (Exception e) { |
| | | log.error("[CaseTaskService.getCountList]调用失败,异常信息:" + e, e); |
| | | throw new ServiceException("CaseTaskService.getCountList", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 首页-查询待办任务-受分派 |
| | | * @param page 分页对象 |
| | | * @param terms 条件 |
| | | * @return Page |
| | | */ |
| | | public Page<FrontPageListDTO> pageMyTaskFp(PageRequest page, Map<String, Object> terms){ |
| | | try { |
| | | long total = mapper.countMyTaskFp(terms); |
| | | List<FrontPageListDTO> frontPageListDTOList = mapper.pageMyTaskFp(page, terms); |
| | | return new PageImpl<FrontPageListDTO>(frontPageListDTOList, page, total); |
| | | }catch (Exception e) { |
| | | log.error("[CaseTaskService.pageMyTaskFp]调用失败,异常信息:" + e, e); |
| | | throw new ServiceException("CaseTaskService.pageMyTaskFp", e); |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 首页-查询待办任务-受签收 |
| | | * @param page 分页对象 |
| | | * @param terms 条件 |
| | | * @return Page |
| | | */ |
| | | public Page<FrontPageListDTO> pageMyTaskQs(PageRequest page, Map<String, Object> terms){ |
| | | try { |
| | | long total = mapper.countMyTaskQs(terms); |
| | | List<FrontPageListDTO> frontPageListDTOList = mapper.pageMyTaskQs(page, terms); |
| | | return new PageImpl<FrontPageListDTO>(frontPageListDTOList, page, total); |
| | | }catch (Exception e) { |
| | | log.error("[CaseTaskService.pageMyTaskQs]调用失败,异常信息:" + e, e); |
| | | throw new ServiceException("CaseTaskService.pageMyTaskQs", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 首页-查询待办任务-受待理 |
| | | * @param page 分页对象 |
| | | * @param terms 条件 |
| | | * @return Page |
| | | */ |
| | | public Page<FrontPageListDTO> pageMyTaskSl(PageRequest page, Map<String, Object> terms){ |
| | | try { |
| | | long total = mapper.countMyTaskSl(terms); |
| | | List<FrontPageListDTO> frontPageListDTOList = mapper.pageMyTaskSl(page, terms); |
| | | return new PageImpl<FrontPageListDTO>(frontPageListDTOList, page, total); |
| | | }catch (Exception e) { |
| | | log.error("[CaseTaskService.pageMyTaskQs]调用失败,异常信息:" + e, e); |
| | | throw new ServiceException("CaseTaskService.pageMyTaskQs", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 首页-查询待办任务-办理中 |
| | | * @param page 分页对象 |
| | | * @param terms 条件 |
| | | * @return Page |
| | | */ |
| | | public Page<FrontPageListDTO> pageMyTaskBlz(PageRequest page, Map<String, Object> terms){ |
| | | try { |
| | | long total = mapper.countMyTaskProcessing(terms); |
| | | List<FrontPageListDTO> frontPageListDTOList = mapper.pageMyTaskProcessing(page, terms); |
| | | List<String> caseIdList = new ArrayList<>(); |
| | | Date now = DateUtils.getNowDate(); |
| | | for(FrontPageListDTO frontPageListDTO: frontPageListDTOList){ |
| | | long milliseconds1 = frontPageListDTO.getTurnaroundTime().getTime(); |
| | | long milliseconds2 = now.getTime(); |
| | | long diff = milliseconds2 - milliseconds1; |
| | | long daysBetween = diff / (24 * 60 * 60 * 1000); |
| | | frontPageListDTO.setProcessingDays(daysBetween); |
| | | caseIdList.add(frontPageListDTO.getCaseId()); |
| | | } |
| | | if(CollectionUtils.isNotEmpty(caseIdList)){ |
| | | QueryWrapper<CaseAssistApply> assistApplyQueryWrapper = new QueryWrapper<>(); |
| | | assistApplyQueryWrapper.in("case_id", caseIdList).eq("apply_status", AuditBaseConsts.AUDIT_STATUS_1) |
| | | .eq("audit_result", AuditBaseConstsEnum.AUDIT_RESULT_1.getIndex()); |
| | | List<CaseAssistApply> caseAssistApplyList = assistApplyService.list(assistApplyQueryWrapper); |
| | | for(CaseAssistApply caseAssistApply: caseAssistApplyList){ |
| | | for(FrontPageListDTO frontPageListDTO: frontPageListDTOList){ |
| | | if(frontPageListDTO.getCaseId().equals(caseAssistApply.getCaseId())){ |
| | | frontPageListDTO.setCooperatingUnit(caseAssistApply.getApplyAssistUnitName()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | return new PageImpl<FrontPageListDTO>(frontPageListDTOList, page, total); |
| | | }catch (Exception e) { |
| | | log.error("[CaseTaskService.pageMyTaskQs]调用失败,异常信息:" + e, e); |
| | | throw new ServiceException("CaseTaskService.pageMyTaskQs", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 首页-查询待办任务-办理任务 |
| | | * @param page 分页对象 |
| | | * @param terms 条件 |
| | | * @return Page |
| | | */ |
| | | public Page<FrontPageListDTO> pageMyTaskBl(PageRequest page, Map<String, Object> terms){ |
| | | try { |
| | | long total = caseWindupApplyMapper.countMySubmitApplyReview(terms); |
| | | List<FrontPageListDTO> frontPageListDTOList = caseWindupApplyMapper.pageMySubmitApplyReview(page, terms); |
| | | |
| | | List<String> caseIdList = new ArrayList<>(); |
| | | caseIdList = frontPageListDTOList.stream().map(FrontPageListDTO ::getCaseId).collect(Collectors.toList()); |
| | | if(CollectionUtils.isNotEmpty(caseIdList)){ |
| | | QueryWrapper<CaseAssistApply> assistApplyQueryWrapper = new QueryWrapper<>(); |
| | | assistApplyQueryWrapper.in("case_id", caseIdList).eq("apply_status", AuditBaseConsts.AUDIT_STATUS_1) |
| | | .eq("audit_result", AuditBaseConstsEnum.AUDIT_RESULT_1.getIndex()); |
| | | List<CaseAssistApply> caseAssistApplyList = assistApplyService.list(assistApplyQueryWrapper); |
| | | for(CaseAssistApply caseAssistApply: caseAssistApplyList){ |
| | | for(FrontPageListDTO frontPageListDTO: frontPageListDTOList){ |
| | | if(frontPageListDTO.getCaseId().equals(caseAssistApply.getCaseId())){ |
| | | frontPageListDTO.setCooperatingUnit(caseAssistApply.getApplyAssistUnitName()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return new PageImpl<FrontPageListDTO>(frontPageListDTOList, page, total); |
| | | }catch (Exception e) { |
| | | log.error("[CaseTaskService.pageMyTaskQs]调用失败,异常信息:" + e, e); |
| | | throw new ServiceException("CaseTaskService.pageMyTaskQs", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 首页-待审核分页查询 |
| | | * @param page 分页对象 |
| | | * @param terms 条件 |
| | | * @return Page |
| | | */ |
| | | public Page<FrontPageListDTO> pageMyTaskSh(PageRequest page, int type, Map<String, Object> terms){ |
| | | try { |
| | | long total = 0; |
| | | List<FrontPageListDTO> frontPageListDTOList = new ArrayList<>(); |
| | | if(1 == type){ |
| | | total = caseReturnMapper.countMyTaskReturnReview(terms); |
| | | frontPageListDTOList = caseReturnMapper.pageMyTaskReturnReview(page,terms); |
| | | }else if(2 == type){ |
| | | total = caseAppearMapper.countMyTaskAppearReview(terms); |
| | | frontPageListDTOList = caseAppearMapper.pageMyTaskAppearReview(page, terms); |
| | | }else if(3 == type){ |
| | | total = caseWindupApplyMapper.countMyTaskApplyReview(terms); |
| | | frontPageListDTOList = caseWindupApplyMapper.pageMyTaskApplyReview(page, terms); |
| | | }else if(4 == type){ |
| | | total = caseAssistApplyMapper.countMyTaskAssistReview(terms); |
| | | frontPageListDTOList = caseAssistApplyMapper.pageMyTaskAssistReview(page, terms); |
| | | } |
| | | return new PageImpl<FrontPageListDTO>(frontPageListDTOList, page, total); |
| | | }catch (Exception e) { |
| | | log.error("[CaseTaskService.pageMyTaskQs]调用失败,异常信息:" + e, e); |
| | | throw new ServiceException("CaseTaskService.pageMyTaskQs", e); |
| | | } |
| | | } |
| | | /** |
| | | * wechat端-查询流程进度 |
| | | * @param caseId 纠纷编号 |
| | | * @return |