43 files modified
53 files added
| | |
| | | #refreshToken过期时间:13小时,比token时间长一点 |
| | | expire-time: 46800000 |
| | | #不进行token拦截 |
| | | auth-skip-urls: /dyh-sys/api/v1/sync/universalSync |
| | | auth-skip-urls: /dyh-cust/api/web/ctAccount/login,/dyh-sys/api/v1/sync/universalSync |
| | |
| | | package cn.huge.base.common.utils; |
| | | |
| | | |
| | | import cn.huge.module.mediate.constant.CaseBaseConstsEnum; |
| | | import com.baidu.aip.ocr.AipOcr; |
| | | import com.google.common.collect.Maps; |
| | | import org.json.JSONObject; |
| | |
| | | JSONObject result = json.getJSONObject("words_result"); |
| | | String sex = result.getJSONObject("性别").getString("words"); |
| | | map.put("sex",sex); |
| | | if(sex.equals(CaseBaseConstsEnum.SEX_1.getDes())){ |
| | | map.put("sexName",CaseBaseConstsEnum.SEX_1.getIndex()); |
| | | }else{ |
| | | map.put("sexName",CaseBaseConstsEnum.SEX_2.getIndex()); |
| | | } |
| | | // if(sex.equals(CaseBaseConstsEnum.SEX_1.getDes())){ |
| | | // map.put("sexName",CaseBaseConstsEnum.SEX_1.getIndex()); |
| | | // }else{ |
| | | // map.put("sexName",CaseBaseConstsEnum.SEX_2.getIndex()); |
| | | // } |
| | | String name = result.getJSONObject("姓名").getString("words"); |
| | | map.put("trueName",name); |
| | | String address = result.getJSONObject("住址").getString("words"); |
| | |
| | | public static final int LEVEL_2 = 2; |
| | | |
| | | /** |
| | | * 状态,0:已删除,1:未删除 |
| | | * 状态,0:未删除,1:已删除 |
| | | */ |
| | | public static final int DELETE_STATUS_0 = 0; |
| | | public static final int DELETE_STATUS_1 = 1; |
| New file |
| | |
| | | package cn.huge.module.constant; |
| | | |
| | | /** |
| | | * @title: 调解相关常量类 |
| | | * @description: 调解相关常量类 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2021-11-05 16:51:48 |
| | | * @version: 1.0.0 |
| | | */ |
| | | public class CaseBaseConsts { |
| | | |
| | | /** |
| | | * 登记状态,1:草稿案件,2:正式案件 |
| | | */ |
| | | public static final String INPUT_STATUS_1 = "1"; |
| | | public static final String INPUT_STATUS_2 = "2"; |
| | | |
| | | /** |
| | | * 登记方式,1:正常登记,2:案件导入 |
| | | */ |
| | | public static final int INPUT_WAY_1 = 1; |
| | | public static final int INPUT_WAY_2 = 2; |
| | | |
| | | /** |
| | | * 当事人是否满意,1:不满意,2:满意 |
| | | */ |
| | | public static final String PARTY_JOY_1 = "1"; |
| | | public static final String PARTY_JOY_2 = "2"; |
| | | |
| | | /** |
| | | * 是否转诉讼案件,1:不转诉讼,2:转诉讼 |
| | | */ |
| | | public static final String CIVIL_STATUS_1 = "1"; |
| | | public static final String CIVIL_STATUS_2 = "2"; |
| | | |
| | | /** |
| | | * 签收状态,1:未签收,2:已签收,3:超时未签收,99:拒绝签收 |
| | | */ |
| | | public static final String SIGN_STATUS_1 = "1"; |
| | | public static final String SIGN_STATUS_2 = "2"; |
| | | public static final String SIGN_STATUS_3 = "3"; |
| | | public static final String SIGN_STATUS_99 = "99"; |
| | | |
| | | /** |
| | | * 是否是登记人 1:是 2:否 |
| | | */ |
| | | public static final String WHETHER_INPUT_1 = "1"; |
| | | public static final String WHETHER_INPUT_2 = "2"; |
| | | |
| | | /** |
| | | * 有无代理人,1:无,2:有 |
| | | */ |
| | | public static final String AGENT_STATUS_1 = "1"; |
| | | public static final String AGENT_STATUS_2 = "2"; |
| | | } |
| | | /** |
| | | * -------------------_ooOoo_------------------- |
| | | * ------------------o8888888o------------------ |
| | | * ------------------88" . "88------------------ |
| | | * ------------------(| -_- |)------------------ |
| | | * ------------------O\ = /O------------------ |
| | | * ---------------____/`---'\____--------------- |
| | | * -------------.' \\| |// `.------------- |
| | | * ------------/ \\||| : |||// \------------ |
| | | * -----------/ _||||| -:- |||||- \----------- |
| | | * -----------| | \\\ - /// | |----------- |
| | | * -----------| \_| ''\---/'' | |----------- |
| | | * -----------\ .-\__ `-` ___/-. /----------- |
| | | * ---------___`. .' /--.--\ `. . __---------- |
| | | * ------."" '< `.___\_<|>_/___.' >'"".------- |
| | | * -----| | : `- \`.;`\ _ /`;.`/ - ` : | |----- |
| | | * -----\ \ `-. \_ __\ /__ _/ .-` / /----- |
| | | * ======`-.____`-.___\_____/___.-`____.-'====== |
| | | * -------------------`=---=' |
| | | * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| | | * ---------佛祖保佑---hugeinfo---永无BUG---------- |
| | | */ |
| New file |
| | |
| | | package cn.huge.module.constant; |
| | | |
| | | /** |
| | | * @title: 调解相关常量枚举类 |
| | | * @description: 调解相关常量枚举类 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2021-11-05 16:51:48 |
| | | * @version: 1.0.0 |
| | | */ |
| | | public enum CaseBaseConstsEnum { |
| | | |
| | | /** |
| | | * 申请渠道,22_00001-1:来访登记,22_00001-2:小程序,22_00001-3:其他渠道, |
| | | */ |
| | | CASE_CANAL_1("22_00001-1", "来访登记"), |
| | | CASE_CANAL_2("22_00001-2", "小程序"), |
| | | |
| | | /** |
| | | * 签收意见,22_00010-1:同意签收,22_00010-2:拒绝签收 |
| | | */ |
| | | SIGN_RESULT_1("22_00010-1", "签收受理"), |
| | | SIGN_RESULT_2("22_00010-2", "拒绝签收"), |
| | | |
| | | /** |
| | | * 纠纷审查结果,22_00037-1:签收受理,22_00037-2:拒绝签收,22_00037-3:退回申请人,22_00037-4:不予受理 |
| | | */ |
| | | AUDIT_RESULT_1("22_00037-1", "签收受理"), |
| | | AUDIT_RESULT_2("22_00037-2", "拒绝签收"), |
| | | AUDIT_RESULT_3("22_00037-3", "退回申请人"), |
| | | AUDIT_RESULT_4("22_00037-3", "不予受理"), |
| | | |
| | | /** |
| | | * 当事人地位 |
| | | */ |
| | | PERSON_TYPE_1("15_020008-1", "申请人"), |
| | | PERSON_TYPE_2("15_020008-2", "被申请人"), |
| | | PERSON_TYPE_5("15_020008-5", "第三人"), |
| | | |
| | | /** |
| | | * 当事人类型类型 |
| | | */ |
| | | PERSON_CLASS_1("09_01001-1", "自然人"), |
| | | PERSON_CLASS_2("09_01001-2", "法人"), |
| | | PERSON_CLASS_3("09_01001-3", "非法人组织"), |
| | | |
| | | /** |
| | | * 代理人类型 |
| | | */ |
| | | AGENT_CLASS_1("09_01010-1", "律师"), |
| | | AGENT_CLASS_3("09_01010-3", "监护人"), |
| | | AGENT_CLASS_4("09_01010-4", "亲友"), |
| | | AGENT_CLASS_5("09_01010-5", "社会团体推荐的公民"), |
| | | AGENT_CLASS_6("09_01010-6", "所在单位推荐的人"), |
| | | AGENT_CLASS_8("09_01010-8", "法律工作者"), |
| | | AGENT_CLASS_9("09_01010-9", "所在社区推荐的公民"), |
| | | |
| | | /** |
| | | * 性别 |
| | | */ |
| | | SEX_1("09_00003-1", "男"), |
| | | SEX_2("09_00003-2", "女"), |
| | | |
| | | /** |
| | | * 证件类型 |
| | | */ |
| | | CARD_TYPE_1("09_00015-1", "身份证"), |
| | | CARD_TYPE_11("09_00015-11", "户口簿"), |
| | | CARD_TYPE_12("09_00015-12", "中国护照"), |
| | | CARD_TYPE_13("09_00015-13", "外国护照"), |
| | | CARD_TYPE_14("09_00015-14", "港澳居民来往内陆通行证"), |
| | | CARD_TYPE_16("09_00015-16", "台湾居民来往大陆通行证"), |
| | | CARD_TYPE_255("09_00015-255", "其他"), |
| | | CARD_TYPE_17("09_00015-17", "当事人未提供证件信息"), |
| | | |
| | | /** |
| | | * 纠纷进度,22_00006-1:待受理,22_00006-2:待调解,22_00006-3:调解中,22_00006-4:调解结束,22_00006-5:退回申请人,22_00006-6:不予受理,22_00006-7:申请人撤回 |
| | | */ |
| | | CASE_PROCESS_1("22_00006-1", "待受理"), |
| | | CASE_PROCESS_2("22_00006-2", "待调解"), |
| | | CASE_PROCESS_3("22_00006-3", "调解中"), |
| | | CASE_PROCESS_4("22_00006-4", "调解结束"), |
| | | CASE_PROCESS_5("22_00006-5", "退回申请人"), |
| | | CASE_PROCESS_6("22_00006-6", "不予受理"), |
| | | CASE_PROCESS_7("22_00006-7", "申请人撤回"), |
| | | |
| | | /** |
| | | * 调解结果 |
| | | */ |
| | | MEDI_RESULT_1("22_00025-1", "调解成功"), |
| | | MEDI_RESULT_2("22_00025-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 |
| | | */ |
| | | CaseBaseConstsEnum(String index, String des) { |
| | | this.index = index; |
| | | this.des = des; |
| | | } |
| | | |
| | | /** |
| | | * 静态方法 |
| | | * @param index |
| | | * @return |
| | | */ |
| | | public static String getDes(String index) { |
| | | for (CaseBaseConstsEnum constantEnum : CaseBaseConstsEnum.values()) { |
| | | if (constantEnum.getIndex().equals(index)) { |
| | | return constantEnum.des; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 静态方法 |
| | | * @param des |
| | | * @return |
| | | */ |
| | | public static String getIndex(String des) { |
| | | for (CaseBaseConstsEnum constantEnum : CaseBaseConstsEnum.values()) { |
| | | if (constantEnum.getDes().equals(des)) { |
| | | return constantEnum.index; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 静态方法4 |
| | | * @param index |
| | | * @return |
| | | */ |
| | | public static String getCaseWxProcess(String index) { |
| | | // 微信纠纷进度,1:待受理,2:待调解,3:调解中,4:调解结束,5:退回申请人,6:不予受理,7:申请人撤回 |
| | | String WX_PROCESS_1 = "1"; |
| | | String WX_PROCESS_2 = "2"; |
| | | String WX_PROCESS_3 = "3"; |
| | | String WX_PROCESS_4 = "4"; |
| | | String WX_PROCESS_5 = "5"; |
| | | String WX_PROCESS_6 = "6"; |
| | | String WX_PROCESS_7 = "7"; |
| | | if (CASE_PROCESS_1.index.equals(index)){ |
| | | return WX_PROCESS_1; |
| | | } |
| | | if (CASE_PROCESS_2.index.equals(index)){ |
| | | return WX_PROCESS_2; |
| | | } |
| | | if (CASE_PROCESS_3.index.equals(index)){ |
| | | return WX_PROCESS_3; |
| | | } |
| | | if (CASE_PROCESS_4.index.equals(index)){ |
| | | return WX_PROCESS_4; |
| | | } |
| | | if (CASE_PROCESS_5.index.equals(index)){ |
| | | return WX_PROCESS_5; |
| | | } |
| | | if (CASE_PROCESS_6.index.equals(index)){ |
| | | return WX_PROCESS_6; |
| | | } |
| | | if (CASE_PROCESS_7.index.equals(index)){ |
| | | return WX_PROCESS_7; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 静态方法4 |
| | | * @param index |
| | | * @return |
| | | */ |
| | | public static String getCaseProcess(String index) { |
| | | // 微信纠纷进度,1:待受理,2:待调解,3:调解中,4:调解结束,5:退回申请人,6:不予受理,7:申请人撤回 |
| | | String WX_PROCESS_1 = "1"; |
| | | String WX_PROCESS_2 = "2"; |
| | | String WX_PROCESS_3 = "3"; |
| | | String WX_PROCESS_4 = "4"; |
| | | String WX_PROCESS_5 = "5"; |
| | | String WX_PROCESS_6 = "6"; |
| | | String WX_PROCESS_7 = "7"; |
| | | if (WX_PROCESS_1.equals(index)){ |
| | | return CASE_PROCESS_1.index; |
| | | } |
| | | if (WX_PROCESS_2.equals(index)){ |
| | | return CASE_PROCESS_2.index; |
| | | } |
| | | if (WX_PROCESS_3.equals(index)){ |
| | | return CASE_PROCESS_3.index; |
| | | } |
| | | if (WX_PROCESS_4.equals(index)){ |
| | | return CASE_PROCESS_4.index; |
| | | } |
| | | if (WX_PROCESS_5.equals(index)){ |
| | | return CASE_PROCESS_5.index; |
| | | } |
| | | if (WX_PROCESS_6.equals(index)){ |
| | | return CASE_PROCESS_6.index; |
| | | } |
| | | if (WX_PROCESS_7.equals(index)){ |
| | | return CASE_PROCESS_7.index; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | } |
| | |
| | | private String canFieldName; |
| | | |
| | | /** |
| | | * 删除状态,0:已删除,1:未删除 |
| | | * 删除状态,0:未删除,1:已删除 |
| | | */ |
| | | @TableLogic |
| | | private Integer deleteStatus; |
| | |
| | | private Integer roleType; |
| | | |
| | | /** |
| | | * 删除状态,0:已删除,1:未删除 |
| | | * 删除状态,0:未删除,1:已删除 |
| | | */ |
| | | @TableLogic |
| | | private Integer deleteStatus; |
| | |
| | | private Integer dispStatus; |
| | | |
| | | /** |
| | | * 删除状态,0:已删除,1:未删除 |
| | | * 删除状态,0:未删除,1:已删除 |
| | | */ |
| | | @TableLogic |
| | | private Integer deleteStatus; |
| | |
| | | private Integer dispStatus; |
| | | |
| | | /** |
| | | * 删除状态,0:已删除(默认),1:未删除 |
| | | * 删除状态,0:未删除,1:已删除 |
| | | */ |
| | | @TableLogic |
| | | private Integer deleteStatus; |
| | |
| | | private String followCaseType; |
| | | |
| | | /** |
| | | * 删除状态,0:已删除,1:未删除 |
| | | * 删除状态,0:未删除,1:已删除 |
| | | */ |
| | | @TableLogic |
| | | private Integer deleteStatus; |
| | |
| | | </#if> |
| | | <#if (col.name == "delete_status")> |
| | | <if test="terms.${col.fieldName} = null and terms.${col.fieldName} =''"> |
| | | and delete_status = '1' |
| | | and delete_status = '0' |
| | | </if> |
| | | <if test="terms.${col.fieldName} != null and terms.${col.fieldName} !=''"> |
| | | and ${col.name} = <#noparse>#{</#noparse>terms.${col.fieldName}<#noparse>}</#noparse> |
| | |
| | | |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.base.config.CurrentUser; |
| | | import cn.huge.module.ctrole.domain.bo.CtRoleBO; |
| | | import cn.huge.module.ctrole.domain.po.CtRole; |
| | | import cn.huge.module.ctrole.service.CtRoleService; |
| | | import cn.huge.module.ctrole.service.CtRolefunService; |
| | | import cn.huge.module.ctuser.domain.bo.RoleTreeBO; |
| | | import cn.huge.module.ctuser.service.CtUserService; |
| | | import cn.huge.module.cust.dto.CtUserDTO; |
| | | import com.google.common.collect.Maps; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Page; |
| | | import org.springframework.data.domain.PageRequest; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/web/cRole") |
| | | @RequestMapping("/api/web/ctRole") |
| | | public class CtRoleWebController { |
| | | |
| | | @Autowired(required = false) |
| | |
| | | |
| | | @Autowired |
| | | private CtRoleService service; |
| | | |
| | | @Autowired |
| | | private CtUserService ctUserService; |
| | | |
| | | @Autowired |
| | | private CtRolefunService ctRolefunService; |
| | | |
| | | /** |
| | | * 获取请求URL参数 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/web/cRole/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/cRole/deleteById |
| | | * @param id 主键编号 |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号查询单个角色下属权限 |
| | | * @url {ctx}/api/web/ctRole/getById |
| | | * @param id 主键编号 |
| | | * @return Object |
| | | * @throws Exception |
| | | */ |
| | | @GetMapping("/getById") |
| | | public Object getById(@RequestParam(value = "id") String id, @CurrentUser String userId) { |
| | | try { |
| | | CtRoleBO bo = service.webGetById(id, userId); |
| | | return ReturnSucUtils.getRepInfo(bo); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | and role_type = #{terms.roleType} |
| | | </if> |
| | | <if test="terms.deleteStatus = null and terms.deleteStatus =''"> |
| | | and delete_status = '1' |
| | | and delete_status = '0' |
| | | </if> |
| | | <if test="terms.deleteStatus != null and terms.deleteStatus !=''"> |
| | | and delete_status = #{terms.deleteStatus} |
| | |
| | | and unit_id = #{terms.unitId} |
| | | </if> |
| | | <if test="terms.deleteStatus = null and terms.deleteStatus =''"> |
| | | and delete_status = '1' |
| | | and delete_status = '0' |
| | | </if> |
| | | <if test="terms.deleteStatus != null and terms.deleteStatus !=''"> |
| | | and delete_status = #{terms.deleteStatus} |
| | |
| | | package cn.huge.module.ctrole.domain.bo; |
| | | |
| | | import cn.huge.module.ctrole.domain.po.CtRole; |
| | | import cn.huge.module.ctrole.domain.po.CtRolefun; |
| | | import cn.huge.module.ctuser.domain.bo.RoleTreeBO; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: 角色表业务扩展类 |
| | |
| | | * @version: 1.0.0 |
| | | * @see CtRole |
| | | */ |
| | | @Data |
| | | public class CtRoleBO extends CtRole { |
| | | |
| | | /** |
| | | * 平台角色权限列表 |
| | | */ |
| | | List<CtRolefun> ctRolefuns; |
| | | |
| | | /** |
| | | * 返回树形结构 |
| | | */ |
| | | List<RoleTreeBO> roleTreeBOS; |
| | | } |
| | |
| | | import cn.huge.base.common.utils.IdUtils; |
| | | import cn.huge.module.client.api.impl.UtilsClientImpl; |
| | | import cn.huge.module.ctrole.dao.mapper.CtRoleMapper; |
| | | import cn.huge.module.ctrole.domain.bo.CtRoleBO; |
| | | import cn.huge.module.ctrole.domain.po.CtRole; |
| | | import cn.huge.module.ctuser.domain.bo.RoleTreeBO; |
| | | import cn.huge.module.ctuser.service.CtUserService; |
| | | import cn.huge.module.cust.dto.CtUserDTO; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | @Autowired |
| | | private CtUserService ctUserService; |
| | | |
| | | @Autowired |
| | | private CtRolefunService ctRolefunService; |
| | | |
| | | /** |
| | | * 更新对象 |
| | |
| | | return ctRole; |
| | | } |
| | | |
| | | /** |
| | | * 根据单位编号和角色编号查询 |
| | | * @param id |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | public CtRoleBO webGetById(String id, String userId){ |
| | | // 临时-演示用户赋予超级管理员角色 |
| | | // 获取当前登录用户 |
| | | CtUserDTO loginUser = ctUserService.clientGetUserAll(userId); |
| | | String acc = loginUser.getAcc(); |
| | | if ("yanstjy".equals(acc) || "yansjdb".equals(acc)){ |
| | | id = "2303191513151003"; |
| | | } |
| | | CtRole ctRole = this.getById(id); |
| | | CtRoleBO bo = new CtRoleBO(); |
| | | BeanUtils.copyProperties(ctRole,bo); |
| | | //查询角色权限 |
| | | List<RoleTreeBO> roleTrees = ctRolefunService.getRolefunTree(ctRole.getId()); |
| | | bo.setRoleTreeBOS(roleTrees); |
| | | return bo; |
| | | } |
| | | } |
| | |
| | | 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.constant.BaseConsts; |
| | | import cn.huge.module.ctrole.dao.mapper.CtRolefunMapper; |
| | | import cn.huge.module.ctrole.domain.po.CtRolefun; |
| | | import cn.huge.module.ctuser.domain.bo.RoleTreeBO; |
| | | import cn.huge.module.cust.constant.UserBaseConsts; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.google.common.collect.Maps; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询角色树形结构 |
| | | * @param roleId 角色编号 |
| | | * @return List<RoleTreeBO> 树形结构 |
| | | */ |
| | | public List<RoleTreeBO> getRolefunTree(String roleId){ |
| | | //查询所有的关系 |
| | | Map<String, Object> terms = Maps.newHashMap(); |
| | | terms.put("roleId",roleId); |
| | | List<CtRolefun> rolefuns = mapper.listTerms(terms); |
| | | List<CtRolefun> list = new ArrayList<>(); |
| | | List<RoleTreeBO> treeBOS = new ArrayList<>(); |
| | | if (rolefuns.size() > 0) { |
| | | //第一级菜单集合 |
| | | for (int i = 0; i < rolefuns.size(); i++) { |
| | | // 一级菜单没有parentId |
| | | if (BaseConsts.ROOT.equals(rolefuns.get(i).getParentId())) { |
| | | list.add(rolefuns.get(i)); |
| | | } |
| | | } |
| | | // 为一级菜单设置子菜单,getChild是递归调用的 |
| | | for (CtRolefun rolefun : list) { |
| | | RoleTreeBO treeBO = new RoleTreeBO(); |
| | | treeBO.setLabel(rolefun.getPowerName()); |
| | | treeBO.setValue(rolefun.getPowerId()); |
| | | treeBO.setLabelType(rolefun.getPowerType()); |
| | | treeBO.setAppClient(rolefun.getAppClient()); |
| | | treeBO.setPowerTag(rolefun.getPowerTag()); |
| | | treeBO.setPowerUrl(rolefun.getPowerUrl()); |
| | | treeBO.setPowerIcon(rolefun.getPowerIcon()); |
| | | treeBO.setChildren(getChild(rolefun.getPowerId(), rolefuns)); |
| | | treeBOS.add(treeBO); |
| | | } |
| | | } |
| | | return treeBOS; |
| | | } |
| | | |
| | | /** |
| | | * 递归查找子菜单 |
| | | * @param id 当前菜单id |
| | | * @param ctRolefuns 要查找的列表 |
| | | * @return List<TreeBO> 树形列表集合 |
| | | */ |
| | | private List<RoleTreeBO> getChild(String id, List<CtRolefun> ctRolefuns) { |
| | | // 子菜单 |
| | | List<RoleTreeBO> childList = new ArrayList<>(); |
| | | for (CtRolefun rolefun : ctRolefuns) { |
| | | // 遍历所有节点,将父菜单id与传过来的id比较 |
| | | if (StringUtils.isNotBlank(rolefun.getParentId())) { |
| | | if (rolefun.getParentId().equals(id)) { |
| | | RoleTreeBO roleTree = new RoleTreeBO(); |
| | | roleTree.setLabel(rolefun.getPowerName()); |
| | | roleTree.setValue(rolefun.getPowerId()); |
| | | roleTree.setLabelType(rolefun.getPowerType()); |
| | | roleTree.setAppClient(rolefun.getAppClient()); |
| | | roleTree.setPowerTag(rolefun.getPowerTag()); |
| | | roleTree.setPowerUrl(rolefun.getPowerUrl()); |
| | | roleTree.setPowerIcon(rolefun.getPowerIcon()); |
| | | roleTree.setChildren(getChild(rolefun.getPowerId(), ctRolefuns)); |
| | | childList.add(roleTree); |
| | | } |
| | | } |
| | | } |
| | | return childList; |
| | | } |
| | | } |
| | |
| | | @PostMapping("/saveCtUnitList") |
| | | public Object saveCtUnitList(@RequestBody List<CtUnit> targetCtUnitList) { |
| | | try { |
| | | service.saveBatch(targetCtUnitList); |
| | | service.saveBatch(targetCtUnitList,1000); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.base.config.CurrentUser; |
| | | import cn.huge.module.constant.BaseConsts; |
| | | import cn.huge.module.ctuser.domain.po.CtAccount; |
| | | import cn.huge.module.ctuser.domain.po.CtUnit; |
| | | import cn.huge.module.ctuser.dto.CtAccountLoginDTO; |
| | | import cn.huge.module.ctuser.dto.CtCipherDTO; |
| | | import cn.huge.module.ctuser.service.CtAccountService; |
| | | import cn.huge.module.utils.JwtUtils; |
| | | 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.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.Stream; |
| | | |
| | | /** |
| | | * @title: 客户用户账号表接口api-web端-web端 |
| | |
| | | |
| | | /** |
| | | * web端-工作人员-修改密码 |
| | | * @url {ctx}/api/v1/ctAccount/changeCipher |
| | | * @url {ctx}/api/web/ctAccount/changeCipher |
| | | * @param ctCipherDTO 修改密码对象 |
| | | * @return Object |
| | | */ |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 微服务调用-数据迁移-批量新增 |
| | | * @url {ctx}/api/web/ctAccount/saveCtAccountList |
| | | * @param targetCtAccountList 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveCtAccountList") |
| | | public Object saveCtAccountList(@RequestBody List<CtAccount> targetCtAccountList) { |
| | | try { |
| | | service.saveBatch(targetCtAccountList,1000); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | log.info(e.getMessage(), e); |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | package cn.huge.module.ctuser.controller.web; |
| | | |
| | | import cn.huge.base.common.utils.IdUtils; |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.base.config.CurrentUser; |
| | | import cn.huge.module.ctuser.domain.po.CtDept; |
| | | import cn.huge.module.ctuser.domain.po.CtUser; |
| | | import cn.huge.module.ctuser.service.CtDeptService; |
| | | import cn.huge.module.ctuser.service.CtUserService; |
| | | import com.google.common.collect.Maps; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | private CtDeptService service; |
| | | |
| | | @Autowired |
| | | private CtUserService ctUserService; |
| | | |
| | | /** |
| | | * 获取请求URL参数 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @url {ctx}/api/web/ctDept/saveCtDept |
| | | * @param ctDept 实体对象 |
| | | * @return Object |
| | | */ |
| | | * 新增部门或更新部门 |
| | | * @url {ctx}/api/v1/ctDept/saveCtDept |
| | | * @param ctDept 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveCtDept") |
| | | public Object saveCtDept(@RequestBody CtDept ctDept) { |
| | | public Object saveCtDept(@RequestBody CtDept ctDept, @CurrentUser String userId) { |
| | | try { |
| | | service.saveCtDept(ctDept); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | //判断name是否存在 |
| | | if (IdUtils.checkNewId(ctDept.getId())) { |
| | | Map<String, Object> terms = getParameter(); |
| | | terms.put("name", ctDept.getName()); |
| | | terms.put("unitId", ctDept.getUnitId()); |
| | | long ctDeptCount = service.countTerms(terms); |
| | | if (ctDeptCount > 0) { |
| | | return ReturnFailUtils.getRepInfo("名称已存在,请重新设定"); |
| | | } |
| | | } |
| | | service.saveCtDept(ctDept, userId); |
| | | return ReturnSucUtils.getRepInfo("保存成功", null); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | log.error("Controller接口[CtDeptController.saveCtDept]请求异常:"+e, e); |
| | | return ReturnFailUtils.getRepInfo("保存失败", null); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据主键编号删除部门 |
| | | * @url {ctx}/api/v1/ctDept/removeByIds |
| | | * @param ids 主键编号 |
| | | * @return Object |
| | | * @throws Exception |
| | | */ |
| | | @GetMapping("/removeByIds") |
| | | public Object removeByIds(@RequestParam(value = "ids") String ids) { |
| | | try { |
| | | service.removeById(ids); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | log.error("Controller接口[CtDeptController.removeByIds]请求异常:"+e, e); |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | } |
| | |
| | | return ReturnFailUtils.getRepInfo( "查询失败", null); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据主键编号删除单位 |
| | | * @url {ctx}/api/v1/ctUnit/removeByIds |
| | | * @param ids 主键编号 |
| | | * @return Object |
| | | * @throws Exception |
| | | */ |
| | | @GetMapping("/removeByIds") |
| | | public Object removeByIds(@RequestParam(value = "ids") String ids) { |
| | | try { |
| | | service.removeById(ids); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | log.error("Controller接口[CtUnitController.removeByIds]请求异常:"+e, e); |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | } |
| | |
| | | package cn.huge.module.ctuser.controller.web; |
| | | |
| | | import cn.huge.base.common.dto.SelectTermDTO; |
| | | import cn.huge.base.common.utils.ObjectUtils; |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.base.common.utils.SelectTermUtils; |
| | | import cn.huge.base.config.CurrentUser; |
| | | import cn.huge.module.ctrole.domain.po.CtRole; |
| | | import cn.huge.module.ctrole.service.CtRoleService; |
| | | import cn.huge.module.ctuser.domain.po.*; |
| | | import cn.huge.module.ctuser.dto.CtUserSaveDTO; |
| | | import cn.huge.module.ctuser.service.*; |
| | | import cn.huge.module.cust.constant.RoleBaseEnum; |
| | | import cn.huge.module.cust.constant.UserBaseConsts; |
| | | import cn.huge.module.cust.dto.CtUserDTO; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | 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.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.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.Stream; |
| | | |
| | | /** |
| | | * @title: 客户用户表接口api-web端 |
| | |
| | | if (StringUtils.isNotBlank(dispStatus)){ |
| | | terms.put("dispStatus", dispStatus); |
| | | } |
| | | // 删除状态,0:已删除(默认),1:未删除 |
| | | // 删除状态,0:未删除,1:已删除 |
| | | String deleteStatus = request.getParameter("deleteStatus"); |
| | | if (StringUtils.isNotBlank(deleteStatus)){ |
| | | terms.put("deleteStatus", deleteStatus); |
| | |
| | | terms.put("updateStart", updateStart); |
| | | terms.put("updateEnd", updateEnd); |
| | | } |
| | | // 平台账号 |
| | | String acc = request.getParameter("acc"); |
| | | if (StringUtils.isNotBlank(acc)){ |
| | | terms.put("acc", acc); |
| | | } |
| | | // 角色编码 |
| | | String roleCode = request.getParameter("roleCode"); |
| | | if (StringUtils.isNotBlank(roleCode)){ |
| | | terms.put("roleCode", roleCode); |
| | | } |
| | | |
| | | return terms; |
| | | } |
| | | |
| | |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 更新人员状态信息 |
| | | * @url {ctx}/api/web/ctUser/updateCtUserStatus |
| | | * @param id 编号 status :用户状态,1:在职(默认),2:停用,99:离职 |
| | | * @return Object |
| | | * @throws Exception |
| | | */ |
| | | @GetMapping("/updateCtUserStatus") |
| | | public Object updateCtUserStatus(@RequestParam(value = "status") String status, @RequestParam(value = "id") String id) { |
| | | try { |
| | | // 修改状态 |
| | | UpdateWrapper<CtUser> ctUserUpdateWrapper = new UpdateWrapper(); |
| | | ctUserUpdateWrapper.eq("id", id); |
| | | ctUserUpdateWrapper.set("status", status).set("update_time", new Date()); |
| | | service.update(ctUserUpdateWrapper); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据主键单个/批量删除 |
| | | * @url {ctx}/api/v1/ctUser/removeByIds |
| | | * @return Object |
| | | * @throws Exception |
| | | */ |
| | | @PostMapping("/removeByIds") |
| | | public Object removeByIds(@RequestBody List<String> data) { |
| | | try { |
| | | service.removeListId(data); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | log.error("Controller接口[CtUserController.removeByIds]请求异常:"+e, e); |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | } |
| | |
| | | */ |
| | | List<CtUnit> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | void updateTerms(@Param("entity") CtUnit entity); |
| | | |
| | | } |
| | |
| | | and limit_time = #{terms.limitTime} |
| | | </if> |
| | | <if test="terms.deleteStatus = null and terms.deleteStatus =''"> |
| | | and delete_status = '1' |
| | | and delete_status = '0' |
| | | </if> |
| | | <if test="terms.deleteStatus != null and terms.deleteStatus !=''"> |
| | | and delete_status = #{terms.deleteStatus} |
| | |
| | | and can_field_name = #{terms.canFieldName} |
| | | </if> |
| | | <if test="terms.deleteStatus = null and terms.deleteStatus =''"> |
| | | and delete_status = '1' |
| | | and delete_status = '0' |
| | | </if> |
| | | <if test="terms.deleteStatus != null and terms.deleteStatus !=''"> |
| | | and delete_status = #{terms.deleteStatus} |
| | |
| | | and unit_id = #{terms.unitId} |
| | | </if> |
| | | <if test="terms.deleteStatus = null and terms.deleteStatus =''"> |
| | | and delete_status = '1' |
| | | and delete_status = '0' |
| | | </if> |
| | | <if test="terms.deleteStatus != null and terms.deleteStatus !=''"> |
| | | and delete_status = #{terms.deleteStatus} |
| | |
| | | and disp_status = #{terms.dispStatus} |
| | | </if> |
| | | <if test="terms.deleteStatus = null and terms.deleteStatus =''"> |
| | | and delete_status = '1' |
| | | and delete_status = '0' |
| | | </if> |
| | | <if test="terms.deleteStatus != null and terms.deleteStatus !=''"> |
| | | and delete_status = #{terms.deleteStatus} |
| | |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | |
| | | <!-- 更新对象 --> |
| | | <update id="updateTerms"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | WHERE |
| | | id = #{entity.id} |
| | | </update> |
| | | </mapper> |
| | |
| | | and disp_status = #{terms.dispStatus} |
| | | </if> |
| | | <if test="terms.deleteStatus = null and terms.deleteStatus =''"> |
| | | and delete_status = '1' |
| | | and delete_status = '0' |
| | | </if> |
| | | <if test="terms.deleteStatus != null and terms.deleteStatus !=''"> |
| | | and delete_status = #{terms.deleteStatus} |
| | |
| | | and t1.status = #{terms.status} |
| | | </if> |
| | | <if test="terms.deleteStatus = null and terms.deleteStatus =''"> |
| | | and t1.delete_status = '1' |
| | | and t1.delete_status = '0' |
| | | </if> |
| | | <if test="terms.deleteStatus != null and terms.deleteStatus !=''"> |
| | | and t1.delete_status = #{terms.deleteStatus} |
| | |
| | | and t1.status = #{terms.status} |
| | | </if> |
| | | <if test="terms.deleteStatus = null and terms.deleteStatus =''"> |
| | | and t1.delete_status = '1' |
| | | and t1.delete_status = '0' |
| | | </if> |
| | | <if test="terms.deleteStatus != null and terms.deleteStatus !=''"> |
| | | and t1.delete_status = #{terms.deleteStatus} |
| New file |
| | |
| | | package cn.huge.module.ctuser.domain.bo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: 树形结构类 |
| | | * @description: 树形结构类 |
| | | * @company: hugeinfo |
| | | * @author: chenx |
| | | * @time: 2022-03-05 14:16:28 |
| | | * @version: 1.0.0 |
| | | * @see RoleTreeBO |
| | | */ |
| | | @Data |
| | | public class RoleTreeBO { |
| | | |
| | | /** |
| | | * 树形名称 |
| | | */ |
| | | private String label; |
| | | |
| | | /** |
| | | * 树形值 |
| | | */ |
| | | private String value; |
| | | |
| | | /** |
| | | * 权限类型,0:应用,1:模块,2:菜单,3:功能 |
| | | */ |
| | | private Integer labelType; |
| | | |
| | | /** |
| | | * 应用客户端,1:pc端(默认),2:当事人小程序,3:调解员小程序 |
| | | */ |
| | | private Integer appClient; |
| | | |
| | | /** |
| | | * 权限标签 |
| | | */ |
| | | private String powerTag; |
| | | |
| | | /** |
| | | * 权限url |
| | | */ |
| | | private String powerUrl; |
| | | |
| | | /** |
| | | * 权限图标 |
| | | */ |
| | | private String powerIcon; |
| | | |
| | | /** |
| | | * 子集 |
| | | */ |
| | | private List<RoleTreeBO> children; |
| | | } |
| | |
| | | @TableField(exist = false) |
| | | private List<CtDept> children; |
| | | |
| | | /** |
| | | * 子级部门编号 |
| | | */ |
| | | @TableField(exist = false) |
| | | private String deptId; |
| | | |
| | | } |
| | |
| | | private Integer dispStatus; |
| | | |
| | | /** |
| | | * 删除状态,0:已删除(默认),1:未删除 |
| | | * 删除状态,0:未删除,1:已删除 |
| | | */ |
| | | @TableLogic |
| | | @TableField(value = "delete_status") |
| | |
| | | */ |
| | | public ReturnBO webChangeCipher(String userId, CtCipherDTO ctCipherDTO){ |
| | | try{ |
| | | CtAccount ctAccount = this.getByAccAndType(userId, UserBaseConsts.ACC_TYPE_1); |
| | | CtUser loginUser = ctUserService.getById(userId); |
| | | CtAccount ctAccount = this.getByAccAndType(loginUser.getAcc(), UserBaseConsts.ACC_TYPE_1); |
| | | // QueryWrapper<CtAccount> ctAccountQueryWrapper = new QueryWrapper<>(); |
| | | // ctAccountQueryWrapper.eq("user_id", loginUser.getId()). |
| | | // eq("acc_type", UserBaseConsts.ACC_TYPE_1); |
| | | // CtAccount ctAccount =mapper.selectOne(ctAccountQueryWrapper); |
| | | if (ObjectUtils.isEmpty(ctAccount)){ |
| | | return ReturnFailUtils.getRepInfo("输入账号或密码不正确,请确认后重试!"); |
| | | } |
| | |
| | | import cn.huge.base.common.exception.ServiceException; |
| | | import cn.huge.base.common.utils.DateUtils; |
| | | import cn.huge.base.common.utils.IdUtils; |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.module.client.api.impl.UtilsClientImpl; |
| | | import cn.huge.module.constant.BaseConsts; |
| | | import cn.huge.module.ctuser.dao.mapper.CtDeptMapper; |
| | | import cn.huge.module.ctuser.domain.po.CtDept; |
| | | import cn.huge.module.ctuser.domain.po.CtUser; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | @Autowired |
| | | private CtUserService ctUserService; |
| | | |
| | | /** |
| | | * 更新对象 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @param ctDept 实体对象 |
| | | */ |
| | | public void saveCtDept(CtDept ctDept){ |
| | | try{ |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 判断是否新增 |
| | | if (IdUtils.checkNewId(ctDept.getId())){ |
| | | ctDept.setId(utilsClient.getNewTimeId()); |
| | | ctDept.setCreateTime(nowDate); |
| | | } |
| | | ctDept.setUpdateTime(nowDate); |
| | | this.saveOrUpdate(ctDept); |
| | | }catch (Exception e){ |
| | | log.error("[CtDeptService.saveCtDept]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CtDeptService.saveCtDept", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 创建某一级部门下树形结构 |
| | | * @param ctDeptList 所有部门集合 |
| | | * @param firstId 某一级组织编号 |
| | |
| | | } |
| | | childList.add(currentUnit); |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象部门 |
| | | * @param ctDept 实体对象 |
| | | */ |
| | | public void saveCtDept(CtDept ctDept, String userId){ |
| | | try{ |
| | | // 获取当前登录用户 |
| | | CtUser loginCtUser = ctUserService.getById(userId); |
| | | |
| | | // 保存新增更新组织 |
| | | ctDept.setCustId(loginCtUser.getCustId()); |
| | | |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 判断是否新增 |
| | | if (IdUtils.checkNewId(ctDept.getId())){ |
| | | ctDept.setId(utilsClient.getNewTimeId()); |
| | | ctDept.setCreateTime(nowDate); |
| | | // 新增上级部门 |
| | | if (StringUtils.isNotEmpty(ctDept.getDeptId())){ |
| | | // 更新子级部门的父级编号为当前新增部门的编号 |
| | | CtDept childCtDept = mapper.selectById(ctDept.getDeptId()); |
| | | childCtDept.setParentId(ctDept.getId()); |
| | | mapper.updateById(childCtDept); |
| | | }else{ |
| | | // 新增下级部门,如果没有指定上级编号,则默认为根级 |
| | | if (StringUtils.isBlank(ctDept.getParentId())) { |
| | | ctDept.setParentId(BaseConsts.ROOT); |
| | | } |
| | | } |
| | | } |
| | | ctDept.setUpdateTime(nowDate); |
| | | ctDept.setDeleteStatus(BaseConsts.DELETE_STATUS_0); |
| | | // 部门下成员 |
| | | QueryWrapper<CtUser> ctUserQueryWrapper = new QueryWrapper<>(); |
| | | ctUserQueryWrapper.eq("dept_id", ctDept.getId()); |
| | | List<CtUser> matchUsers = ctUserService.list(ctUserQueryWrapper); |
| | | for (CtUser ctUser : matchUsers){ |
| | | ctUser.setDeptId(null); |
| | | ctUser.setDeptName(null); |
| | | ctUserService.saveOrUpdate(ctUser); |
| | | } |
| | | List<CtUser> ctUsers = ctDept.getMatchUsers(); |
| | | for (CtUser ctUser : ctUsers){ |
| | | CtUser ctUser1 = ctUserService.getById(ctUser.getId()); |
| | | ctUser1.setDeptId(ctDept.getId()); |
| | | ctUser1.setDeptName(ctDept.getName()); |
| | | ctUserService.saveOrUpdate(ctUser1); |
| | | } |
| | | this.saveOrUpdate(ctDept); |
| | | }catch (Exception e){ |
| | | log.error("service方法[CtDeptService.saveCtDept]调用异常:"+e, e); |
| | | throw new ServiceException("CtDeptService.saveCtDept", e); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | return ctUnit; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * |
| | | * @param ctUnit 对象 |
| | | */ |
| | | public void updateTerms(CtUnit ctUnit) { |
| | | mapper.updateTerms(ctUnit); |
| | | } |
| | | } |
| | |
| | | import cn.huge.module.cust.dto.CtUserDTO; |
| | | import cn.huge.module.redis.constant.RedisKeyConsts; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.google.common.collect.Maps; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.DigestUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.Stream; |
| | | |
| | | /** |
| | | * @title: 客户用户表业务逻辑处理 |
| | |
| | | if (IdUtils.checkNewId(ctUser.getId())) { |
| | | ctUser.setId(utilsClient.getNewTimeId()); |
| | | ctUser.setCreateTime(nowDate); |
| | | ctUser.setDeleteStatus(BaseConsts.DELETE_STATUS_1); |
| | | ctUser.setDeleteStatus(BaseConsts.DELETE_STATUS_0); |
| | | ctUser.setJoinWay(UserBaseConsts.JOIN_WAY_1); |
| | | ctUser.setRealStatus(UserBaseConsts.REAL_STATUS_0); |
| | | ctUser.setStatus(UserBaseConsts.USER_STATUS_1); |
| | |
| | | ctAccount.setAcc(ctUser.getAcc()); |
| | | ctAccount.setCipher(DigestUtils.md5DigestAsHex(ctUserSaveDTO.getCipher().getBytes())); |
| | | ctAccount.setCipherOpen(ctUserSaveDTO.getCipher()); |
| | | ctAccount.setDeleteStatus(BaseConsts.DELETE_STATUS_1); |
| | | ctAccount.setDeleteStatus(BaseConsts.DELETE_STATUS_0); |
| | | ctAccount.setCreateTime(nowDate); |
| | | ctAccount.setCipherTime(nowDate); |
| | | ctAccount.setUpdateTime(nowDate); |
| | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param data 批量id对象 |
| | | */ |
| | | public void removeListId(List<String> data) { |
| | | for (String id : data) { |
| | | // 查询人员信息 |
| | | CtUser ctUser = this.getById(id); |
| | | // 删除人员 |
| | | this.removeById(id); |
| | | // 删除账号 |
| | | UpdateWrapper<CtAccount> ctAccountUpdateWrapper = new UpdateWrapper(); |
| | | ctAccountUpdateWrapper.eq("user_id", ctUser.getId()); |
| | | ctAccountService.remove(ctAccountUpdateWrapper); |
| | | // 删除人员岗位 |
| | | UpdateWrapper<CtUsepost> ctUsepostUpdateWrapper = new UpdateWrapper(); |
| | | ctUsepostUpdateWrapper.eq("user_id", ctUser.getId()); |
| | | ctUsepostService.remove(ctUsepostUpdateWrapper); |
| | | // 删除人员角色 |
| | | UpdateWrapper<CtUserole> ctUseroleUpdateWrapper = new UpdateWrapper(); |
| | | ctUseroleUpdateWrapper.eq("user_id", ctUser.getId()); |
| | | ctUseroleService.remove(ctUseroleUpdateWrapper); |
| | | //更新部门和组织的调解专长和范围 |
| | | this.updateField("unit", ctUser.getUnitId()); |
| | | this.updateField("dept", ctUser.getDeptId()); |
| | | } |
| | | } |
| | | |
| | | private void updateField(String tag, String targetId){ |
| | | QueryWrapper query = new QueryWrapper(); |
| | | if("unit".equals(tag)){ |
| | | query.eq("unit_id", targetId); |
| | | }else if("dept".equals(tag)){ |
| | | query.eq("dept_id", targetId); |
| | | } |
| | | List<CtUser> ctUser1 = mapper.selectList(query); |
| | | Set<String> setGoodField = new HashSet<>(); |
| | | Set<String> setGoodFieldName = new HashSet<>(); |
| | | Set<String> setCanField = new HashSet<>(); |
| | | Set<String> setCanFieldName = new HashSet<>(); |
| | | String goodField = new String(); |
| | | String goodFieldName = new String(); |
| | | String canField = new String(); |
| | | String canFieldName = new String(); |
| | | if(CollectionUtils.isNotEmpty(ctUser1)){ |
| | | for(CtUser ctUsers1: ctUser1){ |
| | | if (StringUtils.isNotEmpty(ctUsers1.getGoodField())) { |
| | | setGoodField.addAll(Stream.of(ctUsers1.getGoodField().split(",")).collect(Collectors.toSet())); |
| | | setGoodFieldName.addAll(Stream.of(ctUsers1.getGoodFieldName().split(",")).collect(Collectors.toSet())); |
| | | } |
| | | if (StringUtils.isNotEmpty(ctUsers1.getCanField())) { |
| | | setCanField.addAll(Stream.of(ctUsers1.getCanField().split(",")).collect(Collectors.toSet())); |
| | | setCanFieldName.addAll(Stream.of(ctUsers1.getCanFieldName().split(",")).collect(Collectors.toSet())); |
| | | } |
| | | } |
| | | goodField = String.join(",", setGoodField); |
| | | goodFieldName = String.join(",", setGoodFieldName); |
| | | canField = String.join(",", setCanField); |
| | | canFieldName = String.join(",", setCanFieldName); |
| | | } |
| | | if("unit".equals(tag)){ |
| | | CtUnit ctUnit = new CtUnit(); |
| | | ctUnit.setId(targetId); |
| | | ctUnit.setGoodField(goodField); |
| | | ctUnit.setGoodFieldName(goodFieldName); |
| | | ctUnit.setCanField(canField); |
| | | ctUnit.setCanFieldName(canFieldName); |
| | | ctUnit.setUpdateTime(DateUtils.getNowDate()); |
| | | ctUnitService.updateTerms(ctUnit); |
| | | }else if("dept".equals(tag)){ |
| | | CtDept ctDept = new CtDept(); |
| | | ctDept.setId(targetId); |
| | | ctDept.setGoodField(goodField); |
| | | ctDept.setGoodFieldName(goodFieldName); |
| | | ctDept.setCanField(canField); |
| | | ctDept.setCanFieldName(canFieldName); |
| | | ctDept.setUpdateTime(DateUtils.getNowDate()); |
| | | ctDeptService.updateCtDept(ctDept); |
| | | } |
| | | } |
| | | } |
| | |
| | | and limit_time = #{terms.limitTime} |
| | | </if> |
| | | <if test="terms.deleteStatus = null and terms.deleteStatus =''"> |
| | | and delete_status = '1' |
| | | and delete_status = '0' |
| | | </if> |
| | | <if test="terms.deleteStatus != null and terms.deleteStatus !=''"> |
| | | and delete_status = #{terms.deleteStatus} |
| | |
| | | and follow_case_type = #{terms.followCaseType} |
| | | </if> |
| | | <if test="terms.deleteStatus = null and terms.deleteStatus =''"> |
| | | and delete_status = '1' |
| | | and delete_status = '0' |
| | | </if> |
| | | <if test="terms.deleteStatus != null and terms.deleteStatus !=''"> |
| | | and delete_status = #{terms.deleteStatus} |
| | |
| | | import cn.binarywang.wx.miniapp.bean.WxMaMessage; |
| | | import cn.binarywang.wx.miniapp.config.WxMaInMemoryConfig; |
| | | import cn.binarywang.wx.miniapp.message.WxMaMessageRouter; |
| | | import cn.huge.module.oper.dto.SeCustWechatDTO; |
| | | import cn.huge.module.wechat.miniapp.handler.*; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | // this.refreshRouter(); |
| | | // } |
| | | |
| | | public void createConfig(SeCustWechatDTO seCustWechatDTO) { |
| | | final WxMaInMemoryConfig config = new WxMaInMemoryConfig(); |
| | | config.setAppid(seCustWechatDTO.getAppid());// 设置微信公众号的appid |
| | | config.setSecret(seCustWechatDTO.getSecret());// 设置微信公众号的app corpSecret |
| | | config.setToken(seCustWechatDTO.getToken());// 设置微信公众号的token |
| | | config.setAesKey(seCustWechatDTO.getAeskey());// 设置消息加解密密钥 |
| | | super.setWxMaConfig(config); |
| | | |
| | | this.refreshRouter(); |
| | | } |
| | | // public void createConfig(SeCustWechatDTO seCustWechatDTO) { |
| | | // final WxMaInMemoryConfig config = new WxMaInMemoryConfig(); |
| | | // config.setAppid(seCustWechatDTO.getAppid());// 设置微信公众号的appid |
| | | // config.setSecret(seCustWechatDTO.getSecret());// 设置微信公众号的app corpSecret |
| | | // config.setToken(seCustWechatDTO.getToken());// 设置微信公众号的token |
| | | // config.setAesKey(seCustWechatDTO.getAeskey());// 设置消息加解密密钥 |
| | | // super.setWxMaConfig(config); |
| | | // |
| | | // this.refreshRouter(); |
| | | // } |
| | | |
| | | private void refreshRouter() { |
| | | final WxMaMessageRouter newRouter = new WxMaMessageRouter(this); |
| | |
| | | </appender> |
| | | |
| | | <!-- 设置根日志级别,如果日志级别低于设置的级别,则该日志不会被记录。如果日志级别高于设置的级别,那么这条日志将会被记录 --> |
| | | <root level="INFO"> |
| | | <root level="DEBUG"> |
| | | <appender-ref ref="CONSOLE" /> |
| | | </root> |
| | | |
| New file |
| | |
| | | package cn.huge.module.cases.controller.web; |
| | | |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.module.cases.domain.po.CaseAgent; |
| | | import cn.huge.module.cases.service.CaseAgentService; |
| | | 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: wangwh |
| | | * @time: 2024-08-27 10:48:17 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/web/caseAgent") |
| | | public class CaseAgentWebController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private CaseAgentService 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); |
| | | } |
| | | // 公众用户编号 |
| | | String partyUserId = request.getParameter("partyUserId"); |
| | | if (StringUtils.isNotBlank(partyUserId)){ |
| | | terms.put("partyUserId", partyUserId); |
| | | } |
| | | // 代理人类型 |
| | | String perClass = request.getParameter("perClass"); |
| | | if (StringUtils.isNotBlank(perClass)){ |
| | | terms.put("perClass", perClass); |
| | | } |
| | | // 代理人类型名称 |
| | | String perClassName = request.getParameter("perClassName"); |
| | | if (StringUtils.isNotBlank(perClassName)){ |
| | | terms.put("perClassName", perClassName); |
| | | } |
| | | // 姓名 |
| | | String trueName = request.getParameter("trueName"); |
| | | if (StringUtils.isNotBlank(trueName)){ |
| | | terms.put("trueName", trueName); |
| | | } |
| | | // 联系方式 |
| | | String mobile = request.getParameter("mobile"); |
| | | if (StringUtils.isNotBlank(mobile)){ |
| | | terms.put("mobile", mobile); |
| | | } |
| | | // 证件类型 |
| | | String certiType = request.getParameter("certiType"); |
| | | if (StringUtils.isNotBlank(certiType)){ |
| | | terms.put("certiType", certiType); |
| | | } |
| | | // 证件类型名称 |
| | | String certiTypeName = request.getParameter("certiTypeName"); |
| | | if (StringUtils.isNotBlank(certiTypeName)){ |
| | | terms.put("certiTypeName", certiTypeName); |
| | | } |
| | | // 证件号码 |
| | | String certiNo = request.getParameter("certiNo"); |
| | | if (StringUtils.isNotBlank(certiNo)){ |
| | | terms.put("certiNo", certiNo); |
| | | } |
| | | // 联系地址省 |
| | | String prov = request.getParameter("prov"); |
| | | if (StringUtils.isNotBlank(prov)){ |
| | | terms.put("prov", prov); |
| | | } |
| | | // 联系地址省名称 |
| | | String provName = request.getParameter("provName"); |
| | | if (StringUtils.isNotBlank(provName)){ |
| | | terms.put("provName", provName); |
| | | } |
| | | // 联系地址市 |
| | | String city = request.getParameter("city"); |
| | | if (StringUtils.isNotBlank(city)){ |
| | | terms.put("city", city); |
| | | } |
| | | // 联系/企业/机构地址市名称 |
| | | String cityName = request.getParameter("cityName"); |
| | | if (StringUtils.isNotBlank(cityName)){ |
| | | terms.put("cityName", cityName); |
| | | } |
| | | // 联系/企业/机构地址区 |
| | | String area = request.getParameter("area"); |
| | | if (StringUtils.isNotBlank(area)){ |
| | | terms.put("area", area); |
| | | } |
| | | // 联系/企业/机构地址区名称 |
| | | String areaName = request.getParameter("areaName"); |
| | | if (StringUtils.isNotBlank(areaName)){ |
| | | terms.put("areaName", areaName); |
| | | } |
| | | // 联地址街道 |
| | | String road = request.getParameter("road"); |
| | | if (StringUtils.isNotBlank(road)){ |
| | | terms.put("road", road); |
| | | } |
| | | // 联系地址街道名称 |
| | | String roadName = request.getParameter("roadName"); |
| | | if (StringUtils.isNotBlank(roadName)){ |
| | | terms.put("roadName", roadName); |
| | | } |
| | | // 联系地址社区 |
| | | String village = request.getParameter("village"); |
| | | if (StringUtils.isNotBlank(village)){ |
| | | terms.put("village", village); |
| | | } |
| | | // 联系地址社区名称 |
| | | String villageName = request.getParameter("villageName"); |
| | | if (StringUtils.isNotBlank(villageName)){ |
| | | terms.put("villageName", villageName); |
| | | } |
| | | // 联系地址详细地址 |
| | | String addr = request.getParameter("addr"); |
| | | if (StringUtils.isNotBlank(addr)){ |
| | | terms.put("addr", addr); |
| | | } |
| | | // 户籍地址省 |
| | | String placeProv = request.getParameter("placeProv"); |
| | | if (StringUtils.isNotBlank(placeProv)){ |
| | | terms.put("placeProv", placeProv); |
| | | } |
| | | // 户籍地址省名称 |
| | | String placeProvName = request.getParameter("placeProvName"); |
| | | if (StringUtils.isNotBlank(placeProvName)){ |
| | | terms.put("placeProvName", placeProvName); |
| | | } |
| | | // 户籍地址市 |
| | | String placeCity = request.getParameter("placeCity"); |
| | | if (StringUtils.isNotBlank(placeCity)){ |
| | | terms.put("placeCity", placeCity); |
| | | } |
| | | // 户籍地址市名称 |
| | | String placeCityName = request.getParameter("placeCityName"); |
| | | if (StringUtils.isNotBlank(placeCityName)){ |
| | | terms.put("placeCityName", placeCityName); |
| | | } |
| | | // 户籍地址区 |
| | | String placeArea = request.getParameter("placeArea"); |
| | | if (StringUtils.isNotBlank(placeArea)){ |
| | | terms.put("placeArea", placeArea); |
| | | } |
| | | // 户籍地址区名称 |
| | | String placeAreaName = request.getParameter("placeAreaName"); |
| | | if (StringUtils.isNotBlank(placeAreaName)){ |
| | | terms.put("placeAreaName", placeAreaName); |
| | | } |
| | | // 户籍地址街道 |
| | | String placeRoad = request.getParameter("placeRoad"); |
| | | if (StringUtils.isNotBlank(placeRoad)){ |
| | | terms.put("placeRoad", placeRoad); |
| | | } |
| | | // 户籍地址街道名称 |
| | | String placeRoadName = request.getParameter("placeRoadName"); |
| | | if (StringUtils.isNotBlank(placeRoadName)){ |
| | | terms.put("placeRoadName", placeRoadName); |
| | | } |
| | | // 户籍地址社区 |
| | | String placeVillage = request.getParameter("placeVillage"); |
| | | if (StringUtils.isNotBlank(placeVillage)){ |
| | | terms.put("placeVillage", placeVillage); |
| | | } |
| | | // 户籍地址社区名称 |
| | | String placeVillageName = request.getParameter("placeVillageName"); |
| | | if (StringUtils.isNotBlank(placeVillageName)){ |
| | | terms.put("placeVillageName", placeVillageName); |
| | | } |
| | | // 户籍地址详细地址 |
| | | String placeAddr = request.getParameter("placeAddr"); |
| | | if (StringUtils.isNotBlank(placeAddr)){ |
| | | terms.put("placeAddr", placeAddr); |
| | | } |
| | | // 工作单位 |
| | | String workUnit = request.getParameter("workUnit"); |
| | | if (StringUtils.isNotBlank(workUnit)){ |
| | | terms.put("workUnit", workUnit); |
| | | } |
| | | // 民族 |
| | | String nation = request.getParameter("nation"); |
| | | if (StringUtils.isNotBlank(nation)){ |
| | | terms.put("nation", nation); |
| | | } |
| | | // 民族名称 |
| | | String nationName = request.getParameter("nationName"); |
| | | if (StringUtils.isNotBlank(nationName)){ |
| | | terms.put("nationName", nationName); |
| | | } |
| | | // 性别 |
| | | String sex = request.getParameter("sex"); |
| | | if (StringUtils.isNotBlank(sex)){ |
| | | terms.put("sex", sex); |
| | | } |
| | | // 性别名称 |
| | | String sexName = request.getParameter("sexName"); |
| | | if (StringUtils.isNotBlank(sexName)){ |
| | | terms.put("sexName", sexName); |
| | | } |
| | | // 是否有个人极端倾向,0:否,1:是 |
| | | String extreme = request.getParameter("extreme"); |
| | | if (StringUtils.isNotBlank(extreme)){ |
| | | terms.put("extreme", extreme); |
| | | } |
| | | // 委托关系 |
| | | String agentRelate = request.getParameter("agentRelate"); |
| | | if (StringUtils.isNotBlank(agentRelate)){ |
| | | terms.put("agentRelate", agentRelate); |
| | | } |
| | | // 委托关系名称 |
| | | String agentRelateName = request.getParameter("agentRelateName"); |
| | | if (StringUtils.isNotBlank(agentRelateName)){ |
| | | terms.put("agentRelateName", agentRelateName); |
| | | } |
| | | // 委托类型 |
| | | String agentType = request.getParameter("agentType"); |
| | | if (StringUtils.isNotBlank(agentType)){ |
| | | terms.put("agentType", agentType); |
| | | } |
| | | // 委托类型名称 |
| | | String agentTypeName = request.getParameter("agentTypeName"); |
| | | if (StringUtils.isNotBlank(agentTypeName)){ |
| | | terms.put("agentTypeName", agentTypeName); |
| | | } |
| | | // 代理当事人编号,多个用,隔开 |
| | | String personId = request.getParameter("personId"); |
| | | if (StringUtils.isNotBlank(personId)){ |
| | | terms.put("personId", personId); |
| | | } |
| | | // 头像 |
| | | String avatar = request.getParameter("avatar"); |
| | | if (StringUtils.isNotBlank(avatar)){ |
| | | terms.put("avatar", avatar); |
| | | } |
| | | // 职业 |
| | | String job = request.getParameter("job"); |
| | | if (StringUtils.isNotBlank(job)){ |
| | | terms.put("job", job); |
| | | } |
| | | // 职业名称 |
| | | String jobName = request.getParameter("jobName"); |
| | | if (StringUtils.isNotBlank(jobName)){ |
| | | terms.put("jobName", jobName); |
| | | } |
| | | // 出生日期 |
| | | String birthday = request.getParameter("birthday"); |
| | | if (StringUtils.isNotBlank(birthday)){ |
| | | terms.put("birthday", birthday); |
| | | } |
| | | // 年龄 |
| | | String age = request.getParameter("age"); |
| | | if (StringUtils.isNotBlank(age)){ |
| | | terms.put("age", age); |
| | | } |
| | | // 有无代理人,0:无,1:有 |
| | | String agentStatus = request.getParameter("agentStatus"); |
| | | if (StringUtils.isNotBlank(agentStatus)){ |
| | | terms.put("agentStatus", agentStatus); |
| | | } |
| | | // 顾客编号 |
| | | 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/caseAgent/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/caseAgent/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<CaseAgent> caseAgentPage = service.pageQuery(pageRequest, terms); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", caseAgentPage); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/web/caseAgent/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/caseAgent/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/caseAgent/saveCaseAgent |
| | | * @param caseAgent 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveCaseAgent") |
| | | public Object saveCaseAgent(@RequestBody CaseAgent caseAgent) { |
| | | try { |
| | | service.saveCaseAgent(caseAgent); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.cases.controller.web; |
| | | |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.module.cases.domain.po.CaseInfoUnfold; |
| | | import cn.huge.module.cases.service.CaseInfoUnfoldService; |
| | | 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: wangwh |
| | | * @time: 2024-08-27 20:36:04 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/web/caseInfoUnfold") |
| | | public class CaseInfoUnfoldWebController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private CaseInfoUnfoldService 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); |
| | | } |
| | | // 实际调解组织编号 |
| | | String mediateUnitId = request.getParameter("mediateUnitId"); |
| | | if (StringUtils.isNotBlank(mediateUnitId)){ |
| | | terms.put("mediateUnitId", mediateUnitId); |
| | | } |
| | | // 实际调解组织名称 |
| | | String mediateUnitName = request.getParameter("mediateUnitName"); |
| | | if (StringUtils.isNotBlank(mediateUnitName)){ |
| | | terms.put("mediateUnitName", mediateUnitName); |
| | | } |
| | | // 实际调解部门编号 |
| | | String mediateDeptId = request.getParameter("mediateDeptId"); |
| | | if (StringUtils.isNotBlank(mediateDeptId)){ |
| | | terms.put("mediateDeptId", mediateDeptId); |
| | | } |
| | | // 实际调解部门名称 |
| | | String mediateDeptName = request.getParameter("mediateDeptName"); |
| | | if (StringUtils.isNotBlank(mediateDeptName)){ |
| | | terms.put("mediateDeptName", mediateDeptName); |
| | | } |
| | | // 实际调解员编号 |
| | | String mediatorId = request.getParameter("mediatorId"); |
| | | if (StringUtils.isNotBlank(mediatorId)){ |
| | | terms.put("mediatorId", mediatorId); |
| | | } |
| | | // 实际调解员 |
| | | String mediator = request.getParameter("mediator"); |
| | | if (StringUtils.isNotBlank(mediator)){ |
| | | terms.put("mediator", mediator); |
| | | } |
| | | // 实际调解员手机号码 |
| | | String mediatorMobile = request.getParameter("mediatorMobile"); |
| | | if (StringUtils.isNotBlank(mediatorMobile)){ |
| | | terms.put("mediatorMobile", mediatorMobile); |
| | | } |
| | | // 调解开始时间 |
| | | String mediStartTime = request.getParameter("mediStartTime"); |
| | | if (StringUtils.isNotBlank(mediStartTime)){ |
| | | terms.put("mediStartTime", mediStartTime); |
| | | } |
| | | // 调解结束时间 |
| | | String mediEndTime = request.getParameter("mediEndTime"); |
| | | if (StringUtils.isNotBlank(mediEndTime)){ |
| | | terms.put("mediEndTime", mediEndTime); |
| | | } |
| | | // 调解结果 |
| | | String mediResult = request.getParameter("mediResult"); |
| | | if (StringUtils.isNotBlank(mediResult)){ |
| | | terms.put("mediResult", mediResult); |
| | | } |
| | | // 调解结果名称 |
| | | String mediResultName = request.getParameter("mediResultName"); |
| | | if (StringUtils.isNotBlank(mediResultName)){ |
| | | terms.put("mediResultName", mediResultName); |
| | | } |
| | | // 达成协议类型 |
| | | String agreeType = request.getParameter("agreeType"); |
| | | if (StringUtils.isNotBlank(agreeType)){ |
| | | terms.put("agreeType", agreeType); |
| | | } |
| | | // 达成协议类型名称 |
| | | String agreeTypeName = request.getParameter("agreeTypeName"); |
| | | if (StringUtils.isNotBlank(agreeTypeName)){ |
| | | terms.put("agreeTypeName", agreeTypeName); |
| | | } |
| | | // 已达成协议 |
| | | String agreeContent = request.getParameter("agreeContent"); |
| | | if (StringUtils.isNotBlank(agreeContent)){ |
| | | terms.put("agreeContent", agreeContent); |
| | | } |
| | | // 结案意见 |
| | | String windupContent = request.getParameter("windupContent"); |
| | | if (StringUtils.isNotBlank(windupContent)){ |
| | | terms.put("windupContent", windupContent); |
| | | } |
| | | // 调解不成功原因 |
| | | String mediFalse = request.getParameter("mediFalse"); |
| | | if (StringUtils.isNotBlank(mediFalse)){ |
| | | terms.put("mediFalse", mediFalse); |
| | | } |
| | | // 调解不成功原因名称 |
| | | String mediFalseName = request.getParameter("mediFalseName"); |
| | | if (StringUtils.isNotBlank(mediFalseName)){ |
| | | terms.put("mediFalseName", mediFalseName); |
| | | } |
| | | // 是否转诉讼案件,0:不转诉讼,1:转诉讼 |
| | | String civilStatus = request.getParameter("civilStatus"); |
| | | if (StringUtils.isNotBlank(civilStatus)){ |
| | | terms.put("civilStatus", civilStatus); |
| | | } |
| | | // 诉讼法院编号 |
| | | String courtId = request.getParameter("courtId"); |
| | | if (StringUtils.isNotBlank(courtId)){ |
| | | terms.put("courtId", courtId); |
| | | } |
| | | // 诉讼法院名称 |
| | | String courtName = request.getParameter("courtName"); |
| | | if (StringUtils.isNotBlank(courtName)){ |
| | | terms.put("courtName", courtName); |
| | | } |
| | | // 是否申请司法确认,0:未申请,1:已申请 |
| | | String judicApply = request.getParameter("judicApply"); |
| | | if (StringUtils.isNotBlank(judicApply)){ |
| | | terms.put("judicApply", judicApply); |
| | | } |
| | | // 司法确认结果 |
| | | String judicResult = request.getParameter("judicResult"); |
| | | if (StringUtils.isNotBlank(judicResult)){ |
| | | terms.put("judicResult", judicResult); |
| | | } |
| | | // 司法确认结果名称 |
| | | String judicResultName = request.getParameter("judicResultName"); |
| | | if (StringUtils.isNotBlank(judicResultName)){ |
| | | terms.put("judicResultName", judicResultName); |
| | | } |
| | | // 是否已归档,0:未归档,1:已归档 |
| | | String fileStatus = request.getParameter("fileStatus"); |
| | | if (StringUtils.isNotBlank(fileStatus)){ |
| | | terms.put("fileStatus", fileStatus); |
| | | } |
| | | // 归档人编号 |
| | | String fileUserId = request.getParameter("fileUserId"); |
| | | if (StringUtils.isNotBlank(fileUserId)){ |
| | | terms.put("fileUserId", fileUserId); |
| | | } |
| | | // 归档人名称 |
| | | String fileUserName = request.getParameter("fileUserName"); |
| | | if (StringUtils.isNotBlank(fileUserName)){ |
| | | terms.put("fileUserName", fileUserName); |
| | | } |
| | | // 归档时间 |
| | | String fileTime = request.getParameter("fileTime"); |
| | | if (StringUtils.isNotBlank(fileTime)){ |
| | | terms.put("fileTime", fileTime); |
| | | } |
| | | // 档案年度 |
| | | String fileYear = request.getParameter("fileYear"); |
| | | if (StringUtils.isNotBlank(fileYear)){ |
| | | terms.put("fileYear", fileYear); |
| | | } |
| | | // 档案卷名 |
| | | String fileBookName = request.getParameter("fileBookName"); |
| | | if (StringUtils.isNotBlank(fileBookName)){ |
| | | terms.put("fileBookName", fileBookName); |
| | | } |
| | | // 档案卷号 |
| | | String fileBookNo = request.getParameter("fileBookNo"); |
| | | if (StringUtils.isNotBlank(fileBookNo)){ |
| | | terms.put("fileBookNo", fileBookNo); |
| | | } |
| | | // 档案编号 |
| | | String fileNo = request.getParameter("fileNo"); |
| | | if (StringUtils.isNotBlank(fileNo)){ |
| | | terms.put("fileNo", fileNo); |
| | | } |
| | | // 档案保管年限,单位:年 |
| | | String fileLimitYear = request.getParameter("fileLimitYear"); |
| | | if (StringUtils.isNotBlank(fileLimitYear)){ |
| | | terms.put("fileLimitYear", fileLimitYear); |
| | | } |
| | | // 档案存档位置 |
| | | String fileAddr = request.getParameter("fileAddr"); |
| | | if (StringUtils.isNotBlank(fileAddr)){ |
| | | terms.put("fileAddr", fileAddr); |
| | | } |
| | | // 卷宗情况说明 |
| | | String fileContent = request.getParameter("fileContent"); |
| | | if (StringUtils.isNotBlank(fileContent)){ |
| | | terms.put("fileContent", fileContent); |
| | | } |
| | | // 履行情况 |
| | | String fulfilSitu = request.getParameter("fulfilSitu"); |
| | | if (StringUtils.isNotBlank(fulfilSitu)){ |
| | | terms.put("fulfilSitu", fulfilSitu); |
| | | } |
| | | // 履行情况名称 |
| | | String fulfilSituName = request.getParameter("fulfilSituName"); |
| | | if (StringUtils.isNotBlank(fulfilSituName)){ |
| | | terms.put("fulfilSituName", fulfilSituName); |
| | | } |
| | | // 是否已回访,0:未回访,1:已回访 |
| | | String visitUpStatus = request.getParameter("visitUpStatus"); |
| | | if (StringUtils.isNotBlank(visitUpStatus)){ |
| | | terms.put("visitUpStatus", visitUpStatus); |
| | | } |
| | | // 回访情况 |
| | | String visitUpContent = request.getParameter("visitUpContent"); |
| | | if (StringUtils.isNotBlank(visitUpContent)){ |
| | | terms.put("visitUpContent", visitUpContent); |
| | | } |
| | | // 当事人是否满意,0:不满意,1:满意 |
| | | String partyJoy = request.getParameter("partyJoy"); |
| | | if (StringUtils.isNotBlank(partyJoy)){ |
| | | terms.put("partyJoy", partyJoy); |
| | | } |
| | | // 顾客编号 |
| | | 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/caseInfoUnfold/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/caseInfoUnfold/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<CaseInfoUnfold> caseInfoUnfoldPage = service.pageQuery(pageRequest, terms); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", caseInfoUnfoldPage); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/web/caseInfoUnfold/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/caseInfoUnfold/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/caseInfoUnfold/saveCaseInfoUnfold |
| | | * @param caseInfoUnfold 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveCaseInfoUnfold") |
| | | public Object saveCaseInfoUnfold(@RequestBody CaseInfoUnfold caseInfoUnfold) { |
| | | try { |
| | | service.saveCaseInfoUnfold(caseInfoUnfold); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.cases.controller.web; |
| | | |
| | | import cn.huge.base.common.utils.DateUtils; |
| | | import cn.huge.base.common.utils.ObjectUtils; |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.base.config.CurrentUser; |
| | | import cn.huge.module.cases.domain.dto.RegisterSaveDTO; |
| | | import cn.huge.module.cases.domain.po.CaseInfo; |
| | | import cn.huge.module.cases.service.CaseInfoService; |
| | | import cn.huge.module.client.api.impl.CustClientImpl; |
| | | import cn.huge.module.cust.dto.CtUserDTO; |
| | | import com.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.Date; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.Stream; |
| | | |
| | | /** |
| | | * @title: 纠纷信息主表接口api-web端 |
| | | * @description: 纠纷信息主表接口api-web端 |
| | | * @company: hugeinfo |
| | | * @author: wangwh |
| | | * @time: 2024-08-27 10:00:57 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/web/caseInfo") |
| | | public class CaseInfoWebController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private CaseInfoService 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 caseTitle = request.getParameter("caseTitle"); |
| | | if (StringUtils.isNotBlank(caseTitle)){ |
| | | terms.put("caseTitle", caseTitle); |
| | | } |
| | | // 事项编号 |
| | | String caseRef = request.getParameter("caseRef"); |
| | | if (StringUtils.isNotBlank(caseRef)){ |
| | | terms.put("caseRef", caseRef); |
| | | } |
| | | // 事项等级 |
| | | String caseLevel = request.getParameter("caseLevel"); |
| | | if (StringUtils.isNotBlank(caseLevel)){ |
| | | terms.put("caseLevel", caseLevel); |
| | | } |
| | | // 来访时间 |
| | | String visitTime = request.getParameter("visitTime"); |
| | | if (StringUtils.isNotBlank(visitTime)){ |
| | | terms.put("visitTime", visitTime); |
| | | } |
| | | // 来访人数 |
| | | String visitPeopleNum = request.getParameter("visitPeopleNum"); |
| | | if (StringUtils.isNotBlank(visitPeopleNum)){ |
| | | terms.put("visitPeopleNum", visitPeopleNum); |
| | | } |
| | | // 调解类型 |
| | | String mediType = request.getParameter("mediType"); |
| | | if (StringUtils.isNotBlank(mediType)){ |
| | | terms.put("mediType", mediType); |
| | | } |
| | | // 调解类型名称 |
| | | String mediTypeName = request.getParameter("mediTypeName"); |
| | | if (StringUtils.isNotBlank(mediTypeName)){ |
| | | terms.put("mediTypeName", mediTypeName); |
| | | } |
| | | // 纠纷一级类型 |
| | | String caseTypeFirst = request.getParameter("caseTypeFirst"); |
| | | if (StringUtils.isNotBlank(caseTypeFirst)){ |
| | | terms.put("caseTypeFirst", caseTypeFirst); |
| | | } |
| | | // 纠纷一级类型名称 |
| | | String caseTypeFirstName = request.getParameter("caseTypeFirstName"); |
| | | if (StringUtils.isNotBlank(caseTypeFirstName)){ |
| | | terms.put("caseTypeFirstName", caseTypeFirstName); |
| | | } |
| | | // 纠纷类型 |
| | | 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); |
| | | } |
| | | // 纠纷发生时间 |
| | | String occurTime = request.getParameter("occurTime"); |
| | | if (StringUtils.isNotBlank(occurTime)){ |
| | | terms.put("occurTime", occurTime); |
| | | } |
| | | // 纠纷发生地详细地址 |
| | | String addr = request.getParameter("addr"); |
| | | if (StringUtils.isNotBlank(addr)){ |
| | | terms.put("addr", addr); |
| | | } |
| | | // 纠纷发生地经度 |
| | | String lng = request.getParameter("lng"); |
| | | if (StringUtils.isNotBlank(lng)){ |
| | | terms.put("lng", lng); |
| | | } |
| | | // 纠纷发生地纬度 |
| | | String lat = request.getParameter("lat"); |
| | | if (StringUtils.isNotBlank(lat)){ |
| | | terms.put("lat", lat); |
| | | } |
| | | // 纠纷发生地网格地址 |
| | | String wgAddr = request.getParameter("wgAddr"); |
| | | if (StringUtils.isNotBlank(wgAddr)){ |
| | | terms.put("wgAddr", wgAddr); |
| | | } |
| | | // 纠纷发生地网格地址经度 |
| | | String wgLng = request.getParameter("wgLng"); |
| | | if (StringUtils.isNotBlank(wgLng)){ |
| | | terms.put("wgLng", wgLng); |
| | | } |
| | | // 纠纷发生地网格地址纬度 |
| | | String wgLat = request.getParameter("wgLat"); |
| | | if (StringUtils.isNotBlank(wgLat)){ |
| | | terms.put("wgLat", wgLat); |
| | | } |
| | | // 问题属地省 |
| | | String queProv = request.getParameter("queProv"); |
| | | if (StringUtils.isNotBlank(queProv)){ |
| | | terms.put("queProv", queProv); |
| | | } |
| | | // 问题属地省名称 |
| | | String queProvName = request.getParameter("queProvName"); |
| | | if (StringUtils.isNotBlank(queProvName)){ |
| | | terms.put("queProvName", queProvName); |
| | | } |
| | | // 问题属地市 |
| | | String queCity = request.getParameter("queCity"); |
| | | if (StringUtils.isNotBlank(queCity)){ |
| | | terms.put("queCity", queCity); |
| | | } |
| | | // 问题属地市名称 |
| | | String queCityName = request.getParameter("queCityName"); |
| | | if (StringUtils.isNotBlank(queCityName)){ |
| | | terms.put("queCityName", queCityName); |
| | | } |
| | | // 问题属地区 |
| | | String queArea = request.getParameter("queArea"); |
| | | if (StringUtils.isNotBlank(queArea)){ |
| | | terms.put("queArea", queArea); |
| | | } |
| | | // 问题属地区名称 |
| | | String queAreaName = request.getParameter("queAreaName"); |
| | | if (StringUtils.isNotBlank(queAreaName)){ |
| | | terms.put("queAreaName", queAreaName); |
| | | } |
| | | // 问题属地街道 |
| | | String queRoad = request.getParameter("queRoad"); |
| | | if (StringUtils.isNotBlank(queRoad)){ |
| | | terms.put("queRoad", queRoad); |
| | | } |
| | | // 问题属地街道名称 |
| | | String queRoadName = request.getParameter("queRoadName"); |
| | | if (StringUtils.isNotBlank(queRoadName)){ |
| | | terms.put("queRoadName", queRoadName); |
| | | } |
| | | // 问题属地社区 |
| | | String queVillage = request.getParameter("queVillage"); |
| | | if (StringUtils.isNotBlank(queVillage)){ |
| | | terms.put("queVillage", queVillage); |
| | | } |
| | | // 问题属地社区名称 |
| | | String queVillageName = request.getParameter("queVillageName"); |
| | | if (StringUtils.isNotBlank(queVillageName)){ |
| | | terms.put("queVillageName", queVillageName); |
| | | } |
| | | // 涉及人数 |
| | | String peopleNum = request.getParameter("peopleNum"); |
| | | if (StringUtils.isNotBlank(peopleNum)){ |
| | | terms.put("peopleNum", peopleNum); |
| | | } |
| | | // 涉及金额 |
| | | String amount = request.getParameter("amount"); |
| | | if (StringUtils.isNotBlank(amount)){ |
| | | terms.put("amount", amount); |
| | | } |
| | | // 涉及人群 |
| | | String crowd = request.getParameter("crowd"); |
| | | if (StringUtils.isNotBlank(crowd)){ |
| | | terms.put("crowd", crowd); |
| | | } |
| | | // 涉及人群名称 |
| | | String crowdName = request.getParameter("crowdName"); |
| | | if (StringUtils.isNotBlank(crowdName)){ |
| | | terms.put("crowdName", crowdName); |
| | | } |
| | | // 事项来源 |
| | | String canal = request.getParameter("canal"); |
| | | if (StringUtils.isNotBlank(canal)){ |
| | | terms.put("canal", canal); |
| | | } |
| | | // 事项来源名称 |
| | | String canalName = request.getParameter("canalName"); |
| | | if (StringUtils.isNotBlank(canalName)){ |
| | | terms.put("canalName", canalName); |
| | | } |
| | | // 来访形式 |
| | | String visitWay = request.getParameter("visitWay"); |
| | | if (StringUtils.isNotBlank(visitWay)){ |
| | | terms.put("visitWay", visitWay); |
| | | } |
| | | // 来访形式名称 |
| | | String visitWayName = request.getParameter("visitWayName"); |
| | | if (StringUtils.isNotBlank(visitWayName)){ |
| | | terms.put("visitWayName", visitWayName); |
| | | } |
| | | // 事项概况 |
| | | String caseDes = request.getParameter("caseDes"); |
| | | if (StringUtils.isNotBlank(caseDes)){ |
| | | terms.put("caseDes", caseDes); |
| | | } |
| | | // 事项申请 |
| | | String caseClaim = request.getParameter("caseClaim"); |
| | | if (StringUtils.isNotBlank(caseClaim)){ |
| | | terms.put("caseClaim", caseClaim); |
| | | } |
| | | // 是否重大矛盾纠纷,0:否,1:是 |
| | | String majorStatus = request.getParameter("majorStatus"); |
| | | if (StringUtils.isNotBlank(majorStatus)){ |
| | | terms.put("majorStatus", majorStatus); |
| | | } |
| | | // 纠纷来源 |
| | | String source = request.getParameter("source"); |
| | | if (StringUtils.isNotBlank(source)){ |
| | | terms.put("source", source); |
| | | } |
| | | // 纠纷来源名称 |
| | | String sourceName = request.getParameter("sourceName"); |
| | | if (StringUtils.isNotBlank(sourceName)){ |
| | | terms.put("sourceName", sourceName); |
| | | } |
| | | // 矛调号 |
| | | String caseNo = request.getParameter("caseNo"); |
| | | if (StringUtils.isNotBlank(caseNo)){ |
| | | terms.put("caseNo", caseNo); |
| | | } |
| | | // 民诉前调号 |
| | | String mediateNo = request.getParameter("mediateNo"); |
| | | if (StringUtils.isNotBlank(mediateNo)){ |
| | | terms.put("mediateNo", mediateNo); |
| | | } |
| | | // 民诉前调书号 |
| | | String mediateBookNo = request.getParameter("mediateBookNo"); |
| | | if (StringUtils.isNotBlank(mediateBookNo)){ |
| | | terms.put("mediateBookNo", mediateBookNo); |
| | | } |
| | | // 诉讼案号 |
| | | String civilNo = request.getParameter("civilNo"); |
| | | if (StringUtils.isNotBlank(civilNo)){ |
| | | terms.put("civilNo", civilNo); |
| | | } |
| | | // 申请方当事人名称 |
| | | String plaintiffs = request.getParameter("plaintiffs"); |
| | | if (StringUtils.isNotBlank(plaintiffs)){ |
| | | terms.put("plaintiffs", plaintiffs); |
| | | } |
| | | // 申请方代理人名称 |
| | | String pagents = request.getParameter("pagents"); |
| | | if (StringUtils.isNotBlank(pagents)){ |
| | | terms.put("pagents", pagents); |
| | | } |
| | | // 被申请方当事人名称 |
| | | String defendants = request.getParameter("defendants"); |
| | | if (StringUtils.isNotBlank(defendants)){ |
| | | terms.put("defendants", defendants); |
| | | } |
| | | // 被申请方代理人名称 |
| | | String dagents = request.getParameter("dagents"); |
| | | if (StringUtils.isNotBlank(dagents)){ |
| | | terms.put("dagents", dagents); |
| | | } |
| | | // 登记组织编号 |
| | | String inputUnitId = request.getParameter("inputUnitId"); |
| | | if (StringUtils.isNotBlank(inputUnitId)){ |
| | | terms.put("inputUnitId", inputUnitId); |
| | | } |
| | | // 登记组织名称 |
| | | String inputUnitName = request.getParameter("inputUnitName"); |
| | | if (StringUtils.isNotBlank(inputUnitName)){ |
| | | terms.put("inputUnitName", inputUnitName); |
| | | } |
| | | // 登记人编号 |
| | | String inputUserId = request.getParameter("inputUserId"); |
| | | if (StringUtils.isNotBlank(inputUserId)){ |
| | | terms.put("inputUserId", inputUserId); |
| | | } |
| | | // 登记人名称 |
| | | String inputUserName = request.getParameter("inputUserName"); |
| | | if (StringUtils.isNotBlank(inputUserName)){ |
| | | terms.put("inputUserName", inputUserName); |
| | | } |
| | | // 登记方式,1:正常登记,2:案件导入 |
| | | String inputWay = request.getParameter("inputWay"); |
| | | if (StringUtils.isNotBlank(inputWay)){ |
| | | terms.put("inputWay", inputWay); |
| | | } |
| | | // 事项状态,1:待签收,2:待受理,3:办理中,4:结案审核,5:待评价,6:已归档 |
| | | String status = request.getParameter("status"); |
| | | if (StringUtils.isNotBlank(status)){ |
| | | terms.put("status", status); |
| | | } |
| | | // 事项状态名称 |
| | | String statusName = request.getParameter("statusName"); |
| | | if (StringUtils.isNotBlank(statusName)){ |
| | | terms.put("statusName", statusName); |
| | | } |
| | | // 事项进度,1:来访登记,2:事件流转,3:办理反馈,4:结案申请,5:当事人评价,6:结案归档 |
| | | String process = request.getParameter("process"); |
| | | if (StringUtils.isNotBlank(process)){ |
| | | terms.put("process", process); |
| | | } |
| | | // 事项进度名称 |
| | | String processName = request.getParameter("processName"); |
| | | if (StringUtils.isNotBlank(processName)){ |
| | | terms.put("processName", processName); |
| | | } |
| | | // 删除状态,0:未删除,1:已删除 |
| | | String deleteStatus = request.getParameter("deleteStatus"); |
| | | if (StringUtils.isNotBlank(deleteStatus)){ |
| | | terms.put("deleteStatus", deleteStatus); |
| | | } |
| | | // 顾客编号 |
| | | 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/caseInfo/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/caseInfo/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<CaseInfo> caseInfoPage = service.pageQuery(pageRequest, terms); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", caseInfoPage); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/web/caseInfo/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/caseInfo/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/caseInfo/saveCaseInfo |
| | | * @param caseInfo 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveCaseInfo") |
| | | public Object saveCaseInfo(@RequestBody CaseInfo caseInfo) { |
| | | try { |
| | | service.saveCaseInfo(caseInfo); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * PC端-纠纷登记-保存纠纷信息-正常案件 |
| | | * @url {ctx}/api/v1/caseInfo/caseRegister |
| | | * @param registerSaveDTO 实体对象 |
| | | */ |
| | | @PostMapping("/caseRegister") |
| | | public Object caseRegister(@CurrentUser String userId, @RequestBody RegisterSaveDTO registerSaveDTO) { |
| | | try { |
| | | String caseId = service.caseRegister(registerSaveDTO, userId); |
| | | return ReturnSucUtils.getRepInfo(caseId); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(e.getMessage()); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.huge.module.cases.controller.web; |
| | | |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.module.cases.domain.po.CasePerson; |
| | | import cn.huge.module.cases.service.CasePersonService; |
| | | 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: wangwh |
| | | * @time: 2024-08-27 10:48:18 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/web/casePerson") |
| | | public class CasePersonWebController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private CasePersonService 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); |
| | | } |
| | | // 公众用户编号 |
| | | String partyUserId = request.getParameter("partyUserId"); |
| | | if (StringUtils.isNotBlank(partyUserId)){ |
| | | terms.put("partyUserId", partyUserId); |
| | | } |
| | | // 当事人地位 |
| | | String perType = request.getParameter("perType"); |
| | | if (StringUtils.isNotBlank(perType)){ |
| | | terms.put("perType", perType); |
| | | } |
| | | // 当事人地位名称 |
| | | String perTypeName = request.getParameter("perTypeName"); |
| | | if (StringUtils.isNotBlank(perTypeName)){ |
| | | terms.put("perTypeName", perTypeName); |
| | | } |
| | | // 当事人类型 |
| | | String perClass = request.getParameter("perClass"); |
| | | if (StringUtils.isNotBlank(perClass)){ |
| | | terms.put("perClass", perClass); |
| | | } |
| | | // 当事人类型名称 |
| | | String perClassName = request.getParameter("perClassName"); |
| | | if (StringUtils.isNotBlank(perClassName)){ |
| | | terms.put("perClassName", perClassName); |
| | | } |
| | | // 姓名/企业/机构名称 |
| | | String trueName = request.getParameter("trueName"); |
| | | if (StringUtils.isNotBlank(trueName)){ |
| | | terms.put("trueName", trueName); |
| | | } |
| | | // 联系方式 |
| | | String mobile = request.getParameter("mobile"); |
| | | if (StringUtils.isNotBlank(mobile)){ |
| | | terms.put("mobile", mobile); |
| | | } |
| | | // 组织机构代码 |
| | | String orgaCode = request.getParameter("orgaCode"); |
| | | if (StringUtils.isNotBlank(orgaCode)){ |
| | | terms.put("orgaCode", orgaCode); |
| | | } |
| | | // 法定/机构代表人名称 |
| | | String deputy = request.getParameter("deputy"); |
| | | if (StringUtils.isNotBlank(deputy)){ |
| | | terms.put("deputy", deputy); |
| | | } |
| | | // 企业/机构类型 |
| | | String orgaType = request.getParameter("orgaType"); |
| | | if (StringUtils.isNotBlank(orgaType)){ |
| | | terms.put("orgaType", orgaType); |
| | | } |
| | | // 企业/机构类型名称 |
| | | String orgaTypeName = request.getParameter("orgaTypeName"); |
| | | if (StringUtils.isNotBlank(orgaTypeName)){ |
| | | terms.put("orgaTypeName", orgaTypeName); |
| | | } |
| | | // 证件类型 |
| | | String certiType = request.getParameter("certiType"); |
| | | if (StringUtils.isNotBlank(certiType)){ |
| | | terms.put("certiType", certiType); |
| | | } |
| | | // 证件类型名称 |
| | | String certiTypeName = request.getParameter("certiTypeName"); |
| | | if (StringUtils.isNotBlank(certiTypeName)){ |
| | | terms.put("certiTypeName", certiTypeName); |
| | | } |
| | | // 证件号码 |
| | | String certiNo = request.getParameter("certiNo"); |
| | | if (StringUtils.isNotBlank(certiNo)){ |
| | | terms.put("certiNo", certiNo); |
| | | } |
| | | // 联系/企业/机构地址省 |
| | | String prov = request.getParameter("prov"); |
| | | if (StringUtils.isNotBlank(prov)){ |
| | | terms.put("prov", prov); |
| | | } |
| | | // 联系/企业/机构地址省名称 |
| | | String provName = request.getParameter("provName"); |
| | | if (StringUtils.isNotBlank(provName)){ |
| | | terms.put("provName", provName); |
| | | } |
| | | // 联系/企业/机构地址市 |
| | | String city = request.getParameter("city"); |
| | | if (StringUtils.isNotBlank(city)){ |
| | | terms.put("city", city); |
| | | } |
| | | // 联系/企业/机构地址市名称 |
| | | String cityName = request.getParameter("cityName"); |
| | | if (StringUtils.isNotBlank(cityName)){ |
| | | terms.put("cityName", cityName); |
| | | } |
| | | // 联系/企业/机构地址区 |
| | | String area = request.getParameter("area"); |
| | | if (StringUtils.isNotBlank(area)){ |
| | | terms.put("area", area); |
| | | } |
| | | // 联系/企业/机构地址区名称 |
| | | String areaName = request.getParameter("areaName"); |
| | | if (StringUtils.isNotBlank(areaName)){ |
| | | terms.put("areaName", areaName); |
| | | } |
| | | // 联系/企业/机构地址街道 |
| | | String road = request.getParameter("road"); |
| | | if (StringUtils.isNotBlank(road)){ |
| | | terms.put("road", road); |
| | | } |
| | | // 联系/企业/机构地址街道名称 |
| | | String roadName = request.getParameter("roadName"); |
| | | if (StringUtils.isNotBlank(roadName)){ |
| | | terms.put("roadName", roadName); |
| | | } |
| | | // 联系/企业/机构地址社区 |
| | | String village = request.getParameter("village"); |
| | | if (StringUtils.isNotBlank(village)){ |
| | | terms.put("village", village); |
| | | } |
| | | // 联系/企业/机构地址社区名称 |
| | | String villageName = request.getParameter("villageName"); |
| | | if (StringUtils.isNotBlank(villageName)){ |
| | | terms.put("villageName", villageName); |
| | | } |
| | | // 联系/企业/机构地址详细地址 |
| | | String addr = request.getParameter("addr"); |
| | | if (StringUtils.isNotBlank(addr)){ |
| | | terms.put("addr", addr); |
| | | } |
| | | // 户籍/住所地址省 |
| | | String placeProv = request.getParameter("placeProv"); |
| | | if (StringUtils.isNotBlank(placeProv)){ |
| | | terms.put("placeProv", placeProv); |
| | | } |
| | | // 户籍/住所地址省名称 |
| | | String placeProvName = request.getParameter("placeProvName"); |
| | | if (StringUtils.isNotBlank(placeProvName)){ |
| | | terms.put("placeProvName", placeProvName); |
| | | } |
| | | // 户籍/住所地址市 |
| | | String placeCity = request.getParameter("placeCity"); |
| | | if (StringUtils.isNotBlank(placeCity)){ |
| | | terms.put("placeCity", placeCity); |
| | | } |
| | | // 户籍/住所地址市名称 |
| | | String placeCityName = request.getParameter("placeCityName"); |
| | | if (StringUtils.isNotBlank(placeCityName)){ |
| | | terms.put("placeCityName", placeCityName); |
| | | } |
| | | // 户籍/住所地址区 |
| | | String placeArea = request.getParameter("placeArea"); |
| | | if (StringUtils.isNotBlank(placeArea)){ |
| | | terms.put("placeArea", placeArea); |
| | | } |
| | | // 户籍/住所地址区名称 |
| | | String placeAreaName = request.getParameter("placeAreaName"); |
| | | if (StringUtils.isNotBlank(placeAreaName)){ |
| | | terms.put("placeAreaName", placeAreaName); |
| | | } |
| | | // 户籍/住所地址街道 |
| | | String placeRoad = request.getParameter("placeRoad"); |
| | | if (StringUtils.isNotBlank(placeRoad)){ |
| | | terms.put("placeRoad", placeRoad); |
| | | } |
| | | // 户籍/住所地址街道名称 |
| | | String placeRoadName = request.getParameter("placeRoadName"); |
| | | if (StringUtils.isNotBlank(placeRoadName)){ |
| | | terms.put("placeRoadName", placeRoadName); |
| | | } |
| | | // 户籍/住所地址社区 |
| | | String placeVillage = request.getParameter("placeVillage"); |
| | | if (StringUtils.isNotBlank(placeVillage)){ |
| | | terms.put("placeVillage", placeVillage); |
| | | } |
| | | // 户籍/住所地址社区名称 |
| | | String placeVillageName = request.getParameter("placeVillageName"); |
| | | if (StringUtils.isNotBlank(placeVillageName)){ |
| | | terms.put("placeVillageName", placeVillageName); |
| | | } |
| | | // 户籍/住所地址详细地址 |
| | | String placeAddr = request.getParameter("placeAddr"); |
| | | if (StringUtils.isNotBlank(placeAddr)){ |
| | | terms.put("placeAddr", placeAddr); |
| | | } |
| | | // 工作单位 |
| | | String workUnit = request.getParameter("workUnit"); |
| | | if (StringUtils.isNotBlank(workUnit)){ |
| | | terms.put("workUnit", workUnit); |
| | | } |
| | | // 民族 |
| | | String nation = request.getParameter("nation"); |
| | | if (StringUtils.isNotBlank(nation)){ |
| | | terms.put("nation", nation); |
| | | } |
| | | // 民族名称 |
| | | String nationName = request.getParameter("nationName"); |
| | | if (StringUtils.isNotBlank(nationName)){ |
| | | terms.put("nationName", nationName); |
| | | } |
| | | // 性别 |
| | | String sex = request.getParameter("sex"); |
| | | if (StringUtils.isNotBlank(sex)){ |
| | | terms.put("sex", sex); |
| | | } |
| | | // 性别名称 |
| | | String sexName = request.getParameter("sexName"); |
| | | if (StringUtils.isNotBlank(sexName)){ |
| | | terms.put("sexName", sexName); |
| | | } |
| | | // 是否有个人极端倾向,0:否,1:是 |
| | | String extreme = request.getParameter("extreme"); |
| | | if (StringUtils.isNotBlank(extreme)){ |
| | | terms.put("extreme", extreme); |
| | | } |
| | | // 头像 |
| | | String avatar = request.getParameter("avatar"); |
| | | if (StringUtils.isNotBlank(avatar)){ |
| | | terms.put("avatar", avatar); |
| | | } |
| | | // 职业 |
| | | String job = request.getParameter("job"); |
| | | if (StringUtils.isNotBlank(job)){ |
| | | terms.put("job", job); |
| | | } |
| | | // 职业名称 |
| | | String jobName = request.getParameter("jobName"); |
| | | if (StringUtils.isNotBlank(jobName)){ |
| | | terms.put("jobName", jobName); |
| | | } |
| | | // 出生日期 |
| | | String birthday = request.getParameter("birthday"); |
| | | if (StringUtils.isNotBlank(birthday)){ |
| | | terms.put("birthday", birthday); |
| | | } |
| | | // 年龄 |
| | | String age = request.getParameter("age"); |
| | | if (StringUtils.isNotBlank(age)){ |
| | | terms.put("age", age); |
| | | } |
| | | // 有无代理人,0:无,1:有 |
| | | String agentStatus = request.getParameter("agentStatus"); |
| | | if (StringUtils.isNotBlank(agentStatus)){ |
| | | terms.put("agentStatus", agentStatus); |
| | | } |
| | | // 顾客编号 |
| | | 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/casePerson/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/casePerson/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<CasePerson> casePersonPage = service.pageQuery(pageRequest, terms); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", casePersonPage); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/web/casePerson/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/casePerson/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/casePerson/saveCasePerson |
| | | * @param casePerson 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveCasePerson") |
| | | public Object saveCasePerson(@RequestBody CasePerson casePerson) { |
| | | try { |
| | | service.saveCasePerson(casePerson); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.cases.dao.mapper; |
| | | |
| | | import cn.huge.module.cases.domain.po.CaseAgent; |
| | | 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: wangwh |
| | | * @time: 2024-08-27 10:48:17 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Repository |
| | | public interface CaseAgentMapper extends BaseMapper<CaseAgent>{ |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | void updateCaseAgent(@Param("entity") CaseAgent entity); |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | void updateCaseAgentTerms(@Param("entity") CaseAgent entity, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | void deleteCaseAgent(@Param("id") String id); |
| | | |
| | | /** |
| | | * 按条件查询结果集 |
| | | * @param terms 查询条件集合 |
| | | * @return List<CaseAgent> |
| | | */ |
| | | List<CaseAgent> 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<CaseAgent> |
| | | */ |
| | | List<CaseAgent> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据纠纷编号查询代理人编号 |
| | | * @param caseId 纠纷编号 |
| | | * @return List<String> |
| | | */ |
| | | List<String> listIdByCaseId(@Param("caseId") String caseId); |
| | | } |
| New file |
| | |
| | | package cn.huge.module.cases.dao.mapper; |
| | | |
| | | import cn.huge.module.cases.domain.po.CaseInfo; |
| | | 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: wangwh |
| | | * @time: 2024-08-27 10:00:57 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Repository |
| | | public interface CaseInfoMapper extends BaseMapper<CaseInfo>{ |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | void updateCaseInfo(@Param("entity") CaseInfo entity); |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | void updateCaseInfoTerms(@Param("entity") CaseInfo entity, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | void deleteCaseInfo(@Param("id") String id); |
| | | |
| | | /** |
| | | * 按条件查询结果集 |
| | | * @param terms 查询条件集合 |
| | | * @return List<CaseInfo> |
| | | */ |
| | | List<CaseInfo> 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<CaseInfo> |
| | | */ |
| | | List<CaseInfo> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.cases.dao.mapper; |
| | | |
| | | import cn.huge.module.cases.domain.po.CaseInfoUnfold; |
| | | 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: wangwh |
| | | * @time: 2024-08-27 20:36:04 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Repository |
| | | public interface CaseInfoUnfoldMapper extends BaseMapper<CaseInfoUnfold>{ |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | void updateCaseInfoUnfold(@Param("entity") CaseInfoUnfold entity); |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | void updateCaseInfoUnfoldTerms(@Param("entity") CaseInfoUnfold entity, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | void deleteCaseInfoUnfold(@Param("id") String id); |
| | | |
| | | /** |
| | | * 按条件查询结果集 |
| | | * @param terms 查询条件集合 |
| | | * @return List<CaseInfoUnfold> |
| | | */ |
| | | List<CaseInfoUnfold> 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<CaseInfoUnfold> |
| | | */ |
| | | List<CaseInfoUnfold> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.cases.dao.mapper; |
| | | |
| | | import cn.huge.module.cases.domain.po.CasePerson; |
| | | 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: wangwh |
| | | * @time: 2024-08-27 10:48:18 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Repository |
| | | public interface CasePersonMapper extends BaseMapper<CasePerson>{ |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | void updateCasePerson(@Param("entity") CasePerson entity); |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | void updateCasePersonTerms(@Param("entity") CasePerson entity, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | void deleteCasePerson(@Param("id") String id); |
| | | |
| | | /** |
| | | * 按条件查询结果集 |
| | | * @param terms 查询条件集合 |
| | | * @return List<CasePerson> |
| | | */ |
| | | List<CasePerson> 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<CasePerson> |
| | | */ |
| | | List<CasePerson> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据纠纷编号查询人员编号 |
| | | * @param caseId 纠纷编号 |
| | | * @return List<String> |
| | | */ |
| | | List<String> listIdByCaseId(@Param("caseId") String caseId); |
| | | } |
| 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: wangwh |
| | | * @time:2024-08-27 10:48:17 |
| | | * @version 1.0.0 |
| | | --> |
| | | <mapper namespace="cn.huge.module.cases.dao.mapper.CaseAgentMapper"> |
| | | <!-- 结果集 --> |
| | | <resultMap id="dataResult" type="cn.huge.module.cases.domain.po.CaseAgent"> |
| | | <result property="id" column="id"/> |
| | | <result property="caseId" column="case_id"/> |
| | | <result property="partyUserId" column="party_user_id"/> |
| | | <result property="perClass" column="per_class"/> |
| | | <result property="perClassName" column="per_class_name"/> |
| | | <result property="trueName" column="true_name"/> |
| | | <result property="mobile" column="mobile"/> |
| | | <result property="certiType" column="certi_type"/> |
| | | <result property="certiTypeName" column="certi_type_name"/> |
| | | <result property="certiNo" column="certi_no"/> |
| | | <result property="prov" column="prov"/> |
| | | <result property="provName" column="prov_name"/> |
| | | <result property="city" column="city"/> |
| | | <result property="cityName" column="city_name"/> |
| | | <result property="area" column="area"/> |
| | | <result property="areaName" column="area_name"/> |
| | | <result property="road" column="road"/> |
| | | <result property="roadName" column="road_name"/> |
| | | <result property="village" column="village"/> |
| | | <result property="villageName" column="village_name"/> |
| | | <result property="addr" column="addr"/> |
| | | <result property="placeProv" column="place_prov"/> |
| | | <result property="placeProvName" column="place_prov_name"/> |
| | | <result property="placeCity" column="place_city"/> |
| | | <result property="placeCityName" column="place_city_name"/> |
| | | <result property="placeArea" column="place_area"/> |
| | | <result property="placeAreaName" column="place_area_name"/> |
| | | <result property="placeRoad" column="place_road"/> |
| | | <result property="placeRoadName" column="place_road_name"/> |
| | | <result property="placeVillage" column="place_village"/> |
| | | <result property="placeVillageName" column="place_village_name"/> |
| | | <result property="placeAddr" column="place_addr"/> |
| | | <result property="workUnit" column="work_unit"/> |
| | | <result property="nation" column="nation"/> |
| | | <result property="nationName" column="nation_name"/> |
| | | <result property="sex" column="sex"/> |
| | | <result property="sexName" column="sex_name"/> |
| | | <result property="extreme" column="extreme"/> |
| | | <result property="agentRelate" column="agent_relate"/> |
| | | <result property="agentRelateName" column="agent_relate_name"/> |
| | | <result property="agentType" column="agent_type"/> |
| | | <result property="agentTypeName" column="agent_type_name"/> |
| | | <result property="personId" column="person_id"/> |
| | | <result property="avatar" column="avatar"/> |
| | | <result property="job" column="job"/> |
| | | <result property="jobName" column="job_name"/> |
| | | <result property="birthday" column="birthday"/> |
| | | <result property="age" column="age"/> |
| | | <result property="agentStatus" column="agent_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_agent</sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | | id, |
| | | case_id, |
| | | party_user_id, |
| | | per_class, |
| | | per_class_name, |
| | | true_name, |
| | | mobile, |
| | | certi_type, |
| | | certi_type_name, |
| | | certi_no, |
| | | prov, |
| | | prov_name, |
| | | city, |
| | | city_name, |
| | | area, |
| | | area_name, |
| | | road, |
| | | road_name, |
| | | village, |
| | | village_name, |
| | | addr, |
| | | place_prov, |
| | | place_prov_name, |
| | | place_city, |
| | | place_city_name, |
| | | place_area, |
| | | place_area_name, |
| | | place_road, |
| | | place_road_name, |
| | | place_village, |
| | | place_village_name, |
| | | place_addr, |
| | | work_unit, |
| | | nation, |
| | | nation_name, |
| | | sex, |
| | | sex_name, |
| | | extreme, |
| | | agent_relate, |
| | | agent_relate_name, |
| | | agent_type, |
| | | agent_type_name, |
| | | person_id, |
| | | avatar, |
| | | job, |
| | | job_name, |
| | | birthday, |
| | | age, |
| | | agent_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.partyUserId != null">party_user_id = #{entity.partyUserId},</if> |
| | | <if test="entity.perClass != null">per_class = #{entity.perClass},</if> |
| | | <if test="entity.perClassName != null">per_class_name = #{entity.perClassName},</if> |
| | | <if test="entity.trueName != null">true_name = #{entity.trueName},</if> |
| | | <if test="entity.mobile != null">mobile = #{entity.mobile},</if> |
| | | <if test="entity.certiType != null">certi_type = #{entity.certiType},</if> |
| | | <if test="entity.certiTypeName != null">certi_type_name = #{entity.certiTypeName},</if> |
| | | <if test="entity.certiNo != null">certi_no = #{entity.certiNo},</if> |
| | | <if test="entity.prov != null">prov = #{entity.prov},</if> |
| | | <if test="entity.provName != null">prov_name = #{entity.provName},</if> |
| | | <if test="entity.city != null">city = #{entity.city},</if> |
| | | <if test="entity.cityName != null">city_name = #{entity.cityName},</if> |
| | | <if test="entity.area != null">area = #{entity.area},</if> |
| | | <if test="entity.areaName != null">area_name = #{entity.areaName},</if> |
| | | <if test="entity.road != null">road = #{entity.road},</if> |
| | | <if test="entity.roadName != null">road_name = #{entity.roadName},</if> |
| | | <if test="entity.village != null">village = #{entity.village},</if> |
| | | <if test="entity.villageName != null">village_name = #{entity.villageName},</if> |
| | | <if test="entity.addr != null">addr = #{entity.addr},</if> |
| | | <if test="entity.placeProv != null">place_prov = #{entity.placeProv},</if> |
| | | <if test="entity.placeProvName != null">place_prov_name = #{entity.placeProvName},</if> |
| | | <if test="entity.placeCity != null">place_city = #{entity.placeCity},</if> |
| | | <if test="entity.placeCityName != null">place_city_name = #{entity.placeCityName},</if> |
| | | <if test="entity.placeArea != null">place_area = #{entity.placeArea},</if> |
| | | <if test="entity.placeAreaName != null">place_area_name = #{entity.placeAreaName},</if> |
| | | <if test="entity.placeRoad != null">place_road = #{entity.placeRoad},</if> |
| | | <if test="entity.placeRoadName != null">place_road_name = #{entity.placeRoadName},</if> |
| | | <if test="entity.placeVillage != null">place_village = #{entity.placeVillage},</if> |
| | | <if test="entity.placeVillageName != null">place_village_name = #{entity.placeVillageName},</if> |
| | | <if test="entity.placeAddr != null">place_addr = #{entity.placeAddr},</if> |
| | | <if test="entity.workUnit != null">work_unit = #{entity.workUnit},</if> |
| | | <if test="entity.nation != null">nation = #{entity.nation},</if> |
| | | <if test="entity.nationName != null">nation_name = #{entity.nationName},</if> |
| | | <if test="entity.sex != null">sex = #{entity.sex},</if> |
| | | <if test="entity.sexName != null">sex_name = #{entity.sexName},</if> |
| | | <if test="entity.extreme != null">extreme = #{entity.extreme},</if> |
| | | <if test="entity.agentRelate != null">agent_relate = #{entity.agentRelate},</if> |
| | | <if test="entity.agentRelateName != null">agent_relate_name = #{entity.agentRelateName},</if> |
| | | <if test="entity.agentType != null">agent_type = #{entity.agentType},</if> |
| | | <if test="entity.agentTypeName != null">agent_type_name = #{entity.agentTypeName},</if> |
| | | <if test="entity.personId != null">person_id = #{entity.personId},</if> |
| | | <if test="entity.avatar != null">avatar = #{entity.avatar},</if> |
| | | <if test="entity.job != null">job = #{entity.job},</if> |
| | | <if test="entity.jobName != null">job_name = #{entity.jobName},</if> |
| | | <if test="entity.birthday != null">birthday = #{entity.birthday},</if> |
| | | <if test="entity.age != null">age = #{entity.age},</if> |
| | | <if test="entity.agentStatus != null">agent_status = #{entity.agentStatus},</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.partyUserId != null and terms.partyUserId !=''"> |
| | | and party_user_id = #{terms.partyUserId} |
| | | </if> |
| | | <if test="terms.perClass != null and terms.perClass !=''"> |
| | | and per_class = #{terms.perClass} |
| | | </if> |
| | | <if test="terms.perClassName != null and terms.perClassName !=''"> |
| | | and per_class_name = #{terms.perClassName} |
| | | </if> |
| | | <if test="terms.trueName != null and terms.trueName !=''"> |
| | | and true_name = #{terms.trueName} |
| | | </if> |
| | | <if test="terms.mobile != null and terms.mobile !=''"> |
| | | and mobile = #{terms.mobile} |
| | | </if> |
| | | <if test="terms.certiType != null and terms.certiType !=''"> |
| | | and certi_type = #{terms.certiType} |
| | | </if> |
| | | <if test="terms.certiTypeName != null and terms.certiTypeName !=''"> |
| | | and certi_type_name = #{terms.certiTypeName} |
| | | </if> |
| | | <if test="terms.certiNo != null and terms.certiNo !=''"> |
| | | and certi_no = #{terms.certiNo} |
| | | </if> |
| | | <if test="terms.prov != null and terms.prov !=''"> |
| | | and prov = #{terms.prov} |
| | | </if> |
| | | <if test="terms.provName != null and terms.provName !=''"> |
| | | and prov_name = #{terms.provName} |
| | | </if> |
| | | <if test="terms.city != null and terms.city !=''"> |
| | | and city = #{terms.city} |
| | | </if> |
| | | <if test="terms.cityName != null and terms.cityName !=''"> |
| | | and city_name = #{terms.cityName} |
| | | </if> |
| | | <if test="terms.area != null and terms.area !=''"> |
| | | and area = #{terms.area} |
| | | </if> |
| | | <if test="terms.areaName != null and terms.areaName !=''"> |
| | | and area_name = #{terms.areaName} |
| | | </if> |
| | | <if test="terms.road != null and terms.road !=''"> |
| | | and road = #{terms.road} |
| | | </if> |
| | | <if test="terms.roadName != null and terms.roadName !=''"> |
| | | and road_name = #{terms.roadName} |
| | | </if> |
| | | <if test="terms.village != null and terms.village !=''"> |
| | | and village = #{terms.village} |
| | | </if> |
| | | <if test="terms.villageName != null and terms.villageName !=''"> |
| | | and village_name = #{terms.villageName} |
| | | </if> |
| | | <if test="terms.addr != null and terms.addr !=''"> |
| | | and addr = #{terms.addr} |
| | | </if> |
| | | <if test="terms.placeProv != null and terms.placeProv !=''"> |
| | | and place_prov = #{terms.placeProv} |
| | | </if> |
| | | <if test="terms.placeProvName != null and terms.placeProvName !=''"> |
| | | and place_prov_name = #{terms.placeProvName} |
| | | </if> |
| | | <if test="terms.placeCity != null and terms.placeCity !=''"> |
| | | and place_city = #{terms.placeCity} |
| | | </if> |
| | | <if test="terms.placeCityName != null and terms.placeCityName !=''"> |
| | | and place_city_name = #{terms.placeCityName} |
| | | </if> |
| | | <if test="terms.placeArea != null and terms.placeArea !=''"> |
| | | and place_area = #{terms.placeArea} |
| | | </if> |
| | | <if test="terms.placeAreaName != null and terms.placeAreaName !=''"> |
| | | and place_area_name = #{terms.placeAreaName} |
| | | </if> |
| | | <if test="terms.placeRoad != null and terms.placeRoad !=''"> |
| | | and place_road = #{terms.placeRoad} |
| | | </if> |
| | | <if test="terms.placeRoadName != null and terms.placeRoadName !=''"> |
| | | and place_road_name = #{terms.placeRoadName} |
| | | </if> |
| | | <if test="terms.placeVillage != null and terms.placeVillage !=''"> |
| | | and place_village = #{terms.placeVillage} |
| | | </if> |
| | | <if test="terms.placeVillageName != null and terms.placeVillageName !=''"> |
| | | and place_village_name = #{terms.placeVillageName} |
| | | </if> |
| | | <if test="terms.placeAddr != null and terms.placeAddr !=''"> |
| | | and place_addr = #{terms.placeAddr} |
| | | </if> |
| | | <if test="terms.workUnit != null and terms.workUnit !=''"> |
| | | and work_unit = #{terms.workUnit} |
| | | </if> |
| | | <if test="terms.nation != null and terms.nation !=''"> |
| | | and nation = #{terms.nation} |
| | | </if> |
| | | <if test="terms.nationName != null and terms.nationName !=''"> |
| | | and nation_name = #{terms.nationName} |
| | | </if> |
| | | <if test="terms.sex != null and terms.sex !=''"> |
| | | and sex = #{terms.sex} |
| | | </if> |
| | | <if test="terms.sexName != null and terms.sexName !=''"> |
| | | and sex_name = #{terms.sexName} |
| | | </if> |
| | | <if test="terms.extreme != null and terms.extreme !=''"> |
| | | and extreme = #{terms.extreme} |
| | | </if> |
| | | <if test="terms.agentRelate != null and terms.agentRelate !=''"> |
| | | and agent_relate = #{terms.agentRelate} |
| | | </if> |
| | | <if test="terms.agentRelateName != null and terms.agentRelateName !=''"> |
| | | and agent_relate_name = #{terms.agentRelateName} |
| | | </if> |
| | | <if test="terms.agentType != null and terms.agentType !=''"> |
| | | and agent_type = #{terms.agentType} |
| | | </if> |
| | | <if test="terms.agentTypeName != null and terms.agentTypeName !=''"> |
| | | and agent_type_name = #{terms.agentTypeName} |
| | | </if> |
| | | <if test="terms.personId != null and terms.personId !=''"> |
| | | and person_id = #{terms.personId} |
| | | </if> |
| | | <if test="terms.avatar != null and terms.avatar !=''"> |
| | | and avatar = #{terms.avatar} |
| | | </if> |
| | | <if test="terms.job != null and terms.job !=''"> |
| | | and job = #{terms.job} |
| | | </if> |
| | | <if test="terms.jobName != null and terms.jobName !=''"> |
| | | and job_name = #{terms.jobName} |
| | | </if> |
| | | <if test="terms.birthday != null and terms.birthday !=''"> |
| | | and birthday = #{terms.birthday} |
| | | </if> |
| | | <if test="terms.age != null and terms.age !=''"> |
| | | and age = #{terms.age} |
| | | </if> |
| | | <if test="terms.agentStatus != null and terms.agentStatus !=''"> |
| | | and agent_status = #{terms.agentStatus} |
| | | </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="updateCaseAgent"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <where> |
| | | id = #{entity.id} |
| | | </where> |
| | | </update> |
| | | <!-- 条件更新对象 --> |
| | | <update id="updateCaseAgentTerms"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <include refid="where-part"/> |
| | | </update> |
| | | <!-- 根据编号物理删除 --> |
| | | <delete id="deleteCaseAgent"> |
| | | 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="listIdByCaseId" resultType="java.lang.String"> |
| | | select |
| | | id |
| | | from |
| | | <include refid="table-name" /> |
| | | where case_id = #{caseId} |
| | | </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: wangwh |
| | | * @time:2024-08-27 10:00:57 |
| | | * @version 1.0.0 |
| | | --> |
| | | <mapper namespace="cn.huge.module.cases.dao.mapper.CaseInfoMapper"> |
| | | <!-- 结果集 --> |
| | | <resultMap id="dataResult" type="cn.huge.module.cases.domain.po.CaseInfo"> |
| | | <result property="id" column="id"/> |
| | | <result property="caseTitle" column="case_title"/> |
| | | <result property="caseRef" column="case_ref"/> |
| | | <result property="caseLevel" column="case_level"/> |
| | | <result property="visitTime" column="visit_time"/> |
| | | <result property="visitPeopleNum" column="visit_people_num"/> |
| | | <result property="mediType" column="medi_type"/> |
| | | <result property="mediTypeName" column="medi_type_name"/> |
| | | <result property="caseTypeFirst" column="case_type_first"/> |
| | | <result property="caseTypeFirstName" column="case_type_first_name"/> |
| | | <result property="caseType" column="case_type"/> |
| | | <result property="caseTypeName" column="case_type_name"/> |
| | | <result property="occurTime" column="occur_time"/> |
| | | <result property="addr" column="addr"/> |
| | | <result property="lng" column="lng"/> |
| | | <result property="lat" column="lat"/> |
| | | <result property="wgAddr" column="wg_addr"/> |
| | | <result property="wgLng" column="wg_lng"/> |
| | | <result property="wgLat" column="wg_lat"/> |
| | | <result property="queProv" column="que_prov"/> |
| | | <result property="queProvName" column="que_prov_name"/> |
| | | <result property="queCity" column="que_city"/> |
| | | <result property="queCityName" column="que_city_name"/> |
| | | <result property="queArea" column="que_area"/> |
| | | <result property="queAreaName" column="que_area_name"/> |
| | | <result property="queRoad" column="que_road"/> |
| | | <result property="queRoadName" column="que_road_name"/> |
| | | <result property="queVillage" column="que_village"/> |
| | | <result property="queVillageName" column="que_village_name"/> |
| | | <result property="peopleNum" column="people_num"/> |
| | | <result property="amount" column="amount"/> |
| | | <result property="crowd" column="crowd"/> |
| | | <result property="crowdName" column="crowd_name"/> |
| | | <result property="canal" column="canal"/> |
| | | <result property="canalName" column="canal_name"/> |
| | | <result property="visitWay" column="visit_way"/> |
| | | <result property="visitWayName" column="visit_way_name"/> |
| | | <result property="caseDes" column="case_des"/> |
| | | <result property="caseClaim" column="case_claim"/> |
| | | <result property="majorStatus" column="major_status"/> |
| | | <result property="source" column="source"/> |
| | | <result property="sourceName" column="source_name"/> |
| | | <result property="caseNo" column="case_no"/> |
| | | <result property="mediateNo" column="mediate_no"/> |
| | | <result property="mediateBookNo" column="mediate_book_no"/> |
| | | <result property="civilNo" column="civil_no"/> |
| | | <result property="plaintiffs" column="plaintiffs"/> |
| | | <result property="pagents" column="pagents"/> |
| | | <result property="defendants" column="defendants"/> |
| | | <result property="dagents" column="dagents"/> |
| | | <result property="inputUnitId" column="input_unit_id"/> |
| | | <result property="inputUnitName" column="input_unit_name"/> |
| | | <result property="inputUserId" column="input_user_id"/> |
| | | <result property="inputUserName" column="input_user_name"/> |
| | | <result property="inputWay" column="input_way"/> |
| | | <result property="status" column="status"/> |
| | | <result property="statusName" column="status_name"/> |
| | | <result property="process" column="process"/> |
| | | <result property="processName" column="process_name"/> |
| | | <result property="wantUnitId" column="want_unit_id"/> |
| | | <result property="wantUnitName" column="want_unit_name"/> |
| | | <result property="wantUserId" column="want_user_id"/> |
| | | <result property="wantUserName" column="want_user_name"/> |
| | | <result property="deleteStatus" column="delete_status"/> |
| | | <result property="custId" column="cust_id"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | <!-- 表 --> |
| | | <sql id='table-name'>dyh_case_info</sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | | id, |
| | | case_title, |
| | | case_ref, |
| | | case_level, |
| | | visit_time, |
| | | visit_people_num, |
| | | medi_type, |
| | | medi_type_name, |
| | | case_type_first, |
| | | case_type_first_name, |
| | | case_type, |
| | | case_type_name, |
| | | occur_time, |
| | | addr, |
| | | lng, |
| | | lat, |
| | | wg_addr, |
| | | wg_lng, |
| | | wg_lat, |
| | | que_prov, |
| | | que_prov_name, |
| | | que_city, |
| | | que_city_name, |
| | | que_area, |
| | | que_area_name, |
| | | que_road, |
| | | que_road_name, |
| | | que_village, |
| | | que_village_name, |
| | | people_num, |
| | | amount, |
| | | crowd, |
| | | crowd_name, |
| | | canal, |
| | | canal_name, |
| | | visit_way, |
| | | visit_way_name, |
| | | case_des, |
| | | case_claim, |
| | | major_status, |
| | | source, |
| | | source_name, |
| | | case_no, |
| | | mediate_no, |
| | | mediate_book_no, |
| | | civil_no, |
| | | plaintiffs, |
| | | pagents, |
| | | defendants, |
| | | dagents, |
| | | input_unit_id, |
| | | input_unit_name, |
| | | input_user_id, |
| | | input_user_name, |
| | | input_way, |
| | | status, |
| | | status_name, |
| | | process, |
| | | process_name, |
| | | want_unit_id, |
| | | want_unit_name, |
| | | want_user_id, |
| | | want_user_name, |
| | | delete_status, |
| | | cust_id, |
| | | create_time, |
| | | update_time |
| | | </sql> |
| | | <!-- 更新实体字段 --> |
| | | <sql id="set-part"> |
| | | <if test="entity.caseTitle != null">case_title = #{entity.caseTitle},</if> |
| | | <if test="entity.caseRef != null">case_ref = #{entity.caseRef},</if> |
| | | <if test="entity.caseLevel != null">case_level = #{entity.caseLevel},</if> |
| | | <if test="entity.visitTime != null">visit_time = #{entity.visitTime},</if> |
| | | <if test="entity.visitPeopleNum != null">visit_people_num = #{entity.visitPeopleNum},</if> |
| | | <if test="entity.mediType != null">medi_type = #{entity.mediType},</if> |
| | | <if test="entity.mediTypeName != null">medi_type_name = #{entity.mediTypeName},</if> |
| | | <if test="entity.caseTypeFirst != null">case_type_first = #{entity.caseTypeFirst},</if> |
| | | <if test="entity.caseTypeFirstName != null">case_type_first_name = #{entity.caseTypeFirstName},</if> |
| | | <if test="entity.caseType != null">case_type = #{entity.caseType},</if> |
| | | <if test="entity.caseTypeName != null">case_type_name = #{entity.caseTypeName},</if> |
| | | <if test="entity.occurTime != null">occur_time = #{entity.occurTime},</if> |
| | | <if test="entity.addr != null">addr = #{entity.addr},</if> |
| | | <if test="entity.lng != null">lng = #{entity.lng},</if> |
| | | <if test="entity.lat != null">lat = #{entity.lat},</if> |
| | | <if test="entity.wgAddr != null">wg_addr = #{entity.wgAddr},</if> |
| | | <if test="entity.wgLng != null">wg_lng = #{entity.wgLng},</if> |
| | | <if test="entity.wgLat != null">wg_lat = #{entity.wgLat},</if> |
| | | <if test="entity.queProv != null">que_prov = #{entity.queProv},</if> |
| | | <if test="entity.queProvName != null">que_prov_name = #{entity.queProvName},</if> |
| | | <if test="entity.queCity != null">que_city = #{entity.queCity},</if> |
| | | <if test="entity.queCityName != null">que_city_name = #{entity.queCityName},</if> |
| | | <if test="entity.queArea != null">que_area = #{entity.queArea},</if> |
| | | <if test="entity.queAreaName != null">que_area_name = #{entity.queAreaName},</if> |
| | | <if test="entity.queRoad != null">que_road = #{entity.queRoad},</if> |
| | | <if test="entity.queRoadName != null">que_road_name = #{entity.queRoadName},</if> |
| | | <if test="entity.queVillage != null">que_village = #{entity.queVillage},</if> |
| | | <if test="entity.queVillageName != null">que_village_name = #{entity.queVillageName},</if> |
| | | <if test="entity.peopleNum != null">people_num = #{entity.peopleNum},</if> |
| | | <if test="entity.amount != null">amount = #{entity.amount},</if> |
| | | <if test="entity.crowd != null">crowd = #{entity.crowd},</if> |
| | | <if test="entity.crowdName != null">crowd_name = #{entity.crowdName},</if> |
| | | <if test="entity.canal != null">canal = #{entity.canal},</if> |
| | | <if test="entity.canalName != null">canal_name = #{entity.canalName},</if> |
| | | <if test="entity.visitWay != null">visit_way = #{entity.visitWay},</if> |
| | | <if test="entity.visitWayName != null">visit_way_name = #{entity.visitWayName},</if> |
| | | <if test="entity.caseDes != null">case_des = #{entity.caseDes},</if> |
| | | <if test="entity.caseClaim != null">case_claim = #{entity.caseClaim},</if> |
| | | <if test="entity.majorStatus != null">major_status = #{entity.majorStatus},</if> |
| | | <if test="entity.source != null">source = #{entity.source},</if> |
| | | <if test="entity.sourceName != null">source_name = #{entity.sourceName},</if> |
| | | <if test="entity.caseNo != null">case_no = #{entity.caseNo},</if> |
| | | <if test="entity.mediateNo != null">mediate_no = #{entity.mediateNo},</if> |
| | | <if test="entity.mediateBookNo != null">mediate_book_no = #{entity.mediateBookNo},</if> |
| | | <if test="entity.civilNo != null">civil_no = #{entity.civilNo},</if> |
| | | <if test="entity.plaintiffs != null">plaintiffs = #{entity.plaintiffs},</if> |
| | | <if test="entity.pagents != null">pagents = #{entity.pagents},</if> |
| | | <if test="entity.defendants != null">defendants = #{entity.defendants},</if> |
| | | <if test="entity.dagents != null">dagents = #{entity.dagents},</if> |
| | | <if test="entity.inputUnitId != null">input_unit_id = #{entity.inputUnitId},</if> |
| | | <if test="entity.inputUnitName != null">input_unit_name = #{entity.inputUnitName},</if> |
| | | <if test="entity.inputUserId != null">input_user_id = #{entity.inputUserId},</if> |
| | | <if test="entity.inputUserName != null">input_user_name = #{entity.inputUserName},</if> |
| | | <if test="entity.inputWay != null">input_way = #{entity.inputWay},</if> |
| | | <if test="entity.status != null">status = #{entity.status},</if> |
| | | <if test="entity.statusName != null">status_name = #{entity.statusName},</if> |
| | | <if test="entity.process != null">process = #{entity.process},</if> |
| | | <if test="entity.processName != null">process_name = #{entity.processName},</if> |
| | | <if test="entity.wantUnitId != null">want_unit_id = #{entity.wantUnitId},</if> |
| | | <if test="entity.wantUnitName != null">want_unit_name = #{entity.wantUnitName},</if> |
| | | <if test="entity.wantUserId != null">want_user_id = #{entity.wantUserId},</if> |
| | | <if test="entity.wantUserName != null">want_user_name = #{entity.wantUserName},</if> |
| | | <if test="entity.deleteStatus != null">delete_status = #{entity.deleteStatus},</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.caseTitle != null and terms.caseTitle !=''"> |
| | | and case_title = #{terms.caseTitle} |
| | | </if> |
| | | <if test="terms.caseRef != null and terms.caseRef !=''"> |
| | | and case_ref = #{terms.caseRef} |
| | | </if> |
| | | <if test="terms.caseLevel != null and terms.caseLevel !=''"> |
| | | and case_level = #{terms.caseLevel} |
| | | </if> |
| | | <if test="terms.visitTime != null and terms.visitTime !=''"> |
| | | and visit_time = #{terms.visitTime} |
| | | </if> |
| | | <if test="terms.visitPeopleNum != null and terms.visitPeopleNum !=''"> |
| | | and visit_people_num = #{terms.visitPeopleNum} |
| | | </if> |
| | | <if test="terms.mediType != null and terms.mediType !=''"> |
| | | and medi_type = #{terms.mediType} |
| | | </if> |
| | | <if test="terms.mediTypeName != null and terms.mediTypeName !=''"> |
| | | and medi_type_name = #{terms.mediTypeName} |
| | | </if> |
| | | <if test="terms.caseTypeFirst != null and terms.caseTypeFirst !=''"> |
| | | and case_type_first = #{terms.caseTypeFirst} |
| | | </if> |
| | | <if test="terms.caseTypeFirstName != null and terms.caseTypeFirstName !=''"> |
| | | and case_type_first_name = #{terms.caseTypeFirstName} |
| | | </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.occurTime != null and terms.occurTime !=''"> |
| | | and occur_time = #{terms.occurTime} |
| | | </if> |
| | | <if test="terms.addr != null and terms.addr !=''"> |
| | | and addr = #{terms.addr} |
| | | </if> |
| | | <if test="terms.lng != null and terms.lng !=''"> |
| | | and lng = #{terms.lng} |
| | | </if> |
| | | <if test="terms.lat != null and terms.lat !=''"> |
| | | and lat = #{terms.lat} |
| | | </if> |
| | | <if test="terms.wgAddr != null and terms.wgAddr !=''"> |
| | | and wg_addr = #{terms.wgAddr} |
| | | </if> |
| | | <if test="terms.wgLng != null and terms.wgLng !=''"> |
| | | and wg_lng = #{terms.wgLng} |
| | | </if> |
| | | <if test="terms.wgLat != null and terms.wgLat !=''"> |
| | | and wg_lat = #{terms.wgLat} |
| | | </if> |
| | | <if test="terms.queProv != null and terms.queProv !=''"> |
| | | and que_prov = #{terms.queProv} |
| | | </if> |
| | | <if test="terms.queProvName != null and terms.queProvName !=''"> |
| | | and que_prov_name = #{terms.queProvName} |
| | | </if> |
| | | <if test="terms.queCity != null and terms.queCity !=''"> |
| | | and que_city = #{terms.queCity} |
| | | </if> |
| | | <if test="terms.queCityName != null and terms.queCityName !=''"> |
| | | and que_city_name = #{terms.queCityName} |
| | | </if> |
| | | <if test="terms.queArea != null and terms.queArea !=''"> |
| | | and que_area = #{terms.queArea} |
| | | </if> |
| | | <if test="terms.queAreaName != null and terms.queAreaName !=''"> |
| | | and que_area_name = #{terms.queAreaName} |
| | | </if> |
| | | <if test="terms.queRoad != null and terms.queRoad !=''"> |
| | | and que_road = #{terms.queRoad} |
| | | </if> |
| | | <if test="terms.queRoadName != null and terms.queRoadName !=''"> |
| | | and que_road_name = #{terms.queRoadName} |
| | | </if> |
| | | <if test="terms.queVillage != null and terms.queVillage !=''"> |
| | | and que_village = #{terms.queVillage} |
| | | </if> |
| | | <if test="terms.queVillageName != null and terms.queVillageName !=''"> |
| | | and que_village_name = #{terms.queVillageName} |
| | | </if> |
| | | <if test="terms.peopleNum != null and terms.peopleNum !=''"> |
| | | and people_num = #{terms.peopleNum} |
| | | </if> |
| | | <if test="terms.amount != null and terms.amount !=''"> |
| | | and amount = #{terms.amount} |
| | | </if> |
| | | <if test="terms.crowd != null and terms.crowd !=''"> |
| | | and crowd = #{terms.crowd} |
| | | </if> |
| | | <if test="terms.crowdName != null and terms.crowdName !=''"> |
| | | and crowd_name = #{terms.crowdName} |
| | | </if> |
| | | <if test="terms.canal != null and terms.canal !=''"> |
| | | and canal = #{terms.canal} |
| | | </if> |
| | | <if test="terms.canalName != null and terms.canalName !=''"> |
| | | and canal_name = #{terms.canalName} |
| | | </if> |
| | | <if test="terms.visitWay != null and terms.visitWay !=''"> |
| | | and visit_way = #{terms.visitWay} |
| | | </if> |
| | | <if test="terms.visitWayName != null and terms.visitWayName !=''"> |
| | | and visit_way_name = #{terms.visitWayName} |
| | | </if> |
| | | <if test="terms.caseDes != null and terms.caseDes !=''"> |
| | | and case_des = #{terms.caseDes} |
| | | </if> |
| | | <if test="terms.caseClaim != null and terms.caseClaim !=''"> |
| | | and case_claim = #{terms.caseClaim} |
| | | </if> |
| | | <if test="terms.majorStatus != null and terms.majorStatus !=''"> |
| | | and major_status = #{terms.majorStatus} |
| | | </if> |
| | | <if test="terms.source != null and terms.source !=''"> |
| | | and source = #{terms.source} |
| | | </if> |
| | | <if test="terms.sourceName != null and terms.sourceName !=''"> |
| | | and source_name = #{terms.sourceName} |
| | | </if> |
| | | <if test="terms.caseNo != null and terms.caseNo !=''"> |
| | | and case_no = #{terms.caseNo} |
| | | </if> |
| | | <if test="terms.mediateNo != null and terms.mediateNo !=''"> |
| | | and mediate_no = #{terms.mediateNo} |
| | | </if> |
| | | <if test="terms.mediateBookNo != null and terms.mediateBookNo !=''"> |
| | | and mediate_book_no = #{terms.mediateBookNo} |
| | | </if> |
| | | <if test="terms.civilNo != null and terms.civilNo !=''"> |
| | | and civil_no = #{terms.civilNo} |
| | | </if> |
| | | <if test="terms.plaintiffs != null and terms.plaintiffs !=''"> |
| | | and plaintiffs = #{terms.plaintiffs} |
| | | </if> |
| | | <if test="terms.pagents != null and terms.pagents !=''"> |
| | | and pagents = #{terms.pagents} |
| | | </if> |
| | | <if test="terms.defendants != null and terms.defendants !=''"> |
| | | and defendants = #{terms.defendants} |
| | | </if> |
| | | <if test="terms.dagents != null and terms.dagents !=''"> |
| | | and dagents = #{terms.dagents} |
| | | </if> |
| | | <if test="terms.inputUnitId != null and terms.inputUnitId !=''"> |
| | | and input_unit_id = #{terms.inputUnitId} |
| | | </if> |
| | | <if test="terms.inputUnitName != null and terms.inputUnitName !=''"> |
| | | and input_unit_name = #{terms.inputUnitName} |
| | | </if> |
| | | <if test="terms.inputUserId != null and terms.inputUserId !=''"> |
| | | and input_user_id = #{terms.inputUserId} |
| | | </if> |
| | | <if test="terms.inputUserName != null and terms.inputUserName !=''"> |
| | | and input_user_name = #{terms.inputUserName} |
| | | </if> |
| | | <if test="terms.inputWay != null and terms.inputWay !=''"> |
| | | and input_way = #{terms.inputWay} |
| | | </if> |
| | | <if test="terms.status != null and terms.status !=''"> |
| | | and status = #{terms.status} |
| | | </if> |
| | | <if test="terms.statusName != null and terms.statusName !=''"> |
| | | and status_name = #{terms.statusName} |
| | | </if> |
| | | <if test="terms.process != null and terms.process !=''"> |
| | | and process = #{terms.process} |
| | | </if> |
| | | <if test="terms.processName != null and terms.processName !=''"> |
| | | and process_name = #{terms.processName} |
| | | </if> |
| | | <if test="terms.wantUnitId != null and terms.wantUnitId !=''"> |
| | | and want_unit_id = #{terms.wantUnitId} |
| | | </if> |
| | | <if test="terms.wantUnitName != null and terms.wantUnitName !=''"> |
| | | and want_unit_name = #{terms.wantUnitName} |
| | | </if> |
| | | <if test="terms.wantUserId != null and terms.wantUserId !=''"> |
| | | and want_user_id = #{terms.wantUserId} |
| | | </if> |
| | | <if test="terms.wantUserName != null and terms.wantUserName !=''"> |
| | | and want_user_name = #{terms.wantUserName} |
| | | </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.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="updateCaseInfo"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <where> |
| | | id = #{entity.id} |
| | | </where> |
| | | </update> |
| | | <!-- 条件更新对象 --> |
| | | <update id="updateCaseInfoTerms"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <include refid="where-part"/> |
| | | </update> |
| | | <!-- 根据编号物理删除 --> |
| | | <delete id="deleteCaseInfo"> |
| | | 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: wangwh |
| | | * @time:2024-08-27 20:36:04 |
| | | * @version 1.0.0 |
| | | --> |
| | | <mapper namespace="cn.huge.module.cases.dao.mapper.CaseInfoUnfoldMapper"> |
| | | <!-- 结果集 --> |
| | | <resultMap id="dataResult" type="cn.huge.module.cases.domain.po.CaseInfoUnfold"> |
| | | <result property="id" column="id"/> |
| | | <result property="caseId" column="case_id"/> |
| | | <result property="mediateUnitId" column="mediate_unit_id"/> |
| | | <result property="mediateUnitName" column="mediate_unit_name"/> |
| | | <result property="mediateDeptId" column="mediate_dept_id"/> |
| | | <result property="mediateDeptName" column="mediate_dept_name"/> |
| | | <result property="mediatorId" column="mediator_id"/> |
| | | <result property="mediator" column="mediator"/> |
| | | <result property="mediatorMobile" column="mediator_mobile"/> |
| | | <result property="mediStartTime" column="medi_start_time"/> |
| | | <result property="mediEndTime" column="medi_end_time"/> |
| | | <result property="mediResult" column="medi_result"/> |
| | | <result property="mediResultName" column="medi_result_name"/> |
| | | <result property="agreeType" column="agree_type"/> |
| | | <result property="agreeTypeName" column="agree_type_name"/> |
| | | <result property="agreeContent" column="agree_content"/> |
| | | <result property="windupContent" column="windup_content"/> |
| | | <result property="mediFalse" column="medi_false"/> |
| | | <result property="mediFalseName" column="medi_false_name"/> |
| | | <result property="civilStatus" column="civil_status"/> |
| | | <result property="courtId" column="court_id"/> |
| | | <result property="courtName" column="court_name"/> |
| | | <result property="judicApply" column="judic_apply"/> |
| | | <result property="judicResult" column="judic_result"/> |
| | | <result property="judicResultName" column="judic_result_name"/> |
| | | <result property="fileStatus" column="file_status"/> |
| | | <result property="fileUserId" column="file_user_id"/> |
| | | <result property="fileUserName" column="file_user_name"/> |
| | | <result property="fileTime" column="file_time"/> |
| | | <result property="fileYear" column="file_year"/> |
| | | <result property="fileBookName" column="file_book_name"/> |
| | | <result property="fileBookNo" column="file_book_no"/> |
| | | <result property="fileNo" column="file_no"/> |
| | | <result property="fileLimitYear" column="file_limit_year"/> |
| | | <result property="fileAddr" column="file_addr"/> |
| | | <result property="fileContent" column="file_content"/> |
| | | <result property="fulfilSitu" column="fulfil_situ"/> |
| | | <result property="fulfilSituName" column="fulfil_situ_name"/> |
| | | <result property="visitUpStatus" column="visit_up_status"/> |
| | | <result property="visitUpContent" column="visit_up_content"/> |
| | | <result property="partyJoy" column="party_joy"/> |
| | | <result property="custId" column="cust_id"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | <!-- 表 --> |
| | | <sql id='table-name'>dyh_case_info_unfold</sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | | id, |
| | | case_id, |
| | | mediate_unit_id, |
| | | mediate_unit_name, |
| | | mediate_dept_id, |
| | | mediate_dept_name, |
| | | mediator_id, |
| | | mediator, |
| | | mediator_mobile, |
| | | medi_start_time, |
| | | medi_end_time, |
| | | medi_result, |
| | | medi_result_name, |
| | | agree_type, |
| | | agree_type_name, |
| | | agree_content, |
| | | windup_content, |
| | | medi_false, |
| | | medi_false_name, |
| | | civil_status, |
| | | court_id, |
| | | court_name, |
| | | judic_apply, |
| | | judic_result, |
| | | judic_result_name, |
| | | file_status, |
| | | file_user_id, |
| | | file_user_name, |
| | | file_time, |
| | | file_year, |
| | | file_book_name, |
| | | file_book_no, |
| | | file_no, |
| | | file_limit_year, |
| | | file_addr, |
| | | file_content, |
| | | fulfil_situ, |
| | | fulfil_situ_name, |
| | | visit_up_status, |
| | | visit_up_content, |
| | | party_joy, |
| | | cust_id, |
| | | create_time, |
| | | update_time |
| | | </sql> |
| | | <!-- 更新实体字段 --> |
| | | <sql id="set-part"> |
| | | <if test="entity.caseId != null">case_id = #{entity.caseId},</if> |
| | | <if test="entity.mediateUnitId != null">mediate_unit_id = #{entity.mediateUnitId},</if> |
| | | <if test="entity.mediateUnitName != null">mediate_unit_name = #{entity.mediateUnitName},</if> |
| | | <if test="entity.mediateDeptId != null">mediate_dept_id = #{entity.mediateDeptId},</if> |
| | | <if test="entity.mediateDeptName != null">mediate_dept_name = #{entity.mediateDeptName},</if> |
| | | <if test="entity.mediatorId != null">mediator_id = #{entity.mediatorId},</if> |
| | | <if test="entity.mediator != null">mediator = #{entity.mediator},</if> |
| | | <if test="entity.mediatorMobile != null">mediator_mobile = #{entity.mediatorMobile},</if> |
| | | <if test="entity.mediStartTime != null">medi_start_time = #{entity.mediStartTime},</if> |
| | | <if test="entity.mediEndTime != null">medi_end_time = #{entity.mediEndTime},</if> |
| | | <if test="entity.mediResult != null">medi_result = #{entity.mediResult},</if> |
| | | <if test="entity.mediResultName != null">medi_result_name = #{entity.mediResultName},</if> |
| | | <if test="entity.agreeType != null">agree_type = #{entity.agreeType},</if> |
| | | <if test="entity.agreeTypeName != null">agree_type_name = #{entity.agreeTypeName},</if> |
| | | <if test="entity.agreeContent != null">agree_content = #{entity.agreeContent},</if> |
| | | <if test="entity.windupContent != null">windup_content = #{entity.windupContent},</if> |
| | | <if test="entity.mediFalse != null">medi_false = #{entity.mediFalse},</if> |
| | | <if test="entity.mediFalseName != null">medi_false_name = #{entity.mediFalseName},</if> |
| | | <if test="entity.civilStatus != null">civil_status = #{entity.civilStatus},</if> |
| | | <if test="entity.courtId != null">court_id = #{entity.courtId},</if> |
| | | <if test="entity.courtName != null">court_name = #{entity.courtName},</if> |
| | | <if test="entity.judicApply != null">judic_apply = #{entity.judicApply},</if> |
| | | <if test="entity.judicResult != null">judic_result = #{entity.judicResult},</if> |
| | | <if test="entity.judicResultName != null">judic_result_name = #{entity.judicResultName},</if> |
| | | <if test="entity.fileStatus != null">file_status = #{entity.fileStatus},</if> |
| | | <if test="entity.fileUserId != null">file_user_id = #{entity.fileUserId},</if> |
| | | <if test="entity.fileUserName != null">file_user_name = #{entity.fileUserName},</if> |
| | | <if test="entity.fileTime != null">file_time = #{entity.fileTime},</if> |
| | | <if test="entity.fileYear != null">file_year = #{entity.fileYear},</if> |
| | | <if test="entity.fileBookName != null">file_book_name = #{entity.fileBookName},</if> |
| | | <if test="entity.fileBookNo != null">file_book_no = #{entity.fileBookNo},</if> |
| | | <if test="entity.fileNo != null">file_no = #{entity.fileNo},</if> |
| | | <if test="entity.fileLimitYear != null">file_limit_year = #{entity.fileLimitYear},</if> |
| | | <if test="entity.fileAddr != null">file_addr = #{entity.fileAddr},</if> |
| | | <if test="entity.fileContent != null">file_content = #{entity.fileContent},</if> |
| | | <if test="entity.fulfilSitu != null">fulfil_situ = #{entity.fulfilSitu},</if> |
| | | <if test="entity.fulfilSituName != null">fulfil_situ_name = #{entity.fulfilSituName},</if> |
| | | <if test="entity.visitUpStatus != null">visit_up_status = #{entity.visitUpStatus},</if> |
| | | <if test="entity.visitUpContent != null">visit_up_content = #{entity.visitUpContent},</if> |
| | | <if test="entity.partyJoy != null">party_joy = #{entity.partyJoy},</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.caseId != null and terms.caseId !=''"> |
| | | and case_id = #{terms.caseId} |
| | | </if> |
| | | <if test="terms.mediateUnitId != null and terms.mediateUnitId !=''"> |
| | | and mediate_unit_id = #{terms.mediateUnitId} |
| | | </if> |
| | | <if test="terms.mediateUnitName != null and terms.mediateUnitName !=''"> |
| | | and mediate_unit_name = #{terms.mediateUnitName} |
| | | </if> |
| | | <if test="terms.mediateDeptId != null and terms.mediateDeptId !=''"> |
| | | and mediate_dept_id = #{terms.mediateDeptId} |
| | | </if> |
| | | <if test="terms.mediateDeptName != null and terms.mediateDeptName !=''"> |
| | | and mediate_dept_name = #{terms.mediateDeptName} |
| | | </if> |
| | | <if test="terms.mediatorId != null and terms.mediatorId !=''"> |
| | | and mediator_id = #{terms.mediatorId} |
| | | </if> |
| | | <if test="terms.mediator != null and terms.mediator !=''"> |
| | | and mediator = #{terms.mediator} |
| | | </if> |
| | | <if test="terms.mediatorMobile != null and terms.mediatorMobile !=''"> |
| | | and mediator_mobile = #{terms.mediatorMobile} |
| | | </if> |
| | | <if test="terms.mediStartTime != null and terms.mediStartTime !=''"> |
| | | and medi_start_time = #{terms.mediStartTime} |
| | | </if> |
| | | <if test="terms.mediEndTime != null and terms.mediEndTime !=''"> |
| | | and medi_end_time = #{terms.mediEndTime} |
| | | </if> |
| | | <if test="terms.mediResult != null and terms.mediResult !=''"> |
| | | and medi_result = #{terms.mediResult} |
| | | </if> |
| | | <if test="terms.mediResultName != null and terms.mediResultName !=''"> |
| | | and medi_result_name = #{terms.mediResultName} |
| | | </if> |
| | | <if test="terms.agreeType != null and terms.agreeType !=''"> |
| | | and agree_type = #{terms.agreeType} |
| | | </if> |
| | | <if test="terms.agreeTypeName != null and terms.agreeTypeName !=''"> |
| | | and agree_type_name = #{terms.agreeTypeName} |
| | | </if> |
| | | <if test="terms.agreeContent != null and terms.agreeContent !=''"> |
| | | and agree_content = #{terms.agreeContent} |
| | | </if> |
| | | <if test="terms.windupContent != null and terms.windupContent !=''"> |
| | | and windup_content = #{terms.windupContent} |
| | | </if> |
| | | <if test="terms.mediFalse != null and terms.mediFalse !=''"> |
| | | and medi_false = #{terms.mediFalse} |
| | | </if> |
| | | <if test="terms.mediFalseName != null and terms.mediFalseName !=''"> |
| | | and medi_false_name = #{terms.mediFalseName} |
| | | </if> |
| | | <if test="terms.civilStatus != null and terms.civilStatus !=''"> |
| | | and civil_status = #{terms.civilStatus} |
| | | </if> |
| | | <if test="terms.courtId != null and terms.courtId !=''"> |
| | | and court_id = #{terms.courtId} |
| | | </if> |
| | | <if test="terms.courtName != null and terms.courtName !=''"> |
| | | and court_name = #{terms.courtName} |
| | | </if> |
| | | <if test="terms.judicApply != null and terms.judicApply !=''"> |
| | | and judic_apply = #{terms.judicApply} |
| | | </if> |
| | | <if test="terms.judicResult != null and terms.judicResult !=''"> |
| | | and judic_result = #{terms.judicResult} |
| | | </if> |
| | | <if test="terms.judicResultName != null and terms.judicResultName !=''"> |
| | | and judic_result_name = #{terms.judicResultName} |
| | | </if> |
| | | <if test="terms.fileStatus != null and terms.fileStatus !=''"> |
| | | and file_status = #{terms.fileStatus} |
| | | </if> |
| | | <if test="terms.fileUserId != null and terms.fileUserId !=''"> |
| | | and file_user_id = #{terms.fileUserId} |
| | | </if> |
| | | <if test="terms.fileUserName != null and terms.fileUserName !=''"> |
| | | and file_user_name = #{terms.fileUserName} |
| | | </if> |
| | | <if test="terms.fileTime != null and terms.fileTime !=''"> |
| | | and file_time = #{terms.fileTime} |
| | | </if> |
| | | <if test="terms.fileYear != null and terms.fileYear !=''"> |
| | | and file_year = #{terms.fileYear} |
| | | </if> |
| | | <if test="terms.fileBookName != null and terms.fileBookName !=''"> |
| | | and file_book_name = #{terms.fileBookName} |
| | | </if> |
| | | <if test="terms.fileBookNo != null and terms.fileBookNo !=''"> |
| | | and file_book_no = #{terms.fileBookNo} |
| | | </if> |
| | | <if test="terms.fileNo != null and terms.fileNo !=''"> |
| | | and file_no = #{terms.fileNo} |
| | | </if> |
| | | <if test="terms.fileLimitYear != null and terms.fileLimitYear !=''"> |
| | | and file_limit_year = #{terms.fileLimitYear} |
| | | </if> |
| | | <if test="terms.fileAddr != null and terms.fileAddr !=''"> |
| | | and file_addr = #{terms.fileAddr} |
| | | </if> |
| | | <if test="terms.fileContent != null and terms.fileContent !=''"> |
| | | and file_content = #{terms.fileContent} |
| | | </if> |
| | | <if test="terms.fulfilSitu != null and terms.fulfilSitu !=''"> |
| | | and fulfil_situ = #{terms.fulfilSitu} |
| | | </if> |
| | | <if test="terms.fulfilSituName != null and terms.fulfilSituName !=''"> |
| | | and fulfil_situ_name = #{terms.fulfilSituName} |
| | | </if> |
| | | <if test="terms.visitUpStatus != null and terms.visitUpStatus !=''"> |
| | | and visit_up_status = #{terms.visitUpStatus} |
| | | </if> |
| | | <if test="terms.visitUpContent != null and terms.visitUpContent !=''"> |
| | | and visit_up_content = #{terms.visitUpContent} |
| | | </if> |
| | | <if test="terms.partyJoy != null and terms.partyJoy !=''"> |
| | | and party_joy = #{terms.partyJoy} |
| | | </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="updateCaseInfoUnfold"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <where> |
| | | id = #{entity.id} |
| | | </where> |
| | | </update> |
| | | <!-- 条件更新对象 --> |
| | | <update id="updateCaseInfoUnfoldTerms"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <include refid="where-part"/> |
| | | </update> |
| | | <!-- 根据编号物理删除 --> |
| | | <delete id="deleteCaseInfoUnfold"> |
| | | 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: wangwh |
| | | * @time:2024-08-27 10:48:18 |
| | | * @version 1.0.0 |
| | | --> |
| | | <mapper namespace="cn.huge.module.cases.dao.mapper.CasePersonMapper"> |
| | | <!-- 结果集 --> |
| | | <resultMap id="dataResult" type="cn.huge.module.cases.domain.po.CasePerson"> |
| | | <result property="id" column="id"/> |
| | | <result property="caseId" column="case_id"/> |
| | | <result property="partyUserId" column="party_user_id"/> |
| | | <result property="perType" column="per_type"/> |
| | | <result property="perTypeName" column="per_type_name"/> |
| | | <result property="perClass" column="per_class"/> |
| | | <result property="perClassName" column="per_class_name"/> |
| | | <result property="trueName" column="true_name"/> |
| | | <result property="mobile" column="mobile"/> |
| | | <result property="orgaCode" column="orga_code"/> |
| | | <result property="deputy" column="deputy"/> |
| | | <result property="orgaType" column="orga_type"/> |
| | | <result property="orgaTypeName" column="orga_type_name"/> |
| | | <result property="certiType" column="certi_type"/> |
| | | <result property="certiTypeName" column="certi_type_name"/> |
| | | <result property="certiNo" column="certi_no"/> |
| | | <result property="prov" column="prov"/> |
| | | <result property="provName" column="prov_name"/> |
| | | <result property="city" column="city"/> |
| | | <result property="cityName" column="city_name"/> |
| | | <result property="area" column="area"/> |
| | | <result property="areaName" column="area_name"/> |
| | | <result property="road" column="road"/> |
| | | <result property="roadName" column="road_name"/> |
| | | <result property="village" column="village"/> |
| | | <result property="villageName" column="village_name"/> |
| | | <result property="addr" column="addr"/> |
| | | <result property="placeProv" column="place_prov"/> |
| | | <result property="placeProvName" column="place_prov_name"/> |
| | | <result property="placeCity" column="place_city"/> |
| | | <result property="placeCityName" column="place_city_name"/> |
| | | <result property="placeArea" column="place_area"/> |
| | | <result property="placeAreaName" column="place_area_name"/> |
| | | <result property="placeRoad" column="place_road"/> |
| | | <result property="placeRoadName" column="place_road_name"/> |
| | | <result property="placeVillage" column="place_village"/> |
| | | <result property="placeVillageName" column="place_village_name"/> |
| | | <result property="placeAddr" column="place_addr"/> |
| | | <result property="workUnit" column="work_unit"/> |
| | | <result property="nation" column="nation"/> |
| | | <result property="nationName" column="nation_name"/> |
| | | <result property="sex" column="sex"/> |
| | | <result property="sexName" column="sex_name"/> |
| | | <result property="extreme" column="extreme"/> |
| | | <result property="avatar" column="avatar"/> |
| | | <result property="job" column="job"/> |
| | | <result property="jobName" column="job_name"/> |
| | | <result property="birthday" column="birthday"/> |
| | | <result property="age" column="age"/> |
| | | <result property="agentStatus" column="agent_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_person</sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | | id, |
| | | case_id, |
| | | party_user_id, |
| | | per_type, |
| | | per_type_name, |
| | | per_class, |
| | | per_class_name, |
| | | true_name, |
| | | mobile, |
| | | orga_code, |
| | | deputy, |
| | | orga_type, |
| | | orga_type_name, |
| | | certi_type, |
| | | certi_type_name, |
| | | certi_no, |
| | | prov, |
| | | prov_name, |
| | | city, |
| | | city_name, |
| | | area, |
| | | area_name, |
| | | road, |
| | | road_name, |
| | | village, |
| | | village_name, |
| | | addr, |
| | | place_prov, |
| | | place_prov_name, |
| | | place_city, |
| | | place_city_name, |
| | | place_area, |
| | | place_area_name, |
| | | place_road, |
| | | place_road_name, |
| | | place_village, |
| | | place_village_name, |
| | | place_addr, |
| | | work_unit, |
| | | nation, |
| | | nation_name, |
| | | sex, |
| | | sex_name, |
| | | extreme, |
| | | avatar, |
| | | job, |
| | | job_name, |
| | | birthday, |
| | | age, |
| | | agent_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.partyUserId != null">party_user_id = #{entity.partyUserId},</if> |
| | | <if test="entity.perType != null">per_type = #{entity.perType},</if> |
| | | <if test="entity.perTypeName != null">per_type_name = #{entity.perTypeName},</if> |
| | | <if test="entity.perClass != null">per_class = #{entity.perClass},</if> |
| | | <if test="entity.perClassName != null">per_class_name = #{entity.perClassName},</if> |
| | | <if test="entity.trueName != null">true_name = #{entity.trueName},</if> |
| | | <if test="entity.mobile != null">mobile = #{entity.mobile},</if> |
| | | <if test="entity.orgaCode != null">orga_code = #{entity.orgaCode},</if> |
| | | <if test="entity.deputy != null">deputy = #{entity.deputy},</if> |
| | | <if test="entity.orgaType != null">orga_type = #{entity.orgaType},</if> |
| | | <if test="entity.orgaTypeName != null">orga_type_name = #{entity.orgaTypeName},</if> |
| | | <if test="entity.certiType != null">certi_type = #{entity.certiType},</if> |
| | | <if test="entity.certiTypeName != null">certi_type_name = #{entity.certiTypeName},</if> |
| | | <if test="entity.certiNo != null">certi_no = #{entity.certiNo},</if> |
| | | <if test="entity.prov != null">prov = #{entity.prov},</if> |
| | | <if test="entity.provName != null">prov_name = #{entity.provName},</if> |
| | | <if test="entity.city != null">city = #{entity.city},</if> |
| | | <if test="entity.cityName != null">city_name = #{entity.cityName},</if> |
| | | <if test="entity.area != null">area = #{entity.area},</if> |
| | | <if test="entity.areaName != null">area_name = #{entity.areaName},</if> |
| | | <if test="entity.road != null">road = #{entity.road},</if> |
| | | <if test="entity.roadName != null">road_name = #{entity.roadName},</if> |
| | | <if test="entity.village != null">village = #{entity.village},</if> |
| | | <if test="entity.villageName != null">village_name = #{entity.villageName},</if> |
| | | <if test="entity.addr != null">addr = #{entity.addr},</if> |
| | | <if test="entity.placeProv != null">place_prov = #{entity.placeProv},</if> |
| | | <if test="entity.placeProvName != null">place_prov_name = #{entity.placeProvName},</if> |
| | | <if test="entity.placeCity != null">place_city = #{entity.placeCity},</if> |
| | | <if test="entity.placeCityName != null">place_city_name = #{entity.placeCityName},</if> |
| | | <if test="entity.placeArea != null">place_area = #{entity.placeArea},</if> |
| | | <if test="entity.placeAreaName != null">place_area_name = #{entity.placeAreaName},</if> |
| | | <if test="entity.placeRoad != null">place_road = #{entity.placeRoad},</if> |
| | | <if test="entity.placeRoadName != null">place_road_name = #{entity.placeRoadName},</if> |
| | | <if test="entity.placeVillage != null">place_village = #{entity.placeVillage},</if> |
| | | <if test="entity.placeVillageName != null">place_village_name = #{entity.placeVillageName},</if> |
| | | <if test="entity.placeAddr != null">place_addr = #{entity.placeAddr},</if> |
| | | <if test="entity.workUnit != null">work_unit = #{entity.workUnit},</if> |
| | | <if test="entity.nation != null">nation = #{entity.nation},</if> |
| | | <if test="entity.nationName != null">nation_name = #{entity.nationName},</if> |
| | | <if test="entity.sex != null">sex = #{entity.sex},</if> |
| | | <if test="entity.sexName != null">sex_name = #{entity.sexName},</if> |
| | | <if test="entity.extreme != null">extreme = #{entity.extreme},</if> |
| | | <if test="entity.avatar != null">avatar = #{entity.avatar},</if> |
| | | <if test="entity.job != null">job = #{entity.job},</if> |
| | | <if test="entity.jobName != null">job_name = #{entity.jobName},</if> |
| | | <if test="entity.birthday != null">birthday = #{entity.birthday},</if> |
| | | <if test="entity.age != null">age = #{entity.age},</if> |
| | | <if test="entity.agentStatus != null">agent_status = #{entity.agentStatus},</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.partyUserId != null and terms.partyUserId !=''"> |
| | | and party_user_id = #{terms.partyUserId} |
| | | </if> |
| | | <if test="terms.perType != null and terms.perType !=''"> |
| | | and per_type = #{terms.perType} |
| | | </if> |
| | | <if test="terms.perTypeName != null and terms.perTypeName !=''"> |
| | | and per_type_name = #{terms.perTypeName} |
| | | </if> |
| | | <if test="terms.perClass != null and terms.perClass !=''"> |
| | | and per_class = #{terms.perClass} |
| | | </if> |
| | | <if test="terms.perClassName != null and terms.perClassName !=''"> |
| | | and per_class_name = #{terms.perClassName} |
| | | </if> |
| | | <if test="terms.trueName != null and terms.trueName !=''"> |
| | | and true_name = #{terms.trueName} |
| | | </if> |
| | | <if test="terms.mobile != null and terms.mobile !=''"> |
| | | and mobile = #{terms.mobile} |
| | | </if> |
| | | <if test="terms.orgaCode != null and terms.orgaCode !=''"> |
| | | and orga_code = #{terms.orgaCode} |
| | | </if> |
| | | <if test="terms.deputy != null and terms.deputy !=''"> |
| | | and deputy = #{terms.deputy} |
| | | </if> |
| | | <if test="terms.orgaType != null and terms.orgaType !=''"> |
| | | and orga_type = #{terms.orgaType} |
| | | </if> |
| | | <if test="terms.orgaTypeName != null and terms.orgaTypeName !=''"> |
| | | and orga_type_name = #{terms.orgaTypeName} |
| | | </if> |
| | | <if test="terms.certiType != null and terms.certiType !=''"> |
| | | and certi_type = #{terms.certiType} |
| | | </if> |
| | | <if test="terms.certiTypeName != null and terms.certiTypeName !=''"> |
| | | and certi_type_name = #{terms.certiTypeName} |
| | | </if> |
| | | <if test="terms.certiNo != null and terms.certiNo !=''"> |
| | | and certi_no = #{terms.certiNo} |
| | | </if> |
| | | <if test="terms.prov != null and terms.prov !=''"> |
| | | and prov = #{terms.prov} |
| | | </if> |
| | | <if test="terms.provName != null and terms.provName !=''"> |
| | | and prov_name = #{terms.provName} |
| | | </if> |
| | | <if test="terms.city != null and terms.city !=''"> |
| | | and city = #{terms.city} |
| | | </if> |
| | | <if test="terms.cityName != null and terms.cityName !=''"> |
| | | and city_name = #{terms.cityName} |
| | | </if> |
| | | <if test="terms.area != null and terms.area !=''"> |
| | | and area = #{terms.area} |
| | | </if> |
| | | <if test="terms.areaName != null and terms.areaName !=''"> |
| | | and area_name = #{terms.areaName} |
| | | </if> |
| | | <if test="terms.road != null and terms.road !=''"> |
| | | and road = #{terms.road} |
| | | </if> |
| | | <if test="terms.roadName != null and terms.roadName !=''"> |
| | | and road_name = #{terms.roadName} |
| | | </if> |
| | | <if test="terms.village != null and terms.village !=''"> |
| | | and village = #{terms.village} |
| | | </if> |
| | | <if test="terms.villageName != null and terms.villageName !=''"> |
| | | and village_name = #{terms.villageName} |
| | | </if> |
| | | <if test="terms.addr != null and terms.addr !=''"> |
| | | and addr = #{terms.addr} |
| | | </if> |
| | | <if test="terms.placeProv != null and terms.placeProv !=''"> |
| | | and place_prov = #{terms.placeProv} |
| | | </if> |
| | | <if test="terms.placeProvName != null and terms.placeProvName !=''"> |
| | | and place_prov_name = #{terms.placeProvName} |
| | | </if> |
| | | <if test="terms.placeCity != null and terms.placeCity !=''"> |
| | | and place_city = #{terms.placeCity} |
| | | </if> |
| | | <if test="terms.placeCityName != null and terms.placeCityName !=''"> |
| | | and place_city_name = #{terms.placeCityName} |
| | | </if> |
| | | <if test="terms.placeArea != null and terms.placeArea !=''"> |
| | | and place_area = #{terms.placeArea} |
| | | </if> |
| | | <if test="terms.placeAreaName != null and terms.placeAreaName !=''"> |
| | | and place_area_name = #{terms.placeAreaName} |
| | | </if> |
| | | <if test="terms.placeRoad != null and terms.placeRoad !=''"> |
| | | and place_road = #{terms.placeRoad} |
| | | </if> |
| | | <if test="terms.placeRoadName != null and terms.placeRoadName !=''"> |
| | | and place_road_name = #{terms.placeRoadName} |
| | | </if> |
| | | <if test="terms.placeVillage != null and terms.placeVillage !=''"> |
| | | and place_village = #{terms.placeVillage} |
| | | </if> |
| | | <if test="terms.placeVillageName != null and terms.placeVillageName !=''"> |
| | | and place_village_name = #{terms.placeVillageName} |
| | | </if> |
| | | <if test="terms.placeAddr != null and terms.placeAddr !=''"> |
| | | and place_addr = #{terms.placeAddr} |
| | | </if> |
| | | <if test="terms.workUnit != null and terms.workUnit !=''"> |
| | | and work_unit = #{terms.workUnit} |
| | | </if> |
| | | <if test="terms.nation != null and terms.nation !=''"> |
| | | and nation = #{terms.nation} |
| | | </if> |
| | | <if test="terms.nationName != null and terms.nationName !=''"> |
| | | and nation_name = #{terms.nationName} |
| | | </if> |
| | | <if test="terms.sex != null and terms.sex !=''"> |
| | | and sex = #{terms.sex} |
| | | </if> |
| | | <if test="terms.sexName != null and terms.sexName !=''"> |
| | | and sex_name = #{terms.sexName} |
| | | </if> |
| | | <if test="terms.extreme != null and terms.extreme !=''"> |
| | | and extreme = #{terms.extreme} |
| | | </if> |
| | | <if test="terms.avatar != null and terms.avatar !=''"> |
| | | and avatar = #{terms.avatar} |
| | | </if> |
| | | <if test="terms.job != null and terms.job !=''"> |
| | | and job = #{terms.job} |
| | | </if> |
| | | <if test="terms.jobName != null and terms.jobName !=''"> |
| | | and job_name = #{terms.jobName} |
| | | </if> |
| | | <if test="terms.birthday != null and terms.birthday !=''"> |
| | | and birthday = #{terms.birthday} |
| | | </if> |
| | | <if test="terms.age != null and terms.age !=''"> |
| | | and age = #{terms.age} |
| | | </if> |
| | | <if test="terms.agentStatus != null and terms.agentStatus !=''"> |
| | | and agent_status = #{terms.agentStatus} |
| | | </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="updateCasePerson"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <where> |
| | | id = #{entity.id} |
| | | </where> |
| | | </update> |
| | | <!-- 条件更新对象 --> |
| | | <update id="updateCasePersonTerms"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <include refid="where-part"/> |
| | | </update> |
| | | <!-- 根据编号物理删除 --> |
| | | <delete id="deleteCasePerson"> |
| | | 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="listIdByCaseId" resultType="java.lang.String"> |
| | | select |
| | | id |
| | | from |
| | | <include refid="table-name" /> |
| | | where case_id = #{caseId} |
| | | </select> |
| | | </mapper> |
| New file |
| | |
| | | package cn.huge.module.cases.domain.bo; |
| | | |
| | | import cn.huge.module.cases.domain.po.CaseAgent; |
| | | |
| | | /** |
| | | * @title: 纠纷代理人信息表业务扩展类 |
| | | * @description: 纠纷代理人信息表业务扩展类 |
| | | * @company: hugeinfo |
| | | * @author: wangwh |
| | | * @time: 2024-08-27 10:48:17 |
| | | * @version: 1.0.0 |
| | | * @see cn.huge.module.cases.domain.po.CaseAgent |
| | | */ |
| | | public class CaseAgentBO extends CaseAgent { |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.cases.domain.bo; |
| | | |
| | | import cn.huge.module.cases.domain.po.CaseInfo; |
| | | |
| | | /** |
| | | * @title: 纠纷信息主表业务扩展类 |
| | | * @description: 纠纷信息主表业务扩展类 |
| | | * @company: hugeinfo |
| | | * @author: wangwh |
| | | * @time: 2024-08-27 10:00:57 |
| | | * @version: 1.0.0 |
| | | * @see cn.huge.module.cases.domain.po.CaseInfo |
| | | */ |
| | | public class CaseInfoBO extends CaseInfo { |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.cases.domain.bo; |
| | | |
| | | import cn.huge.module.cases.domain.po.CaseInfoUnfold; |
| | | |
| | | /** |
| | | * @title: 纠纷信息扩展表业务扩展类 |
| | | * @description: 纠纷信息扩展表业务扩展类 |
| | | * @company: hugeinfo |
| | | * @author: wangwh |
| | | * @time: 2024-08-27 20:36:04 |
| | | * @version: 1.0.0 |
| | | * @see cn.huge.module.cases.domain.po.CaseInfoUnfold |
| | | */ |
| | | public class CaseInfoUnfoldBO extends CaseInfoUnfold { |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.cases.domain.bo; |
| | | |
| | | import cn.huge.module.cases.domain.po.CasePerson; |
| | | |
| | | /** |
| | | * @title: 纠纷当事人信息表业务扩展类 |
| | | * @description: 纠纷当事人信息表业务扩展类 |
| | | * @company: hugeinfo |
| | | * @author: wangwh |
| | | * @time: 2024-08-27 10:48:18 |
| | | * @version: 1.0.0 |
| | | * @see cn.huge.module.cases.domain.po.CasePerson |
| | | */ |
| | | public class CasePersonBO extends CasePerson { |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.cases.domain.dto; |
| | | |
| | | import cn.huge.module.cases.domain.po.CaseAgent; |
| | | import cn.huge.module.cases.domain.po.CaseInfo; |
| | | import cn.huge.module.cases.domain.po.CasePerson; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: 纠纷信息数据传输对象 |
| | | * @description: 纠纷信息数据传输对象 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2022-03-11 11:43:25 |
| | | * @version: 1.0.0 |
| | | * @see CaseInfo |
| | | */ |
| | | @Data |
| | | public class RegisterSaveDTO extends CaseInfo { |
| | | |
| | | /** |
| | | * 申请人类型 |
| | | */ |
| | | private String plaintPerClass; |
| | | |
| | | /** |
| | | * 申请人类型名称 |
| | | */ |
| | | private String plaintPerClassName; |
| | | |
| | | /** |
| | | * 申请人姓名 |
| | | */ |
| | | private String plaintTrueName; |
| | | |
| | | /** |
| | | * 申请人联系电话 |
| | | */ |
| | | private String plaintMobile; |
| | | |
| | | /** |
| | | * 被申请人类型 |
| | | */ |
| | | private String defendPerClass; |
| | | |
| | | /** |
| | | * 被申请人类型 |
| | | */ |
| | | private String defendPerClassName; |
| | | |
| | | /** |
| | | * 被申请人姓名 |
| | | */ |
| | | private String defendTrueName; |
| | | |
| | | /** |
| | | * 被申请人联系电话 |
| | | */ |
| | | private String defendMobile; |
| | | |
| | | /** |
| | | * 申请人列表 |
| | | */ |
| | | private List<CasePerson> plaintiffList; |
| | | |
| | | /** |
| | | * 申请人代理人列表 |
| | | */ |
| | | private List<CaseAgent> pagentList; |
| | | |
| | | /** |
| | | * 被申请人列表 |
| | | */ |
| | | private List<CasePerson> defendantList; |
| | | |
| | | /** |
| | | * 被申请人代理人列表 |
| | | */ |
| | | private List<CaseAgent> dagentList; |
| | | |
| | | /** |
| | | * 调解组织类型,1:本单位调解,2:本单位人调解,3:其他单位调解 |
| | | */ |
| | | private String mediateUnitType; |
| | | |
| | | /** |
| | | * 自行受理标识,0:不是,1:是 |
| | | */ |
| | | private Integer isSelfAccept; |
| | | |
| | | /** |
| | | * 是否是草稿提交,0:不是,1:是 |
| | | */ |
| | | private Integer isDraft; |
| | | } |
| New file |
| | |
| | | package cn.huge.module.cases.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: wangwh |
| | | * @time: 2024-08-27 10:48:17 |
| | | * @version 1.0.0 |
| | | */ |
| | | @TableName(value = "dyh_case_agent") |
| | | @Data |
| | | public class CaseAgent { |
| | | |
| | | /** |
| | | * 主键编号 |
| | | */ |
| | | @TableId(value = "id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 纠纷编号 |
| | | */ |
| | | @TableField(value = "case_id") |
| | | private String caseId; |
| | | |
| | | /** |
| | | * 公众用户编号 |
| | | */ |
| | | @TableField(value = "party_user_id") |
| | | private String partyUserId; |
| | | |
| | | /** |
| | | * 代理人类型 |
| | | */ |
| | | @TableField(value = "per_class") |
| | | private String perClass; |
| | | |
| | | /** |
| | | * 代理人类型名称 |
| | | */ |
| | | @TableField(value = "per_class_name") |
| | | private String perClassName; |
| | | |
| | | /** |
| | | * 姓名 |
| | | */ |
| | | @TableField(value = "true_name") |
| | | private String trueName; |
| | | |
| | | /** |
| | | * 联系方式 |
| | | */ |
| | | @TableField(value = "mobile") |
| | | private String mobile; |
| | | |
| | | /** |
| | | * 证件类型 |
| | | */ |
| | | @TableField(value = "certi_type") |
| | | private String certiType; |
| | | |
| | | /** |
| | | * 证件类型名称 |
| | | */ |
| | | @TableField(value = "certi_type_name") |
| | | private String certiTypeName; |
| | | |
| | | /** |
| | | * 证件号码 |
| | | */ |
| | | @TableField(value = "certi_no") |
| | | private String certiNo; |
| | | |
| | | /** |
| | | * 联系地址省 |
| | | */ |
| | | @TableField(value = "prov") |
| | | private String prov; |
| | | |
| | | /** |
| | | * 联系地址省名称 |
| | | */ |
| | | @TableField(value = "prov_name") |
| | | private String provName; |
| | | |
| | | /** |
| | | * 联系地址市 |
| | | */ |
| | | @TableField(value = "city") |
| | | private String city; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址市名称 |
| | | */ |
| | | @TableField(value = "city_name") |
| | | private String cityName; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址区 |
| | | */ |
| | | @TableField(value = "area") |
| | | private String area; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址区名称 |
| | | */ |
| | | @TableField(value = "area_name") |
| | | private String areaName; |
| | | |
| | | /** |
| | | * 联地址街道 |
| | | */ |
| | | @TableField(value = "road") |
| | | private String road; |
| | | |
| | | /** |
| | | * 联系地址街道名称 |
| | | */ |
| | | @TableField(value = "road_name") |
| | | private String roadName; |
| | | |
| | | /** |
| | | * 联系地址社区 |
| | | */ |
| | | @TableField(value = "village") |
| | | private String village; |
| | | |
| | | /** |
| | | * 联系地址社区名称 |
| | | */ |
| | | @TableField(value = "village_name") |
| | | private String villageName; |
| | | |
| | | /** |
| | | * 联系地址详细地址 |
| | | */ |
| | | @TableField(value = "addr") |
| | | private String addr; |
| | | |
| | | /** |
| | | * 户籍地址省 |
| | | */ |
| | | @TableField(value = "place_prov") |
| | | private String placeProv; |
| | | |
| | | /** |
| | | * 户籍地址省名称 |
| | | */ |
| | | @TableField(value = "place_prov_name") |
| | | private String placeProvName; |
| | | |
| | | /** |
| | | * 户籍地址市 |
| | | */ |
| | | @TableField(value = "place_city") |
| | | private String placeCity; |
| | | |
| | | /** |
| | | * 户籍地址市名称 |
| | | */ |
| | | @TableField(value = "place_city_name") |
| | | private String placeCityName; |
| | | |
| | | /** |
| | | * 户籍地址区 |
| | | */ |
| | | @TableField(value = "place_area") |
| | | private String placeArea; |
| | | |
| | | /** |
| | | * 户籍地址区名称 |
| | | */ |
| | | @TableField(value = "place_area_name") |
| | | private String placeAreaName; |
| | | |
| | | /** |
| | | * 户籍地址街道 |
| | | */ |
| | | @TableField(value = "place_road") |
| | | private String placeRoad; |
| | | |
| | | /** |
| | | * 户籍地址街道名称 |
| | | */ |
| | | @TableField(value = "place_road_name") |
| | | private String placeRoadName; |
| | | |
| | | /** |
| | | * 户籍地址社区 |
| | | */ |
| | | @TableField(value = "place_village") |
| | | private String placeVillage; |
| | | |
| | | /** |
| | | * 户籍地址社区名称 |
| | | */ |
| | | @TableField(value = "place_village_name") |
| | | private String placeVillageName; |
| | | |
| | | /** |
| | | * 户籍地址详细地址 |
| | | */ |
| | | @TableField(value = "place_addr") |
| | | private String placeAddr; |
| | | |
| | | /** |
| | | * 工作单位 |
| | | */ |
| | | @TableField(value = "work_unit") |
| | | private String workUnit; |
| | | |
| | | /** |
| | | * 民族 |
| | | */ |
| | | @TableField(value = "nation") |
| | | private String nation; |
| | | |
| | | /** |
| | | * 民族名称 |
| | | */ |
| | | @TableField(value = "nation_name") |
| | | private String nationName; |
| | | |
| | | /** |
| | | * 性别 |
| | | */ |
| | | @TableField(value = "sex") |
| | | private String sex; |
| | | |
| | | /** |
| | | * 性别名称 |
| | | */ |
| | | @TableField(value = "sex_name") |
| | | private String sexName; |
| | | |
| | | /** |
| | | * 是否有个人极端倾向,0:否,1:是 |
| | | */ |
| | | @TableField(value = "extreme") |
| | | private Integer extreme; |
| | | |
| | | /** |
| | | * 委托关系 |
| | | */ |
| | | @TableField(value = "agent_relate") |
| | | private String agentRelate; |
| | | |
| | | /** |
| | | * 委托关系名称 |
| | | */ |
| | | @TableField(value = "agent_relate_name") |
| | | private String agentRelateName; |
| | | |
| | | /** |
| | | * 委托类型 |
| | | */ |
| | | @TableField(value = "agent_type") |
| | | private String agentType; |
| | | |
| | | /** |
| | | * 委托类型名称 |
| | | */ |
| | | @TableField(value = "agent_type_name") |
| | | private String agentTypeName; |
| | | |
| | | /** |
| | | * 代理当事人编号,多个用,隔开 |
| | | */ |
| | | @TableField(value = "person_id") |
| | | private String personId; |
| | | |
| | | /** |
| | | * 头像 |
| | | */ |
| | | @TableField(value = "avatar") |
| | | private String avatar; |
| | | |
| | | /** |
| | | * 职业 |
| | | */ |
| | | @TableField(value = "job") |
| | | private String job; |
| | | |
| | | /** |
| | | * 职业名称 |
| | | */ |
| | | @TableField(value = "job_name") |
| | | private String jobName; |
| | | |
| | | /** |
| | | * 出生日期 |
| | | */ |
| | | @TableField(value = "birthday") |
| | | private String birthday; |
| | | |
| | | /** |
| | | * 年龄 |
| | | */ |
| | | @TableField(value = "age") |
| | | private Integer age; |
| | | |
| | | /** |
| | | * 有无代理人,0:无,1:有 |
| | | */ |
| | | @TableField(value = "agent_status") |
| | | private Integer agentStatus; |
| | | |
| | | /** |
| | | * 顾客编号 |
| | | */ |
| | | @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.cases.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: wangwh |
| | | * @time: 2024-08-27 10:00:57 |
| | | * @version 1.0.0 |
| | | */ |
| | | @TableName(value = "dyh_case_info") |
| | | @Data |
| | | public class CaseInfo { |
| | | |
| | | /** |
| | | * 主键编号 |
| | | */ |
| | | @TableId(value = "id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 事项标题 |
| | | */ |
| | | @TableField(value = "case_title") |
| | | private String caseTitle; |
| | | |
| | | /** |
| | | * 事项编号 |
| | | */ |
| | | @TableField(value = "case_ref") |
| | | private String caseRef; |
| | | |
| | | /** |
| | | * 事项等级 |
| | | */ |
| | | @TableField(value = "case_level") |
| | | private Integer caseLevel; |
| | | |
| | | /** |
| | | * 来访时间 |
| | | */ |
| | | @TableField(value = "visit_time") |
| | | private Date visitTime; |
| | | |
| | | /** |
| | | * 来访人数 |
| | | */ |
| | | @TableField(value = "visit_people_num") |
| | | private Integer visitPeopleNum; |
| | | |
| | | /** |
| | | * 调解类型 |
| | | */ |
| | | @TableField(value = "medi_type") |
| | | private String mediType; |
| | | |
| | | /** |
| | | * 调解类型名称 |
| | | */ |
| | | @TableField(value = "medi_type_name") |
| | | private String mediTypeName; |
| | | |
| | | /** |
| | | * 纠纷一级类型 |
| | | */ |
| | | @TableField(value = "case_type_first") |
| | | private String caseTypeFirst; |
| | | |
| | | /** |
| | | * 纠纷一级类型名称 |
| | | */ |
| | | @TableField(value = "case_type_first_name") |
| | | private String caseTypeFirstName; |
| | | |
| | | /** |
| | | * 纠纷类型 |
| | | */ |
| | | @TableField(value = "case_type") |
| | | private String caseType; |
| | | |
| | | /** |
| | | * 纠纷类型名称 |
| | | */ |
| | | @TableField(value = "case_type_name") |
| | | private String caseTypeName; |
| | | |
| | | /** |
| | | * 纠纷发生时间 |
| | | */ |
| | | @TableField(value = "occur_time") |
| | | private Date occurTime; |
| | | |
| | | /** |
| | | * 纠纷发生地详细地址 |
| | | */ |
| | | @TableField(value = "addr") |
| | | private String addr; |
| | | |
| | | /** |
| | | * 纠纷发生地经度 |
| | | */ |
| | | @TableField(value = "lng") |
| | | private String lng; |
| | | |
| | | /** |
| | | * 纠纷发生地纬度 |
| | | */ |
| | | @TableField(value = "lat") |
| | | private String lat; |
| | | |
| | | /** |
| | | * 纠纷发生地网格地址 |
| | | */ |
| | | @TableField(value = "wg_addr") |
| | | private String wgAddr; |
| | | |
| | | /** |
| | | * 纠纷发生地网格地址经度 |
| | | */ |
| | | @TableField(value = "wg_lng") |
| | | private String wgLng; |
| | | |
| | | /** |
| | | * 纠纷发生地网格地址纬度 |
| | | */ |
| | | @TableField(value = "wg_lat") |
| | | private String wgLat; |
| | | |
| | | /** |
| | | * 问题属地省 |
| | | */ |
| | | @TableField(value = "que_prov") |
| | | private String queProv; |
| | | |
| | | /** |
| | | * 问题属地省名称 |
| | | */ |
| | | @TableField(value = "que_prov_name") |
| | | private String queProvName; |
| | | |
| | | /** |
| | | * 问题属地市 |
| | | */ |
| | | @TableField(value = "que_city") |
| | | private String queCity; |
| | | |
| | | /** |
| | | * 问题属地市名称 |
| | | */ |
| | | @TableField(value = "que_city_name") |
| | | private String queCityName; |
| | | |
| | | /** |
| | | * 问题属地区 |
| | | */ |
| | | @TableField(value = "que_area") |
| | | private String queArea; |
| | | |
| | | /** |
| | | * 问题属地区名称 |
| | | */ |
| | | @TableField(value = "que_area_name") |
| | | private String queAreaName; |
| | | |
| | | /** |
| | | * 问题属地街道 |
| | | */ |
| | | @TableField(value = "que_road") |
| | | private String queRoad; |
| | | |
| | | /** |
| | | * 问题属地街道名称 |
| | | */ |
| | | @TableField(value = "que_road_name") |
| | | private String queRoadName; |
| | | |
| | | /** |
| | | * 问题属地社区 |
| | | */ |
| | | @TableField(value = "que_village") |
| | | private String queVillage; |
| | | |
| | | /** |
| | | * 问题属地社区名称 |
| | | */ |
| | | @TableField(value = "que_village_name") |
| | | private String queVillageName; |
| | | |
| | | /** |
| | | * 涉及人数 |
| | | */ |
| | | @TableField(value = "people_num") |
| | | private Integer peopleNum; |
| | | |
| | | /** |
| | | * 涉及金额 |
| | | */ |
| | | @TableField(value = "amount") |
| | | private Double amount; |
| | | |
| | | /** |
| | | * 涉及人群 |
| | | */ |
| | | @TableField(value = "crowd") |
| | | private String crowd; |
| | | |
| | | /** |
| | | * 涉及人群名称 |
| | | */ |
| | | @TableField(value = "crowd_name") |
| | | private String crowdName; |
| | | |
| | | /** |
| | | * 事项来源 |
| | | */ |
| | | @TableField(value = "canal") |
| | | private String canal; |
| | | |
| | | /** |
| | | * 事项来源名称 |
| | | */ |
| | | @TableField(value = "canal_name") |
| | | private String canalName; |
| | | |
| | | /** |
| | | * 来访形式 |
| | | */ |
| | | @TableField(value = "visit_way") |
| | | private String visitWay; |
| | | |
| | | /** |
| | | * 来访形式名称 |
| | | */ |
| | | @TableField(value = "visit_way_name") |
| | | private String visitWayName; |
| | | |
| | | /** |
| | | * 事项概况 |
| | | */ |
| | | @TableField(value = "case_des") |
| | | private String caseDes; |
| | | |
| | | /** |
| | | * 事项申请 |
| | | */ |
| | | @TableField(value = "case_claim") |
| | | private String caseClaim; |
| | | |
| | | /** |
| | | * 是否重大矛盾纠纷,0:否,1:是 |
| | | */ |
| | | @TableField(value = "major_status") |
| | | private Integer majorStatus; |
| | | |
| | | /** |
| | | * 纠纷来源 |
| | | */ |
| | | @TableField(value = "source") |
| | | private String source; |
| | | |
| | | /** |
| | | * 纠纷来源名称 |
| | | */ |
| | | @TableField(value = "source_name") |
| | | private String sourceName; |
| | | |
| | | /** |
| | | * 矛调号 |
| | | */ |
| | | @TableField(value = "case_no") |
| | | private String caseNo; |
| | | |
| | | /** |
| | | * 民诉前调号 |
| | | */ |
| | | @TableField(value = "mediate_no") |
| | | private String mediateNo; |
| | | |
| | | /** |
| | | * 民诉前调书号 |
| | | */ |
| | | @TableField(value = "mediate_book_no") |
| | | private String mediateBookNo; |
| | | |
| | | /** |
| | | * 诉讼案号 |
| | | */ |
| | | @TableField(value = "civil_no") |
| | | private String civilNo; |
| | | |
| | | /** |
| | | * 申请方当事人名称 |
| | | */ |
| | | @TableField(value = "plaintiffs") |
| | | private String plaintiffs; |
| | | |
| | | /** |
| | | * 申请方代理人名称 |
| | | */ |
| | | @TableField(value = "pagents") |
| | | private String pagents; |
| | | |
| | | /** |
| | | * 被申请方当事人名称 |
| | | */ |
| | | @TableField(value = "defendants") |
| | | private String defendants; |
| | | |
| | | /** |
| | | * 被申请方代理人名称 |
| | | */ |
| | | @TableField(value = "dagents") |
| | | private String dagents; |
| | | |
| | | /** |
| | | * 登记组织编号 |
| | | */ |
| | | @TableField(value = "input_unit_id") |
| | | private String inputUnitId; |
| | | |
| | | /** |
| | | * 登记组织名称 |
| | | */ |
| | | @TableField(value = "input_unit_name") |
| | | private String inputUnitName; |
| | | |
| | | /** |
| | | * 登记人编号 |
| | | */ |
| | | @TableField(value = "input_user_id") |
| | | private String inputUserId; |
| | | |
| | | /** |
| | | * 登记人名称 |
| | | */ |
| | | @TableField(value = "input_user_name") |
| | | private String inputUserName; |
| | | |
| | | /** |
| | | * 登记方式,1:正常登记,2:案件导入 |
| | | */ |
| | | @TableField(value = "input_way") |
| | | private Integer inputWay; |
| | | |
| | | /** |
| | | * 事项状态,1:待签收,2:待受理,3:办理中,4:结案审核,5:待评价,6:已归档 |
| | | */ |
| | | @TableField(value = "status") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 事项状态名称 |
| | | */ |
| | | @TableField(value = "status_name") |
| | | private String statusName; |
| | | |
| | | /** |
| | | * 事项进度,1:来访登记,2:事件流转,3:办理反馈,4:结案申请,5:当事人评价,6:结案归档 |
| | | */ |
| | | @TableField(value = "process") |
| | | private Integer process; |
| | | |
| | | /** |
| | | * 事项进度名称 |
| | | */ |
| | | @TableField(value = "process_name") |
| | | private String processName; |
| | | |
| | | /** |
| | | * 意向调解组织编号 |
| | | */ |
| | | @TableField(value = "want_unit_id") |
| | | private String wantUnitId; |
| | | |
| | | /** |
| | | * 意向调解组织名称 |
| | | */ |
| | | @TableField(value = "want_unit_name") |
| | | private String wantUnitName; |
| | | |
| | | /** |
| | | * 意向调解员编号 |
| | | */ |
| | | @TableField(value = "want_user_id") |
| | | private String wantUserId; |
| | | |
| | | /** |
| | | * 意向调解员名称 |
| | | */ |
| | | @TableField(value = "want_user_name") |
| | | private String wantUserName; |
| | | |
| | | /** |
| | | * 删除状态,0:未删除,1:已删除 |
| | | */ |
| | | @TableLogic |
| | | @TableField(value = "delete_status") |
| | | private Integer deleteStatus; |
| | | |
| | | /** |
| | | * 顾客编号 |
| | | */ |
| | | @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.cases.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: wangwh |
| | | * @time: 2024-08-27 20:36:04 |
| | | * @version 1.0.0 |
| | | */ |
| | | @TableName(value = "dyh_case_info_unfold") |
| | | @Data |
| | | public class CaseInfoUnfold { |
| | | |
| | | /** |
| | | * 主键编号 |
| | | */ |
| | | @TableId(value = "id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 纠纷编号 |
| | | */ |
| | | @TableField(value = "case_id") |
| | | private String caseId; |
| | | |
| | | /** |
| | | * 实际调解组织编号 |
| | | */ |
| | | @TableField(value = "mediate_unit_id") |
| | | private String mediateUnitId; |
| | | |
| | | /** |
| | | * 实际调解组织名称 |
| | | */ |
| | | @TableField(value = "mediate_unit_name") |
| | | private String mediateUnitName; |
| | | |
| | | /** |
| | | * 实际调解部门编号 |
| | | */ |
| | | @TableField(value = "mediate_dept_id") |
| | | private String mediateDeptId; |
| | | |
| | | /** |
| | | * 实际调解部门名称 |
| | | */ |
| | | @TableField(value = "mediate_dept_name") |
| | | private String mediateDeptName; |
| | | |
| | | /** |
| | | * 实际调解员编号 |
| | | */ |
| | | @TableField(value = "mediator_id") |
| | | private String mediatorId; |
| | | |
| | | /** |
| | | * 实际调解员 |
| | | */ |
| | | @TableField(value = "mediator") |
| | | private String mediator; |
| | | |
| | | /** |
| | | * 实际调解员手机号码 |
| | | */ |
| | | @TableField(value = "mediator_mobile") |
| | | private String mediatorMobile; |
| | | |
| | | /** |
| | | * 调解开始时间 |
| | | */ |
| | | @TableField(value = "medi_start_time") |
| | | private Date mediStartTime; |
| | | |
| | | /** |
| | | * 调解结束时间 |
| | | */ |
| | | @TableField(value = "medi_end_time") |
| | | private Date mediEndTime; |
| | | |
| | | /** |
| | | * 调解结果 |
| | | */ |
| | | @TableField(value = "medi_result") |
| | | private String mediResult; |
| | | |
| | | /** |
| | | * 调解结果名称 |
| | | */ |
| | | @TableField(value = "medi_result_name") |
| | | private String mediResultName; |
| | | |
| | | /** |
| | | * 达成协议类型 |
| | | */ |
| | | @TableField(value = "agree_type") |
| | | private String agreeType; |
| | | |
| | | /** |
| | | * 达成协议类型名称 |
| | | */ |
| | | @TableField(value = "agree_type_name") |
| | | private String agreeTypeName; |
| | | |
| | | /** |
| | | * 已达成协议 |
| | | */ |
| | | @TableField(value = "agree_content") |
| | | private String agreeContent; |
| | | |
| | | /** |
| | | * 结案意见 |
| | | */ |
| | | @TableField(value = "windup_content") |
| | | private String windupContent; |
| | | |
| | | /** |
| | | * 调解不成功原因 |
| | | */ |
| | | @TableField(value = "medi_false") |
| | | private String mediFalse; |
| | | |
| | | /** |
| | | * 调解不成功原因名称 |
| | | */ |
| | | @TableField(value = "medi_false_name") |
| | | private String mediFalseName; |
| | | |
| | | /** |
| | | * 是否转诉讼案件,0:不转诉讼,1:转诉讼 |
| | | */ |
| | | @TableField(value = "civil_status") |
| | | private Integer civilStatus; |
| | | |
| | | /** |
| | | * 诉讼法院编号 |
| | | */ |
| | | @TableField(value = "court_id") |
| | | private String courtId; |
| | | |
| | | /** |
| | | * 诉讼法院名称 |
| | | */ |
| | | @TableField(value = "court_name") |
| | | private String courtName; |
| | | |
| | | /** |
| | | * 是否申请司法确认,0:未申请,1:已申请 |
| | | */ |
| | | @TableField(value = "judic_apply") |
| | | private Integer judicApply; |
| | | |
| | | /** |
| | | * 司法确认结果 |
| | | */ |
| | | @TableField(value = "judic_result") |
| | | private String judicResult; |
| | | |
| | | /** |
| | | * 司法确认结果名称 |
| | | */ |
| | | @TableField(value = "judic_result_name") |
| | | private String judicResultName; |
| | | |
| | | /** |
| | | * 是否已归档,0:未归档,1:已归档 |
| | | */ |
| | | @TableField(value = "file_status") |
| | | private Integer fileStatus; |
| | | |
| | | /** |
| | | * 归档人编号 |
| | | */ |
| | | @TableField(value = "file_user_id") |
| | | private String fileUserId; |
| | | |
| | | /** |
| | | * 归档人名称 |
| | | */ |
| | | @TableField(value = "file_user_name") |
| | | private String fileUserName; |
| | | |
| | | /** |
| | | * 归档时间 |
| | | */ |
| | | @TableField(value = "file_time") |
| | | private Date fileTime; |
| | | |
| | | /** |
| | | * 档案年度 |
| | | */ |
| | | @TableField(value = "file_year") |
| | | private String fileYear; |
| | | |
| | | /** |
| | | * 档案卷名 |
| | | */ |
| | | @TableField(value = "file_book_name") |
| | | private String fileBookName; |
| | | |
| | | /** |
| | | * 档案卷号 |
| | | */ |
| | | @TableField(value = "file_book_no") |
| | | private String fileBookNo; |
| | | |
| | | /** |
| | | * 档案编号 |
| | | */ |
| | | @TableField(value = "file_no") |
| | | private String fileNo; |
| | | |
| | | /** |
| | | * 档案保管年限,单位:年 |
| | | */ |
| | | @TableField(value = "file_limit_year") |
| | | private Integer fileLimitYear; |
| | | |
| | | /** |
| | | * 档案存档位置 |
| | | */ |
| | | @TableField(value = "file_addr") |
| | | private String fileAddr; |
| | | |
| | | /** |
| | | * 卷宗情况说明 |
| | | */ |
| | | @TableField(value = "file_content") |
| | | private String fileContent; |
| | | |
| | | /** |
| | | * 履行情况 |
| | | */ |
| | | @TableField(value = "fulfil_situ") |
| | | private String fulfilSitu; |
| | | |
| | | /** |
| | | * 履行情况名称 |
| | | */ |
| | | @TableField(value = "fulfil_situ_name") |
| | | private String fulfilSituName; |
| | | |
| | | /** |
| | | * 是否已回访,0:未回访,1:已回访 |
| | | */ |
| | | @TableField(value = "visit_up_status") |
| | | private Integer visitUpStatus; |
| | | |
| | | /** |
| | | * 回访情况 |
| | | */ |
| | | @TableField(value = "visit_up_content") |
| | | private String visitUpContent; |
| | | |
| | | /** |
| | | * 当事人是否满意,0:不满意,1:满意 |
| | | */ |
| | | @TableField(value = "party_joy") |
| | | private Integer partyJoy; |
| | | |
| | | /** |
| | | * 顾客编号 |
| | | */ |
| | | @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.cases.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: wangwh |
| | | * @time: 2024-08-27 10:48:18 |
| | | * @version 1.0.0 |
| | | */ |
| | | @TableName(value = "dyh_case_person") |
| | | @Data |
| | | public class CasePerson { |
| | | |
| | | /** |
| | | * 主键编号 |
| | | */ |
| | | @TableId(value = "id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 纠纷编号 |
| | | */ |
| | | @TableField(value = "case_id") |
| | | private String caseId; |
| | | |
| | | /** |
| | | * 公众用户编号 |
| | | */ |
| | | @TableField(value = "party_user_id") |
| | | private String partyUserId; |
| | | |
| | | /** |
| | | * 当事人地位 |
| | | */ |
| | | @TableField(value = "per_type") |
| | | private String perType; |
| | | |
| | | /** |
| | | * 当事人地位名称 |
| | | */ |
| | | @TableField(value = "per_type_name") |
| | | private String perTypeName; |
| | | |
| | | /** |
| | | * 当事人类型 |
| | | */ |
| | | @TableField(value = "per_class") |
| | | private String perClass; |
| | | |
| | | /** |
| | | * 当事人类型名称 |
| | | */ |
| | | @TableField(value = "per_class_name") |
| | | private String perClassName; |
| | | |
| | | /** |
| | | * 姓名/企业/机构名称 |
| | | */ |
| | | @TableField(value = "true_name") |
| | | private String trueName; |
| | | |
| | | /** |
| | | * 联系方式 |
| | | */ |
| | | @TableField(value = "mobile") |
| | | private String mobile; |
| | | |
| | | /** |
| | | * 组织机构代码 |
| | | */ |
| | | @TableField(value = "orga_code") |
| | | private String orgaCode; |
| | | |
| | | /** |
| | | * 法定/机构代表人名称 |
| | | */ |
| | | @TableField(value = "deputy") |
| | | private String deputy; |
| | | |
| | | /** |
| | | * 企业/机构类型 |
| | | */ |
| | | @TableField(value = "orga_type") |
| | | private String orgaType; |
| | | |
| | | /** |
| | | * 企业/机构类型名称 |
| | | */ |
| | | @TableField(value = "orga_type_name") |
| | | private String orgaTypeName; |
| | | |
| | | /** |
| | | * 证件类型 |
| | | */ |
| | | @TableField(value = "certi_type") |
| | | private String certiType; |
| | | |
| | | /** |
| | | * 证件类型名称 |
| | | */ |
| | | @TableField(value = "certi_type_name") |
| | | private String certiTypeName; |
| | | |
| | | /** |
| | | * 证件号码 |
| | | */ |
| | | @TableField(value = "certi_no") |
| | | private String certiNo; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址省 |
| | | */ |
| | | @TableField(value = "prov") |
| | | private String prov; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址省名称 |
| | | */ |
| | | @TableField(value = "prov_name") |
| | | private String provName; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址市 |
| | | */ |
| | | @TableField(value = "city") |
| | | private String city; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址市名称 |
| | | */ |
| | | @TableField(value = "city_name") |
| | | private String cityName; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址区 |
| | | */ |
| | | @TableField(value = "area") |
| | | private String area; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址区名称 |
| | | */ |
| | | @TableField(value = "area_name") |
| | | private String areaName; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址街道 |
| | | */ |
| | | @TableField(value = "road") |
| | | private String road; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址街道名称 |
| | | */ |
| | | @TableField(value = "road_name") |
| | | private String roadName; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址社区 |
| | | */ |
| | | @TableField(value = "village") |
| | | private String village; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址社区名称 |
| | | */ |
| | | @TableField(value = "village_name") |
| | | private String villageName; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址详细地址 |
| | | */ |
| | | @TableField(value = "addr") |
| | | private String addr; |
| | | |
| | | /** |
| | | * 户籍/住所地址省 |
| | | */ |
| | | @TableField(value = "place_prov") |
| | | private String placeProv; |
| | | |
| | | /** |
| | | * 户籍/住所地址省名称 |
| | | */ |
| | | @TableField(value = "place_prov_name") |
| | | private String placeProvName; |
| | | |
| | | /** |
| | | * 户籍/住所地址市 |
| | | */ |
| | | @TableField(value = "place_city") |
| | | private String placeCity; |
| | | |
| | | /** |
| | | * 户籍/住所地址市名称 |
| | | */ |
| | | @TableField(value = "place_city_name") |
| | | private String placeCityName; |
| | | |
| | | /** |
| | | * 户籍/住所地址区 |
| | | */ |
| | | @TableField(value = "place_area") |
| | | private String placeArea; |
| | | |
| | | /** |
| | | * 户籍/住所地址区名称 |
| | | */ |
| | | @TableField(value = "place_area_name") |
| | | private String placeAreaName; |
| | | |
| | | /** |
| | | * 户籍/住所地址街道 |
| | | */ |
| | | @TableField(value = "place_road") |
| | | private String placeRoad; |
| | | |
| | | /** |
| | | * 户籍/住所地址街道名称 |
| | | */ |
| | | @TableField(value = "place_road_name") |
| | | private String placeRoadName; |
| | | |
| | | /** |
| | | * 户籍/住所地址社区 |
| | | */ |
| | | @TableField(value = "place_village") |
| | | private String placeVillage; |
| | | |
| | | /** |
| | | * 户籍/住所地址社区名称 |
| | | */ |
| | | @TableField(value = "place_village_name") |
| | | private String placeVillageName; |
| | | |
| | | /** |
| | | * 户籍/住所地址详细地址 |
| | | */ |
| | | @TableField(value = "place_addr") |
| | | private String placeAddr; |
| | | |
| | | /** |
| | | * 工作单位 |
| | | */ |
| | | @TableField(value = "work_unit") |
| | | private String workUnit; |
| | | |
| | | /** |
| | | * 民族 |
| | | */ |
| | | @TableField(value = "nation") |
| | | private String nation; |
| | | |
| | | /** |
| | | * 民族名称 |
| | | */ |
| | | @TableField(value = "nation_name") |
| | | private String nationName; |
| | | |
| | | /** |
| | | * 性别 |
| | | */ |
| | | @TableField(value = "sex") |
| | | private String sex; |
| | | |
| | | /** |
| | | * 性别名称 |
| | | */ |
| | | @TableField(value = "sex_name") |
| | | private String sexName; |
| | | |
| | | /** |
| | | * 是否有个人极端倾向,0:否,1:是 |
| | | */ |
| | | @TableField(value = "extreme") |
| | | private Integer extreme; |
| | | |
| | | /** |
| | | * 头像 |
| | | */ |
| | | @TableField(value = "avatar") |
| | | private String avatar; |
| | | |
| | | /** |
| | | * 职业 |
| | | */ |
| | | @TableField(value = "job") |
| | | private String job; |
| | | |
| | | /** |
| | | * 职业名称 |
| | | */ |
| | | @TableField(value = "job_name") |
| | | private String jobName; |
| | | |
| | | /** |
| | | * 出生日期 |
| | | */ |
| | | @TableField(value = "birthday") |
| | | private String birthday; |
| | | |
| | | /** |
| | | * 年龄 |
| | | */ |
| | | @TableField(value = "age") |
| | | private Integer age; |
| | | |
| | | /** |
| | | * 有无代理人,0:无,1:有 |
| | | */ |
| | | @TableField(value = "agent_status") |
| | | private Integer agentStatus; |
| | | |
| | | /** |
| | | * 顾客编号 |
| | | */ |
| | | @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.cases.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.cases.dao.mapper.CaseAgentMapper; |
| | | import cn.huge.module.cases.domain.po.CaseAgent; |
| | | 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 wangwh |
| | | * @Time 2024-08-27 10:48:17 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class CaseAgentService extends ServiceImpl<CaseAgentMapper, CaseAgent>{ |
| | | |
| | | @Autowired |
| | | private CaseAgentMapper mapper; |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | public void updateCaseAgent(CaseAgent entity){ |
| | | try{ |
| | | mapper.updateCaseAgent(entity); |
| | | }catch (Exception e){ |
| | | log.error("[CaseAgentService.updateCaseAgent]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseAgentService.updateCaseAgent", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | public void updateCaseAgentTerms(CaseAgent entity, Map<String, Object> terms){ |
| | | try{ |
| | | mapper.updateCaseAgentTerms(entity, terms); |
| | | }catch (Exception e){ |
| | | log.error("[CaseAgentService.updateCaseAgentTerms]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseAgentService.updateCaseAgentTerms", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | public void deleteCaseAgent(String id){ |
| | | try{ |
| | | mapper.deleteCaseAgent(id); |
| | | }catch (Exception e){ |
| | | log.error("[CaseAgentService.deleteCaseAgent]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseAgentService.deleteCaseAgent", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 按条件查询 |
| | | * @param terms 条件 |
| | | * @return List |
| | | */ |
| | | public List<CaseAgent> 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<CaseAgent> pageQuery(PageRequest page, Map<String, Object> terms){ |
| | | long total = mapper.countTerms(terms); |
| | | List<CaseAgent> content = mapper.pageTerms(page, terms); |
| | | return new PageImpl<CaseAgent>(content, page, total); |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @param caseAgent 实体对象 |
| | | */ |
| | | public void saveCaseAgent(CaseAgent caseAgent){ |
| | | try{ |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 判断是否新增 |
| | | if (IdUtils.checkNewId(caseAgent.getId())){ |
| | | caseAgent.setId(utilsClient.getNewTimeId()); |
| | | caseAgent.setCreateTime(nowDate); |
| | | } |
| | | caseAgent.setUpdateTime(nowDate); |
| | | this.saveOrUpdate(caseAgent); |
| | | }catch (Exception e){ |
| | | log.error("[CaseAgentService.saveCaseAgent]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseAgentService.saveCaseAgent", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据纠纷编号查询代理人编号 |
| | | * @param caseId 条件 |
| | | * @return List |
| | | */ |
| | | public List<String> listIdByCaseId(String caseId){ |
| | | return mapper.listIdByCaseId(caseId); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.cases.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.base.common.utils.ObjectUtils; |
| | | import cn.huge.module.cases.domain.dto.RegisterSaveDTO; |
| | | import cn.huge.module.cases.domain.po.CaseAgent; |
| | | import cn.huge.module.cases.domain.po.CaseInfoUnfold; |
| | | import cn.huge.module.cases.domain.po.CasePerson; |
| | | import cn.huge.module.client.api.impl.CustClientImpl; |
| | | import cn.huge.module.client.api.impl.UtilsClientImpl; |
| | | import cn.huge.module.cases.dao.mapper.CaseInfoMapper; |
| | | import cn.huge.module.cases.domain.po.CaseInfo; |
| | | import cn.huge.module.constant.BaseConsts; |
| | | import cn.huge.module.constant.CaseBaseConsts; |
| | | import cn.huge.module.constant.CaseBaseConstsEnum; |
| | | import cn.huge.module.cust.dto.CtUserDTO; |
| | | import cn.huge.module.draft.domain.po.CasedraftAgent; |
| | | import cn.huge.module.draft.domain.po.CasedraftInfo; |
| | | import cn.huge.module.draft.domain.po.CasedraftPerson; |
| | | import cn.huge.module.draft.service.CasedraftInfoService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | 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 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.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @title: 纠纷信息主表业务逻辑处理 |
| | | * @Description 纠纷信息主表业务逻辑处理 |
| | | * @company hugeinfo |
| | | * @author wangwh |
| | | * @Time 2024-08-27 10:00:57 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class CaseInfoService extends ServiceImpl<CaseInfoMapper, CaseInfo>{ |
| | | |
| | | @Autowired |
| | | private CaseInfoMapper mapper; |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | @Autowired |
| | | private CasedraftInfoService draftInfoService; |
| | | |
| | | @Autowired |
| | | private CasePersonService personService; |
| | | |
| | | @Autowired |
| | | private CaseAgentService agentService; |
| | | |
| | | @Autowired |
| | | private CustClientImpl custClient; |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | public void updateCaseInfo(CaseInfo entity){ |
| | | try{ |
| | | mapper.updateCaseInfo(entity); |
| | | }catch (Exception e){ |
| | | log.error("[CaseInfoService.updateCaseInfo]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseInfoService.updateCaseInfo", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | public void updateCaseInfoTerms(CaseInfo entity, Map<String, Object> terms){ |
| | | try{ |
| | | mapper.updateCaseInfoTerms(entity, terms); |
| | | }catch (Exception e){ |
| | | log.error("[CaseInfoService.updateCaseInfoTerms]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseInfoService.updateCaseInfoTerms", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | public void deleteCaseInfo(String id){ |
| | | try{ |
| | | mapper.deleteCaseInfo(id); |
| | | }catch (Exception e){ |
| | | log.error("[CaseInfoService.deleteCaseInfo]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseInfoService.deleteCaseInfo", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 按条件查询 |
| | | * @param terms 条件 |
| | | * @return List |
| | | */ |
| | | public List<CaseInfo> 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<CaseInfo> pageQuery(PageRequest page, Map<String, Object> terms){ |
| | | long total = mapper.countTerms(terms); |
| | | List<CaseInfo> content = mapper.pageTerms(page, terms); |
| | | return new PageImpl<CaseInfo>(content, page, total); |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @param caseInfo 实体对象 |
| | | */ |
| | | public void saveCaseInfo(CaseInfo caseInfo){ |
| | | try{ |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 判断是否新增 |
| | | if (IdUtils.checkNewId(caseInfo.getId())){ |
| | | caseInfo.setId(utilsClient.getNewTimeId()); |
| | | caseInfo.setCreateTime(nowDate); |
| | | } |
| | | caseInfo.setUpdateTime(nowDate); |
| | | this.saveOrUpdate(caseInfo); |
| | | }catch (Exception e){ |
| | | log.error("[CaseInfoService.saveCaseInfo]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseInfoService.saveCaseInfo", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * PC端-纠纷登记-保存纠纷信息-正常案件 |
| | | * @param registerSaveDTO 纠纷信息 |
| | | * @param userId 用户编号 |
| | | * @return String 纠纷编号 |
| | | */ |
| | | public String caseRegister(RegisterSaveDTO registerSaveDTO, String userId){ |
| | | try { |
| | | // 获取当前登录用户 |
| | | CtUserDTO loginUser = custClient.clientGetUserAll(userId); |
| | | |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | StringBuffer plaintiffs = new StringBuffer(); |
| | | StringBuffer defendants = new StringBuffer(); |
| | | StringBuffer pagents = new StringBuffer(); |
| | | StringBuffer dagents = new StringBuffer(); |
| | | int peopleNum = 0; |
| | | |
| | | CaseInfo caseInfo = new CaseInfo(); |
| | | CaseInfoUnfold caseInfoUnfold = new CaseInfoUnfold(); |
| | | BeanUtils.copyProperties(registerSaveDTO, caseInfo); |
| | | caseInfo.setId(utilsClient.getNewTimeId()); |
| | | caseInfo.setInputUnitId(loginUser.getUnitId()); |
| | | caseInfo.setInputUnitName(loginUser.getUnitName()); |
| | | caseInfo.setInputUserId(loginUser.getId()); |
| | | caseInfo.setInputUserName(loginUser.getTrueName()); |
| | | caseInfo.setInputWay(CaseBaseConsts.INPUT_WAY_1); |
| | | caseInfo.setCreateTime(nowDate); |
| | | caseInfo.setUpdateTime(nowDate); |
| | | caseInfo.setDeleteStatus(BaseConsts.DELETE_STATUS_0); |
| | | //todo case_ref生成、case_title生成 |
| | | |
| | | caseInfoUnfold.setId(utilsClient.getNewTimeId()); |
| | | caseInfoUnfold.setCaseId(caseInfo.getId()); |
| | | caseInfoUnfold.setCreateTime(nowDate); |
| | | caseInfoUnfold.setUpdateTime(nowDate); |
| | | |
| | | |
| | | // 常规登记-保存当事人 |
| | | peopleNum += this.saveCasePerson(registerSaveDTO, plaintiffs, pagents, defendants, dagents); |
| | | caseInfo.setPeopleNum(peopleNum); |
| | | caseInfo.setPlaintiffs(plaintiffs.toString()); |
| | | caseInfo.setPagents(pagents.toString()); |
| | | caseInfo.setDefendants(defendants.toString()); |
| | | caseInfo.setDagents(dagents.toString()); |
| | | //todo 流程接口修改status、status_name、process、process_name |
| | | //todo 自行受理 |
| | | if(1 == registerSaveDTO.getIsSelfAccept()){ |
| | | caseInfoUnfold.setMediateUnitId(loginUser.getUnitId()); |
| | | caseInfoUnfold.setMediateUnitName(loginUser.getUnitName()); |
| | | } |
| | | |
| | | this.saveOrUpdate(caseInfo); |
| | | // 删除草稿案件 |
| | | if(1 == registerSaveDTO.getIsDraft() ){ |
| | | draftInfoService.removeDraftInfo(registerSaveDTO.getId()); |
| | | } |
| | | |
| | | return registerSaveDTO.getId(); |
| | | }catch (Exception e){ |
| | | log.error("service方法[CaseInfoService.caseRegister]调用异常:"+e, e); |
| | | throw new ServiceException("CaseInfoService.caseRegister", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * pc端-常规登记-保存正式案件-保存人员信息 |
| | | * @param registerSaveDTO 纠纷信息 |
| | | * @param plaintiffs 申请人 |
| | | * @param pagents 申请人代理人 |
| | | * @param defendants 被申请人 |
| | | * @param dagents 被申请人代理人 |
| | | * @return int |
| | | */ |
| | | private int saveCasePerson(RegisterSaveDTO registerSaveDTO, StringBuffer plaintiffs, StringBuffer pagents, |
| | | StringBuffer defendants, StringBuffer dagents){ |
| | | int peopleNum = 0; |
| | | List<String> newPersonIdList = new ArrayList<>(); |
| | | List<String> newAgentIdList = new ArrayList<>(); |
| | | // 保存申请人 |
| | | List<CasePerson> plaintPersonList = registerSaveDTO.getPlaintiffList(); |
| | | if (CollectionUtils.isNotEmpty(plaintPersonList)) { |
| | | for (CasePerson casePerson : plaintPersonList) { |
| | | newPersonIdList.add(casePerson.getId()); |
| | | casePerson.setCaseId(registerSaveDTO.getId()); |
| | | casePerson.setPerType(CaseBaseConstsEnum.PERSON_TYPE_1.getIndex()); |
| | | casePerson.setPerTypeName(CaseBaseConstsEnum.PERSON_TYPE_1.getDes()); |
| | | casePerson.setCustId(registerSaveDTO.getCustId()); |
| | | casePerson.setCreateTime(registerSaveDTO.getUpdateTime()); |
| | | casePerson.setUpdateTime(registerSaveDTO.getUpdateTime()); |
| | | //todo 绑定当事人小程序 |
| | | |
| | | personService.saveOrUpdate(casePerson); |
| | | |
| | | if (StringUtils.isNotEmpty(plaintiffs.toString())) { |
| | | plaintiffs.append(BaseConsts.COMMA); |
| | | } |
| | | plaintiffs.append(casePerson.getTrueName()); |
| | | peopleNum++; |
| | | |
| | | } |
| | | //保存代理人 |
| | | List<CaseAgent> pagentList = registerSaveDTO.getPagentList(); |
| | | if (CollectionUtils.isNotEmpty(pagentList)) { |
| | | for(CaseAgent caseAgent: pagentList){ |
| | | newAgentIdList.add(caseAgent.getId()); |
| | | caseAgent.setId(utilsClient.getNewTimeId()); |
| | | caseAgent.setCaseId(registerSaveDTO.getId()); |
| | | caseAgent.setAgentTypeName(CaseBaseConstsEnum.getDes(caseAgent.getAgentType())); |
| | | |
| | | caseAgent.setCustId(registerSaveDTO.getCustId()); |
| | | caseAgent.setCreateTime(registerSaveDTO.getUpdateTime()); |
| | | caseAgent.setUpdateTime(registerSaveDTO.getUpdateTime()); |
| | | |
| | | agentService.saveOrUpdate(caseAgent); |
| | | |
| | | if (StringUtils.isNotEmpty(pagents.toString())) { |
| | | pagents.append(BaseConsts.COMMA); |
| | | } |
| | | pagents.append(caseAgent.getTrueName()); |
| | | } |
| | | |
| | | //todo 绑定当事人小程序 |
| | | } |
| | | } |
| | | // 保存被申请人 |
| | | List<CasePerson> defendPersonList = registerSaveDTO.getDefendantList(); |
| | | if(CollectionUtils.isNotEmpty(defendPersonList)){ |
| | | for (CasePerson casePerson : defendPersonList) { |
| | | newPersonIdList.add(casePerson.getId()); |
| | | casePerson.setCaseId(registerSaveDTO.getId()); |
| | | casePerson.setPerType(CaseBaseConstsEnum.PERSON_TYPE_2.getIndex()); |
| | | casePerson.setPerTypeName(CaseBaseConstsEnum.PERSON_TYPE_2.getDes()); |
| | | casePerson.setCustId(registerSaveDTO.getCustId()); |
| | | casePerson.setCreateTime(registerSaveDTO.getUpdateTime()); |
| | | casePerson.setUpdateTime(registerSaveDTO.getUpdateTime()); |
| | | //todo 绑定当事人小程序 |
| | | personService.saveOrUpdate(casePerson); |
| | | if (StringUtils.isNotEmpty(defendants.toString())) { |
| | | defendants.append(BaseConsts.COMMA); |
| | | } |
| | | defendants.append(casePerson.getTrueName()); |
| | | peopleNum++; |
| | | } |
| | | //保存代理人 |
| | | List<CaseAgent> pagentList = registerSaveDTO.getPagentList(); |
| | | if (CollectionUtils.isNotEmpty(pagentList)) { |
| | | for(CaseAgent caseAgent: pagentList){ |
| | | newAgentIdList.add(caseAgent.getId()); |
| | | caseAgent.setId(utilsClient.getNewTimeId()); |
| | | caseAgent.setCaseId(registerSaveDTO.getId()); |
| | | caseAgent.setAgentTypeName(CaseBaseConstsEnum.getDes(caseAgent.getAgentType())); |
| | | caseAgent.setCustId(registerSaveDTO.getCustId()); |
| | | caseAgent.setCreateTime(registerSaveDTO.getUpdateTime()); |
| | | caseAgent.setUpdateTime(registerSaveDTO.getUpdateTime()); |
| | | agentService.saveOrUpdate(caseAgent); |
| | | if (StringUtils.isNotEmpty(dagents.toString())) { |
| | | dagents.append(BaseConsts.COMMA); |
| | | } |
| | | dagents.append(caseAgent.getTrueName()); |
| | | //todo 绑定当事人小程序 |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | // 删除冗余的申请人 |
| | | if (CollectionUtils.isNotEmpty(newPersonIdList)) { |
| | | List<String> oldPersonIdList = personService.listIdByCaseId(registerSaveDTO.getId()); |
| | | for (String oldPersonId : oldPersonIdList) { |
| | | if (!newPersonIdList.contains(oldPersonId)) { |
| | | personService.removeById(oldPersonId); |
| | | } |
| | | } |
| | | }else{ |
| | | QueryWrapper<CasePerson> casePersonQueryWrapper = new QueryWrapper<>(); |
| | | casePersonQueryWrapper.eq("case_id", registerSaveDTO.getId()); |
| | | personService.remove(casePersonQueryWrapper); |
| | | } |
| | | //删除冗余的代理人 |
| | | if(CollectionUtils.isNotEmpty(newAgentIdList)){ |
| | | List<String> oldAgentIdList = agentService.listIdByCaseId(registerSaveDTO.getId()); |
| | | for(String oldAgentId: oldAgentIdList){ |
| | | if(!newAgentIdList.contains(oldAgentId)){ |
| | | agentService.removeById(oldAgentId); |
| | | } |
| | | } |
| | | }else{ |
| | | QueryWrapper<CaseAgent> caseAgentQueryWrapper = new QueryWrapper<>(); |
| | | caseAgentQueryWrapper.eq("case_id", registerSaveDTO.getId()); |
| | | agentService.remove(caseAgentQueryWrapper); |
| | | } |
| | | |
| | | return peopleNum; |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.huge.module.cases.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.cases.dao.mapper.CaseInfoUnfoldMapper; |
| | | import cn.huge.module.cases.domain.po.CaseInfoUnfold; |
| | | 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 wangwh |
| | | * @Time 2024-08-27 20:36:04 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class CaseInfoUnfoldService extends ServiceImpl<CaseInfoUnfoldMapper, CaseInfoUnfold>{ |
| | | |
| | | @Autowired |
| | | private CaseInfoUnfoldMapper mapper; |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | public void updateCaseInfoUnfold(CaseInfoUnfold entity){ |
| | | try{ |
| | | mapper.updateCaseInfoUnfold(entity); |
| | | }catch (Exception e){ |
| | | log.error("[CaseInfoUnfoldService.updateCaseInfoUnfold]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseInfoUnfoldService.updateCaseInfoUnfold", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | public void updateCaseInfoUnfoldTerms(CaseInfoUnfold entity, Map<String, Object> terms){ |
| | | try{ |
| | | mapper.updateCaseInfoUnfoldTerms(entity, terms); |
| | | }catch (Exception e){ |
| | | log.error("[CaseInfoUnfoldService.updateCaseInfoUnfoldTerms]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseInfoUnfoldService.updateCaseInfoUnfoldTerms", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | public void deleteCaseInfoUnfold(String id){ |
| | | try{ |
| | | mapper.deleteCaseInfoUnfold(id); |
| | | }catch (Exception e){ |
| | | log.error("[CaseInfoUnfoldService.deleteCaseInfoUnfold]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseInfoUnfoldService.deleteCaseInfoUnfold", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 按条件查询 |
| | | * @param terms 条件 |
| | | * @return List |
| | | */ |
| | | public List<CaseInfoUnfold> 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<CaseInfoUnfold> pageQuery(PageRequest page, Map<String, Object> terms){ |
| | | long total = mapper.countTerms(terms); |
| | | List<CaseInfoUnfold> content = mapper.pageTerms(page, terms); |
| | | return new PageImpl<CaseInfoUnfold>(content, page, total); |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @param caseInfoUnfold 实体对象 |
| | | */ |
| | | public void saveCaseInfoUnfold(CaseInfoUnfold caseInfoUnfold){ |
| | | try{ |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 判断是否新增 |
| | | if (IdUtils.checkNewId(caseInfoUnfold.getId())){ |
| | | caseInfoUnfold.setId(utilsClient.getNewTimeId()); |
| | | caseInfoUnfold.setCreateTime(nowDate); |
| | | } |
| | | caseInfoUnfold.setUpdateTime(nowDate); |
| | | this.saveOrUpdate(caseInfoUnfold); |
| | | }catch (Exception e){ |
| | | log.error("[CaseInfoUnfoldService.saveCaseInfoUnfold]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseInfoUnfoldService.saveCaseInfoUnfold", e); |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.cases.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.cases.dao.mapper.CasePersonMapper; |
| | | import cn.huge.module.cases.domain.po.CasePerson; |
| | | 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 wangwh |
| | | * @Time 2024-08-27 10:48:18 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class CasePersonService extends ServiceImpl<CasePersonMapper, CasePerson>{ |
| | | |
| | | @Autowired |
| | | private CasePersonMapper mapper; |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | public void updateCasePerson(CasePerson entity){ |
| | | try{ |
| | | mapper.updateCasePerson(entity); |
| | | }catch (Exception e){ |
| | | log.error("[CasePersonService.updateCasePerson]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CasePersonService.updateCasePerson", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | public void updateCasePersonTerms(CasePerson entity, Map<String, Object> terms){ |
| | | try{ |
| | | mapper.updateCasePersonTerms(entity, terms); |
| | | }catch (Exception e){ |
| | | log.error("[CasePersonService.updateCasePersonTerms]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CasePersonService.updateCasePersonTerms", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | public void deleteCasePerson(String id){ |
| | | try{ |
| | | mapper.deleteCasePerson(id); |
| | | }catch (Exception e){ |
| | | log.error("[CasePersonService.deleteCasePerson]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CasePersonService.deleteCasePerson", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 按条件查询 |
| | | * @param terms 条件 |
| | | * @return List |
| | | */ |
| | | public List<CasePerson> 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<CasePerson> pageQuery(PageRequest page, Map<String, Object> terms){ |
| | | long total = mapper.countTerms(terms); |
| | | List<CasePerson> content = mapper.pageTerms(page, terms); |
| | | return new PageImpl<CasePerson>(content, page, total); |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @param casePerson 实体对象 |
| | | */ |
| | | public void saveCasePerson(CasePerson casePerson){ |
| | | try{ |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 判断是否新增 |
| | | if (IdUtils.checkNewId(casePerson.getId())){ |
| | | casePerson.setId(utilsClient.getNewTimeId()); |
| | | casePerson.setCreateTime(nowDate); |
| | | } |
| | | casePerson.setUpdateTime(nowDate); |
| | | this.saveOrUpdate(casePerson); |
| | | }catch (Exception e){ |
| | | log.error("[CasePersonService.saveCasePerson]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CasePersonService.saveCasePerson", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据纠纷编号查询人员编号 |
| | | * @param caseId 纠纷编号 |
| | | * @return List<String> |
| | | */ |
| | | public List<String> listIdByCaseId(String caseId){ |
| | | return mapper.listIdByCaseId(caseId); |
| | | } |
| | | } |
| 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/v1/ctUser/clientGetUser?userId= |
| | | * @param userId 登录用户编号 |
| | | * @return ReturnBO |
| | | */ |
| | | @GetMapping("/api/v1/ctUser/clientGetUser") |
| | | ReturnBO clientGetUser(@RequestParam("userId") String userId); |
| | | |
| | | /** |
| | | * 内部用户-获取登录用户 |
| | | * @url {ctx}/api/v1/ctUser/clientGetUserAll?userId= |
| | | * @param userId 登录用户编号 |
| | | * @return |
| | | */ |
| | | @GetMapping("/api/v1/ctUser/clientGetUserAll") |
| | | ReturnBO clientGetUserAll(@RequestParam("userId") String userId); |
| | | |
| | | /** |
| | | * 当事人-获取登录用户 |
| | | * @url {ctx}/api/v1/paUser/clientGetUserAll?userId= |
| | | * @param userId 登录用户编号 |
| | | * @return ReturnBO |
| | | */ |
| | | @GetMapping("/api/v1/paUser/clientGetUserAll") |
| | | ReturnBO paclientGetUser(@RequestParam("userId") String userId); |
| | | |
| | | /** |
| | | * 根据组织和角色查询 |
| | | * @url {ctx}/api/v1/ctUser/listUserByUnitRole |
| | | * @return unitId 组织编号 |
| | | * @return roleCode 角色代码 |
| | | * @return ReturnBO |
| | | */ |
| | | @GetMapping("/api/v1/ctUser/listUserByUnitRole") |
| | | ReturnBO listUserByUnitRole(@RequestParam(value = "unitId") String unitId, @RequestParam(value = "roleCode") String roleCode); |
| | | |
| | | /** |
| | | * 根据部门和角色查询 |
| | | * @url {ctx}/api/v1/ctUser/listUserByDeptRole |
| | | * @return deptId 部门编号 |
| | | * @return roleCode 角色代码 |
| | | * @return ReturnBO |
| | | */ |
| | | @GetMapping("/api/v1/ctUser/listUserByDeptRole") |
| | | ReturnBO listUserByDeptRole(@RequestParam(value = "deptId") String deptId, @RequestParam(value = "roleCode") String roleCode); |
| | | |
| | | /** |
| | | * 查询客户下的法院 |
| | | * @url {ctx}/api/v1/ctUnit/listCourt1 |
| | | * @param userId 用户编号 |
| | | * @return ReturnBO |
| | | */ |
| | | @GetMapping("/api/v1/ctUnit/listCourt1") |
| | | ReturnBO listCourt1(@RequestParam(value = "userId") String userId); |
| | | } |
| 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; |
| | | |
| | | /** |
| | | * @title: 公共工具微服务调用接口 |
| | | * @description: 公共工具微服务调用接口 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2021-11-05 16:51:48 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @FeignClient(name = "dyh-utils") |
| | | public interface UtilsClient { |
| | | |
| | | /** |
| | | * 公共工具-id工具-获取时间Id,后四位常量 |
| | | * @url {ctx}/common/api/idUtils/getNewTimeId |
| | | * @return ReturnBO |
| | | */ |
| | | @GetMapping("/common/api/idUtils/getNewTimeId") |
| | | ReturnBO getNewTimeId(); |
| | | } |
| 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.dto.SelectTermDTO; |
| | | 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.alibaba.fastjson.JSON; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.LinkedHashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @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); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据组织和角色查询 |
| | | * @return unitId 组织编号 |
| | | * @return roleCode 角色代码 |
| | | * @return Object |
| | | */ |
| | | public List<CtUserDTO> listUserByUnitRole(@RequestParam(value = "unitId") String unitId, @RequestParam(value = "roleCode") String roleCode) { |
| | | List<CtUserDTO> ctUserDTOList = new ArrayList<>(); |
| | | try{ |
| | | ReturnBO returnBo = custClient.listUserByUnitRole(unitId, roleCode); |
| | | if (ReturnConsts.OK == returnBo.getCode()){ |
| | | List<LinkedHashMap> list = (List<LinkedHashMap>) returnBo.getData(); |
| | | for (LinkedHashMap map : list) { |
| | | CtUserDTO ctUserDTO = JSON.parseObject(JSON.toJSONString(map), CtUserDTO.class); |
| | | ctUserDTOList.add(ctUserDTO); |
| | | } |
| | | return ctUserDTOList; |
| | | }else{ |
| | | log.error("Client外服务接口[CustClientImpl.listUserByUnitRole]请求异常:" + returnBo.getMsg(), returnBo.getMsg()); |
| | | throw new ClientException("CustClientImpl.listUserByUnitRole", returnBo.getMsg()); |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("service方法[CustClientImpl.listUserByUnitRole]调用异常:"+e, e); |
| | | throw new ServiceException("CustClientImpl.listUserByUnitRole", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据部门和角色查询 |
| | | * @return deptId 部门编号 |
| | | * @return roleCode 角色代码 |
| | | * @return Object |
| | | */ |
| | | public List<CtUserDTO> listUserByDeptRole(@RequestParam(value = "deptId") String deptId, @RequestParam(value = "roleCode") String roleCode) { |
| | | List<CtUserDTO> ctUserDTOList = new ArrayList<>(); |
| | | try{ |
| | | ReturnBO returnBo = custClient.listUserByDeptRole(deptId, roleCode); |
| | | if (ReturnConsts.OK == returnBo.getCode()){ |
| | | List<LinkedHashMap> list = (List<LinkedHashMap>) returnBo.getData(); |
| | | for (LinkedHashMap map : list) { |
| | | CtUserDTO ctUserDTO = JSON.parseObject(JSON.toJSONString(map), CtUserDTO.class); |
| | | ctUserDTOList.add(ctUserDTO); |
| | | } |
| | | return ctUserDTOList; |
| | | }else{ |
| | | log.error("Client外服务接口[CustClientImpl.listUserByDeptRole]请求异常:" + returnBo.getMsg(), returnBo.getMsg()); |
| | | throw new ClientException("CustClientImpl.listUserByDeptRole", returnBo.getMsg()); |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("service方法[CustClientImpl.listUserByDeptRole]调用异常:"+e, e); |
| | | throw new ServiceException("CustClientImpl.listUserByDeptRole", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询客户下的法院 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | public List<SelectTermDTO> listCourt1(String userId){ |
| | | List<SelectTermDTO> selectTermDTOList = new ArrayList<>(); |
| | | try{ |
| | | ReturnBO returnBo = custClient.listCourt1(userId); |
| | | if (ReturnConsts.OK == returnBo.getCode()){ |
| | | List<LinkedHashMap> list = (List<LinkedHashMap>) returnBo.getData(); |
| | | for (LinkedHashMap map : list) { |
| | | SelectTermDTO selectTermDTO = JSON.parseObject(JSON.toJSONString(map), SelectTermDTO.class); |
| | | selectTermDTOList.add(selectTermDTO); |
| | | } |
| | | return selectTermDTOList; |
| | | }else{ |
| | | log.error("Client外服务接口[CustClientImpl.listCourt1]请求异常:" + returnBo.getMsg(), returnBo.getMsg()); |
| | | throw new ClientException("CustClientImpl.listCourt1", returnBo.getMsg()); |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("service方法[CustClientImpl.listCourt1]调用异常:"+e, e); |
| | | throw new ServiceException("CustClientImpl.listCourt1", e); |
| | | } |
| | | } |
| | | } |
| 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.UtilsClient; |
| | | 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 UtilsClientImpl { |
| | | |
| | | private UtilsClient utilsClient; |
| | | |
| | | @Autowired |
| | | public UtilsClientImpl(UtilsClient utilsClient) { |
| | | this.utilsClient = utilsClient; |
| | | } |
| | | |
| | | /** |
| | | * 公共工具-id工具-获取时间Id,后四位常量 |
| | | * @url {ctx}/common/api/idUtils/getNewTimeId |
| | | * @return ReturnBO |
| | | */ |
| | | public String getNewTimeId(){ |
| | | try{ |
| | | ReturnBO returnBo = utilsClient.getNewTimeId(); |
| | | if (ReturnConsts.OK == returnBo.getCode()){ |
| | | String id = (String) returnBo.getData(); |
| | | return id; |
| | | }else{ |
| | | log.error("Client外服务接口[UtilsClientImpl.getNewTimeId]请求异常:" + returnBo.getMsg(), returnBo.getMsg()); |
| | | throw new ClientException("UtilsClientImpl.getNewTimeId", returnBo.getMsg()); |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("service方法[UtilsClientImpl.getNewTimeId]请求成功,处理异常:"+e, e); |
| | | throw new ServiceException("UtilsClientImpl.getNewTimeId", e); |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.draft.controller.web; |
| | | |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.module.draft.domain.po.CasedraftAgent; |
| | | import cn.huge.module.draft.service.CasedraftAgentService; |
| | | 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: wangwh |
| | | * @time: 2024-08-27 10:48:18 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/web/casedraftAgent") |
| | | public class CasedraftAgentWebController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private CasedraftAgentService 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); |
| | | } |
| | | // 公众用户编号 |
| | | String partyUserId = request.getParameter("partyUserId"); |
| | | if (StringUtils.isNotBlank(partyUserId)){ |
| | | terms.put("partyUserId", partyUserId); |
| | | } |
| | | // 代理人类型 |
| | | String perClass = request.getParameter("perClass"); |
| | | if (StringUtils.isNotBlank(perClass)){ |
| | | terms.put("perClass", perClass); |
| | | } |
| | | // 代理人类型名称 |
| | | String perClassName = request.getParameter("perClassName"); |
| | | if (StringUtils.isNotBlank(perClassName)){ |
| | | terms.put("perClassName", perClassName); |
| | | } |
| | | // 姓名 |
| | | String trueName = request.getParameter("trueName"); |
| | | if (StringUtils.isNotBlank(trueName)){ |
| | | terms.put("trueName", trueName); |
| | | } |
| | | // 联系方式 |
| | | String mobile = request.getParameter("mobile"); |
| | | if (StringUtils.isNotBlank(mobile)){ |
| | | terms.put("mobile", mobile); |
| | | } |
| | | // 证件类型 |
| | | String certiType = request.getParameter("certiType"); |
| | | if (StringUtils.isNotBlank(certiType)){ |
| | | terms.put("certiType", certiType); |
| | | } |
| | | // 证件类型名称 |
| | | String certiTypeName = request.getParameter("certiTypeName"); |
| | | if (StringUtils.isNotBlank(certiTypeName)){ |
| | | terms.put("certiTypeName", certiTypeName); |
| | | } |
| | | // 证件号码 |
| | | String certiNo = request.getParameter("certiNo"); |
| | | if (StringUtils.isNotBlank(certiNo)){ |
| | | terms.put("certiNo", certiNo); |
| | | } |
| | | // 联系地址省 |
| | | String prov = request.getParameter("prov"); |
| | | if (StringUtils.isNotBlank(prov)){ |
| | | terms.put("prov", prov); |
| | | } |
| | | // 联系地址省名称 |
| | | String provName = request.getParameter("provName"); |
| | | if (StringUtils.isNotBlank(provName)){ |
| | | terms.put("provName", provName); |
| | | } |
| | | // 联系地址市 |
| | | String city = request.getParameter("city"); |
| | | if (StringUtils.isNotBlank(city)){ |
| | | terms.put("city", city); |
| | | } |
| | | // 联系/企业/机构地址市名称 |
| | | String cityName = request.getParameter("cityName"); |
| | | if (StringUtils.isNotBlank(cityName)){ |
| | | terms.put("cityName", cityName); |
| | | } |
| | | // 联系/企业/机构地址区 |
| | | String area = request.getParameter("area"); |
| | | if (StringUtils.isNotBlank(area)){ |
| | | terms.put("area", area); |
| | | } |
| | | // 联系/企业/机构地址区名称 |
| | | String areaName = request.getParameter("areaName"); |
| | | if (StringUtils.isNotBlank(areaName)){ |
| | | terms.put("areaName", areaName); |
| | | } |
| | | // 联地址街道 |
| | | String road = request.getParameter("road"); |
| | | if (StringUtils.isNotBlank(road)){ |
| | | terms.put("road", road); |
| | | } |
| | | // 联系地址街道名称 |
| | | String roadName = request.getParameter("roadName"); |
| | | if (StringUtils.isNotBlank(roadName)){ |
| | | terms.put("roadName", roadName); |
| | | } |
| | | // 联系地址社区 |
| | | String village = request.getParameter("village"); |
| | | if (StringUtils.isNotBlank(village)){ |
| | | terms.put("village", village); |
| | | } |
| | | // 联系地址社区名称 |
| | | String villageName = request.getParameter("villageName"); |
| | | if (StringUtils.isNotBlank(villageName)){ |
| | | terms.put("villageName", villageName); |
| | | } |
| | | // 联系地址详细地址 |
| | | String addr = request.getParameter("addr"); |
| | | if (StringUtils.isNotBlank(addr)){ |
| | | terms.put("addr", addr); |
| | | } |
| | | // 户籍地址省 |
| | | String placeProv = request.getParameter("placeProv"); |
| | | if (StringUtils.isNotBlank(placeProv)){ |
| | | terms.put("placeProv", placeProv); |
| | | } |
| | | // 户籍地址省名称 |
| | | String placeProvName = request.getParameter("placeProvName"); |
| | | if (StringUtils.isNotBlank(placeProvName)){ |
| | | terms.put("placeProvName", placeProvName); |
| | | } |
| | | // 户籍地址市 |
| | | String placeCity = request.getParameter("placeCity"); |
| | | if (StringUtils.isNotBlank(placeCity)){ |
| | | terms.put("placeCity", placeCity); |
| | | } |
| | | // 户籍地址市名称 |
| | | String placeCityName = request.getParameter("placeCityName"); |
| | | if (StringUtils.isNotBlank(placeCityName)){ |
| | | terms.put("placeCityName", placeCityName); |
| | | } |
| | | // 户籍地址区 |
| | | String placeArea = request.getParameter("placeArea"); |
| | | if (StringUtils.isNotBlank(placeArea)){ |
| | | terms.put("placeArea", placeArea); |
| | | } |
| | | // 户籍地址区名称 |
| | | String placeAreaName = request.getParameter("placeAreaName"); |
| | | if (StringUtils.isNotBlank(placeAreaName)){ |
| | | terms.put("placeAreaName", placeAreaName); |
| | | } |
| | | // 户籍地址街道 |
| | | String placeRoad = request.getParameter("placeRoad"); |
| | | if (StringUtils.isNotBlank(placeRoad)){ |
| | | terms.put("placeRoad", placeRoad); |
| | | } |
| | | // 户籍地址街道名称 |
| | | String placeRoadName = request.getParameter("placeRoadName"); |
| | | if (StringUtils.isNotBlank(placeRoadName)){ |
| | | terms.put("placeRoadName", placeRoadName); |
| | | } |
| | | // 户籍地址社区 |
| | | String placeVillage = request.getParameter("placeVillage"); |
| | | if (StringUtils.isNotBlank(placeVillage)){ |
| | | terms.put("placeVillage", placeVillage); |
| | | } |
| | | // 户籍地址社区名称 |
| | | String placeVillageName = request.getParameter("placeVillageName"); |
| | | if (StringUtils.isNotBlank(placeVillageName)){ |
| | | terms.put("placeVillageName", placeVillageName); |
| | | } |
| | | // 户籍地址详细地址 |
| | | String placeAddr = request.getParameter("placeAddr"); |
| | | if (StringUtils.isNotBlank(placeAddr)){ |
| | | terms.put("placeAddr", placeAddr); |
| | | } |
| | | // 工作单位 |
| | | String workUnit = request.getParameter("workUnit"); |
| | | if (StringUtils.isNotBlank(workUnit)){ |
| | | terms.put("workUnit", workUnit); |
| | | } |
| | | // 民族 |
| | | String nation = request.getParameter("nation"); |
| | | if (StringUtils.isNotBlank(nation)){ |
| | | terms.put("nation", nation); |
| | | } |
| | | // 民族名称 |
| | | String nationName = request.getParameter("nationName"); |
| | | if (StringUtils.isNotBlank(nationName)){ |
| | | terms.put("nationName", nationName); |
| | | } |
| | | // 性别 |
| | | String sex = request.getParameter("sex"); |
| | | if (StringUtils.isNotBlank(sex)){ |
| | | terms.put("sex", sex); |
| | | } |
| | | // 性别名称 |
| | | String sexName = request.getParameter("sexName"); |
| | | if (StringUtils.isNotBlank(sexName)){ |
| | | terms.put("sexName", sexName); |
| | | } |
| | | // 是否有个人极端倾向,0:否,1:是 |
| | | String extreme = request.getParameter("extreme"); |
| | | if (StringUtils.isNotBlank(extreme)){ |
| | | terms.put("extreme", extreme); |
| | | } |
| | | // 委托关系 |
| | | String agentRelate = request.getParameter("agentRelate"); |
| | | if (StringUtils.isNotBlank(agentRelate)){ |
| | | terms.put("agentRelate", agentRelate); |
| | | } |
| | | // 委托关系名称 |
| | | String agentRelateName = request.getParameter("agentRelateName"); |
| | | if (StringUtils.isNotBlank(agentRelateName)){ |
| | | terms.put("agentRelateName", agentRelateName); |
| | | } |
| | | // 委托类型 |
| | | String agentType = request.getParameter("agentType"); |
| | | if (StringUtils.isNotBlank(agentType)){ |
| | | terms.put("agentType", agentType); |
| | | } |
| | | // 委托类型名称 |
| | | String agentTypeName = request.getParameter("agentTypeName"); |
| | | if (StringUtils.isNotBlank(agentTypeName)){ |
| | | terms.put("agentTypeName", agentTypeName); |
| | | } |
| | | // 代理当事人编号,多个用,隔开 |
| | | String personId = request.getParameter("personId"); |
| | | if (StringUtils.isNotBlank(personId)){ |
| | | terms.put("personId", personId); |
| | | } |
| | | // 头像 |
| | | String avatar = request.getParameter("avatar"); |
| | | if (StringUtils.isNotBlank(avatar)){ |
| | | terms.put("avatar", avatar); |
| | | } |
| | | // 职业 |
| | | String job = request.getParameter("job"); |
| | | if (StringUtils.isNotBlank(job)){ |
| | | terms.put("job", job); |
| | | } |
| | | // 职业名称 |
| | | String jobName = request.getParameter("jobName"); |
| | | if (StringUtils.isNotBlank(jobName)){ |
| | | terms.put("jobName", jobName); |
| | | } |
| | | // 出生日期 |
| | | String birthday = request.getParameter("birthday"); |
| | | if (StringUtils.isNotBlank(birthday)){ |
| | | terms.put("birthday", birthday); |
| | | } |
| | | // 年龄 |
| | | String age = request.getParameter("age"); |
| | | if (StringUtils.isNotBlank(age)){ |
| | | terms.put("age", age); |
| | | } |
| | | // 有无代理人,0:无,1:有 |
| | | String agentStatus = request.getParameter("agentStatus"); |
| | | if (StringUtils.isNotBlank(agentStatus)){ |
| | | terms.put("agentStatus", agentStatus); |
| | | } |
| | | // 顾客编号 |
| | | 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/casedraftAgent/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/casedraftAgent/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<CasedraftAgent> casedraftAgentPage = service.pageQuery(pageRequest, terms); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", casedraftAgentPage); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/web/casedraftAgent/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/casedraftAgent/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/casedraftAgent/saveCasedraftAgent |
| | | * @param casedraftAgent 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveCasedraftAgent") |
| | | public Object saveCasedraftAgent(@RequestBody CasedraftAgent casedraftAgent) { |
| | | try { |
| | | service.saveCasedraftAgent(casedraftAgent); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.draft.controller.web; |
| | | |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.base.config.CurrentUser; |
| | | import cn.huge.module.cases.domain.dto.RegisterSaveDTO; |
| | | import cn.huge.module.draft.domain.dto.DraftRegisterSaveDTO; |
| | | import cn.huge.module.draft.domain.po.CasedraftInfo; |
| | | import cn.huge.module.draft.service.CasedraftInfoService; |
| | | 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: wangwh |
| | | * @time: 2024-08-27 10:48:18 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/web/casedraftInfo") |
| | | public class CasedraftInfoWebController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private CasedraftInfoService 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 caseTitle = request.getParameter("caseTitle"); |
| | | if (StringUtils.isNotBlank(caseTitle)){ |
| | | terms.put("caseTitle", caseTitle); |
| | | } |
| | | // 事项编号 |
| | | String caseRef = request.getParameter("caseRef"); |
| | | if (StringUtils.isNotBlank(caseRef)){ |
| | | terms.put("caseRef", caseRef); |
| | | } |
| | | // 事项等级 |
| | | String caseLevel = request.getParameter("caseLevel"); |
| | | if (StringUtils.isNotBlank(caseLevel)){ |
| | | terms.put("caseLevel", caseLevel); |
| | | } |
| | | // 来访时间 |
| | | String visitTime = request.getParameter("visitTime"); |
| | | if (StringUtils.isNotBlank(visitTime)){ |
| | | terms.put("visitTime", visitTime); |
| | | } |
| | | // 来访人数 |
| | | String visitPeopleNum = request.getParameter("visitPeopleNum"); |
| | | if (StringUtils.isNotBlank(visitPeopleNum)){ |
| | | terms.put("visitPeopleNum", visitPeopleNum); |
| | | } |
| | | // 调解类型 |
| | | String mediType = request.getParameter("mediType"); |
| | | if (StringUtils.isNotBlank(mediType)){ |
| | | terms.put("mediType", mediType); |
| | | } |
| | | // 调解类型名称 |
| | | String mediTypeName = request.getParameter("mediTypeName"); |
| | | if (StringUtils.isNotBlank(mediTypeName)){ |
| | | terms.put("mediTypeName", mediTypeName); |
| | | } |
| | | // 纠纷一级类型 |
| | | String caseTypeFirst = request.getParameter("caseTypeFirst"); |
| | | if (StringUtils.isNotBlank(caseTypeFirst)){ |
| | | terms.put("caseTypeFirst", caseTypeFirst); |
| | | } |
| | | // 纠纷一级类型名称 |
| | | String caseTypeFirstName = request.getParameter("caseTypeFirstName"); |
| | | if (StringUtils.isNotBlank(caseTypeFirstName)){ |
| | | terms.put("caseTypeFirstName", caseTypeFirstName); |
| | | } |
| | | // 纠纷类型 |
| | | 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); |
| | | } |
| | | // 纠纷发生时间 |
| | | String occurTime = request.getParameter("occurTime"); |
| | | if (StringUtils.isNotBlank(occurTime)){ |
| | | terms.put("occurTime", occurTime); |
| | | } |
| | | // 纠纷发生地详细地址 |
| | | String addr = request.getParameter("addr"); |
| | | if (StringUtils.isNotBlank(addr)){ |
| | | terms.put("addr", addr); |
| | | } |
| | | // 纠纷发生地经度 |
| | | String lng = request.getParameter("lng"); |
| | | if (StringUtils.isNotBlank(lng)){ |
| | | terms.put("lng", lng); |
| | | } |
| | | // 纠纷发生地纬度 |
| | | String lat = request.getParameter("lat"); |
| | | if (StringUtils.isNotBlank(lat)){ |
| | | terms.put("lat", lat); |
| | | } |
| | | // 纠纷发生地网格地址 |
| | | String wgAddr = request.getParameter("wgAddr"); |
| | | if (StringUtils.isNotBlank(wgAddr)){ |
| | | terms.put("wgAddr", wgAddr); |
| | | } |
| | | // 纠纷发生地网格地址经度 |
| | | String wgLng = request.getParameter("wgLng"); |
| | | if (StringUtils.isNotBlank(wgLng)){ |
| | | terms.put("wgLng", wgLng); |
| | | } |
| | | // 纠纷发生地网格地址纬度 |
| | | String wgLat = request.getParameter("wgLat"); |
| | | if (StringUtils.isNotBlank(wgLat)){ |
| | | terms.put("wgLat", wgLat); |
| | | } |
| | | // 问题属地省 |
| | | String queProv = request.getParameter("queProv"); |
| | | if (StringUtils.isNotBlank(queProv)){ |
| | | terms.put("queProv", queProv); |
| | | } |
| | | // 问题属地省名称 |
| | | String queProvName = request.getParameter("queProvName"); |
| | | if (StringUtils.isNotBlank(queProvName)){ |
| | | terms.put("queProvName", queProvName); |
| | | } |
| | | // 问题属地市 |
| | | String queCity = request.getParameter("queCity"); |
| | | if (StringUtils.isNotBlank(queCity)){ |
| | | terms.put("queCity", queCity); |
| | | } |
| | | // 问题属地市名称 |
| | | String queCityName = request.getParameter("queCityName"); |
| | | if (StringUtils.isNotBlank(queCityName)){ |
| | | terms.put("queCityName", queCityName); |
| | | } |
| | | // 问题属地区 |
| | | String queArea = request.getParameter("queArea"); |
| | | if (StringUtils.isNotBlank(queArea)){ |
| | | terms.put("queArea", queArea); |
| | | } |
| | | // 问题属地区名称 |
| | | String queAreaName = request.getParameter("queAreaName"); |
| | | if (StringUtils.isNotBlank(queAreaName)){ |
| | | terms.put("queAreaName", queAreaName); |
| | | } |
| | | // 问题属地街道 |
| | | String queRoad = request.getParameter("queRoad"); |
| | | if (StringUtils.isNotBlank(queRoad)){ |
| | | terms.put("queRoad", queRoad); |
| | | } |
| | | // 问题属地街道名称 |
| | | String queRoadName = request.getParameter("queRoadName"); |
| | | if (StringUtils.isNotBlank(queRoadName)){ |
| | | terms.put("queRoadName", queRoadName); |
| | | } |
| | | // 问题属地社区 |
| | | String queVillage = request.getParameter("queVillage"); |
| | | if (StringUtils.isNotBlank(queVillage)){ |
| | | terms.put("queVillage", queVillage); |
| | | } |
| | | // 问题属地社区名称 |
| | | String queVillageName = request.getParameter("queVillageName"); |
| | | if (StringUtils.isNotBlank(queVillageName)){ |
| | | terms.put("queVillageName", queVillageName); |
| | | } |
| | | // 涉及人数 |
| | | String peopleNum = request.getParameter("peopleNum"); |
| | | if (StringUtils.isNotBlank(peopleNum)){ |
| | | terms.put("peopleNum", peopleNum); |
| | | } |
| | | // 涉及金额 |
| | | String amount = request.getParameter("amount"); |
| | | if (StringUtils.isNotBlank(amount)){ |
| | | terms.put("amount", amount); |
| | | } |
| | | // 涉及人群 |
| | | String crowd = request.getParameter("crowd"); |
| | | if (StringUtils.isNotBlank(crowd)){ |
| | | terms.put("crowd", crowd); |
| | | } |
| | | // 涉及人群名称 |
| | | String crowdName = request.getParameter("crowdName"); |
| | | if (StringUtils.isNotBlank(crowdName)){ |
| | | terms.put("crowdName", crowdName); |
| | | } |
| | | // 事项来源 |
| | | String canal = request.getParameter("canal"); |
| | | if (StringUtils.isNotBlank(canal)){ |
| | | terms.put("canal", canal); |
| | | } |
| | | // 事项来源名称 |
| | | String canalName = request.getParameter("canalName"); |
| | | if (StringUtils.isNotBlank(canalName)){ |
| | | terms.put("canalName", canalName); |
| | | } |
| | | // 来访形式 |
| | | String visitWay = request.getParameter("visitWay"); |
| | | if (StringUtils.isNotBlank(visitWay)){ |
| | | terms.put("visitWay", visitWay); |
| | | } |
| | | // 来访形式名称 |
| | | String visitWayName = request.getParameter("visitWayName"); |
| | | if (StringUtils.isNotBlank(visitWayName)){ |
| | | terms.put("visitWayName", visitWayName); |
| | | } |
| | | // 事项概况 |
| | | String caseDes = request.getParameter("caseDes"); |
| | | if (StringUtils.isNotBlank(caseDes)){ |
| | | terms.put("caseDes", caseDes); |
| | | } |
| | | // 事项申请 |
| | | String caseClaim = request.getParameter("caseClaim"); |
| | | if (StringUtils.isNotBlank(caseClaim)){ |
| | | terms.put("caseClaim", caseClaim); |
| | | } |
| | | // 是否重大矛盾纠纷,0:否,1:是 |
| | | String majorStatus = request.getParameter("majorStatus"); |
| | | if (StringUtils.isNotBlank(majorStatus)){ |
| | | terms.put("majorStatus", majorStatus); |
| | | } |
| | | // 纠纷来源 |
| | | String source = request.getParameter("source"); |
| | | if (StringUtils.isNotBlank(source)){ |
| | | terms.put("source", source); |
| | | } |
| | | // 纠纷来源名称 |
| | | String sourceName = request.getParameter("sourceName"); |
| | | if (StringUtils.isNotBlank(sourceName)){ |
| | | terms.put("sourceName", sourceName); |
| | | } |
| | | // 矛调号 |
| | | String caseNo = request.getParameter("caseNo"); |
| | | if (StringUtils.isNotBlank(caseNo)){ |
| | | terms.put("caseNo", caseNo); |
| | | } |
| | | // 民诉前调号 |
| | | String mediateNo = request.getParameter("mediateNo"); |
| | | if (StringUtils.isNotBlank(mediateNo)){ |
| | | terms.put("mediateNo", mediateNo); |
| | | } |
| | | // 民诉前调书号 |
| | | String mediateBookNo = request.getParameter("mediateBookNo"); |
| | | if (StringUtils.isNotBlank(mediateBookNo)){ |
| | | terms.put("mediateBookNo", mediateBookNo); |
| | | } |
| | | // 诉讼案号 |
| | | String civilNo = request.getParameter("civilNo"); |
| | | if (StringUtils.isNotBlank(civilNo)){ |
| | | terms.put("civilNo", civilNo); |
| | | } |
| | | // 申请方当事人名称 |
| | | String plaintiffs = request.getParameter("plaintiffs"); |
| | | if (StringUtils.isNotBlank(plaintiffs)){ |
| | | terms.put("plaintiffs", plaintiffs); |
| | | } |
| | | // 申请方代理人名称 |
| | | String pagents = request.getParameter("pagents"); |
| | | if (StringUtils.isNotBlank(pagents)){ |
| | | terms.put("pagents", pagents); |
| | | } |
| | | // 被申请方当事人名称 |
| | | String defendants = request.getParameter("defendants"); |
| | | if (StringUtils.isNotBlank(defendants)){ |
| | | terms.put("defendants", defendants); |
| | | } |
| | | // 被申请方代理人名称 |
| | | String dagents = request.getParameter("dagents"); |
| | | if (StringUtils.isNotBlank(dagents)){ |
| | | terms.put("dagents", dagents); |
| | | } |
| | | // 登记组织编号 |
| | | String inputUnitId = request.getParameter("inputUnitId"); |
| | | if (StringUtils.isNotBlank(inputUnitId)){ |
| | | terms.put("inputUnitId", inputUnitId); |
| | | } |
| | | // 登记组织名称 |
| | | String inputUnitName = request.getParameter("inputUnitName"); |
| | | if (StringUtils.isNotBlank(inputUnitName)){ |
| | | terms.put("inputUnitName", inputUnitName); |
| | | } |
| | | // 登记人编号 |
| | | String inputUserId = request.getParameter("inputUserId"); |
| | | if (StringUtils.isNotBlank(inputUserId)){ |
| | | terms.put("inputUserId", inputUserId); |
| | | } |
| | | // 登记人名称 |
| | | String inputUserName = request.getParameter("inputUserName"); |
| | | if (StringUtils.isNotBlank(inputUserName)){ |
| | | terms.put("inputUserName", inputUserName); |
| | | } |
| | | // 登记方式,1:正常登记,2:案件导入 |
| | | String inputWay = request.getParameter("inputWay"); |
| | | if (StringUtils.isNotBlank(inputWay)){ |
| | | terms.put("inputWay", inputWay); |
| | | } |
| | | // 顾客编号 |
| | | 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/casedraftInfo/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/casedraftInfo/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<CasedraftInfo> casedraftInfoPage = service.pageQuery(pageRequest, terms); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", casedraftInfoPage); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/web/casedraftInfo/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/casedraftInfo/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/casedraftInfo/saveCasedraftInfo |
| | | * @param casedraftInfo 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveCasedraftInfo") |
| | | public Object saveCasedraftInfo(@RequestBody CasedraftInfo casedraftInfo) { |
| | | try { |
| | | service.saveCasedraftInfo(casedraftInfo); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * PC端-纠纷登记-草稿箱-保存纠纷信息 |
| | | * @url {ctx}/api/v1/casedraftInfo/caseDraftRegister |
| | | * @param draftRegisterSaveDTO 实体对象 |
| | | */ |
| | | @PostMapping("/caseDraftRegister") |
| | | public Object caseDraftRegister(@CurrentUser String userId, @RequestBody DraftRegisterSaveDTO draftRegisterSaveDTO) { |
| | | try { |
| | | String caseId = service.caseDraftRegister(draftRegisterSaveDTO, userId); |
| | | return ReturnSucUtils.getRepInfo(caseId); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(e.getMessage()); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.huge.module.draft.controller.web; |
| | | |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.module.draft.domain.po.CasedraftPerson; |
| | | import cn.huge.module.draft.service.CasedraftPersonService; |
| | | 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: wangwh |
| | | * @time: 2024-08-27 10:48:18 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/web/casedraftPerson") |
| | | public class CasedraftPersonWebController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private CasedraftPersonService 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); |
| | | } |
| | | // 公众用户编号 |
| | | String partyUserId = request.getParameter("partyUserId"); |
| | | if (StringUtils.isNotBlank(partyUserId)){ |
| | | terms.put("partyUserId", partyUserId); |
| | | } |
| | | // 当事人地位 |
| | | String perType = request.getParameter("perType"); |
| | | if (StringUtils.isNotBlank(perType)){ |
| | | terms.put("perType", perType); |
| | | } |
| | | // 当事人地位名称 |
| | | String perTypeName = request.getParameter("perTypeName"); |
| | | if (StringUtils.isNotBlank(perTypeName)){ |
| | | terms.put("perTypeName", perTypeName); |
| | | } |
| | | // 当事人类型 |
| | | String perClass = request.getParameter("perClass"); |
| | | if (StringUtils.isNotBlank(perClass)){ |
| | | terms.put("perClass", perClass); |
| | | } |
| | | // 当事人类型名称 |
| | | String perClassName = request.getParameter("perClassName"); |
| | | if (StringUtils.isNotBlank(perClassName)){ |
| | | terms.put("perClassName", perClassName); |
| | | } |
| | | // 姓名/企业/机构名称 |
| | | String trueName = request.getParameter("trueName"); |
| | | if (StringUtils.isNotBlank(trueName)){ |
| | | terms.put("trueName", trueName); |
| | | } |
| | | // 联系方式 |
| | | String mobile = request.getParameter("mobile"); |
| | | if (StringUtils.isNotBlank(mobile)){ |
| | | terms.put("mobile", mobile); |
| | | } |
| | | // 组织机构代码 |
| | | String orgaCode = request.getParameter("orgaCode"); |
| | | if (StringUtils.isNotBlank(orgaCode)){ |
| | | terms.put("orgaCode", orgaCode); |
| | | } |
| | | // 法定/机构代表人名称 |
| | | String deputy = request.getParameter("deputy"); |
| | | if (StringUtils.isNotBlank(deputy)){ |
| | | terms.put("deputy", deputy); |
| | | } |
| | | // 企业/机构类型 |
| | | String orgaType = request.getParameter("orgaType"); |
| | | if (StringUtils.isNotBlank(orgaType)){ |
| | | terms.put("orgaType", orgaType); |
| | | } |
| | | // 企业/机构类型名称 |
| | | String orgaTypeName = request.getParameter("orgaTypeName"); |
| | | if (StringUtils.isNotBlank(orgaTypeName)){ |
| | | terms.put("orgaTypeName", orgaTypeName); |
| | | } |
| | | // 证件类型 |
| | | String certiType = request.getParameter("certiType"); |
| | | if (StringUtils.isNotBlank(certiType)){ |
| | | terms.put("certiType", certiType); |
| | | } |
| | | // 证件类型名称 |
| | | String certiTypeName = request.getParameter("certiTypeName"); |
| | | if (StringUtils.isNotBlank(certiTypeName)){ |
| | | terms.put("certiTypeName", certiTypeName); |
| | | } |
| | | // 证件号码 |
| | | String certiNo = request.getParameter("certiNo"); |
| | | if (StringUtils.isNotBlank(certiNo)){ |
| | | terms.put("certiNo", certiNo); |
| | | } |
| | | // 联系/企业/机构地址省 |
| | | String prov = request.getParameter("prov"); |
| | | if (StringUtils.isNotBlank(prov)){ |
| | | terms.put("prov", prov); |
| | | } |
| | | // 联系/企业/机构地址省名称 |
| | | String provName = request.getParameter("provName"); |
| | | if (StringUtils.isNotBlank(provName)){ |
| | | terms.put("provName", provName); |
| | | } |
| | | // 联系/企业/机构地址市 |
| | | String city = request.getParameter("city"); |
| | | if (StringUtils.isNotBlank(city)){ |
| | | terms.put("city", city); |
| | | } |
| | | // 联系/企业/机构地址市名称 |
| | | String cityName = request.getParameter("cityName"); |
| | | if (StringUtils.isNotBlank(cityName)){ |
| | | terms.put("cityName", cityName); |
| | | } |
| | | // 联系/企业/机构地址区 |
| | | String area = request.getParameter("area"); |
| | | if (StringUtils.isNotBlank(area)){ |
| | | terms.put("area", area); |
| | | } |
| | | // 联系/企业/机构地址区名称 |
| | | String areaName = request.getParameter("areaName"); |
| | | if (StringUtils.isNotBlank(areaName)){ |
| | | terms.put("areaName", areaName); |
| | | } |
| | | // 联系/企业/机构地址街道 |
| | | String road = request.getParameter("road"); |
| | | if (StringUtils.isNotBlank(road)){ |
| | | terms.put("road", road); |
| | | } |
| | | // 联系/企业/机构地址街道名称 |
| | | String roadName = request.getParameter("roadName"); |
| | | if (StringUtils.isNotBlank(roadName)){ |
| | | terms.put("roadName", roadName); |
| | | } |
| | | // 联系/企业/机构地址社区 |
| | | String village = request.getParameter("village"); |
| | | if (StringUtils.isNotBlank(village)){ |
| | | terms.put("village", village); |
| | | } |
| | | // 联系/企业/机构地址社区名称 |
| | | String villageName = request.getParameter("villageName"); |
| | | if (StringUtils.isNotBlank(villageName)){ |
| | | terms.put("villageName", villageName); |
| | | } |
| | | // 联系/企业/机构地址详细地址 |
| | | String addr = request.getParameter("addr"); |
| | | if (StringUtils.isNotBlank(addr)){ |
| | | terms.put("addr", addr); |
| | | } |
| | | // 户籍/住所地址省 |
| | | String placeProv = request.getParameter("placeProv"); |
| | | if (StringUtils.isNotBlank(placeProv)){ |
| | | terms.put("placeProv", placeProv); |
| | | } |
| | | // 户籍/住所地址省名称 |
| | | String placeProvName = request.getParameter("placeProvName"); |
| | | if (StringUtils.isNotBlank(placeProvName)){ |
| | | terms.put("placeProvName", placeProvName); |
| | | } |
| | | // 户籍/住所地址市 |
| | | String placeCity = request.getParameter("placeCity"); |
| | | if (StringUtils.isNotBlank(placeCity)){ |
| | | terms.put("placeCity", placeCity); |
| | | } |
| | | // 户籍/住所地址市名称 |
| | | String placeCityName = request.getParameter("placeCityName"); |
| | | if (StringUtils.isNotBlank(placeCityName)){ |
| | | terms.put("placeCityName", placeCityName); |
| | | } |
| | | // 户籍/住所地址区 |
| | | String placeArea = request.getParameter("placeArea"); |
| | | if (StringUtils.isNotBlank(placeArea)){ |
| | | terms.put("placeArea", placeArea); |
| | | } |
| | | // 户籍/住所地址区名称 |
| | | String placeAreaName = request.getParameter("placeAreaName"); |
| | | if (StringUtils.isNotBlank(placeAreaName)){ |
| | | terms.put("placeAreaName", placeAreaName); |
| | | } |
| | | // 户籍/住所地址街道 |
| | | String placeRoad = request.getParameter("placeRoad"); |
| | | if (StringUtils.isNotBlank(placeRoad)){ |
| | | terms.put("placeRoad", placeRoad); |
| | | } |
| | | // 户籍/住所地址街道名称 |
| | | String placeRoadName = request.getParameter("placeRoadName"); |
| | | if (StringUtils.isNotBlank(placeRoadName)){ |
| | | terms.put("placeRoadName", placeRoadName); |
| | | } |
| | | // 户籍/住所地址社区 |
| | | String placeVillage = request.getParameter("placeVillage"); |
| | | if (StringUtils.isNotBlank(placeVillage)){ |
| | | terms.put("placeVillage", placeVillage); |
| | | } |
| | | // 户籍/住所地址社区名称 |
| | | String placeVillageName = request.getParameter("placeVillageName"); |
| | | if (StringUtils.isNotBlank(placeVillageName)){ |
| | | terms.put("placeVillageName", placeVillageName); |
| | | } |
| | | // 户籍/住所地址详细地址 |
| | | String placeAddr = request.getParameter("placeAddr"); |
| | | if (StringUtils.isNotBlank(placeAddr)){ |
| | | terms.put("placeAddr", placeAddr); |
| | | } |
| | | // 工作单位 |
| | | String workUnit = request.getParameter("workUnit"); |
| | | if (StringUtils.isNotBlank(workUnit)){ |
| | | terms.put("workUnit", workUnit); |
| | | } |
| | | // 民族 |
| | | String nation = request.getParameter("nation"); |
| | | if (StringUtils.isNotBlank(nation)){ |
| | | terms.put("nation", nation); |
| | | } |
| | | // 民族名称 |
| | | String nationName = request.getParameter("nationName"); |
| | | if (StringUtils.isNotBlank(nationName)){ |
| | | terms.put("nationName", nationName); |
| | | } |
| | | // 性别 |
| | | String sex = request.getParameter("sex"); |
| | | if (StringUtils.isNotBlank(sex)){ |
| | | terms.put("sex", sex); |
| | | } |
| | | // 性别名称 |
| | | String sexName = request.getParameter("sexName"); |
| | | if (StringUtils.isNotBlank(sexName)){ |
| | | terms.put("sexName", sexName); |
| | | } |
| | | // 是否有个人极端倾向,0:否,1:是 |
| | | String extreme = request.getParameter("extreme"); |
| | | if (StringUtils.isNotBlank(extreme)){ |
| | | terms.put("extreme", extreme); |
| | | } |
| | | // 头像 |
| | | String avatar = request.getParameter("avatar"); |
| | | if (StringUtils.isNotBlank(avatar)){ |
| | | terms.put("avatar", avatar); |
| | | } |
| | | // 职业 |
| | | String job = request.getParameter("job"); |
| | | if (StringUtils.isNotBlank(job)){ |
| | | terms.put("job", job); |
| | | } |
| | | // 职业名称 |
| | | String jobName = request.getParameter("jobName"); |
| | | if (StringUtils.isNotBlank(jobName)){ |
| | | terms.put("jobName", jobName); |
| | | } |
| | | // 出生日期 |
| | | String birthday = request.getParameter("birthday"); |
| | | if (StringUtils.isNotBlank(birthday)){ |
| | | terms.put("birthday", birthday); |
| | | } |
| | | // 年龄 |
| | | String age = request.getParameter("age"); |
| | | if (StringUtils.isNotBlank(age)){ |
| | | terms.put("age", age); |
| | | } |
| | | // 有无代理人,0:无,1:有 |
| | | String agentStatus = request.getParameter("agentStatus"); |
| | | if (StringUtils.isNotBlank(agentStatus)){ |
| | | terms.put("agentStatus", agentStatus); |
| | | } |
| | | // 顾客编号 |
| | | 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/casedraftPerson/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/casedraftPerson/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<CasedraftPerson> casedraftPersonPage = service.pageQuery(pageRequest, terms); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", casedraftPersonPage); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/web/casedraftPerson/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/casedraftPerson/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/casedraftPerson/saveCasedraftPerson |
| | | * @param casedraftPerson 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveCasedraftPerson") |
| | | public Object saveCasedraftPerson(@RequestBody CasedraftPerson casedraftPerson) { |
| | | try { |
| | | service.saveCasedraftPerson(casedraftPerson); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.draft.dao.mapper; |
| | | |
| | | import cn.huge.module.draft.domain.po.CasedraftAgent; |
| | | 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: wangwh |
| | | * @time: 2024-08-27 10:48:18 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Repository |
| | | public interface CasedraftAgentMapper extends BaseMapper<CasedraftAgent>{ |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | void updateCasedraftAgent(@Param("entity") CasedraftAgent entity); |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | void updateCasedraftAgentTerms(@Param("entity") CasedraftAgent entity, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | void deleteCasedraftAgent(@Param("id") String id); |
| | | |
| | | /** |
| | | * 按条件查询结果集 |
| | | * @param terms 查询条件集合 |
| | | * @return List<CasedraftAgent> |
| | | */ |
| | | List<CasedraftAgent> 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<CasedraftAgent> |
| | | */ |
| | | List<CasedraftAgent> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据纠纷编号查询代理人编号 |
| | | * @param caseId 纠纷编号 |
| | | * @return List<String> |
| | | */ |
| | | List<String> listIdByCaseId(@Param("caseId") String caseId); |
| | | } |
| New file |
| | |
| | | package cn.huge.module.draft.dao.mapper; |
| | | |
| | | import cn.huge.module.draft.domain.po.CasedraftInfo; |
| | | 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: wangwh |
| | | * @time: 2024-08-27 10:48:18 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Repository |
| | | public interface CasedraftInfoMapper extends BaseMapper<CasedraftInfo>{ |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | void updateCasedraftInfo(@Param("entity") CasedraftInfo entity); |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | void updateCasedraftInfoTerms(@Param("entity") CasedraftInfo entity, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | void deleteCasedraftInfo(@Param("id") String id); |
| | | |
| | | /** |
| | | * 按条件查询结果集 |
| | | * @param terms 查询条件集合 |
| | | * @return List<CasedraftInfo> |
| | | */ |
| | | List<CasedraftInfo> 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<CasedraftInfo> |
| | | */ |
| | | List<CasedraftInfo> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.draft.dao.mapper; |
| | | |
| | | import cn.huge.module.draft.domain.po.CasedraftPerson; |
| | | 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: wangwh |
| | | * @time: 2024-08-27 10:48:18 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Repository |
| | | public interface CasedraftPersonMapper extends BaseMapper<CasedraftPerson>{ |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | void updateCasedraftPerson(@Param("entity") CasedraftPerson entity); |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | void updateCasedraftPersonTerms(@Param("entity") CasedraftPerson entity, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | void deleteCasedraftPerson(@Param("id") String id); |
| | | |
| | | /** |
| | | * 按条件查询结果集 |
| | | * @param terms 查询条件集合 |
| | | * @return List<CasedraftPerson> |
| | | */ |
| | | List<CasedraftPerson> 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<CasedraftPerson> |
| | | */ |
| | | List<CasedraftPerson> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据纠纷编号查询人员编号 |
| | | * @param caseId 纠纷编号 |
| | | * @return List<String> |
| | | */ |
| | | List<String> listIdByCaseId(@Param("caseId") String caseId); |
| | | } |
| 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: wangwh |
| | | * @time:2024-08-27 10:48:18 |
| | | * @version 1.0.0 |
| | | --> |
| | | <mapper namespace="cn.huge.module.draft.dao.mapper.CasedraftAgentMapper"> |
| | | <!-- 结果集 --> |
| | | <resultMap id="dataResult" type="cn.huge.module.draft.domain.po.CasedraftAgent"> |
| | | <result property="id" column="id"/> |
| | | <result property="caseId" column="case_id"/> |
| | | <result property="partyUserId" column="party_user_id"/> |
| | | <result property="perClass" column="per_class"/> |
| | | <result property="perClassName" column="per_class_name"/> |
| | | <result property="trueName" column="true_name"/> |
| | | <result property="mobile" column="mobile"/> |
| | | <result property="certiType" column="certi_type"/> |
| | | <result property="certiTypeName" column="certi_type_name"/> |
| | | <result property="certiNo" column="certi_no"/> |
| | | <result property="prov" column="prov"/> |
| | | <result property="provName" column="prov_name"/> |
| | | <result property="city" column="city"/> |
| | | <result property="cityName" column="city_name"/> |
| | | <result property="area" column="area"/> |
| | | <result property="areaName" column="area_name"/> |
| | | <result property="road" column="road"/> |
| | | <result property="roadName" column="road_name"/> |
| | | <result property="village" column="village"/> |
| | | <result property="villageName" column="village_name"/> |
| | | <result property="addr" column="addr"/> |
| | | <result property="placeProv" column="place_prov"/> |
| | | <result property="placeProvName" column="place_prov_name"/> |
| | | <result property="placeCity" column="place_city"/> |
| | | <result property="placeCityName" column="place_city_name"/> |
| | | <result property="placeArea" column="place_area"/> |
| | | <result property="placeAreaName" column="place_area_name"/> |
| | | <result property="placeRoad" column="place_road"/> |
| | | <result property="placeRoadName" column="place_road_name"/> |
| | | <result property="placeVillage" column="place_village"/> |
| | | <result property="placeVillageName" column="place_village_name"/> |
| | | <result property="placeAddr" column="place_addr"/> |
| | | <result property="workUnit" column="work_unit"/> |
| | | <result property="nation" column="nation"/> |
| | | <result property="nationName" column="nation_name"/> |
| | | <result property="sex" column="sex"/> |
| | | <result property="sexName" column="sex_name"/> |
| | | <result property="extreme" column="extreme"/> |
| | | <result property="agentRelate" column="agent_relate"/> |
| | | <result property="agentRelateName" column="agent_relate_name"/> |
| | | <result property="agentType" column="agent_type"/> |
| | | <result property="agentTypeName" column="agent_type_name"/> |
| | | <result property="personId" column="person_id"/> |
| | | <result property="avatar" column="avatar"/> |
| | | <result property="job" column="job"/> |
| | | <result property="jobName" column="job_name"/> |
| | | <result property="birthday" column="birthday"/> |
| | | <result property="age" column="age"/> |
| | | <result property="agentStatus" column="agent_status"/> |
| | | <result property="custId" column="cust_id"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | <!-- 表 --> |
| | | <sql id='table-name'>dyh_casedraft_agent</sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | | id, |
| | | case_id, |
| | | party_user_id, |
| | | per_class, |
| | | per_class_name, |
| | | true_name, |
| | | mobile, |
| | | certi_type, |
| | | certi_type_name, |
| | | certi_no, |
| | | prov, |
| | | prov_name, |
| | | city, |
| | | city_name, |
| | | area, |
| | | area_name, |
| | | road, |
| | | road_name, |
| | | village, |
| | | village_name, |
| | | addr, |
| | | place_prov, |
| | | place_prov_name, |
| | | place_city, |
| | | place_city_name, |
| | | place_area, |
| | | place_area_name, |
| | | place_road, |
| | | place_road_name, |
| | | place_village, |
| | | place_village_name, |
| | | place_addr, |
| | | work_unit, |
| | | nation, |
| | | nation_name, |
| | | sex, |
| | | sex_name, |
| | | extreme, |
| | | agent_relate, |
| | | agent_relate_name, |
| | | agent_type, |
| | | agent_type_name, |
| | | person_id, |
| | | avatar, |
| | | job, |
| | | job_name, |
| | | birthday, |
| | | age, |
| | | agent_status, |
| | | cust_id, |
| | | create_time, |
| | | update_time |
| | | </sql> |
| | | <!-- 更新实体字段 --> |
| | | <sql id="set-part"> |
| | | <if test="entity.caseId != null">case_id = #{entity.caseId},</if> |
| | | <if test="entity.partyUserId != null">party_user_id = #{entity.partyUserId},</if> |
| | | <if test="entity.perClass != null">per_class = #{entity.perClass},</if> |
| | | <if test="entity.perClassName != null">per_class_name = #{entity.perClassName},</if> |
| | | <if test="entity.trueName != null">true_name = #{entity.trueName},</if> |
| | | <if test="entity.mobile != null">mobile = #{entity.mobile},</if> |
| | | <if test="entity.certiType != null">certi_type = #{entity.certiType},</if> |
| | | <if test="entity.certiTypeName != null">certi_type_name = #{entity.certiTypeName},</if> |
| | | <if test="entity.certiNo != null">certi_no = #{entity.certiNo},</if> |
| | | <if test="entity.prov != null">prov = #{entity.prov},</if> |
| | | <if test="entity.provName != null">prov_name = #{entity.provName},</if> |
| | | <if test="entity.city != null">city = #{entity.city},</if> |
| | | <if test="entity.cityName != null">city_name = #{entity.cityName},</if> |
| | | <if test="entity.area != null">area = #{entity.area},</if> |
| | | <if test="entity.areaName != null">area_name = #{entity.areaName},</if> |
| | | <if test="entity.road != null">road = #{entity.road},</if> |
| | | <if test="entity.roadName != null">road_name = #{entity.roadName},</if> |
| | | <if test="entity.village != null">village = #{entity.village},</if> |
| | | <if test="entity.villageName != null">village_name = #{entity.villageName},</if> |
| | | <if test="entity.addr != null">addr = #{entity.addr},</if> |
| | | <if test="entity.placeProv != null">place_prov = #{entity.placeProv},</if> |
| | | <if test="entity.placeProvName != null">place_prov_name = #{entity.placeProvName},</if> |
| | | <if test="entity.placeCity != null">place_city = #{entity.placeCity},</if> |
| | | <if test="entity.placeCityName != null">place_city_name = #{entity.placeCityName},</if> |
| | | <if test="entity.placeArea != null">place_area = #{entity.placeArea},</if> |
| | | <if test="entity.placeAreaName != null">place_area_name = #{entity.placeAreaName},</if> |
| | | <if test="entity.placeRoad != null">place_road = #{entity.placeRoad},</if> |
| | | <if test="entity.placeRoadName != null">place_road_name = #{entity.placeRoadName},</if> |
| | | <if test="entity.placeVillage != null">place_village = #{entity.placeVillage},</if> |
| | | <if test="entity.placeVillageName != null">place_village_name = #{entity.placeVillageName},</if> |
| | | <if test="entity.placeAddr != null">place_addr = #{entity.placeAddr},</if> |
| | | <if test="entity.workUnit != null">work_unit = #{entity.workUnit},</if> |
| | | <if test="entity.nation != null">nation = #{entity.nation},</if> |
| | | <if test="entity.nationName != null">nation_name = #{entity.nationName},</if> |
| | | <if test="entity.sex != null">sex = #{entity.sex},</if> |
| | | <if test="entity.sexName != null">sex_name = #{entity.sexName},</if> |
| | | <if test="entity.extreme != null">extreme = #{entity.extreme},</if> |
| | | <if test="entity.agentRelate != null">agent_relate = #{entity.agentRelate},</if> |
| | | <if test="entity.agentRelateName != null">agent_relate_name = #{entity.agentRelateName},</if> |
| | | <if test="entity.agentType != null">agent_type = #{entity.agentType},</if> |
| | | <if test="entity.agentTypeName != null">agent_type_name = #{entity.agentTypeName},</if> |
| | | <if test="entity.personId != null">person_id = #{entity.personId},</if> |
| | | <if test="entity.avatar != null">avatar = #{entity.avatar},</if> |
| | | <if test="entity.job != null">job = #{entity.job},</if> |
| | | <if test="entity.jobName != null">job_name = #{entity.jobName},</if> |
| | | <if test="entity.birthday != null">birthday = #{entity.birthday},</if> |
| | | <if test="entity.age != null">age = #{entity.age},</if> |
| | | <if test="entity.agentStatus != null">agent_status = #{entity.agentStatus},</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.caseId != null and terms.caseId !=''"> |
| | | and case_id = #{terms.caseId} |
| | | </if> |
| | | <if test="terms.partyUserId != null and terms.partyUserId !=''"> |
| | | and party_user_id = #{terms.partyUserId} |
| | | </if> |
| | | <if test="terms.perClass != null and terms.perClass !=''"> |
| | | and per_class = #{terms.perClass} |
| | | </if> |
| | | <if test="terms.perClassName != null and terms.perClassName !=''"> |
| | | and per_class_name = #{terms.perClassName} |
| | | </if> |
| | | <if test="terms.trueName != null and terms.trueName !=''"> |
| | | and true_name = #{terms.trueName} |
| | | </if> |
| | | <if test="terms.mobile != null and terms.mobile !=''"> |
| | | and mobile = #{terms.mobile} |
| | | </if> |
| | | <if test="terms.certiType != null and terms.certiType !=''"> |
| | | and certi_type = #{terms.certiType} |
| | | </if> |
| | | <if test="terms.certiTypeName != null and terms.certiTypeName !=''"> |
| | | and certi_type_name = #{terms.certiTypeName} |
| | | </if> |
| | | <if test="terms.certiNo != null and terms.certiNo !=''"> |
| | | and certi_no = #{terms.certiNo} |
| | | </if> |
| | | <if test="terms.prov != null and terms.prov !=''"> |
| | | and prov = #{terms.prov} |
| | | </if> |
| | | <if test="terms.provName != null and terms.provName !=''"> |
| | | and prov_name = #{terms.provName} |
| | | </if> |
| | | <if test="terms.city != null and terms.city !=''"> |
| | | and city = #{terms.city} |
| | | </if> |
| | | <if test="terms.cityName != null and terms.cityName !=''"> |
| | | and city_name = #{terms.cityName} |
| | | </if> |
| | | <if test="terms.area != null and terms.area !=''"> |
| | | and area = #{terms.area} |
| | | </if> |
| | | <if test="terms.areaName != null and terms.areaName !=''"> |
| | | and area_name = #{terms.areaName} |
| | | </if> |
| | | <if test="terms.road != null and terms.road !=''"> |
| | | and road = #{terms.road} |
| | | </if> |
| | | <if test="terms.roadName != null and terms.roadName !=''"> |
| | | and road_name = #{terms.roadName} |
| | | </if> |
| | | <if test="terms.village != null and terms.village !=''"> |
| | | and village = #{terms.village} |
| | | </if> |
| | | <if test="terms.villageName != null and terms.villageName !=''"> |
| | | and village_name = #{terms.villageName} |
| | | </if> |
| | | <if test="terms.addr != null and terms.addr !=''"> |
| | | and addr = #{terms.addr} |
| | | </if> |
| | | <if test="terms.placeProv != null and terms.placeProv !=''"> |
| | | and place_prov = #{terms.placeProv} |
| | | </if> |
| | | <if test="terms.placeProvName != null and terms.placeProvName !=''"> |
| | | and place_prov_name = #{terms.placeProvName} |
| | | </if> |
| | | <if test="terms.placeCity != null and terms.placeCity !=''"> |
| | | and place_city = #{terms.placeCity} |
| | | </if> |
| | | <if test="terms.placeCityName != null and terms.placeCityName !=''"> |
| | | and place_city_name = #{terms.placeCityName} |
| | | </if> |
| | | <if test="terms.placeArea != null and terms.placeArea !=''"> |
| | | and place_area = #{terms.placeArea} |
| | | </if> |
| | | <if test="terms.placeAreaName != null and terms.placeAreaName !=''"> |
| | | and place_area_name = #{terms.placeAreaName} |
| | | </if> |
| | | <if test="terms.placeRoad != null and terms.placeRoad !=''"> |
| | | and place_road = #{terms.placeRoad} |
| | | </if> |
| | | <if test="terms.placeRoadName != null and terms.placeRoadName !=''"> |
| | | and place_road_name = #{terms.placeRoadName} |
| | | </if> |
| | | <if test="terms.placeVillage != null and terms.placeVillage !=''"> |
| | | and place_village = #{terms.placeVillage} |
| | | </if> |
| | | <if test="terms.placeVillageName != null and terms.placeVillageName !=''"> |
| | | and place_village_name = #{terms.placeVillageName} |
| | | </if> |
| | | <if test="terms.placeAddr != null and terms.placeAddr !=''"> |
| | | and place_addr = #{terms.placeAddr} |
| | | </if> |
| | | <if test="terms.workUnit != null and terms.workUnit !=''"> |
| | | and work_unit = #{terms.workUnit} |
| | | </if> |
| | | <if test="terms.nation != null and terms.nation !=''"> |
| | | and nation = #{terms.nation} |
| | | </if> |
| | | <if test="terms.nationName != null and terms.nationName !=''"> |
| | | and nation_name = #{terms.nationName} |
| | | </if> |
| | | <if test="terms.sex != null and terms.sex !=''"> |
| | | and sex = #{terms.sex} |
| | | </if> |
| | | <if test="terms.sexName != null and terms.sexName !=''"> |
| | | and sex_name = #{terms.sexName} |
| | | </if> |
| | | <if test="terms.extreme != null and terms.extreme !=''"> |
| | | and extreme = #{terms.extreme} |
| | | </if> |
| | | <if test="terms.agentRelate != null and terms.agentRelate !=''"> |
| | | and agent_relate = #{terms.agentRelate} |
| | | </if> |
| | | <if test="terms.agentRelateName != null and terms.agentRelateName !=''"> |
| | | and agent_relate_name = #{terms.agentRelateName} |
| | | </if> |
| | | <if test="terms.agentType != null and terms.agentType !=''"> |
| | | and agent_type = #{terms.agentType} |
| | | </if> |
| | | <if test="terms.agentTypeName != null and terms.agentTypeName !=''"> |
| | | and agent_type_name = #{terms.agentTypeName} |
| | | </if> |
| | | <if test="terms.personId != null and terms.personId !=''"> |
| | | and person_id = #{terms.personId} |
| | | </if> |
| | | <if test="terms.avatar != null and terms.avatar !=''"> |
| | | and avatar = #{terms.avatar} |
| | | </if> |
| | | <if test="terms.job != null and terms.job !=''"> |
| | | and job = #{terms.job} |
| | | </if> |
| | | <if test="terms.jobName != null and terms.jobName !=''"> |
| | | and job_name = #{terms.jobName} |
| | | </if> |
| | | <if test="terms.birthday != null and terms.birthday !=''"> |
| | | and birthday = #{terms.birthday} |
| | | </if> |
| | | <if test="terms.age != null and terms.age !=''"> |
| | | and age = #{terms.age} |
| | | </if> |
| | | <if test="terms.agentStatus != null and terms.agentStatus !=''"> |
| | | and agent_status = #{terms.agentStatus} |
| | | </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="updateCasedraftAgent"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <where> |
| | | id = #{entity.id} |
| | | </where> |
| | | </update> |
| | | <!-- 条件更新对象 --> |
| | | <update id="updateCasedraftAgentTerms"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <include refid="where-part"/> |
| | | </update> |
| | | <!-- 根据编号物理删除 --> |
| | | <delete id="deleteCasedraftAgent"> |
| | | 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="listIdByCaseId" resultType="java.lang.String"> |
| | | select |
| | | id |
| | | from |
| | | <include refid="table-name" /> |
| | | where case_id = #{caseId} |
| | | </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: wangwh |
| | | * @time:2024-08-27 10:48:18 |
| | | * @version 1.0.0 |
| | | --> |
| | | <mapper namespace="cn.huge.module.draft.dao.mapper.CasedraftInfoMapper"> |
| | | <!-- 结果集 --> |
| | | <resultMap id="dataResult" type="cn.huge.module.draft.domain.po.CasedraftInfo"> |
| | | <result property="id" column="id"/> |
| | | <result property="caseTitle" column="case_title"/> |
| | | <result property="caseRef" column="case_ref"/> |
| | | <result property="caseLevel" column="case_level"/> |
| | | <result property="visitTime" column="visit_time"/> |
| | | <result property="visitPeopleNum" column="visit_people_num"/> |
| | | <result property="mediType" column="medi_type"/> |
| | | <result property="mediTypeName" column="medi_type_name"/> |
| | | <result property="caseTypeFirst" column="case_type_first"/> |
| | | <result property="caseTypeFirstName" column="case_type_first_name"/> |
| | | <result property="caseType" column="case_type"/> |
| | | <result property="caseTypeName" column="case_type_name"/> |
| | | <result property="occurTime" column="occur_time"/> |
| | | <result property="addr" column="addr"/> |
| | | <result property="lng" column="lng"/> |
| | | <result property="lat" column="lat"/> |
| | | <result property="wgAddr" column="wg_addr"/> |
| | | <result property="wgLng" column="wg_lng"/> |
| | | <result property="wgLat" column="wg_lat"/> |
| | | <result property="queProv" column="que_prov"/> |
| | | <result property="queProvName" column="que_prov_name"/> |
| | | <result property="queCity" column="que_city"/> |
| | | <result property="queCityName" column="que_city_name"/> |
| | | <result property="queArea" column="que_area"/> |
| | | <result property="queAreaName" column="que_area_name"/> |
| | | <result property="queRoad" column="que_road"/> |
| | | <result property="queRoadName" column="que_road_name"/> |
| | | <result property="queVillage" column="que_village"/> |
| | | <result property="queVillageName" column="que_village_name"/> |
| | | <result property="peopleNum" column="people_num"/> |
| | | <result property="amount" column="amount"/> |
| | | <result property="crowd" column="crowd"/> |
| | | <result property="crowdName" column="crowd_name"/> |
| | | <result property="canal" column="canal"/> |
| | | <result property="canalName" column="canal_name"/> |
| | | <result property="visitWay" column="visit_way"/> |
| | | <result property="visitWayName" column="visit_way_name"/> |
| | | <result property="caseDes" column="case_des"/> |
| | | <result property="caseClaim" column="case_claim"/> |
| | | <result property="majorStatus" column="major_status"/> |
| | | <result property="source" column="source"/> |
| | | <result property="sourceName" column="source_name"/> |
| | | <result property="caseNo" column="case_no"/> |
| | | <result property="mediateNo" column="mediate_no"/> |
| | | <result property="mediateBookNo" column="mediate_book_no"/> |
| | | <result property="civilNo" column="civil_no"/> |
| | | <result property="plaintiffs" column="plaintiffs"/> |
| | | <result property="pagents" column="pagents"/> |
| | | <result property="defendants" column="defendants"/> |
| | | <result property="dagents" column="dagents"/> |
| | | <result property="inputUnitId" column="input_unit_id"/> |
| | | <result property="inputUnitName" column="input_unit_name"/> |
| | | <result property="inputUserId" column="input_user_id"/> |
| | | <result property="inputUserName" column="input_user_name"/> |
| | | <result property="inputWay" column="input_way"/> |
| | | <result property="custId" column="cust_id"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | <!-- 表 --> |
| | | <sql id='table-name'>dyh_casedraft_info</sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | | id, |
| | | case_title, |
| | | case_ref, |
| | | case_level, |
| | | visit_time, |
| | | visit_people_num, |
| | | medi_type, |
| | | medi_type_name, |
| | | case_type_first, |
| | | case_type_first_name, |
| | | case_type, |
| | | case_type_name, |
| | | occur_time, |
| | | addr, |
| | | lng, |
| | | lat, |
| | | wg_addr, |
| | | wg_lng, |
| | | wg_lat, |
| | | que_prov, |
| | | que_prov_name, |
| | | que_city, |
| | | que_city_name, |
| | | que_area, |
| | | que_area_name, |
| | | que_road, |
| | | que_road_name, |
| | | que_village, |
| | | que_village_name, |
| | | people_num, |
| | | amount, |
| | | crowd, |
| | | crowd_name, |
| | | canal, |
| | | canal_name, |
| | | visit_way, |
| | | visit_way_name, |
| | | case_des, |
| | | case_claim, |
| | | major_status, |
| | | source, |
| | | source_name, |
| | | case_no, |
| | | mediate_no, |
| | | mediate_book_no, |
| | | civil_no, |
| | | plaintiffs, |
| | | pagents, |
| | | defendants, |
| | | dagents, |
| | | input_unit_id, |
| | | input_unit_name, |
| | | input_user_id, |
| | | input_user_name, |
| | | input_way, |
| | | cust_id, |
| | | create_time, |
| | | update_time |
| | | </sql> |
| | | <!-- 更新实体字段 --> |
| | | <sql id="set-part"> |
| | | <if test="entity.caseTitle != null">case_title = #{entity.caseTitle},</if> |
| | | <if test="entity.caseRef != null">case_ref = #{entity.caseRef},</if> |
| | | <if test="entity.caseLevel != null">case_level = #{entity.caseLevel},</if> |
| | | <if test="entity.visitTime != null">visit_time = #{entity.visitTime},</if> |
| | | <if test="entity.visitPeopleNum != null">visit_people_num = #{entity.visitPeopleNum},</if> |
| | | <if test="entity.mediType != null">medi_type = #{entity.mediType},</if> |
| | | <if test="entity.mediTypeName != null">medi_type_name = #{entity.mediTypeName},</if> |
| | | <if test="entity.caseTypeFirst != null">case_type_first = #{entity.caseTypeFirst},</if> |
| | | <if test="entity.caseTypeFirstName != null">case_type_first_name = #{entity.caseTypeFirstName},</if> |
| | | <if test="entity.caseType != null">case_type = #{entity.caseType},</if> |
| | | <if test="entity.caseTypeName != null">case_type_name = #{entity.caseTypeName},</if> |
| | | <if test="entity.occurTime != null">occur_time = #{entity.occurTime},</if> |
| | | <if test="entity.addr != null">addr = #{entity.addr},</if> |
| | | <if test="entity.lng != null">lng = #{entity.lng},</if> |
| | | <if test="entity.lat != null">lat = #{entity.lat},</if> |
| | | <if test="entity.wgAddr != null">wg_addr = #{entity.wgAddr},</if> |
| | | <if test="entity.wgLng != null">wg_lng = #{entity.wgLng},</if> |
| | | <if test="entity.wgLat != null">wg_lat = #{entity.wgLat},</if> |
| | | <if test="entity.queProv != null">que_prov = #{entity.queProv},</if> |
| | | <if test="entity.queProvName != null">que_prov_name = #{entity.queProvName},</if> |
| | | <if test="entity.queCity != null">que_city = #{entity.queCity},</if> |
| | | <if test="entity.queCityName != null">que_city_name = #{entity.queCityName},</if> |
| | | <if test="entity.queArea != null">que_area = #{entity.queArea},</if> |
| | | <if test="entity.queAreaName != null">que_area_name = #{entity.queAreaName},</if> |
| | | <if test="entity.queRoad != null">que_road = #{entity.queRoad},</if> |
| | | <if test="entity.queRoadName != null">que_road_name = #{entity.queRoadName},</if> |
| | | <if test="entity.queVillage != null">que_village = #{entity.queVillage},</if> |
| | | <if test="entity.queVillageName != null">que_village_name = #{entity.queVillageName},</if> |
| | | <if test="entity.peopleNum != null">people_num = #{entity.peopleNum},</if> |
| | | <if test="entity.amount != null">amount = #{entity.amount},</if> |
| | | <if test="entity.crowd != null">crowd = #{entity.crowd},</if> |
| | | <if test="entity.crowdName != null">crowd_name = #{entity.crowdName},</if> |
| | | <if test="entity.canal != null">canal = #{entity.canal},</if> |
| | | <if test="entity.canalName != null">canal_name = #{entity.canalName},</if> |
| | | <if test="entity.visitWay != null">visit_way = #{entity.visitWay},</if> |
| | | <if test="entity.visitWayName != null">visit_way_name = #{entity.visitWayName},</if> |
| | | <if test="entity.caseDes != null">case_des = #{entity.caseDes},</if> |
| | | <if test="entity.caseClaim != null">case_claim = #{entity.caseClaim},</if> |
| | | <if test="entity.majorStatus != null">major_status = #{entity.majorStatus},</if> |
| | | <if test="entity.source != null">source = #{entity.source},</if> |
| | | <if test="entity.sourceName != null">source_name = #{entity.sourceName},</if> |
| | | <if test="entity.caseNo != null">case_no = #{entity.caseNo},</if> |
| | | <if test="entity.mediateNo != null">mediate_no = #{entity.mediateNo},</if> |
| | | <if test="entity.mediateBookNo != null">mediate_book_no = #{entity.mediateBookNo},</if> |
| | | <if test="entity.civilNo != null">civil_no = #{entity.civilNo},</if> |
| | | <if test="entity.plaintiffs != null">plaintiffs = #{entity.plaintiffs},</if> |
| | | <if test="entity.pagents != null">pagents = #{entity.pagents},</if> |
| | | <if test="entity.defendants != null">defendants = #{entity.defendants},</if> |
| | | <if test="entity.dagents != null">dagents = #{entity.dagents},</if> |
| | | <if test="entity.inputUnitId != null">input_unit_id = #{entity.inputUnitId},</if> |
| | | <if test="entity.inputUnitName != null">input_unit_name = #{entity.inputUnitName},</if> |
| | | <if test="entity.inputUserId != null">input_user_id = #{entity.inputUserId},</if> |
| | | <if test="entity.inputUserName != null">input_user_name = #{entity.inputUserName},</if> |
| | | <if test="entity.inputWay != null">input_way = #{entity.inputWay},</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.caseTitle != null and terms.caseTitle !=''"> |
| | | and case_title = #{terms.caseTitle} |
| | | </if> |
| | | <if test="terms.caseRef != null and terms.caseRef !=''"> |
| | | and case_ref = #{terms.caseRef} |
| | | </if> |
| | | <if test="terms.caseLevel != null and terms.caseLevel !=''"> |
| | | and case_level = #{terms.caseLevel} |
| | | </if> |
| | | <if test="terms.visitTime != null and terms.visitTime !=''"> |
| | | and visit_time = #{terms.visitTime} |
| | | </if> |
| | | <if test="terms.visitPeopleNum != null and terms.visitPeopleNum !=''"> |
| | | and visit_people_num = #{terms.visitPeopleNum} |
| | | </if> |
| | | <if test="terms.mediType != null and terms.mediType !=''"> |
| | | and medi_type = #{terms.mediType} |
| | | </if> |
| | | <if test="terms.mediTypeName != null and terms.mediTypeName !=''"> |
| | | and medi_type_name = #{terms.mediTypeName} |
| | | </if> |
| | | <if test="terms.caseTypeFirst != null and terms.caseTypeFirst !=''"> |
| | | and case_type_first = #{terms.caseTypeFirst} |
| | | </if> |
| | | <if test="terms.caseTypeFirstName != null and terms.caseTypeFirstName !=''"> |
| | | and case_type_first_name = #{terms.caseTypeFirstName} |
| | | </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.occurTime != null and terms.occurTime !=''"> |
| | | and occur_time = #{terms.occurTime} |
| | | </if> |
| | | <if test="terms.addr != null and terms.addr !=''"> |
| | | and addr = #{terms.addr} |
| | | </if> |
| | | <if test="terms.lng != null and terms.lng !=''"> |
| | | and lng = #{terms.lng} |
| | | </if> |
| | | <if test="terms.lat != null and terms.lat !=''"> |
| | | and lat = #{terms.lat} |
| | | </if> |
| | | <if test="terms.wgAddr != null and terms.wgAddr !=''"> |
| | | and wg_addr = #{terms.wgAddr} |
| | | </if> |
| | | <if test="terms.wgLng != null and terms.wgLng !=''"> |
| | | and wg_lng = #{terms.wgLng} |
| | | </if> |
| | | <if test="terms.wgLat != null and terms.wgLat !=''"> |
| | | and wg_lat = #{terms.wgLat} |
| | | </if> |
| | | <if test="terms.queProv != null and terms.queProv !=''"> |
| | | and que_prov = #{terms.queProv} |
| | | </if> |
| | | <if test="terms.queProvName != null and terms.queProvName !=''"> |
| | | and que_prov_name = #{terms.queProvName} |
| | | </if> |
| | | <if test="terms.queCity != null and terms.queCity !=''"> |
| | | and que_city = #{terms.queCity} |
| | | </if> |
| | | <if test="terms.queCityName != null and terms.queCityName !=''"> |
| | | and que_city_name = #{terms.queCityName} |
| | | </if> |
| | | <if test="terms.queArea != null and terms.queArea !=''"> |
| | | and que_area = #{terms.queArea} |
| | | </if> |
| | | <if test="terms.queAreaName != null and terms.queAreaName !=''"> |
| | | and que_area_name = #{terms.queAreaName} |
| | | </if> |
| | | <if test="terms.queRoad != null and terms.queRoad !=''"> |
| | | and que_road = #{terms.queRoad} |
| | | </if> |
| | | <if test="terms.queRoadName != null and terms.queRoadName !=''"> |
| | | and que_road_name = #{terms.queRoadName} |
| | | </if> |
| | | <if test="terms.queVillage != null and terms.queVillage !=''"> |
| | | and que_village = #{terms.queVillage} |
| | | </if> |
| | | <if test="terms.queVillageName != null and terms.queVillageName !=''"> |
| | | and que_village_name = #{terms.queVillageName} |
| | | </if> |
| | | <if test="terms.peopleNum != null and terms.peopleNum !=''"> |
| | | and people_num = #{terms.peopleNum} |
| | | </if> |
| | | <if test="terms.amount != null and terms.amount !=''"> |
| | | and amount = #{terms.amount} |
| | | </if> |
| | | <if test="terms.crowd != null and terms.crowd !=''"> |
| | | and crowd = #{terms.crowd} |
| | | </if> |
| | | <if test="terms.crowdName != null and terms.crowdName !=''"> |
| | | and crowd_name = #{terms.crowdName} |
| | | </if> |
| | | <if test="terms.canal != null and terms.canal !=''"> |
| | | and canal = #{terms.canal} |
| | | </if> |
| | | <if test="terms.canalName != null and terms.canalName !=''"> |
| | | and canal_name = #{terms.canalName} |
| | | </if> |
| | | <if test="terms.visitWay != null and terms.visitWay !=''"> |
| | | and visit_way = #{terms.visitWay} |
| | | </if> |
| | | <if test="terms.visitWayName != null and terms.visitWayName !=''"> |
| | | and visit_way_name = #{terms.visitWayName} |
| | | </if> |
| | | <if test="terms.caseDes != null and terms.caseDes !=''"> |
| | | and case_des = #{terms.caseDes} |
| | | </if> |
| | | <if test="terms.caseClaim != null and terms.caseClaim !=''"> |
| | | and case_claim = #{terms.caseClaim} |
| | | </if> |
| | | <if test="terms.majorStatus != null and terms.majorStatus !=''"> |
| | | and major_status = #{terms.majorStatus} |
| | | </if> |
| | | <if test="terms.source != null and terms.source !=''"> |
| | | and source = #{terms.source} |
| | | </if> |
| | | <if test="terms.sourceName != null and terms.sourceName !=''"> |
| | | and source_name = #{terms.sourceName} |
| | | </if> |
| | | <if test="terms.caseNo != null and terms.caseNo !=''"> |
| | | and case_no = #{terms.caseNo} |
| | | </if> |
| | | <if test="terms.mediateNo != null and terms.mediateNo !=''"> |
| | | and mediate_no = #{terms.mediateNo} |
| | | </if> |
| | | <if test="terms.mediateBookNo != null and terms.mediateBookNo !=''"> |
| | | and mediate_book_no = #{terms.mediateBookNo} |
| | | </if> |
| | | <if test="terms.civilNo != null and terms.civilNo !=''"> |
| | | and civil_no = #{terms.civilNo} |
| | | </if> |
| | | <if test="terms.plaintiffs != null and terms.plaintiffs !=''"> |
| | | and plaintiffs = #{terms.plaintiffs} |
| | | </if> |
| | | <if test="terms.pagents != null and terms.pagents !=''"> |
| | | and pagents = #{terms.pagents} |
| | | </if> |
| | | <if test="terms.defendants != null and terms.defendants !=''"> |
| | | and defendants = #{terms.defendants} |
| | | </if> |
| | | <if test="terms.dagents != null and terms.dagents !=''"> |
| | | and dagents = #{terms.dagents} |
| | | </if> |
| | | <if test="terms.inputUnitId != null and terms.inputUnitId !=''"> |
| | | and input_unit_id = #{terms.inputUnitId} |
| | | </if> |
| | | <if test="terms.inputUnitName != null and terms.inputUnitName !=''"> |
| | | and input_unit_name = #{terms.inputUnitName} |
| | | </if> |
| | | <if test="terms.inputUserId != null and terms.inputUserId !=''"> |
| | | and input_user_id = #{terms.inputUserId} |
| | | </if> |
| | | <if test="terms.inputUserName != null and terms.inputUserName !=''"> |
| | | and input_user_name = #{terms.inputUserName} |
| | | </if> |
| | | <if test="terms.inputWay != null and terms.inputWay !=''"> |
| | | and input_way = #{terms.inputWay} |
| | | </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="updateCasedraftInfo"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <where> |
| | | id = #{entity.id} |
| | | </where> |
| | | </update> |
| | | <!-- 条件更新对象 --> |
| | | <update id="updateCasedraftInfoTerms"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <include refid="where-part"/> |
| | | </update> |
| | | <!-- 根据编号物理删除 --> |
| | | <delete id="deleteCasedraftInfo"> |
| | | 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: wangwh |
| | | * @time:2024-08-27 10:48:18 |
| | | * @version 1.0.0 |
| | | --> |
| | | <mapper namespace="cn.huge.module.draft.dao.mapper.CasedraftPersonMapper"> |
| | | <!-- 结果集 --> |
| | | <resultMap id="dataResult" type="cn.huge.module.draft.domain.po.CasedraftPerson"> |
| | | <result property="id" column="id"/> |
| | | <result property="caseId" column="case_id"/> |
| | | <result property="partyUserId" column="party_user_id"/> |
| | | <result property="perType" column="per_type"/> |
| | | <result property="perTypeName" column="per_type_name"/> |
| | | <result property="perClass" column="per_class"/> |
| | | <result property="perClassName" column="per_class_name"/> |
| | | <result property="trueName" column="true_name"/> |
| | | <result property="mobile" column="mobile"/> |
| | | <result property="orgaCode" column="orga_code"/> |
| | | <result property="deputy" column="deputy"/> |
| | | <result property="orgaType" column="orga_type"/> |
| | | <result property="orgaTypeName" column="orga_type_name"/> |
| | | <result property="certiType" column="certi_type"/> |
| | | <result property="certiTypeName" column="certi_type_name"/> |
| | | <result property="certiNo" column="certi_no"/> |
| | | <result property="prov" column="prov"/> |
| | | <result property="provName" column="prov_name"/> |
| | | <result property="city" column="city"/> |
| | | <result property="cityName" column="city_name"/> |
| | | <result property="area" column="area"/> |
| | | <result property="areaName" column="area_name"/> |
| | | <result property="road" column="road"/> |
| | | <result property="roadName" column="road_name"/> |
| | | <result property="village" column="village"/> |
| | | <result property="villageName" column="village_name"/> |
| | | <result property="addr" column="addr"/> |
| | | <result property="placeProv" column="place_prov"/> |
| | | <result property="placeProvName" column="place_prov_name"/> |
| | | <result property="placeCity" column="place_city"/> |
| | | <result property="placeCityName" column="place_city_name"/> |
| | | <result property="placeArea" column="place_area"/> |
| | | <result property="placeAreaName" column="place_area_name"/> |
| | | <result property="placeRoad" column="place_road"/> |
| | | <result property="placeRoadName" column="place_road_name"/> |
| | | <result property="placeVillage" column="place_village"/> |
| | | <result property="placeVillageName" column="place_village_name"/> |
| | | <result property="placeAddr" column="place_addr"/> |
| | | <result property="workUnit" column="work_unit"/> |
| | | <result property="nation" column="nation"/> |
| | | <result property="nationName" column="nation_name"/> |
| | | <result property="sex" column="sex"/> |
| | | <result property="sexName" column="sex_name"/> |
| | | <result property="extreme" column="extreme"/> |
| | | <result property="avatar" column="avatar"/> |
| | | <result property="job" column="job"/> |
| | | <result property="jobName" column="job_name"/> |
| | | <result property="birthday" column="birthday"/> |
| | | <result property="age" column="age"/> |
| | | <result property="agentStatus" column="agent_status"/> |
| | | <result property="custId" column="cust_id"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | <!-- 表 --> |
| | | <sql id='table-name'>dyh_casedraft_person</sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | | id, |
| | | case_id, |
| | | party_user_id, |
| | | per_type, |
| | | per_type_name, |
| | | per_class, |
| | | per_class_name, |
| | | true_name, |
| | | mobile, |
| | | orga_code, |
| | | deputy, |
| | | orga_type, |
| | | orga_type_name, |
| | | certi_type, |
| | | certi_type_name, |
| | | certi_no, |
| | | prov, |
| | | prov_name, |
| | | city, |
| | | city_name, |
| | | area, |
| | | area_name, |
| | | road, |
| | | road_name, |
| | | village, |
| | | village_name, |
| | | addr, |
| | | place_prov, |
| | | place_prov_name, |
| | | place_city, |
| | | place_city_name, |
| | | place_area, |
| | | place_area_name, |
| | | place_road, |
| | | place_road_name, |
| | | place_village, |
| | | place_village_name, |
| | | place_addr, |
| | | work_unit, |
| | | nation, |
| | | nation_name, |
| | | sex, |
| | | sex_name, |
| | | extreme, |
| | | avatar, |
| | | job, |
| | | job_name, |
| | | birthday, |
| | | age, |
| | | agent_status, |
| | | cust_id, |
| | | create_time, |
| | | update_time |
| | | </sql> |
| | | <!-- 更新实体字段 --> |
| | | <sql id="set-part"> |
| | | <if test="entity.caseId != null">case_id = #{entity.caseId},</if> |
| | | <if test="entity.partyUserId != null">party_user_id = #{entity.partyUserId},</if> |
| | | <if test="entity.perType != null">per_type = #{entity.perType},</if> |
| | | <if test="entity.perTypeName != null">per_type_name = #{entity.perTypeName},</if> |
| | | <if test="entity.perClass != null">per_class = #{entity.perClass},</if> |
| | | <if test="entity.perClassName != null">per_class_name = #{entity.perClassName},</if> |
| | | <if test="entity.trueName != null">true_name = #{entity.trueName},</if> |
| | | <if test="entity.mobile != null">mobile = #{entity.mobile},</if> |
| | | <if test="entity.orgaCode != null">orga_code = #{entity.orgaCode},</if> |
| | | <if test="entity.deputy != null">deputy = #{entity.deputy},</if> |
| | | <if test="entity.orgaType != null">orga_type = #{entity.orgaType},</if> |
| | | <if test="entity.orgaTypeName != null">orga_type_name = #{entity.orgaTypeName},</if> |
| | | <if test="entity.certiType != null">certi_type = #{entity.certiType},</if> |
| | | <if test="entity.certiTypeName != null">certi_type_name = #{entity.certiTypeName},</if> |
| | | <if test="entity.certiNo != null">certi_no = #{entity.certiNo},</if> |
| | | <if test="entity.prov != null">prov = #{entity.prov},</if> |
| | | <if test="entity.provName != null">prov_name = #{entity.provName},</if> |
| | | <if test="entity.city != null">city = #{entity.city},</if> |
| | | <if test="entity.cityName != null">city_name = #{entity.cityName},</if> |
| | | <if test="entity.area != null">area = #{entity.area},</if> |
| | | <if test="entity.areaName != null">area_name = #{entity.areaName},</if> |
| | | <if test="entity.road != null">road = #{entity.road},</if> |
| | | <if test="entity.roadName != null">road_name = #{entity.roadName},</if> |
| | | <if test="entity.village != null">village = #{entity.village},</if> |
| | | <if test="entity.villageName != null">village_name = #{entity.villageName},</if> |
| | | <if test="entity.addr != null">addr = #{entity.addr},</if> |
| | | <if test="entity.placeProv != null">place_prov = #{entity.placeProv},</if> |
| | | <if test="entity.placeProvName != null">place_prov_name = #{entity.placeProvName},</if> |
| | | <if test="entity.placeCity != null">place_city = #{entity.placeCity},</if> |
| | | <if test="entity.placeCityName != null">place_city_name = #{entity.placeCityName},</if> |
| | | <if test="entity.placeArea != null">place_area = #{entity.placeArea},</if> |
| | | <if test="entity.placeAreaName != null">place_area_name = #{entity.placeAreaName},</if> |
| | | <if test="entity.placeRoad != null">place_road = #{entity.placeRoad},</if> |
| | | <if test="entity.placeRoadName != null">place_road_name = #{entity.placeRoadName},</if> |
| | | <if test="entity.placeVillage != null">place_village = #{entity.placeVillage},</if> |
| | | <if test="entity.placeVillageName != null">place_village_name = #{entity.placeVillageName},</if> |
| | | <if test="entity.placeAddr != null">place_addr = #{entity.placeAddr},</if> |
| | | <if test="entity.workUnit != null">work_unit = #{entity.workUnit},</if> |
| | | <if test="entity.nation != null">nation = #{entity.nation},</if> |
| | | <if test="entity.nationName != null">nation_name = #{entity.nationName},</if> |
| | | <if test="entity.sex != null">sex = #{entity.sex},</if> |
| | | <if test="entity.sexName != null">sex_name = #{entity.sexName},</if> |
| | | <if test="entity.extreme != null">extreme = #{entity.extreme},</if> |
| | | <if test="entity.avatar != null">avatar = #{entity.avatar},</if> |
| | | <if test="entity.job != null">job = #{entity.job},</if> |
| | | <if test="entity.jobName != null">job_name = #{entity.jobName},</if> |
| | | <if test="entity.birthday != null">birthday = #{entity.birthday},</if> |
| | | <if test="entity.age != null">age = #{entity.age},</if> |
| | | <if test="entity.agentStatus != null">agent_status = #{entity.agentStatus},</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.caseId != null and terms.caseId !=''"> |
| | | and case_id = #{terms.caseId} |
| | | </if> |
| | | <if test="terms.partyUserId != null and terms.partyUserId !=''"> |
| | | and party_user_id = #{terms.partyUserId} |
| | | </if> |
| | | <if test="terms.perType != null and terms.perType !=''"> |
| | | and per_type = #{terms.perType} |
| | | </if> |
| | | <if test="terms.perTypeName != null and terms.perTypeName !=''"> |
| | | and per_type_name = #{terms.perTypeName} |
| | | </if> |
| | | <if test="terms.perClass != null and terms.perClass !=''"> |
| | | and per_class = #{terms.perClass} |
| | | </if> |
| | | <if test="terms.perClassName != null and terms.perClassName !=''"> |
| | | and per_class_name = #{terms.perClassName} |
| | | </if> |
| | | <if test="terms.trueName != null and terms.trueName !=''"> |
| | | and true_name = #{terms.trueName} |
| | | </if> |
| | | <if test="terms.mobile != null and terms.mobile !=''"> |
| | | and mobile = #{terms.mobile} |
| | | </if> |
| | | <if test="terms.orgaCode != null and terms.orgaCode !=''"> |
| | | and orga_code = #{terms.orgaCode} |
| | | </if> |
| | | <if test="terms.deputy != null and terms.deputy !=''"> |
| | | and deputy = #{terms.deputy} |
| | | </if> |
| | | <if test="terms.orgaType != null and terms.orgaType !=''"> |
| | | and orga_type = #{terms.orgaType} |
| | | </if> |
| | | <if test="terms.orgaTypeName != null and terms.orgaTypeName !=''"> |
| | | and orga_type_name = #{terms.orgaTypeName} |
| | | </if> |
| | | <if test="terms.certiType != null and terms.certiType !=''"> |
| | | and certi_type = #{terms.certiType} |
| | | </if> |
| | | <if test="terms.certiTypeName != null and terms.certiTypeName !=''"> |
| | | and certi_type_name = #{terms.certiTypeName} |
| | | </if> |
| | | <if test="terms.certiNo != null and terms.certiNo !=''"> |
| | | and certi_no = #{terms.certiNo} |
| | | </if> |
| | | <if test="terms.prov != null and terms.prov !=''"> |
| | | and prov = #{terms.prov} |
| | | </if> |
| | | <if test="terms.provName != null and terms.provName !=''"> |
| | | and prov_name = #{terms.provName} |
| | | </if> |
| | | <if test="terms.city != null and terms.city !=''"> |
| | | and city = #{terms.city} |
| | | </if> |
| | | <if test="terms.cityName != null and terms.cityName !=''"> |
| | | and city_name = #{terms.cityName} |
| | | </if> |
| | | <if test="terms.area != null and terms.area !=''"> |
| | | and area = #{terms.area} |
| | | </if> |
| | | <if test="terms.areaName != null and terms.areaName !=''"> |
| | | and area_name = #{terms.areaName} |
| | | </if> |
| | | <if test="terms.road != null and terms.road !=''"> |
| | | and road = #{terms.road} |
| | | </if> |
| | | <if test="terms.roadName != null and terms.roadName !=''"> |
| | | and road_name = #{terms.roadName} |
| | | </if> |
| | | <if test="terms.village != null and terms.village !=''"> |
| | | and village = #{terms.village} |
| | | </if> |
| | | <if test="terms.villageName != null and terms.villageName !=''"> |
| | | and village_name = #{terms.villageName} |
| | | </if> |
| | | <if test="terms.addr != null and terms.addr !=''"> |
| | | and addr = #{terms.addr} |
| | | </if> |
| | | <if test="terms.placeProv != null and terms.placeProv !=''"> |
| | | and place_prov = #{terms.placeProv} |
| | | </if> |
| | | <if test="terms.placeProvName != null and terms.placeProvName !=''"> |
| | | and place_prov_name = #{terms.placeProvName} |
| | | </if> |
| | | <if test="terms.placeCity != null and terms.placeCity !=''"> |
| | | and place_city = #{terms.placeCity} |
| | | </if> |
| | | <if test="terms.placeCityName != null and terms.placeCityName !=''"> |
| | | and place_city_name = #{terms.placeCityName} |
| | | </if> |
| | | <if test="terms.placeArea != null and terms.placeArea !=''"> |
| | | and place_area = #{terms.placeArea} |
| | | </if> |
| | | <if test="terms.placeAreaName != null and terms.placeAreaName !=''"> |
| | | and place_area_name = #{terms.placeAreaName} |
| | | </if> |
| | | <if test="terms.placeRoad != null and terms.placeRoad !=''"> |
| | | and place_road = #{terms.placeRoad} |
| | | </if> |
| | | <if test="terms.placeRoadName != null and terms.placeRoadName !=''"> |
| | | and place_road_name = #{terms.placeRoadName} |
| | | </if> |
| | | <if test="terms.placeVillage != null and terms.placeVillage !=''"> |
| | | and place_village = #{terms.placeVillage} |
| | | </if> |
| | | <if test="terms.placeVillageName != null and terms.placeVillageName !=''"> |
| | | and place_village_name = #{terms.placeVillageName} |
| | | </if> |
| | | <if test="terms.placeAddr != null and terms.placeAddr !=''"> |
| | | and place_addr = #{terms.placeAddr} |
| | | </if> |
| | | <if test="terms.workUnit != null and terms.workUnit !=''"> |
| | | and work_unit = #{terms.workUnit} |
| | | </if> |
| | | <if test="terms.nation != null and terms.nation !=''"> |
| | | and nation = #{terms.nation} |
| | | </if> |
| | | <if test="terms.nationName != null and terms.nationName !=''"> |
| | | and nation_name = #{terms.nationName} |
| | | </if> |
| | | <if test="terms.sex != null and terms.sex !=''"> |
| | | and sex = #{terms.sex} |
| | | </if> |
| | | <if test="terms.sexName != null and terms.sexName !=''"> |
| | | and sex_name = #{terms.sexName} |
| | | </if> |
| | | <if test="terms.extreme != null and terms.extreme !=''"> |
| | | and extreme = #{terms.extreme} |
| | | </if> |
| | | <if test="terms.avatar != null and terms.avatar !=''"> |
| | | and avatar = #{terms.avatar} |
| | | </if> |
| | | <if test="terms.job != null and terms.job !=''"> |
| | | and job = #{terms.job} |
| | | </if> |
| | | <if test="terms.jobName != null and terms.jobName !=''"> |
| | | and job_name = #{terms.jobName} |
| | | </if> |
| | | <if test="terms.birthday != null and terms.birthday !=''"> |
| | | and birthday = #{terms.birthday} |
| | | </if> |
| | | <if test="terms.age != null and terms.age !=''"> |
| | | and age = #{terms.age} |
| | | </if> |
| | | <if test="terms.agentStatus != null and terms.agentStatus !=''"> |
| | | and agent_status = #{terms.agentStatus} |
| | | </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="updateCasedraftPerson"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <where> |
| | | id = #{entity.id} |
| | | </where> |
| | | </update> |
| | | <!-- 条件更新对象 --> |
| | | <update id="updateCasedraftPersonTerms"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <include refid="where-part"/> |
| | | </update> |
| | | <!-- 根据编号物理删除 --> |
| | | <delete id="deleteCasedraftPerson"> |
| | | 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="listIdByCaseId" resultType="java.lang.String"> |
| | | select |
| | | id |
| | | from |
| | | <include refid="table-name" /> |
| | | where case_id = #{caseId} |
| | | </select> |
| | | </mapper> |
| New file |
| | |
| | | package cn.huge.module.draft.domain.bo; |
| | | |
| | | import cn.huge.module.draft.domain.po.CasedraftAgent; |
| | | |
| | | /** |
| | | * @title: 纠纷代理人信息草稿表业务扩展类 |
| | | * @description: 纠纷代理人信息草稿表业务扩展类 |
| | | * @company: hugeinfo |
| | | * @author: wangwh |
| | | * @time: 2024-08-27 10:48:18 |
| | | * @version: 1.0.0 |
| | | * @see cn.huge.module.draft.domain.po.CasedraftAgent |
| | | */ |
| | | public class CasedraftAgentBO extends CasedraftAgent { |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.draft.domain.bo; |
| | | |
| | | import cn.huge.module.draft.domain.po.CasedraftInfo; |
| | | |
| | | /** |
| | | * @title: 纠纷信息草稿表业务扩展类 |
| | | * @description: 纠纷信息草稿表业务扩展类 |
| | | * @company: hugeinfo |
| | | * @author: wangwh |
| | | * @time: 2024-08-27 10:48:18 |
| | | * @version: 1.0.0 |
| | | * @see cn.huge.module.draft.domain.po.CasedraftInfo |
| | | */ |
| | | public class CasedraftInfoBO extends CasedraftInfo { |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.draft.domain.bo; |
| | | |
| | | import cn.huge.module.draft.domain.po.CasedraftPerson; |
| | | |
| | | /** |
| | | * @title: 纠纷当事人信息草稿表业务扩展类 |
| | | * @description: 纠纷当事人信息草稿表业务扩展类 |
| | | * @company: hugeinfo |
| | | * @author: wangwh |
| | | * @time: 2024-08-27 10:48:18 |
| | | * @version: 1.0.0 |
| | | * @see cn.huge.module.draft.domain.po.CasedraftPerson |
| | | */ |
| | | public class CasedraftPersonBO extends CasedraftPerson { |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.draft.domain.dto; |
| | | |
| | | import cn.huge.module.cases.domain.po.CaseAgent; |
| | | import cn.huge.module.cases.domain.po.CaseInfo; |
| | | import cn.huge.module.cases.domain.po.CasePerson; |
| | | import cn.huge.module.draft.domain.po.CasedraftAgent; |
| | | import cn.huge.module.draft.domain.po.CasedraftInfo; |
| | | import cn.huge.module.draft.domain.po.CasedraftPerson; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: 纠纷信息数据传输对象 |
| | | * @description: 纠纷信息数据传输对象 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2022-03-11 11:43:25 |
| | | * @version: 1.0.0 |
| | | * @see CaseInfo |
| | | */ |
| | | @Data |
| | | public class DraftRegisterSaveDTO extends CasedraftInfo { |
| | | |
| | | /** |
| | | * 申请人列表 |
| | | */ |
| | | private List<CasedraftPerson> plaintiffList; |
| | | |
| | | /** |
| | | * 申请人代理人列表 |
| | | */ |
| | | private List<CasedraftAgent> pagentList; |
| | | |
| | | /** |
| | | * 被申请人列表 |
| | | */ |
| | | private List<CasedraftPerson> defendantList; |
| | | |
| | | /** |
| | | * 被申请人代理人列表 |
| | | */ |
| | | private List<CasedraftAgent> dagentList; |
| | | |
| | | /** |
| | | * 调解组织类型,1:本单位调解,2:本单位人调解,3:其他单位调解 |
| | | */ |
| | | private String mediateUnitType; |
| | | |
| | | /** |
| | | * 自行受理标识,0:不是,1:是 |
| | | */ |
| | | private Integer isSelfAccept; |
| | | |
| | | /** |
| | | * 是否是草稿提交,0:不是,1:是 |
| | | */ |
| | | private Integer isDraft; |
| | | } |
| New file |
| | |
| | | package cn.huge.module.draft.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: wangwh |
| | | * @time: 2024-08-27 10:48:18 |
| | | * @version 1.0.0 |
| | | */ |
| | | @TableName(value = "dyh_casedraft_agent") |
| | | @Data |
| | | public class CasedraftAgent { |
| | | |
| | | /** |
| | | * 主键编号 |
| | | */ |
| | | @TableId(value = "id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 纠纷编号 |
| | | */ |
| | | @TableField(value = "case_id") |
| | | private String caseId; |
| | | |
| | | /** |
| | | * 公众用户编号 |
| | | */ |
| | | @TableField(value = "party_user_id") |
| | | private String partyUserId; |
| | | |
| | | /** |
| | | * 代理人类型 |
| | | */ |
| | | @TableField(value = "per_class") |
| | | private String perClass; |
| | | |
| | | /** |
| | | * 代理人类型名称 |
| | | */ |
| | | @TableField(value = "per_class_name") |
| | | private String perClassName; |
| | | |
| | | /** |
| | | * 姓名 |
| | | */ |
| | | @TableField(value = "true_name") |
| | | private String trueName; |
| | | |
| | | /** |
| | | * 联系方式 |
| | | */ |
| | | @TableField(value = "mobile") |
| | | private String mobile; |
| | | |
| | | /** |
| | | * 证件类型 |
| | | */ |
| | | @TableField(value = "certi_type") |
| | | private String certiType; |
| | | |
| | | /** |
| | | * 证件类型名称 |
| | | */ |
| | | @TableField(value = "certi_type_name") |
| | | private String certiTypeName; |
| | | |
| | | /** |
| | | * 证件号码 |
| | | */ |
| | | @TableField(value = "certi_no") |
| | | private String certiNo; |
| | | |
| | | /** |
| | | * 联系地址省 |
| | | */ |
| | | @TableField(value = "prov") |
| | | private String prov; |
| | | |
| | | /** |
| | | * 联系地址省名称 |
| | | */ |
| | | @TableField(value = "prov_name") |
| | | private String provName; |
| | | |
| | | /** |
| | | * 联系地址市 |
| | | */ |
| | | @TableField(value = "city") |
| | | private String city; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址市名称 |
| | | */ |
| | | @TableField(value = "city_name") |
| | | private String cityName; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址区 |
| | | */ |
| | | @TableField(value = "area") |
| | | private String area; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址区名称 |
| | | */ |
| | | @TableField(value = "area_name") |
| | | private String areaName; |
| | | |
| | | /** |
| | | * 联地址街道 |
| | | */ |
| | | @TableField(value = "road") |
| | | private String road; |
| | | |
| | | /** |
| | | * 联系地址街道名称 |
| | | */ |
| | | @TableField(value = "road_name") |
| | | private String roadName; |
| | | |
| | | /** |
| | | * 联系地址社区 |
| | | */ |
| | | @TableField(value = "village") |
| | | private String village; |
| | | |
| | | /** |
| | | * 联系地址社区名称 |
| | | */ |
| | | @TableField(value = "village_name") |
| | | private String villageName; |
| | | |
| | | /** |
| | | * 联系地址详细地址 |
| | | */ |
| | | @TableField(value = "addr") |
| | | private String addr; |
| | | |
| | | /** |
| | | * 户籍地址省 |
| | | */ |
| | | @TableField(value = "place_prov") |
| | | private String placeProv; |
| | | |
| | | /** |
| | | * 户籍地址省名称 |
| | | */ |
| | | @TableField(value = "place_prov_name") |
| | | private String placeProvName; |
| | | |
| | | /** |
| | | * 户籍地址市 |
| | | */ |
| | | @TableField(value = "place_city") |
| | | private String placeCity; |
| | | |
| | | /** |
| | | * 户籍地址市名称 |
| | | */ |
| | | @TableField(value = "place_city_name") |
| | | private String placeCityName; |
| | | |
| | | /** |
| | | * 户籍地址区 |
| | | */ |
| | | @TableField(value = "place_area") |
| | | private String placeArea; |
| | | |
| | | /** |
| | | * 户籍地址区名称 |
| | | */ |
| | | @TableField(value = "place_area_name") |
| | | private String placeAreaName; |
| | | |
| | | /** |
| | | * 户籍地址街道 |
| | | */ |
| | | @TableField(value = "place_road") |
| | | private String placeRoad; |
| | | |
| | | /** |
| | | * 户籍地址街道名称 |
| | | */ |
| | | @TableField(value = "place_road_name") |
| | | private String placeRoadName; |
| | | |
| | | /** |
| | | * 户籍地址社区 |
| | | */ |
| | | @TableField(value = "place_village") |
| | | private String placeVillage; |
| | | |
| | | /** |
| | | * 户籍地址社区名称 |
| | | */ |
| | | @TableField(value = "place_village_name") |
| | | private String placeVillageName; |
| | | |
| | | /** |
| | | * 户籍地址详细地址 |
| | | */ |
| | | @TableField(value = "place_addr") |
| | | private String placeAddr; |
| | | |
| | | /** |
| | | * 工作单位 |
| | | */ |
| | | @TableField(value = "work_unit") |
| | | private String workUnit; |
| | | |
| | | /** |
| | | * 民族 |
| | | */ |
| | | @TableField(value = "nation") |
| | | private String nation; |
| | | |
| | | /** |
| | | * 民族名称 |
| | | */ |
| | | @TableField(value = "nation_name") |
| | | private String nationName; |
| | | |
| | | /** |
| | | * 性别 |
| | | */ |
| | | @TableField(value = "sex") |
| | | private String sex; |
| | | |
| | | /** |
| | | * 性别名称 |
| | | */ |
| | | @TableField(value = "sex_name") |
| | | private String sexName; |
| | | |
| | | /** |
| | | * 是否有个人极端倾向,0:否,1:是 |
| | | */ |
| | | @TableField(value = "extreme") |
| | | private Integer extreme; |
| | | |
| | | /** |
| | | * 委托关系 |
| | | */ |
| | | @TableField(value = "agent_relate") |
| | | private String agentRelate; |
| | | |
| | | /** |
| | | * 委托关系名称 |
| | | */ |
| | | @TableField(value = "agent_relate_name") |
| | | private String agentRelateName; |
| | | |
| | | /** |
| | | * 委托类型 |
| | | */ |
| | | @TableField(value = "agent_type") |
| | | private String agentType; |
| | | |
| | | /** |
| | | * 委托类型名称 |
| | | */ |
| | | @TableField(value = "agent_type_name") |
| | | private String agentTypeName; |
| | | |
| | | /** |
| | | * 代理当事人编号,多个用,隔开 |
| | | */ |
| | | @TableField(value = "person_id") |
| | | private String personId; |
| | | |
| | | /** |
| | | * 头像 |
| | | */ |
| | | @TableField(value = "avatar") |
| | | private String avatar; |
| | | |
| | | /** |
| | | * 职业 |
| | | */ |
| | | @TableField(value = "job") |
| | | private String job; |
| | | |
| | | /** |
| | | * 职业名称 |
| | | */ |
| | | @TableField(value = "job_name") |
| | | private String jobName; |
| | | |
| | | /** |
| | | * 出生日期 |
| | | */ |
| | | @TableField(value = "birthday") |
| | | private String birthday; |
| | | |
| | | /** |
| | | * 年龄 |
| | | */ |
| | | @TableField(value = "age") |
| | | private Integer age; |
| | | |
| | | /** |
| | | * 有无代理人,0:无,1:有 |
| | | */ |
| | | @TableField(value = "agent_status") |
| | | private Integer agentStatus; |
| | | |
| | | /** |
| | | * 顾客编号 |
| | | */ |
| | | @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.draft.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: wangwh |
| | | * @time: 2024-08-27 10:48:18 |
| | | * @version 1.0.0 |
| | | */ |
| | | @TableName(value = "dyh_casedraft_info") |
| | | @Data |
| | | public class CasedraftInfo { |
| | | |
| | | /** |
| | | * 主键编号 |
| | | */ |
| | | @TableId(value = "id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 事项标题 |
| | | */ |
| | | @TableField(value = "case_title") |
| | | private String caseTitle; |
| | | |
| | | /** |
| | | * 事项编号 |
| | | */ |
| | | @TableField(value = "case_ref") |
| | | private String caseRef; |
| | | |
| | | /** |
| | | * 事项等级 |
| | | */ |
| | | @TableField(value = "case_level") |
| | | private Integer caseLevel; |
| | | |
| | | /** |
| | | * 来访时间 |
| | | */ |
| | | @TableField(value = "visit_time") |
| | | private Date visitTime; |
| | | |
| | | /** |
| | | * 来访人数 |
| | | */ |
| | | @TableField(value = "visit_people_num") |
| | | private Integer visitPeopleNum; |
| | | |
| | | /** |
| | | * 调解类型 |
| | | */ |
| | | @TableField(value = "medi_type") |
| | | private String mediType; |
| | | |
| | | /** |
| | | * 调解类型名称 |
| | | */ |
| | | @TableField(value = "medi_type_name") |
| | | private String mediTypeName; |
| | | |
| | | /** |
| | | * 纠纷一级类型 |
| | | */ |
| | | @TableField(value = "case_type_first") |
| | | private String caseTypeFirst; |
| | | |
| | | /** |
| | | * 纠纷一级类型名称 |
| | | */ |
| | | @TableField(value = "case_type_first_name") |
| | | private String caseTypeFirstName; |
| | | |
| | | /** |
| | | * 纠纷类型 |
| | | */ |
| | | @TableField(value = "case_type") |
| | | private String caseType; |
| | | |
| | | /** |
| | | * 纠纷类型名称 |
| | | */ |
| | | @TableField(value = "case_type_name") |
| | | private String caseTypeName; |
| | | |
| | | /** |
| | | * 纠纷发生时间 |
| | | */ |
| | | @TableField(value = "occur_time") |
| | | private Date occurTime; |
| | | |
| | | /** |
| | | * 纠纷发生地详细地址 |
| | | */ |
| | | @TableField(value = "addr") |
| | | private String addr; |
| | | |
| | | /** |
| | | * 纠纷发生地经度 |
| | | */ |
| | | @TableField(value = "lng") |
| | | private String lng; |
| | | |
| | | /** |
| | | * 纠纷发生地纬度 |
| | | */ |
| | | @TableField(value = "lat") |
| | | private String lat; |
| | | |
| | | /** |
| | | * 纠纷发生地网格地址 |
| | | */ |
| | | @TableField(value = "wg_addr") |
| | | private String wgAddr; |
| | | |
| | | /** |
| | | * 纠纷发生地网格地址经度 |
| | | */ |
| | | @TableField(value = "wg_lng") |
| | | private String wgLng; |
| | | |
| | | /** |
| | | * 纠纷发生地网格地址纬度 |
| | | */ |
| | | @TableField(value = "wg_lat") |
| | | private String wgLat; |
| | | |
| | | /** |
| | | * 问题属地省 |
| | | */ |
| | | @TableField(value = "que_prov") |
| | | private String queProv; |
| | | |
| | | /** |
| | | * 问题属地省名称 |
| | | */ |
| | | @TableField(value = "que_prov_name") |
| | | private String queProvName; |
| | | |
| | | /** |
| | | * 问题属地市 |
| | | */ |
| | | @TableField(value = "que_city") |
| | | private String queCity; |
| | | |
| | | /** |
| | | * 问题属地市名称 |
| | | */ |
| | | @TableField(value = "que_city_name") |
| | | private String queCityName; |
| | | |
| | | /** |
| | | * 问题属地区 |
| | | */ |
| | | @TableField(value = "que_area") |
| | | private String queArea; |
| | | |
| | | /** |
| | | * 问题属地区名称 |
| | | */ |
| | | @TableField(value = "que_area_name") |
| | | private String queAreaName; |
| | | |
| | | /** |
| | | * 问题属地街道 |
| | | */ |
| | | @TableField(value = "que_road") |
| | | private String queRoad; |
| | | |
| | | /** |
| | | * 问题属地街道名称 |
| | | */ |
| | | @TableField(value = "que_road_name") |
| | | private String queRoadName; |
| | | |
| | | /** |
| | | * 问题属地社区 |
| | | */ |
| | | @TableField(value = "que_village") |
| | | private String queVillage; |
| | | |
| | | /** |
| | | * 问题属地社区名称 |
| | | */ |
| | | @TableField(value = "que_village_name") |
| | | private String queVillageName; |
| | | |
| | | /** |
| | | * 涉及人数 |
| | | */ |
| | | @TableField(value = "people_num") |
| | | private Integer peopleNum; |
| | | |
| | | /** |
| | | * 涉及金额 |
| | | */ |
| | | @TableField(value = "amount") |
| | | private Double amount; |
| | | |
| | | /** |
| | | * 涉及人群 |
| | | */ |
| | | @TableField(value = "crowd") |
| | | private String crowd; |
| | | |
| | | /** |
| | | * 涉及人群名称 |
| | | */ |
| | | @TableField(value = "crowd_name") |
| | | private String crowdName; |
| | | |
| | | /** |
| | | * 事项来源 |
| | | */ |
| | | @TableField(value = "canal") |
| | | private String canal; |
| | | |
| | | /** |
| | | * 事项来源名称 |
| | | */ |
| | | @TableField(value = "canal_name") |
| | | private String canalName; |
| | | |
| | | /** |
| | | * 来访形式 |
| | | */ |
| | | @TableField(value = "visit_way") |
| | | private String visitWay; |
| | | |
| | | /** |
| | | * 来访形式名称 |
| | | */ |
| | | @TableField(value = "visit_way_name") |
| | | private String visitWayName; |
| | | |
| | | /** |
| | | * 事项概况 |
| | | */ |
| | | @TableField(value = "case_des") |
| | | private String caseDes; |
| | | |
| | | /** |
| | | * 事项申请 |
| | | */ |
| | | @TableField(value = "case_claim") |
| | | private String caseClaim; |
| | | |
| | | /** |
| | | * 是否重大矛盾纠纷,0:否,1:是 |
| | | */ |
| | | @TableField(value = "major_status") |
| | | private Integer majorStatus; |
| | | |
| | | /** |
| | | * 纠纷来源 |
| | | */ |
| | | @TableField(value = "source") |
| | | private String source; |
| | | |
| | | /** |
| | | * 纠纷来源名称 |
| | | */ |
| | | @TableField(value = "source_name") |
| | | private String sourceName; |
| | | |
| | | /** |
| | | * 矛调号 |
| | | */ |
| | | @TableField(value = "case_no") |
| | | private String caseNo; |
| | | |
| | | /** |
| | | * 民诉前调号 |
| | | */ |
| | | @TableField(value = "mediate_no") |
| | | private String mediateNo; |
| | | |
| | | /** |
| | | * 民诉前调书号 |
| | | */ |
| | | @TableField(value = "mediate_book_no") |
| | | private String mediateBookNo; |
| | | |
| | | /** |
| | | * 诉讼案号 |
| | | */ |
| | | @TableField(value = "civil_no") |
| | | private String civilNo; |
| | | |
| | | /** |
| | | * 申请方当事人名称 |
| | | */ |
| | | @TableField(value = "plaintiffs") |
| | | private String plaintiffs; |
| | | |
| | | /** |
| | | * 申请方代理人名称 |
| | | */ |
| | | @TableField(value = "pagents") |
| | | private String pagents; |
| | | |
| | | /** |
| | | * 被申请方当事人名称 |
| | | */ |
| | | @TableField(value = "defendants") |
| | | private String defendants; |
| | | |
| | | /** |
| | | * 被申请方代理人名称 |
| | | */ |
| | | @TableField(value = "dagents") |
| | | private String dagents; |
| | | |
| | | /** |
| | | * 登记组织编号 |
| | | */ |
| | | @TableField(value = "input_unit_id") |
| | | private String inputUnitId; |
| | | |
| | | /** |
| | | * 登记组织名称 |
| | | */ |
| | | @TableField(value = "input_unit_name") |
| | | private String inputUnitName; |
| | | |
| | | /** |
| | | * 登记人编号 |
| | | */ |
| | | @TableField(value = "input_user_id") |
| | | private String inputUserId; |
| | | |
| | | /** |
| | | * 登记人名称 |
| | | */ |
| | | @TableField(value = "input_user_name") |
| | | private String inputUserName; |
| | | |
| | | /** |
| | | * 登记方式,1:正常登记,2:案件导入 |
| | | */ |
| | | @TableField(value = "input_way") |
| | | private Integer inputWay; |
| | | |
| | | /** |
| | | * 顾客编号 |
| | | */ |
| | | @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.draft.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: wangwh |
| | | * @time: 2024-08-27 10:48:18 |
| | | * @version 1.0.0 |
| | | */ |
| | | @TableName(value = "dyh_casedraft_person") |
| | | @Data |
| | | public class CasedraftPerson { |
| | | |
| | | /** |
| | | * 主键编号 |
| | | */ |
| | | @TableId(value = "id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 纠纷编号 |
| | | */ |
| | | @TableField(value = "case_id") |
| | | private String caseId; |
| | | |
| | | /** |
| | | * 公众用户编号 |
| | | */ |
| | | @TableField(value = "party_user_id") |
| | | private String partyUserId; |
| | | |
| | | /** |
| | | * 当事人地位 |
| | | */ |
| | | @TableField(value = "per_type") |
| | | private String perType; |
| | | |
| | | /** |
| | | * 当事人地位名称 |
| | | */ |
| | | @TableField(value = "per_type_name") |
| | | private String perTypeName; |
| | | |
| | | /** |
| | | * 当事人类型 |
| | | */ |
| | | @TableField(value = "per_class") |
| | | private String perClass; |
| | | |
| | | /** |
| | | * 当事人类型名称 |
| | | */ |
| | | @TableField(value = "per_class_name") |
| | | private String perClassName; |
| | | |
| | | /** |
| | | * 姓名/企业/机构名称 |
| | | */ |
| | | @TableField(value = "true_name") |
| | | private String trueName; |
| | | |
| | | /** |
| | | * 联系方式 |
| | | */ |
| | | @TableField(value = "mobile") |
| | | private String mobile; |
| | | |
| | | /** |
| | | * 组织机构代码 |
| | | */ |
| | | @TableField(value = "orga_code") |
| | | private String orgaCode; |
| | | |
| | | /** |
| | | * 法定/机构代表人名称 |
| | | */ |
| | | @TableField(value = "deputy") |
| | | private String deputy; |
| | | |
| | | /** |
| | | * 企业/机构类型 |
| | | */ |
| | | @TableField(value = "orga_type") |
| | | private String orgaType; |
| | | |
| | | /** |
| | | * 企业/机构类型名称 |
| | | */ |
| | | @TableField(value = "orga_type_name") |
| | | private String orgaTypeName; |
| | | |
| | | /** |
| | | * 证件类型 |
| | | */ |
| | | @TableField(value = "certi_type") |
| | | private String certiType; |
| | | |
| | | /** |
| | | * 证件类型名称 |
| | | */ |
| | | @TableField(value = "certi_type_name") |
| | | private String certiTypeName; |
| | | |
| | | /** |
| | | * 证件号码 |
| | | */ |
| | | @TableField(value = "certi_no") |
| | | private String certiNo; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址省 |
| | | */ |
| | | @TableField(value = "prov") |
| | | private String prov; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址省名称 |
| | | */ |
| | | @TableField(value = "prov_name") |
| | | private String provName; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址市 |
| | | */ |
| | | @TableField(value = "city") |
| | | private String city; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址市名称 |
| | | */ |
| | | @TableField(value = "city_name") |
| | | private String cityName; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址区 |
| | | */ |
| | | @TableField(value = "area") |
| | | private String area; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址区名称 |
| | | */ |
| | | @TableField(value = "area_name") |
| | | private String areaName; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址街道 |
| | | */ |
| | | @TableField(value = "road") |
| | | private String road; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址街道名称 |
| | | */ |
| | | @TableField(value = "road_name") |
| | | private String roadName; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址社区 |
| | | */ |
| | | @TableField(value = "village") |
| | | private String village; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址社区名称 |
| | | */ |
| | | @TableField(value = "village_name") |
| | | private String villageName; |
| | | |
| | | /** |
| | | * 联系/企业/机构地址详细地址 |
| | | */ |
| | | @TableField(value = "addr") |
| | | private String addr; |
| | | |
| | | /** |
| | | * 户籍/住所地址省 |
| | | */ |
| | | @TableField(value = "place_prov") |
| | | private String placeProv; |
| | | |
| | | /** |
| | | * 户籍/住所地址省名称 |
| | | */ |
| | | @TableField(value = "place_prov_name") |
| | | private String placeProvName; |
| | | |
| | | /** |
| | | * 户籍/住所地址市 |
| | | */ |
| | | @TableField(value = "place_city") |
| | | private String placeCity; |
| | | |
| | | /** |
| | | * 户籍/住所地址市名称 |
| | | */ |
| | | @TableField(value = "place_city_name") |
| | | private String placeCityName; |
| | | |
| | | /** |
| | | * 户籍/住所地址区 |
| | | */ |
| | | @TableField(value = "place_area") |
| | | private String placeArea; |
| | | |
| | | /** |
| | | * 户籍/住所地址区名称 |
| | | */ |
| | | @TableField(value = "place_area_name") |
| | | private String placeAreaName; |
| | | |
| | | /** |
| | | * 户籍/住所地址街道 |
| | | */ |
| | | @TableField(value = "place_road") |
| | | private String placeRoad; |
| | | |
| | | /** |
| | | * 户籍/住所地址街道名称 |
| | | */ |
| | | @TableField(value = "place_road_name") |
| | | private String placeRoadName; |
| | | |
| | | /** |
| | | * 户籍/住所地址社区 |
| | | */ |
| | | @TableField(value = "place_village") |
| | | private String placeVillage; |
| | | |
| | | /** |
| | | * 户籍/住所地址社区名称 |
| | | */ |
| | | @TableField(value = "place_village_name") |
| | | private String placeVillageName; |
| | | |
| | | /** |
| | | * 户籍/住所地址详细地址 |
| | | */ |
| | | @TableField(value = "place_addr") |
| | | private String placeAddr; |
| | | |
| | | /** |
| | | * 工作单位 |
| | | */ |
| | | @TableField(value = "work_unit") |
| | | private String workUnit; |
| | | |
| | | /** |
| | | * 民族 |
| | | */ |
| | | @TableField(value = "nation") |
| | | private String nation; |
| | | |
| | | /** |
| | | * 民族名称 |
| | | */ |
| | | @TableField(value = "nation_name") |
| | | private String nationName; |
| | | |
| | | /** |
| | | * 性别 |
| | | */ |
| | | @TableField(value = "sex") |
| | | private String sex; |
| | | |
| | | /** |
| | | * 性别名称 |
| | | */ |
| | | @TableField(value = "sex_name") |
| | | private String sexName; |
| | | |
| | | /** |
| | | * 是否有个人极端倾向,0:否,1:是 |
| | | */ |
| | | @TableField(value = "extreme") |
| | | private Integer extreme; |
| | | |
| | | /** |
| | | * 头像 |
| | | */ |
| | | @TableField(value = "avatar") |
| | | private String avatar; |
| | | |
| | | /** |
| | | * 职业 |
| | | */ |
| | | @TableField(value = "job") |
| | | private String job; |
| | | |
| | | /** |
| | | * 职业名称 |
| | | */ |
| | | @TableField(value = "job_name") |
| | | private String jobName; |
| | | |
| | | /** |
| | | * 出生日期 |
| | | */ |
| | | @TableField(value = "birthday") |
| | | private String birthday; |
| | | |
| | | /** |
| | | * 年龄 |
| | | */ |
| | | @TableField(value = "age") |
| | | private Integer age; |
| | | |
| | | /** |
| | | * 有无代理人,0:无,1:有 |
| | | */ |
| | | @TableField(value = "agent_status") |
| | | private Integer agentStatus; |
| | | |
| | | /** |
| | | * 顾客编号 |
| | | */ |
| | | @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.draft.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.draft.dao.mapper.CasedraftAgentMapper; |
| | | import cn.huge.module.draft.domain.po.CasedraftAgent; |
| | | 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 wangwh |
| | | * @Time 2024-08-27 10:48:18 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class CasedraftAgentService extends ServiceImpl<CasedraftAgentMapper, CasedraftAgent>{ |
| | | |
| | | @Autowired |
| | | private CasedraftAgentMapper mapper; |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | public void updateCasedraftAgent(CasedraftAgent entity){ |
| | | try{ |
| | | mapper.updateCasedraftAgent(entity); |
| | | }catch (Exception e){ |
| | | log.error("[CasedraftAgentService.updateCasedraftAgent]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CasedraftAgentService.updateCasedraftAgent", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | public void updateCasedraftAgentTerms(CasedraftAgent entity, Map<String, Object> terms){ |
| | | try{ |
| | | mapper.updateCasedraftAgentTerms(entity, terms); |
| | | }catch (Exception e){ |
| | | log.error("[CasedraftAgentService.updateCasedraftAgentTerms]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CasedraftAgentService.updateCasedraftAgentTerms", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | public void deleteCasedraftAgent(String id){ |
| | | try{ |
| | | mapper.deleteCasedraftAgent(id); |
| | | }catch (Exception e){ |
| | | log.error("[CasedraftAgentService.deleteCasedraftAgent]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CasedraftAgentService.deleteCasedraftAgent", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 按条件查询 |
| | | * @param terms 条件 |
| | | * @return List |
| | | */ |
| | | public List<CasedraftAgent> 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<CasedraftAgent> pageQuery(PageRequest page, Map<String, Object> terms){ |
| | | long total = mapper.countTerms(terms); |
| | | List<CasedraftAgent> content = mapper.pageTerms(page, terms); |
| | | return new PageImpl<CasedraftAgent>(content, page, total); |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @param casedraftAgent 实体对象 |
| | | */ |
| | | public void saveCasedraftAgent(CasedraftAgent casedraftAgent){ |
| | | try{ |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 判断是否新增 |
| | | if (IdUtils.checkNewId(casedraftAgent.getId())){ |
| | | casedraftAgent.setId(utilsClient.getNewTimeId()); |
| | | casedraftAgent.setCreateTime(nowDate); |
| | | } |
| | | casedraftAgent.setUpdateTime(nowDate); |
| | | this.saveOrUpdate(casedraftAgent); |
| | | }catch (Exception e){ |
| | | log.error("[CasedraftAgentService.saveCasedraftAgent]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CasedraftAgentService.saveCasedraftAgent", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据纠纷编号查询代理人编号 |
| | | * @param caseId 条件 |
| | | * @return List |
| | | */ |
| | | public List<String> listIdByCaseId(String caseId){ |
| | | return mapper.listIdByCaseId(caseId); |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.huge.module.draft.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.cases.domain.dto.RegisterSaveDTO; |
| | | import cn.huge.module.cases.domain.po.CaseAgent; |
| | | import cn.huge.module.cases.domain.po.CaseInfo; |
| | | import cn.huge.module.cases.domain.po.CaseInfoUnfold; |
| | | import cn.huge.module.cases.domain.po.CasePerson; |
| | | 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.constant.CaseBaseConsts; |
| | | import cn.huge.module.constant.CaseBaseConstsEnum; |
| | | import cn.huge.module.cust.dto.CtUserDTO; |
| | | import cn.huge.module.draft.dao.mapper.CasedraftInfoMapper; |
| | | import cn.huge.module.draft.domain.dto.DraftRegisterSaveDTO; |
| | | import cn.huge.module.draft.domain.po.CasedraftAgent; |
| | | import cn.huge.module.draft.domain.po.CasedraftInfo; |
| | | import cn.huge.module.draft.domain.po.CasedraftPerson; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | 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 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.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @title: 纠纷信息草稿表业务逻辑处理 |
| | | * @Description 纠纷信息草稿表业务逻辑处理 |
| | | * @company hugeinfo |
| | | * @author wangwh |
| | | * @Time 2024-08-27 10:48:18 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class CasedraftInfoService extends ServiceImpl<CasedraftInfoMapper, CasedraftInfo>{ |
| | | |
| | | @Autowired |
| | | private CasedraftInfoMapper mapper; |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | @Autowired |
| | | private CasedraftPersonService draftPersonService; |
| | | |
| | | @Autowired |
| | | private CasedraftAgentService draftAgentService; |
| | | |
| | | @Autowired |
| | | private CustClientImpl custClient; |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | public void updateCasedraftInfo(CasedraftInfo entity){ |
| | | try{ |
| | | mapper.updateCasedraftInfo(entity); |
| | | }catch (Exception e){ |
| | | log.error("[CasedraftInfoService.updateCasedraftInfo]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CasedraftInfoService.updateCasedraftInfo", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | public void updateCasedraftInfoTerms(CasedraftInfo entity, Map<String, Object> terms){ |
| | | try{ |
| | | mapper.updateCasedraftInfoTerms(entity, terms); |
| | | }catch (Exception e){ |
| | | log.error("[CasedraftInfoService.updateCasedraftInfoTerms]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CasedraftInfoService.updateCasedraftInfoTerms", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | public void deleteCasedraftInfo(String id){ |
| | | try{ |
| | | mapper.deleteCasedraftInfo(id); |
| | | }catch (Exception e){ |
| | | log.error("[CasedraftInfoService.deleteCasedraftInfo]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CasedraftInfoService.deleteCasedraftInfo", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 按条件查询 |
| | | * @param terms 条件 |
| | | * @return List |
| | | */ |
| | | public List<CasedraftInfo> 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<CasedraftInfo> pageQuery(PageRequest page, Map<String, Object> terms){ |
| | | long total = mapper.countTerms(terms); |
| | | List<CasedraftInfo> content = mapper.pageTerms(page, terms); |
| | | return new PageImpl<CasedraftInfo>(content, page, total); |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @param casedraftInfo 实体对象 |
| | | */ |
| | | public void saveCasedraftInfo(CasedraftInfo casedraftInfo){ |
| | | try{ |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 判断是否新增 |
| | | if (IdUtils.checkNewId(casedraftInfo.getId())){ |
| | | casedraftInfo.setId(utilsClient.getNewTimeId()); |
| | | casedraftInfo.setCreateTime(nowDate); |
| | | } |
| | | casedraftInfo.setUpdateTime(nowDate); |
| | | this.saveOrUpdate(casedraftInfo); |
| | | }catch (Exception e){ |
| | | log.error("[CasedraftInfoService.saveCasedraftInfo]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CasedraftInfoService.saveCasedraftInfo", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * PC端-纠纷登记-保存纠纷草稿信息 |
| | | * @param draftRegisterSaveDTO 纠纷草稿信息 |
| | | * @param userId 操作人 |
| | | * @return String 纠纷编号 |
| | | */ |
| | | public String caseDraftRegister(DraftRegisterSaveDTO draftRegisterSaveDTO, String userId){ |
| | | try { |
| | | // 获取当前登录用户 |
| | | CtUserDTO loginUser = custClient.clientGetUserAll(userId); |
| | | |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | StringBuffer plaintiffs = new StringBuffer(); |
| | | StringBuffer defendants = new StringBuffer(); |
| | | StringBuffer pagents = new StringBuffer(); |
| | | StringBuffer dagents = new StringBuffer(); |
| | | int peopleNum = 0; |
| | | |
| | | CasedraftInfo casedraftInfo = new CasedraftInfo(); |
| | | CaseInfoUnfold caseInfoUnfold = new CaseInfoUnfold(); |
| | | BeanUtils.copyProperties(draftRegisterSaveDTO, casedraftInfo); |
| | | casedraftInfo.setId(utilsClient.getNewTimeId()); |
| | | casedraftInfo.setInputUnitId(loginUser.getUnitId()); |
| | | casedraftInfo.setInputUnitName(loginUser.getUnitName()); |
| | | casedraftInfo.setInputUserId(loginUser.getId()); |
| | | casedraftInfo.setInputUserName(loginUser.getTrueName()); |
| | | casedraftInfo.setInputWay(CaseBaseConsts.INPUT_WAY_1); |
| | | casedraftInfo.setCreateTime(nowDate); |
| | | casedraftInfo.setUpdateTime(nowDate); |
| | | //todo case_title |
| | | |
| | | // 常规登记-保存当事人 |
| | | peopleNum += this.saveCaseDraftPerson(draftRegisterSaveDTO, plaintiffs, pagents, defendants, dagents); |
| | | casedraftInfo.setPeopleNum(peopleNum); |
| | | casedraftInfo.setPlaintiffs(plaintiffs.toString()); |
| | | casedraftInfo.setPagents(pagents.toString()); |
| | | casedraftInfo.setDefendants(defendants.toString()); |
| | | casedraftInfo.setDagents(dagents.toString()); |
| | | |
| | | this.saveOrUpdate(casedraftInfo); |
| | | |
| | | return draftRegisterSaveDTO.getId(); |
| | | }catch (Exception e){ |
| | | log.error("service方法[CaseInfoService.caseDraftRegister]调用异常:"+e, e); |
| | | throw new ServiceException("CaseInfoService.caseDraftRegister", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * pc端-常规登记-保存草稿案件-保存人员信息 |
| | | * @param draftRegisterSaveDTO 纠纷信息 |
| | | * @param plaintiffs 申请人 |
| | | * @param pagents 申请人代理人 |
| | | * @param defendants 被申请人 |
| | | * @param dagents 被申请人代理人 |
| | | * @return int |
| | | */ |
| | | private int saveCaseDraftPerson(DraftRegisterSaveDTO draftRegisterSaveDTO, StringBuffer plaintiffs, StringBuffer pagents, |
| | | StringBuffer defendants, StringBuffer dagents){ |
| | | int peopleNum = 0; |
| | | List<String> newDraftPersonIdList = new ArrayList<>(); |
| | | List<String> newDraftAgentIdList = new ArrayList<>(); |
| | | // 保存申请人 |
| | | List<CasedraftPerson> plaintPersonList = draftRegisterSaveDTO.getPlaintiffList(); |
| | | if (CollectionUtils.isNotEmpty(plaintPersonList)) { |
| | | for (CasedraftPerson casedraftPerson : plaintPersonList) { |
| | | newDraftPersonIdList.add(casedraftPerson.getId()); |
| | | casedraftPerson.setCaseId(draftRegisterSaveDTO.getId()); |
| | | casedraftPerson.setPerType(CaseBaseConstsEnum.PERSON_TYPE_1.getIndex()); |
| | | casedraftPerson.setPerTypeName(CaseBaseConstsEnum.PERSON_TYPE_1.getDes()); |
| | | casedraftPerson.setCustId(draftRegisterSaveDTO.getCustId()); |
| | | casedraftPerson.setCreateTime(draftRegisterSaveDTO.getUpdateTime()); |
| | | casedraftPerson.setUpdateTime(draftRegisterSaveDTO.getUpdateTime()); |
| | | |
| | | draftPersonService.saveOrUpdate(casedraftPerson); |
| | | |
| | | if (StringUtils.isNotEmpty(plaintiffs.toString())) { |
| | | plaintiffs.append(BaseConsts.COMMA); |
| | | } |
| | | plaintiffs.append(casedraftPerson.getTrueName()); |
| | | peopleNum++; |
| | | |
| | | } |
| | | //保存代理人 |
| | | List<CasedraftAgent> pagentList = draftRegisterSaveDTO.getPagentList(); |
| | | if (CollectionUtils.isNotEmpty(pagentList)) { |
| | | for(CasedraftAgent casedraftAgent: pagentList){ |
| | | newDraftAgentIdList.add(casedraftAgent.getId()); |
| | | casedraftAgent.setId(utilsClient.getNewTimeId()); |
| | | casedraftAgent.setCaseId(draftRegisterSaveDTO.getId()); |
| | | casedraftAgent.setAgentTypeName(CaseBaseConstsEnum.getDes(casedraftAgent.getAgentType())); |
| | | casedraftAgent.setCustId(draftRegisterSaveDTO.getCustId()); |
| | | casedraftAgent.setCreateTime(draftRegisterSaveDTO.getUpdateTime()); |
| | | casedraftAgent.setUpdateTime(draftRegisterSaveDTO.getUpdateTime()); |
| | | |
| | | draftAgentService.saveOrUpdate(casedraftAgent); |
| | | |
| | | if (StringUtils.isNotEmpty(pagents.toString())) { |
| | | pagents.append(BaseConsts.COMMA); |
| | | } |
| | | pagents.append(casedraftAgent.getTrueName()); |
| | | } |
| | | |
| | | //todo 绑定当事人小程序 |
| | | } |
| | | } |
| | | // 保存被申请人 |
| | | List<CasedraftPerson> defendPersonList = draftRegisterSaveDTO.getDefendantList(); |
| | | if(CollectionUtils.isNotEmpty(defendPersonList)){ |
| | | for (CasedraftPerson casedraftPerson : defendPersonList) { |
| | | newDraftPersonIdList.add(casedraftPerson.getId()); |
| | | casedraftPerson.setCaseId(draftRegisterSaveDTO.getId()); |
| | | casedraftPerson.setPerType(CaseBaseConstsEnum.PERSON_TYPE_2.getIndex()); |
| | | casedraftPerson.setPerTypeName(CaseBaseConstsEnum.PERSON_TYPE_2.getDes()); |
| | | casedraftPerson.setCustId(draftRegisterSaveDTO.getCustId()); |
| | | casedraftPerson.setCreateTime(draftRegisterSaveDTO.getUpdateTime()); |
| | | casedraftPerson.setUpdateTime(draftRegisterSaveDTO.getUpdateTime()); |
| | | //todo 绑定当事人小程序 |
| | | draftPersonService.saveOrUpdate(casedraftPerson); |
| | | if (StringUtils.isNotEmpty(defendants.toString())) { |
| | | defendants.append(BaseConsts.COMMA); |
| | | } |
| | | defendants.append(casedraftPerson.getTrueName()); |
| | | peopleNum++; |
| | | } |
| | | //保存代理人 |
| | | List<CasedraftAgent> pagentList = draftRegisterSaveDTO.getPagentList(); |
| | | if (CollectionUtils.isNotEmpty(pagentList)) { |
| | | for(CasedraftAgent casedraftAgent: pagentList){ |
| | | newDraftAgentIdList.add(casedraftAgent.getId()); |
| | | casedraftAgent.setId(utilsClient.getNewTimeId()); |
| | | casedraftAgent.setCaseId(draftRegisterSaveDTO.getId()); |
| | | casedraftAgent.setAgentTypeName(CaseBaseConstsEnum.getDes(casedraftAgent.getAgentType())); |
| | | casedraftAgent.setCustId(draftRegisterSaveDTO.getCustId()); |
| | | casedraftAgent.setCreateTime(draftRegisterSaveDTO.getUpdateTime()); |
| | | casedraftAgent.setUpdateTime(draftRegisterSaveDTO.getUpdateTime()); |
| | | draftAgentService.saveOrUpdate(casedraftAgent); |
| | | if (StringUtils.isNotEmpty(dagents.toString())) { |
| | | dagents.append(BaseConsts.COMMA); |
| | | } |
| | | dagents.append(casedraftAgent.getTrueName()); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | // 删除冗余的申请人 |
| | | if (CollectionUtils.isNotEmpty(newDraftPersonIdList)) { |
| | | List<String> oldPersonIdList = draftPersonService.listIdByCaseId(draftRegisterSaveDTO.getId()); |
| | | for (String oldPersonId : oldPersonIdList) { |
| | | if (!newDraftPersonIdList.contains(oldPersonId)) { |
| | | draftPersonService.removeById(oldPersonId); |
| | | } |
| | | } |
| | | }else{ |
| | | QueryWrapper<CasedraftPerson> casedraftPersonQueryWrapper = new QueryWrapper<>(); |
| | | casedraftPersonQueryWrapper.eq("case_id", draftRegisterSaveDTO.getId()); |
| | | draftPersonService.remove(casedraftPersonQueryWrapper); |
| | | } |
| | | //删除冗余的代理人 |
| | | if(CollectionUtils.isNotEmpty(newDraftAgentIdList)){ |
| | | List<String> oldAgentIdList = draftAgentService.listIdByCaseId(draftRegisterSaveDTO.getId()); |
| | | for(String oldAgentId: oldAgentIdList){ |
| | | if(!newDraftAgentIdList.contains(oldAgentId)){ |
| | | draftAgentService.removeById(oldAgentId); |
| | | } |
| | | } |
| | | }else{ |
| | | QueryWrapper<CasedraftAgent> casedraftAgentQueryWrapper = new QueryWrapper<>(); |
| | | casedraftAgentQueryWrapper.eq("case_id", draftRegisterSaveDTO.getId()); |
| | | draftAgentService.remove(casedraftAgentQueryWrapper); |
| | | } |
| | | |
| | | return peopleNum; |
| | | } |
| | | |
| | | /** |
| | | * PC端-纠纷登记-草稿箱-删除纠纷草稿案件 |
| | | * @param caseId 纠纷/系列案编号 |
| | | * @return CaseInfo 纠纷信息 |
| | | */ |
| | | public void removeDraftInfo(String caseId){ |
| | | try{ |
| | | // 删除纠纷草稿信息 |
| | | QueryWrapper<CasedraftInfo> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("serie_no", caseId); |
| | | List<CasedraftInfo> draftInfoList = mapper.selectList(queryWrapper); |
| | | List<String> ownerIdList = new ArrayList<>(); |
| | | for (CasedraftInfo casedraftInfo : draftInfoList) { |
| | | ownerIdList.add(casedraftInfo.getId()); |
| | | mapper.deleteById(casedraftInfo.getId()); |
| | | // 删除当事人信息 |
| | | QueryWrapper<CasedraftPerson> casedraftPersonQueryWrapper = new QueryWrapper<>(); |
| | | casedraftPersonQueryWrapper.eq("case_id", casedraftInfo.getId()); |
| | | draftPersonService.remove(casedraftPersonQueryWrapper); |
| | | // 删除代理人信息 |
| | | QueryWrapper<CasedraftAgent> casedraftAgentQueryWrapper = new QueryWrapper<>(); |
| | | casedraftAgentQueryWrapper.eq("case_id", casedraftInfo.getId()); |
| | | //todo 删除附件关系 |
| | | // FileTypeTermsDTO fileTypeTermsDTO = new FileTypeTermsDTO(); |
| | | // fileTypeTermsDTO.setOwnerIdList(ownerIdList); |
| | | // sysClient.removeFileRelate(fileTypeTermsDTO); |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("service方法[CasedraftInfoService.removeDraftInfo]调用异常:"+e, e); |
| | | throw new ServiceException("CasedraftInfoService.removeDraftInfo", e); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.huge.module.draft.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.draft.dao.mapper.CasedraftPersonMapper; |
| | | import cn.huge.module.draft.domain.po.CasedraftPerson; |
| | | 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 wangwh |
| | | * @Time 2024-08-27 10:48:18 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class CasedraftPersonService extends ServiceImpl<CasedraftPersonMapper, CasedraftPerson>{ |
| | | |
| | | @Autowired |
| | | private CasedraftPersonMapper mapper; |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | public void updateCasedraftPerson(CasedraftPerson entity){ |
| | | try{ |
| | | mapper.updateCasedraftPerson(entity); |
| | | }catch (Exception e){ |
| | | log.error("[CasedraftPersonService.updateCasedraftPerson]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CasedraftPersonService.updateCasedraftPerson", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | public void updateCasedraftPersonTerms(CasedraftPerson entity, Map<String, Object> terms){ |
| | | try{ |
| | | mapper.updateCasedraftPersonTerms(entity, terms); |
| | | }catch (Exception e){ |
| | | log.error("[CasedraftPersonService.updateCasedraftPersonTerms]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CasedraftPersonService.updateCasedraftPersonTerms", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | public void deleteCasedraftPerson(String id){ |
| | | try{ |
| | | mapper.deleteCasedraftPerson(id); |
| | | }catch (Exception e){ |
| | | log.error("[CasedraftPersonService.deleteCasedraftPerson]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CasedraftPersonService.deleteCasedraftPerson", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 按条件查询 |
| | | * @param terms 条件 |
| | | * @return List |
| | | */ |
| | | public List<CasedraftPerson> 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<CasedraftPerson> pageQuery(PageRequest page, Map<String, Object> terms){ |
| | | long total = mapper.countTerms(terms); |
| | | List<CasedraftPerson> content = mapper.pageTerms(page, terms); |
| | | return new PageImpl<CasedraftPerson>(content, page, total); |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @param casedraftPerson 实体对象 |
| | | */ |
| | | public void saveCasedraftPerson(CasedraftPerson casedraftPerson){ |
| | | try{ |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 判断是否新增 |
| | | if (IdUtils.checkNewId(casedraftPerson.getId())){ |
| | | casedraftPerson.setId(utilsClient.getNewTimeId()); |
| | | casedraftPerson.setCreateTime(nowDate); |
| | | } |
| | | casedraftPerson.setUpdateTime(nowDate); |
| | | this.saveOrUpdate(casedraftPerson); |
| | | }catch (Exception e){ |
| | | log.error("[CasedraftPersonService.saveCasedraftPerson]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CasedraftPersonService.saveCasedraftPerson", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据纠纷编号查询人员编号 |
| | | * @param caseId 纠纷编号 |
| | | * @return List<String> |
| | | */ |
| | | public List<String> listIdByCaseId(String caseId){ |
| | | return mapper.listIdByCaseId(caseId); |
| | | } |
| | | } |
| | |
| | | package cn.huge.module.client.api; |
| | | |
| | | import cn.huge.base.common.bo.ReturnBO; |
| | | import cn.huge.module.mediate.dto.WechatBindCaseDTO; |
| | | |
| | | import cn.huge.module.sync.domain.target.TargetCtAccount; |
| | | import cn.huge.module.sync.domain.target.TargetCtUnit; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | /** |
| | | * 微服务调用-数据迁移-批量新增 |
| | | * @url {ctx}/api/client/ctUnit/saveCtUnitList |
| | | * @param targetCtUnitList 批量数据 |
| | | * @param targetTableList 批量数据 |
| | | * @return ReturnBO |
| | | */ |
| | | @GetMapping("/api/client/ctUnit/saveCtUnitList") |
| | | ReturnBO saveCtUnitList(@RequestBody List<TargetCtUnit> targetCtUnitList); |
| | | ReturnBO saveTableList(@RequestBody List<TargetCtUnit> targetTableList); |
| | | |
| | | /** |
| | | * 微服务调用-数据迁移-批量新增 |
| | | * @url {ctx}/api/client/ctUnit/saveCtUnitList |
| | | * @param targetTableList 批量数据 |
| | | * @return ReturnBO |
| | | */ |
| | | @GetMapping("/api/web/ctAccount/saveCtAccountList") |
| | | ReturnBO saveTableList1(@RequestBody List<TargetCtAccount> targetTableList); |
| | | } |
| | |
| | | import cn.huge.module.client.api.CustClient; |
| | | import cn.huge.module.cust.dto.CtUserDTO; |
| | | import cn.huge.module.cust.dto.PaUserDTO; |
| | | import cn.huge.module.mediate.dto.WechatBindCaseDTO; |
| | | import cn.huge.module.sync.domain.target.TargetCtAccount; |
| | | import cn.huge.module.sync.domain.target.TargetCtUnit; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | |
| | | |
| | | /** |
| | | * 微服务调用-数据迁移-批量新增 |
| | | * @param targetCtUnitList 批量数据 |
| | | * @param targetTableList 批量数据 |
| | | * @return |
| | | */ |
| | | public CtUserDTO saveCtUnitList(List<TargetCtUnit> targetCtUnitList){ |
| | | public CtUserDTO saveTableList(List<TargetCtUnit> targetTableList){ |
| | | try{ |
| | | ReturnBO returnBo = custClient.saveCtUnitList(targetCtUnitList); |
| | | ReturnBO returnBo = custClient.saveTableList(targetTableList); |
| | | if (ReturnConsts.OK == returnBo.getCode()){ |
| | | CtUserDTO loginUser = objectMapper.convertValue(returnBo.getData(), CtUserDTO.class); |
| | | return loginUser; |
| | | }else{ |
| | | log.error("Client外服务接口[CustClientImpl.saveCtUnitList]请求异常:" + returnBo.getMsg(), returnBo.getMsg()); |
| | | throw new ClientException("CustClientImpl.saveCtUnitList", returnBo.getMsg()); |
| | | log.error("Client外服务接口[CustClientImpl.saveTableList]请求异常:" + returnBo.getMsg(), returnBo.getMsg()); |
| | | throw new ClientException("CustClientImpl.saveTableList", returnBo.getMsg()); |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("service方法[CustClientImpl.saveCtUnitList]调用异常:"+e, e); |
| | | throw new ServiceException("CustClientImpl.saveCtUnitList", e); |
| | | log.error("service方法[CustClientImpl.saveTableList]调用异常:"+e, e); |
| | | throw new ServiceException("CustClientImpl.saveTableList", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 微服务调用-数据迁移-批量新增 |
| | | * @param targetTableList 批量数据 |
| | | * @return |
| | | */ |
| | | public CtUserDTO saveTableList1(List<TargetCtAccount> targetTableList){ |
| | | try{ |
| | | ReturnBO returnBo = custClient.saveTableList1(targetTableList); |
| | | if (ReturnConsts.OK == returnBo.getCode()){ |
| | | CtUserDTO loginUser = objectMapper.convertValue(returnBo.getData(), CtUserDTO.class); |
| | | return loginUser; |
| | | }else{ |
| | | log.error("Client外服务接口[CustClientImpl.saveTableList1]请求异常:" + returnBo.getMsg(), returnBo.getMsg()); |
| | | throw new ClientException("CustClientImpl.saveTableList1", returnBo.getMsg()); |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("service方法[CustClientImpl.saveTableList1]调用异常:"+e, e); |
| | | throw new ServiceException("CustClientImpl.saveTableList1", e); |
| | | } |
| | | } |
| | | } |
| | |
| | | package cn.huge.module.sync.dao.mapper; |
| | | |
| | | import cn.huge.module.sync.domain.source.SourceCtAccount; |
| | | import cn.huge.module.sync.domain.source.SourceCtUnit; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.data.domain.PageRequest; |
| | |
| | | * @param page 分页对象 |
| | | * @return List<CtAccount> |
| | | */ |
| | | List<SourceCtUnit> pageInfo(@Param("mysqlTableName") String mysqlTableName, @Param("page") PageRequest page); |
| | | List<SourceCtAccount> pageInfo(@Param("mysqlTableName") String mysqlTableName, @Param("page") PageRequest page); |
| | | |
| | | /** |
| | | * 按条件查询结果集 |
| | |
| | | --> |
| | | <mapper namespace="cn.huge.module.sync.dao.mapper.SyncMapper"> |
| | | |
| | | <resultMap id="dataResult" type="cn.huge.module.sync.domain.source.SourceCtUnit"> |
| | | <resultMap id="dataResult" type="cn.huge.module.sync.domain.source.SourceCtAccount"> |
| | | <result property="id" column="id"/> |
| | | <result property="name" column="name"/> |
| | | <result property="unitType" column="unit_type"/> |
| | | <result property="courtStatus" column="court_status"/> |
| | | <result property="unitCode" column="unit_code"/> |
| | | <result property="des" column="des"/> |
| | | <result property="dutyName" column="duty_name"/> |
| | | <result property="dutyMobile" column="duty_mobile"/> |
| | | <result property="dutyIdcard" column="duty_idcard"/> |
| | | <result property="joinWay" column="join_way"/> |
| | | <result property="prov" column="prov"/> |
| | | <result property="provName" column="prov_name"/> |
| | | <result property="city" column="city"/> |
| | | <result property="cityName" column="city_name"/> |
| | | <result property="area" column="area"/> |
| | | <result property="areaName" column="area_name"/> |
| | | <result property="road" column="road"/> |
| | | <result property="roadName" column="road_name"/> |
| | | <result property="village" column="village"/> |
| | | <result property="villageName" column="village_name"/> |
| | | <result property="addr" column="addr"/> |
| | | <result property="lng" column="lng"/> |
| | | <result property="lat" column="lat"/> |
| | | <result property="goodField" column="good_field"/> |
| | | <result property="goodFieldName" column="good_field_name"/> |
| | | <result property="canField" column="can_field"/> |
| | | <result property="canFieldName" column="can_field_name"/> |
| | | <result property="findStatus" column="find_status"/> |
| | | <result property="dispStatus" column="disp_status"/> |
| | | <result property="countCase" column="count_case"/> |
| | | <result property="level" column="level"/> |
| | | <result property="parentId" column="parent_id"/> |
| | | <result property="userId" column="user_id"/> |
| | | <result property="accType" column="acc_type"/> |
| | | <result property="acc" column="acc"/> |
| | | <result property="cipher" column="cipher"/> |
| | | <result property="cipherOpen" column="cipher_open"/> |
| | | <result property="cipherTime" column="cipher_time"/> |
| | | <result property="loginTime" column="login_time"/> |
| | | <result property="limitTime" column="limit_time"/> |
| | | <result property="deleteStatus" column="delete_status"/> |
| | | <result property="custId" column="cust_id"/> |
| | | <result property="custProv" column="cust_prov"/> |
| | | <result property="custCity" column="cust_city"/> |
| | | <result property="custArea" column="cust_area"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| New file |
| | |
| | | package cn.huge.module.sync.domain.source; |
| | | |
| | | 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: chenx |
| | | * @time: 2022-02-22 15:24:51 |
| | | * @version 1.0.0 |
| | | */ |
| | | @TableName(value = "dyh_ct_account") |
| | | @Data |
| | | public class SourceCtAccount { |
| | | |
| | | /** |
| | | * 账号编号 |
| | | */ |
| | | @TableId(value = "id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 用户编号 |
| | | */ |
| | | @TableField(value = "user_id") |
| | | private String userId; |
| | | |
| | | /** |
| | | * 帐号类型,22_00027-1:pc帐号(默认),22_00027-2:微信小程序,22_00027-3:政数局统一平台 |
| | | */ |
| | | @TableField(value = "acc_type") |
| | | private String accType; |
| | | |
| | | /** |
| | | * 身份唯一标识(存储唯一标识,比如账号、邮箱、手机号、第三方获取的唯一标识等) |
| | | */ |
| | | @TableField(value = "acc") |
| | | private String acc; |
| | | |
| | | /** |
| | | * 授权凭证(比如密码 第三方登录的token等) |
| | | */ |
| | | @TableField(value = "cipher") |
| | | private String cipher; |
| | | |
| | | /** |
| | | * 授权凭证明文 |
| | | */ |
| | | @TableField(value = "cipher_open") |
| | | private String cipherOpen; |
| | | |
| | | /** |
| | | * 密码最新更新时间 |
| | | */ |
| | | @TableField(value = "cipher_time") |
| | | private Date cipherTime; |
| | | |
| | | /** |
| | | * 最新登录时间 |
| | | */ |
| | | @TableField(value = "login_time") |
| | | private Date loginTime; |
| | | |
| | | /** |
| | | * 限制登录时间(密码错误次数超过限制,默认30分钟) |
| | | */ |
| | | @TableField(value = "limit_time") |
| | | private Date limitTime; |
| | | |
| | | /** |
| | | * 删除状态,0:未删除,1:已删除 |
| | | */ |
| | | @TableLogic |
| | | @TableField(value = "delete_status") |
| | | private String deleteStatus; |
| | | |
| | | /** |
| | | * 顾客编号 |
| | | */ |
| | | @TableField(value = "cust_id") |
| | | private String custId; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField(value = "create_time") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @TableField(value = "update_time") |
| | | private Date updateTime; |
| | | |
| | | } |
| | |
| | | private Integer level; |
| | | |
| | | /** |
| | | * 删除状态,1:未删除(默认),99:已删除 |
| | | * 删除状态,0:未删除,1:已删除 |
| | | */ |
| | | @TableLogic |
| | | @TableField(value = "delete_status") |
| New file |
| | |
| | | package cn.huge.module.sync.domain.target; |
| | | |
| | | 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-08-19 20:04:18 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Data |
| | | public class TargetCtAccount { |
| | | |
| | | /** |
| | | * 账号编号 |
| | | */ |
| | | @TableId(value = "id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 用户编号 |
| | | */ |
| | | @TableField(value = "user_id") |
| | | private String userId; |
| | | |
| | | /** |
| | | * 帐号类型,1:平台web端,2:平台小程序 |
| | | */ |
| | | @TableField(value = "acc_type") |
| | | private Integer accType; |
| | | |
| | | /** |
| | | * 身份唯一标识(存储唯一标识,比如账号、邮箱、手机号、第三方获取的唯一标识等) |
| | | */ |
| | | @TableField(value = "acc") |
| | | private String acc; |
| | | |
| | | /** |
| | | * 授权凭证(比如密码 第三方登录的token等) |
| | | */ |
| | | @TableField(value = "cipher") |
| | | private String cipher; |
| | | |
| | | /** |
| | | * 授权凭证明文 |
| | | */ |
| | | @TableField(value = "cipher_open") |
| | | private String cipherOpen; |
| | | |
| | | /** |
| | | * 密码最新更新时间 |
| | | */ |
| | | @TableField(value = "cipher_time") |
| | | private Date cipherTime; |
| | | |
| | | /** |
| | | * 最新登录时间 |
| | | */ |
| | | @TableField(value = "login_time") |
| | | private Date loginTime; |
| | | |
| | | /** |
| | | * 限制登录时间(密码错误次数超过限制,默认30分钟) |
| | | */ |
| | | @TableField(value = "limit_time") |
| | | private Date limitTime; |
| | | |
| | | /** |
| | | * 删除状态,0:未删除,1:已删除 |
| | | */ |
| | | @TableLogic |
| | | @TableField(value = "delete_status") |
| | | private Integer deleteStatus; |
| | | |
| | | /** |
| | | * 顾客编号 |
| | | */ |
| | | @TableField(value = "cust_id") |
| | | private String custId; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField(value = "create_time") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @TableField(value = "update_time") |
| | | private Date updateTime; |
| | | |
| | | } |
| | |
| | | private Integer dispStatus; |
| | | |
| | | /** |
| | | * 删除状态,0:已删除,1:未删除 |
| | | * 删除状态,0:未删除,1:已删除 |
| | | */ |
| | | @TableLogic |
| | | @TableField(value = "delete_status") |
| | |
| | | |
| | | import cn.huge.module.client.api.impl.CustClientImpl; |
| | | import cn.huge.module.sync.dao.mapper.SyncMapper; |
| | | import cn.huge.module.sync.domain.source.SourceCtAccount; |
| | | import cn.huge.module.sync.domain.source.SourceCtUnit; |
| | | import cn.huge.module.sync.domain.target.TargetCtAccount; |
| | | import cn.huge.module.sync.domain.target.TargetCtUnit; |
| | | import org.apache.commons.beanutils.BeanUtils; |
| | | import org.apache.commons.beanutils.ConvertUtils; |
| | |
| | | @Autowired |
| | | private CustClientImpl custClient; |
| | | |
| | | private static final String MYSQL_TABLE = "dyh_ct_unit"; |
| | | private static final String MYSQL_TABLE = "dyh_ct_account"; |
| | | |
| | | public void syncData() { |
| | | try { |
| | | List<SourceCtUnit> sourceCtUnitList = new ArrayList<>(); |
| | | List<TargetCtUnit> targetCtUnitList = new ArrayList<>(); |
| | | List<SourceCtAccount> sourceTableList = new ArrayList<>(); |
| | | |
| | | // 查询MySQL表结构 |
| | | Sort sort = Sort.by(Sort.Direction.ASC, "create_time"); |
| | | int page = 1; |
| | | int size = 1000; |
| | | PageRequest pageRequest = PageRequest.of(page-1, size, sort); |
| | | sourceCtUnitList = syncMapper.pageInfo(MYSQL_TABLE, pageRequest); |
| | | |
| | | //查询mysql总量 |
| | | int total = syncMapper.countData(MYSQL_TABLE); |
| | |
| | | maxPage += 1; |
| | | } |
| | | |
| | | for (int i = 1; i >= maxPage; i++) { |
| | | for(SourceCtUnit sourceCtUnit: sourceCtUnitList){ |
| | | TargetCtUnit targetCtUnit = new TargetCtUnit(); |
| | | for (int i = 1; i <= maxPage; i++) { |
| | | // 查询MySQL表结构 |
| | | Sort sort = Sort.by(Sort.Direction.ASC, "create_time"); |
| | | PageRequest pageRequest = PageRequest.of(page-1, size, sort); |
| | | sourceTableList = syncMapper.pageInfo(MYSQL_TABLE, pageRequest); |
| | | page++; |
| | | |
| | | List<TargetCtAccount> targetTableList = new ArrayList<>(); |
| | | for(SourceCtAccount sourceTable: sourceTableList){ |
| | | TargetCtAccount tagetTable = new TargetCtAccount(); |
| | | ConvertUtils.register(new DateConverter(null), java.util.Date.class); |
| | | BeanUtils.copyProperties(targetCtUnit, sourceCtUnit); |
| | | BeanUtils.copyProperties(tagetTable, sourceTable); |
| | | // for(Field field: sourceCtUnit.getClass().getDeclaredFields()){ |
| | | // convertType(field.get(sourceCtUnit), field.getName(), targetCtUnit); |
| | | // } |
| | | targetCtUnitList.add(targetCtUnit); |
| | | //字段名不一致,手动set |
| | | tagetTable.setCipher(sourceTable.getCipher()); |
| | | tagetTable.setAccType(1); |
| | | targetTableList.add(tagetTable); |
| | | } |
| | | if(CollectionUtils.isNotEmpty(targetCtUnitList)){ |
| | | custClient.saveCtUnitList(targetCtUnitList); |
| | | if(CollectionUtils.isNotEmpty(targetTableList)){ |
| | | custClient.saveTableList1(targetTableList); |
| | | } |
| | | } |
| | | } catch (Exception e) { |