From e4d5edc13431e3777d4463df4864c6116dc79744 Mon Sep 17 00:00:00 2001 From: zhouxiantao <1026371446@qq.com> Date: Thu, 17 Oct 2024 19:51:01 +0800 Subject: [PATCH] fix:流转办理已经修改不生效问题,纠纷态势区域权限限制,纠纷态势纠纷类型二级接口 --- dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/controller/web/CaseInfoWebController.java | 126 ++++++++++++++++++++++++++++++++++++++--- 1 files changed, 116 insertions(+), 10 deletions(-) diff --git a/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/controller/web/CaseInfoWebController.java b/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/controller/web/CaseInfoWebController.java index 4a29820..ae674e7 100644 --- a/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/controller/web/CaseInfoWebController.java +++ b/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/controller/web/CaseInfoWebController.java @@ -5,15 +5,14 @@ import cn.huge.base.common.utils.ReturnFailUtils; import cn.huge.base.common.utils.ReturnSucUtils; import cn.huge.base.config.CurrentUser; -import cn.huge.module.cases.domain.dto.CaseInfoWeExcelDTO; -import cn.huge.module.cases.domain.dto.CasePageDTO; -import cn.huge.module.cases.domain.dto.CasePersonWeDTO; -import cn.huge.module.cases.domain.dto.RegisterSaveDTO; +import cn.huge.module.cases.domain.bo.CasePersonCountBO; +import cn.huge.module.cases.domain.dto.*; import cn.huge.module.cases.domain.po.CaseInfo; import cn.huge.module.cases.service.CaseInfoService; import cn.huge.module.client.api.impl.CustClientImpl; import cn.huge.module.cust.dto.CtUserDTO; import com.alibaba.excel.EasyExcel; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.google.common.collect.Maps; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -82,10 +81,11 @@ terms.put("createStart", fileStart+ " 00:00:00"); terms.put("createEnd", fileEnd+ " 23:59:59"); } - String areaType = request.getParameter("areaType"); - if (StringUtils.isNotBlank(areaType)){ - terms.put("areaType", areaType); + String queRoad = request.getParameter("queRoad"); + if (StringUtils.isNotBlank(queRoad)){ + terms.put("areaType", "2"); } + // 实际调解组织编号 String mediateUnitId = request.getParameter("mediateUnitId"); if (StringUtils.isNotBlank(mediateUnitId)){ @@ -457,6 +457,11 @@ if (StringUtils.isNotBlank(infoProcessName)){ terms.put("infoProcessName", infoProcessName); } + // 小程序是否可见,0:不可见,1:可见 + String partyShow = request.getParameter("partyShow"); + if (StringUtils.isNotBlank(partyShow)){ + terms.put("partyShow", partyShow); + } // 意向调解组织编号 String wantUnitId = request.getParameter("wantUnitId"); if (StringUtils.isNotBlank(wantUnitId)){ @@ -720,19 +725,120 @@ } /** - * 综合查询 + * 解纷态势 * @url {ctx}/api/web/caseInfo/statistics * @return Object * @CurrentUser String userId */ @GetMapping("/statistics") - public Object statistics() { + public Object statistics(@CurrentUser String userId) { try { Map<String, Object> terms = getParameterAll(); - return ReturnSucUtils.getRepInfo( "处理成功", service.statistics(terms)); + return ReturnSucUtils.getRepInfo( "处理成功", service.statistics(terms,userId)); } catch (Exception e) { log.error("Controller接口[CaseInfoWebController.statistics]请求异常:"+e, e); return ReturnFailUtils.getRepInfo(); } } + + /** + * 解纷态势-纠纷类型 + * @url {ctx}/api/web/caseInfo/statisticsCaseType + * @return Object + * @CurrentUser String userId + */ + @GetMapping("/statisticsCaseType") + public Object statisticsCaseType(@CurrentUser String userId) { + try { + Map<String, Object> terms = getParameterAll(); + return ReturnSucUtils.getRepInfo( "处理成功", service.statisticsCaseType(terms,userId)); + } catch (Exception e) { + log.error("Controller接口[CaseInfoWebController.statistics]请求异常:"+e, e); + return ReturnFailUtils.getRepInfo(); + } + } + + /** + * 小程序是否可见修改修改 + * @url {ctx}/api/web/caseInfo/updateVisibleStatus + * @return Object + * @CurrentUser String userId + */ + @PostMapping("/updateVisibleStatus") + public Object updateVisibleStatus(@RequestBody CaseInfo caseInfo) { + try { + service.updateCaseInfo(caseInfo); + return ReturnSucUtils.getRepInfo(); + } catch (Exception e) { + log.error("Controller接口[CaseInfoWebController.statistics]请求异常:"+e, e); + return ReturnFailUtils.getRepInfo(); + } + } + + /** + * 个人查询 + * @url {ctx}/api/web/caseInfo/pagePerson + * @param page 页码 + * @param size 每页数量 + * @return Object + */ + @GetMapping("/pagePerson") + public Object pagePerson(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size, @RequestParam(value = "certiNo") String certiNo) { + try { + Map<String, Object> terms = getParameterAll(); + Sort sort = null; + String sortName = null; + String sortColmnStr = request.getParameter("sortColmn"); + String sortTypeStr = request.getParameter("sortType"); + int sortColmn = 1; + int sortType = 1; + if (StringUtils.isNotBlank(sortColmnStr)) { + sortColmn = Integer.valueOf(sortColmnStr); + } + if (StringUtils.isNotBlank(sortTypeStr)) { + sortType = Integer.valueOf(sortTypeStr); + } + switch (sortColmn) { + case 1: + sortName = "a.create_time"; + break; + case 2: + sortName = "b.close_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, "a.create_time"); + } + PageRequest pageRequest = PageRequest.of(page-1, size, sort); + Page<CasePageDTO> caseInfoPage = service.pagePerson(pageRequest, terms,certiNo); + return ReturnSucUtils.getRepInfo( "处理成功", caseInfoPage); + } catch (Exception e) { + log.error("Controller接口[CaseInfoWebController.pageQueryAll]请求异常:"+e, e); + return ReturnFailUtils.getRepInfo(); + } + } + + /** + * 个人查询统计 + * @url {ctx}/api/web/caseInfo/countPerson + * @return Object + */ + @GetMapping("/countPerson") + public Object countPerson(@RequestParam(value = "certiNo") String certiNo) { + try { + CasePersonCountBO casePersonCountBO = service.countPerson(certiNo); + return ReturnSucUtils.getRepInfo( "处理成功", casePersonCountBO); + } catch (Exception e) { + log.error("Controller接口[CaseInfoWebController.pageQueryAll]请求异常:"+e, e); + return ReturnFailUtils.getRepInfo(); + } + } } -- Gitblit v1.8.0