9 files added
6 files modified
| | |
| | | this.buildService(tplData); |
| | | this.buildWebController(tplData); |
| | | // 可选 |
| | | // this.buildWechatController(tplData); |
| | | this.buildWechatController(tplData); |
| | | this.buildJson(tplData); |
| | | // this.buildJsForm(tplData); |
| | | } catch (TemplateNotFoundException e) { |
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.CaseUrging; |
| | | import cn.huge.module.cases.service.CaseUrgingService; |
| | | 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: zhouxt |
| | | * @time: 2024-09-08 10:39:38 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/web/caseUrging") |
| | | public class CaseUrgingWebController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private CaseUrgingService 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 urgingContent = request.getParameter("urgingContent"); |
| | | if (StringUtils.isNotBlank(urgingContent)){ |
| | | terms.put("urgingContent", urgingContent); |
| | | } |
| | | // 催办人编号 |
| | | String urgingUserId = request.getParameter("urgingUserId"); |
| | | if (StringUtils.isNotBlank(urgingUserId)){ |
| | | terms.put("urgingUserId", urgingUserId); |
| | | } |
| | | // 催办人名称 |
| | | String urgingUserName = request.getParameter("urgingUserName"); |
| | | if (StringUtils.isNotBlank(urgingUserName)){ |
| | | terms.put("urgingUserName", urgingUserName); |
| | | } |
| | | // 催办时间 |
| | | String urgingTime = request.getParameter("urgingTime"); |
| | | if (StringUtils.isNotBlank(urgingTime)){ |
| | | terms.put("urgingTime", urgingTime); |
| | | } |
| | | // 催办状态 |
| | | String urgingStatus = request.getParameter("urgingStatus"); |
| | | if (StringUtils.isNotBlank(urgingStatus)){ |
| | | terms.put("urgingStatus", urgingStatus); |
| | | } |
| | | // 回复期限 |
| | | 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); |
| | | } |
| | | // 删除状态 |
| | | 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/caseUrging/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/caseUrging/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<CaseUrging> caseUrgingPage = service.pageQuery(pageRequest, terms); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", caseUrgingPage); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/web/caseUrging/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/caseUrging/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/caseUrging/saveCaseUrging |
| | | * @param caseUrging 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveCaseUrging") |
| | | public Object saveCaseUrging(@RequestBody CaseUrging caseUrging) { |
| | | try { |
| | | service.saveCaseUrging(caseUrging); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.cases.controller.wechat; |
| | | |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.base.config.CurrentUser; |
| | | import cn.huge.module.cases.domain.dto.AssignTaskDTO; |
| | | import cn.huge.module.cases.domain.po.CaseAppear; |
| | | import cn.huge.module.cases.domain.po.CaseReturn; |
| | | import cn.huge.module.cases.domain.po.CaseWindupApply; |
| | | import cn.huge.module.cases.service.CaseAppearService; |
| | | import cn.huge.module.cases.service.CaseReturnService; |
| | | import cn.huge.module.cases.service.CaseTaskService; |
| | | import cn.huge.module.cases.service.CaseWindupApplyService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | /** |
| | | * @title: 纠纷任务表接口api-web端 |
| | | * @description: 纠纷任务表接口api-web端 |
| | | * @company: hugeinfo |
| | | * @author: zhouxt |
| | | * @time: 2024-09-06 15:50:06 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/wechat/caseTask") |
| | | public class CaseTaskWechatController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private CaseTaskService service; |
| | | |
| | | |
| | | /** |
| | | * wechat端-查询流程进度 |
| | | * @url {ctx}/api/wechat/caseTask/listCaseFlow |
| | | * @param caseId 纠纷编号 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/listCaseFlow") |
| | | public Object listCaseFlow(@RequestParam(value = "caseId") String caseId, @CurrentUser String userId) { |
| | | try { |
| | | return ReturnSucUtils.getRepInfo(service.wechatListCaseFlow(caseId, userId)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.cases.controller.wechat; |
| | | |
| | | 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.CaseUrging; |
| | | import cn.huge.module.cases.service.CaseUrgingService; |
| | | 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-wechat端 |
| | | * @description: 纠纷催办信息表接口api-wechat端 |
| | | * @company: hugeinfo |
| | | * @author: zhouxt |
| | | * @time: 2024-09-08 10:39:38 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/wechat/caseUrging") |
| | | public class CaseUrgingWechatController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private CaseUrgingService 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 urgingContent = request.getParameter("urgingContent"); |
| | | if (StringUtils.isNotBlank(urgingContent)){ |
| | | terms.put("urgingContent", urgingContent); |
| | | } |
| | | // 催办人编号 |
| | | String urgingUserId = request.getParameter("urgingUserId"); |
| | | if (StringUtils.isNotBlank(urgingUserId)){ |
| | | terms.put("urgingUserId", urgingUserId); |
| | | } |
| | | // 催办人名称 |
| | | String urgingUserName = request.getParameter("urgingUserName"); |
| | | if (StringUtils.isNotBlank(urgingUserName)){ |
| | | terms.put("urgingUserName", urgingUserName); |
| | | } |
| | | // 催办时间 |
| | | String urgingTime = request.getParameter("urgingTime"); |
| | | if (StringUtils.isNotBlank(urgingTime)){ |
| | | terms.put("urgingTime", urgingTime); |
| | | } |
| | | // 催办状态 |
| | | String urgingStatus = request.getParameter("urgingStatus"); |
| | | if (StringUtils.isNotBlank(urgingStatus)){ |
| | | terms.put("urgingStatus", urgingStatus); |
| | | } |
| | | // 回复期限 |
| | | 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); |
| | | } |
| | | // 删除状态 |
| | | 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/wechat/caseUrging/listQuery |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/listQuery") |
| | | public Object listQuery() { |
| | | try { |
| | | Map<String, Object> terms = getParameter(); |
| | | return ReturnSucUtils.getRepInfo(service.listTerms(terms)); |
| | | } catch (Exception e) { |
| | | log.error("[CaseUrgingController.listQuery]请求失败,异常信息:"+e, e); |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件分页查询 |
| | | * @url {ctx}/api/wechat/caseUrging/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<CaseUrging> caseUrgingPage = service.pageQuery(pageRequest, terms); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", caseUrgingPage); |
| | | } catch (Exception e) { |
| | | log.error("Controller接口[CaseUrgingWechatController.pageQuery]请求异常:"+e, e); |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/wechat/caseUrging/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) { |
| | | log.error("Controller接口[CaseUrgingWechatController.getById]请求异常:"+e, e); |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @url {ctx}/api/wechat/caseUrging/saveCaseUrging |
| | | * @param caseUrging 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveCaseUrging") |
| | | public Object saveCaseUrging(@CurrentUser String userId, @RequestBody CaseUrging caseUrging) { |
| | | try { |
| | | service.saveCaseUrgingWechat(userId,caseUrging); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | log.error("Controller接口[CaseUrgingWechatController.saveCaseUrging]请求异常:"+e, e); |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.cases.dao.mapper; |
| | | |
| | | import cn.huge.module.cases.domain.po.CaseUrging; |
| | | 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: zhouxt |
| | | * @time: 2024-09-08 10:39:38 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Repository |
| | | public interface CaseUrgingMapper extends BaseMapper<CaseUrging>{ |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | void updateCaseUrging(@Param("entity") CaseUrging entity); |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | void updateCaseUrgingTerms(@Param("entity") CaseUrging entity, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | void deleteCaseUrging(@Param("id") String id); |
| | | |
| | | /** |
| | | * 按条件查询结果集 |
| | | * @param terms 查询条件集合 |
| | | * @return List<CaseUrging> |
| | | */ |
| | | List<CaseUrging> 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<CaseUrging> |
| | | */ |
| | | List<CaseUrging> 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: zhouxt |
| | | * @time:2024-09-08 10:39:38 |
| | | * @version 1.0.0 |
| | | --> |
| | | <mapper namespace="cn.huge.module.cases.dao.mapper.CaseUrgingMapper"> |
| | | <!-- 结果集 --> |
| | | <resultMap id="dataResult" type="cn.huge.module.cases.domain.po.CaseUrging"> |
| | | <result property="id" column="id"/> |
| | | <result property="caseId" column="case_id"/> |
| | | <result property="urgingContent" column="urging_content"/> |
| | | <result property="urgingUserId" column="urging_user_id"/> |
| | | <result property="urgingUserName" column="urging_user_name"/> |
| | | <result property="urgingTime" column="urging_time"/> |
| | | <result property="urgingStatus" column="urging_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_urging</sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | | id, |
| | | case_id, |
| | | urging_content, |
| | | urging_user_id, |
| | | urging_user_name, |
| | | urging_time, |
| | | urging_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.urgingContent != null">urging_content = #{entity.urgingContent},</if> |
| | | <if test="entity.urgingUserId != null">urging_user_id = #{entity.urgingUserId},</if> |
| | | <if test="entity.urgingUserName != null">urging_user_name = #{entity.urgingUserName},</if> |
| | | <if test="entity.urgingTime != null">urging_time = #{entity.urgingTime},</if> |
| | | <if test="entity.urgingStatus != null">urging_status = #{entity.urgingStatus},</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.urgingContent != null and terms.urgingContent !=''"> |
| | | and urging_content = #{terms.urgingContent} |
| | | </if> |
| | | <if test="terms.urgingUserId != null and terms.urgingUserId !=''"> |
| | | and urging_user_id = #{terms.urgingUserId} |
| | | </if> |
| | | <if test="terms.urgingUserName != null and terms.urgingUserName !=''"> |
| | | and urging_user_name = #{terms.urgingUserName} |
| | | </if> |
| | | <if test="terms.urgingTime != null and terms.urgingTime !=''"> |
| | | and urging_time = #{terms.urgingTime} |
| | | </if> |
| | | <if test="terms.urgingStatus != null and terms.urgingStatus !=''"> |
| | | and urging_status = #{terms.urgingStatus} |
| | | </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="updateCaseUrging"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <where> |
| | | id = #{entity.id} |
| | | </where> |
| | | </update> |
| | | <!-- 条件更新对象 --> |
| | | <update id="updateCaseUrgingTerms"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <include refid="where-part"/> |
| | | </update> |
| | | <!-- 根据编号物理删除 --> |
| | | <delete id="deleteCaseUrging"> |
| | | 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.CaseUrging; |
| | | |
| | | /** |
| | | * @title: 纠纷催办信息表业务扩展类 |
| | | * @description: 纠纷催办信息表业务扩展类 |
| | | * @company: hugeinfo |
| | | * @author: zhouxt |
| | | * @time: 2024-09-08 10:39:38 |
| | | * @version: 1.0.0 |
| | | * @see cn.huge.module.cases.domain.po.CaseUrging |
| | | */ |
| | | public class CaseUrgingBO extends CaseUrging { |
| | | |
| | | |
| | | } |
| | |
| | | package cn.huge.module.cases.domain.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | |
| | | */ |
| | | private String processStatusName; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createTime; |
| | | /** |
| | | * 申请人集合 |
| | | * */ |
| | | private List<CasePersonWechatDTO> plaintiffList; |
New file |
| | |
| | | { |
| | | "id": "主键编号", |
| | | "caseId": "纠纷编号", |
| | | "urgingContent": "催办意见", |
| | | "urgingUserId": "催办人编号", |
| | | "urgingUserName": "催办人名称", |
| | | "urgingTime": "催办时间", |
| | | "urgingStatus": 0, |
| | | "replyTerm": 0, |
| | | "replyContent": "回复内容", |
| | | "replyUserId": "回复人编号", |
| | | "replyUserName": "回复人名称", |
| | | "replyTime": "回复时间", |
| | | "custId": "客户编号", |
| | | } |
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: zhouxt |
| | | * @time: 2024-09-08 10:39:38 |
| | | * @version 1.0.0 |
| | | */ |
| | | @TableName(value = "dyh_case_urging") |
| | | @Data |
| | | public class CaseUrging { |
| | | |
| | | /** |
| | | * 主键编号 |
| | | */ |
| | | @TableId(value = "id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 纠纷编号 |
| | | */ |
| | | @TableField(value = "case_id") |
| | | private String caseId; |
| | | |
| | | /** |
| | | * 催办意见 |
| | | */ |
| | | @TableField(value = "urging_content") |
| | | private String urgingContent; |
| | | |
| | | /** |
| | | * 催办人编号 |
| | | */ |
| | | @TableField(value = "urging_user_id") |
| | | private String urgingUserId; |
| | | |
| | | /** |
| | | * 催办人名称 |
| | | */ |
| | | @TableField(value = "urging_user_name") |
| | | private String urgingUserName; |
| | | |
| | | /** |
| | | * 催办时间 |
| | | */ |
| | | @TableField(value = "urging_time") |
| | | private Date urgingTime; |
| | | |
| | | /** |
| | | * 催办状态 |
| | | */ |
| | | @TableField(value = "urging_status") |
| | | private Integer urgingStatus; |
| | | |
| | | /** |
| | | * 回复期限 |
| | | */ |
| | | @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; |
| | | |
| | | /** |
| | | * 删除状态 |
| | | */ |
| | | @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; |
| | | |
| | | } |
| | |
| | | caseInfo.setInputWay(CaseBaseConsts.INPUT_WAY_1); |
| | | caseInfo.setCreateTime(nowDate); |
| | | caseInfo.setUpdateTime(nowDate); |
| | | caseInfo.setVisitTime(nowDate); |
| | | caseInfo.setDeleteStatus(BaseConsts.DELETE_STATUS_0); |
| | | caseInfo.setProcess(1); |
| | | caseInfo.setProcessName("来访登记"); |
| | | //todo case_ref生成、case_title生成 |
| | | |
| | | caseInfoUnfold.setId(utilsClient.getNewTimeId()); |
| | |
| | | for(CaseInfo caseInfo: content){ |
| | | CaseInfoWeChatDTO caseInfoWeChatDTO = new CaseInfoWeChatDTO(); |
| | | BeanUtils.copyProperties(caseInfo, caseInfoWeChatDTO); |
| | | if(ObjectUtils.isNotEmpty(caseInfo.getProcess()) && caseInfo.getProcess().equals(1) || caseInfo.getProcess().equals(2)){ |
| | | if(ObjectUtils.isNotEmpty(caseInfo) && caseInfo.getProcess().equals(1) || caseInfo.getProcess().equals(2)){ |
| | | caseInfoWeChatDTO.setProcessStatus(1); |
| | | caseInfoWeChatDTO.setProcessStatusName("待受理"); |
| | | }else if(ObjectUtils.isNotEmpty(caseInfo.getProcess()) && caseInfo.getProcess().equals(3) || caseInfo.getProcess().equals(4)){ |
| | | }else if(ObjectUtils.isNotEmpty(caseInfo) && caseInfo.getProcess().equals(3) || caseInfo.getProcess().equals(4)){ |
| | | caseInfoWeChatDTO.setProcessStatus(2); |
| | | caseInfoWeChatDTO.setProcessStatusName("办理中"); |
| | | }else if(ObjectUtils.isNotEmpty(caseInfo.getProcess()) && caseInfo.getProcess().equals(5) || caseInfo.getProcess().equals(6)){ |
| | | }else if(ObjectUtils.isNotEmpty(caseInfo) && caseInfo.getProcess().equals(5) || caseInfo.getProcess().equals(6)){ |
| | | caseInfoWeChatDTO.setProcessStatus(3); |
| | | caseInfoWeChatDTO.setProcessStatusName("已结案"); |
| | | }else{ |
| | |
| | | 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.CaseFlowDTO; |
| | | import cn.huge.module.cases.domain.dto.TabButtonDTO; |
| | | import cn.huge.module.cases.domain.dto.TabButtonInfoDTO; |
| | |
| | | import cn.huge.module.cases.domain.po.CaseTask; |
| | | import cn.huge.module.cust.dto.CtUserDTO; |
| | | import cn.huge.module.mediate.constant.CaseBaseConsts; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.google.common.collect.Maps; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * wechat端-查询流程进度 |
| | | * @param caseId 纠纷编号 |
| | | * @return |
| | | */ |
| | | public List<CaseFlowDTO> wechatListCaseFlow(String caseId, String userId){ |
| | | try{ |
| | | // 临时给前端联调数据 |
| | | List<CaseFlowDTO> list = new ArrayList<>(); |
| | | QueryWrapper<CaseTask> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("case_id", caseId); |
| | | queryWrapper.orderByAsc("create_time"); |
| | | List<CaseTask> caseTasks = mapper.selectList(queryWrapper); |
| | | if(ObjectUtils.isNotEmpty(caseTasks)){ |
| | | for (CaseTask caseTask : caseTasks) { |
| | | CaseFlowDTO caseFlowDTO = new CaseFlowDTO(); |
| | | BeanUtils.copyProperties(caseTask, caseFlowDTO); |
| | | list.add(caseFlowDTO); |
| | | } |
| | | } |
| | | return list; |
| | | }catch (Exception e){ |
| | | log.error("[CaseTaskService.wechatListCaseFlow]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseTaskService.wechatListCaseFlow", 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.CustClientImpl; |
| | | import cn.huge.module.client.api.impl.UtilsClientImpl; |
| | | import cn.huge.module.cases.dao.mapper.CaseUrgingMapper; |
| | | import cn.huge.module.cases.domain.po.CaseUrging; |
| | | import cn.huge.module.cust.dto.PaUserDTO; |
| | | 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 zhouxt |
| | | * @Time 2024-09-08 10:39:38 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class CaseUrgingService extends ServiceImpl<CaseUrgingMapper, CaseUrging>{ |
| | | |
| | | @Autowired |
| | | private CaseUrgingMapper mapper; |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | @Autowired |
| | | private CustClientImpl custClient; |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | public void updateCaseUrging(CaseUrging entity){ |
| | | try{ |
| | | mapper.updateCaseUrging(entity); |
| | | }catch (Exception e){ |
| | | log.error("[CaseUrgingService.updateCaseUrging]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseUrgingService.updateCaseUrging", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | public void updateCaseUrgingTerms(CaseUrging entity, Map<String, Object> terms){ |
| | | try{ |
| | | mapper.updateCaseUrgingTerms(entity, terms); |
| | | }catch (Exception e){ |
| | | log.error("[CaseUrgingService.updateCaseUrgingTerms]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseUrgingService.updateCaseUrgingTerms", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | public void deleteCaseUrging(String id){ |
| | | try{ |
| | | mapper.deleteCaseUrging(id); |
| | | }catch (Exception e){ |
| | | log.error("[CaseUrgingService.deleteCaseUrging]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseUrgingService.deleteCaseUrging", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 按条件查询 |
| | | * @param terms 条件 |
| | | * @return List |
| | | */ |
| | | public List<CaseUrging> 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<CaseUrging> pageQuery(PageRequest page, Map<String, Object> terms){ |
| | | long total = mapper.countTerms(terms); |
| | | List<CaseUrging> content = mapper.pageTerms(page, terms); |
| | | return new PageImpl<CaseUrging>(content, page, total); |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @param caseUrging 实体对象 |
| | | */ |
| | | public void saveCaseUrging(CaseUrging caseUrging){ |
| | | try{ |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 判断是否新增 |
| | | if (IdUtils.checkNewId(caseUrging.getId())){ |
| | | caseUrging.setId(utilsClient.getNewTimeId()); |
| | | caseUrging.setCreateTime(nowDate); |
| | | } |
| | | caseUrging.setUpdateTime(nowDate); |
| | | this.saveOrUpdate(caseUrging); |
| | | }catch (Exception e){ |
| | | log.error("[CaseUrgingService.saveCaseUrging]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseUrgingService.saveCaseUrging", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @param caseUrging 实体对象 |
| | | */ |
| | | public void saveCaseUrgingWechat(String userId,CaseUrging caseUrging){ |
| | | try{ |
| | | // 获取当前登录用户 |
| | | PaUserDTO loginUser = custClient.paclientGetUser(userId); |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 判断是否新增 |
| | | if (IdUtils.checkNewId(caseUrging.getId())){ |
| | | caseUrging.setId(utilsClient.getNewTimeId()); |
| | | caseUrging.setCreateTime(nowDate); |
| | | } |
| | | caseUrging.setUpdateTime(nowDate); |
| | | caseUrging.setUrgingUserId(loginUser.getId()); |
| | | caseUrging.setUrgingUserName(loginUser.getTrueName()); |
| | | caseUrging.setCustId(loginUser.getCustId()); |
| | | caseUrging.setUrgingTime(nowDate); |
| | | this.saveOrUpdate(caseUrging); |
| | | }catch (Exception e){ |
| | | log.error("[CaseUrgingService.saveCaseUrging]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseUrgingService.saveCaseUrging", e); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 根据多个所属编号查询附件 |
| | | * @url {ctx}/api/wechat/fileInfo/listByMainId |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/listByMainId") |
| | | public Object listByMainId(@RequestParam(value = "mainId") String mainId) { |
| | | try { |
| | | return ReturnSucUtils.getRepInfo(service.listByMainId(mainId)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * ocr识别身份证 |
| | | * @url {ctx}/api/wechat/fileInfo/wecatRecognition?ownerId=&ownerType= |
| | | * @param request |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据多个所属编号查询附件 |
| | | * @param mainId |
| | | * @return List |
| | | */ |
| | | public List<FileInfoBaseDTO> listByMainId(String mainId){ |
| | | try { |
| | | List<FileInfoBaseDTO> fileList = new ArrayList<>(); |
| | | Map<String, Object> terms = new HashMap<>(); |
| | | terms.put("mainId", mainId); |
| | | List<FileInfo> fileInfoList = mapper.listFile(terms); |
| | | if(CollectionUtils.isNotEmpty(fileInfoList)){ |
| | | for (FileInfo fileInfo : fileInfoList) { |
| | | FileInfoBaseDTO fileInfoBaseDTO = new FileInfoBaseDTO(); |
| | | BeanUtils.copyProperties(fileInfo, fileInfoBaseDTO); |
| | | fileInfoBaseDTO.setOwnerCatName(FileOwnerTypeBaseEnum.getDes(fileInfo.getOwnerCat())); |
| | | fileInfoBaseDTO.setOwnerTypeName(FileOwnerTypeBaseEnum.getDes(fileInfo.getOwnerType())); |
| | | fileList.add(fileInfoBaseDTO); |
| | | } |
| | | } |
| | | return fileList; |
| | | }catch (Exception e){ |
| | | log.error("[FileInfoService.listByMainId]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("FileInfoService.listByMainId", e); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |