Merge remote-tracking branch 'origin/master'
38 files added
43 files modified
| New file |
| | |
| | | package cn.huge.module.sys.constant; |
| | | |
| | | public enum SyTimeEnum { |
| | | SY_TIME_00("", "未分类"), |
| | | SY_TIME_01("24_00011-1", "受理时限"), |
| | | SY_TIME_02("24_00011-2", "办理时限"), |
| | | SY_TIME_03("24_00011-3", "督办回复时限"), |
| | | SY_TIME_04("24_00011-4", "评价时限"); |
| | | |
| | | /** |
| | | * 代码编号 |
| | | */ |
| | | 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 des) { |
| | | this.des = des; |
| | | } |
| | | |
| | | SyTimeEnum(String index, String des) { |
| | | this.index = index; |
| | | this.des = des; |
| | | } |
| | | |
| | | /** |
| | | * 静态方法 |
| | | * @param index |
| | | * @return |
| | | */ |
| | | public static String getDes(String index) { |
| | | for (SyTimeEnum syTimeEnum : SyTimeEnum.values()) { |
| | | if (syTimeEnum.getIndex().equals(index)) { |
| | | return syTimeEnum.des; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | * 静态方法 |
| | | * @param ownerType |
| | | * @return |
| | | */ |
| | | public static String getCat(String ownerType) { |
| | | switch (ownerType) { |
| | | case "22_00018-101": |
| | | return SY_TIME_01.getIndex(); |
| | | case "22_00018-102": |
| | | return SY_TIME_02.getIndex(); |
| | | case "22_00018-103": |
| | | return SY_TIME_03.getIndex(); |
| | | case "22_00018-104": |
| | | return SY_TIME_04.getIndex(); |
| | | default: |
| | | return SY_TIME_00.getIndex(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 静态方法 |
| | | * @param index |
| | | * @return |
| | | */ |
| | | public static SyTimeEnum getByIndex(final String index) { |
| | | switch (index) { |
| | | case "24_00011-1": |
| | | return SY_TIME_01; |
| | | case "24_00011-2": |
| | | return SY_TIME_02; |
| | | case "24_00011-3": |
| | | return SY_TIME_03; |
| | | case "24_00011-4": |
| | | return SY_TIME_04; |
| | | default: |
| | | return SY_TIME_00; |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.huge.module.sys.dto; |
| | | |
| | | |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: 查询附件条件对象 |
| | | * @description: 查询附件条件对象 |
| | | * @company:hugeinfo |
| | | * @author: liyj |
| | | * @time: 2022-03-22 11:41:14 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Data |
| | | public class FileTypeTermsDTO { |
| | | |
| | | /** |
| | | * 附件业务编号 |
| | | */ |
| | | private String ownerId; |
| | | |
| | | /** |
| | | * 附件业务编号集合 |
| | | */ |
| | | private List<String> ownerIdList; |
| | | |
| | | /** |
| | | * 附件业务大类编号 |
| | | */ |
| | | private String ownerCat; |
| | | |
| | | /** |
| | | * 附件业务大类编号集合 |
| | | */ |
| | | private List<String> ownerCatList; |
| | | |
| | | /** |
| | | * 附件业务类型编号 |
| | | */ |
| | | private String ownerType; |
| | | |
| | | /** |
| | | * 附件业务类型编号集合 |
| | | */ |
| | | private List<String> ownerTypeList; |
| | | } |
| | |
| | | |
| | | /** |
| | | * 新增部门或更新部门 |
| | | * @url {ctx}/api/v1/ctDept/saveCtDept |
| | | * @url {ctx}/api/web/ctDept/saveCtDept |
| | | * @param ctDept 实体对象 |
| | | * @return Object |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 根据主键编号删除部门 |
| | | * @url {ctx}/api/v1/ctDept/removeByIds |
| | | * @url {ctx}/api/web/ctDept/removeByIds |
| | | * @param ids 主键编号 |
| | | * @return Object |
| | | * @throws Exception |
| | |
| | | |
| | | /** |
| | | * 根据单位编号查询所有岗位 |
| | | * @url {ctx}/api/v1/ctPost/getByUnitId |
| | | * @url {ctx}/api/web/ctPost/getByUnitId |
| | | * @param userId 登录用户编号 |
| | | * @return Object |
| | | * @throws Exception |
| | |
| | | |
| | | /** |
| | | * 获取所有组织(包含所有下级子组织)树形结构 |
| | | * @url {ctx}/api/v1/ctUnit/listUnitTree |
| | | * @url {ctx}/api/web/ctUnit/listUnitTree |
| | | * @param userId 登录用户标识称 |
| | | * @return Object |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 获取组织详情(包含组织下的部门详情) |
| | | * @url {ctx}/api/v1/ctUnit/getUnitAndDept?id= |
| | | * @url {ctx}/api/web/ctUnit/getUnitAndDept?id= |
| | | * @param id 组织编号 |
| | | * @return Object |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 根据主键编号删除单位 |
| | | * @url {ctx}/api/v1/ctUnit/removeByIds |
| | | * @url {ctx}/api/web/ctUnit/removeByIds |
| | | * @param ids 主键编号 |
| | | * @return Object |
| | | * @throws Exception |
| | |
| | | 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.CtUserInfoDTO; |
| | | import cn.huge.module.ctuser.dto.CtUserSaveDTO; |
| | | import cn.huge.module.ctuser.service.*; |
| | | import cn.huge.module.cust.constant.RoleBaseEnum; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Page; |
| | | import org.springframework.data.domain.PageRequest; |
| | |
| | | |
| | | /** |
| | | * web端-人员信息管理-新增/新用户信息 |
| | | * @url {ctx}/api/v1/ctUser/saveCtUser |
| | | * @url {ctx}/api/web/ctUser/saveCtUser |
| | | * @param userId |
| | | * @return Object |
| | | * @throws Exception |
| | |
| | | |
| | | /** |
| | | * 获取人员信息列表查询条件 |
| | | * @url {ctx}/api/v1/ctUser/listSelectTerm |
| | | * @url {ctx}/api/web/ctUser/listSelectTerm |
| | | * @return userId 登录用户标识称 |
| | | * @return Object |
| | | * @throws Exception |
| | |
| | | |
| | | /** |
| | | * web端-人员信息管理-人员列表 |
| | | * @url {ctx}/api/v1/ctUser/pageQuery |
| | | * @url {ctx}/api/web/ctUser/pageQuery |
| | | * @param page 页码 |
| | | * @param size 每页数量 |
| | | * @return Object |
| | |
| | | |
| | | /** |
| | | * 根据主键单个/批量删除 |
| | | * @url {ctx}/api/v1/ctUser/removeByIds |
| | | * @url {ctx}/api/web/ctUser/removeByIds |
| | | * @return Object |
| | | * @throws Exception |
| | | */ |
| | |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 选择人员 |
| | | * @url {ctx}/api/web/ctUser/userChoose |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/userChoose") |
| | | public Object userChoose(@CurrentUser String userId) { |
| | | try { |
| | | String roleCode = request.getParameter("roleCode"); |
| | | List<SelectTermDTO> unitSelectTerms = service.userChoose(userId, roleCode); |
| | | return ReturnSucUtils.getRepInfo(unitSelectTerms); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 共通组件-根据人员编号查询单个人员信息及角色信息 |
| | | * @url {ctx}/api/web/ctUser/getByIdRole |
| | | * @param id 主键编号 |
| | | * @return Object |
| | | * @throws Exception |
| | | */ |
| | | @GetMapping("/getByIdRole") |
| | | public Object getByIdRole(@RequestParam(value = "id") String id) { |
| | | try { |
| | | CtUserInfoDTO ctUserInfoDTO = new CtUserInfoDTO(); |
| | | CtUser ctUser = service.getById(id); |
| | | if (ObjectUtils.isNotEmpty(ctUser)) { |
| | | BeanUtils.copyProperties(ctUser, ctUserInfoDTO); |
| | | CtAccount ctAccount = ctAccountService.getByUserIdAndType(id, UserBaseConsts.ACC_TYPE_1); |
| | | ctUserInfoDTO.setLoginTime(ctAccount.getLoginTime()); |
| | | ctUserInfoDTO.setAcc(ctAccount.getAcc()); |
| | | List<String> roleNameList = ctUseroleService.listRoleName(id); |
| | | if (CollectionUtils.isNotEmpty(roleNameList)) { |
| | | String userRoles = roleNameList.stream().map(String::valueOf).collect(Collectors.joining("、")); |
| | | ctUserInfoDTO.setUserRoles(userRoles); |
| | | } |
| | | } |
| | | return ReturnSucUtils.getRepInfo(ctUserInfoDTO); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<CtUser> pageQueryCtUser(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据部门和角色查询 |
| | | * @param deptIdList 部门编号 |
| | | * @param roleCode 角色代码 |
| | | * @return List<SelectTermDTO> |
| | | */ |
| | | List<CtUser> listUserByDeptRoleList(@Param("deptIdList") List<String> deptIdList, @Param("roleCode") String roleCode); |
| | | |
| | | } |
| | |
| | | */ |
| | | List<String> listRoleCode(@Param("userId") String userId); |
| | | |
| | | /** |
| | | * 根据用户编号获取其角色名称 |
| | | * @param userId 用户编号 |
| | | * @return List<String> |
| | | */ |
| | | List<String> listRoleName(@Param("userId") String userId); |
| | | |
| | | } |
| | |
| | | </if> |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | |
| | | <!-- 根据部门和角色查询 --> |
| | | <select id="listUserByDeptRoleList" resultMap="dataResult"> |
| | | SELECT t1.id, t1.true_name, t1.dept_id |
| | | FROM dyh_ct_user t1 LEFT JOIN dyh_ct_userole t2 ON t1.id = t2.user_id |
| | | WHERE |
| | | t1.delete_status = '0' |
| | | AND t2.role_code = #{roleCode} |
| | | AND t1.status = '1' |
| | | <if test="deptIdList != null and deptIdList != ''"> |
| | | and t1.dept_id in |
| | | <foreach collection="deptIdList" item="deptIdList" index="index" open="(" separator="," close=")"> |
| | | #{deptIdList} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | user_id = #{userId} |
| | | </select> |
| | | |
| | | <select id="listRoleName" resultType="String"> |
| | | select |
| | | role_name |
| | | FROM |
| | | <include refid="table-name" /> |
| | | WHERE |
| | | user_id = #{userId} |
| | | </select> |
| | | </mapper> |
| New file |
| | |
| | | package cn.huge.module.ctuser.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @title: 客户用户信息数据传输对象 |
| | | * @description: 客户用户信息数据传输对象 |
| | | * @company:hugeinfo |
| | | * @author: chenx |
| | | * @time: 2022-02-22 14:19:43 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Data |
| | | public class CtUserInfoDTO { |
| | | |
| | | /** |
| | | * 姓名 |
| | | */ |
| | | private String trueName; |
| | | |
| | | /** |
| | | * 账号 |
| | | */ |
| | | private String acc; |
| | | |
| | | /** |
| | | * 组织名称 |
| | | */ |
| | | private String unitName; |
| | | |
| | | /** |
| | | * 部门名称 |
| | | */ |
| | | private String deptName; |
| | | |
| | | /** |
| | | * 人员角色信息 |
| | | */ |
| | | private String userRoles; |
| | | |
| | | /** |
| | | * 最后一次登录时间 |
| | | */ |
| | | private Date loginTime; |
| | | |
| | | /** |
| | | * 手机号码 |
| | | */ |
| | | private String mobile; |
| | | } |
| | |
| | | ctDeptService.updateCtDept(ctDept); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据部门和角色查询 |
| | | * @param deptIdList 部门编号 |
| | | * @param roleCode 角色代码 |
| | | * @return List<SelectTermDTO> |
| | | */ |
| | | public List<CtUser> listUserByDeptRoleList(List<String> deptIdList, String roleCode){ |
| | | return mapper.listUserByDeptRoleList(deptIdList, roleCode); |
| | | } |
| | | |
| | | /** |
| | | * 按条件分页查询 |
| | | * |
| | | * @param userId 分页对象 |
| | | * @param roleCode 条件 |
| | | * @return Page |
| | | */ |
| | | public List<SelectTermDTO> userChoose(String userId, String roleCode) { |
| | | // 获取当前登录用户 |
| | | CtUserDTO loginUser = clientGetUserAll(userId); |
| | | // 组织条件 |
| | | QueryWrapper<CtUnit> ctUnitQueryWrapper = new QueryWrapper<>(); |
| | | if (RoleBaseEnum.checkAdminPower(loginUser)){ |
| | | ctUnitQueryWrapper.eq("cust_id", loginUser.getCustId()).select("id", "unit_name", "parent_id"); |
| | | }else { |
| | | ctUnitQueryWrapper.eq("id", loginUser.getUnitId()).select("id", "unit_name", "parent_id"); |
| | | } |
| | | List<CtUnit> ctUnitList = ctUnitService.list(ctUnitQueryWrapper); |
| | | List<SelectTermDTO> unitSelectTerms = new ArrayList<>(); |
| | | |
| | | List<String> unitIdList= ctUnitList.stream().map(CtUnit::getId).collect(Collectors.toList()); |
| | | // 部门条件 |
| | | QueryWrapper<CtDept> ctDeptQueryWrapper = new QueryWrapper<>(); |
| | | ctDeptQueryWrapper.in("unit_id", unitIdList).select("id", "unit_id", "name", "parent_id"); |
| | | List<CtDept> ctDeptList = ctDeptService.list(ctDeptQueryWrapper); |
| | | List<String> deptIdList = ctDeptList.stream().map(CtDept::getId).collect(Collectors.toList()); |
| | | |
| | | // 人员条件 |
| | | List<CtUser> ctUsers = null; |
| | | if (StringUtils.isNotEmpty(roleCode)){ |
| | | ctUsers = listUserByDeptRoleList(deptIdList, roleCode); |
| | | }else { |
| | | QueryWrapper<CtUser> ctUserQueryWrapper = new QueryWrapper<>(); |
| | | ctUserQueryWrapper.in("dept_id", deptIdList).select("id", "true_name", "dept_id"); |
| | | ctUsers = this.list(ctUserQueryWrapper); |
| | | } |
| | | List<String> userIdList = ctUsers.stream().map(CtUser::getId).collect(Collectors.toList()); |
| | | QueryWrapper<CtUserole> ctUserQueryWrapper = new QueryWrapper<>(); |
| | | ctUserQueryWrapper.in("user_id", userIdList).select("user_id", "role_name"); |
| | | List<CtUserole> roleList = ctUseroleService.list(ctUserQueryWrapper); |
| | | |
| | | for(CtUnit ctUnit: ctUnitList){ |
| | | SelectTermDTO unitSelectTerm = new SelectTermDTO(); |
| | | unitSelectTerm.setValue(ctUnit.getId()); |
| | | unitSelectTerm.setLabel(ctUnit.getUnitName()); |
| | | unitSelectTerm.setParentId(ctUnit.getParentId()); |
| | | unitSelectTerm.setCheckable(false); |
| | | List<SelectTermDTO> deptSelectTerms = new ArrayList<>(); |
| | | for(CtDept ctDept : ctDeptList){ |
| | | if(ctUnit.getId().equals(ctDept.getUnitId())){ |
| | | SelectTermDTO deptSelectTerm = new SelectTermDTO(); |
| | | deptSelectTerm.setValue(ctDept.getId()); |
| | | deptSelectTerm.setLabel(ctDept.getName()); |
| | | deptSelectTerm.setParentId(ctDept.getParentId()); |
| | | deptSelectTerm.setCheckable(false); |
| | | |
| | | if (CollectionUtils.isNotEmpty(ctUsers)) { |
| | | List<SelectTermDTO> userSelectTerms = new ArrayList<>(); |
| | | |
| | | for(CtUser ctUser : ctUsers){ |
| | | if(ctUser.getDeptId().equals(ctDept.getId())){ |
| | | List<CtUserole> ctUseroleList = new ArrayList<>(); |
| | | for(CtUserole ctUserole: roleList){ |
| | | if(ctUser.getId().equals(ctUserole.getUserId())){ |
| | | ctUseroleList.add(ctUserole); |
| | | } |
| | | } |
| | | SelectTermDTO userSelectTerm = new SelectTermDTO(); |
| | | userSelectTerm.setValue(ctUser.getId()); |
| | | userSelectTerm.setCheckable(true); |
| | | String roleName = ctUseroleList.stream().map(CtUserole::getRoleName).collect(Collectors.joining(",")); |
| | | userSelectTerm.setLabel(ctUser.getTrueName()+"("+roleName+")"); |
| | | userSelectTerms.add(userSelectTerm); |
| | | } |
| | | } |
| | | List<SelectTermDTO> users = SelectTermUtils.createTreeByRoot(userSelectTerms); |
| | | deptSelectTerm.setChildren(users); |
| | | } |
| | | deptSelectTerms.add(deptSelectTerm); |
| | | } |
| | | List<SelectTermDTO> depts = SelectTermUtils.createTreeByRoot(deptSelectTerms); |
| | | unitSelectTerm.setChildren(depts); |
| | | } |
| | | unitSelectTerms.add(unitSelectTerm); |
| | | } |
| | | return SelectTermUtils.createTreeByFirst(unitSelectTerms, loginUser.getUnitId()); |
| | | } |
| | | } |
| | |
| | | throw new ServiceException("CtUseroleService.deleteByUserId", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据用户编号获取其角色名称 |
| | | * @param userId 用户编号 |
| | | * @return List<String> |
| | | */ |
| | | public List<String> listRoleName(String userId){ |
| | | return mapper.listRoleName(userId); |
| | | } |
| | | } |
| | |
| | | |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.module.mediate.dto.WechatBindCaseDTO; |
| | | import cn.huge.base.config.CurrentUser; |
| | | import cn.huge.module.pauser.domain.po.PaUser; |
| | | import cn.huge.module.pauser.service.PaUserService; |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * pc端提交案件后-获取相关当事人用户编号 |
| | | * @url {ctx}/api/weChat/paUser/bindGetUserId |
| | | * @param wechatBindCaseDTO 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/bindGetUserId") |
| | | public Object bindGetUserId(@RequestBody WechatBindCaseDTO wechatBindCaseDTO) { |
| | | try { |
| | | return ReturnSucUtils.getRepInfo(service.bindGetUserId(wechatBindCaseDTO)); |
| | | } catch (Exception e) { |
| | | log.error("Controller接口[WeChatPaUserController.bindGetUserId]请求异常:"+e, e); |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | } |
| | |
| | | import cn.huge.base.common.utils.IdUtils; |
| | | import cn.huge.base.common.utils.ObjectUtils; |
| | | import cn.huge.module.client.api.impl.UtilsClientImpl; |
| | | import cn.huge.module.mediate.dto.WechatBindCaseDTO; |
| | | import cn.huge.module.cust.constant.UserBaseConsts; |
| | | import cn.huge.module.mediate.dto.WechatBindCaseDTO; |
| | | import cn.huge.module.pauser.dao.mapper.PaAccountMapper; |
| | | import cn.huge.module.pauser.dao.mapper.PaUserMapper; |
| | | import cn.huge.module.pauser.domain.po.PaAccount; |
| | | import cn.huge.module.pauser.domain.po.PaUser; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import cn.huge.module.pauser.dto.WeChatPersonalDTO; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | } |
| | | |
| | | /** |
| | | * pc端提交案件后-获取相关当事人用户编号 |
| | | * @param wechatBindCaseDTO 用户信息 |
| | | * @return String |
| | | */ |
| | | public String bindGetUserId(WechatBindCaseDTO wechatBindCaseDTO){ |
| | | try{ |
| | | QueryWrapper<PaUser> paUserQueryWrapper = new QueryWrapper<>(); |
| | | paUserQueryWrapper.eq("true_name", wechatBindCaseDTO.getTrueName()). |
| | | eq("idcard", wechatBindCaseDTO.getIdcard()).eq("cust_id", wechatBindCaseDTO.getCustId()); |
| | | PaUser paUser = this.getOne(paUserQueryWrapper); |
| | | return paUser.getId(); |
| | | }catch (Exception e){ |
| | | log.error("service方法[PaUserService.bindGetUserId]调用异常:"+e, e); |
| | | throw new ServiceException("PaUserService.bindGetUserId", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 当事人小程序-个人中心 |
| | | * @param userId 用户编号 |
| | | * @return WeChatPersonalDTO |
| | |
| | | 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)){ |
| 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.CaseEvaluate; |
| | | import cn.huge.module.cases.service.CaseEvaluateService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.google.common.collect.Maps; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | 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-09-04 20:21:05 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/web/caseEvaluate") |
| | | public class CaseEvaluateWebController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private CaseEvaluateService 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 evaluateGrade = request.getParameter("evaluateGrade"); |
| | | if (StringUtils.isNotBlank(evaluateGrade)){ |
| | | terms.put("evaluateGrade", evaluateGrade); |
| | | } |
| | | // 选择评语,多个用,隔开 |
| | | String evaluateRemark = request.getParameter("evaluateRemark"); |
| | | if (StringUtils.isNotBlank(evaluateRemark)){ |
| | | terms.put("evaluateRemark", evaluateRemark); |
| | | } |
| | | // 评价建议 |
| | | String evaluateContent = request.getParameter("evaluateContent"); |
| | | if (StringUtils.isNotBlank(evaluateContent)){ |
| | | terms.put("evaluateContent", evaluateContent); |
| | | } |
| | | // 评价人编号 |
| | | String evaluateUserId = request.getParameter("evaluateUserId"); |
| | | if (StringUtils.isNotBlank(evaluateUserId)){ |
| | | terms.put("evaluateUserId", evaluateUserId); |
| | | } |
| | | // 评价人名称 |
| | | String evaluateUserName = request.getParameter("evaluateUserName"); |
| | | if (StringUtils.isNotBlank(evaluateUserName)){ |
| | | terms.put("evaluateUserName", evaluateUserName); |
| | | } |
| | | // 删除状态,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/caseEvaluate/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/caseEvaluate/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<CaseEvaluate> caseEvaluatePage = service.pageQuery(pageRequest, terms); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", caseEvaluatePage); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/web/caseEvaluate/getByCaseId |
| | | * @param caseId 事项ID |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/getByCaseId") |
| | | public Object getByCaseId(@RequestParam(value = "caseId") String caseId) { |
| | | try { |
| | | QueryWrapper<CaseEvaluate> caseEvaluateQueryWrapper = new QueryWrapper<>(); |
| | | caseEvaluateQueryWrapper.eq("case_id", caseId).eq("delete_status", 0); |
| | | return ReturnSucUtils.getRepInfo(service.getOne(caseEvaluateQueryWrapper)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据主键单个 |
| | | * @url {ctx}/api/web/caseEvaluate/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/caseEvaluate/saveCaseEvaluate |
| | | * @param caseEvaluate 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveCaseEvaluate") |
| | | public Object saveCaseEvaluate(@RequestBody CaseEvaluate caseEvaluate) { |
| | | try { |
| | | service.saveCaseEvaluate(caseEvaluate); |
| | | 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.CaseFeedbackHis; |
| | | import cn.huge.module.cases.service.CaseFeedbackHisService; |
| | | 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-31 17:42:41 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/web/caseFeedbackHis") |
| | | public class CaseFeedbackHisWebController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private CaseFeedbackHisService 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 feedbackId = request.getParameter("feedbackId"); |
| | | if (StringUtils.isNotBlank(feedbackId)){ |
| | | terms.put("feedbackId", feedbackId); |
| | | } |
| | | // 纠纷编号 |
| | | String caseId = request.getParameter("caseId"); |
| | | if (StringUtils.isNotBlank(caseId)){ |
| | | terms.put("caseId", caseId); |
| | | } |
| | | // 办理反馈纠纷任务编号 |
| | | String caseTaskId = request.getParameter("caseTaskId"); |
| | | if (StringUtils.isNotBlank(caseTaskId)){ |
| | | terms.put("caseTaskId", caseTaskId); |
| | | } |
| | | // 经办类型,1:承办组织,2:配合组织 |
| | | String handleType = request.getParameter("handleType"); |
| | | if (StringUtils.isNotBlank(handleType)){ |
| | | terms.put("handleType", handleType); |
| | | } |
| | | // 经办组织编号 |
| | | String handleUnitId = request.getParameter("handleUnitId"); |
| | | if (StringUtils.isNotBlank(handleUnitId)){ |
| | | terms.put("handleUnitId", handleUnitId); |
| | | } |
| | | // 经办组织名称 |
| | | String handleUnitName = request.getParameter("handleUnitName"); |
| | | if (StringUtils.isNotBlank(handleUnitName)){ |
| | | terms.put("handleUnitName", handleUnitName); |
| | | } |
| | | // 操作人编号 |
| | | String handleUserId = request.getParameter("handleUserId"); |
| | | if (StringUtils.isNotBlank(handleUserId)){ |
| | | terms.put("handleUserId", handleUserId); |
| | | } |
| | | // 经办人名称 |
| | | String handleUserName = request.getParameter("handleUserName"); |
| | | if (StringUtils.isNotBlank(handleUserName)){ |
| | | terms.put("handleUserName", handleUserName); |
| | | } |
| | | // 办理意见 |
| | | String handleContent = request.getParameter("handleContent"); |
| | | if (StringUtils.isNotBlank(handleContent)){ |
| | | terms.put("handleContent", handleContent); |
| | | } |
| | | // 顾客编号 |
| | | 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/caseFeedbackHis/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/caseFeedbackHis/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<CaseFeedbackHis> caseFeedbackHisPage = service.pageQuery(pageRequest, terms); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", caseFeedbackHisPage); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/web/caseFeedbackHis/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/caseFeedbackHis/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/caseFeedbackHis/saveCaseFeedbackHis |
| | | * @param caseFeedbackHis 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveCaseFeedbackHis") |
| | | public Object saveCaseFeedbackHis(@RequestBody CaseFeedbackHis caseFeedbackHis) { |
| | | try { |
| | | service.saveCaseFeedbackHis(caseFeedbackHis); |
| | | 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.base.config.CurrentUser; |
| | | import cn.huge.module.cases.domain.po.CaseFeedback; |
| | | import cn.huge.module.cases.service.CaseFeedbackService; |
| | | 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; |
| | | |
| | | /** |
| | | * @title: 纠纷办理反馈j信息表接口api-web端 |
| | | * @description: 纠纷办理反馈j信息表接口api-web端 |
| | | * @company: hugeinfo |
| | | * @author: wangwh |
| | | * @time: 2024-08-30 17:35:02 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/web/caseFeedback") |
| | | public class CaseFeedbackWebController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private CaseFeedbackService 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 caseTaskId = request.getParameter("caseTaskId"); |
| | | if (StringUtils.isNotBlank(caseTaskId)){ |
| | | terms.put("caseTaskId", caseTaskId); |
| | | } |
| | | // 经办类型,1:承办组织,2:配合组织 |
| | | String handleType = request.getParameter("handleType"); |
| | | if (StringUtils.isNotBlank(handleType)){ |
| | | terms.put("handleType", handleType); |
| | | } |
| | | // 经办组织编号 |
| | | String handleUnitId = request.getParameter("handleUnitId"); |
| | | if (StringUtils.isNotBlank(handleUnitId)){ |
| | | terms.put("handleUnitId", handleUnitId); |
| | | } |
| | | // 经办组织名称 |
| | | String handleUnitName = request.getParameter("handleUnitName"); |
| | | if (StringUtils.isNotBlank(handleUnitName)){ |
| | | terms.put("handleUnitName", handleUnitName); |
| | | } |
| | | // 操作人编号 |
| | | String handleUserId = request.getParameter("handleUserId"); |
| | | if (StringUtils.isNotBlank(handleUserId)){ |
| | | terms.put("handleUserId", handleUserId); |
| | | } |
| | | // 经办人名称 |
| | | String handleUserName = request.getParameter("handleUserName"); |
| | | if (StringUtils.isNotBlank(handleUserName)){ |
| | | terms.put("handleUserName", handleUserName); |
| | | } |
| | | // 办理意见 |
| | | String handleContent = request.getParameter("handleContent"); |
| | | if (StringUtils.isNotBlank(handleContent)){ |
| | | terms.put("handleContent", handleContent); |
| | | } |
| | | // 删除状态,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/CaseFeedback/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/CaseFeedback/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<CaseFeedback> caseFeedbackPage = service.pageQuery(pageRequest, terms); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", caseFeedbackPage); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/web/CaseFeedback/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/CaseFeedback/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/CaseFeedback/listFeedback |
| | | * @param id 实体对象 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/listFeedback") |
| | | public Object listFeedback(@RequestParam(value = "id") String id) { |
| | | try { |
| | | return ReturnSucUtils.getRepInfo(service.listFeedback(id)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 添加办理反馈 |
| | | * @url {ctx}/api/web/CaseFeedback/saveFeedback |
| | | * @param caseFeedback 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveFeedback") |
| | | public Object saveFeedback(@RequestBody CaseFeedback caseFeedback, @CurrentUser String userId) { |
| | | try { |
| | | service.saveFeedback(caseFeedback, userId); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 添加办理反馈 |
| | | * @url {ctx}/api/web/CaseFeedback/updateFeedback |
| | | * @param caseFeedback 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/updateFeedback") |
| | | public Object updateFeedback(@RequestBody CaseFeedback caseFeedback, @CurrentUser String userId) { |
| | | try { |
| | | service.updateFeedback(caseFeedback, userId); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.base.config.CurrentUser; |
| | | import cn.huge.module.cases.domain.po.CaseInfoUnfold; |
| | | import cn.huge.module.cases.service.CaseInfoUnfoldService; |
| | | import com.google.common.collect.Maps; |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * PC端-选择经办人 |
| | | * @url {ctx}/api/web/caseInfoUnfold/choosePrincipal? |
| | | * @param caseId 纠纷编号 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/choosePrincipal") |
| | | public Object choosePrincipal(@RequestParam(value = "caseId") String caseId, @RequestParam(value = "userId") String userId) { |
| | | try { |
| | | service.choosePrincipal(caseId, userId); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | |
| | | if (StringUtils.isNotBlank(processName)){ |
| | | terms.put("processName", processName); |
| | | } |
| | | // 意向调解组织编号 |
| | | String wantUnitId = request.getParameter("wantUnitId"); |
| | | if (StringUtils.isNotBlank(wantUnitId)){ |
| | | terms.put("wantUnitId", wantUnitId); |
| | | } |
| | | // 意向调解组织名称 |
| | | String wantUnitName = request.getParameter("wantUnitName"); |
| | | if (StringUtils.isNotBlank(wantUnitName)){ |
| | | terms.put("wantUnitName", wantUnitName); |
| | | } |
| | | // 意向调解员编号 |
| | | String wantUserId = request.getParameter("wantUserId"); |
| | | if (StringUtils.isNotBlank(wantUserId)){ |
| | | terms.put("wantUserId", wantUserId); |
| | | } |
| | | // 意向调解员名称 |
| | | String wantUserName = request.getParameter("wantUserName"); |
| | | if (StringUtils.isNotBlank(wantUserName)){ |
| | | terms.put("wantUserName", wantUserName); |
| | | } |
| | | // 删除状态,0:未删除,1:已删除 |
| | | String deleteStatus = request.getParameter("deleteStatus"); |
| | | if (StringUtils.isNotBlank(deleteStatus)){ |
| | |
| | | |
| | | /** |
| | | * PC端-纠纷登记-保存纠纷信息-正常案件 |
| | | * @url {ctx}/api/v1/caseInfo/caseRegister |
| | | * @url {ctx}/api/web/caseInfo/caseRegister |
| | | * @param registerSaveDTO 实体对象 |
| | | */ |
| | | @PostMapping("/caseRegister") |
| | |
| | | return ReturnFailUtils.getRepInfo(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * PC端-正式案件-查询纠纷信息 |
| | | * @url {ctx}/api/web/caseInfo/getCaseInfo?id= |
| | | * @param id 纠纷编号 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/getCaseInfo") |
| | | public Object getCaseInfo(@RequestParam(value = "id") String id) { |
| | | try { |
| | | return ReturnSucUtils.getRepInfo(service.getCaseInfo(id)); |
| | | } 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.base.config.CurrentUser; |
| | | import cn.huge.module.cases.domain.po.CaseSupervise; |
| | | import cn.huge.module.cases.service.CaseSuperviseService; |
| | | 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-09-03 10:53:01 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/web/caseSupervise") |
| | | public class CaseSuperviseWebController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private CaseSuperviseService 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 supContent = request.getParameter("supContent"); |
| | | if (StringUtils.isNotBlank(supContent)){ |
| | | terms.put("supContent", supContent); |
| | | } |
| | | // 督办人编号 |
| | | String supUserId = request.getParameter("supUserId"); |
| | | if (StringUtils.isNotBlank(supUserId)){ |
| | | terms.put("supUserId", supUserId); |
| | | } |
| | | // 督办人名称 |
| | | String supUserName = request.getParameter("supUserName"); |
| | | if (StringUtils.isNotBlank(supUserName)){ |
| | | terms.put("supUserName", supUserName); |
| | | } |
| | | // 督办时间 |
| | | String supTime = request.getParameter("supTime"); |
| | | if (StringUtils.isNotBlank(supTime)){ |
| | | terms.put("supTime", supTime); |
| | | } |
| | | // 督办状态,0:未回复,1:已回复 |
| | | String supStatus = request.getParameter("supStatus"); |
| | | if (StringUtils.isNotBlank(supStatus)){ |
| | | terms.put("supStatus", supStatus); |
| | | } |
| | | // 回复期限,单位:小时 |
| | | String replyTerm = request.getParameter("replyTerm"); |
| | | if (StringUtils.isNotBlank(replyTerm)){ |
| | | terms.put("replyTerm", replyTerm); |
| | | } |
| | | // 回复内容 |
| | | String replyContent = request.getParameter("replyContent"); |
| | | if (StringUtils.isNotBlank(replyContent)){ |
| | | terms.put("replyContent", replyContent); |
| | | } |
| | | // 回复人编号 |
| | | String replyUserId = request.getParameter("replyUserId"); |
| | | if (StringUtils.isNotBlank(replyUserId)){ |
| | | terms.put("replyUserId", replyUserId); |
| | | } |
| | | // 回复人名称 |
| | | String replyUserName = request.getParameter("replyUserName"); |
| | | if (StringUtils.isNotBlank(replyUserName)){ |
| | | terms.put("replyUserName", replyUserName); |
| | | } |
| | | // 回复时间 |
| | | String replyTime = request.getParameter("replyTime"); |
| | | if (StringUtils.isNotBlank(replyTime)){ |
| | | terms.put("replyTime", replyTime); |
| | | } |
| | | // 删除状态,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/caseSupervise/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/caseSupervise/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<CaseSupervise> caseSupervisePage = service.pageQuery(pageRequest, terms); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", caseSupervisePage); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/web/caseSupervise/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/caseSupervise/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/caseSupervise/saveCaseSupervise |
| | | * @param caseSupervise 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveCaseSupervise") |
| | | public Object saveCaseSupervise(@RequestBody CaseSupervise caseSupervise) { |
| | | try { |
| | | service.saveCaseSupervise(caseSupervise); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 添加督办 |
| | | * @url {ctx}/api/web/caseSupervise/addCaseSupervise |
| | | * @param caseSupervise 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/addCaseSupervise") |
| | | public Object addCaseSupervise(@CurrentUser String userId, @RequestBody CaseSupervise caseSupervise) { |
| | | try { |
| | | service.addCaseSupervise(caseSupervise, userId); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 添加督办 |
| | | * @url {ctx}/api/web/caseSupervise/replyCaseSupervise |
| | | * @param caseSupervise 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/replyCaseSupervise") |
| | | public Object replyCaseSupervise(@CurrentUser String userId, @RequestBody CaseSupervise caseSupervise) { |
| | | try { |
| | | service.replyCaseSupervise(caseSupervise, userId); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 督办信息查询 |
| | | * @url {ctx}/api/web/caseSupervise/listCaseSupervise |
| | | * @param caseId 主键编号 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/listCaseSupervise") |
| | | public Object listCaseSupervise(@RequestParam(value = "caseId") String caseId) { |
| | | try { |
| | | return ReturnSucUtils.getRepInfo(service.listCaseSupervise(caseId)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.huge.module.cases.dao.mapper; |
| | | |
| | | import cn.huge.module.cases.domain.po.CaseEvaluate; |
| | | 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-09-04 20:21:05 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Repository |
| | | public interface CaseEvaluateMapper extends BaseMapper<CaseEvaluate>{ |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | void updateCaseEvaluate(@Param("entity") CaseEvaluate entity); |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | void updateCaseEvaluateTerms(@Param("entity") CaseEvaluate entity, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | void deleteCaseEvaluate(@Param("id") String id); |
| | | |
| | | /** |
| | | * 按条件查询结果集 |
| | | * @param terms 查询条件集合 |
| | | * @return List<CaseEvaluate> |
| | | */ |
| | | List<CaseEvaluate> 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<CaseEvaluate> |
| | | */ |
| | | List<CaseEvaluate> 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.CaseFeedbackHis; |
| | | 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-31 17:42:41 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Repository |
| | | public interface CaseFeedbackHisMapper extends BaseMapper<CaseFeedbackHis>{ |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | void updateCaseFeedbackHis(@Param("entity") CaseFeedbackHis entity); |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | void updateCaseFeedbackHisTerms(@Param("entity") CaseFeedbackHis entity, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | void deleteCaseFeedbackHis(@Param("id") String id); |
| | | |
| | | /** |
| | | * 按条件查询结果集 |
| | | * @param terms 查询条件集合 |
| | | * @return List<CaseFeedbackHis> |
| | | */ |
| | | List<CaseFeedbackHis> 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<CaseFeedbackHis> |
| | | */ |
| | | List<CaseFeedbackHis> 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.CaseFeedback; |
| | | 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: 纠纷办理反馈j信息表持久层业务处理 |
| | | * @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。 |
| | | * @company: hugeinfo |
| | | * @author: wangwh |
| | | * @time: 2024-08-30 17:35:02 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Repository |
| | | public interface CaseFeedbackMapper extends BaseMapper<CaseFeedback>{ |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | void updatecaseFeedback(@Param("entity") CaseFeedback entity); |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | void updatecaseFeedbackTerms(@Param("entity") CaseFeedback entity, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | void deletecaseFeedback(@Param("id") String id); |
| | | |
| | | /** |
| | | * 按条件查询结果集 |
| | | * @param terms 查询条件集合 |
| | | * @return List<caseFeedback> |
| | | */ |
| | | List<CaseFeedback> 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<caseFeedback> |
| | | */ |
| | | List<CaseFeedback> 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.CaseSupervise; |
| | | 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-09-03 10:53:01 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Repository |
| | | public interface CaseSuperviseMapper extends BaseMapper<CaseSupervise>{ |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | void updateCaseSupervise(@Param("entity") CaseSupervise entity); |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | void updateCaseSuperviseTerms(@Param("entity") CaseSupervise entity, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | void deleteCaseSupervise(@Param("id") String id); |
| | | |
| | | /** |
| | | * 按条件查询结果集 |
| | | * @param terms 查询条件集合 |
| | | * @return List<CaseSupervise> |
| | | */ |
| | | List<CaseSupervise> 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<CaseSupervise> |
| | | */ |
| | | List<CaseSupervise> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | } |
| | |
| | | <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"/> |
| | |
| | | id, |
| | | case_id, |
| | | party_user_id, |
| | | per_type, |
| | | per_type_name, |
| | | per_class, |
| | | per_class_name, |
| | | true_name, |
| | |
| | | <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="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> |
| 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-09-04 20:21:05 |
| | | * @version 1.0.0 |
| | | --> |
| | | <mapper namespace="cn.huge.module.cases.dao.mapper.CaseEvaluateMapper"> |
| | | <!-- 结果集 --> |
| | | <resultMap id="dataResult" type="cn.huge.module.cases.domain.po.CaseEvaluate"> |
| | | <result property="id" column="id"/> |
| | | <result property="caseId" column="case_id"/> |
| | | <result property="evaluateGrade" column="evaluate_grade"/> |
| | | <result property="evaluateRemark" column="evaluate_remark"/> |
| | | <result property="evaluateContent" column="evaluate_content"/> |
| | | <result property="evaluateUserId" column="evaluate_user_id"/> |
| | | <result property="evaluateUserName" column="evaluate_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_evaluate</sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | | id, |
| | | case_id, |
| | | evaluate_grade, |
| | | evaluate_remark, |
| | | evaluate_content, |
| | | evaluate_user_id, |
| | | evaluate_user_name, |
| | | delete_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.evaluateGrade != null">evaluate_grade = #{entity.evaluateGrade},</if> |
| | | <if test="entity.evaluateRemark != null">evaluate_remark = #{entity.evaluateRemark},</if> |
| | | <if test="entity.evaluateContent != null">evaluate_content = #{entity.evaluateContent},</if> |
| | | <if test="entity.evaluateUserId != null">evaluate_user_id = #{entity.evaluateUserId},</if> |
| | | <if test="entity.evaluateUserName != null">evaluate_user_name = #{entity.evaluateUserName},</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.caseId != null and terms.caseId !=''"> |
| | | and case_id = #{terms.caseId} |
| | | </if> |
| | | <if test="terms.evaluateGrade != null and terms.evaluateGrade !=''"> |
| | | and evaluate_grade = #{terms.evaluateGrade} |
| | | </if> |
| | | <if test="terms.evaluateRemark != null and terms.evaluateRemark !=''"> |
| | | and evaluate_remark = #{terms.evaluateRemark} |
| | | </if> |
| | | <if test="terms.evaluateContent != null and terms.evaluateContent !=''"> |
| | | and evaluate_content = #{terms.evaluateContent} |
| | | </if> |
| | | <if test="terms.evaluateUserId != null and terms.evaluateUserId !=''"> |
| | | and evaluate_user_id = #{terms.evaluateUserId} |
| | | </if> |
| | | <if test="terms.evaluateUserName != null and terms.evaluateUserName !=''"> |
| | | and evaluate_user_name = #{terms.evaluateUserName} |
| | | </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="updateCaseEvaluate"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <where> |
| | | id = #{entity.id} |
| | | </where> |
| | | </update> |
| | | <!-- 条件更新对象 --> |
| | | <update id="updateCaseEvaluateTerms"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <include refid="where-part"/> |
| | | </update> |
| | | <!-- 根据编号物理删除 --> |
| | | <delete id="deleteCaseEvaluate"> |
| | | 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-31 17:42:41 |
| | | * @version 1.0.0 |
| | | --> |
| | | <mapper namespace="cn.huge.module.cases.dao.mapper.CaseFeedbackHisMapper"> |
| | | <!-- 结果集 --> |
| | | <resultMap id="dataResult" type="cn.huge.module.cases.domain.po.CaseFeedbackHis"> |
| | | <result property="id" column="id"/> |
| | | <result property="feedbackId" column="feedback_id"/> |
| | | <result property="caseId" column="case_id"/> |
| | | <result property="caseTaskId" column="case_task_id"/> |
| | | <result property="handleType" column="handle_type"/> |
| | | <result property="handleUnitId" column="handle_unit_id"/> |
| | | <result property="handleUnitName" column="handle_unit_name"/> |
| | | <result property="handleUserId" column="handle_user_id"/> |
| | | <result property="handleUserName" column="handle_user_name"/> |
| | | <result property="handleContent" column="handle_content"/> |
| | | <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_feedback_his</sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | | id, |
| | | feedback_id, |
| | | case_id, |
| | | case_task_id, |
| | | handle_type, |
| | | handle_unit_id, |
| | | handle_unit_name, |
| | | handle_user_id, |
| | | handle_user_name, |
| | | handle_content, |
| | | cust_id, |
| | | create_time, |
| | | update_time |
| | | </sql> |
| | | <!-- 更新实体字段 --> |
| | | <sql id="set-part"> |
| | | <if test="entity.feedbackId != null">feedback_id = #{entity.feedbackId},</if> |
| | | <if test="entity.caseId != null">case_id = #{entity.caseId},</if> |
| | | <if test="entity.caseTaskId != null">case_task_id = #{entity.caseTaskId},</if> |
| | | <if test="entity.handleType != null">handle_type = #{entity.handleType},</if> |
| | | <if test="entity.handleUnitId != null">handle_unit_id = #{entity.handleUnitId},</if> |
| | | <if test="entity.handleUnitName != null">handle_unit_name = #{entity.handleUnitName},</if> |
| | | <if test="entity.handleUserId != null">handle_user_id = #{entity.handleUserId},</if> |
| | | <if test="entity.handleUserName != null">handle_user_name = #{entity.handleUserName},</if> |
| | | <if test="entity.handleContent != null">handle_content = #{entity.handleContent},</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.feedbackId != null and terms.feedbackId !=''"> |
| | | and feedback_id = #{terms.feedbackId} |
| | | </if> |
| | | <if test="terms.caseId != null and terms.caseId !=''"> |
| | | and case_id = #{terms.caseId} |
| | | </if> |
| | | <if test="terms.caseTaskId != null and terms.caseTaskId !=''"> |
| | | and case_task_id = #{terms.caseTaskId} |
| | | </if> |
| | | <if test="terms.handleType != null and terms.handleType !=''"> |
| | | and handle_type = #{terms.handleType} |
| | | </if> |
| | | <if test="terms.handleUnitId != null and terms.handleUnitId !=''"> |
| | | and handle_unit_id = #{terms.handleUnitId} |
| | | </if> |
| | | <if test="terms.handleUnitName != null and terms.handleUnitName !=''"> |
| | | and handle_unit_name = #{terms.handleUnitName} |
| | | </if> |
| | | <if test="terms.handleUserId != null and terms.handleUserId !=''"> |
| | | and handle_user_id = #{terms.handleUserId} |
| | | </if> |
| | | <if test="terms.handleUserName != null and terms.handleUserName !=''"> |
| | | and handle_user_name = #{terms.handleUserName} |
| | | </if> |
| | | <if test="terms.handleContent != null and terms.handleContent !=''"> |
| | | and handle_content = #{terms.handleContent} |
| | | </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="updateCaseFeedbackHis"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <where> |
| | | id = #{entity.id} |
| | | </where> |
| | | </update> |
| | | <!-- 条件更新对象 --> |
| | | <update id="updateCaseFeedbackHisTerms"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <include refid="where-part"/> |
| | | </update> |
| | | <!-- 根据编号物理删除 --> |
| | | <delete id="deleteCaseFeedbackHis"> |
| | | 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: 纠纷办理反馈j信息表 |
| | | * @description: 自定义sql,请自行实现业务逻辑 |
| | | * @company: hugeinfo |
| | | * @author: wangwh |
| | | * @time:2024-08-30 17:35:02 |
| | | * @version 1.0.0 |
| | | --> |
| | | <mapper namespace="cn.huge.module.cases.dao.mapper.CaseFeedbackMapper"> |
| | | <!-- 结果集 --> |
| | | <resultMap id="dataResult" type="cn.huge.module.cases.domain.po.CaseFeedback"> |
| | | <result property="id" column="id"/> |
| | | <result property="caseId" column="case_id"/> |
| | | <result property="caseTaskId" column="case_task_id"/> |
| | | <result property="handleType" column="handle_type"/> |
| | | <result property="handleUnitId" column="handle_unit_id"/> |
| | | <result property="handleUnitName" column="handle_unit_name"/> |
| | | <result property="handleUserId" column="handle_user_id"/> |
| | | <result property="handleUserName" column="handle_user_name"/> |
| | | <result property="handleContent" column="handle_content"/> |
| | | <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_feedback</sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | | id, |
| | | case_id, |
| | | case_task_id, |
| | | handle_type, |
| | | handle_unit_id, |
| | | handle_unit_name, |
| | | handle_user_id, |
| | | handle_user_name, |
| | | handle_content, |
| | | delete_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.caseTskId != null">case_task_id = #{entity.caseTskId},</if> |
| | | <if test="entity.handleType != null">handle_type = #{entity.handleType},</if> |
| | | <if test="entity.handleUnitId != null">handle_unit_id = #{entity.handleUnitId},</if> |
| | | <if test="entity.handleUnitName != null">handle_unit_name = #{entity.handleUnitName},</if> |
| | | <if test="entity.handleUserId != null">handle_user_id = #{entity.handleUserId},</if> |
| | | <if test="entity.handleUserName != null">handle_user_name = #{entity.handleUserName},</if> |
| | | <if test="entity.handleContent != null">handle_content = #{entity.handleContent},</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.caseId != null and terms.caseId !=''"> |
| | | and case_id = #{terms.caseId} |
| | | </if> |
| | | <if test="terms.caseTaskId != null and terms.caseTaskId !=''"> |
| | | and case_task_id = #{terms.caseTaskId} |
| | | </if> |
| | | <if test="terms.handleType != null and terms.handleType !=''"> |
| | | and handle_type = #{terms.handleType} |
| | | </if> |
| | | <if test="terms.handleUnitId != null and terms.handleUnitId !=''"> |
| | | and handle_unit_id = #{terms.handleUnitId} |
| | | </if> |
| | | <if test="terms.handleUnitName != null and terms.handleUnitName !=''"> |
| | | and handle_unit_name = #{terms.handleUnitName} |
| | | </if> |
| | | <if test="terms.handleUserId != null and terms.handleUserId !=''"> |
| | | and handle_user_id = #{terms.handleUserId} |
| | | </if> |
| | | <if test="terms.handleUserName != null and terms.handleUserName !=''"> |
| | | and handle_user_name = #{terms.handleUserName} |
| | | </if> |
| | | <if test="terms.handleContent != null and terms.handleContent !=''"> |
| | | and handle_content = #{terms.handleContent} |
| | | </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="updatecaseFeedback"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <where> |
| | | id = #{entity.id} |
| | | </where> |
| | | </update> |
| | | <!-- 条件更新对象 --> |
| | | <update id="updatecaseFeedbackTerms"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <include refid="where-part"/> |
| | | </update> |
| | | <!-- 根据编号物理删除 --> |
| | | <delete id="deletecaseFeedback"> |
| | | 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-09-03 10:53:01 |
| | | * @version 1.0.0 |
| | | --> |
| | | <mapper namespace="cn.huge.module.cases.dao.mapper.CaseSuperviseMapper"> |
| | | <!-- 结果集 --> |
| | | <resultMap id="dataResult" type="cn.huge.module.cases.domain.po.CaseSupervise"> |
| | | <result property="id" column="id"/> |
| | | <result property="caseId" column="case_id"/> |
| | | <result property="supContent" column="sup_content"/> |
| | | <result property="supUserId" column="sup_user_id"/> |
| | | <result property="supUserName" column="sup_user_name"/> |
| | | <result property="supTime" column="sup_time"/> |
| | | <result property="supStatus" column="sup_status"/> |
| | | <result property="replyTerm" column="reply_term"/> |
| | | <result property="replyContent" column="reply_content"/> |
| | | <result property="replyUserId" column="reply_user_id"/> |
| | | <result property="replyUserName" column="reply_user_name"/> |
| | | <result property="replyTime" column="reply_time"/> |
| | | <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_supervise</sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | | id, |
| | | case_id, |
| | | sup_content, |
| | | sup_user_id, |
| | | sup_user_name, |
| | | sup_time, |
| | | sup_status, |
| | | reply_term, |
| | | reply_content, |
| | | reply_user_id, |
| | | reply_user_name, |
| | | reply_time, |
| | | delete_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.supContent != null">sup_content = #{entity.supContent},</if> |
| | | <if test="entity.supUserId != null">sup_user_id = #{entity.supUserId},</if> |
| | | <if test="entity.supUserName != null">sup_user_name = #{entity.supUserName},</if> |
| | | <if test="entity.supTime != null">sup_time = #{entity.supTime},</if> |
| | | <if test="entity.supStatus != null">sup_status = #{entity.supStatus},</if> |
| | | <if test="entity.replyTerm != null">reply_term = #{entity.replyTerm},</if> |
| | | <if test="entity.replyContent != null">reply_content = #{entity.replyContent},</if> |
| | | <if test="entity.replyUserId != null">reply_user_id = #{entity.replyUserId},</if> |
| | | <if test="entity.replyUserName != null">reply_user_name = #{entity.replyUserName},</if> |
| | | <if test="entity.replyTime != null">reply_time = #{entity.replyTime},</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.caseId != null and terms.caseId !=''"> |
| | | and case_id = #{terms.caseId} |
| | | </if> |
| | | <if test="terms.supContent != null and terms.supContent !=''"> |
| | | and sup_content = #{terms.supContent} |
| | | </if> |
| | | <if test="terms.supUserId != null and terms.supUserId !=''"> |
| | | and sup_user_id = #{terms.supUserId} |
| | | </if> |
| | | <if test="terms.supUserName != null and terms.supUserName !=''"> |
| | | and sup_user_name = #{terms.supUserName} |
| | | </if> |
| | | <if test="terms.supTime != null and terms.supTime !=''"> |
| | | and sup_time = #{terms.supTime} |
| | | </if> |
| | | <if test="terms.supStatus != null and terms.supStatus !=''"> |
| | | and sup_status = #{terms.supStatus} |
| | | </if> |
| | | <if test="terms.replyTerm != null and terms.replyTerm !=''"> |
| | | and reply_term = #{terms.replyTerm} |
| | | </if> |
| | | <if test="terms.replyContent != null and terms.replyContent !=''"> |
| | | and reply_content = #{terms.replyContent} |
| | | </if> |
| | | <if test="terms.replyUserId != null and terms.replyUserId !=''"> |
| | | and reply_user_id = #{terms.replyUserId} |
| | | </if> |
| | | <if test="terms.replyUserName != null and terms.replyUserName !=''"> |
| | | and reply_user_name = #{terms.replyUserName} |
| | | </if> |
| | | <if test="terms.replyTime != null and terms.replyTime !=''"> |
| | | and reply_time = #{terms.replyTime} |
| | | </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="updateCaseSupervise"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <where> |
| | | id = #{entity.id} |
| | | </where> |
| | | </update> |
| | | <!-- 条件更新对象 --> |
| | | <update id="updateCaseSuperviseTerms"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <include refid="where-part"/> |
| | | </update> |
| | | <!-- 根据编号物理删除 --> |
| | | <delete id="deleteCaseSupervise"> |
| | | delete from |
| | | <include refid="table-name" /> |
| | | where id = #{id} |
| | | </delete> |
| | | <!-- 根据条件查询 --> |
| | | <select id="listTerms" resultMap="dataResult"> |
| | | select |
| | | <include refid="column-part"/> |
| | | from |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | </select> |
| | | <!-- 根据条件统计 --> |
| | | <select id="countTerms" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(1) |
| | | from |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | </select> |
| | | <!-- 根据条件分页查询 --> |
| | | <select id="pageTerms" resultMap="dataResult"> |
| | | SELECT |
| | | <include refid="column-part"/> |
| | | FROM |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | <if test="page.sort != null"> |
| | | <foreach collection="page.sort" item="s" index="index" separator="," open="order by "> |
| | | isnull(${s.property}), ${s.property} ${s.direction} |
| | | </foreach> |
| | | </if> |
| | | <if test="page.sort == null"> |
| | | order by isnull(create_time), create_time desc |
| | | </if> |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | package cn.huge.module.cases.domain.bo; |
| | | |
| | | import cn.huge.module.cases.domain.po.CaseEvaluate; |
| | | |
| | | /** |
| | | * @title: 当事人纠纷评价表业务扩展类 |
| | | * @description: 当事人纠纷评价表业务扩展类 |
| | | * @company: hugeinfo |
| | | * @author: wangwh |
| | | * @time: 2024-09-04 20:21:05 |
| | | * @version: 1.0.0 |
| | | * @see cn.huge.module.cases.domain.po.CaseEvaluate |
| | | */ |
| | | public class CaseEvaluateBO extends CaseEvaluate { |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.cases.domain.bo; |
| | | |
| | | import cn.huge.module.cases.domain.po.CaseFeedback; |
| | | |
| | | /** |
| | | * @title: 纠纷办理反馈j信息表业务扩展类 |
| | | * @description: 纠纷办理反馈j信息表业务扩展类 |
| | | * @company: hugeinfo |
| | | * @author: wangwh |
| | | * @time: 2024-08-30 17:35:02 |
| | | * @version: 1.0.0 |
| | | * @see CaseFeedback |
| | | */ |
| | | public class CaseFeedbackBO extends CaseFeedback { |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.cases.domain.bo; |
| | | |
| | | import cn.huge.module.cases.domain.po.CaseFeedbackHis; |
| | | |
| | | /** |
| | | * @title: 纠纷办理反馈信息历史表业务扩展类 |
| | | * @description: 纠纷办理反馈信息历史表业务扩展类 |
| | | * @company: hugeinfo |
| | | * @author: wangwh |
| | | * @time: 2024-08-31 17:42:41 |
| | | * @version: 1.0.0 |
| | | * @see cn.huge.module.cases.domain.po.CaseFeedbackHis |
| | | */ |
| | | public class CaseFeedbackHisBO extends CaseFeedbackHis { |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.cases.domain.bo; |
| | | |
| | | import cn.huge.module.cases.domain.po.CaseSupervise; |
| | | |
| | | /** |
| | | * @title: 纠纷督办信息表业务扩展类 |
| | | * @description: 纠纷督办信息表业务扩展类 |
| | | * @company: hugeinfo |
| | | * @author: wangwh |
| | | * @time: 2024-09-03 10:53:01 |
| | | * @version: 1.0.0 |
| | | * @see cn.huge.module.cases.domain.po.CaseSupervise |
| | | */ |
| | | public class CaseSuperviseBO extends CaseSupervise { |
| | | |
| | | |
| | | } |
| 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 cn.huge.module.sys.dto.FileTypeInfoBaseDTO; |
| | | 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 CaseInfoDTO extends CaseInfo { |
| | | |
| | | /** |
| | | * 调解组织类型,1:本单位调解,2:本单位人调解,3:其他单位调解 |
| | | */ |
| | | private String mediateUnitType; |
| | | |
| | | /** |
| | | * 申请人列表 |
| | | */ |
| | | private List<CasePerson> personList; |
| | | |
| | | /** |
| | | * 申请人代理人列表 |
| | | */ |
| | | private List<CaseAgent> agentList; |
| | | |
| | | /** |
| | | * 附件列表 |
| | | */ |
| | | private List<FileTypeInfoBaseDTO> fileInfoList; |
| | | |
| | | /** |
| | | * 是否是登记人 1:是 2:否 |
| | | */ |
| | | private String whetherInput; |
| | | |
| | | /** |
| | | * 相关附件数量 |
| | | */ |
| | | private Integer fileSize; |
| | | |
| | | |
| | | } |
| | |
| | | public class RegisterSaveDTO extends CaseInfo { |
| | | |
| | | /** |
| | | * 申请人类型 |
| | | * 当事人列表 |
| | | */ |
| | | private String plaintPerClass; |
| | | private List<CasePerson> personList; |
| | | |
| | | /** |
| | | * 申请人类型名称 |
| | | * 当事人代理人列表 |
| | | */ |
| | | 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; |
| | | private List<CaseAgent> agentList; |
| | | |
| | | /** |
| | | * 自行受理标识,0:不是,1:是 |
| | |
| | | * 是否是草稿提交,0:不是,1:是 |
| | | */ |
| | | private Integer isDraft; |
| | | |
| | | /** |
| | | * 操作类型:0:新增,1:更新 |
| | | */ |
| | | private Integer operateType; |
| | | } |
| | |
| | | package cn.huge.module.cases.domain.po; |
| | | |
| | | import cn.huge.module.sys.dto.FileTypeInfoBaseDTO; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: 纠纷代理人信息表数据库对应关系类 |
| | |
| | | */ |
| | | @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 = "update_time") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 附件列表 |
| | | */ |
| | | @TableField(exist = false) |
| | | private List<FileTypeInfoBaseDTO> fileInfoList; |
| | | |
| | | } |
| 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-09-04 20:21:05 |
| | | * @version 1.0.0 |
| | | */ |
| | | @TableName(value = "dyh_case_evaluate") |
| | | @Data |
| | | public class CaseEvaluate { |
| | | |
| | | /** |
| | | * 主键编号 |
| | | */ |
| | | @TableId(value = "id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 纠纷编号 |
| | | */ |
| | | @TableField(value = "case_id") |
| | | private String caseId; |
| | | |
| | | /** |
| | | * 评价等级 |
| | | */ |
| | | @TableField(value = "evaluate_grade") |
| | | private Integer evaluateGrade; |
| | | |
| | | /** |
| | | * 选择评语,多个用,隔开 |
| | | */ |
| | | @TableField(value = "evaluate_remark") |
| | | private String evaluateRemark; |
| | | |
| | | /** |
| | | * 评价建议 |
| | | */ |
| | | @TableField(value = "evaluate_content") |
| | | private String evaluateContent; |
| | | |
| | | /** |
| | | * 评价人编号 |
| | | */ |
| | | @TableField(value = "evaluate_user_id") |
| | | private String evaluateUserId; |
| | | |
| | | /** |
| | | * 评价人名称 |
| | | */ |
| | | @TableField(value = "evaluate_user_name") |
| | | private String evaluateUserName; |
| | | |
| | | /** |
| | | * 删除状态,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 cn.huge.module.sys.dto.FileInfoBaseDTO; |
| | | import cn.huge.module.sys.dto.FileTypeInfoBaseDTO; |
| | | 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; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: 纠纷办理反馈j信息表数据库对应关系类 |
| | | * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。 |
| | | * @company:hugeinfo |
| | | * @author: wangwh |
| | | * @time: 2024-08-30 17:35:02 |
| | | * @version 1.0.0 |
| | | */ |
| | | @TableName(value = "dyh_case_feedback") |
| | | @Data |
| | | public class CaseFeedback { |
| | | |
| | | /** |
| | | * 主键编号 |
| | | */ |
| | | @TableId(value = "id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 纠纷编号 |
| | | */ |
| | | @TableField(value = "case_id") |
| | | private String caseId; |
| | | |
| | | /** |
| | | * 任务编号 |
| | | */ |
| | | @TableField(value = "case_task_id") |
| | | private String caseTaskId; |
| | | |
| | | /** |
| | | * 经办类型,1:承办组织,2:配合组织 |
| | | */ |
| | | @TableField(value = "handle_type") |
| | | private Integer handleType; |
| | | |
| | | /** |
| | | * 经办组织编号 |
| | | */ |
| | | @TableField(value = "handle_unit_id") |
| | | private String handleUnitId; |
| | | |
| | | /** |
| | | * 经办组织名称 |
| | | */ |
| | | @TableField(value = "handle_unit_name") |
| | | private String handleUnitName; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | */ |
| | | @TableField(value = "handle_user_id") |
| | | private String handleUserId; |
| | | |
| | | /** |
| | | * 经办人名称 |
| | | */ |
| | | @TableField(value = "handle_user_name") |
| | | private String handleUserName; |
| | | |
| | | /** |
| | | * 办理意见 |
| | | */ |
| | | @TableField(value = "handle_content") |
| | | private String handleContent; |
| | | |
| | | /** |
| | | * 删除状态,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; |
| | | |
| | | /** |
| | | * 附件列表 |
| | | */ |
| | | @TableField(exist = false) |
| | | private List<FileInfoBaseDTO> fileInfoList; |
| | | } |
| 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-31 17:42:41 |
| | | * @version 1.0.0 |
| | | */ |
| | | @TableName(value = "dyh_case_feedback_his") |
| | | @Data |
| | | public class CaseFeedbackHis { |
| | | |
| | | /** |
| | | * 主键编号 |
| | | */ |
| | | @TableId(value = "id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 办理反馈信息编号 |
| | | */ |
| | | @TableField(value = "feedback_id") |
| | | private String feedbackId; |
| | | |
| | | /** |
| | | * 纠纷编号 |
| | | */ |
| | | @TableField(value = "case_id") |
| | | private String caseId; |
| | | |
| | | /** |
| | | * 办理反馈纠纷任务编号 |
| | | */ |
| | | @TableField(value = "case_task_id") |
| | | private String caseTaskId; |
| | | |
| | | /** |
| | | * 经办类型,1:承办组织,2:配合组织 |
| | | */ |
| | | @TableField(value = "handle_type") |
| | | private Integer handleType; |
| | | |
| | | /** |
| | | * 经办组织编号 |
| | | */ |
| | | @TableField(value = "handle_unit_id") |
| | | private String handleUnitId; |
| | | |
| | | /** |
| | | * 经办组织名称 |
| | | */ |
| | | @TableField(value = "handle_unit_name") |
| | | private String handleUnitName; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | */ |
| | | @TableField(value = "handle_user_id") |
| | | private String handleUserId; |
| | | |
| | | /** |
| | | * 经办人名称 |
| | | */ |
| | | @TableField(value = "handle_user_name") |
| | | private String handleUserName; |
| | | |
| | | /** |
| | | * 办理意见 |
| | | */ |
| | | @TableField(value = "handle_content") |
| | | private String handleContent; |
| | | |
| | | /** |
| | | * 顾客编号 |
| | | */ |
| | | @TableField(value = "cust_id") |
| | | private String custId; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField(value = "create_time") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @TableField(value = "update_time") |
| | | private Date updateTime; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | |
| | | /** |
| | | * 来访时间 |
| | | */ |
| | | @JsonFormat(pattern="yyyy-MM-dd HH:mm", timezone="GMT+8") |
| | | @TableField(value = "visit_time") |
| | | private Date visitTime; |
| | | |
| | |
| | | /** |
| | | * 纠纷发生时间 |
| | | */ |
| | | @JsonFormat(pattern="yyyy-MM-dd HH:mm", timezone="GMT+8") |
| | | @TableField(value = "occur_time") |
| | | private Date occurTime; |
| | | |
| | |
| | | package cn.huge.module.cases.domain.po; |
| | | |
| | | import cn.huge.module.sys.dto.FileTypeInfoBaseDTO; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: 纠纷当事人信息表数据库对应关系类 |
| | |
| | | @TableField(value = "update_time") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 附件列表 |
| | | */ |
| | | @TableField(exist = false) |
| | | private List<FileTypeInfoBaseDTO> fileInfoList; |
| | | } |
| New file |
| | |
| | | package cn.huge.module.cases.domain.po; |
| | | |
| | | import cn.huge.module.sys.dto.FileTypeInfoBaseDTO; |
| | | 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; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: 纠纷督办信息表数据库对应关系类 |
| | | * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。 |
| | | * @company:hugeinfo |
| | | * @author: wangwh |
| | | * @time: 2024-09-03 10:53:01 |
| | | * @version 1.0.0 |
| | | */ |
| | | @TableName(value = "dyh_case_supervise") |
| | | @Data |
| | | public class CaseSupervise { |
| | | |
| | | /** |
| | | * 主键编号 |
| | | */ |
| | | @TableId(value = "id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 纠纷编号 |
| | | */ |
| | | @TableField(value = "case_id") |
| | | private String caseId; |
| | | |
| | | /** |
| | | * 督办意见 |
| | | */ |
| | | @TableField(value = "sup_content") |
| | | private String supContent; |
| | | |
| | | /** |
| | | * 督办人编号 |
| | | */ |
| | | @TableField(value = "sup_user_id") |
| | | private String supUserId; |
| | | |
| | | /** |
| | | * 督办人名称 |
| | | */ |
| | | @TableField(value = "sup_user_name") |
| | | private String supUserName; |
| | | |
| | | /** |
| | | * 督办时间 |
| | | */ |
| | | @TableField(value = "sup_time") |
| | | private Date supTime; |
| | | |
| | | /** |
| | | * 督办状态,0:未回复,1:已回复 |
| | | */ |
| | | @TableField(value = "sup_status") |
| | | private Integer supStatus; |
| | | |
| | | /** |
| | | * 回复期限,单位:小时 |
| | | */ |
| | | @TableField(value = "reply_term") |
| | | private Integer replyTerm; |
| | | |
| | | /** |
| | | * 回复内容 |
| | | */ |
| | | @TableField(value = "reply_content") |
| | | private String replyContent; |
| | | |
| | | /** |
| | | * 回复人编号 |
| | | */ |
| | | @TableField(value = "reply_user_id") |
| | | private String replyUserId; |
| | | |
| | | /** |
| | | * 回复人名称 |
| | | */ |
| | | @TableField(value = "reply_user_name") |
| | | private String replyUserName; |
| | | |
| | | /** |
| | | * 回复时间 |
| | | */ |
| | | @TableField(value = "reply_time") |
| | | private String replyTime; |
| | | |
| | | /** |
| | | * 删除状态,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; |
| | | |
| | | /** |
| | | * 附件列表 |
| | | */ |
| | | @TableField(exist = false) |
| | | private List<FileTypeInfoBaseDTO> fileInfoList; |
| | | } |
| 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.CaseEvaluateMapper; |
| | | import cn.huge.module.cases.domain.po.CaseEvaluate; |
| | | 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-09-04 20:21:05 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class CaseEvaluateService extends ServiceImpl<CaseEvaluateMapper, CaseEvaluate>{ |
| | | |
| | | @Autowired |
| | | private CaseEvaluateMapper mapper; |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | public void updateCaseEvaluate(CaseEvaluate entity){ |
| | | try{ |
| | | mapper.updateCaseEvaluate(entity); |
| | | }catch (Exception e){ |
| | | log.error("[CaseEvaluateService.updateCaseEvaluate]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseEvaluateService.updateCaseEvaluate", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | public void updateCaseEvaluateTerms(CaseEvaluate entity, Map<String, Object> terms){ |
| | | try{ |
| | | mapper.updateCaseEvaluateTerms(entity, terms); |
| | | }catch (Exception e){ |
| | | log.error("[CaseEvaluateService.updateCaseEvaluateTerms]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseEvaluateService.updateCaseEvaluateTerms", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | public void deleteCaseEvaluate(String id){ |
| | | try{ |
| | | mapper.deleteCaseEvaluate(id); |
| | | }catch (Exception e){ |
| | | log.error("[CaseEvaluateService.deleteCaseEvaluate]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseEvaluateService.deleteCaseEvaluate", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 按条件查询 |
| | | * @param terms 条件 |
| | | * @return List |
| | | */ |
| | | public List<CaseEvaluate> 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<CaseEvaluate> pageQuery(PageRequest page, Map<String, Object> terms){ |
| | | long total = mapper.countTerms(terms); |
| | | List<CaseEvaluate> content = mapper.pageTerms(page, terms); |
| | | return new PageImpl<CaseEvaluate>(content, page, total); |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @param caseEvaluate 实体对象 |
| | | */ |
| | | public void saveCaseEvaluate(CaseEvaluate caseEvaluate){ |
| | | try{ |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 判断是否新增 |
| | | if (IdUtils.checkNewId(caseEvaluate.getId())){ |
| | | caseEvaluate.setId(utilsClient.getNewTimeId()); |
| | | caseEvaluate.setCreateTime(nowDate); |
| | | } |
| | | caseEvaluate.setUpdateTime(nowDate); |
| | | this.saveOrUpdate(caseEvaluate); |
| | | }catch (Exception e){ |
| | | log.error("[CaseEvaluateService.saveCaseEvaluate]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseEvaluateService.saveCaseEvaluate", 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.CaseFeedbackHisMapper; |
| | | import cn.huge.module.cases.domain.po.CaseFeedbackHis; |
| | | 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-31 17:42:41 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class CaseFeedbackHisService extends ServiceImpl<CaseFeedbackHisMapper, CaseFeedbackHis>{ |
| | | |
| | | @Autowired |
| | | private CaseFeedbackHisMapper mapper; |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | public void updateCaseFeedbackHis(CaseFeedbackHis entity){ |
| | | try{ |
| | | mapper.updateCaseFeedbackHis(entity); |
| | | }catch (Exception e){ |
| | | log.error("[CaseFeedbackHisService.updateCaseFeedbackHis]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseFeedbackHisService.updateCaseFeedbackHis", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | public void updateCaseFeedbackHisTerms(CaseFeedbackHis entity, Map<String, Object> terms){ |
| | | try{ |
| | | mapper.updateCaseFeedbackHisTerms(entity, terms); |
| | | }catch (Exception e){ |
| | | log.error("[CaseFeedbackHisService.updateCaseFeedbackHisTerms]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseFeedbackHisService.updateCaseFeedbackHisTerms", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | public void deleteCaseFeedbackHis(String id){ |
| | | try{ |
| | | mapper.deleteCaseFeedbackHis(id); |
| | | }catch (Exception e){ |
| | | log.error("[CaseFeedbackHisService.deleteCaseFeedbackHis]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseFeedbackHisService.deleteCaseFeedbackHis", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 按条件查询 |
| | | * @param terms 条件 |
| | | * @return List |
| | | */ |
| | | public List<CaseFeedbackHis> 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<CaseFeedbackHis> pageQuery(PageRequest page, Map<String, Object> terms){ |
| | | long total = mapper.countTerms(terms); |
| | | List<CaseFeedbackHis> content = mapper.pageTerms(page, terms); |
| | | return new PageImpl<CaseFeedbackHis>(content, page, total); |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @param caseFeedbackHis 实体对象 |
| | | */ |
| | | public void saveCaseFeedbackHis(CaseFeedbackHis caseFeedbackHis){ |
| | | try{ |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 判断是否新增 |
| | | if (IdUtils.checkNewId(caseFeedbackHis.getId())){ |
| | | caseFeedbackHis.setId(utilsClient.getNewTimeId()); |
| | | caseFeedbackHis.setCreateTime(nowDate); |
| | | } |
| | | caseFeedbackHis.setUpdateTime(nowDate); |
| | | this.saveOrUpdate(caseFeedbackHis); |
| | | }catch (Exception e){ |
| | | log.error("[CaseFeedbackHisService.saveCaseFeedbackHis]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseFeedbackHisService.saveCaseFeedbackHis", 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.cases.domain.po.CaseFeedbackHis; |
| | | import cn.huge.module.cases.domain.po.CaseInfoUnfold; |
| | | import cn.huge.module.client.api.impl.CustClientImpl; |
| | | import cn.huge.module.client.api.impl.SysClientImpl; |
| | | import cn.huge.module.client.api.impl.UtilsClientImpl; |
| | | import cn.huge.module.cases.dao.mapper.CaseFeedbackMapper; |
| | | import cn.huge.module.cases.domain.po.CaseFeedback; |
| | | import cn.huge.module.cust.dto.CtUserDTO; |
| | | import cn.huge.module.sys.dto.FileIdInfoBaseDTO; |
| | | import cn.huge.module.sys.dto.FileInfoBaseDTO; |
| | | import cn.huge.module.sys.dto.FileTypeInfoBaseDTO; |
| | | 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; |
| | | 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.print.DocFlavor; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @title: 纠纷办理反馈j信息表业务逻辑处理 |
| | | * @Description 纠纷办理反馈j信息表业务逻辑处理 |
| | | * @company hugeinfo |
| | | * @author wangwh |
| | | * @Time 2024-08-30 17:35:02 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class CaseFeedbackService extends ServiceImpl<CaseFeedbackMapper, CaseFeedback>{ |
| | | |
| | | @Autowired |
| | | private CaseFeedbackMapper mapper; |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | @Autowired |
| | | private CustClientImpl custClient; |
| | | |
| | | @Autowired |
| | | private SysClientImpl sysClient; |
| | | |
| | | @Autowired |
| | | private CaseFeedbackHisService hisService; |
| | | |
| | | @Autowired |
| | | private CaseInfoUnfoldService unfoldService; |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | public void updatecaseFeedback(CaseFeedback entity){ |
| | | try{ |
| | | mapper.updatecaseFeedback(entity); |
| | | }catch (Exception e){ |
| | | log.error("[caseFeedbackService.updatecaseFeedback]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("caseFeedbackService.updatecaseFeedback", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | public void updatecaseFeedbackTerms(CaseFeedback entity, Map<String, Object> terms){ |
| | | try{ |
| | | mapper.updatecaseFeedbackTerms(entity, terms); |
| | | }catch (Exception e){ |
| | | log.error("[caseFeedbackService.updatecaseFeedbackTerms]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("caseFeedbackService.updatecaseFeedbackTerms", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | public void deletecaseFeedback(String id){ |
| | | try{ |
| | | mapper.deletecaseFeedback(id); |
| | | }catch (Exception e){ |
| | | log.error("[caseFeedbackService.deletecaseFeedback]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("caseFeedbackService.deletecaseFeedback", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 按条件查询 |
| | | * @param terms 条件 |
| | | * @return List |
| | | */ |
| | | public List<CaseFeedback> 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<CaseFeedback> pageQuery(PageRequest page, Map<String, Object> terms){ |
| | | long total = mapper.countTerms(terms); |
| | | List<CaseFeedback> content = mapper.pageTerms(page, terms); |
| | | return new PageImpl<CaseFeedback>(content, page, total); |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @param caseFeedback 实体对象 |
| | | */ |
| | | public void savecaseFeedback(CaseFeedback caseFeedback, String userId){ |
| | | try{ |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 判断是否新增 |
| | | if (IdUtils.checkNewId(caseFeedback.getId())){ |
| | | caseFeedback.setId(utilsClient.getNewTimeId()); |
| | | caseFeedback.setCreateTime(nowDate); |
| | | } |
| | | caseFeedback.setUpdateTime(nowDate); |
| | | this.saveOrUpdate(caseFeedback); |
| | | }catch (Exception e){ |
| | | log.error("[caseFeedbackService.savecaseFeedback]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("caseFeedbackService.savecaseFeedback", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取办理反馈信息 |
| | | * @param id 条件 |
| | | * @return Page |
| | | */ |
| | | public Map<String, Object> listFeedback(String id) { |
| | | Map<String, Object> result = new HashMap<>(); |
| | | |
| | | QueryWrapper<CaseInfoUnfold> caseInfoUnfoldQueryWrapper = new QueryWrapper<>(); |
| | | caseInfoUnfoldQueryWrapper.eq("case_id", id); |
| | | CaseInfoUnfold caseInfoUnfold = unfoldService.getOne(caseInfoUnfoldQueryWrapper); |
| | | result.put("manager", caseInfoUnfold.getMediator()); |
| | | QueryWrapper<CaseFeedback> caseFeedbackQueryWrapper = new QueryWrapper<>(); |
| | | caseFeedbackQueryWrapper.eq("case_id", id); |
| | | List<CaseFeedback> caseFeedbackList = mapper.selectList(caseFeedbackQueryWrapper); |
| | | |
| | | String ownerIds = caseFeedbackList.stream().map(CaseFeedback::getId).collect(Collectors.joining("','")); |
| | | ownerIds = "'"+ ownerIds + "'"; |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("ownerIds", ownerIds); |
| | | List<FileIdInfoBaseDTO> fileInfoList = sysClient.listIdInfoByOwnerIdList(map, id); |
| | | |
| | | for(CaseFeedback caseFeedback: caseFeedbackList){ |
| | | for(FileIdInfoBaseDTO fileInfo: fileInfoList){ |
| | | if(caseFeedback.getId().equals(fileInfo.getOwnerId())){ |
| | | caseFeedback.setFileInfoList(fileInfo.getFileList()); |
| | | } |
| | | } |
| | | } |
| | | result.put("caseFeedbackList", caseFeedbackList); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 添加办理反馈 |
| | | * @param caseFeedback 实体对象 |
| | | */ |
| | | public void saveFeedback(CaseFeedback caseFeedback, String userId){ |
| | | try{ |
| | | // 获取当前登录用户 |
| | | CtUserDTO loginUser = custClient.clientGetUserAll(userId); |
| | | caseFeedback.setHandleUnitId(loginUser.getUnitId()); |
| | | caseFeedback.setHandleUnitName(loginUser.getUnitName()); |
| | | caseFeedback.setHandleUserId(loginUser.getId()); |
| | | caseFeedback.setHandleUserName(loginUser.getTrueName()); |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | caseFeedback.setId(utilsClient.getNewTimeId()); |
| | | caseFeedback.setUpdateTime(nowDate); |
| | | caseFeedback.setCreateTime(nowDate); |
| | | //todo 承办、配合--查询task |
| | | |
| | | this.save(caseFeedback); |
| | | }catch (Exception e){ |
| | | log.error("[caseFeedbackService.savecaseFeedback]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("caseFeedbackService.savecaseFeedback", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 添加办理反馈 |
| | | * @param caseFeedback 实体对象 |
| | | */ |
| | | public void updateFeedback(CaseFeedback caseFeedback, String userId){ |
| | | try{ |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 获取当前登录用户 |
| | | CtUserDTO loginUser = custClient.clientGetUserAll(userId); |
| | | CaseFeedbackHis caseFeedbackHis = new CaseFeedbackHis(); |
| | | CaseFeedback caseFeedback1 = mapper.selectById(caseFeedback.getId()); |
| | | BeanUtils.copyProperties(caseFeedback1, caseFeedbackHis); |
| | | caseFeedbackHis.setId(utilsClient.getNewTimeId()); |
| | | caseFeedbackHis.setFeedbackId(caseFeedback1.getId()); |
| | | caseFeedback.setUpdateTime(nowDate); |
| | | caseFeedback.setCreateTime(nowDate); |
| | | hisService.save(caseFeedbackHis); |
| | | |
| | | caseFeedback.setHandleUnitId(loginUser.getUnitId()); |
| | | caseFeedback.setHandleUnitName(loginUser.getUnitName()); |
| | | caseFeedback.setHandleUserId(loginUser.getId()); |
| | | caseFeedback.setHandleUserName(loginUser.getTrueName()); |
| | | caseFeedback.setId(utilsClient.getNewTimeId()); |
| | | caseFeedback.setUpdateTime(nowDate); |
| | | //todo 承办、配合--查询task |
| | | |
| | | mapper.updateById(caseFeedback); |
| | | }catch (Exception e){ |
| | | log.error("[caseFeedbackService.updateFeedback]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("caseFeedbackService.updateFeedback", e); |
| | | } |
| | | } |
| | | } |
| | |
| | | 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.CaseInfoDTO; |
| | | 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.SysClient; |
| | | import cn.huge.module.client.api.impl.CustClientImpl; |
| | | import cn.huge.module.client.api.impl.SysClientImpl; |
| | | 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.mediate.constant.CaseBaseConstsEnum; |
| | | import cn.huge.module.cust.dto.CtUserDTO; |
| | | import cn.huge.module.draft.service.CasedraftInfoService; |
| | | import cn.huge.module.mediate.dto.WechatBindCaseDTO; |
| | | import cn.huge.module.sys.dto.FileIdTypeInfoBaseDTO; |
| | | import cn.huge.module.sys.dto.FileTypeInfoBaseDTO; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.google.common.collect.Maps; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | import org.springframework.data.domain.PageRequest; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @title: 纠纷信息主表业务逻辑处理 |
| | |
| | | |
| | | @Autowired |
| | | private CustClientImpl custClient; |
| | | |
| | | @Autowired |
| | | private CaseInfoUnfoldService caseInfoUnfoldService; |
| | | |
| | | @Autowired |
| | | private SysClientImpl sysClient; |
| | | |
| | | /** |
| | | * 更新对象 |
| | |
| | | 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); |
| | | this.saveCasePerson(registerSaveDTO, plaintiffs, pagents, defendants, dagents); |
| | | 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()); |
| | | } |
| | | caseInfo.setCaseRef(utilsClient.createCaseRef()); |
| | | caseInfo.setCanal(CaseBaseConstsEnum.CASE_CANAL_1.getIndex()); |
| | | caseInfo.setCaseDes(CaseBaseConstsEnum.CASE_CANAL_1.getDes()); |
| | | //todo case_title生成、经纬度转换、来访形式 |
| | | if(0 == registerSaveDTO.getOperateType()){ |
| | | 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.setDeleteStatus(BaseConsts.DELETE_STATUS_0); |
| | | |
| | | this.saveOrUpdate(caseInfo); |
| | | // 删除草稿案件 |
| | | if(1 == registerSaveDTO.getIsDraft() ){ |
| | | draftInfoService.removeDraftInfo(registerSaveDTO.getId()); |
| | | } |
| | | CaseInfoUnfold caseInfoUnfold = new CaseInfoUnfold(); |
| | | caseInfoUnfold.setId(utilsClient.getNewTimeId()); |
| | | caseInfoUnfold.setCaseId(caseInfo.getId()); |
| | | caseInfoUnfold.setCreateTime(nowDate); |
| | | caseInfoUnfold.setUpdateTime(nowDate); |
| | | |
| | | // 删除草稿案件 |
| | | if(1 == registerSaveDTO.getIsDraft() ){ |
| | | draftInfoService.removeDraftInfo(registerSaveDTO.getId()); |
| | | } |
| | | |
| | | //判断是否自行受理 |
| | | if(1 == registerSaveDTO.getIsSelfAccept()){ |
| | | //todo 流程接口修改status、status_name、process、process_name |
| | | caseInfoUnfold.setMediateUnitId(loginUser.getUnitId()); |
| | | caseInfoUnfold.setMediateUnitName(loginUser.getUnitName()); |
| | | } |
| | | this.save(caseInfo); |
| | | caseInfoUnfoldService.save(caseInfoUnfold); |
| | | }else if(1 == registerSaveDTO.getOperateType()){ |
| | | this.updateById(caseInfo); |
| | | } |
| | | return registerSaveDTO.getId(); |
| | | }catch (Exception e){ |
| | | log.error("service方法[CaseInfoService.caseRegister]调用异常:"+e, e); |
| | |
| | | * @param dagents 被申请人代理人 |
| | | * @return int |
| | | */ |
| | | private int saveCasePerson(RegisterSaveDTO registerSaveDTO, StringBuffer plaintiffs, StringBuffer pagents, |
| | | private void saveCasePerson(RegisterSaveDTO registerSaveDTO, StringBuffer plaintiffs, StringBuffer pagents, |
| | | StringBuffer defendants, StringBuffer dagents){ |
| | | int peopleNum = 0; |
| | | |
| | | Date now = DateUtils.getNowDate(); |
| | | |
| | | List<CasePerson> personList = registerSaveDTO.getPersonList(); |
| | | List<CaseAgent> agentList = registerSaveDTO.getAgentList(); |
| | | |
| | | //查出已存在的当事人和代理人编号 |
| | | List<String> oldPersonIdList = personService.listIdByCaseId(registerSaveDTO.getId()); |
| | | List<String> oldAgentIdList = agentService.listIdByCaseId(registerSaveDTO.getId()); |
| | | String oldPersonIds = oldPersonIdList.stream().map(String::valueOf).collect(Collectors.joining(",")); |
| | | String oldAgentIds = oldAgentIdList.stream().map(String::valueOf).collect(Collectors.joining(",")); |
| | | List<String> newPersonIdList = new ArrayList<>(); |
| | | List<String> newAgentIdList = new ArrayList<>(); |
| | | // 保存申请人 |
| | | List<CasePerson> plaintPersonList = registerSaveDTO.getPlaintiffList(); |
| | | if (CollectionUtils.isNotEmpty(plaintPersonList)) { |
| | | for (CasePerson casePerson : plaintPersonList) { |
| | | |
| | | if(CollectionUtils.isNotEmpty(personList)){ |
| | | for(CasePerson casePerson: personList){ |
| | | 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); |
| | | casePerson.setUpdateTime(now); |
| | | //绑定当事人小程序 |
| | | this.setPartyUserId(casePerson); |
| | | //添加申请方和被申请方人名组合 |
| | | if(CaseBaseConstsEnum.PERSON_TYPE_1.equals(casePerson.getPerType())){ |
| | | //申请方 |
| | | if (StringUtils.isNotEmpty(plaintiffs.toString())) { |
| | | plaintiffs.append(BaseConsts.COMMA); |
| | | } |
| | | plaintiffs.append(casePerson.getTrueName()); |
| | | }else if(CaseBaseConstsEnum.PERSON_TYPE_2.equals(casePerson.getPerType())){ |
| | | //被申请方 |
| | | if (StringUtils.isNotEmpty(defendants.toString())) { |
| | | defendants.append(BaseConsts.COMMA); |
| | | } |
| | | defendants.append(casePerson.getTrueName()); |
| | | } |
| | | plaintiffs.append(casePerson.getTrueName()); |
| | | peopleNum++; |
| | | |
| | | //判断是否为更新(用原有的Id对比性的Id) |
| | | if(oldPersonIds.contains(casePerson.getId())){ |
| | | personService.updateById(casePerson); |
| | | }else{ |
| | | casePerson.setCreateTime(now); |
| | | personService.save(casePerson); |
| | | } |
| | | |
| | | } |
| | | //保存代理人 |
| | | 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(CollectionUtils.isNotEmpty(agentList)) { |
| | | for (CaseAgent caseAgent : agentList) { |
| | | newAgentIdList.add(caseAgent.getId()); |
| | | caseAgent.setCaseId(registerSaveDTO.getId()); |
| | | caseAgent.setAgentTypeName(CaseBaseConstsEnum.getDes(caseAgent.getAgentType())); |
| | | caseAgent.setCustId(registerSaveDTO.getCustId()); |
| | | caseAgent.setUpdateTime(now); |
| | | //绑定当事人小程序 |
| | | this.setPartyUserId(caseAgent); |
| | | if(CaseBaseConstsEnum.PERSON_TYPE_3.equals(caseAgent.getPerType())) { |
| | | 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); |
| | | }else if(CaseBaseConstsEnum.PERSON_TYPE_4.equals(caseAgent.getPerType())) { |
| | | if (StringUtils.isNotEmpty(dagents.toString())) { |
| | | dagents.append(BaseConsts.COMMA); |
| | | } |
| | | dagents.append(caseAgent.getTrueName()); |
| | | //todo 绑定当事人小程序 |
| | | } |
| | | |
| | | //判断是否为更新(用原有的Id对比性的Id) |
| | | if(oldAgentIds.contains(caseAgent.getId())){ |
| | | agentService.updateById(caseAgent); |
| | | }else{ |
| | | caseAgent.setCreateTime(now); |
| | | agentService.save(caseAgent); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | // 删除冗余的申请人 |
| | | // 删除冗余的申请人(用新的Id对比旧的Id) |
| | | if (CollectionUtils.isNotEmpty(newPersonIdList)) { |
| | | List<String> oldPersonIdList = personService.listIdByCaseId(registerSaveDTO.getId()); |
| | | for (String oldPersonId : oldPersonIdList) { |
| | | if (!newPersonIdList.contains(oldPersonId)) { |
| | | personService.removeById(oldPersonId); |
| | | }else{ |
| | | |
| | | } |
| | | } |
| | | }else{ |
| | |
| | | } |
| | | //删除冗余的代理人 |
| | | if(CollectionUtils.isNotEmpty(newAgentIdList)){ |
| | | List<String> oldAgentIdList = agentService.listIdByCaseId(registerSaveDTO.getId()); |
| | | for(String oldAgentId: oldAgentIdList){ |
| | | if(!newAgentIdList.contains(oldAgentId)){ |
| | | agentService.removeById(oldAgentId); |
| | |
| | | caseAgentQueryWrapper.eq("case_id", registerSaveDTO.getId()); |
| | | agentService.remove(caseAgentQueryWrapper); |
| | | } |
| | | } |
| | | |
| | | return peopleNum; |
| | | /** |
| | | * PC端-查询纠纷信息 |
| | | * @param caseId 纠纷编号 |
| | | * @return CaseInfo 纠纷信息 |
| | | */ |
| | | public CaseInfoDTO getCaseInfo(String caseId){ |
| | | CaseInfo caseInfo = mapper.selectById(caseId); |
| | | CaseInfoDTO caseInfoDTO = new CaseInfoDTO(); |
| | | if (ObjectUtils.isNotEmpty(caseInfo)) { |
| | | |
| | | BeanUtils.copyProperties(caseInfo, caseInfoDTO); |
| | | //查询所有当事人 |
| | | QueryWrapper<CasePerson> personQueryWrapper = new QueryWrapper<>(); |
| | | personQueryWrapper.eq("case_id", caseId); |
| | | List<CasePerson> casePersonList = personService.list(personQueryWrapper); |
| | | |
| | | //查询所有代理人 |
| | | QueryWrapper<CaseAgent> caseAgentQueryWrapper = new QueryWrapper<>(); |
| | | caseAgentQueryWrapper.eq("case_id", caseId); |
| | | List<CaseAgent> caseAgentList = agentService.list(caseAgentQueryWrapper); |
| | | List<String> idList = new ArrayList<>(); |
| | | |
| | | idList.add(caseId); |
| | | idList.addAll(casePersonList.stream().map(CasePerson::getId).collect(Collectors.toList())); |
| | | idList.addAll(caseAgentList.stream().map(CaseAgent::getId).collect(Collectors.toList())); |
| | | String ids = idList.stream().map(String::valueOf).collect(Collectors.joining("','")); |
| | | ids = "'"+ ids + "'"; |
| | | Map<String, Object> term = new HashMap<>(); |
| | | term.put("ownerIds", ids); |
| | | //查询所有附件 |
| | | List<FileIdTypeInfoBaseDTO> fileInfoList = sysClient.listIdTypeInfoByOwnerIdList(term, caseId); |
| | | for(FileIdTypeInfoBaseDTO fileInfo: fileInfoList){ |
| | | if(caseId.equals(fileInfo.getOwnerId())){ |
| | | caseInfoDTO.setFileInfoList(fileInfo.getFileList()); |
| | | } |
| | | } |
| | | for(CasePerson casePerson: casePersonList){ |
| | | //把附件根据编号放入 |
| | | for(FileIdTypeInfoBaseDTO fileInfo: fileInfoList){ |
| | | if(casePerson.getId().equals(fileInfo.getOwnerId())){ |
| | | casePerson.setFileInfoList(fileInfo.getFileList()); |
| | | } |
| | | } |
| | | } |
| | | for(CaseAgent caseAgent: caseAgentList){ |
| | | for(FileIdTypeInfoBaseDTO fileInfo: fileInfoList){ |
| | | if(caseAgent.getId().equals(fileInfo.getOwnerId())){ |
| | | caseAgent.setFileInfoList(fileInfo.getFileList()); |
| | | } |
| | | } |
| | | } |
| | | caseInfoDTO.setPersonList(casePersonList); |
| | | caseInfoDTO.setAgentList(caseAgentList); |
| | | } |
| | | return caseInfoDTO; |
| | | } |
| | | |
| | | /** |
| | | * 绑定当事人小程序 |
| | | * @param casePerson 当事人信息 |
| | | */ |
| | | public void setPartyUserId(CasePerson casePerson) { |
| | | if (StringUtils.isEmpty(casePerson.getPartyUserId())) { |
| | | if (CaseBaseConstsEnum.CARD_TYPE_1.getIndex().equals(casePerson.getCertiType())) { |
| | | if (StringUtils.isNotEmpty(casePerson.getCertiNo())) { |
| | | WechatBindCaseDTO wechatBindCaseDTO = new WechatBindCaseDTO(); |
| | | if (CaseBaseConstsEnum.PERSON_CLASS_1.getIndex().equals(casePerson.getPerClass())) { |
| | | wechatBindCaseDTO.setTrueName(casePerson.getTrueName()); |
| | | } else { |
| | | wechatBindCaseDTO.setTrueName(casePerson.getDeputy()); |
| | | } |
| | | wechatBindCaseDTO.setIdcard(casePerson.getCertiNo()); |
| | | wechatBindCaseDTO.setCustId(casePerson.getCustId()); |
| | | String partyUserId = custClient.bindGetUserId(wechatBindCaseDTO); |
| | | casePerson.setPartyUserId(partyUserId); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 绑定当事人小程序 |
| | | * @param caseAgent 代理人人信息 |
| | | */ |
| | | public void setPartyUserId(CaseAgent caseAgent){ |
| | | if (StringUtils.isEmpty(caseAgent.getPartyUserId())) { |
| | | if (CaseBaseConstsEnum.CARD_TYPE_1.getIndex().equals(caseAgent.getCertiType())) { |
| | | if (StringUtils.isNotEmpty(caseAgent.getCertiNo())) { |
| | | WechatBindCaseDTO wechatBindCaseDTO = new WechatBindCaseDTO(); |
| | | wechatBindCaseDTO.setTrueName(caseAgent.getTrueName()); |
| | | wechatBindCaseDTO.setIdcard(caseAgent.getCertiNo()); |
| | | wechatBindCaseDTO.setCustId(caseAgent.getCustId()); |
| | | String partyUserId = custClient.bindGetUserId(wechatBindCaseDTO); |
| | | caseAgent.setPartyUserId(partyUserId); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | 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.po.CaseInfo; |
| | | import cn.huge.module.client.api.impl.CustClientImpl; |
| | | 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 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.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | @Autowired |
| | | private CustClientImpl custClient; |
| | | |
| | | /** |
| | | * 更新对象 |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * PC端-选择经办人 |
| | | * @param caseId 对象 |
| | | * @param userId 条件 |
| | | */ |
| | | public void choosePrincipal(String caseId, String userId){ |
| | | try{ |
| | | // 获取当前登录用户 |
| | | CtUserDTO loginUser = custClient.clientGetUserAll(userId); |
| | | CaseInfoUnfold CaseInfoUnfold = new CaseInfoUnfold(); |
| | | CaseInfoUnfold.setMediatorId(loginUser.getId()); |
| | | CaseInfoUnfold.setMediator(loginUser.getTrueName()); |
| | | CaseInfoUnfold.setMediatorMobile(loginUser.getMobile()); |
| | | Map<String, Object> terms = new HashMap<>(); |
| | | terms.put("case_id", caseId); |
| | | mapper.updateCaseInfoUnfoldTerms(CaseInfoUnfold, terms); |
| | | }catch (Exception e){ |
| | | log.error("[CaseInfoUnfoldService.choosePrincipal]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseInfoUnfoldService.choosePrincipal", e); |
| | | } |
| | | } |
| | | } |
| | |
| | | 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.po.CaseAgent; |
| | | 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.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| 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.CustClientImpl; |
| | | import cn.huge.module.client.api.impl.SysClientImpl; |
| | | import cn.huge.module.client.api.impl.UtilsClientImpl; |
| | | import cn.huge.module.cases.dao.mapper.CaseSuperviseMapper; |
| | | import cn.huge.module.cases.domain.po.CaseSupervise; |
| | | import cn.huge.module.cust.dto.CtUserDTO; |
| | | import cn.huge.module.sys.constant.FileOwnerTypeBaseEnum; |
| | | import cn.huge.module.sys.constant.SyTimeEnum; |
| | | import cn.huge.module.sys.dto.FileIdTypeInfoBaseDTO; |
| | | import cn.huge.module.sys.dto.FileInfoBaseDTO; |
| | | 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.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @title: 纠纷督办信息表业务逻辑处理 |
| | | * @Description 纠纷督办信息表业务逻辑处理 |
| | | * @company hugeinfo |
| | | * @author wangwh |
| | | * @Time 2024-09-03 10:53:01 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class CaseSuperviseService extends ServiceImpl<CaseSuperviseMapper, CaseSupervise>{ |
| | | |
| | | @Autowired |
| | | private CaseSuperviseMapper mapper; |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | @Autowired |
| | | private CustClientImpl custClient; |
| | | |
| | | @Autowired |
| | | private SysClientImpl sysClient; |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | public void updateCaseSuperviseTerms(CaseSupervise entity, Map<String, Object> terms){ |
| | | try{ |
| | | mapper.updateCaseSuperviseTerms(entity, terms); |
| | | }catch (Exception e){ |
| | | log.error("[CaseSuperviseService.updateCaseSuperviseTerms]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseSuperviseService.updateCaseSuperviseTerms", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | public void deleteCaseSupervise(String id){ |
| | | try{ |
| | | mapper.deleteCaseSupervise(id); |
| | | }catch (Exception e){ |
| | | log.error("[CaseSuperviseService.deleteCaseSupervise]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseSuperviseService.deleteCaseSupervise", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 按条件查询 |
| | | * @param terms 条件 |
| | | * @return List |
| | | */ |
| | | public List<CaseSupervise> 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<CaseSupervise> pageQuery(PageRequest page, Map<String, Object> terms){ |
| | | long total = mapper.countTerms(terms); |
| | | List<CaseSupervise> content = mapper.pageTerms(page, terms); |
| | | return new PageImpl<CaseSupervise>(content, page, total); |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @param caseSupervise 实体对象 |
| | | */ |
| | | public void saveCaseSupervise(CaseSupervise caseSupervise){ |
| | | try{ |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 判断是否新增 |
| | | if (IdUtils.checkNewId(caseSupervise.getId())){ |
| | | caseSupervise.setId(utilsClient.getNewTimeId()); |
| | | caseSupervise.setCreateTime(nowDate); |
| | | } |
| | | caseSupervise.setUpdateTime(nowDate); |
| | | this.saveOrUpdate(caseSupervise); |
| | | }catch (Exception e){ |
| | | log.error("[CaseSuperviseService.saveCaseSupervise]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseSuperviseService.saveCaseSupervise", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 添加督办 |
| | | * @param caseSupervise 实体对象 |
| | | * @param userId 用户信息编号 |
| | | */ |
| | | public void addCaseSupervise(CaseSupervise caseSupervise, String userId){ |
| | | try{ |
| | | // 获取当前登录用户 |
| | | CtUserDTO loginUser = custClient.clientGetUserAll(userId); |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | caseSupervise.setSupUserId(loginUser.getId()); |
| | | caseSupervise.setSupUserName(loginUser.getTrueName()); |
| | | caseSupervise.setSupTime(nowDate); |
| | | caseSupervise.setSupStatus(0); |
| | | caseSupervise.setCreateTime(nowDate); |
| | | caseSupervise.setUpdateTime(nowDate); |
| | | //todo 配置时限 |
| | | Integer timeTerm = sysClient.getTimeLimit("dyh_case_supervise", SyTimeEnum.SY_TIME_03.getIndex()); |
| | | caseSupervise.setReplyTerm(timeTerm); |
| | | this.save(caseSupervise); |
| | | }catch (Exception e){ |
| | | log.error("[CaseSuperviseService.saveCaseSupervise]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseSuperviseService.saveCaseSupervise", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 回复督办 |
| | | * @param caseSupervise 对象 |
| | | */ |
| | | public void replyCaseSupervise(CaseSupervise caseSupervise, String userId){ |
| | | try{ |
| | | // 获取当前登录用户 |
| | | CtUserDTO loginUser = custClient.clientGetUserAll(userId); |
| | | Date now = DateUtils.getNowDate(); |
| | | caseSupervise.setSupStatus(1); |
| | | caseSupervise.setReplyUserId(loginUser.getId()); |
| | | caseSupervise.setReplyUserName(loginUser.getTrueName()); |
| | | caseSupervise.setReplyTime(String.valueOf(now)); |
| | | caseSupervise.setUpdateTime(now); |
| | | mapper.updateCaseSupervise(caseSupervise); |
| | | }catch (Exception e){ |
| | | log.error("[CaseSuperviseService.replyCaseSupervise]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseSuperviseService.replyCaseSupervise", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 流转办理-督办列表 |
| | | * @param caseId 事项Id |
| | | */ |
| | | public Map<String, Object> listCaseSupervise(String caseId){ |
| | | try{ |
| | | List<CaseSupervise> repliedList = new ArrayList<>(); |
| | | List<CaseSupervise> noReplyList = new ArrayList<>(); |
| | | QueryWrapper<CaseSupervise> caseSuperviseQueryWrapper = new QueryWrapper<>(); |
| | | caseSuperviseQueryWrapper.eq("case_id", caseId); |
| | | List<CaseSupervise> caseSuperviseList = mapper.selectList(caseSuperviseQueryWrapper); |
| | | |
| | | Map<String, Object>map = new HashMap<>(); |
| | | map.put("ownerIds", caseSuperviseList.stream().map(CaseSupervise::getId).collect(Collectors.joining("','"))); |
| | | map.put("types", FileOwnerTypeBaseEnum.OWNER_TYPE_506.getIndex()); |
| | | List<FileIdTypeInfoBaseDTO> fileIdTypeInfoBaseDTOList = sysClient.listIdTypeInfoByOwnerIdList(map, caseId); |
| | | for(CaseSupervise caseSupervise: caseSuperviseList){ |
| | | for(FileIdTypeInfoBaseDTO fileIdTypeInfoBaseDTO: fileIdTypeInfoBaseDTOList){ |
| | | if(caseSupervise.getId().equals(fileIdTypeInfoBaseDTO.getOwnerId())){ |
| | | caseSupervise.setFileInfoList(fileIdTypeInfoBaseDTO.getFileList()); |
| | | } |
| | | } |
| | | if(0 == caseSupervise.getSupStatus()){ |
| | | noReplyList.add(caseSupervise); |
| | | }else if(1 == caseSupervise.getSupStatus()){ |
| | | repliedList.add(caseSupervise); |
| | | } |
| | | } |
| | | int count = noReplyList.size(); |
| | | Map<String, Object> result = new HashMap<>(); |
| | | result.put("count", count); |
| | | result.put("noReplyList", noReplyList); |
| | | result.put("repliedList", repliedList); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("[CaseSuperviseService.listCaseSupervise]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseSuperviseService.listCaseSupervise", e); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package cn.huge.module.client.api; |
| | | |
| | | import cn.huge.base.common.bo.ReturnBO; |
| | | import cn.huge.module.mediate.dto.WechatBindCaseDTO; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | /** |
| | |
| | | @GetMapping("/api/client/paUser/clientGetUserAll") |
| | | ReturnBO paclientGetUser(@RequestParam("userId") String userId); |
| | | |
| | | /** |
| | | * pc端提交案件后-获取相关当事人用户编号 |
| | | * @url {ctx}/api/weChat/paUser/bindGetUserId |
| | | * @param wechatBindCaseDTO 实体对象 |
| | | * @return ReturnBO |
| | | */ |
| | | @PostMapping("/api/wechat/paUser/bindGetUserId") |
| | | ReturnBO bindGetUserId(@RequestBody WechatBindCaseDTO wechatBindCaseDTO); |
| | | |
| | | } |
| | |
| | | package cn.huge.module.client.api; |
| | | |
| | | import cn.huge.base.common.bo.ReturnBO; |
| | | import cn.huge.module.sys.dto.FileTypeTermsDTO; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @title: 系统公共服务微服务调用接口 |
| | |
| | | /** |
| | | * 附件中心-根据多个所属编号查询附件并根据先根据ownerId再根据附件类型分组 |
| | | * @url {ctx}/api/v1/fileInfo/listTypeInfoByOwnerIds?ownerIds= |
| | | * @param ownerIdList 所属业务编号 |
| | | * @param term 所属业务编号 |
| | | * @return ReturnBO |
| | | */ |
| | | @GetMapping("/api/client/fileInfo/listIdTypeInfoByOwnerIdList") |
| | | ReturnBO listTypeInfoByOwnerIdList(@RequestParam(value = "ownerIdList") List<String> ownerIdList); |
| | | @PostMapping("/api/client/fileInfo/listIdTypeInfoByOwnerIdList") |
| | | ReturnBO listTypeInfoByOwnerIdList(@RequestBody Map<String, Object> term, @RequestParam(value = "mainId") String mainId); |
| | | |
| | | /** |
| | | * 附件中心-根据多个所属编号查询附件 |
| | | * @url {ctx}/api/v1/fileInfo/listInfoByOwnerIdList?ownerIds= |
| | | * @param ownerIdList 所属业务编号 |
| | | * @param term 所属业务编号 |
| | | * @return ReturnBO |
| | | */ |
| | | @GetMapping("/api/client/fileInfo/listInfoByOwnerIdList") |
| | | ReturnBO listInfoByOwnerIdList(@RequestParam(value = "ownerIdList") List<String> ownerIdList); |
| | | @PostMapping("/api/client/fileInfo/listInfoByOwnerIdList") |
| | | ReturnBO listInfoByOwnerIdList(@RequestBody Map<String, Object> term, @RequestParam(value = "mainId") String mainId); |
| | | |
| | | /** |
| | | * 附件中心-根据多个所属编号查询附件 |
| | | * @url {ctx}/api/v1/fileInfo/listInfoByOwnerIdList?ownerIds= |
| | | * @param limitTable 表名 |
| | | * @param limitType 时限类型 |
| | | * @return ReturnBO |
| | | */ |
| | | @GetMapping("/api/client/syTimeLimit/getTimeLimit") |
| | | ReturnBO getTimeLimit(@RequestParam String limitTable, @RequestParam(value = "limitType") String limitType); |
| | | |
| | | /** |
| | | * 根据条件删除附件关系 |
| | | * @url {ctx}/api/v1/fileRelate/removeFileRelate |
| | | * @param fileTypeTermsDTO 条件 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/api/client/fileRelate/removeFileRelate") |
| | | ReturnBO removeFileRelate(@RequestBody FileTypeTermsDTO fileTypeTermsDTO); |
| | | } |
| | |
| | | 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 com.alibaba.fastjson.JSON; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * pc端提交案件后-获取相关当事人用户编号 |
| | | * @param wechatBindCaseDTO 实体对象 |
| | | * @return ReturnBO |
| | | */ |
| | | public String bindGetUserId(WechatBindCaseDTO wechatBindCaseDTO){ |
| | | String userId = null; |
| | | try{ |
| | | ReturnBO returnBo = custClient.bindGetUserId(wechatBindCaseDTO); |
| | | if (ReturnConsts.OK == returnBo.getCode()){ |
| | | userId = (String) returnBo.getData(); |
| | | }else{ |
| | | log.error("Client外服务接口[CustClientImpl.bindGetUserId]请求异常:" + returnBo.getMsg(), returnBo.getMsg()); |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("service方法[CustClientImpl.bindGetUserId]调用异常:"+e, e); |
| | | } |
| | | return userId; |
| | | } |
| | | } |
| | |
| | | import cn.huge.base.common.exception.ServiceException; |
| | | import cn.huge.base.common.utils.ObjectUtils; |
| | | import cn.huge.module.client.api.SysClient; |
| | | import cn.huge.module.sys.dto.FileIdInfoBaseDTO; |
| | | import cn.huge.module.sys.dto.FileIdTypeInfoBaseDTO; |
| | | import cn.huge.module.sys.dto.FileInfoBaseDTO; |
| | | import cn.huge.module.sys.dto.FileTypeInfoBaseDTO; |
| | | import cn.huge.module.sys.dto.*; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.LinkedHashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @title: 系统公共服务微服务调用接口 |
| | |
| | | |
| | | /** |
| | | * 附件中心-根据多个所属编号查询附件并根据先根据ownerId再根据附件类型分组 |
| | | * @param ownerIdList 所属业务编号 |
| | | * @param term 所属业务编号 |
| | | * @return List |
| | | */ |
| | | public List<FileIdTypeInfoBaseDTO> listIdTypeInfoByOwnerIdList(List<String> ownerIdList){ |
| | | public List<FileIdTypeInfoBaseDTO> listIdTypeInfoByOwnerIdList(Map<String, Object> term, String mainId){ |
| | | List<FileIdTypeInfoBaseDTO> fileIdTypeInfoBaseDTOList = new ArrayList<>(); |
| | | try{ |
| | | ReturnBO returnBo = sysClient.listTypeInfoByOwnerIdList(ownerIdList); |
| | | ReturnBO returnBo = sysClient.listTypeInfoByOwnerIdList(term, mainId); |
| | | if (ReturnConsts.OK == returnBo.getCode()){ |
| | | if (ObjectUtils.isNotEmpty(returnBo.getData())){ |
| | | List<LinkedHashMap> list = (List<LinkedHashMap>) returnBo.getData(); |
| | |
| | | |
| | | /** |
| | | * 附件中心-根据业务编号查询固定格式所有附件 |
| | | * @param ownerIdList 所属业务编号 |
| | | * @param term 所属业务编号 |
| | | * @return List |
| | | */ |
| | | public List<FileIdInfoBaseDTO> listIdInfoByOwnerIdList(List<String> ownerIdList){ |
| | | public List<FileIdInfoBaseDTO> listIdInfoByOwnerIdList(Map<String, Object> term, String mainId){ |
| | | List<FileIdInfoBaseDTO> fileIdInfoBaseDTOList = new ArrayList<>(); |
| | | try{ |
| | | ReturnBO returnBo = sysClient.listInfoByOwnerIdList(ownerIdList); |
| | | ReturnBO returnBo = sysClient.listInfoByOwnerIdList(term, mainId); |
| | | if (ReturnConsts.OK == returnBo.getCode()){ |
| | | if (ObjectUtils.isNotEmpty(returnBo.getData())){ |
| | | List<LinkedHashMap> list = (List<LinkedHashMap>) returnBo.getData(); |
| | |
| | | } |
| | | return fileIdInfoBaseDTOList; |
| | | } |
| | | |
| | | /** |
| | | * 附件中心-根据业务编号查询固定格式所有附件 |
| | | * @param limitTable 表名 |
| | | * @param limitType 时限类型 |
| | | * @return List |
| | | */ |
| | | public Integer getTimeLimit(String limitTable, String limitType){ |
| | | int timeTerm = 0; |
| | | try{ |
| | | ReturnBO returnBo = sysClient.getTimeLimit(limitTable, limitType); |
| | | if (ReturnConsts.OK == returnBo.getCode()){ |
| | | if (ObjectUtils.isNotEmpty(returnBo.getData())){ |
| | | timeTerm = (int)returnBo.getData(); |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("service方法[SysClientImpl.listIdInfoByOwnerIdList]调用异常:"+e, e); |
| | | } |
| | | return timeTerm; |
| | | } |
| | | |
| | | /** |
| | | * 根据条件删除附件关系 |
| | | * @param fileTypeTermsDTO 条件 |
| | | * @return Object |
| | | */ |
| | | public void removeFileRelate(FileTypeTermsDTO fileTypeTermsDTO) { |
| | | try { |
| | | ReturnBO returnBo = sysClient.removeFileRelate(fileTypeTermsDTO); |
| | | if (ReturnConsts.OK != returnBo.getCode()){ |
| | | log.error("Client外服务接口[SysClientImpl.removeFileRelate]请求异常:" + returnBo.getMsg(), returnBo.getMsg()); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("service方法[SysClientImpl.removeFileRelate]请求异常:"+e, e); |
| | | } |
| | | } |
| | | } |
| | |
| | | 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)){ |
| | |
| | | } |
| | | |
| | | /** |
| | | * PC端-纠纷登记-草稿箱-保存纠纷信息 |
| | | * @url {ctx}/api/v1/casedraftInfo/caseDraftRegister |
| | | * PC端-纠纷登记-保存纠纷信息草稿 |
| | | * @url {ctx}/api/web/casedraftInfo/caseDraftRegister |
| | | * @param draftRegisterSaveDTO 实体对象 |
| | | */ |
| | | @PostMapping("/caseDraftRegister") |
| | |
| | | return ReturnFailUtils.getRepInfo(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * PC端-正式案件-查询纠纷信息草稿 |
| | | * @url {ctx}/api/web/casedraftInfo/getCasedraftInfo?id= |
| | | * @param id 纠纷编号 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/getCasedraftInfo") |
| | | public Object getCasedraftInfo(@RequestParam(value = "id") String id) { |
| | | try { |
| | | return ReturnSucUtils.getRepInfo(service.getCasedraftInfo(id)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | |
| | | <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"/> |
| | |
| | | id, |
| | | case_id, |
| | | party_user_id, |
| | | per_type, |
| | | per_type_name, |
| | | per_class, |
| | | per_class_name, |
| | | true_name, |
| | |
| | | <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="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> |
| 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.CasedraftPerson; |
| | | import cn.huge.module.sys.dto.FileTypeInfoBaseDTO; |
| | | 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 CasedraftInfoDTO extends CaseInfo { |
| | | |
| | | /** |
| | | * 申请人列表 |
| | | */ |
| | | private List<CasedraftPerson> personList; |
| | | |
| | | /** |
| | | * 申请人代理人列表 |
| | | */ |
| | | private List<CasedraftAgent> agentList; |
| | | |
| | | /** |
| | | * 附件列表 |
| | | */ |
| | | private List<FileTypeInfoBaseDTO> fileInfoList; |
| | | |
| | | |
| | | /** |
| | | * 相关附件数量 |
| | | */ |
| | | private Integer fileSize; |
| | | |
| | | |
| | | } |
| | |
| | | public class DraftRegisterSaveDTO extends CasedraftInfo { |
| | | |
| | | /** |
| | | * 申请人列表 |
| | | * 当事人列表 |
| | | */ |
| | | private List<CasedraftPerson> plaintiffList; |
| | | private List<CasedraftPerson> personList; |
| | | |
| | | /** |
| | | * 申请人代理人列表 |
| | | * 当事人代理人列表 |
| | | */ |
| | | 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; |
| | | private List<CasedraftAgent> agentList; |
| | | } |
| | |
| | | package cn.huge.module.draft.domain.po; |
| | | |
| | | import cn.huge.module.sys.dto.FileTypeInfoBaseDTO; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: 纠纷代理人信息草稿表数据库对应关系类 |
| | |
| | | */ |
| | | @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 = "update_time") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 附件列表 |
| | | */ |
| | | @TableField(exist = false) |
| | | private List<FileTypeInfoBaseDTO> fileInfoList; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | |
| | | /** |
| | | * 来访时间 |
| | | */ |
| | | @JsonFormat(pattern="yyyy-MM-dd HH:mm", timezone="GMT+8") |
| | | @TableField(value = "visit_time") |
| | | private Date visitTime; |
| | | |
| | |
| | | /** |
| | | * 纠纷发生时间 |
| | | */ |
| | | @JsonFormat(pattern="yyyy-MM-dd HH:mm", timezone="GMT+8") |
| | | @TableField(value = "occur_time") |
| | | private Date occurTime; |
| | | |
| | |
| | | package cn.huge.module.draft.domain.po; |
| | | |
| | | import cn.huge.module.sys.dto.FileTypeInfoBaseDTO; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: 纠纷当事人信息草稿表数据库对应关系类 |
| | |
| | | @TableField(value = "update_time") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 附件列表 |
| | | */ |
| | | @TableField(exist = false) |
| | | private List<FileTypeInfoBaseDTO> fileInfoList; |
| | | } |
| | |
| | | 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.CaseInfoDTO; |
| | | 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.client.api.impl.CustClientImpl; |
| | | import cn.huge.module.client.api.impl.SysClientImpl; |
| | | import cn.huge.module.client.api.impl.UtilsClientImpl; |
| | | import cn.huge.module.constant.BaseConsts; |
| | | import cn.huge.module.mediate.constant.CaseBaseConsts; |
| | | import cn.huge.module.mediate.constant.CaseBaseConstsEnum; |
| | | import cn.huge.module.cust.dto.CtUserDTO; |
| | | import cn.huge.module.draft.dao.mapper.CasedraftInfoMapper; |
| | | import cn.huge.module.draft.domain.dto.CasedraftInfoDTO; |
| | | 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 cn.huge.module.sys.dto.FileIdTypeInfoBaseDTO; |
| | | import cn.huge.module.sys.dto.FileTypeTermsDTO; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | |
| | | import org.springframework.data.domain.PageRequest; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @title: 纠纷信息草稿表业务逻辑处理 |
| | |
| | | |
| | | @Autowired |
| | | private CustClientImpl custClient; |
| | | |
| | | @Autowired |
| | | private SysClientImpl sysClient; |
| | | |
| | | /** |
| | | * 更新对象 |
| | |
| | | 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.setCustId(loginUser.getCustId()); |
| | | casedraftInfo.setUpdateTime(nowDate); |
| | | //todo case_title |
| | | |
| | | // 常规登记-保存当事人 |
| | | peopleNum += this.saveCaseDraftPerson(draftRegisterSaveDTO, plaintiffs, pagents, defendants, dagents); |
| | | casedraftInfo.setPeopleNum(peopleNum); |
| | | this.saveCaseDraftPerson(draftRegisterSaveDTO, plaintiffs, pagents, defendants, dagents); |
| | | casedraftInfo.setPlaintiffs(plaintiffs.toString()); |
| | | casedraftInfo.setPagents(pagents.toString()); |
| | | casedraftInfo.setDefendants(defendants.toString()); |
| | | casedraftInfo.setDagents(dagents.toString()); |
| | | |
| | | |
| | | this.saveOrUpdate(casedraftInfo); |
| | | |
| | |
| | | * @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()); |
| | | private void saveCaseDraftPerson(DraftRegisterSaveDTO draftRegisterSaveDTO, StringBuffer plaintiffs, StringBuffer pagents, |
| | | StringBuffer defendants, StringBuffer dagents){ |
| | | |
| | | Date now = DateUtils.getNowDate(); |
| | | |
| | | List<CasedraftPerson> casedraftPersonList = draftRegisterSaveDTO.getPersonList(); |
| | | List<CasedraftAgent> casedraftAgentList = draftRegisterSaveDTO.getAgentList(); |
| | | |
| | | //查出已存在的当事人和代理人编号 |
| | | List<String> oldPersonIdList = draftPersonService.listIdByCaseId(draftRegisterSaveDTO.getId()); |
| | | List<String> oldAgentIdList = draftAgentService.listIdByCaseId(draftRegisterSaveDTO.getId()); |
| | | String oldPersonIds = oldPersonIdList.stream().map(String::valueOf).collect(Collectors.joining(",")); |
| | | String oldAgentIds = oldAgentIdList.stream().map(String::valueOf).collect(Collectors.joining(",")); |
| | | List<String> newPersonIdList = new ArrayList<>(); |
| | | List<String> newAgentIdList = new ArrayList<>(); |
| | | |
| | | if(CollectionUtils.isNotEmpty(casedraftPersonList)){ |
| | | for(CasedraftPerson casedraftPerson: casedraftPersonList){ |
| | | newPersonIdList.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()); |
| | | casedraftPerson.setUpdateTime(now); |
| | | |
| | | draftPersonService.saveOrUpdate(casedraftPerson); |
| | | |
| | | if (StringUtils.isNotEmpty(plaintiffs.toString())) { |
| | | plaintiffs.append(BaseConsts.COMMA); |
| | | //添加申请方和被申请方人名组合 |
| | | if(CaseBaseConstsEnum.PERSON_TYPE_1.equals(casedraftPerson.getPerType())){ |
| | | //申请方 |
| | | if (StringUtils.isNotEmpty(plaintiffs.toString())) { |
| | | plaintiffs.append(BaseConsts.COMMA); |
| | | } |
| | | plaintiffs.append(casedraftPerson.getTrueName()); |
| | | }else if(CaseBaseConstsEnum.PERSON_TYPE_2.equals(casedraftPerson.getPerType())){ |
| | | //被申请方 |
| | | if (StringUtils.isNotEmpty(defendants.toString())) { |
| | | defendants.append(BaseConsts.COMMA); |
| | | } |
| | | defendants.append(casedraftPerson.getTrueName()); |
| | | } |
| | | plaintiffs.append(casedraftPerson.getTrueName()); |
| | | peopleNum++; |
| | | |
| | | //判断是否为更新(用原有的Id对比性的Id) |
| | | if(oldPersonIds.contains(casedraftPerson.getId())){ |
| | | draftPersonService.updateById(casedraftPerson); |
| | | }else{ |
| | | casedraftPerson.setCreateTime(now); |
| | | draftPersonService.save(casedraftPerson); |
| | | } |
| | | |
| | | } |
| | | //保存代理人 |
| | | 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(CollectionUtils.isNotEmpty(casedraftAgentList)) { |
| | | for (CasedraftAgent casedraftAgent : casedraftAgentList) { |
| | | newAgentIdList.add(casedraftAgent.getId()); |
| | | casedraftAgent.setCaseId(draftRegisterSaveDTO.getId()); |
| | | casedraftAgent.setAgentTypeName(CaseBaseConstsEnum.getDes(casedraftAgent.getAgentType())); |
| | | casedraftAgent.setCustId(draftRegisterSaveDTO.getCustId()); |
| | | casedraftAgent.setUpdateTime(now); |
| | | |
| | | if(CaseBaseConstsEnum.PERSON_TYPE_3.equals(casedraftAgent.getPerType())) { |
| | | 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); |
| | | }else if(CaseBaseConstsEnum.PERSON_TYPE_4.equals(casedraftAgent.getPerType())) { |
| | | if (StringUtils.isNotEmpty(dagents.toString())) { |
| | | dagents.append(BaseConsts.COMMA); |
| | | } |
| | | dagents.append(casedraftAgent.getTrueName()); |
| | | } |
| | | } |
| | | |
| | | //判断是否为更新(用原有的Id对比性的Id) |
| | | if(oldAgentIds.contains(casedraftAgent.getId())){ |
| | | draftAgentService.updateById(casedraftAgent); |
| | | }else{ |
| | | casedraftAgent.setCreateTime(now); |
| | | draftAgentService.save(casedraftAgent); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 删除冗余的申请人 |
| | | if (CollectionUtils.isNotEmpty(newDraftPersonIdList)) { |
| | | List<String> oldPersonIdList = draftPersonService.listIdByCaseId(draftRegisterSaveDTO.getId()); |
| | | // 删除冗余的申请人(用新的Id对比旧的Id) |
| | | if (CollectionUtils.isNotEmpty(newPersonIdList)) { |
| | | for (String oldPersonId : oldPersonIdList) { |
| | | if (!newDraftPersonIdList.contains(oldPersonId)) { |
| | | if (!newPersonIdList.contains(oldPersonId)) { |
| | | draftPersonService.removeById(oldPersonId); |
| | | } |
| | | } |
| | | }else{ |
| | | QueryWrapper<CasedraftPerson> casedraftPersonQueryWrapper = new QueryWrapper<>(); |
| | | casedraftPersonQueryWrapper.eq("case_id", draftRegisterSaveDTO.getId()); |
| | | draftPersonService.remove(casedraftPersonQueryWrapper); |
| | | QueryWrapper<CasedraftPerson> casePersonQueryWrapper = new QueryWrapper<>(); |
| | | casePersonQueryWrapper.eq("case_id", draftRegisterSaveDTO.getId()); |
| | | draftPersonService.remove(casePersonQueryWrapper); |
| | | } |
| | | //删除冗余的代理人 |
| | | if(CollectionUtils.isNotEmpty(newDraftAgentIdList)){ |
| | | List<String> oldAgentIdList = draftAgentService.listIdByCaseId(draftRegisterSaveDTO.getId()); |
| | | if(CollectionUtils.isNotEmpty(newAgentIdList)){ |
| | | for(String oldAgentId: oldAgentIdList){ |
| | | if(!newDraftAgentIdList.contains(oldAgentId)){ |
| | | if(!newAgentIdList.contains(oldAgentId)){ |
| | | draftAgentService.removeById(oldAgentId); |
| | | } |
| | | } |
| | | }else{ |
| | | QueryWrapper<CasedraftAgent> casedraftAgentQueryWrapper = new QueryWrapper<>(); |
| | | casedraftAgentQueryWrapper.eq("case_id", draftRegisterSaveDTO.getId()); |
| | | draftAgentService.remove(casedraftAgentQueryWrapper); |
| | | QueryWrapper<CasedraftAgent> caseAgentQueryWrapper = new QueryWrapper<>(); |
| | | caseAgentQueryWrapper.eq("case_id", draftRegisterSaveDTO.getId()); |
| | | draftAgentService.remove(caseAgentQueryWrapper); |
| | | } |
| | | |
| | | return peopleNum; |
| | | } |
| | | |
| | | /** |
| | |
| | | try{ |
| | | // 删除纠纷草稿信息 |
| | | QueryWrapper<CasedraftInfo> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("serie_no", caseId); |
| | | queryWrapper.eq("id", caseId); |
| | | List<CasedraftInfo> draftInfoList = mapper.selectList(queryWrapper); |
| | | List<String> ownerIdList = new ArrayList<>(); |
| | | for (CasedraftInfo casedraftInfo : draftInfoList) { |
| | |
| | | QueryWrapper<CasedraftAgent> casedraftAgentQueryWrapper = new QueryWrapper<>(); |
| | | casedraftAgentQueryWrapper.eq("case_id", casedraftInfo.getId()); |
| | | //todo 删除附件关系 |
| | | // FileTypeTermsDTO fileTypeTermsDTO = new FileTypeTermsDTO(); |
| | | // fileTypeTermsDTO.setOwnerIdList(ownerIdList); |
| | | // sysClient.removeFileRelate(fileTypeTermsDTO); |
| | | 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); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * PC端-查询纠纷信息 |
| | | * @param caseId 纠纷编号 |
| | | * @return CaseInfo 纠纷信息 |
| | | */ |
| | | public CasedraftInfoDTO getCasedraftInfo(String caseId){ |
| | | CasedraftInfo casedraftInfo = mapper.selectById(caseId); |
| | | CasedraftInfoDTO caseInfoDTO = new CasedraftInfoDTO(); |
| | | if (ObjectUtils.isNotEmpty(casedraftInfo)) { |
| | | |
| | | BeanUtils.copyProperties(casedraftInfo, caseInfoDTO); |
| | | //查询所有当事人 |
| | | QueryWrapper<CasedraftPerson> draftPersonQueryWrapper = new QueryWrapper<>(); |
| | | draftPersonQueryWrapper.eq("case_id", caseId); |
| | | List<CasedraftPerson> casePersonList = draftPersonService.list(draftPersonQueryWrapper); |
| | | |
| | | //查询所有代理人 |
| | | QueryWrapper<CasedraftAgent> casedraftAgentQueryWrapper = new QueryWrapper<>(); |
| | | casedraftAgentQueryWrapper.eq("case_id", caseId); |
| | | List<CasedraftAgent> caseAgentList = draftAgentService.list(casedraftAgentQueryWrapper); |
| | | List<String> idList = new ArrayList<>(); |
| | | |
| | | idList.add(caseId); |
| | | idList.addAll(casePersonList.stream().map(CasedraftPerson::getId).collect(Collectors.toList())); |
| | | idList.addAll(caseAgentList.stream().map(CasedraftAgent::getId).collect(Collectors.toList())); |
| | | String ids = idList.stream().map(String::valueOf).collect(Collectors.joining("','")); |
| | | ids = "'"+ ids + "'"; |
| | | Map<String, Object> term = new HashMap<>(); |
| | | term.put("ownerIds", ids); |
| | | //查询所有附件 |
| | | List<FileIdTypeInfoBaseDTO> fileInfoList = sysClient.listIdTypeInfoByOwnerIdList(term, caseId); |
| | | //把附件根据编号放入 |
| | | for(FileIdTypeInfoBaseDTO fileInfo: fileInfoList){ |
| | | if(caseId.equals(fileInfo.getOwnerId())){ |
| | | caseInfoDTO.setFileInfoList(fileInfo.getFileList()); |
| | | } |
| | | } |
| | | for(CasedraftPerson casePerson: casePersonList){ |
| | | for(FileIdTypeInfoBaseDTO fileInfo: fileInfoList){ |
| | | if(casePerson.getId().equals(fileInfo.getOwnerId())){ |
| | | casePerson.setFileInfoList(fileInfo.getFileList()); |
| | | } |
| | | } |
| | | } |
| | | for(CasedraftAgent caseAgent: caseAgentList){ |
| | | for(FileIdTypeInfoBaseDTO fileInfo: fileInfoList){ |
| | | if(caseAgent.getId().equals(fileInfo.getOwnerId())){ |
| | | caseAgent.setFileInfoList(fileInfo.getFileList()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | caseInfoDTO.setPersonList(casePersonList); |
| | | caseInfoDTO.setAgentList(caseAgentList); |
| | | } |
| | | return caseInfoDTO; |
| | | } |
| | | } |
| | |
| | | |
| | | /** |
| | | * 数据迁移通用接口 |
| | | * @url {ctx}/api/web/ctUnit/universalSync |
| | | * @url {ctx}/api/sync/ctUnit/universalSync |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/universalSync") |
| New file |
| | |
| | | package cn.huge.module.file.controller.client; |
| | | |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.module.file.service.FileInfoService; |
| | | import io.lettuce.core.dynamic.annotation.Param; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @title: 附件信息表接口api-web端 |
| | | * @description: 附件信息表接口api-web端 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-08-28 20:06:18 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/client/fileInfo") |
| | | public class FileInfoClientController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private FileInfoService service; |
| | | |
| | | /** |
| | | * 根据多个所属编号查询附件并根据先根据ownerId再根据附件类型分组 |
| | | * @url {ctx}/api/client/fileRelate/listIdTypeInfoByOwnerIdList |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/listIdTypeInfoByOwnerIdList") |
| | | public Object listIdTypeInfoByOwnerIdList(@RequestBody Map<String, Object> term, @RequestParam(value = "mainId") String mainId) { |
| | | try { |
| | | return ReturnSucUtils.getRepInfo(service.listIdTypeInfoByOwnerIdList(term, mainId)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据多个所属编号查询附件 |
| | | * @url {ctx}/api/client/fileRelate/listInfoByOwnerIdList |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/listInfoByOwnerIdList") |
| | | public Object listInfoByOwnerIdList(@RequestBody Map<String, Object> term, @RequestParam(value = "mainId") String mainId) { |
| | | try { |
| | | return ReturnSucUtils.getRepInfo(service.listInfoByOwnerIdList(term, mainId)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.huge.module.file.controller.client; |
| | | |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.module.file.service.FileRelateService; |
| | | import cn.huge.module.sys.dto.FileTypeTermsDTO; |
| | | 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.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @title: 附件关系表接口api-web端 |
| | | * @description: 附件关系表接口api-web端 |
| | | * @company: hugeinfo |
| | | * @author: liyj |
| | | * @time: 2024-08-28 20:06:19 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/client/fileRelate") |
| | | public class FileRelateClientController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private FileRelateService 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 fileId = request.getParameter("fileId"); |
| | | if (StringUtils.isNotBlank(fileId)){ |
| | | terms.put("fileId", fileId); |
| | | } |
| | | // 所属业务编号 |
| | | String ownerId = request.getParameter("ownerId"); |
| | | if (StringUtils.isNotBlank(ownerId)){ |
| | | terms.put("ownerId", ownerId); |
| | | } |
| | | // 所属业务大类 |
| | | String ownerCat = request.getParameter("ownerCat"); |
| | | if (StringUtils.isNotBlank(ownerCat)){ |
| | | terms.put("ownerCat", ownerCat); |
| | | } |
| | | // 所属业务类型 |
| | | String ownerType = request.getParameter("ownerType"); |
| | | if (StringUtils.isNotBlank(ownerType)){ |
| | | terms.put("ownerType", ownerType); |
| | | } |
| | | // 上传人编号 |
| | | String uploaderId = request.getParameter("uploaderId"); |
| | | if (StringUtils.isNotBlank(uploaderId)){ |
| | | terms.put("uploaderId", uploaderId); |
| | | } |
| | | // 上传人姓名 |
| | | String uploaderName = request.getParameter("uploaderName"); |
| | | if (StringUtils.isNotBlank(uploaderName)){ |
| | | terms.put("uploaderName", uploaderName); |
| | | } |
| | | // 上传人类型,1:工作人员,2:申请方,3:被申请方 |
| | | String uploaderType = request.getParameter("uploaderType"); |
| | | if (StringUtils.isNotBlank(uploaderType)){ |
| | | terms.put("uploaderType", uploaderType); |
| | | } |
| | | // 顾客编号 |
| | | 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/v1/fileRelate/removeFileRelate |
| | | * @param fileTypeTermsDTO 条件 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/removeFileRelate") |
| | | public Object removeFileRelate(@RequestBody FileTypeTermsDTO fileTypeTermsDTO) { |
| | | try { |
| | | service.removeOne(fileTypeTermsDTO); |
| | | service.removeAll(fileTypeTermsDTO); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | } |
| | |
| | | package cn.huge.module.file.controller.web; |
| | | |
| | | import cn.huge.base.common.exception.ClientException; |
| | | import cn.huge.module.sys.dto.IdcardOcrResultDTO; |
| | | import cn.huge.module.utils.BaiduOcrUtils; |
| | | import cn.huge.base.common.utils.ContentTypeUtils; |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | |
| | | } |
| | | |
| | | /** |
| | | * ocr识别文字 |
| | | * @url {ctx}/api/web/fileInfo/recognitionText?ownerId=&ownerType= |
| | | * @param request |
| | | * @return Object |
| | | */ |
| | | @PostMapping(value = "/recognitionText") |
| | | public Object recognitionText(MultipartHttpServletRequest request){ |
| | | try{ |
| | | Map<String , Object> result = Maps.newHashMap(); |
| | | Iterator<String> itr = request.getFileNames(); |
| | | while (itr.hasNext()) { |
| | | MultipartFile file = request.getFile(itr.next()); |
| | | try{ |
| | | Map<String , Object> map = BaiduOcrUtils.ocrText(file.getBytes()); |
| | | result.put("ocrResult", map); |
| | | }catch (Exception e){ |
| | | log.error("Controller接口[FileInfoController.recognitionText]请求异常:"+e, e); |
| | | return ReturnFailUtils.getRepInfo("OCR失败!"); |
| | | } |
| | | } |
| | | return ReturnSucUtils.getRepInfo("识别成功", result); |
| | | }catch (Exception e){ |
| | | return ReturnFailUtils.getRepInfo(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查看附件组件-分类查询附件 |
| | | * @url {ctx}/api/web/fileInfo/listFileByCat |
| | | * @param mainId 所属业务主体编号 |
| | |
| | | |
| | | import cn.huge.module.file.domain.dto.FileForCatDTO; |
| | | import cn.huge.module.file.domain.po.FileInfo; |
| | | import cn.huge.module.file.domain.po.FileRelate; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.data.domain.PageRequest; |
| | |
| | | */ |
| | | List<FileForCatDTO> listFileByCatTerms(@Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据多个编号查询 |
| | | * @param terms |
| | | * @return List<FileRelate> |
| | | */ |
| | | List<FileInfo> listByids(@Param("terms") Map<String, Object> terms, @Param("mainId") String mainId); |
| | | } |
| | |
| | | <mapper namespace="cn.huge.module.file.dao.mapper.FileInfoMapper"> |
| | | <!-- 结果集 --> |
| | | <resultMap id="dataResult" type="cn.huge.module.file.domain.po.FileInfo"> |
| | | <result property="id" column="id"/> |
| | | <result property="name" column="name"/> |
| | | <result property="trueName" column="true_name"/> |
| | | <result property="fileName" column="file_name"/> |
| | | <result property="suffix" column="suffix"/> |
| | | <result property="cat" column="cat"/> |
| | | <result property="size" column="size"/> |
| | | <result property="unit" column="unit"/> |
| | | <result property="md5Code" column="md5_code"/> |
| | | <result property="storeWay" column="store_way"/> |
| | | <result property="path" column="path"/> |
| | | <result property="fullPath" column="full_path"/> |
| | | <result property="showUrl" column="show_url"/> |
| | | <result property="downUrl" column="down_url"/> |
| | | <result property="zipUrl" column="zip_url"/> |
| | | <result property="deleteStatus" column="delete_status"/> |
| | | <result property="custId" column="cust_id"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="ownerId" column="owner_id"/> |
| | | <result property="ownerCat" column="owner_cat"/> |
| | | <result property="ownerType" column="owner_type"/> |
| | | <result property="uploaderId" column="uploader_id"/> |
| | | <result property="uploaderName" column="uploader_name"/> |
| | | </resultMap> |
| | | <resultMap id="fileResult" type="cn.huge.module.file.domain.po.FileInfo"> |
| | | <result property="id" column="id"/> |
| | | <result property="name" column="name"/> |
| | | <result property="trueName" column="true_name"/> |
| | |
| | | <result property="custId" column="cust_id"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="ownerId" column="owner_id"/> |
| | | <result property="ownerCat" column="owner_cat"/> |
| | | <result property="ownerType" column="owner_type"/> |
| | | <result property="uploaderId" column="uploader_id"/> |
| | | <result property="uploaderName" column="uploader_name"/> |
| | | </resultMap> |
| | | <!-- 表 --> |
| | | <sql id='table-name'>dyh_file_info</sql> |
| | |
| | | cust_id, |
| | | update_time, |
| | | create_time |
| | | </sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part-t"> |
| | | t1.id, |
| | | t1.name, |
| | | t1.true_name, |
| | | t1.file_name, |
| | | t1.suffix, |
| | | t1.cat, |
| | | t1.size, |
| | | t1.unit, |
| | | t1.md5_code, |
| | | t1.store_way, |
| | | t1.path, |
| | | t1.full_path, |
| | | t1.show_url, |
| | | t1.down_url, |
| | | t1.zip_url, |
| | | t1.delete_status, |
| | | t1.cust_id, |
| | | t1.update_time, |
| | | t1.create_time |
| | | </sql> |
| | | <!-- 更新实体字段 --> |
| | | <sql id="set-part"> |
| | |
| | | <include refid="listFileByCatTerms-where-part"/> |
| | | </select> |
| | | |
| | | <!-- 根据多个编号查询 --> |
| | | <select id="listByids" resultMap="fileResult"> |
| | | SELECT t2.owner_id, t2.owner_cat, t2.owner_type, t2.uploader_id, t2.uploader_name, |
| | | <include refid="column-part-t"/> |
| | | FROM dyh_file_info t1 |
| | | LEFT JOIN dyh_file_relate t2 ON t1.id = t2.file_id |
| | | WHERE t2.main_id = #{mainId} |
| | | <if test="terms.ownerIds = null and terms.ownerIds =''"> |
| | | and t2.owner_id in (${ownerIds}) |
| | | </if> |
| | | <if test="terms.types = null and terms.types =''"> |
| | | and t2.owner_type in (${types}) |
| | | </if> |
| | | |
| | | |
| | | |
| | | </select> |
| | | |
| | | <!-- 根据多个编号查询 --> |
| | | <select id="listByIdsTypes" resultMap="fileResult"> |
| | | SELECT t2.owner_id, t2.owner_cat, t2.owner_type, t2.uploader_id, t2.uploader_name, |
| | | <include refid="column-part-t"/> |
| | | FROM dyh_file_info t1 |
| | | LEFT JOIN dyh_file_relate t2 ON t1.id = t2.file_id |
| | | WHERE t2.owner_id in (${ownerIds}) |
| | | and t2.main_id = #{mainId} |
| | | and t2.owner_type in (${types}) |
| | | </select> |
| | | </mapper> |
| | |
| | | */ |
| | | @TableField(exist = false) |
| | | private Integer uploaderType; |
| | | |
| | | } |
| | |
| | | package cn.huge.module.file.service; |
| | | |
| | | import cn.huge.base.common.constant.FileCatEnum; |
| | | 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.file.domain.dto.FileForCatListDTO; |
| | | import cn.huge.module.file.domain.dto.UploaderDTO; |
| | | import cn.huge.module.file.domain.po.FileInfo; |
| | | import cn.huge.module.sys.constant.FileOwnerTypeBaseEnum; |
| | | import cn.huge.module.sys.dto.FileIdInfoBaseDTO; |
| | | import cn.huge.module.sys.dto.FileIdTypeInfoBaseDTO; |
| | | import cn.huge.module.sys.dto.FileInfoBaseDTO; |
| | | import cn.huge.module.sys.dto.FileTypeInfoBaseDTO; |
| | | import cn.huge.module.file.domain.po.FileRelate; |
| | | import cn.huge.module.file.utils.FtpUtils; |
| | | import cn.huge.module.file.utils.FtpMultipartFileWrapper; |
| | | import cn.huge.module.sys.constant.FileOwnerTypeBaseEnum; |
| | | 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.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.*; |
| | | import javax.annotation.PostConstruct; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @title: 附件信息表业务逻辑处理 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 根据多个所属编号查询附件并先根据ownerId再根据附件类型分组 |
| | | * @param terms |
| | | * @return List |
| | | */ |
| | | public List<FileIdTypeInfoBaseDTO> listIdTypeInfoByOwnerIdList(Map<String, Object> terms, String mainId){ |
| | | List<FileIdTypeInfoBaseDTO> fileTypeInfoBaseDTOList = new ArrayList<>(); |
| | | |
| | | List<FileInfo> fileInfoList = mapper.listByids(terms, mainId); |
| | | if(CollectionUtils.isNotEmpty(fileInfoList)){ |
| | | fileTypeInfoBaseDTOList = this.getIdFileTypeInfoBaseDTOList(fileInfoList); |
| | | } |
| | | |
| | | return fileTypeInfoBaseDTOList; |
| | | } |
| | | |
| | | /** |
| | | * 根据多个编号查询 |
| | | * @param fileInfoList 附件列表 |
| | | * @return List<FileTypeInfoBaseDTO> |
| | | */ |
| | | private List<FileIdTypeInfoBaseDTO> getIdFileTypeInfoBaseDTOList(List<FileInfo> fileInfoList){ |
| | | List<FileIdTypeInfoBaseDTO> fileIdTypeInfoBaseDTOList = new ArrayList<>(); |
| | | //把Id过滤出来 |
| | | Set<String> ownerIdSet = new HashSet<>(); |
| | | for(FileInfo fileInfo: fileInfoList){ |
| | | ownerIdSet.add(fileInfo.getOwnerId()); |
| | | } |
| | | //把附件放入对应的OwnerId下 |
| | | Map<String, List<FileInfo>> map = new HashMap<>(); |
| | | for(String ownerId: ownerIdSet) { |
| | | List<FileInfo> fileInfoListByOwnerIdList = new ArrayList<>(); |
| | | for (FileInfo fileInfo : fileInfoList) { |
| | | if(ownerId.equals(fileInfo.getOwnerId())){ |
| | | fileInfoListByOwnerIdList.add(fileInfo); |
| | | } |
| | | } |
| | | if(CollectionUtils.isNotEmpty(fileInfoListByOwnerIdList)){ |
| | | map.put(ownerId, fileInfoListByOwnerIdList); |
| | | } |
| | | |
| | | } |
| | | //根据OwnerId编号 |
| | | for(String ownerId: ownerIdSet){ |
| | | if(map.containsKey(ownerId)){ |
| | | FileIdTypeInfoBaseDTO fileIdTypeInfoBaseDTO = new FileIdTypeInfoBaseDTO(); |
| | | fileIdTypeInfoBaseDTO.setOwnerId(ownerId); |
| | | List<FileInfo> ownerIdFileInfoList = map.get(ownerId); |
| | | if (CollectionUtils.isNotEmpty(ownerIdFileInfoList)) { |
| | | List<FileTypeInfoBaseDTO> fileTypeInfoBaseDTOList = new ArrayList<>(); |
| | | |
| | | Set<String> setTmp = new HashSet<>(); |
| | | for (FileInfo fileInfo: ownerIdFileInfoList) { |
| | | if (ObjectUtils.isNotEmpty(fileInfo.getOwnerType())) { |
| | | setTmp.add(fileInfo.getOwnerType()); |
| | | } |
| | | } |
| | | //根据文件类型分类 |
| | | for(String ownerType: setTmp){ |
| | | FileTypeInfoBaseDTO fileTypeInfoBaseDTO = new FileTypeInfoBaseDTO(); |
| | | fileTypeInfoBaseDTO.setOwnerType(ownerType); |
| | | fileTypeInfoBaseDTO.setOwnerTypeName(FileOwnerTypeBaseEnum.getDes(ownerType)); |
| | | fileTypeInfoBaseDTO.setSize(ownerIdFileInfoList.size()); |
| | | List<FileInfoBaseDTO> fileInfoBaseDTOList = new ArrayList<>(); |
| | | for(FileInfo fileInfo: ownerIdFileInfoList){ |
| | | if(ownerType.equals(fileInfo.getOwnerType())){ |
| | | FileInfoBaseDTO fileInfoBaseDTO = new FileInfoBaseDTO(); |
| | | BeanUtils.copyProperties(fileInfo, fileInfoBaseDTO); |
| | | fileInfoBaseDTO.setOwnerCatName(FileOwnerTypeBaseEnum.getDes(fileInfo.getOwnerCat())); |
| | | fileInfoBaseDTO.setOwnerTypeName(FileOwnerTypeBaseEnum.getDes(fileInfo.getOwnerType())); |
| | | fileInfoBaseDTOList.add(fileInfoBaseDTO); |
| | | } |
| | | } |
| | | fileTypeInfoBaseDTO.setFileList(fileInfoBaseDTOList); |
| | | fileTypeInfoBaseDTOList.add(fileTypeInfoBaseDTO); |
| | | } |
| | | fileIdTypeInfoBaseDTO.setFileList(fileTypeInfoBaseDTOList); |
| | | fileIdTypeInfoBaseDTOList.add(fileIdTypeInfoBaseDTO); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | return fileIdTypeInfoBaseDTOList; |
| | | } |
| | | |
| | | /** |
| | | * 根据多个所属编号查询附件 |
| | | * @param terms |
| | | * @return List |
| | | */ |
| | | public List<FileIdInfoBaseDTO> listInfoByOwnerIdList(Map<String, Object> terms, String mainId) { |
| | | List<FileIdInfoBaseDTO> fileIdInfoBaseDTOList = new ArrayList<>(); |
| | | List<FileInfo> fileInfoList = mapper.listByids(terms, mainId); |
| | | if(CollectionUtils.isNotEmpty(fileInfoList)){ |
| | | fileIdInfoBaseDTOList = this.getFileInfoBaseDTOList(fileInfoList); |
| | | } |
| | | return fileIdInfoBaseDTOList; |
| | | } |
| | | |
| | | /** |
| | | * 根据多个所属编号查询附件并根据ownerId分组 |
| | | * @param fileInfoList 附件列表 |
| | | * @return List<FileTypeInfoBaseDTO> |
| | | */ |
| | | private List<FileIdInfoBaseDTO> getFileInfoBaseDTOList(List<FileInfo> fileInfoList){ |
| | | List<FileIdInfoBaseDTO> fileIdInfoBaseDTOList = new ArrayList<>(); |
| | | //把Id过滤出来 |
| | | Set<String> ownerIdSet = new HashSet<>(); |
| | | for(FileInfo fileInfo: fileInfoList){ |
| | | ownerIdSet.add(fileInfo.getOwnerId()); |
| | | } |
| | | |
| | | for(String ownerId: ownerIdSet){ |
| | | FileIdInfoBaseDTO fileIdInfoBaseDTO = new FileIdInfoBaseDTO(); |
| | | fileIdInfoBaseDTO.setOwnerId(ownerId); |
| | | List<FileInfoBaseDTO> fileInfoBaseDTOList = new ArrayList<>(); |
| | | for (FileInfo fileInfo : fileInfoList) { |
| | | if (ownerId.equals(fileInfo.getOwnerId())) { |
| | | FileInfoBaseDTO fileInfoBaseDTO = new FileInfoBaseDTO(); |
| | | BeanUtils.copyProperties(fileInfo, fileInfoBaseDTO); |
| | | // TODO: 2022/3/31 简化 |
| | | fileInfoBaseDTO.setOwnerCatName(FileOwnerTypeBaseEnum.getDes(fileInfo.getOwnerCat())); |
| | | fileInfoBaseDTO.setOwnerTypeName(FileOwnerTypeBaseEnum.getDes(fileInfo.getOwnerType())); |
| | | fileInfoBaseDTOList.add(fileInfoBaseDTO); |
| | | } |
| | | } |
| | | fileIdInfoBaseDTO.setFileList(fileInfoBaseDTOList); |
| | | fileIdInfoBaseDTOList.add(fileIdInfoBaseDTO); |
| | | } |
| | | return fileIdInfoBaseDTOList; |
| | | } |
| | | |
| | | /** |
| | | * web端上传附件,保存附件信息和业务关系 |
| | | * @param file 附件 |
| | | * @param ownerId 所属业务编号 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 上传附件,保存附件信息和业务关系 |
| | | * @param file 附件 |
| | | * @param ownerId 所属业务编号 |
| | | * @param ownerType 所属业务名称 |
| | | * @param fileCount 第几份附件 |
| | | * @param uploaderDTO 上传人信息 |
| | | * @return |
| | | */ |
| | | public FileInfo uploadFile(MultipartFile file, String ownerId, String ownerType, int fileCount, UploaderDTO uploaderDTO) { |
| | | try { |
| | | String fileId = utilsClient.getNewTimeId(); |
| | | // 创建附件信息 |
| | | FileInfo fileInfo = new FtpMultipartFileWrapper(file).toWebFileInfo(fileId); |
| | | // 上传到ftp服务器 |
| | | FtpUtils ftpUtils = new FtpUtils(); |
| | | ftpUtils.upload(fileInfo.getPath(), fileInfo.getFileName(), file.getInputStream()); |
| | | // 保存附件信息 |
| | | fileInfo.setName(FileOwnerTypeBaseEnum.getDes(ownerType) + BaseConsts.UNDER + fileCount); |
| | | fileInfo.setOwnerId(ownerId); |
| | | fileInfo.setOwnerCat(FileOwnerTypeBaseEnum.getCat(ownerType)); |
| | | fileInfo.setOwnerCatName(FileOwnerTypeBaseEnum.getDes(fileInfo.getOwnerCat())); |
| | | fileInfo.setOwnerType(ownerType); |
| | | fileInfo.setOwnerTypeName(FileOwnerTypeBaseEnum.getDes(ownerType)); |
| | | fileInfo.setCustId(uploaderDTO.getCustId()); |
| | | mapper.insert(fileInfo); |
| | | // 保存业务关系 |
| | | fileRelateService.saveByFileInfo(fileInfo); |
| | | return fileInfo; |
| | | } catch (Exception e) { |
| | | log.error("service方法[FileInfoService.uploadFile]调用异常:"+e, e); |
| | | throw new ServiceException("FileInfoService.uploadFile", e); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查看附件组件-分类查询附件 |
| | | * @param terms |
| | | * @return |
| | |
| | | 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.client.api.impl.UtilsClientImpl; |
| | | import cn.huge.module.file.dao.mapper.FileRelateMapper; |
| | | import cn.huge.module.file.domain.po.FileInfo; |
| | | import cn.huge.module.file.domain.dto.UploaderDTO; |
| | | import cn.huge.module.file.domain.po.FileInfo; |
| | | import cn.huge.module.file.domain.po.FileRelate; |
| | | import cn.huge.module.sys.constant.FileOwnerTypeBaseEnum; |
| | | import cn.huge.module.sys.dto.FileInfoBaseDTO; |
| | | import cn.huge.module.sys.dto.FileTypeInfoBaseDTO; |
| | | import cn.huge.module.sys.dto.FileTypeTermsDTO; |
| | | 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.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @title: 附件关系表业务逻辑处理 |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据条件删除 |
| | | * @param fileTypeTermsDTO 条件 |
| | | */ |
| | | public void removeOne(FileTypeTermsDTO fileTypeTermsDTO){ |
| | | try{ |
| | | if (StringUtils.isNotEmpty(fileTypeTermsDTO.getOwnerId())) { |
| | | QueryWrapper<FileRelate> fileRelateQueryWrapper = new QueryWrapper<>(); |
| | | fileRelateQueryWrapper.eq("owner_id", fileTypeTermsDTO.getOwnerId()); |
| | | if (StringUtils.isNotEmpty(fileTypeTermsDTO.getOwnerType())) { |
| | | fileRelateQueryWrapper.eq("owner_type", fileTypeTermsDTO.getOwnerType()); |
| | | } |
| | | if (CollectionUtils.isNotEmpty(fileTypeTermsDTO.getOwnerTypeList())) { |
| | | fileRelateQueryWrapper.in("owner_type", fileTypeTermsDTO.getOwnerTypeList()); |
| | | } |
| | | mapper.delete(fileRelateQueryWrapper); |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("service方法[FileRelateService.removeOne]调用异常:"+e, e); |
| | | throw new ServiceException("FileRelateService.removeOne", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据条件删除 |
| | | * @param fileTypeTermsDTO 条件 |
| | | */ |
| | | public void removeAll(FileTypeTermsDTO fileTypeTermsDTO){ |
| | | try{ |
| | | if (CollectionUtils.isNotEmpty(fileTypeTermsDTO.getOwnerIdList())) { |
| | | QueryWrapper<FileRelate> fileRelateQueryWrapper = new QueryWrapper<>(); |
| | | fileRelateQueryWrapper.in("owner_id", fileTypeTermsDTO.getOwnerIdList()); |
| | | if (StringUtils.isNotEmpty(fileTypeTermsDTO.getOwnerType())) { |
| | | fileRelateQueryWrapper.eq("owner_type", fileTypeTermsDTO.getOwnerType()); |
| | | } |
| | | if (CollectionUtils.isNotEmpty(fileTypeTermsDTO.getOwnerTypeList())) { |
| | | fileRelateQueryWrapper.in("owner_type", fileTypeTermsDTO.getOwnerTypeList()); |
| | | } |
| | | mapper.delete(fileRelateQueryWrapper); |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("service方法[FileRelateService.removeAll]调用异常:"+e, e); |
| | | throw new ServiceException("FileRelateService.removeAll", e); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.huge.module.sy.controller.client; |
| | | |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.module.sy.domain.po.SyTimeLimit; |
| | | import cn.huge.module.sy.service.SyTimeLimitService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.google.common.collect.Maps; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Page; |
| | | import org.springframework.data.domain.PageRequest; |
| | | import org.springframework.data.domain.Sort; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @title: 系统时限配置表接口api-web端 |
| | | * @description: 系统时限配置表接口api-web端 |
| | | * @company: hugeinfo |
| | | * @author: wangwh |
| | | * @time: 2024-09-04 16:48:57 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/client/syTimeLimit") |
| | | public class SyTimeLimitClientController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private SyTimeLimitService 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 limitType = request.getParameter("limitType"); |
| | | if (StringUtils.isNotBlank(limitType)){ |
| | | terms.put("limitType", limitType); |
| | | } |
| | | // 时限名称 |
| | | String limitTypeName = request.getParameter("limitTypeName"); |
| | | if (StringUtils.isNotBlank(limitTypeName)){ |
| | | terms.put("limitTypeName", limitTypeName); |
| | | } |
| | | // 时限对应表 |
| | | String limitTable = request.getParameter("limitTable"); |
| | | if (StringUtils.isNotBlank(limitTable)){ |
| | | terms.put("limitTable", limitTable); |
| | | } |
| | | // 期限 |
| | | String timeTerm = request.getParameter("timeTerm"); |
| | | if (StringUtils.isNotBlank(timeTerm)){ |
| | | terms.put("timeTerm", timeTerm); |
| | | } |
| | | // 期限单位 |
| | | String termUnit = request.getParameter("termUnit"); |
| | | if (StringUtils.isNotBlank(termUnit)){ |
| | | terms.put("termUnit", termUnit); |
| | | } |
| | | // 操作人编号 |
| | | String operUserId = request.getParameter("operUserId"); |
| | | if (StringUtils.isNotBlank(operUserId)){ |
| | | terms.put("operUserId", operUserId); |
| | | } |
| | | // 操作人名称 |
| | | String operUserName = request.getParameter("operUserName"); |
| | | if (StringUtils.isNotBlank(operUserName)){ |
| | | terms.put("operUserName", operUserName); |
| | | } |
| | | // 删除状态,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/syTimeLimit/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/syTimeLimit/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<SyTimeLimit> syTimeLimitPage = service.pageQuery(pageRequest, terms); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", syTimeLimitPage); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/web/syTimeLimit/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/syTimeLimit/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/syTimeLimit/saveSyTimeLimit |
| | | * @param syTimeLimit 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveSyTimeLimit") |
| | | public Object saveSyTimeLimit(@RequestBody SyTimeLimit syTimeLimit) { |
| | | try { |
| | | service.saveSyTimeLimit(syTimeLimit); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件分页查询 |
| | | * @url {ctx}/api/web/syTimeLimit/getTimeLimit |
| | | * @param limitTable 时限对应表 |
| | | * @param limitType 时限类型 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/getTimeLimit") |
| | | public Object getTimeLimit(@RequestParam(value = "limitTable") int limitTable, @RequestParam(value = "limitType") int limitType) { |
| | | try { |
| | | QueryWrapper<SyTimeLimit> syTimeLimitQueryWrapper = new QueryWrapper<>(); |
| | | syTimeLimitQueryWrapper.eq("limit_table", limitTable).eq("limit_type", limitType); |
| | | SyTimeLimit syTimeLimit = service.getOne(syTimeLimitQueryWrapper); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", syTimeLimit.getTimeTerm()); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.huge.module.sy.controller.web; |
| | | |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.module.sy.domain.po.SyTimeLimit; |
| | | import cn.huge.module.sy.service.SyTimeLimitService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.google.common.collect.Maps; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | 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-09-04 16:48:57 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/web/syTimeLimit") |
| | | public class SyTimeLimitWebController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private SyTimeLimitService 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 limitType = request.getParameter("limitType"); |
| | | if (StringUtils.isNotBlank(limitType)){ |
| | | terms.put("limitType", limitType); |
| | | } |
| | | // 时限名称 |
| | | String limitTypeName = request.getParameter("limitTypeName"); |
| | | if (StringUtils.isNotBlank(limitTypeName)){ |
| | | terms.put("limitTypeName", limitTypeName); |
| | | } |
| | | // 时限对应表 |
| | | String limitTable = request.getParameter("limitTable"); |
| | | if (StringUtils.isNotBlank(limitTable)){ |
| | | terms.put("limitTable", limitTable); |
| | | } |
| | | // 期限 |
| | | String timeTerm = request.getParameter("timeTerm"); |
| | | if (StringUtils.isNotBlank(timeTerm)){ |
| | | terms.put("timeTerm", timeTerm); |
| | | } |
| | | // 期限单位 |
| | | String termUnit = request.getParameter("termUnit"); |
| | | if (StringUtils.isNotBlank(termUnit)){ |
| | | terms.put("termUnit", termUnit); |
| | | } |
| | | // 操作人编号 |
| | | String operUserId = request.getParameter("operUserId"); |
| | | if (StringUtils.isNotBlank(operUserId)){ |
| | | terms.put("operUserId", operUserId); |
| | | } |
| | | // 操作人名称 |
| | | String operUserName = request.getParameter("operUserName"); |
| | | if (StringUtils.isNotBlank(operUserName)){ |
| | | terms.put("operUserName", operUserName); |
| | | } |
| | | // 删除状态,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/syTimeLimit/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/syTimeLimit/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<SyTimeLimit> syTimeLimitPage = service.pageQuery(pageRequest, terms); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", syTimeLimitPage); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/web/syTimeLimit/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/syTimeLimit/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/syTimeLimit/saveSyTimeLimit |
| | | * @param syTimeLimit 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveSyTimeLimit") |
| | | public Object saveSyTimeLimit(@RequestBody SyTimeLimit syTimeLimit) { |
| | | try { |
| | | service.saveSyTimeLimit(syTimeLimit); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件分页查询 |
| | | * @url {ctx}/api/web/syTimeLimit/getTimeLimit |
| | | * @param limitTable 时限对应表 |
| | | * @param limitType 时限类型 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/getTimeLimit") |
| | | public Object getTimeLimit(@RequestParam(value = "limitTable") int limitTable, @RequestParam(value = "limitType") int limitType) { |
| | | try { |
| | | QueryWrapper<SyTimeLimit> syTimeLimitQueryWrapper = new QueryWrapper<>(); |
| | | syTimeLimitQueryWrapper.eq("limit_table", limitTable).eq("limit_type", limitType); |
| | | SyTimeLimit syTimeLimit = service.getOne(syTimeLimitQueryWrapper); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", syTimeLimit.getTimeTerm()); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package cn.huge.module.sy.dao.mapper; |
| | | |
| | | import cn.huge.module.sy.domain.po.SyTimeLimit; |
| | | 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-09-04 16:48:57 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Repository |
| | | public interface SyTimeLimitMapper extends BaseMapper<SyTimeLimit>{ |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | void updateSyTimeLimit(@Param("entity") SyTimeLimit entity); |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | void updateSyTimeLimitTerms(@Param("entity") SyTimeLimit entity, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | void deleteSyTimeLimit(@Param("id") String id); |
| | | |
| | | /** |
| | | * 按条件查询结果集 |
| | | * @param terms 查询条件集合 |
| | | * @return List<SyTimeLimit> |
| | | */ |
| | | List<SyTimeLimit> 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<SyTimeLimit> |
| | | */ |
| | | List<SyTimeLimit> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <!-- |
| | | * @title: 系统时限配置表 |
| | | * @description: 自定义sql,请自行实现业务逻辑 |
| | | * @company: hugeinfo |
| | | * @author: wangwh |
| | | * @time:2024-09-04 16:48:57 |
| | | * @version 1.0.0 |
| | | --> |
| | | <mapper namespace="cn.huge.module.sy.dao.mapper.SyTimeLimitMapper"> |
| | | <!-- 结果集 --> |
| | | <resultMap id="dataResult" type="cn.huge.module.sy.domain.po.SyTimeLimit"> |
| | | <result property="id" column="id"/> |
| | | <result property="limitType" column="limit_type"/> |
| | | <result property="limitTypeName" column="limit_type_name"/> |
| | | <result property="limitTable" column="limit_table"/> |
| | | <result property="timeTerm" column="time_term"/> |
| | | <result property="termUnit" column="term_unit"/> |
| | | <result property="operUserId" column="oper_user_id"/> |
| | | <result property="operUserName" column="oper_user_name"/> |
| | | <result property="deleteStatus" column="delete_status"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | <!-- 表 --> |
| | | <sql id='table-name'>dyh_sy_time_limit</sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | | id, |
| | | limit_type, |
| | | limit_type_name, |
| | | limit_table, |
| | | time_term, |
| | | term_unit, |
| | | oper_user_id, |
| | | oper_user_name, |
| | | delete_status, |
| | | create_time, |
| | | update_time |
| | | </sql> |
| | | <!-- 更新实体字段 --> |
| | | <sql id="set-part"> |
| | | <if test="entity.limitType != null">limit_type = #{entity.limitType},</if> |
| | | <if test="entity.limitTypeName != null">limit_type_name = #{entity.limitTypeName},</if> |
| | | <if test="entity.limitTable != null">limit_table = #{entity.limitTable},</if> |
| | | <if test="entity.timeTerm != null">time_term = #{entity.timeTerm},</if> |
| | | <if test="entity.termUnit != null">term_unit = #{entity.termUnit},</if> |
| | | <if test="entity.operUserId != null">oper_user_id = #{entity.operUserId},</if> |
| | | <if test="entity.operUserName != null">oper_user_name = #{entity.operUserName},</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.limitType != null and terms.limitType !=''"> |
| | | and limit_type = #{terms.limitType} |
| | | </if> |
| | | <if test="terms.limitTypeName != null and terms.limitTypeName !=''"> |
| | | and limit_type_name = #{terms.limitTypeName} |
| | | </if> |
| | | <if test="terms.limitTable != null and terms.limitTable !=''"> |
| | | and limit_table = #{terms.limitTable} |
| | | </if> |
| | | <if test="terms.timeTerm != null and terms.timeTerm !=''"> |
| | | and time_term = #{terms.timeTerm} |
| | | </if> |
| | | <if test="terms.termUnit != null and terms.termUnit !=''"> |
| | | and term_unit = #{terms.termUnit} |
| | | </if> |
| | | <if test="terms.operUserId != null and terms.operUserId !=''"> |
| | | and oper_user_id = #{terms.operUserId} |
| | | </if> |
| | | <if test="terms.operUserName != null and terms.operUserName !=''"> |
| | | and oper_user_name = #{terms.operUserName} |
| | | </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="updateSyTimeLimit"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <where> |
| | | id = #{entity.id} |
| | | </where> |
| | | </update> |
| | | <!-- 条件更新对象 --> |
| | | <update id="updateSyTimeLimitTerms"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <include refid="where-part"/> |
| | | </update> |
| | | <!-- 根据编号物理删除 --> |
| | | <delete id="deleteSyTimeLimit"> |
| | | delete from |
| | | <include refid="table-name" /> |
| | | where id = #{id} |
| | | </delete> |
| | | <!-- 根据条件查询 --> |
| | | <select id="listTerms" resultMap="dataResult"> |
| | | select |
| | | <include refid="column-part"/> |
| | | from |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | </select> |
| | | <!-- 根据条件统计 --> |
| | | <select id="countTerms" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(1) |
| | | from |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | </select> |
| | | <!-- 根据条件分页查询 --> |
| | | <select id="pageTerms" resultMap="dataResult"> |
| | | SELECT |
| | | <include refid="column-part"/> |
| | | FROM |
| | | <include refid="table-name" /> |
| | | <include refid="where-part"/> |
| | | <if test="page.sort != null"> |
| | | <foreach collection="page.sort" item="s" index="index" separator="," open="order by "> |
| | | isnull(${s.property}), ${s.property} ${s.direction} |
| | | </foreach> |
| | | </if> |
| | | <if test="page.sort == null"> |
| | | order by isnull(create_time), create_time desc |
| | | </if> |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | package cn.huge.module.sy.domain.bo; |
| | | |
| | | import cn.huge.module.sy.domain.po.SyTimeLimit; |
| | | |
| | | /** |
| | | * @title: 系统时限配置表业务扩展类 |
| | | * @description: 系统时限配置表业务扩展类 |
| | | * @company: hugeinfo |
| | | * @author: wangwh |
| | | * @time: 2024-09-04 16:48:57 |
| | | * @version: 1.0.0 |
| | | * @see cn.huge.module.sy.domain.po.SyTimeLimit |
| | | */ |
| | | public class SyTimeLimitBO extends SyTimeLimit { |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package cn.huge.module.sy.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-09-04 16:48:57 |
| | | * @version 1.0.0 |
| | | */ |
| | | @TableName(value = "dyh_sy_time_limit") |
| | | @Data |
| | | public class SyTimeLimit { |
| | | |
| | | /** |
| | | * 主键编号 |
| | | */ |
| | | @TableId(value = "id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 时限类型 |
| | | */ |
| | | @TableField(value = "limit_type") |
| | | private String limitType; |
| | | |
| | | /** |
| | | * 时限名称 |
| | | */ |
| | | @TableField(value = "limit_type_name") |
| | | private String limitTypeName; |
| | | |
| | | /** |
| | | * 时限对应表 |
| | | */ |
| | | @TableField(value = "limit_table") |
| | | private String limitTable; |
| | | |
| | | /** |
| | | * 期限 |
| | | */ |
| | | @TableField(value = "time_term") |
| | | private Integer timeTerm; |
| | | |
| | | /** |
| | | * 期限单位 |
| | | */ |
| | | @TableField(value = "term_unit") |
| | | private String termUnit; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | */ |
| | | @TableField(value = "oper_user_id") |
| | | private String operUserId; |
| | | |
| | | /** |
| | | * 操作人名称 |
| | | */ |
| | | @TableField(value = "oper_user_name") |
| | | private String operUserName; |
| | | |
| | | /** |
| | | * 删除状态,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.sy.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.sy.dao.mapper.SyTimeLimitMapper; |
| | | import cn.huge.module.sy.domain.po.SyTimeLimit; |
| | | 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-09-04 16:48:57 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class SyTimeLimitService extends ServiceImpl<SyTimeLimitMapper, SyTimeLimit>{ |
| | | |
| | | @Autowired |
| | | private SyTimeLimitMapper mapper; |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | public void updateSyTimeLimit(SyTimeLimit entity){ |
| | | try{ |
| | | mapper.updateSyTimeLimit(entity); |
| | | }catch (Exception e){ |
| | | log.error("[SyTimeLimitService.updateSyTimeLimit]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("SyTimeLimitService.updateSyTimeLimit", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | public void updateSyTimeLimitTerms(SyTimeLimit entity, Map<String, Object> terms){ |
| | | try{ |
| | | mapper.updateSyTimeLimitTerms(entity, terms); |
| | | }catch (Exception e){ |
| | | log.error("[SyTimeLimitService.updateSyTimeLimitTerms]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("SyTimeLimitService.updateSyTimeLimitTerms", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | public void deleteSyTimeLimit(String id){ |
| | | try{ |
| | | mapper.deleteSyTimeLimit(id); |
| | | }catch (Exception e){ |
| | | log.error("[SyTimeLimitService.deleteSyTimeLimit]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("SyTimeLimitService.deleteSyTimeLimit", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 按条件查询 |
| | | * @param terms 条件 |
| | | * @return List |
| | | */ |
| | | public List<SyTimeLimit> 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<SyTimeLimit> pageQuery(PageRequest page, Map<String, Object> terms){ |
| | | long total = mapper.countTerms(terms); |
| | | List<SyTimeLimit> content = mapper.pageTerms(page, terms); |
| | | return new PageImpl<SyTimeLimit>(content, page, total); |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @param syTimeLimit 实体对象 |
| | | */ |
| | | public void saveSyTimeLimit(SyTimeLimit syTimeLimit){ |
| | | try{ |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 判断是否新增 |
| | | if (IdUtils.checkNewId(syTimeLimit.getId())){ |
| | | syTimeLimit.setId(utilsClient.getNewTimeId()); |
| | | syTimeLimit.setCreateTime(nowDate); |
| | | } |
| | | syTimeLimit.setUpdateTime(nowDate); |
| | | this.saveOrUpdate(syTimeLimit); |
| | | }catch (Exception e){ |
| | | log.error("[SyTimeLimitService.saveSyTimeLimit]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("SyTimeLimitService.saveSyTimeLimit", e); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | import cn.huge.module.sys.dto.IdcardOcrResultDTO; |
| | | import com.baidu.aip.ocr.AipOcr; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.json.JSONArray; |
| | | import org.json.JSONObject; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @title: 百度云OCR工具类 |
| | |
| | | public static final String APP_ID = "27535980"; |
| | | public static final String API_KEY = "6U6tSA75gKf4UMXvHgDpzOC9"; |
| | | public static final String SECRET_KEY = "BBjjCDhy2sAVO0jfiaGn8OWIGE470lWU"; |
| | | // 个人账号-18607214221 |
| | | public static final String APP_ID_TEXT = "113806304"; |
| | | public static final String API_KEY_TEXT = "ajKtDuIs8xr0XvjbUZLPGi8C"; |
| | | public static final String SECRET_KEY_TEXT = "vgMrG5BJbUfGwKLda1yPWovTQWuRFWDB"; |
| | | |
| | | public static void main(String[] args) { |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | public static Map<String, Object> ocrText(byte[] images) { |
| | | AipOcr client = new AipOcr(APP_ID_TEXT, API_KEY_TEXT, SECRET_KEY_TEXT); |
| | | // 传入可选参数调用接口 |
| | | HashMap<String, String> options = new HashMap<String, String>(); |
| | | options.put("language_type", "CHN_ENG"); |
| | | options.put("detect_direction", "true"); |
| | | options.put("detect_language", "true"); |
| | | options.put("probability", "true"); |
| | | |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | // 参数为本地图片二进制数组 |
| | | JSONObject res = client.basicAccurateGeneral(images, options); |
| | | map.put("wordsResultNum", res.getInt("words_result_num")); |
| | | map.put("direction", res.getInt("direction")); |
| | | |
| | | List<String> wordsResultList = new ArrayList<>(); |
| | | JSONArray jsonArray = res.getJSONArray("words_result"); |
| | | for(int i = 0; i < jsonArray.length(); i++){ |
| | | JSONObject wordResult = jsonArray.getJSONObject(i); |
| | | String words = wordResult.getString("words"); |
| | | if(StringUtils.isNotBlank(words)){ |
| | | wordsResultList.add(words); |
| | | } |
| | | } |
| | | map.put("wordsResult", wordsResultList); |
| | | return map; |
| | | } |
| | | |
| | | } |
| | | /** |
| | | * -------------------_ooOoo_------------------- |