28 files added
2 files renamed
4 files modified
| New file |
| | |
| | | package cn.huge.module.disp.constant; |
| | | |
| | | /** |
| | | * @title: 附件相关常量类 |
| | | * @description: 附件相关常量类 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2021-11-05 16:51:48 |
| | | * @version: 1.0.0 |
| | | */ |
| | | public class DispBaseConsts { |
| | | |
| | | /** |
| | | * 调度方式,1:系统调度,2:人工调度 |
| | | */ |
| | | public static final int DISP_WAY_1 = 1; |
| | | public static final int DISP_WAY_2 = 2; |
| | | |
| | | /** |
| | | * 调度状态,0:待调度,1:已调度,2:调度失败 |
| | | */ |
| | | public static final int DISP_STATUS_0 = 0; |
| | | public static final int DISP_STATUS_1 = 1; |
| | | public static final int DISP_STATUS_2 = 2; |
| | | |
| | | } |
| | | /** |
| | | * -------------------_ooOoo_------------------- |
| | | * ------------------o8888888o------------------ |
| | | * ------------------88" . "88------------------ |
| | | * ------------------(| -_- |)------------------ |
| | | * ------------------O\ = /O------------------ |
| | | * ---------------____/`---'\____--------------- |
| | | * -------------.' \\| |// `.------------- |
| | | * ------------/ \\||| : |||// \------------ |
| | | * -----------/ _||||| -:- |||||- \----------- |
| | | * -----------| | \\\ - /// | |----------- |
| | | * -----------| \_| ''\---/'' | |----------- |
| | | * -----------\ .-\__ `-` ___/-. /----------- |
| | | * ---------___`. .' /--.--\ `. . __---------- |
| | | * ------."" '< `.___\_<|>_/___.' >'"".------- |
| | | * -----| | : `- \`.;`\ _ /`;.`/ - ` : | |----- |
| | | * -----\ \ `-. \_ __\ /__ _/ .-` / /----- |
| | | * ======`-.____`-.___\_____/___.-`____.-'====== |
| | | * -------------------`=---=' |
| | | * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| | | * ---------佛祖保佑---hugeinfo---永无BUG---------- |
| | | */ |
| New file |
| | |
| | | package cn.huge.module.disp.constant; |
| | | |
| | | /** |
| | | * @title: 调度相关常量枚举类 |
| | | * @description: 调度相关常量枚举类 |
| | | * @company: hugeinfo |
| | | * @author: xuxj |
| | | * @time: 2022-03-25 16:51:48 |
| | | * @version: 1.0.0 |
| | | */ |
| | | public enum DispBaseConstsEnum { |
| | | |
| | | /** |
| | | * 调度类型:22_00012-1:归口分流,22_00012-2:加入抢单池 |
| | | */ |
| | | DISP_TYPE_1("22_00012-1", "归口分流"), |
| | | DISP_TYPE_2("22_00012-2", "加入抢单池"), |
| | | |
| | | /** |
| | | * 调度目标类型,22_00038-1:调度给调解组织,22_00038-2:调度给调解员 |
| | | */ |
| | | TARGET_TYPE_1("22_00038-1", "调度给调解组织"), |
| | | TARGET_TYPE_2("22_00038-2", "调度给调解员"); |
| | | |
| | | |
| | | /** |
| | | * 代码编号 |
| | | */ |
| | | private String index; |
| | | |
| | | /** |
| | | * 描述 |
| | | */ |
| | | private String des; |
| | | |
| | | public String getIndex() { |
| | | return index; |
| | | } |
| | | |
| | | public void setIndex(String index) { |
| | | this.index = index; |
| | | } |
| | | |
| | | public String getDes() { |
| | | return des; |
| | | } |
| | | |
| | | public void setDes(String desc) { |
| | | this.des = desc; |
| | | } |
| | | |
| | | /** |
| | | * 构造方法 |
| | | * @param index |
| | | * @param des |
| | | */ |
| | | DispBaseConstsEnum(String index, String des) { |
| | | this.index = index; |
| | | this.des = des; |
| | | } |
| | | |
| | | /** |
| | | * 静态方法 |
| | | * @param index |
| | | * @return |
| | | */ |
| | | public static String getDes(String index) { |
| | | for (DispBaseConstsEnum constantEnum : DispBaseConstsEnum.values()) { |
| | | if (constantEnum.getIndex().equals(index)) { |
| | | return constantEnum.des; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.huge.module.disp.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @title: 纠纷调度单表信息交互对象 |
| | | * @description: 纠纷调度单表信息交互对象 |
| | | * @company:hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-09-03 10:20:49 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Data |
| | | public class CaseDispBaseDTO { |
| | | |
| | | /** |
| | | * 纠纷调度单编号 |
| | | */ |
| | | private String id; |
| | | |
| | | /** |
| | | * 纠纷编号 |
| | | */ |
| | | private String caseId; |
| | | |
| | | /** |
| | | * 调度方式,1:系统调度,2:人工调度 |
| | | */ |
| | | private Integer dispWay; |
| | | |
| | | /** |
| | | * 调度类型 |
| | | */ |
| | | private String dispType; |
| | | |
| | | /** |
| | | * 调度类型名称 |
| | | */ |
| | | private String dispTypeName; |
| | | |
| | | /** |
| | | * 调度意见 |
| | | */ |
| | | private String dispContent; |
| | | |
| | | /** |
| | | * 调度处理组织编号 |
| | | */ |
| | | private String handleUnitId; |
| | | |
| | | /** |
| | | * 调度处理组织名称 |
| | | */ |
| | | private String handleUnitName; |
| | | |
| | | /** |
| | | * 调度处理人编号 |
| | | */ |
| | | private String handleUserId; |
| | | |
| | | /** |
| | | * 调度处理人名称 |
| | | */ |
| | | private String handleUserName; |
| | | |
| | | /** |
| | | * 调度目标类型 |
| | | */ |
| | | private String targetType; |
| | | |
| | | /** |
| | | * 调度目标类型名称 |
| | | */ |
| | | private String targetTypeName; |
| | | |
| | | /** |
| | | * 调度目标编号 |
| | | */ |
| | | private String targetId; |
| | | |
| | | /** |
| | | * 调度目标名称 |
| | | */ |
| | | private String targetName; |
| | | |
| | | /** |
| | | * 调度时间 |
| | | */ |
| | | private Date dispTime; |
| | | |
| | | /** |
| | | * 调度状态,0:待调度,1:已调度,2:调度失败 |
| | | */ |
| | | private Integer dispStatus; |
| | | |
| | | /** |
| | | * 顾客编号 |
| | | */ |
| | | private String custId; |
| | | |
| | | /** |
| | | * 删除状态,0:未删除,1:已删除 |
| | | */ |
| | | @TableLogic |
| | | private Integer deleteStatus; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | private Date updateTime; |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.disp.dto; |
| | | |
| | | |
| | | |
| | | import cn.huge.module.sys.dto.FileInfoBaseDTO; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: 调度纠纷事件处理交互对象 |
| | | * @description: 调度案件处理交互对象 |
| | | * @company:hugeinfo |
| | | * @author: liyj |
| | | * @time: 2022-03-22 11:41:14 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Data |
| | | public class DispCaseBaseDTO { |
| | | |
| | | /** |
| | | * 纠纷编号 |
| | | */ |
| | | private String caseId; |
| | | |
| | | /** |
| | | * 调解类型 |
| | | */ |
| | | private String mediType; |
| | | |
| | | /** |
| | | * 调解类型名称 |
| | | */ |
| | | private String mediTypeName; |
| | | |
| | | /** |
| | | * 纠纷一级类型 |
| | | */ |
| | | private String caseTypeFirst; |
| | | |
| | | /** |
| | | * 纠纷一级类型名称 |
| | | */ |
| | | private String caseTypeFirstName; |
| | | |
| | | /** |
| | | * 纠纷类型 |
| | | */ |
| | | private String caseType; |
| | | |
| | | /** |
| | | * 纠纷类型名称 |
| | | */ |
| | | private String caseTypeName; |
| | | |
| | | /** |
| | | * 问题属地省 |
| | | */ |
| | | private String queProv; |
| | | |
| | | /** |
| | | * 问题属地省名称 |
| | | */ |
| | | private String queProvName; |
| | | |
| | | /** |
| | | * 问题属地市 |
| | | */ |
| | | private String queCity; |
| | | |
| | | /** |
| | | * 问题属地市名称 |
| | | */ |
| | | private String queCityName; |
| | | |
| | | /** |
| | | * 问题属地区 |
| | | */ |
| | | private String queArea; |
| | | |
| | | /** |
| | | * 问题属地区名称 |
| | | */ |
| | | private String queAreaName; |
| | | |
| | | /** |
| | | * 问题属地街道 |
| | | */ |
| | | private String queRoad; |
| | | |
| | | /** |
| | | * 问题属地街道名称 |
| | | */ |
| | | private String queRoadName; |
| | | |
| | | /** |
| | | * 问题属地社区 |
| | | */ |
| | | private String queVillage; |
| | | |
| | | /** |
| | | * 问题属地社区名称 |
| | | */ |
| | | private String queVillageName; |
| | | |
| | | /** |
| | | * 意向调解组织编号 |
| | | */ |
| | | private String wantUnitId; |
| | | |
| | | /** |
| | | * 意向调解组织名称 |
| | | */ |
| | | private String wantUnitName; |
| | | |
| | | /** |
| | | * 意向调解员编号 |
| | | */ |
| | | private String wantUserId; |
| | | |
| | | /** |
| | | * 意向调解员名称 |
| | | */ |
| | | private String wantUserName; |
| | | |
| | | /** |
| | | * 客户编号 |
| | | */ |
| | | private String custId; |
| | | |
| | | } |
| | |
| | | */ |
| | | void updateTerms(@Param("entity") CtUnit entity); |
| | | |
| | | /** |
| | | * 更新调度规则指标目标组织名称 |
| | | * @param unitName |
| | | * @param unitId |
| | | */ |
| | | void updateDispNormCauseTargetUnitName(@Param("unitName") String unitName, @Param("unitName") String unitId); |
| | | |
| | | } |
| | |
| | | WHERE |
| | | id = #{entity.id} |
| | | </update> |
| | | |
| | | <!-- 更新调度规则指标目标组织名称 --> |
| | | <update id="updateDispNormCauseTargetUnitName"> |
| | | update dyh_disp_norm_cause |
| | | set target_unit_name = #{unitName} |
| | | where target_unit_id = #{unitId} |
| | | </update> |
| | | </mapper> |
| | |
| | | if (IdUtils.checkNewId(ctUnit.getId())){ |
| | | ctUnit.setId(utilsClient.getNewTimeId()); |
| | | ctUnit.setCreateTime(nowDate); |
| | | }else { |
| | | // 1、更新单位信息时,更新调度规则指标目标组织名称 |
| | | mapper.updateDispNormCauseTargetUnitName(ctUnit.getUnitName(), ctUnit.getId()); |
| | | } |
| | | ctUnit.setUpdateTime(nowDate); |
| | | this.saveOrUpdate(ctUnit); |
| New file |
| | |
| | | package cn.huge.module.casedisp.constant; |
| | | |
| | | /** |
| | | * @title: 调度相关常量枚举类 |
| | | * @description: 调度相关常量枚举类 |
| | | * @company: hugeinfo |
| | | * @author: xuxj |
| | | * @time: 2022-03-25 16:51:48 |
| | | * @version: 1.0.0 |
| | | */ |
| | | public enum DispRuleConstsEnum { |
| | | |
| | | /** |
| | | * 调度指标类型,24_00010-1:问题属地,24_00010-2:纠纷类型 |
| | | */ |
| | | DISP_NORM_TYPE_1("24_00010-1", "问题属地"), |
| | | DISP_NORM_TYPE_2("24_00010-2", "纠纷类型"); |
| | | |
| | | |
| | | /** |
| | | * 代码编号 |
| | | */ |
| | | private String index; |
| | | |
| | | /** |
| | | * 描述 |
| | | */ |
| | | private String des; |
| | | |
| | | public String getIndex() { |
| | | return index; |
| | | } |
| | | |
| | | public void setIndex(String index) { |
| | | this.index = index; |
| | | } |
| | | |
| | | public String getDes() { |
| | | return des; |
| | | } |
| | | |
| | | public void setDes(String desc) { |
| | | this.des = desc; |
| | | } |
| | | |
| | | /** |
| | | * 构造方法 |
| | | * @param index |
| | | * @param des |
| | | */ |
| | | DispRuleConstsEnum(String index, String des) { |
| | | this.index = index; |
| | | this.des = des; |
| | | } |
| | | |
| | | /** |
| | | * 静态方法 |
| | | * @param index |
| | | * @return |
| | | */ |
| | | public static String getDes(String index) { |
| | | for (DispRuleConstsEnum constantEnum : DispRuleConstsEnum.values()) { |
| | | if (constantEnum.getIndex().equals(index)) { |
| | | return constantEnum.des; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.huge.module.casedisp.controller.client; |
| | | |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.module.casedisp.service.CaseDispService; |
| | | import cn.huge.module.casedisp.service.SysDispService; |
| | | import cn.huge.module.disp.dto.DispCaseBaseDTO; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | /** |
| | | * @title: 纠纷调度单表接口api-微服务调用 |
| | | * @description: 纠纷调度单表接口api-微服务调用 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-09-03 10:20:49 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/client/caseDisp") |
| | | public class CaseDispCilentController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private CaseDispService service; |
| | | @Autowired |
| | | private SysDispService sysDispService; |
| | | |
| | | /** |
| | | * 系统调度 |
| | | * @url {ctx}/api/client/caseDisp/sysDisp |
| | | * @param dispCaseBaseDTO 纠纷事件信息 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/sysDisp") |
| | | public Object sysDisp(@RequestBody DispCaseBaseDTO dispCaseBaseDTO) { |
| | | try { |
| | | return ReturnSucUtils.getRepInfo(sysDispService.sysDisp(dispCaseBaseDTO)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.casedisp.controller.web; |
| | | |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.module.casedisp.domain.po.CaseDisp; |
| | | import cn.huge.module.casedisp.service.CaseDispService; |
| | | import com.google.common.collect.Maps; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Page; |
| | | import org.springframework.data.domain.PageRequest; |
| | | import org.springframework.data.domain.Sort; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @title: 纠纷调度单表接口api-web端 |
| | | * @description: 纠纷调度单表接口api-web端 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-09-03 10:20:49 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/web/caseDisp") |
| | | public class CaseDispWebController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private CaseDispService service; |
| | | |
| | | /** |
| | | * 获取请求URL参数 |
| | | * @return Map<String, Object> |
| | | */ |
| | | 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); |
| | | } |
| | | // 调度方式,1:系统调度,2:人工调度 |
| | | String dispWay = request.getParameter("dispWay"); |
| | | if (StringUtils.isNotBlank(dispWay)){ |
| | | terms.put("dispWay", dispWay); |
| | | } |
| | | // 调度类型 |
| | | String dispType = request.getParameter("dispType"); |
| | | if (StringUtils.isNotBlank(dispType)){ |
| | | terms.put("dispType", dispType); |
| | | } |
| | | // 调度类型名称 |
| | | String dispTypeName = request.getParameter("dispTypeName"); |
| | | if (StringUtils.isNotBlank(dispTypeName)){ |
| | | terms.put("dispTypeName", dispTypeName); |
| | | } |
| | | // 调度意见 |
| | | String dispContent = request.getParameter("dispContent"); |
| | | if (StringUtils.isNotBlank(dispContent)){ |
| | | terms.put("dispContent", dispContent); |
| | | } |
| | | // 调度处理组织编号 |
| | | String handleUnitId = request.getParameter("handleUnitId"); |
| | | if (StringUtils.isNotBlank(handleUnitId)){ |
| | | terms.put("handleUnitId", handleUnitId); |
| | | } |
| | | // 调度处理组织名称 |
| | | String handleUnitName = request.getParameter("handleUnitName"); |
| | | if (StringUtils.isNotBlank(handleUnitName)){ |
| | | terms.put("handleUnitName", handleUnitName); |
| | | } |
| | | // 调度处理人编号 |
| | | String handleUserId = request.getParameter("handleUserId"); |
| | | if (StringUtils.isNotBlank(handleUserId)){ |
| | | terms.put("handleUserId", handleUserId); |
| | | } |
| | | // 调度处理人名称 |
| | | String handleUserName = request.getParameter("handleUserName"); |
| | | if (StringUtils.isNotBlank(handleUserName)){ |
| | | terms.put("handleUserName", handleUserName); |
| | | } |
| | | // 调度目标类型 |
| | | String targetType = request.getParameter("targetType"); |
| | | if (StringUtils.isNotBlank(targetType)){ |
| | | terms.put("targetType", targetType); |
| | | } |
| | | // 调度目标类型名称 |
| | | String targetTypeName = request.getParameter("targetTypeName"); |
| | | if (StringUtils.isNotBlank(targetTypeName)){ |
| | | terms.put("targetTypeName", targetTypeName); |
| | | } |
| | | // 调度目标编号 |
| | | String targetId = request.getParameter("targetId"); |
| | | if (StringUtils.isNotBlank(targetId)){ |
| | | terms.put("targetId", targetId); |
| | | } |
| | | // 调度目标名称 |
| | | String targetName = request.getParameter("targetName"); |
| | | if (StringUtils.isNotBlank(targetName)){ |
| | | terms.put("targetName", targetName); |
| | | } |
| | | // 调度时间 |
| | | String dispTime = request.getParameter("dispTime"); |
| | | if (StringUtils.isNotBlank(dispTime)){ |
| | | terms.put("dispTime", dispTime); |
| | | } |
| | | // 调度状态,0:待调度,1:已调度,2:调度失败 |
| | | String dispStatus = request.getParameter("dispStatus"); |
| | | if (StringUtils.isNotBlank(dispStatus)){ |
| | | terms.put("dispStatus", dispStatus); |
| | | } |
| | | // 顾客编号 |
| | | String custId = request.getParameter("custId"); |
| | | if (StringUtils.isNotBlank(custId)){ |
| | | terms.put("custId", custId); |
| | | } |
| | | // 删除状态,0:未删除,1:已删除 |
| | | String deleteStatus = request.getParameter("deleteStatus"); |
| | | if (StringUtils.isNotBlank(deleteStatus)){ |
| | | terms.put("deleteStatus", deleteStatus); |
| | | } |
| | | // 创建时间区间 |
| | | String createStart = request.getParameter("createStart"); |
| | | String createEnd = request.getParameter("createEnd"); |
| | | if(StringUtils.isNotBlank(createStart) && StringUtils.isNotBlank(createEnd)) { |
| | | terms.put("createStart", createStart); |
| | | terms.put("createEnd", createEnd); |
| | | } |
| | | // 更新时间区间 |
| | | String updateStart = request.getParameter("updateStart"); |
| | | String updateEnd = request.getParameter("updateEnd"); |
| | | if(StringUtils.isNotBlank(updateStart) && StringUtils.isNotBlank(updateEnd)) { |
| | | terms.put("updateStart", updateStart); |
| | | terms.put("updateEnd", updateEnd); |
| | | } |
| | | return terms; |
| | | } |
| | | |
| | | /** |
| | | * 条件查询多个 |
| | | * @url {ctx}/api/web/caseDisp/listQuery |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/listQuery") |
| | | public Object listQuery() { |
| | | try { |
| | | Map<String, Object> terms = getParameter(); |
| | | return ReturnSucUtils.getRepInfo(service.listTerms(terms)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件分页查询 |
| | | * @url {ctx}/api/web/caseDisp/pageQuery |
| | | * @param page 页码 |
| | | * @param size 每页数量 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/pageQuery") |
| | | public Object pageQuery(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size) { |
| | | try { |
| | | Map<String, Object> terms = getParameter(); |
| | | Sort sort = Sort.by(Sort.Direction.DESC, "create_time"); |
| | | PageRequest pageRequest = PageRequest.of(page-1, size, sort); |
| | | Page<CaseDisp> caseDispPage = service.pageQuery(pageRequest, terms); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", caseDispPage); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/web/caseDisp/getById |
| | | * @param id 主键编号 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/getById") |
| | | public Object getById(@RequestParam(value = "id") String id) { |
| | | try { |
| | | return ReturnSucUtils.getRepInfo(service.getById(id)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据主键单个 |
| | | * @url {ctx}/api/web/caseDisp/deleteById |
| | | * @param id 主键编号 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/deleteById") |
| | | public Object deleteById(@RequestParam(value = "id") String id) { |
| | | try { |
| | | service.removeById(id); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @url {ctx}/api/web/caseDisp/saveCaseDisp |
| | | * @param caseDisp 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveCaseDisp") |
| | | public Object saveCaseDisp(@RequestBody CaseDisp caseDisp) { |
| | | try { |
| | | service.saveCaseDisp(caseDisp); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.casedisp.controller.web; |
| | | |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.module.casedisp.domain.po.DispNormCause; |
| | | import cn.huge.module.casedisp.service.DispNormCauseService; |
| | | import com.google.common.collect.Maps; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Page; |
| | | import org.springframework.data.domain.PageRequest; |
| | | import org.springframework.data.domain.Sort; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.Stream; |
| | | |
| | | /** |
| | | * @title: 调度指标表(按纠纷类型调度)接口api-web端 |
| | | * @description: 调度指标表(按纠纷类型调度)接口api-web端 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-09-03 21:27:05 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/web/dispNormCause") |
| | | public class DispNormCauseWebController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private DispNormCauseService service; |
| | | |
| | | /** |
| | | * 获取请求URL参数 |
| | | * @return Map<String, Object> |
| | | */ |
| | | 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 caseType = request.getParameter("caseType"); |
| | | if (StringUtils.isNotBlank(caseType)){ |
| | | terms.put("caseType", caseType); |
| | | } |
| | | // 纠纷类型名称 |
| | | String caseTypeName = request.getParameter("caseTypeName"); |
| | | if (StringUtils.isNotBlank(caseTypeName)){ |
| | | terms.put("caseTypeName", caseTypeName); |
| | | } |
| | | // 目标组织级别,1:市级,2:区级,3:镇街级,4:村居级 |
| | | String targetUnitLevel = request.getParameter("targetUnitLevel"); |
| | | if (StringUtils.isNotBlank(targetUnitLevel)){ |
| | | terms.put("targetUnitLevel", targetUnitLevel); |
| | | } |
| | | // 目标组织编号 |
| | | String targetUnitId = request.getParameter("targetUnitId"); |
| | | if (StringUtils.isNotBlank(targetUnitId)){ |
| | | terms.put("targetUnitId", targetUnitId); |
| | | } |
| | | // 目标组织名称 |
| | | String targetUnitName = request.getParameter("targetUnitName"); |
| | | if (StringUtils.isNotBlank(targetUnitName)){ |
| | | terms.put("targetUnitName", targetUnitName); |
| | | } |
| | | // 优先级 |
| | | String priority = request.getParameter("priority"); |
| | | if (StringUtils.isNotBlank(priority)){ |
| | | terms.put("priority", priority); |
| | | } |
| | | // 操作人编号 |
| | | String userId = request.getParameter("userId"); |
| | | if (StringUtils.isNotBlank(userId)){ |
| | | terms.put("userId", userId); |
| | | } |
| | | // 顾客编号 |
| | | String custId = request.getParameter("custId"); |
| | | if (StringUtils.isNotBlank(custId)){ |
| | | terms.put("custId", custId); |
| | | } |
| | | // 创建时间区间 |
| | | String createStart = request.getParameter("createStart"); |
| | | String createEnd = request.getParameter("createEnd"); |
| | | if(StringUtils.isNotBlank(createStart) && StringUtils.isNotBlank(createEnd)) { |
| | | terms.put("createStart", createStart); |
| | | terms.put("createEnd", createEnd); |
| | | } |
| | | // 更新时间区间 |
| | | String updateStart = request.getParameter("updateStart"); |
| | | String updateEnd = request.getParameter("updateEnd"); |
| | | if(StringUtils.isNotBlank(updateStart) && StringUtils.isNotBlank(updateEnd)) { |
| | | terms.put("updateStart", updateStart); |
| | | terms.put("updateEnd", updateEnd); |
| | | } |
| | | return terms; |
| | | } |
| | | |
| | | /** |
| | | * 条件查询多个 |
| | | * @url {ctx}/api/web/dispNormCause/listQuery |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/listQuery") |
| | | public Object listQuery() { |
| | | try { |
| | | Map<String, Object> terms = getParameter(); |
| | | return ReturnSucUtils.getRepInfo(service.listTerms(terms)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件分页查询 |
| | | * @url {ctx}/api/web/dispNormCause/pageQuery |
| | | * @param page 页码 |
| | | * @param size 每页数量 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/pageQuery") |
| | | public Object pageQuery(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size) { |
| | | try { |
| | | Map<String, Object> terms = getParameter(); |
| | | Sort sort = Sort.by(Sort.Direction.DESC, "create_time"); |
| | | PageRequest pageRequest = PageRequest.of(page-1, size, sort); |
| | | Page<DispNormCause> dispNormCausePage = service.pageQuery(pageRequest, terms); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", dispNormCausePage); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/web/dispNormCause/getById |
| | | * @param id 主键编号 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/getById") |
| | | public Object getById(@RequestParam(value = "id") String id) { |
| | | try { |
| | | return ReturnSucUtils.getRepInfo(service.getById(id)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据主键单个 |
| | | * @url {ctx}/api/web/dispNormCause/deleteById |
| | | * @param id 主键编号 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/deleteById") |
| | | public Object deleteById(@RequestParam(value = "id") String id) { |
| | | try { |
| | | service.removeById(id); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @url {ctx}/api/web/dispNormCause/saveDispNormCause |
| | | * @param dispNormCause 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveDispNormCause") |
| | | public Object saveDispNormCause(@RequestBody DispNormCause dispNormCause) { |
| | | try { |
| | | service.saveDispNormCause(dispNormCause); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.casedisp.controller.web; |
| | | |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.module.casedisp.domain.po.DispRule; |
| | | import cn.huge.module.casedisp.service.DispRuleService; |
| | | import com.google.common.collect.Maps; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Page; |
| | | import org.springframework.data.domain.PageRequest; |
| | | import org.springframework.data.domain.Sort; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.Stream; |
| | | |
| | | /** |
| | | * @title: 调度规则表接口api-web端 |
| | | * @description: 调度规则表接口api-web端 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-09-03 20:53:40 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/web/dispRule") |
| | | public class DispRuleWebController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private DispRuleService service; |
| | | |
| | | /** |
| | | * 获取请求URL参数 |
| | | * @return Map<String, Object> |
| | | */ |
| | | 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 ruleName = request.getParameter("ruleName"); |
| | | if (StringUtils.isNotBlank(ruleName)){ |
| | | terms.put("ruleName", ruleName); |
| | | } |
| | | // 指标类型,24_00010-1:问题属地,24_00010-2:纠纷类型 |
| | | String normType = request.getParameter("normType"); |
| | | if (StringUtils.isNotBlank(normType)){ |
| | | terms.put("normType", normType); |
| | | } |
| | | // 指标类型名称 |
| | | String normTypeName = request.getParameter("normTypeName"); |
| | | if (StringUtils.isNotBlank(normTypeName)){ |
| | | terms.put("normTypeName", normTypeName); |
| | | } |
| | | // 指标名称 |
| | | String normName = request.getParameter("normName"); |
| | | if (StringUtils.isNotBlank(normName)){ |
| | | terms.put("normName", normName); |
| | | } |
| | | // 指标内容/表 |
| | | String normTable = request.getParameter("normTable"); |
| | | if (StringUtils.isNotBlank(normTable)){ |
| | | terms.put("normTable", normTable); |
| | | } |
| | | // 调度目标最高级别,1:市级,2:区级,3:镇街级,4:村居级 |
| | | String highTargetLevel = request.getParameter("highTargetLevel"); |
| | | if (StringUtils.isNotBlank(highTargetLevel)){ |
| | | terms.put("highTargetLevel", highTargetLevel); |
| | | } |
| | | // 优先级 |
| | | String priority = request.getParameter("priority"); |
| | | if (StringUtils.isNotBlank(priority)){ |
| | | terms.put("priority", priority); |
| | | } |
| | | // 规则状态,0:开启,1:关闭 |
| | | String ruleStauts = request.getParameter("ruleStauts"); |
| | | if (StringUtils.isNotBlank(ruleStauts)){ |
| | | terms.put("ruleStauts", ruleStauts); |
| | | } |
| | | // 操作人编号 |
| | | String userId = request.getParameter("userId"); |
| | | if (StringUtils.isNotBlank(userId)){ |
| | | terms.put("userId", userId); |
| | | } |
| | | // 顾客编号 |
| | | String custId = request.getParameter("custId"); |
| | | if (StringUtils.isNotBlank(custId)){ |
| | | terms.put("custId", custId); |
| | | } |
| | | // 创建时间区间 |
| | | String createStart = request.getParameter("createStart"); |
| | | String createEnd = request.getParameter("createEnd"); |
| | | if(StringUtils.isNotBlank(createStart) && StringUtils.isNotBlank(createEnd)) { |
| | | terms.put("createStart", createStart); |
| | | terms.put("createEnd", createEnd); |
| | | } |
| | | // 更新时间区间 |
| | | String updateStart = request.getParameter("updateStart"); |
| | | String updateEnd = request.getParameter("updateEnd"); |
| | | if(StringUtils.isNotBlank(updateStart) && StringUtils.isNotBlank(updateEnd)) { |
| | | terms.put("updateStart", updateStart); |
| | | terms.put("updateEnd", updateEnd); |
| | | } |
| | | return terms; |
| | | } |
| | | |
| | | /** |
| | | * 条件查询多个 |
| | | * @url {ctx}/api/web/dispRule/listQuery |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/listQuery") |
| | | public Object listQuery() { |
| | | try { |
| | | Map<String, Object> terms = getParameter(); |
| | | return ReturnSucUtils.getRepInfo(service.listTerms(terms)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件分页查询 |
| | | * @url {ctx}/api/web/dispRule/pageQuery |
| | | * @param page 页码 |
| | | * @param size 每页数量 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/pageQuery") |
| | | public Object pageQuery(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size) { |
| | | try { |
| | | Map<String, Object> terms = getParameter(); |
| | | Sort sort = Sort.by(Sort.Direction.DESC, "create_time"); |
| | | PageRequest pageRequest = PageRequest.of(page-1, size, sort); |
| | | Page<DispRule> dispRulePage = service.pageQuery(pageRequest, terms); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", dispRulePage); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/web/dispRule/getById |
| | | * @param id 主键编号 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/getById") |
| | | public Object getById(@RequestParam(value = "id") String id) { |
| | | try { |
| | | return ReturnSucUtils.getRepInfo(service.getById(id)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据主键单个 |
| | | * @url {ctx}/api/web/dispRule/deleteById |
| | | * @param id 主键编号 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/deleteById") |
| | | public Object deleteById(@RequestParam(value = "id") String id) { |
| | | try { |
| | | service.removeById(id); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @url {ctx}/api/web/dispRule/saveDispRule |
| | | * @param dispRule 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveDispRule") |
| | | public Object saveDispRule(@RequestBody DispRule dispRule) { |
| | | try { |
| | | service.saveDispRule(dispRule); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.casedisp.dao.mapper; |
| | | |
| | | import cn.huge.module.casedisp.domain.po.CaseDisp; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.data.domain.PageRequest; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @title: 纠纷调度单表持久层业务处理 |
| | | * @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-09-03 10:20:49 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Repository |
| | | public interface CaseDispMapper extends BaseMapper<CaseDisp>{ |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | void updateCaseDisp(@Param("entity") CaseDisp entity); |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | void updateCaseDispTerms(@Param("entity") CaseDisp entity, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | void deleteCaseDisp(@Param("id") String id); |
| | | |
| | | /** |
| | | * 按条件查询结果集 |
| | | * @param terms 查询条件集合 |
| | | * @return List<CaseDisp> |
| | | */ |
| | | List<CaseDisp> listTerms(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 按条件查询实体总数 |
| | | * @param terms 查询条件集合 |
| | | * @return long |
| | | */ |
| | | long countTerms(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 按条件查询实体分页结果集 |
| | | * @param page 分页对象 |
| | | * @param terms 查询条件集合 |
| | | * @return List<CaseDisp> |
| | | */ |
| | | List<CaseDisp> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.casedisp.dao.mapper; |
| | | |
| | | import cn.huge.module.casedisp.domain.dto.ZzzxUnitDTO; |
| | | import cn.huge.module.casedisp.domain.po.DispNormCause; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.data.domain.PageRequest; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @title: 调度指标表(按纠纷类型调度)持久层业务处理 |
| | | * @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-09-03 21:27:05 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Repository |
| | | public interface DispNormCauseMapper extends BaseMapper<DispNormCause>{ |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | void updateDispNormCause(@Param("entity") DispNormCause entity); |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | void updateDispNormCauseTerms(@Param("entity") DispNormCause entity, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | void deleteDispNormCause(@Param("id") String id); |
| | | |
| | | /** |
| | | * 按条件查询结果集 |
| | | * @param terms 查询条件集合 |
| | | * @return List<DispNormCause> |
| | | */ |
| | | List<DispNormCause> listTerms(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 按条件查询实体总数 |
| | | * @param terms 查询条件集合 |
| | | * @return long |
| | | */ |
| | | long countTerms(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 按条件查询实体分页结果集 |
| | | * @param page 分页对象 |
| | | * @param terms 查询条件集合 |
| | | * @return List<DispNormCause> |
| | | */ |
| | | List<DispNormCause> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据条件获取对应综治中心组织 |
| | | * @param terms |
| | | * @return List<ZzzxUnitDTO> |
| | | */ |
| | | ZzzxUnitDTO getZzzxUnitByTerms(@Param("terms") Map<String, Object> terms); |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.casedisp.dao.mapper; |
| | | |
| | | import cn.huge.module.casedisp.domain.po.DispRule; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.data.domain.PageRequest; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @title: 调度规则表持久层业务处理 |
| | | * @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-09-03 20:53:40 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Repository |
| | | public interface DispRuleMapper extends BaseMapper<DispRule>{ |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | void updateDispRule(@Param("entity") DispRule entity); |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | void updateDispRuleTerms(@Param("entity") DispRule entity, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | void deleteDispRule(@Param("id") String id); |
| | | |
| | | /** |
| | | * 按条件查询结果集 |
| | | * @param terms 查询条件集合 |
| | | * @return List<DispRule> |
| | | */ |
| | | List<DispRule> listTerms(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 按条件查询实体总数 |
| | | * @param terms 查询条件集合 |
| | | * @return long |
| | | */ |
| | | long countTerms(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 按条件查询实体分页结果集 |
| | | * @param page 分页对象 |
| | | * @param terms 查询条件集合 |
| | | * @return List<DispRule> |
| | | */ |
| | | List<DispRule> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <!-- |
| | | * @title: 纠纷调度单表 |
| | | * @description: 自定义sql,请自行实现业务逻辑 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time:2024-09-03 10:20:49 |
| | | * @version 1.0.0 |
| | | --> |
| | | <mapper namespace="cn.huge.module.disp.dao.mapper.CaseDispMapper"> |
| | | <!-- 结果集 --> |
| | | <resultMap id="dataResult" type="cn.huge.module.casedisp.domain.po.CaseDisp"> |
| | | <result property="id" column="id"/> |
| | | <result property="caseId" column="case_id"/> |
| | | <result property="dispWay" column="disp_way"/> |
| | | <result property="dispType" column="disp_type"/> |
| | | <result property="dispTypeName" column="disp_type_name"/> |
| | | <result property="dispContent" column="disp_content"/> |
| | | <result property="handleUnitId" column="handle_unit_id"/> |
| | | <result property="handleUnitName" column="handle_unit_name"/> |
| | | <result property="handleUserId" column="handle_user_id"/> |
| | | <result property="handleUserName" column="handle_user_name"/> |
| | | <result property="targetType" column="target_type"/> |
| | | <result property="targetTypeName" column="target_type_name"/> |
| | | <result property="targetId" column="target_id"/> |
| | | <result property="targetName" column="target_name"/> |
| | | <result property="dispTime" column="disp_time"/> |
| | | <result property="dispStatus" column="disp_status"/> |
| | | <result property="custId" column="cust_id"/> |
| | | <result property="deleteStatus" column="delete_status"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | <!-- 表 --> |
| | | <sql id='table-name'>dyh_case_disp</sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | | id, |
| | | case_id, |
| | | disp_way, |
| | | disp_type, |
| | | disp_type_name, |
| | | disp_content, |
| | | handle_unit_id, |
| | | handle_unit_name, |
| | | handle_user_id, |
| | | handle_user_name, |
| | | target_type, |
| | | target_type_name, |
| | | target_id, |
| | | target_name, |
| | | disp_time, |
| | | disp_status, |
| | | cust_id, |
| | | delete_status, |
| | | create_time, |
| | | update_time |
| | | </sql> |
| | | <!-- 更新实体字段 --> |
| | | <sql id="set-part"> |
| | | <if test="entity.caseId != null">case_id = #{entity.caseId},</if> |
| | | <if test="entity.dispWay != null">disp_way = #{entity.dispWay},</if> |
| | | <if test="entity.dispType != null">disp_type = #{entity.dispType},</if> |
| | | <if test="entity.dispTypeName != null">disp_type_name = #{entity.dispTypeName},</if> |
| | | <if test="entity.dispContent != null">disp_content = #{entity.dispContent},</if> |
| | | <if test="entity.handleUnitId != null">handle_unit_id = #{entity.handleUnitId},</if> |
| | | <if test="entity.handleUnitName != null">handle_unit_name = #{entity.handleUnitName},</if> |
| | | <if test="entity.handleUserId != null">handle_user_id = #{entity.handleUserId},</if> |
| | | <if test="entity.handleUserName != null">handle_user_name = #{entity.handleUserName},</if> |
| | | <if test="entity.targetType != null">target_type = #{entity.targetType},</if> |
| | | <if test="entity.targetTypeName != null">target_type_name = #{entity.targetTypeName},</if> |
| | | <if test="entity.targetId != null">target_id = #{entity.targetId},</if> |
| | | <if test="entity.targetName != null">target_name = #{entity.targetName},</if> |
| | | <if test="entity.dispTime != null">disp_time = #{entity.dispTime},</if> |
| | | <if test="entity.dispStatus != null">disp_status = #{entity.dispStatus},</if> |
| | | <if test="entity.custId != null">cust_id = #{entity.custId},</if> |
| | | <if test="entity.deleteStatus != null">delete_status = #{entity.deleteStatus},</if> |
| | | <if test="entity.createTime != null">create_time = #{entity.createTime},</if> |
| | | <if test="entity.updateTime != null">update_time = #{entity.updateTime}</if> |
| | | </sql> |
| | | <!-- 条件 --> |
| | | <sql id="where-part"> |
| | | <if test="terms != null"> |
| | | <where> |
| | | <if test="terms.id != null and terms.id !=''"> |
| | | and id = #{terms.id} |
| | | </if> |
| | | <if test="terms.caseId != null and terms.caseId !=''"> |
| | | and case_id = #{terms.caseId} |
| | | </if> |
| | | <if test="terms.dispWay != null and terms.dispWay !=''"> |
| | | and disp_way = #{terms.dispWay} |
| | | </if> |
| | | <if test="terms.dispType != null and terms.dispType !=''"> |
| | | and disp_type = #{terms.dispType} |
| | | </if> |
| | | <if test="terms.dispTypeName != null and terms.dispTypeName !=''"> |
| | | and disp_type_name = #{terms.dispTypeName} |
| | | </if> |
| | | <if test="terms.dispContent != null and terms.dispContent !=''"> |
| | | and disp_content = #{terms.dispContent} |
| | | </if> |
| | | <if test="terms.handleUnitId != null and terms.handleUnitId !=''"> |
| | | and handle_unit_id = #{terms.handleUnitId} |
| | | </if> |
| | | <if test="terms.handleUnitName != null and terms.handleUnitName !=''"> |
| | | and handle_unit_name = #{terms.handleUnitName} |
| | | </if> |
| | | <if test="terms.handleUserId != null and terms.handleUserId !=''"> |
| | | and handle_user_id = #{terms.handleUserId} |
| | | </if> |
| | | <if test="terms.handleUserName != null and terms.handleUserName !=''"> |
| | | and handle_user_name = #{terms.handleUserName} |
| | | </if> |
| | | <if test="terms.targetType != null and terms.targetType !=''"> |
| | | and target_type = #{terms.targetType} |
| | | </if> |
| | | <if test="terms.targetTypeName != null and terms.targetTypeName !=''"> |
| | | and target_type_name = #{terms.targetTypeName} |
| | | </if> |
| | | <if test="terms.targetId != null and terms.targetId !=''"> |
| | | and target_id = #{terms.targetId} |
| | | </if> |
| | | <if test="terms.targetName != null and terms.targetName !=''"> |
| | | and target_name = #{terms.targetName} |
| | | </if> |
| | | <if test="terms.dispTime != null and terms.dispTime !=''"> |
| | | and disp_time = #{terms.dispTime} |
| | | </if> |
| | | <if test="terms.dispStatus != null and terms.dispStatus !=''"> |
| | | and disp_status = #{terms.dispStatus} |
| | | </if> |
| | | <if test="terms.custId != null and terms.custId !=''"> |
| | | and cust_id = #{terms.custId} |
| | | </if> |
| | | <if test="terms.deleteStatus = null and terms.deleteStatus =''"> |
| | | and delete_status = 0 |
| | | </if> |
| | | <if test="terms.deleteStatus != null and terms.deleteStatus !=''"> |
| | | and delete_status = #{terms.deleteStatus} |
| | | </if> |
| | | <if test="terms.createTime != null and terms.createTime !=''"> |
| | | and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime} |
| | | </if> |
| | | <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''"> |
| | | and (DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart} |
| | | and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.createEnd}) |
| | | </if> |
| | | <if test="terms.updateTime != null and terms.updateTime !=''"> |
| | | and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime} |
| | | </if> |
| | | <if test="terms.updateStart != null and terms.updateStart !='' and terms.updateEnd != null and terms.updateEnd !=''"> |
| | | and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart} |
| | | and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd}) |
| | | </if> |
| | | </where> |
| | | </if> |
| | | </sql> |
| | | <!-- 更新对象 --> |
| | | <update id="updateCaseDisp"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <where> |
| | | id = #{entity.id} |
| | | </where> |
| | | </update> |
| | | <!-- 条件更新对象 --> |
| | | <update id="updateCaseDispTerms"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <include refid="where-part"/> |
| | | </update> |
| | | <!-- 根据编号物理删除 --> |
| | | <delete id="deleteCaseDisp"> |
| | | delete from |
| | | <include refid="table-name" /> |
| | | where id = #{id} |
| | | </delete> |
| | | <!-- 根据条件查询 --> |
| | | <select id="listTerms" resultMap="dataResult"> |
| | | select |
| | | <include refid="column-part"/> |
| | | from |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | </select> |
| | | <!-- 根据条件统计 --> |
| | | <select id="countTerms" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(1) |
| | | from |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | </select> |
| | | <!-- 根据条件分页查询 --> |
| | | <select id="pageTerms" resultMap="dataResult"> |
| | | SELECT |
| | | <include refid="column-part"/> |
| | | FROM |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | <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(create_time), create_time desc |
| | | </if> |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <!-- |
| | | * @title: 调度指标表(按纠纷类型调度) |
| | | * @description: 自定义sql,请自行实现业务逻辑 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time:2024-09-03 21:27:05 |
| | | * @version 1.0.0 |
| | | --> |
| | | <mapper namespace="cn.huge.module.casedisp.dao.mapper.DispNormCauseMapper"> |
| | | <!-- 结果集 --> |
| | | <resultMap id="dataResult" type="cn.huge.module.casedisp.domain.po.DispNormCause"> |
| | | <result property="id" column="id"/> |
| | | <result property="caseType" column="case_type"/> |
| | | <result property="caseTypeName" column="case_type_name"/> |
| | | <result property="targetUnitLevel" column="target_unit_level"/> |
| | | <result property="targetUnitId" column="target_unit_id"/> |
| | | <result property="targetUnitName" column="target_unit_name"/> |
| | | <result property="priority" column="priority"/> |
| | | <result property="userId" column="user_id"/> |
| | | <result property="custId" column="cust_id"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | <!-- 表 --> |
| | | <sql id='table-name'>dyh_disp_norm_cause</sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | | id, |
| | | case_type, |
| | | case_type_name, |
| | | target_unit_level, |
| | | target_unit_id, |
| | | target_unit_name, |
| | | priority, |
| | | user_id, |
| | | cust_id, |
| | | create_time, |
| | | update_time |
| | | </sql> |
| | | <!-- 更新实体字段 --> |
| | | <sql id="set-part"> |
| | | <if test="entity.caseType != null">case_type = #{entity.caseType},</if> |
| | | <if test="entity.caseTypeName != null">case_type_name = #{entity.caseTypeName},</if> |
| | | <if test="entity.targetUnitLevel != null">target_unit_level = #{entity.targetUnitLevel},</if> |
| | | <if test="entity.targetUnitId != null">target_unit_id = #{entity.targetUnitId},</if> |
| | | <if test="entity.targetUnitName != null">target_unit_name = #{entity.targetUnitName},</if> |
| | | <if test="entity.priority != null">priority = #{entity.priority},</if> |
| | | <if test="entity.userId != null">user_id = #{entity.userId},</if> |
| | | <if test="entity.custId != null">cust_id = #{entity.custId},</if> |
| | | <if test="entity.createTime != null">create_time = #{entity.createTime},</if> |
| | | <if test="entity.updateTime != null">update_time = #{entity.updateTime}</if> |
| | | </sql> |
| | | <!-- 条件 --> |
| | | <sql id="where-part"> |
| | | <if test="terms != null"> |
| | | <where> |
| | | <if test="terms.id != null and terms.id !=''"> |
| | | and id = #{terms.id} |
| | | </if> |
| | | <if test="terms.caseType != null and terms.caseType !=''"> |
| | | and case_type = #{terms.caseType} |
| | | </if> |
| | | <if test="terms.caseTypeName != null and terms.caseTypeName !=''"> |
| | | and case_type_name = #{terms.caseTypeName} |
| | | </if> |
| | | <if test="terms.targetUnitLevel != null and terms.targetUnitLevel !=''"> |
| | | and target_unit_level = #{terms.targetUnitLevel} |
| | | </if> |
| | | <if test="terms.targetUnitId != null and terms.targetUnitId !=''"> |
| | | and target_unit_id = #{terms.targetUnitId} |
| | | </if> |
| | | <if test="terms.targetUnitName != null and terms.targetUnitName !=''"> |
| | | and target_unit_name = #{terms.targetUnitName} |
| | | </if> |
| | | <if test="terms.priority != null and terms.priority !=''"> |
| | | and priority = #{terms.priority} |
| | | </if> |
| | | <if test="terms.userId != null and terms.userId !=''"> |
| | | and user_id = #{terms.userId} |
| | | </if> |
| | | <if test="terms.custId != null and terms.custId !=''"> |
| | | and cust_id = #{terms.custId} |
| | | </if> |
| | | <if test="terms.createTime != null and terms.createTime !=''"> |
| | | and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime} |
| | | </if> |
| | | <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''"> |
| | | and (DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart} |
| | | and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.createEnd}) |
| | | </if> |
| | | <if test="terms.updateTime != null and terms.updateTime !=''"> |
| | | and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime} |
| | | </if> |
| | | <if test="terms.updateStart != null and terms.updateStart !='' and terms.updateEnd != null and terms.updateEnd !=''"> |
| | | and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart} |
| | | and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd}) |
| | | </if> |
| | | </where> |
| | | </if> |
| | | </sql> |
| | | <!-- 更新对象 --> |
| | | <update id="updateDispNormCause"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <where> |
| | | id = #{entity.id} |
| | | </where> |
| | | </update> |
| | | <!-- 条件更新对象 --> |
| | | <update id="updateDispNormCauseTerms"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <include refid="where-part"/> |
| | | </update> |
| | | <!-- 根据编号物理删除 --> |
| | | <delete id="deleteDispNormCause"> |
| | | delete from |
| | | <include refid="table-name" /> |
| | | where id = #{id} |
| | | </delete> |
| | | <!-- 根据条件查询 --> |
| | | <select id="listTerms" resultMap="dataResult"> |
| | | select |
| | | <include refid="column-part"/> |
| | | from |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | </select> |
| | | <!-- 根据条件统计 --> |
| | | <select id="countTerms" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(1) |
| | | from |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | </select> |
| | | <!-- 根据条件分页查询 --> |
| | | <select id="pageTerms" resultMap="dataResult"> |
| | | SELECT |
| | | <include refid="column-part"/> |
| | | FROM |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | <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(create_time), create_time desc |
| | | </if> |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | |
| | | |
| | | <!-- 根据条件获取对应综治中心组织 --> |
| | | <select id="getZzzxUnitByTerms" resultType="cn.huge.module.casedisp.domain.dto.ZzzxUnitDTO"> |
| | | SELECT |
| | | id as 'unitId', unit_name as 'unitName' |
| | | FROM dyh_ct_unit |
| | | where unit_type = 1 |
| | | <include refid="getZzzxUnitByTerms-where-part"/> |
| | | </select> |
| | | <!-- 根据条件获取对应综治中心组织-条件 --> |
| | | <sql id="getZzzxUnitByTerms-where-part"> |
| | | <if test="terms != null"> |
| | | <if test="terms.road != null and terms.road !=''"> |
| | | and road = #{terms.road} |
| | | </if> |
| | | <if test="terms.area != null and terms.area !=''"> |
| | | and area = #{terms.area} |
| | | </if> |
| | | <if test="terms.city != null and terms.city !=''"> |
| | | and city = #{terms.city} |
| | | </if> |
| | | </if> |
| | | </sql> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <!-- |
| | | * @title: 调度规则表 |
| | | * @description: 自定义sql,请自行实现业务逻辑 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time:2024-09-03 20:53:40 |
| | | * @version 1.0.0 |
| | | --> |
| | | <mapper namespace="cn.huge.module.casedisp.dao.mapper.DispRuleMapper"> |
| | | <!-- 结果集 --> |
| | | <resultMap id="dataResult" type="cn.huge.module.casedisp.domain.po.DispRule"> |
| | | <result property="id" column="id"/> |
| | | <result property="ruleName" column="rule_name"/> |
| | | <result property="normType" column="norm_type"/> |
| | | <result property="normTypeName" column="norm_type_name"/> |
| | | <result property="normName" column="norm_name"/> |
| | | <result property="normTable" column="norm_table"/> |
| | | <result property="highTargetLevel" column="high_target_level"/> |
| | | <result property="priority" column="priority"/> |
| | | <result property="ruleStauts" column="rule_stauts"/> |
| | | <result property="userId" column="user_id"/> |
| | | <result property="custId" column="cust_id"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | <!-- 表 --> |
| | | <sql id='table-name'>dyh_disp_rule</sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | | id, |
| | | rule_name, |
| | | norm_type, |
| | | norm_type_name, |
| | | norm_name, |
| | | norm_table, |
| | | high_target_level, |
| | | priority, |
| | | rule_stauts, |
| | | user_id, |
| | | cust_id, |
| | | create_time, |
| | | update_time |
| | | </sql> |
| | | <!-- 更新实体字段 --> |
| | | <sql id="set-part"> |
| | | <if test="entity.ruleName != null">rule_name = #{entity.ruleName},</if> |
| | | <if test="entity.normType != null">norm_type = #{entity.normType},</if> |
| | | <if test="entity.normTypeName != null">norm_type_name = #{entity.normTypeName},</if> |
| | | <if test="entity.normName != null">norm_name = #{entity.normName},</if> |
| | | <if test="entity.normTable != null">norm_table = #{entity.normTable},</if> |
| | | <if test="entity.highTargetLevel != null">high_target_level = #{entity.highTargetLevel},</if> |
| | | <if test="entity.priority != null">priority = #{entity.priority},</if> |
| | | <if test="entity.ruleStauts != null">rule_stauts = #{entity.ruleStauts},</if> |
| | | <if test="entity.userId != null">user_id = #{entity.userId},</if> |
| | | <if test="entity.custId != null">cust_id = #{entity.custId},</if> |
| | | <if test="entity.createTime != null">create_time = #{entity.createTime},</if> |
| | | <if test="entity.updateTime != null">update_time = #{entity.updateTime}</if> |
| | | </sql> |
| | | <!-- 条件 --> |
| | | <sql id="where-part"> |
| | | <if test="terms != null"> |
| | | <where> |
| | | <if test="terms.id != null and terms.id !=''"> |
| | | and id = #{terms.id} |
| | | </if> |
| | | <if test="terms.ruleName != null and terms.ruleName !=''"> |
| | | and rule_name = #{terms.ruleName} |
| | | </if> |
| | | <if test="terms.normType != null and terms.normType !=''"> |
| | | and norm_type = #{terms.normType} |
| | | </if> |
| | | <if test="terms.normTypeName != null and terms.normTypeName !=''"> |
| | | and norm_type_name = #{terms.normTypeName} |
| | | </if> |
| | | <if test="terms.normName != null and terms.normName !=''"> |
| | | and norm_name = #{terms.normName} |
| | | </if> |
| | | <if test="terms.normTable != null and terms.normTable !=''"> |
| | | and norm_table = #{terms.normTable} |
| | | </if> |
| | | <if test="terms.highTargetLevel != null and terms.highTargetLevel !=''"> |
| | | and high_target_level = #{terms.highTargetLevel} |
| | | </if> |
| | | <if test="terms.priority != null and terms.priority !=''"> |
| | | and priority = #{terms.priority} |
| | | </if> |
| | | <if test="terms.ruleStauts != null and terms.ruleStauts !=''"> |
| | | and rule_stauts = #{terms.ruleStauts} |
| | | </if> |
| | | <if test="terms.userId != null and terms.userId !=''"> |
| | | and user_id = #{terms.userId} |
| | | </if> |
| | | <if test="terms.custId != null and terms.custId !=''"> |
| | | and cust_id = #{terms.custId} |
| | | </if> |
| | | <if test="terms.createTime != null and terms.createTime !=''"> |
| | | and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime} |
| | | </if> |
| | | <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''"> |
| | | and (DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart} |
| | | and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.createEnd}) |
| | | </if> |
| | | <if test="terms.updateTime != null and terms.updateTime !=''"> |
| | | and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime} |
| | | </if> |
| | | <if test="terms.updateStart != null and terms.updateStart !='' and terms.updateEnd != null and terms.updateEnd !=''"> |
| | | and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart} |
| | | and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd}) |
| | | </if> |
| | | </where> |
| | | </if> |
| | | </sql> |
| | | <!-- 更新对象 --> |
| | | <update id="updateDispRule"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <where> |
| | | id = #{entity.id} |
| | | </where> |
| | | </update> |
| | | <!-- 条件更新对象 --> |
| | | <update id="updateDispRuleTerms"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <include refid="where-part"/> |
| | | </update> |
| | | <!-- 根据编号物理删除 --> |
| | | <delete id="deleteDispRule"> |
| | | delete from |
| | | <include refid="table-name" /> |
| | | where id = #{id} |
| | | </delete> |
| | | <!-- 根据条件查询 --> |
| | | <select id="listTerms" resultMap="dataResult"> |
| | | select |
| | | <include refid="column-part"/> |
| | | from |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | </select> |
| | | <!-- 根据条件统计 --> |
| | | <select id="countTerms" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(1) |
| | | from |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | </select> |
| | | <!-- 根据条件分页查询 --> |
| | | <select id="pageTerms" resultMap="dataResult"> |
| | | SELECT |
| | | <include refid="column-part"/> |
| | | FROM |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | <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(create_time), create_time desc |
| | | </if> |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | package cn.huge.module.casedisp.domain.bo; |
| | | |
| | | import cn.huge.module.casedisp.domain.po.CaseDisp; |
| | | |
| | | /** |
| | | * @title: 纠纷调度单表业务扩展类 |
| | | * @description: 纠纷调度单表业务扩展类 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-09-03 10:20:49 |
| | | * @version: 1.0.0 |
| | | * @see cn.huge.module.casedisp.domain.po.CaseDisp |
| | | */ |
| | | public class CaseDispBO extends CaseDisp { |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.casedisp.domain.bo; |
| | | |
| | | import cn.huge.module.casedisp.domain.po.DispNormCause; |
| | | |
| | | /** |
| | | * @title: 调度指标表(按纠纷类型调度)业务扩展类 |
| | | * @description: 调度指标表(按纠纷类型调度)业务扩展类 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-09-03 21:27:05 |
| | | * @version: 1.0.0 |
| | | * @see cn.huge.module.casedisp.domain.po.DispNormCause |
| | | */ |
| | | public class DispNormCauseBO extends DispNormCause { |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.casedisp.domain.bo; |
| | | |
| | | import cn.huge.module.casedisp.domain.po.DispRule; |
| | | |
| | | /** |
| | | * @title: 调度规则表业务扩展类 |
| | | * @description: 调度规则表业务扩展类 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-09-03 20:53:40 |
| | | * @version: 1.0.0 |
| | | * @see cn.huge.module.casedisp.domain.po.DispRule |
| | | */ |
| | | public class DispRuleBO extends DispRule { |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.casedisp.domain.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | |
| | | /** |
| | | * @title: 综治中心组织信息交互对象 |
| | | * @description: 综治中心组织信息交互对象 |
| | | * @company:hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-09-03 20:53:40 |
| | | * @version 1.0.0 |
| | | */ |
| | | @TableName(value = "dyh_disp_rule") |
| | | @Data |
| | | public class ZzzxUnitDTO { |
| | | |
| | | /** |
| | | * 组织编号 |
| | | */ |
| | | private String unitId; |
| | | |
| | | /** |
| | | * 组织名称 |
| | | */ |
| | | private String unitName; |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.casedisp.domain.po; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @title: 纠纷调度单表数据库对应关系类 |
| | | * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。 |
| | | * @company:hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-09-03 10:20:49 |
| | | * @version 1.0.0 |
| | | */ |
| | | @TableName(value = "dyh_case_disp") |
| | | @Data |
| | | public class CaseDisp { |
| | | |
| | | /** |
| | | * 纠纷调度单编号 |
| | | */ |
| | | @TableId(value = "id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 纠纷编号 |
| | | */ |
| | | @TableField(value = "case_id") |
| | | private String caseId; |
| | | |
| | | /** |
| | | * 调度方式,1:系统调度,2:人工调度 |
| | | */ |
| | | @TableField(value = "disp_way") |
| | | private Integer dispWay; |
| | | |
| | | /** |
| | | * 调度类型 |
| | | */ |
| | | @TableField(value = "disp_type") |
| | | private String dispType; |
| | | |
| | | /** |
| | | * 调度类型名称 |
| | | */ |
| | | @TableField(value = "disp_type_name") |
| | | private String dispTypeName; |
| | | |
| | | /** |
| | | * 调度意见 |
| | | */ |
| | | @TableField(value = "disp_content") |
| | | private String dispContent; |
| | | |
| | | /** |
| | | * 调度处理组织编号 |
| | | */ |
| | | @TableField(value = "handle_unit_id") |
| | | private String handleUnitId; |
| | | |
| | | /** |
| | | * 调度处理组织名称 |
| | | */ |
| | | @TableField(value = "handle_unit_name") |
| | | private String handleUnitName; |
| | | |
| | | /** |
| | | * 调度处理人编号 |
| | | */ |
| | | @TableField(value = "handle_user_id") |
| | | private String handleUserId; |
| | | |
| | | /** |
| | | * 调度处理人名称 |
| | | */ |
| | | @TableField(value = "handle_user_name") |
| | | private String handleUserName; |
| | | |
| | | /** |
| | | * 调度目标类型 |
| | | */ |
| | | @TableField(value = "target_type") |
| | | private String targetType; |
| | | |
| | | /** |
| | | * 调度目标类型名称 |
| | | */ |
| | | @TableField(value = "target_type_name") |
| | | private String targetTypeName; |
| | | |
| | | /** |
| | | * 调度目标编号 |
| | | */ |
| | | @TableField(value = "target_id") |
| | | private String targetId; |
| | | |
| | | /** |
| | | * 调度目标名称 |
| | | */ |
| | | @TableField(value = "target_name") |
| | | private String targetName; |
| | | |
| | | /** |
| | | * 调度时间 |
| | | */ |
| | | @TableField(value = "disp_time") |
| | | private Date dispTime; |
| | | |
| | | /** |
| | | * 调度状态,0:待调度,1:已调度,2:调度失败 |
| | | */ |
| | | @TableField(value = "disp_status") |
| | | private Integer dispStatus; |
| | | |
| | | /** |
| | | * 顾客编号 |
| | | */ |
| | | @TableField(value = "cust_id") |
| | | private String custId; |
| | | |
| | | /** |
| | | * 删除状态,0:未删除,1:已删除 |
| | | */ |
| | | @TableLogic |
| | | @TableField(value = "delete_status") |
| | | private Integer deleteStatus; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField(value = "create_time") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @TableField(value = "update_time") |
| | | private Date updateTime; |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.casedisp.domain.po; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @title: 调度指标表(按纠纷类型调度)数据库对应关系类 |
| | | * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。 |
| | | * @company:hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-09-03 21:27:05 |
| | | * @version 1.0.0 |
| | | */ |
| | | @TableName(value = "dyh_disp_norm_cause") |
| | | @Data |
| | | public class DispNormCause { |
| | | |
| | | /** |
| | | * 主键编号 |
| | | */ |
| | | @TableId(value = "id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 纠纷类型 |
| | | */ |
| | | @TableField(value = "case_type") |
| | | private String caseType; |
| | | |
| | | /** |
| | | * 纠纷类型名称 |
| | | */ |
| | | @TableField(value = "case_type_name") |
| | | private String caseTypeName; |
| | | |
| | | /** |
| | | * 目标组织级别,1:市级,2:区级,3:镇街级,4:村居级 |
| | | */ |
| | | @TableField(value = "target_unit_level") |
| | | private Integer targetUnitLevel; |
| | | |
| | | /** |
| | | * 目标组织编号 |
| | | */ |
| | | @TableField(value = "target_unit_id") |
| | | private String targetUnitId; |
| | | |
| | | /** |
| | | * 目标组织名称 |
| | | */ |
| | | @TableField(value = "target_unit_name") |
| | | private String targetUnitName; |
| | | |
| | | /** |
| | | * 优先级 |
| | | */ |
| | | @TableField(value = "priority") |
| | | private Integer priority; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | */ |
| | | @TableField(value = "user_id") |
| | | private String userId; |
| | | |
| | | /** |
| | | * 顾客编号 |
| | | */ |
| | | @TableField(value = "cust_id") |
| | | private String custId; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField(value = "create_time") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @TableField(value = "update_time") |
| | | private Date updateTime; |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.casedisp.domain.po; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @title: 调度规则表数据库对应关系类 |
| | | * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。 |
| | | * @company:hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-09-03 20:53:40 |
| | | * @version 1.0.0 |
| | | */ |
| | | @TableName(value = "dyh_disp_rule") |
| | | @Data |
| | | public class DispRule { |
| | | |
| | | /** |
| | | * 主键编号 |
| | | */ |
| | | @TableId(value = "id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 规则名称 |
| | | */ |
| | | @TableField(value = "rule_name") |
| | | private String ruleName; |
| | | |
| | | /** |
| | | * 指标类型,24_00010-1:问题属地,24_00010-2:纠纷类型 |
| | | */ |
| | | @TableField(value = "norm_type") |
| | | private String normType; |
| | | |
| | | /** |
| | | * 指标类型名称 |
| | | */ |
| | | @TableField(value = "norm_type_name") |
| | | private String normTypeName; |
| | | |
| | | /** |
| | | * 指标名称 |
| | | */ |
| | | @TableField(value = "norm_name") |
| | | private String normName; |
| | | |
| | | /** |
| | | * 指标内容/表 |
| | | */ |
| | | @TableField(value = "norm_table") |
| | | private String normTable; |
| | | |
| | | /** |
| | | * 调度目标最高级别,1:市级,2:区级,3:镇街级,4:村居级 |
| | | */ |
| | | @TableField(value = "high_target_level") |
| | | private Integer highTargetLevel; |
| | | |
| | | /** |
| | | * 优先级 |
| | | */ |
| | | @TableField(value = "priority") |
| | | private Integer priority; |
| | | |
| | | /** |
| | | * 规则状态,0:开启,1:关闭 |
| | | */ |
| | | @TableField(value = "rule_stauts") |
| | | private String ruleStauts; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | */ |
| | | @TableField(value = "user_id") |
| | | private String userId; |
| | | |
| | | /** |
| | | * 顾客编号 |
| | | */ |
| | | @TableField(value = "cust_id") |
| | | private String custId; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField(value = "create_time") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @TableField(value = "update_time") |
| | | private Date updateTime; |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.casedisp.service; |
| | | |
| | | 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.client.api.impl.UtilsClientImpl; |
| | | import cn.huge.module.casedisp.dao.mapper.CaseDispMapper; |
| | | import cn.huge.module.casedisp.domain.po.CaseDisp; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.data.domain.Page; |
| | | import org.springframework.data.domain.PageImpl; |
| | | import org.springframework.data.domain.PageRequest; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @title: 纠纷调度单表业务逻辑处理 |
| | | * @Description 纠纷调度单表业务逻辑处理 |
| | | * @company hugeinfo |
| | | * @author liyj |
| | | * @Time 2024-09-03 10:20:49 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class CaseDispService extends ServiceImpl<CaseDispMapper, CaseDisp>{ |
| | | |
| | | @Autowired |
| | | private CaseDispMapper mapper; |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | public void updateCaseDisp(CaseDisp entity){ |
| | | try{ |
| | | mapper.updateCaseDisp(entity); |
| | | }catch (Exception e){ |
| | | log.error("[CaseDispService.updateCaseDisp]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseDispService.updateCaseDisp", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | public void updateCaseDispTerms(CaseDisp entity, Map<String, Object> terms){ |
| | | try{ |
| | | mapper.updateCaseDispTerms(entity, terms); |
| | | }catch (Exception e){ |
| | | log.error("[CaseDispService.updateCaseDispTerms]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseDispService.updateCaseDispTerms", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | public void deleteCaseDisp(String id){ |
| | | try{ |
| | | mapper.deleteCaseDisp(id); |
| | | }catch (Exception e){ |
| | | log.error("[CaseDispService.deleteCaseDisp]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseDispService.deleteCaseDisp", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 按条件查询 |
| | | * @param terms 条件 |
| | | * @return List |
| | | */ |
| | | public List<CaseDisp> listTerms(Map<String, Object> terms){ |
| | | return mapper.listTerms(terms); |
| | | } |
| | | |
| | | /** |
| | | * 按条件统计 |
| | | * @param terms 条件 |
| | | * @return long |
| | | */ |
| | | public long countTerms(Map<String, Object> terms){ |
| | | return mapper.countTerms(terms); |
| | | } |
| | | |
| | | /** |
| | | * 按条件分页查询 |
| | | * @param page 分页对象 |
| | | * @param terms 条件 |
| | | * @return Page |
| | | */ |
| | | public Page<CaseDisp> pageQuery(PageRequest page, Map<String, Object> terms){ |
| | | long total = mapper.countTerms(terms); |
| | | List<CaseDisp> content = mapper.pageTerms(page, terms); |
| | | return new PageImpl<CaseDisp>(content, page, total); |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @param caseDisp 实体对象 |
| | | */ |
| | | public void saveCaseDisp(CaseDisp caseDisp){ |
| | | try{ |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 判断是否新增 |
| | | if (IdUtils.checkNewId(caseDisp.getId())){ |
| | | caseDisp.setId(utilsClient.getNewTimeId()); |
| | | caseDisp.setCreateTime(nowDate); |
| | | } |
| | | caseDisp.setUpdateTime(nowDate); |
| | | this.saveOrUpdate(caseDisp); |
| | | }catch (Exception e){ |
| | | log.error("[CaseDispService.saveCaseDisp]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseDispService.saveCaseDisp", e); |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.casedisp.service; |
| | | |
| | | 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.casedisp.domain.dto.ZzzxUnitDTO; |
| | | import cn.huge.module.client.api.impl.UtilsClientImpl; |
| | | import cn.huge.module.casedisp.dao.mapper.DispNormCauseMapper; |
| | | import cn.huge.module.casedisp.domain.po.DispNormCause; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Page; |
| | | import org.springframework.data.domain.PageImpl; |
| | | import org.springframework.data.domain.PageRequest; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @title: 调度指标表(按纠纷类型调度)业务逻辑处理 |
| | | * @Description 调度指标表(按纠纷类型调度)业务逻辑处理 |
| | | * @company hugeinfo |
| | | * @author liyj |
| | | * @Time 2024-09-03 21:27:05 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class DispNormCauseService extends ServiceImpl<DispNormCauseMapper, DispNormCause>{ |
| | | |
| | | @Autowired |
| | | private DispNormCauseMapper mapper; |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | public void updateDispNormCause(DispNormCause entity){ |
| | | try{ |
| | | mapper.updateDispNormCause(entity); |
| | | }catch (Exception e){ |
| | | log.error("[DispNormCauseService.updateDispNormCause]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("DispNormCauseService.updateDispNormCause", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | public void updateDispNormCauseTerms(DispNormCause entity, Map<String, Object> terms){ |
| | | try{ |
| | | mapper.updateDispNormCauseTerms(entity, terms); |
| | | }catch (Exception e){ |
| | | log.error("[DispNormCauseService.updateDispNormCauseTerms]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("DispNormCauseService.updateDispNormCauseTerms", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | public void deleteDispNormCause(String id){ |
| | | try{ |
| | | mapper.deleteDispNormCause(id); |
| | | }catch (Exception e){ |
| | | log.error("[DispNormCauseService.deleteDispNormCause]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("DispNormCauseService.deleteDispNormCause", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 按条件查询 |
| | | * @param terms 条件 |
| | | * @return List |
| | | */ |
| | | public List<DispNormCause> listTerms(Map<String, Object> terms){ |
| | | return mapper.listTerms(terms); |
| | | } |
| | | |
| | | /** |
| | | * 按条件统计 |
| | | * @param terms 条件 |
| | | * @return long |
| | | */ |
| | | public long countTerms(Map<String, Object> terms){ |
| | | return mapper.countTerms(terms); |
| | | } |
| | | |
| | | /** |
| | | * 按条件分页查询 |
| | | * @param page 分页对象 |
| | | * @param terms 条件 |
| | | * @return Page |
| | | */ |
| | | public Page<DispNormCause> pageQuery(PageRequest page, Map<String, Object> terms){ |
| | | long total = mapper.countTerms(terms); |
| | | List<DispNormCause> content = mapper.pageTerms(page, terms); |
| | | return new PageImpl<DispNormCause>(content, page, total); |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @param dispNormCause 实体对象 |
| | | */ |
| | | public void saveDispNormCause(DispNormCause dispNormCause){ |
| | | try{ |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 判断是否新增 |
| | | if (IdUtils.checkNewId(dispNormCause.getId())){ |
| | | dispNormCause.setId(utilsClient.getNewTimeId()); |
| | | dispNormCause.setCreateTime(nowDate); |
| | | } |
| | | dispNormCause.setUpdateTime(nowDate); |
| | | this.saveOrUpdate(dispNormCause); |
| | | }catch (Exception e){ |
| | | log.error("[DispNormCauseService.saveDispNormCause]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("DispNormCauseService.saveDispNormCause", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据纠纷类型查询最高组织级别以及所有下属组织级别的调度目标组织 |
| | | * @param caseType |
| | | * @param highTargetLevel |
| | | * @return |
| | | */ |
| | | public List<DispNormCause> listByCaseTypeGeLevel(String caseType, int highTargetLevel){ |
| | | QueryWrapper<DispNormCause> dispNormCauseQueryWrapper = new QueryWrapper<>(); |
| | | dispNormCauseQueryWrapper.eq("case_type", caseType).ge("target_unit_level", highTargetLevel) |
| | | .orderByAsc("priority"); |
| | | return mapper.selectList(dispNormCauseQueryWrapper); |
| | | } |
| | | |
| | | /** |
| | | * 根据条件获取对应综治中心组织 |
| | | * @param terms |
| | | * @return List<ZzzxUnitDTO> |
| | | */ |
| | | public ZzzxUnitDTO getZzzxUnitByTerms(Map<String, Object> terms){ |
| | | return mapper.getZzzxUnitByTerms(terms); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.casedisp.service; |
| | | |
| | | 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.client.api.impl.UtilsClientImpl; |
| | | import cn.huge.module.casedisp.dao.mapper.DispRuleMapper; |
| | | import cn.huge.module.casedisp.domain.po.DispRule; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Page; |
| | | import org.springframework.data.domain.PageImpl; |
| | | import org.springframework.data.domain.PageRequest; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @title: 调度规则表业务逻辑处理 |
| | | * @Description 调度规则表业务逻辑处理 |
| | | * @company hugeinfo |
| | | * @author liyj |
| | | * @Time 2024-09-03 20:53:40 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class DispRuleService extends ServiceImpl<DispRuleMapper, DispRule>{ |
| | | |
| | | @Autowired |
| | | private DispRuleMapper mapper; |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | public void updateDispRule(DispRule entity){ |
| | | try{ |
| | | mapper.updateDispRule(entity); |
| | | }catch (Exception e){ |
| | | log.error("[DispRuleService.updateDispRule]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("DispRuleService.updateDispRule", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | public void updateDispRuleTerms(DispRule entity, Map<String, Object> terms){ |
| | | try{ |
| | | mapper.updateDispRuleTerms(entity, terms); |
| | | }catch (Exception e){ |
| | | log.error("[DispRuleService.updateDispRuleTerms]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("DispRuleService.updateDispRuleTerms", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | public void deleteDispRule(String id){ |
| | | try{ |
| | | mapper.deleteDispRule(id); |
| | | }catch (Exception e){ |
| | | log.error("[DispRuleService.deleteDispRule]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("DispRuleService.deleteDispRule", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 按条件查询 |
| | | * @param terms 条件 |
| | | * @return List |
| | | */ |
| | | public List<DispRule> listTerms(Map<String, Object> terms){ |
| | | return mapper.listTerms(terms); |
| | | } |
| | | |
| | | /** |
| | | * 按条件统计 |
| | | * @param terms 条件 |
| | | * @return long |
| | | */ |
| | | public long countTerms(Map<String, Object> terms){ |
| | | return mapper.countTerms(terms); |
| | | } |
| | | |
| | | /** |
| | | * 按条件分页查询 |
| | | * @param page 分页对象 |
| | | * @param terms 条件 |
| | | * @return Page |
| | | */ |
| | | public Page<DispRule> pageQuery(PageRequest page, Map<String, Object> terms){ |
| | | long total = mapper.countTerms(terms); |
| | | List<DispRule> content = mapper.pageTerms(page, terms); |
| | | return new PageImpl<DispRule>(content, page, total); |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @param dispRule 实体对象 |
| | | */ |
| | | public void saveDispRule(DispRule dispRule){ |
| | | try{ |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 判断是否新增 |
| | | if (IdUtils.checkNewId(dispRule.getId())){ |
| | | dispRule.setId(utilsClient.getNewTimeId()); |
| | | dispRule.setCreateTime(nowDate); |
| | | } |
| | | dispRule.setUpdateTime(nowDate); |
| | | this.saveOrUpdate(dispRule); |
| | | }catch (Exception e){ |
| | | log.error("[DispRuleService.saveDispRule]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("DispRuleService.saveDispRule", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 按优先级排序查询启用的调度规则 |
| | | * @return |
| | | */ |
| | | public List<DispRule> listEffectiveRuleAsc(){ |
| | | QueryWrapper<DispRule> dispRuleQueryWrapper = new QueryWrapper<>(); |
| | | dispRuleQueryWrapper.eq("rule_stauts", 0).orderByAsc("priority"); |
| | | return mapper.selectList(dispRuleQueryWrapper); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.casedisp.service; |
| | | |
| | | import cn.huge.base.common.exception.ServiceException; |
| | | import cn.huge.base.common.utils.DateUtils; |
| | | import cn.huge.module.casedisp.constant.DispRuleConstsEnum; |
| | | import cn.huge.module.casedisp.domain.dto.ZzzxUnitDTO; |
| | | import cn.huge.module.casedisp.domain.po.CaseDisp; |
| | | import cn.huge.module.casedisp.domain.po.DispNormCause; |
| | | import cn.huge.module.casedisp.domain.po.DispRule; |
| | | import cn.huge.module.client.api.impl.CustClientImpl; |
| | | import cn.huge.module.client.api.impl.UtilsClientImpl; |
| | | import cn.huge.module.constant.BaseConsts; |
| | | import cn.huge.module.cust.constant.UserBaseConsts; |
| | | import cn.huge.module.disp.constant.DispBaseConsts; |
| | | import cn.huge.module.disp.constant.DispBaseConstsEnum; |
| | | import cn.huge.module.disp.dto.CaseDispBaseDTO; |
| | | import cn.huge.module.disp.dto.DispCaseBaseDTO; |
| | | import com.google.common.collect.Maps; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | | /** |
| | | * @author liyj |
| | | * @version 1.0.0 |
| | | * @title: 系统逻辑处理 |
| | | * @Description 系统逻辑处理 |
| | | * @company hugeinfo |
| | | * @Time 2022-11-20 15:32:09 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class SysDispService { |
| | | |
| | | @Autowired |
| | | private CaseDispService caseDispService; |
| | | @Autowired |
| | | private DispRuleService dispRuleService; |
| | | @Autowired |
| | | private DispNormCauseService dispNormCauseService; |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | /** |
| | | * 系统自动调度 |
| | | * |
| | | * @param dispCaseBaseDTO |
| | | */ |
| | | public CaseDispBaseDTO sysDisp(DispCaseBaseDTO dispCaseBaseDTO) { |
| | | try { |
| | | CaseDisp caseDisp = null; |
| | | if (StringUtils.isNotEmpty(dispCaseBaseDTO.getWantUnitId()) || |
| | | StringUtils.isNotEmpty(dispCaseBaseDTO.getWantUserId())){ |
| | | caseDisp = this.sysWantDisp(dispCaseBaseDTO); |
| | | }else { |
| | | caseDisp =this.sysRuleDisp(dispCaseBaseDTO); |
| | | } |
| | | CaseDispBaseDTO caseDispBaseDTO = new CaseDispBaseDTO(); |
| | | BeanUtils.copyProperties(caseDisp, caseDispBaseDTO); |
| | | return caseDispBaseDTO; |
| | | } catch (Exception e) { |
| | | log.error("service方法[SysDispService.sysDisp]调用失败,异常信息:" + e, e); |
| | | throw new ServiceException("SysDispService.sysDisp", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 系统自动调度-意向调解调度 |
| | | * |
| | | * @param dispCaseBaseDTO |
| | | * @return CaseSignBaseDTO |
| | | */ |
| | | public CaseDisp sysWantDisp(DispCaseBaseDTO dispCaseBaseDTO) { |
| | | try { |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | //封装初始化对象 |
| | | CaseDisp caseDisp = new CaseDisp(); |
| | | caseDisp.setId(utilsClient.getNewTimeId()); |
| | | caseDisp.setCaseId(dispCaseBaseDTO.getCaseId()); |
| | | caseDisp.setDispWay(DispBaseConsts.DISP_WAY_1); |
| | | caseDisp.setDispType(DispBaseConstsEnum.DISP_TYPE_1.getIndex()); |
| | | caseDisp.setDispTypeName(DispBaseConstsEnum.DISP_TYPE_1.getDes()); |
| | | caseDisp.setDispContent("系统自动流转"); |
| | | caseDisp.setHandleUserName("系统派单"); |
| | | caseDisp.setDispTime(nowDate); |
| | | caseDisp.setDispStatus(DispBaseConsts.DISP_STATUS_1); |
| | | caseDisp.setCustId(dispCaseBaseDTO.getCustId()); |
| | | caseDisp.setDeleteStatus(BaseConsts.DELETE_STATUS_0); |
| | | caseDisp.setCreateTime(nowDate); |
| | | caseDisp.setUpdateTime(nowDate); |
| | | // 调度给意向调解员 |
| | | if (StringUtils.isNotEmpty(dispCaseBaseDTO.getWantUserId())) { |
| | | caseDisp.setTargetType(DispBaseConstsEnum.TARGET_TYPE_2.getIndex()); |
| | | caseDisp.setTargetTypeName(DispBaseConstsEnum.TARGET_TYPE_2.getDes()); |
| | | caseDisp.setTargetId(dispCaseBaseDTO.getWantUserId()); |
| | | caseDisp.setTargetName(dispCaseBaseDTO.getWantUserName()); |
| | | } else { |
| | | caseDisp.setTargetType(DispBaseConstsEnum.TARGET_TYPE_1.getIndex()); |
| | | caseDisp.setTargetTypeName(DispBaseConstsEnum.TARGET_TYPE_1.getDes()); |
| | | caseDisp.setTargetId(dispCaseBaseDTO.getWantUnitId()); |
| | | caseDisp.setTargetName(dispCaseBaseDTO.getWantUnitName()); |
| | | } |
| | | caseDispService.save(caseDisp); |
| | | return caseDisp; |
| | | } catch (Exception e) { |
| | | log.error("service方法[SysDispService.wantDisp]调用失败,异常信息:" + e, e); |
| | | throw new ServiceException("SysDispService.wantDisp", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 系统自动调度-自定义调度规则调度 |
| | | * |
| | | * @param dispCaseBaseDTO |
| | | */ |
| | | public CaseDisp sysRuleDisp(DispCaseBaseDTO dispCaseBaseDTO) { |
| | | try { |
| | | String targetUnitId = null; |
| | | String targetUnitName = null; |
| | | // 默认是调度到最高级是镇街级 |
| | | int highTargetLevel = UserBaseConsts.UNIT_GRADE_3; |
| | | List<DispRule> dispRuleList = dispRuleService.listEffectiveRuleAsc(); |
| | | if (CollectionUtils.isNotEmpty(dispRuleList)){ |
| | | for (DispRule dispRule: dispRuleList){ |
| | | // 第一步,问题属地调度 |
| | | if (DispRuleConstsEnum.DISP_NORM_TYPE_1.getIndex().equals(dispRule.getNormType())){ |
| | | highTargetLevel = dispRule.getHighTargetLevel(); |
| | | } |
| | | // 第二步,纠纷类型调度 |
| | | if (DispRuleConstsEnum.DISP_NORM_TYPE_2.getIndex().equals(dispRule.getNormType())){ |
| | | List<DispNormCause> dispNormCauseList = dispNormCauseService.listByCaseTypeGeLevel(dispCaseBaseDTO.getCaseType(), highTargetLevel); |
| | | if (CollectionUtils.isNotEmpty(dispNormCauseList)){ |
| | | targetUnitId = dispNormCauseList.get(0).getTargetUnitId(); |
| | | targetUnitName = dispNormCauseList.get(0).getTargetUnitName(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // 保存调度结果 |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | CaseDisp caseDisp = new CaseDisp(); |
| | | caseDisp.setId(utilsClient.getNewTimeId()); |
| | | caseDisp.setCaseId(dispCaseBaseDTO.getCaseId()); |
| | | caseDisp.setDispWay(DispBaseConsts.DISP_WAY_1); |
| | | caseDisp.setDispType(DispBaseConstsEnum.DISP_TYPE_1.getIndex()); |
| | | caseDisp.setDispTypeName(DispBaseConstsEnum.DISP_TYPE_1.getDes()); |
| | | caseDisp.setDispTime(nowDate); |
| | | caseDisp.setCustId(dispCaseBaseDTO.getCustId()); |
| | | caseDisp.setDeleteStatus(BaseConsts.DELETE_STATUS_0); |
| | | caseDisp.setCreateTime(nowDate); |
| | | caseDisp.setUpdateTime(nowDate); |
| | | // 系统调度成功 |
| | | if (StringUtils.isNotEmpty(targetUnitId)){ |
| | | caseDisp.setDispContent("系统自动流转,派单至"+targetUnitName+"。"); |
| | | caseDisp.setHandleUserName("系统派单"); |
| | | caseDisp.setDispStatus(DispBaseConsts.DISP_STATUS_1); |
| | | // 调度给调解组织 |
| | | caseDisp.setTargetType(DispBaseConstsEnum.TARGET_TYPE_1.getIndex()); |
| | | caseDisp.setTargetTypeName(DispBaseConstsEnum.TARGET_TYPE_1.getDes()); |
| | | caseDisp.setTargetId(targetUnitId); |
| | | caseDisp.setTargetName(targetUnitName); |
| | | }else { |
| | | // 调度失败 |
| | | caseDisp.setDispContent("系统自动流转失败,派单至综治中心进行人工交办。"); |
| | | caseDisp.setHandleUserName("系统派单"); |
| | | caseDisp.setDispStatus(DispBaseConsts.DISP_STATUS_2); |
| | | // 默认流转到对应综治中心处理 |
| | | Map<String, Object> terms = Maps.newHashMap(); |
| | | // 镇街综治中心 |
| | | if (UserBaseConsts.UNIT_GRADE_3 == highTargetLevel) { |
| | | terms.put("road", dispCaseBaseDTO.getQueRoad()); |
| | | } |
| | | // 区综治中心 |
| | | if (UserBaseConsts.UNIT_GRADE_2 == highTargetLevel) { |
| | | terms.put("area", dispCaseBaseDTO.getQueArea()); |
| | | } |
| | | // 市综治中心 |
| | | if (UserBaseConsts.UNIT_GRADE_1 == highTargetLevel) { |
| | | terms.put("city", dispCaseBaseDTO.getQueCity()); |
| | | } |
| | | ZzzxUnitDTO zzzxUnitDTO = dispNormCauseService.getZzzxUnitByTerms(terms); |
| | | caseDisp.setTargetType(DispBaseConstsEnum.TARGET_TYPE_1.getIndex()); |
| | | caseDisp.setTargetTypeName(DispBaseConstsEnum.TARGET_TYPE_1.getDes()); |
| | | caseDisp.setTargetId(zzzxUnitDTO.getUnitId()); |
| | | caseDisp.setTargetName(zzzxUnitDTO.getUnitName()); |
| | | } |
| | | caseDispService.save(caseDisp); |
| | | return caseDisp; |
| | | } catch (Exception e) { |
| | | log.error("service方法[SysDispService.sysRuleDisp]调用失败,异常信息:" + e, e); |
| | | throw new ServiceException("SysDispService.sysRuleDisp", e); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.client.api; |
| | | |
| | | import cn.huge.base.common.bo.ReturnBO; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | /** |
| | | * @title: 客户用户中心微服务调用接口 |
| | | * @description: 客户用户中心微服务调用接口 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2021-11-05 16:51:48 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @FeignClient(name = "dyh-cust") |
| | | public interface CustClient { |
| | | |
| | | /** |
| | | * 内部用户-获取登录用户 |
| | | * @url {ctx}/api/client/ctUser/clientGetUser?userId= |
| | | * @param userId 登录用户编号 |
| | | * @return ReturnBO |
| | | */ |
| | | @GetMapping("/api/client/ctUser/clientGetUser") |
| | | ReturnBO clientGetUser(@RequestParam("userId") String userId); |
| | | |
| | | /** |
| | | * 内部用户-获取登录用户-所有信息 |
| | | * @url {ctx}/api/client/ctUser/clientGetUserAll?userId= |
| | | * @param userId 登录用户编号 |
| | | * @return |
| | | */ |
| | | @GetMapping("/api/client/ctUser/clientGetUserAll") |
| | | ReturnBO clientGetUserAll(@RequestParam("userId") String userId); |
| | | |
| | | /** |
| | | * 当事人-获取登录用户-所有信息 |
| | | * @url {ctx}/api/client/paUser/clientGetUserAll?userId= |
| | | * @param userId 登录用户编号 |
| | | * @return ReturnBO |
| | | */ |
| | | @GetMapping("/api/client/paUser/clientGetUserAll") |
| | | ReturnBO paclientGetUser(@RequestParam("userId") String userId); |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.client.api.impl; |
| | | |
| | | import cn.huge.base.common.bo.ReturnBO; |
| | | import cn.huge.base.common.constant.ReturnConsts; |
| | | import cn.huge.base.common.exception.ClientException; |
| | | import cn.huge.base.common.exception.ServiceException; |
| | | import cn.huge.module.client.api.CustClient; |
| | | import cn.huge.module.cust.dto.CtUserDTO; |
| | | import cn.huge.module.cust.dto.PaUserDTO; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * @title: 客户用户中心微服务调用接口实现 |
| | | * @description: 客户用户中心微服务调用接口实现 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2021-11-05 16:51:48 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | public class CustClientImpl { |
| | | |
| | | private CustClient custClient; |
| | | |
| | | @Autowired |
| | | public CustClientImpl(CustClient custClient) { |
| | | this.custClient = custClient; |
| | | } |
| | | |
| | | /** |
| | | * ObjectMapper工具类 |
| | | */ |
| | | private ObjectMapper objectMapper = new ObjectMapper(); |
| | | |
| | | /** |
| | | * 内部用户-获取登录用户 |
| | | * @param userId 用户编号 |
| | | * @return CtUserDTO |
| | | */ |
| | | public CtUserDTO clientGetUser(String userId){ |
| | | try{ |
| | | ReturnBO returnBo = custClient.clientGetUser(userId); |
| | | if (ReturnConsts.OK == returnBo.getCode()){ |
| | | CtUserDTO loginUser = objectMapper.convertValue(returnBo.getData(), CtUserDTO.class); |
| | | return loginUser; |
| | | }else{ |
| | | log.error("Client外服务接口[CustClientImpl.clientGetUser]请求异常:" + returnBo.getMsg(), returnBo.getMsg()); |
| | | throw new ClientException("CustClientImpl.clientGetUser", returnBo.getMsg()); |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("service方法[CustClientImpl.clientGetUser]调用异常:"+e, e); |
| | | throw new ServiceException("CustClientImpl.clientGetUser", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 内部用户-获取登录用户-所有信息 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | public CtUserDTO clientGetUserAll(String userId){ |
| | | try{ |
| | | ReturnBO returnBo = custClient.clientGetUserAll(userId); |
| | | if (ReturnConsts.OK == returnBo.getCode()){ |
| | | CtUserDTO loginUser = objectMapper.convertValue(returnBo.getData(), CtUserDTO.class); |
| | | return loginUser; |
| | | }else{ |
| | | log.error("Client外服务接口[CustClientImpl.clientGetUserAll]请求异常:" + returnBo.getMsg(), returnBo.getMsg()); |
| | | throw new ClientException("CustClientImpl.clientGetUserAll", returnBo.getMsg()); |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("service方法[CustClientImpl.clientGetUserAll]调用异常:"+e, e); |
| | | throw new ServiceException("CustClientImpl.clientGetUserAll", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 当事人-获取登录用户-所有信息 |
| | | * @param userId 用户编号 |
| | | * @return |
| | | */ |
| | | public PaUserDTO paclientGetUser(String userId){ |
| | | try{ |
| | | ReturnBO returnBo = custClient.paclientGetUser(userId); |
| | | if (ReturnConsts.OK == returnBo.getCode()){ |
| | | PaUserDTO loginUser = objectMapper.convertValue(returnBo.getData(), PaUserDTO.class); |
| | | return loginUser; |
| | | }else{ |
| | | log.error("Client外服务接口[CustClientImpl.paclientGetUser]请求异常:" + returnBo.getMsg(), returnBo.getMsg()); |
| | | throw new ClientException("CustClientImpl.paclientGetUser", returnBo.getMsg()); |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("service方法[CustClientImpl.paclientGetUser]调用异常:"+e, e); |
| | | throw new ServiceException("CustClientImpl.paclientGetUser", e); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | </select> |
| | | |
| | | |
| | | <!-- 查看附件组件-分类查询附件-结果集 --> |
| | | <resultMap id="fileByCatDTO" type="cn.huge.module.file.domain.dto.FileForCatDTO"> |
| | | |
| | | </resultMap> |
| | | <!-- 查看附件组件-分类查询附件 --> |
| | | <sql id="listFileByCatTerms-where-part"> |
| | | <if test="terms != null"> |
| | |
| | | </if> |
| | | </sql> |
| | | <!-- 查看附件组件-分类查询附件 --> |
| | | <select id="listFileByCatTerms" resultMap="fileByCatDTO"> |
| | | <select id="listFileByCatTerms" resultType="cn.huge.module.file.domain.dto.FileForCatDTO"> |
| | | select t1.id, t1.name, t1.true_name as trueName, |
| | | t1.suffix, t1.size, t1.unit, t1.show_url as showUrl, t1.down_url as downUrl, |
| | | t2.owner_cat as ownerCat, t2.uploader_id as uploaderId, t2.uploader_name as uploaderName, |
| File was renamed from dyh-service/dyh-utils/src/main/java/cn/huge/module/disp/controller/client/DispUtilsController.java |
| | |
| | | package cn.huge.module.disp.controller.client; |
| | | package cn.huge.module.casedisp.controller.client; |
| | | |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.module.disp.utils.DispIdUtils; |
| | | import cn.huge.module.casedisp.utils.DispIdUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| File was renamed from dyh-service/dyh-utils/src/main/java/cn/huge/module/disp/utils/DispIdUtils.java |
| | |
| | | package cn.huge.module.disp.utils; |
| | | package cn.huge.module.casedisp.utils; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |