forked from gzzfw/backEnd/gz-dyh

zhouxiantao
2024-09-23 0c40e0515f6661313e8ac4a14895860e8b4ebb69
dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/controller/web/CaseInfoUnfoldWebController.java
@@ -2,7 +2,6 @@
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.po.CaseInfoUnfold;
import cn.huge.module.cases.service.CaseInfoUnfoldService;
import com.google.common.collect.Maps;
@@ -23,8 +22,8 @@
 * @title: 纠纷信息扩展表接口api-web端
 * @description: 纠纷信息扩展表接口api-web端
 * @company: hugeinfo
 * @author: wangwh
 * @time: 2024-08-27 20:36:04
 * @author: liyj
 * @time: 2024-09-09 19:58:25
 * @version: 1.0.0
 */
@Slf4j
@@ -44,15 +43,15 @@
    */
    private Map<String, Object> getParameter(){
        Map<String, Object> terms = Maps.newHashMap();
        // 主键编号
        // 纠纷编号
        String id = request.getParameter("id");
        if (StringUtils.isNotBlank(id)){
            terms.put("id", id);
        }
        // 纠纷编号
        String caseId = request.getParameter("caseId");
        if (StringUtils.isNotBlank(caseId)){
            terms.put("caseId", caseId);
        // 受理时间
        String acceptTime = request.getParameter("acceptTime");
        if (StringUtils.isNotBlank(acceptTime)){
            terms.put("acceptTime", acceptTime);
        }
        // 实际调解组织编号
        String mediateUnitId = request.getParameter("mediateUnitId");
@@ -88,6 +87,16 @@
        String mediatorMobile = request.getParameter("mediatorMobile");
        if (StringUtils.isNotBlank(mediatorMobile)){
            terms.put("mediatorMobile", mediatorMobile);
        }
        // 配合组织,多个用,隔开
        String assistUnitId = request.getParameter("assistUnitId");
        if (StringUtils.isNotBlank(assistUnitId)){
            terms.put("assistUnitId", assistUnitId);
        }
        // 配合组织名称,多个用、隔开
        String assistUnitName = request.getParameter("assistUnitName");
        if (StringUtils.isNotBlank(assistUnitName)){
            terms.put("assistUnitName", assistUnitName);
        }
        // 调解开始时间
        String mediStartTime = request.getParameter("mediStartTime");
@@ -153,6 +162,11 @@
        String courtName = request.getParameter("courtName");
        if (StringUtils.isNotBlank(courtName)){
            terms.put("courtName", courtName);
        }
        // 办结时间
        String closeTime = request.getParameter("closeTime");
        if (StringUtils.isNotBlank(closeTime)){
            terms.put("closeTime", closeTime);
        }
        // 是否申请司法确认,0:未申请,1:已申请
        String judicApply = request.getParameter("judicApply");
@@ -354,18 +368,65 @@
    }
    /**
     * 查询办理结果
     * @url {ctx}/api/web/caseInfoUnfold/getTransactResult
     * @param caseId 事项ID
     * @return Object
     */
    @GetMapping("/getTransactResult")
    public Object getTransactResult(@RequestParam(value = "caseId") String caseId) {
        try {
            return ReturnSucUtils.getRepInfo(service.getTransactResult(caseId));
        } catch (Exception e) {
            return ReturnFailUtils.getRepInfo();
        }
    }
    /**
     * 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) {
    public Object choosePrincipal(@RequestParam(value = "caseId") String caseId, @RequestParam(value = "caseTaskId") String caseTaskId,
                                  @RequestParam(value = "userId") String userId) {
        try {
            service.choosePrincipal(caseId, userId);
            service.choosePrincipal(caseId, caseTaskId, userId);
            return ReturnSucUtils.getRepInfo();
        } catch (Exception e) {
            return ReturnFailUtils.getRepInfo(e.getMessage());
        }
    }
    /**
     * PC端-删除经办人
     * @url {ctx}/api/web/caseInfoUnfold/deletePrincipal?
     * @param caseId 纠纷编号
     * @return Object
     */
    @GetMapping("/deletePrincipal")
    public Object deletePrincipal(@RequestParam(value = "caseId") String caseId) {
        try {
            service.deletePrincipal(caseId);
            return ReturnSucUtils.getRepInfo();
        } catch (Exception e) {
            return ReturnFailUtils.getRepInfo(e.getMessage());
        }
    }
    /**
     * 联合处置申请-查询组织
     * @url {ctx}/api/web/caseInfoUnfold/superviceUnitChoose
     * @param caseId 事项ID
     * @return Object
     */
    @GetMapping("/superviceUnitChoose")
    public Object superviceUnitChoose(@RequestParam(value = "caseId") String caseId) {
        try {
            return ReturnSucUtils.getRepInfo(service.superviceUnitChoose(caseId));
        } catch (Exception e) {
            return ReturnFailUtils.getRepInfo();
        }
    }
}