copy from dyh-service/dyh-mediate/src/main/java/cn/huge/module/assist/controller/web/CaseAssistApplyWebController.java
copy to dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/controller/web/CaseWindupApplyWebController.java
File was copied from dyh-service/dyh-mediate/src/main/java/cn/huge/module/assist/controller/web/CaseAssistApplyWebController.java |
| | |
| | | package cn.huge.module.assist.controller.web; |
| | | package cn.huge.module.cases.controller.web; |
| | | |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.base.config.CurrentUser; |
| | | import cn.huge.module.assist.domain.po.CaseAssistApply; |
| | | import cn.huge.module.assist.service.CaseAssistApplyService; |
| | | import cn.huge.module.cases.domain.po.CaseWindupApply; |
| | | import cn.huge.module.cases.service.CaseWindupApplyService; |
| | | import com.google.common.collect.Maps; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import java.util.stream.Stream; |
| | | |
| | | /** |
| | | * @title: 联合处置申请信息表接口api-web端 |
| | | * @description: 联合处置申请信息表接口api-web端 |
| | | * @title: 纠纷结案申请信息表接口api-web端 |
| | | * @description: 纠纷结案申请信息表接口api-web端 |
| | | * @company: hugeinfo |
| | | * @author: wangwh |
| | | * @time: 2024-09-05 17:25:04 |
| | | * @author: liyj |
| | | * @time: 2024-09-06 23:57:02 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/web/caseAssistApply") |
| | | public class CaseAssistApplyWebController { |
| | | @RequestMapping("/api/web/caseWindupApply") |
| | | public class CaseWindupApplyWebController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private CaseAssistApplyService service; |
| | | private CaseWindupApplyService service; |
| | | |
| | | /** |
| | | * 获取请求URL参数 |
| | |
| | | if (StringUtils.isNotBlank(caseId)){ |
| | | terms.put("caseId", caseId); |
| | | } |
| | | // 申请组织编号 |
| | | // 结案申请组织编号 |
| | | String applyUnitId = request.getParameter("applyUnitId"); |
| | | if (StringUtils.isNotBlank(applyUnitId)){ |
| | | terms.put("applyUnitId", applyUnitId); |
| | | } |
| | | // 申请组织名称 |
| | | // 结案申请组织名称 |
| | | String applyUnitName = request.getParameter("applyUnitName"); |
| | | if (StringUtils.isNotBlank(applyUnitName)){ |
| | | terms.put("applyUnitName", applyUnitName); |
| | | } |
| | | // 申请人编号 |
| | | // 结案申请人编号 |
| | | String applyUserId = request.getParameter("applyUserId"); |
| | | if (StringUtils.isNotBlank(applyUserId)){ |
| | | terms.put("applyUserId", applyUserId); |
| | | } |
| | | // 申请人名称 |
| | | // 结案申请人名称 |
| | | String applyUserName = request.getParameter("applyUserName"); |
| | | if (StringUtils.isNotBlank(applyUserName)){ |
| | | terms.put("applyUserName", applyUserName); |
| | | } |
| | | // 申请配合组织,多个用,隔开 |
| | | String applyAssistUnitId = request.getParameter("applyAssistUnitId"); |
| | | if (StringUtils.isNotBlank(applyAssistUnitId)){ |
| | | terms.put("applyAssistUnitId", applyAssistUnitId); |
| | | } |
| | | // 申请配合组织名称,多个用、隔开 |
| | | String applyAssistUnitName = request.getParameter("applyAssistUnitName"); |
| | | if (StringUtils.isNotBlank(applyAssistUnitName)){ |
| | | terms.put("applyAssistUnitName", applyAssistUnitName); |
| | | } |
| | | // 申请理由 |
| | | String applyContent = request.getParameter("applyContent"); |
| | | if (StringUtils.isNotBlank(applyContent)){ |
| | | terms.put("applyContent", applyContent); |
| | | } |
| | | // 申请时间 |
| | | // 结案申请时间 |
| | | String applyTime = request.getParameter("applyTime"); |
| | | if (StringUtils.isNotBlank(applyTime)){ |
| | | terms.put("applyTime", applyTime); |
| | | } |
| | | // 申请状态,0:待审核,1:已审核 |
| | | // 结案申请状态,0:待审核,1:已审核 |
| | | String applyStatus = request.getParameter("applyStatus"); |
| | | if (StringUtils.isNotBlank(applyStatus)){ |
| | | terms.put("applyStatus", applyStatus); |
| | | } |
| | | // 审核组织编号 |
| | | // 调解结果 |
| | | String mediResult = request.getParameter("mediResult"); |
| | | if (StringUtils.isNotBlank(mediResult)){ |
| | | terms.put("mediResult", mediResult); |
| | | } |
| | | // 调解结果名称 |
| | | String mediResultName = request.getParameter("mediResultName"); |
| | | if (StringUtils.isNotBlank(mediResultName)){ |
| | | terms.put("mediResultName", mediResultName); |
| | | } |
| | | // 达成协议类型 |
| | | String agreeType = request.getParameter("agreeType"); |
| | | if (StringUtils.isNotBlank(agreeType)){ |
| | | terms.put("agreeType", agreeType); |
| | | } |
| | | // 达成协议类型名称 |
| | | String agreeTypeName = request.getParameter("agreeTypeName"); |
| | | if (StringUtils.isNotBlank(agreeTypeName)){ |
| | | terms.put("agreeTypeName", agreeTypeName); |
| | | } |
| | | // 协议要点/已达成协议 |
| | | String agreeContent = request.getParameter("agreeContent"); |
| | | if (StringUtils.isNotBlank(agreeContent)){ |
| | | terms.put("agreeContent", agreeContent); |
| | | } |
| | | // 无法化解理由 |
| | | String failReason = request.getParameter("failReason"); |
| | | if (StringUtils.isNotBlank(failReason)){ |
| | | terms.put("failReason", failReason); |
| | | } |
| | | // 结案意见 |
| | | String windupContent = request.getParameter("windupContent"); |
| | | if (StringUtils.isNotBlank(windupContent)){ |
| | | terms.put("windupContent", windupContent); |
| | | } |
| | | // 结案审核纠纷任务编号 |
| | | String caseTaskId = request.getParameter("caseTaskId"); |
| | | if (StringUtils.isNotBlank(caseTaskId)){ |
| | | terms.put("caseTaskId", caseTaskId); |
| | | } |
| | | // 结案审核组织编号 |
| | | String auditUnitId = request.getParameter("auditUnitId"); |
| | | if (StringUtils.isNotBlank(auditUnitId)){ |
| | | terms.put("auditUnitId", auditUnitId); |
| | | } |
| | | // 审核组织名称 |
| | | // 结案审核组织名称 |
| | | String auditUnitName = request.getParameter("auditUnitName"); |
| | | if (StringUtils.isNotBlank(auditUnitName)){ |
| | | terms.put("auditUnitName", auditUnitName); |
| | | } |
| | | // 审核人编号 |
| | | // 结案审核人编号 |
| | | String auditUserId = request.getParameter("auditUserId"); |
| | | if (StringUtils.isNotBlank(auditUserId)){ |
| | | terms.put("auditUserId", auditUserId); |
| | | } |
| | | // 审核人名称 |
| | | // 结案审核人名称 |
| | | String auditUserName = request.getParameter("auditUserName"); |
| | | if (StringUtils.isNotBlank(auditUserName)){ |
| | | terms.put("auditUserName", auditUserName); |
| | | } |
| | | // 审核时间 |
| | | // 结案审核时间 |
| | | String auditTime = request.getParameter("auditTime"); |
| | | if (StringUtils.isNotBlank(auditTime)){ |
| | | terms.put("auditTime", auditTime); |
| | | } |
| | | // 审核结果 |
| | | // 结案审核结果 |
| | | String auditResult = request.getParameter("auditResult"); |
| | | if (StringUtils.isNotBlank(auditResult)){ |
| | | terms.put("auditResult", auditResult); |
| | | } |
| | | // 审核结果名称 |
| | | // 结案审核结果名称 |
| | | String auditResultName = request.getParameter("auditResultName"); |
| | | if (StringUtils.isNotBlank(auditResultName)){ |
| | | terms.put("auditResultName", auditResultName); |
| | | } |
| | | // 审核理由 |
| | | // 结案审核理由 |
| | | String audit_content = request.getParameter("audit_content"); |
| | | if (StringUtils.isNotBlank(audit_content)){ |
| | | terms.put("audit_content", audit_content); |
| | |
| | | |
| | | /** |
| | | * 条件查询多个 |
| | | * @url {ctx}/api/web/caseAssistApply/listQuery |
| | | * @url {ctx}/api/web/caseWindupApply/listQuery |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/listQuery") |
| | |
| | | |
| | | /** |
| | | * 条件分页查询 |
| | | * @url {ctx}/api/web/caseAssistApply/pageQuery |
| | | * @url {ctx}/api/web/caseWindupApply/pageQuery |
| | | * @param page 页码 |
| | | * @param size 每页数量 |
| | | * @return Object |
| | |
| | | Map<String, Object> terms = getParameter(); |
| | | Sort sort = Sort.by(Sort.Direction.DESC, "create_time"); |
| | | PageRequest pageRequest = PageRequest.of(page-1, size, sort); |
| | | Page<CaseAssistApply> caseAssistApplyPage = service.pageQuery(pageRequest, terms); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", caseAssistApplyPage); |
| | | Page<CaseWindupApply> caseWindupApplyPage = service.pageQuery(pageRequest, terms); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", caseWindupApplyPage); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/web/caseAssistApply/getById |
| | | * @url {ctx}/api/web/caseWindupApply/getById |
| | | * @param id 主键编号 |
| | | * @return Object |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 根据主键单个 |
| | | * @url {ctx}/api/web/caseAssistApply/deleteById |
| | | * @url {ctx}/api/web/caseWindupApply/deleteById |
| | | * @param id 主键编号 |
| | | * @return Object |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @url {ctx}/api/web/caseAssistApply/saveCaseAssistApply |
| | | * @param caseAssistApply 实体对象 |
| | | * @url {ctx}/api/web/caseWindupApply/saveCaseWindupApply |
| | | * @param caseWindupApply 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveCaseAssistApply") |
| | | public Object saveCaseAssistApply(@RequestBody CaseAssistApply caseAssistApply) { |
| | | @PostMapping("/saveCaseWindupApply") |
| | | public Object saveCaseWindupApply(@RequestBody CaseWindupApply caseWindupApply) { |
| | | try { |
| | | service.saveCaseAssistApply(caseAssistApply); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 添加联合处置申请 |
| | | * @url {ctx}/api/web/caseAssistApply/addCaseAssistApply |
| | | * @param caseAssistApply 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/addCaseAssistApply") |
| | | public Object addCaseAssistApply(@CurrentUser String userId, @RequestBody CaseAssistApply caseAssistApply) { |
| | | try { |
| | | service.addCaseAssistApply(caseAssistApply, userId); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 审核联合审核 |
| | | * @url {ctx}/api/web/caseAssistApply/addCaseAssistApply |
| | | * @param caseAssistApply 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/reviewCaseAssistApply") |
| | | public Object reviewCaseAssistApply(@CurrentUser String userId, @RequestBody CaseAssistApply caseAssistApply) { |
| | | try { |
| | | service.reviewCaseAssistApply(caseAssistApply, userId); |
| | | service.saveCaseWindupApply(caseWindupApply); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |