1、联合处置相关接口
2、查询办理结果接口
3、查询档案信息接口
4、修改督办相关接口等
9 files added
28 files modified
| | |
| | | */ |
| | | public static final int INPUT_WAY_1 = 1; |
| | | public static final int INPUT_WAY_2 = 2; |
| | | |
| | | /** |
| | | * 登记方式,1:审核同意,2:审核不同意 |
| | | */ |
| | | public static final String AUDIT_RESULT_1 = "24_00004-1"; |
| | | public static final String AUDIT_RESULT_2 = "24_00004-2"; |
| | | } |
| | | /** |
| | | * -------------------_ooOoo_------------------- |
| | |
| | | private String agentStatus; |
| | | |
| | | /** |
| | | * 材料名称(总和) |
| | | */ |
| | | private String fileNames; |
| | | |
| | | /** |
| | | * 附件详细信息 |
| | | */ |
| | | private List<FileInfoBaseDTO> fileList; |
| | |
| | | package cn.huge.module.ctuser.controller.web; |
| | | |
| | | import cn.huge.base.common.dto.SelectTermDTO; |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | | import cn.huge.base.common.utils.ReturnSucUtils; |
| | | import cn.huge.base.config.CurrentUser; |
| | |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 选择组织 |
| | | * @url {ctx}/api/web/ctUnit/unitChoose |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/unitChoose") |
| | | public Object unitChoose(@CurrentUser String userId) { |
| | | try { |
| | | List<SelectTermDTO> unitSelectTerms = service.unitChoose(userId); |
| | | return ReturnSucUtils.getRepInfo(unitSelectTerms); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | |
| | | <if test="terms.limitTime != null and terms.limitTime !=''"> |
| | | and limit_time = #{terms.limitTime} |
| | | </if> |
| | | <if test="terms.deleteStatus = null and terms.deleteStatus =''"> |
| | | <if test="terms.deleteStatus != null and terms.deleteStatus !=''"> |
| | | and delete_status = 0 |
| | | </if> |
| | | <if test="terms.deleteStatus != null and terms.deleteStatus !=''"> |
| | |
| | | package cn.huge.module.ctuser.service; |
| | | |
| | | import cn.huge.base.common.dto.SelectTermDTO; |
| | | 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.base.common.utils.SelectTermUtils; |
| | | import cn.huge.module.client.api.impl.UtilsClientImpl; |
| | | import cn.huge.module.constant.BaseConsts; |
| | | import cn.huge.module.ctuser.dao.mapper.CtUnitMapper; |
| | | import cn.huge.module.ctuser.domain.po.CtDept; |
| | | import cn.huge.module.ctuser.domain.po.CtUnit; |
| | | import cn.huge.module.ctuser.domain.po.CtUser; |
| | | import cn.huge.module.ctuser.domain.po.CtUserole; |
| | | import cn.huge.module.ctuser.dto.CtUnitWeChatCountDTO; |
| | | import cn.huge.module.cust.constant.RoleBaseEnum; |
| | | 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.apache.commons.collections.CollectionUtils; |
| | |
| | | ctUnitWeChatCountDTO.setTzUnitNum(tzUnitNum); |
| | | return ctUnitWeChatCountDTO; |
| | | } |
| | | |
| | | /** |
| | | * 按条件分页查询 |
| | | * |
| | | * @param userId 分页对象 |
| | | * @return Page |
| | | */ |
| | | public List<SelectTermDTO> unitChoose(String userId) { |
| | | // 获取当前登录用户 |
| | | CtUserDTO loginUser = ctUserService.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 = this.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()); |
| | | |
| | | 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); |
| | | |
| | | deptSelectTerms.add(deptSelectTerm); |
| | | } |
| | | List<SelectTermDTO> depts = SelectTermUtils.createTreeByRoot(deptSelectTerms); |
| | | unitSelectTerm.setChildren(depts); |
| | | } |
| | | unitSelectTerms.add(unitSelectTerm); |
| | | } |
| | | return SelectTermUtils.createTreeByFirst(unitSelectTerms, loginUser.getUnitId()); |
| | | } |
| | | } |
| | |
| | | <if test="terms.limitTime != null and terms.limitTime !=''"> |
| | | and limit_time = #{terms.limitTime} |
| | | </if> |
| | | <if test="terms.deleteStatus = null and terms.deleteStatus =''"> |
| | | <if test="terms.deleteStatus != null and terms.deleteStatus !=''"> |
| | | and delete_status = 0 |
| | | </if> |
| | | <if test="terms.deleteStatus != null and terms.deleteStatus !=''"> |
| | |
| | | <if test="terms.followCaseType != null and terms.followCaseType !=''"> |
| | | and follow_case_type = #{terms.followCaseType} |
| | | </if> |
| | | <if test="terms.deleteStatus = null and terms.deleteStatus =''"> |
| | | <if test="terms.deleteStatus != null and terms.deleteStatus !=''"> |
| | | and delete_status = 0 |
| | | </if> |
| | | <if test="terms.deleteStatus != null and terms.deleteStatus !=''"> |
New file |
| | |
| | | package cn.huge.module.assist.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.assist.domain.po.CaseAssistApply; |
| | | import cn.huge.module.assist.service.CaseAssistApplyService; |
| | | 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-05 17:25:04 |
| | | * @version: 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/api/web/caseAssistApply") |
| | | public class CaseAssistApplyWebController { |
| | | |
| | | @Autowired(required = false) |
| | | private HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | private CaseAssistApplyService 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 applyUnitId = request.getParameter("applyUnitId"); |
| | | if (StringUtils.isNotBlank(applyUnitId)){ |
| | | terms.put("applyUnitId", applyUnitId); |
| | | } |
| | | // 申请组织名称 |
| | | String applyUnitName = request.getParameter("applyUnitName"); |
| | | if (StringUtils.isNotBlank(applyUnitName)){ |
| | | terms.put("applyUnitName", applyUnitName); |
| | | } |
| | | // 申请人编号 |
| | | String applyUserId = request.getParameter("applyUserId"); |
| | | if (StringUtils.isNotBlank(applyUserId)){ |
| | | terms.put("applyUserId", applyUserId); |
| | | } |
| | | // 申请人名称 |
| | | String applyUserName = request.getParameter("applyUserName"); |
| | | if (StringUtils.isNotBlank(applyUserName)){ |
| | | terms.put("applyUserName", applyUserName); |
| | | } |
| | | // 申请配合组织,多个用,隔开 |
| | | String applyAssistUnitId = request.getParameter("applyAssistUnitId"); |
| | | if (StringUtils.isNotBlank(applyAssistUnitId)){ |
| | | terms.put("applyAssistUnitId", applyAssistUnitId); |
| | | } |
| | | // 申请配合组织名称,多个用、隔开 |
| | | String applyAssistUnitName = request.getParameter("applyAssistUnitName"); |
| | | if (StringUtils.isNotBlank(applyAssistUnitName)){ |
| | | terms.put("applyAssistUnitName", applyAssistUnitName); |
| | | } |
| | | // 申请理由 |
| | | String applyContent = request.getParameter("applyContent"); |
| | | if (StringUtils.isNotBlank(applyContent)){ |
| | | terms.put("applyContent", applyContent); |
| | | } |
| | | // 申请时间 |
| | | String applyTime = request.getParameter("applyTime"); |
| | | if (StringUtils.isNotBlank(applyTime)){ |
| | | terms.put("applyTime", applyTime); |
| | | } |
| | | // 申请状态,0:待审核,1:已审核 |
| | | String applyStatus = request.getParameter("applyStatus"); |
| | | if (StringUtils.isNotBlank(applyStatus)){ |
| | | terms.put("applyStatus", applyStatus); |
| | | } |
| | | // 审核组织编号 |
| | | String auditUnitId = request.getParameter("auditUnitId"); |
| | | if (StringUtils.isNotBlank(auditUnitId)){ |
| | | terms.put("auditUnitId", auditUnitId); |
| | | } |
| | | // 审核组织名称 |
| | | String auditUnitName = request.getParameter("auditUnitName"); |
| | | if (StringUtils.isNotBlank(auditUnitName)){ |
| | | terms.put("auditUnitName", auditUnitName); |
| | | } |
| | | // 审核人编号 |
| | | String auditUserId = request.getParameter("auditUserId"); |
| | | if (StringUtils.isNotBlank(auditUserId)){ |
| | | terms.put("auditUserId", auditUserId); |
| | | } |
| | | // 审核人名称 |
| | | String auditUserName = request.getParameter("auditUserName"); |
| | | if (StringUtils.isNotBlank(auditUserName)){ |
| | | terms.put("auditUserName", auditUserName); |
| | | } |
| | | // 审核时间 |
| | | String auditTime = request.getParameter("auditTime"); |
| | | if (StringUtils.isNotBlank(auditTime)){ |
| | | terms.put("auditTime", auditTime); |
| | | } |
| | | // 审核结果 |
| | | String auditResult = request.getParameter("auditResult"); |
| | | if (StringUtils.isNotBlank(auditResult)){ |
| | | terms.put("auditResult", auditResult); |
| | | } |
| | | // 审核结果名称 |
| | | String auditResultName = request.getParameter("auditResultName"); |
| | | if (StringUtils.isNotBlank(auditResultName)){ |
| | | terms.put("auditResultName", auditResultName); |
| | | } |
| | | // 审核理由 |
| | | String audit_content = request.getParameter("audit_content"); |
| | | if (StringUtils.isNotBlank(audit_content)){ |
| | | terms.put("audit_content", audit_content); |
| | | } |
| | | // 删除状态,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/caseAssistApply/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/caseAssistApply/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<CaseAssistApply> caseAssistApplyPage = service.pageQuery(pageRequest, terms); |
| | | return ReturnSucUtils.getRepInfo( "处理成功", caseAssistApplyPage); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号查询单个 |
| | | * @url {ctx}/api/web/caseAssistApply/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/caseAssistApply/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/caseAssistApply/saveCaseAssistApply |
| | | * @param caseAssistApply 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/saveCaseAssistApply") |
| | | public Object saveCaseAssistApply(@RequestBody CaseAssistApply caseAssistApply) { |
| | | try { |
| | | service.saveCaseAssistApply(caseAssistApply); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 添加联合处置申请 |
| | | * @url {ctx}/api/web/caseAssistApply/addCaseAssistApply |
| | | * @param caseAssistApply 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/addCaseAssistApply") |
| | | public Object addCaseAssistApply(@CurrentUser String userId, @RequestBody CaseAssistApply caseAssistApply) { |
| | | try { |
| | | service.addCaseAssistApply(caseAssistApply, userId); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 审核联合审核 |
| | | * @url {ctx}/api/web/caseAssistApply/addCaseAssistApply |
| | | * @param caseAssistApply 实体对象 |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/reviewCaseAssistApply") |
| | | public Object reviewCaseAssistApply(@CurrentUser String userId, @RequestBody CaseAssistApply caseAssistApply) { |
| | | try { |
| | | service.reviewCaseAssistApply(caseAssistApply, userId); |
| | | return ReturnSucUtils.getRepInfo(); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.assist.dao.mapper; |
| | | |
| | | import cn.huge.module.assist.domain.po.CaseAssistApply; |
| | | 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-05 17:25:04 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Repository |
| | | public interface CaseAssistApplyMapper extends BaseMapper<CaseAssistApply>{ |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | void updateCaseAssistApply(@Param("entity") CaseAssistApply entity); |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | void updateCaseAssistApplyTerms(@Param("entity") CaseAssistApply entity, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | void deleteCaseAssistApply(@Param("id") String id); |
| | | |
| | | /** |
| | | * 按条件查询结果集 |
| | | * @param terms 查询条件集合 |
| | | * @return List<CaseAssistApply> |
| | | */ |
| | | List<CaseAssistApply> 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<CaseAssistApply> |
| | | */ |
| | | List<CaseAssistApply> 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-05 17:25:04 |
| | | * @version 1.0.0 |
| | | --> |
| | | <mapper namespace="cn.huge.module.assist.dao.mapper.CaseAssistApplyMapper"> |
| | | <!-- 结果集 --> |
| | | <resultMap id="dataResult" type="cn.huge.module.assist.domain.po.CaseAssistApply"> |
| | | <result property="id" column="id"/> |
| | | <result property="caseId" column="case_id"/> |
| | | <result property="applyUnitId" column="apply_unit_id"/> |
| | | <result property="applyUnitName" column="apply_unit_name"/> |
| | | <result property="applyUserId" column="apply_user_id"/> |
| | | <result property="applyUserName" column="apply_user_name"/> |
| | | <result property="applyAssistUnitId" column="apply_assist_unit_id"/> |
| | | <result property="applyAssistUnitName" column="apply_assist_unit_name"/> |
| | | <result property="applyContent" column="apply_content"/> |
| | | <result property="applyTime" column="apply_time"/> |
| | | <result property="applyStatus" column="apply_status"/> |
| | | <result property="auditUnitId" column="audit_unit_id"/> |
| | | <result property="auditUnitName" column="audit_unit_name"/> |
| | | <result property="auditUserId" column="audit_user_id"/> |
| | | <result property="auditUserName" column="audit_user_name"/> |
| | | <result property="auditTime" column="audit_time"/> |
| | | <result property="auditResult" column="audit_result"/> |
| | | <result property="auditResultName" column="audit_result_name"/> |
| | | <result property="audit_content" column="audit__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_assist_apply</sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | | id, |
| | | case_id, |
| | | apply_unit_id, |
| | | apply_unit_name, |
| | | apply_user_id, |
| | | apply_user_name, |
| | | apply_assist_unit_id, |
| | | apply_assist_unit_name, |
| | | apply_content, |
| | | apply_time, |
| | | apply_status, |
| | | audit_unit_id, |
| | | audit_unit_name, |
| | | audit_user_id, |
| | | audit_user_name, |
| | | audit_time, |
| | | audit_result, |
| | | audit_result_name, |
| | | audit__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.applyUnitId != null">apply_unit_id = #{entity.applyUnitId},</if> |
| | | <if test="entity.applyUnitName != null">apply_unit_name = #{entity.applyUnitName},</if> |
| | | <if test="entity.applyUserId != null">apply_user_id = #{entity.applyUserId},</if> |
| | | <if test="entity.applyUserName != null">apply_user_name = #{entity.applyUserName},</if> |
| | | <if test="entity.applyAssistUnitId != null">apply_assist_unit_id = #{entity.applyAssistUnitId},</if> |
| | | <if test="entity.applyAssistUnitName != null">apply_assist_unit_name = #{entity.applyAssistUnitName},</if> |
| | | <if test="entity.applyContent != null">apply_content = #{entity.applyContent},</if> |
| | | <if test="entity.applyTime != null">apply_time = #{entity.applyTime},</if> |
| | | <if test="entity.applyStatus != null">apply_status = #{entity.applyStatus},</if> |
| | | <if test="entity.auditUnitId != null">audit_unit_id = #{entity.auditUnitId},</if> |
| | | <if test="entity.auditUnitName != null">audit_unit_name = #{entity.auditUnitName},</if> |
| | | <if test="entity.auditUserId != null">audit_user_id = #{entity.auditUserId},</if> |
| | | <if test="entity.auditUserName != null">audit_user_name = #{entity.auditUserName},</if> |
| | | <if test="entity.auditTime != null">audit_time = #{entity.auditTime},</if> |
| | | <if test="entity.auditResult != null">audit_result = #{entity.auditResult},</if> |
| | | <if test="entity.auditResultName != null">audit_result_name = #{entity.auditResultName},</if> |
| | | <if test="entity.audit_content != null">audit__content = #{entity.audit_content},</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.applyUnitId != null and terms.applyUnitId !=''"> |
| | | and apply_unit_id = #{terms.applyUnitId} |
| | | </if> |
| | | <if test="terms.applyUnitName != null and terms.applyUnitName !=''"> |
| | | and apply_unit_name = #{terms.applyUnitName} |
| | | </if> |
| | | <if test="terms.applyUserId != null and terms.applyUserId !=''"> |
| | | and apply_user_id = #{terms.applyUserId} |
| | | </if> |
| | | <if test="terms.applyUserName != null and terms.applyUserName !=''"> |
| | | and apply_user_name = #{terms.applyUserName} |
| | | </if> |
| | | <if test="terms.applyAssistUnitId != null and terms.applyAssistUnitId !=''"> |
| | | and apply_assist_unit_id = #{terms.applyAssistUnitId} |
| | | </if> |
| | | <if test="terms.applyAssistUnitName != null and terms.applyAssistUnitName !=''"> |
| | | and apply_assist_unit_name = #{terms.applyAssistUnitName} |
| | | </if> |
| | | <if test="terms.applyContent != null and terms.applyContent !=''"> |
| | | and apply_content = #{terms.applyContent} |
| | | </if> |
| | | <if test="terms.applyTime != null and terms.applyTime !=''"> |
| | | and apply_time = #{terms.applyTime} |
| | | </if> |
| | | <if test="terms.applyStatus != null and terms.applyStatus !=''"> |
| | | and apply_status = #{terms.applyStatus} |
| | | </if> |
| | | <if test="terms.auditUnitId != null and terms.auditUnitId !=''"> |
| | | and audit_unit_id = #{terms.auditUnitId} |
| | | </if> |
| | | <if test="terms.auditUnitName != null and terms.auditUnitName !=''"> |
| | | and audit_unit_name = #{terms.auditUnitName} |
| | | </if> |
| | | <if test="terms.auditUserId != null and terms.auditUserId !=''"> |
| | | and audit_user_id = #{terms.auditUserId} |
| | | </if> |
| | | <if test="terms.auditUserName != null and terms.auditUserName !=''"> |
| | | and audit_user_name = #{terms.auditUserName} |
| | | </if> |
| | | <if test="terms.auditTime != null and terms.auditTime !=''"> |
| | | and audit_time = #{terms.auditTime} |
| | | </if> |
| | | <if test="terms.auditResult != null and terms.auditResult !=''"> |
| | | and audit_result = #{terms.auditResult} |
| | | </if> |
| | | <if test="terms.auditResultName != null and terms.auditResultName !=''"> |
| | | and audit_result_name = #{terms.auditResultName} |
| | | </if> |
| | | <if test="terms.audit_content != null and terms.audit_content !=''"> |
| | | and audit__content = #{terms.audit_content} |
| | | </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="updateCaseAssistApply"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <where> |
| | | id = #{entity.id} |
| | | </where> |
| | | </update> |
| | | <!-- 条件更新对象 --> |
| | | <update id="updateCaseAssistApplyTerms"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | | <include refid="set-part"/> |
| | | </set> |
| | | <include refid="where-part"/> |
| | | </update> |
| | | <!-- 根据编号物理删除 --> |
| | | <delete id="deleteCaseAssistApply"> |
| | | 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.assist.domain.bo; |
| | | |
| | | import cn.huge.module.assist.domain.po.CaseAssistApply; |
| | | |
| | | /** |
| | | * @title: 联合处置申请信息表业务扩展类 |
| | | * @description: 联合处置申请信息表业务扩展类 |
| | | * @company: hugeinfo |
| | | * @author: wangwh |
| | | * @time: 2024-09-05 17:25:04 |
| | | * @version: 1.0.0 |
| | | * @see cn.huge.module.assist.domain.po.CaseAssistApply |
| | | */ |
| | | public class CaseAssistApplyBO extends CaseAssistApply { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package cn.huge.module.assist.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-05 17:25:04 |
| | | * @version 1.0.0 |
| | | */ |
| | | @TableName(value = "dyh_case_assist_apply") |
| | | @Data |
| | | public class CaseAssistApply { |
| | | |
| | | /** |
| | | * 主键编号 |
| | | */ |
| | | @TableId(value = "id") |
| | | private String id; |
| | | |
| | | /** |
| | | * 纠纷编号 |
| | | */ |
| | | @TableField(value = "case_id") |
| | | private String caseId; |
| | | |
| | | /** |
| | | * 申请组织编号 |
| | | */ |
| | | @TableField(value = "apply_unit_id") |
| | | private String applyUnitId; |
| | | |
| | | /** |
| | | * 申请组织名称 |
| | | */ |
| | | @TableField(value = "apply_unit_name") |
| | | private String applyUnitName; |
| | | |
| | | /** |
| | | * 申请人编号 |
| | | */ |
| | | @TableField(value = "apply_user_id") |
| | | private String applyUserId; |
| | | |
| | | /** |
| | | * 申请人名称 |
| | | */ |
| | | @TableField(value = "apply_user_name") |
| | | private String applyUserName; |
| | | |
| | | /** |
| | | * 申请配合组织,多个用,隔开 |
| | | */ |
| | | @TableField(value = "apply_assist_unit_id") |
| | | private String applyAssistUnitId; |
| | | |
| | | /** |
| | | * 申请配合组织名称,多个用、隔开 |
| | | */ |
| | | @TableField(value = "apply_assist_unit_name") |
| | | private String applyAssistUnitName; |
| | | |
| | | /** |
| | | * 申请理由 |
| | | */ |
| | | @TableField(value = "apply_content") |
| | | private String applyContent; |
| | | |
| | | /** |
| | | * 申请时间 |
| | | */ |
| | | @TableField(value = "apply_time") |
| | | private Date applyTime; |
| | | |
| | | /** |
| | | * 申请状态,0:待审核,1:已审核 |
| | | */ |
| | | @TableField(value = "apply_status") |
| | | private Integer applyStatus; |
| | | |
| | | /** |
| | | * 审核组织编号 |
| | | */ |
| | | @TableField(value = "audit_unit_id") |
| | | private String auditUnitId; |
| | | |
| | | /** |
| | | * 审核组织名称 |
| | | */ |
| | | @TableField(value = "audit_unit_name") |
| | | private String auditUnitName; |
| | | |
| | | /** |
| | | * 审核人编号 |
| | | */ |
| | | @TableField(value = "audit_user_id") |
| | | private String auditUserId; |
| | | |
| | | /** |
| | | * 审核人名称 |
| | | */ |
| | | @TableField(value = "audit_user_name") |
| | | private String auditUserName; |
| | | |
| | | /** |
| | | * 审核时间 |
| | | */ |
| | | @TableField(value = "audit_time") |
| | | private Date auditTime; |
| | | |
| | | /** |
| | | * 审核结果 |
| | | */ |
| | | @TableField(value = "audit_result") |
| | | private String auditResult; |
| | | |
| | | /** |
| | | * 审核结果名称 |
| | | */ |
| | | @TableField(value = "audit_result_name") |
| | | private String auditResultName; |
| | | |
| | | /** |
| | | * 审核理由 |
| | | */ |
| | | @TableField(value = "audit__content") |
| | | private String audit_content; |
| | | |
| | | /** |
| | | * 删除状态,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> fileTypeInfoBaseDTOList; |
| | | } |
New file |
| | |
| | | package cn.huge.module.assist.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.assist.dao.mapper.CaseAssistApplyMapper; |
| | | import cn.huge.module.assist.domain.po.CaseAssistApply; |
| | | 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 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; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @title: 联合处置申请信息表业务逻辑处理 |
| | | * @Description 联合处置申请信息表业务逻辑处理 |
| | | * @company hugeinfo |
| | | * @author wangwh |
| | | * @Time 2024-09-05 17:25:04 |
| | | * @version 1.0.0 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class CaseAssistApplyService extends ServiceImpl<CaseAssistApplyMapper, CaseAssistApply>{ |
| | | |
| | | @Autowired |
| | | private CaseAssistApplyMapper mapper; |
| | | |
| | | @Autowired |
| | | private UtilsClientImpl utilsClient; |
| | | |
| | | @Autowired |
| | | private CustClientImpl custClient; |
| | | |
| | | /** |
| | | * 更新对象 |
| | | * @param entity 对象 |
| | | */ |
| | | public void updateCaseAssistApply(CaseAssistApply entity){ |
| | | try{ |
| | | mapper.updateCaseAssistApply(entity); |
| | | }catch (Exception e){ |
| | | log.error("[CaseAssistApplyService.updateCaseAssistApply]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseAssistApplyService.updateCaseAssistApply", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 条件更新对象 |
| | | * @param entity 对象 |
| | | * @param terms 条件 |
| | | */ |
| | | public void updateCaseAssistApplyTerms(CaseAssistApply entity, Map<String, Object> terms){ |
| | | try{ |
| | | mapper.updateCaseAssistApplyTerms(entity, terms); |
| | | }catch (Exception e){ |
| | | log.error("[CaseAssistApplyService.updateCaseAssistApplyTerms]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseAssistApplyService.updateCaseAssistApplyTerms", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据编号物理删除 |
| | | * @param id 查询条件集合 |
| | | */ |
| | | public void deleteCaseAssistApply(String id){ |
| | | try{ |
| | | mapper.deleteCaseAssistApply(id); |
| | | }catch (Exception e){ |
| | | log.error("[CaseAssistApplyService.deleteCaseAssistApply]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseAssistApplyService.deleteCaseAssistApply", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 按条件查询 |
| | | * @param terms 条件 |
| | | * @return List |
| | | */ |
| | | public List<CaseAssistApply> 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<CaseAssistApply> pageQuery(PageRequest page, Map<String, Object> terms){ |
| | | long total = mapper.countTerms(terms); |
| | | List<CaseAssistApply> content = mapper.pageTerms(page, terms); |
| | | return new PageImpl<CaseAssistApply>(content, page, total); |
| | | } |
| | | |
| | | /** |
| | | * 新增或更新对象 |
| | | * @param caseAssistApply 实体对象 |
| | | */ |
| | | public void saveCaseAssistApply(CaseAssistApply caseAssistApply){ |
| | | try{ |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | // 判断是否新增 |
| | | if (IdUtils.checkNewId(caseAssistApply.getId())){ |
| | | caseAssistApply.setId(utilsClient.getNewTimeId()); |
| | | caseAssistApply.setCreateTime(nowDate); |
| | | } |
| | | caseAssistApply.setUpdateTime(nowDate); |
| | | this.saveOrUpdate(caseAssistApply); |
| | | }catch (Exception e){ |
| | | log.error("[CaseAssistApplyService.saveCaseAssistApply]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseAssistApplyService.saveCaseAssistApply", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 添加联合处置申请 |
| | | * @param caseAssistApply 实体对象 |
| | | */ |
| | | public void addCaseAssistApply(CaseAssistApply caseAssistApply, String userId){ |
| | | try{ |
| | | // 获取当前登录用户 |
| | | CtUserDTO loginUser = custClient.clientGetUserAll(userId); |
| | | Date now = DateUtils.getNowDate(); |
| | | |
| | | caseAssistApply.setApplyUnitId(loginUser.getUnitId()); |
| | | caseAssistApply.setApplyUnitName(loginUser.getUnitName()); |
| | | caseAssistApply.setApplyUserId(loginUser.getId()); |
| | | caseAssistApply.setApplyUserName(loginUser.getTrueName()); |
| | | caseAssistApply.setApplyStatus(0); |
| | | caseAssistApply.setCreateTime(now); |
| | | caseAssistApply.setUpdateTime(now); |
| | | //todo 添加任务 |
| | | |
| | | mapper.insert(caseAssistApply); |
| | | }catch (Exception e){ |
| | | log.error("[CaseAssistApplyService.addCaseAssistApply]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseAssistApplyService.addCaseAssistApply", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 审核联合处置申请 |
| | | * @param caseAssistApply 实体对象 |
| | | */ |
| | | public void reviewCaseAssistApply(CaseAssistApply caseAssistApply, String userId){ |
| | | try{ |
| | | // 获取当前登录用户 |
| | | CtUserDTO loginUser = custClient.clientGetUserAll(userId); |
| | | Date now = DateUtils.getNowDate(); |
| | | |
| | | caseAssistApply.setApplyStatus(1); |
| | | caseAssistApply.setAuditUnitId(loginUser.getUnitId()); |
| | | caseAssistApply.setAuditUnitName(loginUser.getUnitName()); |
| | | caseAssistApply.setAuditUserId(loginUser.getId()); |
| | | caseAssistApply.setAuditUserName(loginUser.getTrueName()); |
| | | caseAssistApply.setAuditTime(now); |
| | | caseAssistApply.setUpdateTime(now); |
| | | //todo 修改任务状态 |
| | | |
| | | mapper.updateCaseAssistApply(caseAssistApply); |
| | | }catch (Exception e){ |
| | | log.error("[CaseAssistApplyService.reviewCaseAssistApply]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseAssistApplyService.reviewCaseAssistApply", e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据案件编号查询联合处置申请 |
| | | * @param caseId 条件 |
| | | * @return long |
| | | */ |
| | | public List<CaseAssistApply> listCaseAssistApplyByCaseId(String caseId){ |
| | | QueryWrapper<CaseAssistApply> caseAssistApplyQueryWrapper = new QueryWrapper<>(); |
| | | caseAssistApplyQueryWrapper.eq("case_id", caseId).orderByDesc("create_time"); |
| | | List<CaseAssistApply> caseAssistApplyList = mapper.selectList(caseAssistApplyQueryWrapper); |
| | | return caseAssistApplyList; |
| | | } |
| | | } |
| | |
| | | return ReturnFailUtils.getRepInfo(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询办理结果 |
| | | * @url {ctx}/api/web/caseInfoUnfold/getTransactResult |
| | | * @param caseId 事项ID |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/getTransactResult") |
| | | public Object getTransactResult(@RequestParam(value = "caseId") String caseId) { |
| | | try { |
| | | return ReturnSucUtils.getRepInfo(service.getTransactResult(caseId)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | } |
| | |
| | | return ReturnFailUtils.getRepInfo(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * PC端-查询档案信息 |
| | | * @url {ctx}/api/web/caseInfo/getCaseArchivesInfo?id= |
| | | * @param id 纠纷编号 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/getCaseArchivesInfo") |
| | | public Object getCaseArchivesInfo(@RequestParam(value = "id") String id) { |
| | | try { |
| | | return ReturnSucUtils.getRepInfo(service.getCaseArchivesInfo(id)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | if (StringUtils.isNotBlank(supTime)){ |
| | | terms.put("supTime", supTime); |
| | | } |
| | | // 被督办组织编号 |
| | | String quiltUnitId = request.getParameter("quiltUnitId"); |
| | | if (StringUtils.isNotBlank(quiltUnitId)){ |
| | | terms.put("quiltUnitId", quiltUnitId); |
| | | } |
| | | // 被督办组织名称 |
| | | String quiltUnitName = request.getParameter("quiltUnitName"); |
| | | if (StringUtils.isNotBlank(quiltUnitName)){ |
| | | terms.put("quiltUnitName", quiltUnitName); |
| | | } |
| | | // 督办状态,0:未回复,1:已回复 |
| | | String supStatus = request.getParameter("supStatus"); |
| | | if (StringUtils.isNotBlank(supStatus)){ |
| | |
| | | } |
| | | |
| | | /** |
| | | * 添加督办 |
| | | * 回复督办 |
| | | * @url {ctx}/api/web/caseSupervise/replyCaseSupervise |
| | | * @param caseSupervise 实体对象 |
| | | * @return Object |
| | |
| | | |
| | | /** |
| | | * 督办信息查询 |
| | | * @url {ctx}/api/web/caseSupervise/listCaseSupervise |
| | | * @url {ctx}/api/web/caseSupervise/pageCaseSupervise |
| | | * @param caseId 主键编号 |
| | | * @return Object |
| | | */ |
| | | @GetMapping("/listCaseSupervise") |
| | | public Object listCaseSupervise(@RequestParam(value = "caseId") String caseId) { |
| | | @GetMapping("/pageCaseSupervise") |
| | | public Object pageCaseSupervise(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size, |
| | | @RequestParam(value = "caseId") String caseId, @RequestParam(value = "supStatus") int supStatus, |
| | | @CurrentUser String userId) { |
| | | try { |
| | | return ReturnSucUtils.getRepInfo(service.listCaseSupervise(caseId)); |
| | | Sort sort = Sort.by(Sort.Direction.DESC, "create_time"); |
| | | PageRequest pageRequest = PageRequest.of(page-1, size, sort); |
| | | return ReturnSucUtils.getRepInfo(service.pageCaseSupervise(caseId, pageRequest, supStatus, userId)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | |
| | | */ |
| | | List<CaseSupervise> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms); |
| | | |
| | | /** |
| | | * 按条件查询实体总数 |
| | | * @param caseId 查询条件集合 |
| | | * @param page 分页对象 |
| | | * @param caseId 事项ID |
| | | */ |
| | | long countCaseSupervise(@Param("caseId") String caseId, @Param("page") PageRequest page, @Param("supStatus") int supStatus, @Param("quiltUnitId") String quiltUnitId); |
| | | |
| | | /** |
| | | * 根据事项ID分页查询 |
| | | * @param page 分页对象 |
| | | * @param caseId 事项ID |
| | | * @return List<CaseSupervise> |
| | | */ |
| | | List<CaseSupervise> pageCaseSupervise(@Param("caseId") String caseId, @Param("page") PageRequest page, @Param("supStatus") int supStatus, @Param("quiltUnitId") String quiltUnitId); |
| | | |
| | | |
| | | } |
| | |
| | | <result property="supUserId" column="sup_user_id"/> |
| | | <result property="supUserName" column="sup_user_name"/> |
| | | <result property="supTime" column="sup_time"/> |
| | | <result property="quiltUnitId" column="quilt_unit_id"/> |
| | | <result property="quiltUnitName" column="quilt_unit_name"/> |
| | | <result property="supStatus" column="sup_status"/> |
| | | <result property="replyTerm" column="reply_term"/> |
| | | <result property="replyContent" column="reply_content"/> |
| | |
| | | sup_user_id, |
| | | sup_user_name, |
| | | sup_time, |
| | | quilt_unit_id, |
| | | quilt_unit_name, |
| | | sup_status, |
| | | reply_term, |
| | | reply_content, |
| | |
| | | <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.quiltUnitId != null">quilt_unit_id = #{entity.quiltUnitId},</if> |
| | | <if test="entity.quiltUnitName != null">quilt_unit_name = #{entity.quiltUnitName},</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="terms.supTime != null and terms.supTime !=''"> |
| | | and sup_time = #{terms.supTime} |
| | | </if> |
| | | <if test="terms.quiltUnitId != null and terms.quiltUnitId !=''"> |
| | | and quilt_unit_id = #{terms.quiltUnitId} |
| | | </if> |
| | | <if test="terms.quiltUnitName != null and terms.quiltUnitName !=''"> |
| | | and quilt_unit_name = #{terms.quiltUnitName} |
| | | </if> |
| | | <if test="terms.supStatus != null and terms.supStatus !=''"> |
| | | and sup_status = #{terms.supStatus} |
| | | </if> |
| | |
| | | </if> |
| | | <if test="terms.deleteStatus != null and terms.deleteStatus !=''"> |
| | | and delete_status = #{terms.deleteStatus} |
| | | </if> |
| | | <if test="terms.deleteStatus == null or terms.deleteStatus ==''"> |
| | | and delete_status = '0' |
| | | </if> |
| | | <if test="terms.custId != null and terms.custId !=''"> |
| | | and cust_id = #{terms.custId} |
| | |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | |
| | | <!-- 根据条件统计 --> |
| | | <select id="countCaseSupervise" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(1) |
| | | from |
| | | <include refid="table-name" /> |
| | | where case_id = #{caseId} |
| | | and delete_status = '0' |
| | | and sup_status = #{supStatus} |
| | | and quilt_unit_id = #{quiltUnitId} |
| | | </select> |
| | | |
| | | <!-- 根据条件分页查询 --> |
| | | <select id="pageCaseSupervise" resultMap="dataResult"> |
| | | SELECT |
| | | <include refid="column-part"/> |
| | | FROM |
| | | <include refid="table-name" /> |
| | | where case_id = #{caseId} |
| | | and delete_status = '0' |
| | | and sup_status = #{supStatus} |
| | | and quilt_unit_id = #{quiltUnitId} |
| | | <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(sup_time), sup_time desc |
| | | </if> |
| | | limit #{page.offset}, #{page.size} |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | import cn.huge.module.cases.domain.po.CaseAgent; |
| | | import cn.huge.module.cases.domain.po.CaseInfo; |
| | | import cn.huge.module.cases.domain.po.CaseInfoUnfold; |
| | | import cn.huge.module.cases.domain.po.CasePerson; |
| | | import cn.huge.module.sys.dto.FileTypeInfoBaseDTO; |
| | | import lombok.Data; |
New file |
| | |
| | | package cn.huge.module.cases.domain.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class QuiltUnitDTO{ |
| | | /** |
| | | * 被督办组织编号 |
| | | */ |
| | | private String quiltUnitId; |
| | | |
| | | /** |
| | | * 被督办组织名称 |
| | | */ |
| | | private String quiltUnitName; |
| | | } |
New file |
| | |
| | | package cn.huge.module.cases.domain.dto; |
| | | |
| | | import cn.huge.module.cases.domain.po.CaseInfoUnfold; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class TransactResultDTO extends CaseInfoUnfold { |
| | | /** |
| | | * 申请配合组织名称,多个用、隔开 |
| | | */ |
| | | private String applyAssistUnitName; |
| | | } |
| | |
| | | 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 = "create_time") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @JsonFormat(pattern="yyyy-MM-dd HH:mm", timezone="GMT+8") |
| | | @TableField(value = "update_time") |
| | | private Date updateTime; |
| | | |
| | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @JsonFormat(pattern="yyyy-MM-dd HH:mm", timezone="GMT+8") |
| | | @TableField(value = "create_time") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @JsonFormat(pattern="yyyy-MM-dd HH:mm", timezone="GMT+8") |
| | | @TableField(value = "update_time") |
| | | private Date updateTime; |
| | | |
| | |
| | | package cn.huge.module.cases.domain.po; |
| | | |
| | | import cn.huge.module.cases.domain.dto.QuiltUnitDTO; |
| | | import cn.huge.module.sys.dto.FileTypeInfoBaseDTO; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | |
| | | */ |
| | | @TableField(value = "sup_time") |
| | | private Date supTime; |
| | | |
| | | /** |
| | | * 被督办组织编号 |
| | | */ |
| | | @TableField(value = "quilt_unit_id") |
| | | private String quiltUnitId; |
| | | |
| | | /** |
| | | * 被督办组织名称 |
| | | */ |
| | | @TableField(value = "quilt_unit_name") |
| | | private String quiltUnitName; |
| | | |
| | | /** |
| | | * 督办状态,0:未回复,1:已回复 |
| | |
| | | */ |
| | | @TableField(exist = false) |
| | | private List<FileTypeInfoBaseDTO> fileInfoList; |
| | | |
| | | /** |
| | | * 被督办组织信息 |
| | | */ |
| | | @TableField(exist = false) |
| | | private List<QuiltUnitDTO> quiltUnitDTOList; |
| | | } |
| | |
| | | String ownerIds = caseFeedbackList.stream().map(CaseFeedback::getId).collect(Collectors.joining("','")); |
| | | ownerIds = "'"+ ownerIds + "'"; |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("mainId", id); |
| | | map.put("ownerIds", ownerIds); |
| | | List<FileIdInfoBaseDTO> fileInfoList = sysClient.listIdInfoByOwnerIdList(map, id); |
| | | List<FileIdInfoBaseDTO> fileInfoList = sysClient.listIdInfoByOwnerIdList(map); |
| | | |
| | | for(CaseFeedback caseFeedback: caseFeedbackList){ |
| | | for(FileIdInfoBaseDTO fileInfo: fileInfoList){ |
| | |
| | | String ids = idList.stream().map(String::valueOf).collect(Collectors.joining("','")); |
| | | ids = "'"+ ids + "'"; |
| | | Map<String, Object> term = new HashMap<>(); |
| | | term.put("mainId", caseId); |
| | | term.put("ownerIds", ids); |
| | | //查询所有附件 |
| | | List<FileIdTypeInfoBaseDTO> fileInfoList = sysClient.listIdTypeInfoByOwnerIdList(term, caseId); |
| | | List<FileIdTypeInfoBaseDTO> fileInfoList = sysClient.listIdTypeInfoByOwnerIdList(term); |
| | | 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; |
| | | } |
| | | |
| | | /** |
| | | * PC端-查询纠纷信息 |
| | | * @param caseId 纠纷编号 |
| | | * @return CaseInfo 纠纷信息 |
| | | */ |
| | | public CaseInfoDTO getCaseArchivesInfo(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("mainId", caseId); |
| | | term.put("ownerIds", ids); |
| | | //查询所有附件 |
| | | List<FileIdTypeInfoBaseDTO> fileInfoList = sysClient.listIdTypeInfoByOwnerIdList(term); |
| | | for(FileIdTypeInfoBaseDTO fileInfo: fileInfoList){ |
| | | if(caseId.equals(fileInfo.getOwnerId())){ |
| | | caseInfoDTO.setFileInfoList(fileInfo.getFileList()); |
| | |
| | | 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.assist.domain.po.CaseAssistApply; |
| | | import cn.huge.module.assist.service.CaseAssistApplyService; |
| | | import cn.huge.module.cases.domain.dto.TransactResultDTO; |
| | | 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 cn.huge.module.mediate.constant.CaseBaseConsts; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | |
| | | @Autowired |
| | | private CustClientImpl custClient; |
| | | |
| | | @Autowired |
| | | private CaseAssistApplyService assistApplyService; |
| | | |
| | | /** |
| | | * 更新对象 |
| | |
| | | throw new ServiceException("CaseInfoUnfoldService.choosePrincipal", e); |
| | | } |
| | | } |
| | | |
| | | public TransactResultDTO getTransactResult(String caseId){ |
| | | //查询办理结果信息 |
| | | QueryWrapper<CaseInfoUnfold>caseInfoUnfoldQueryWrapper = new QueryWrapper<>(); |
| | | caseInfoUnfoldQueryWrapper.eq("case_id", caseId); |
| | | CaseInfoUnfold caseInfoUnfold = this.getOne(caseInfoUnfoldQueryWrapper); |
| | | |
| | | TransactResultDTO transactResultDTO = new TransactResultDTO(); |
| | | BeanUtils.copyProperties(caseInfoUnfold, transactResultDTO); |
| | | if(ObjectUtils.isNotEmpty(transactResultDTO)){ |
| | | QueryWrapper<CaseAssistApply> caseAssistApplyQueryWrapper = new QueryWrapper<>(); |
| | | caseAssistApplyQueryWrapper.select("apply_assist_unit_name").eq("case_id", caseId).eq("apply_status", 1) |
| | | .eq("audit_result", CaseBaseConsts.AUDIT_RESULT_1); |
| | | CaseAssistApply caseAssistApply = assistApplyService.getOne(caseAssistApplyQueryWrapper); |
| | | |
| | | if(ObjectUtils.isNotEmpty(caseAssistApply)){ |
| | | transactResultDTO.setApplyAssistUnitName(caseAssistApply.getApplyAssistUnitName()); |
| | | } |
| | | } |
| | | return transactResultDTO; |
| | | } |
| | | |
| | | } |
| | |
| | | import cn.huge.base.common.exception.ServiceException; |
| | | import cn.huge.base.common.utils.DateUtils; |
| | | import cn.huge.base.common.utils.IdUtils; |
| | | import cn.huge.module.cases.domain.dto.QuiltUnitDTO; |
| | | 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.sys.dto.FileInfoBaseDTO; |
| | | 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; |
| | |
| | | /** |
| | | * 添加督办 |
| | | * @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 配置时限 |
| | | List<QuiltUnitDTO> quiltUnitDTOList = caseSupervise.getQuiltUnitDTOList(); |
| | | Integer timeTerm = sysClient.getTimeLimit("dyh_case_supervise", SyTimeEnum.SY_TIME_03.getIndex()); |
| | | caseSupervise.setReplyTerm(timeTerm); |
| | | this.save(caseSupervise); |
| | | List<CaseSupervise> caseSuperviseList = new ArrayList<>(); |
| | | for(QuiltUnitDTO quiltUnitDTO: quiltUnitDTOList){ |
| | | CaseSupervise caseSuperviseNew = new CaseSupervise(); |
| | | BeanUtils.copyProperties(caseSupervise, caseSuperviseNew); |
| | | // 获取当前登录用户 |
| | | CtUserDTO loginUser = custClient.clientGetUserAll(userId); |
| | | Date nowDate = DateUtils.getNowDate(); |
| | | caseSuperviseNew.setSupUserId(loginUser.getId()); |
| | | caseSuperviseNew.setSupUserName(loginUser.getTrueName()); |
| | | caseSuperviseNew.setSupTime(nowDate); |
| | | caseSuperviseNew.setQuiltUnitId(quiltUnitDTO.getQuiltUnitId()); |
| | | caseSuperviseNew.setQuiltUnitName(quiltUnitDTO.getQuiltUnitName()); |
| | | caseSuperviseNew.setSupStatus(0); |
| | | caseSuperviseNew.setCreateTime(nowDate); |
| | | caseSuperviseNew.setUpdateTime(nowDate); |
| | | caseSuperviseNew.setReplyTerm(timeTerm); |
| | | caseSuperviseList.add(caseSuperviseNew); |
| | | } |
| | | this.saveBatch(caseSuperviseList); |
| | | }catch (Exception e){ |
| | | log.error("[CaseSuperviseService.saveCaseSupervise]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseSuperviseService.saveCaseSupervise", e); |
| | |
| | | * 流转办理-督办列表 |
| | | * @param caseId 事项Id |
| | | */ |
| | | public Map<String, Object> listCaseSupervise(String caseId){ |
| | | public Page<CaseSupervise> pageCaseSupervise(String caseId, PageRequest page, int supStatus, String userId){ |
| | | 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); |
| | | CtUserDTO loginUser = custClient.clientGetUserAll(userId); |
| | | String quiltUnitId = loginUser.getUnitId(); |
| | | long countSuperviseList = mapper.countCaseSupervise(caseId, page, supStatus, quiltUnitId); |
| | | List<CaseSupervise> caseSuperviseList = mapper.pageCaseSupervise(caseId, page, supStatus, quiltUnitId); |
| | | |
| | | Map<String, Object>map = new HashMap<>(); |
| | | map.put("mainId", caseId); |
| | | 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); |
| | | List<FileIdTypeInfoBaseDTO> fileIdTypeInfoBaseDTOList = sysClient.listIdTypeInfoByOwnerIdList(map); |
| | | 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; |
| | | return new PageImpl<CaseSupervise>(caseSuperviseList, page, countSuperviseList); |
| | | }catch (Exception e){ |
| | | log.error("[CaseSuperviseService.listCaseSupervise]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseSuperviseService.listCaseSupervise", e); |
| | | log.error("[CaseSuperviseService.pageReplied]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("CaseSuperviseService.pageReplied", e); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | * @return ReturnBO |
| | | */ |
| | | @PostMapping("/api/client/fileInfo/listIdTypeInfoByOwnerIdList") |
| | | ReturnBO listTypeInfoByOwnerIdList(@RequestBody Map<String, Object> term, @RequestParam(value = "mainId") String mainId); |
| | | ReturnBO listTypeInfoByOwnerIdList(@RequestBody Map<String, Object> term); |
| | | |
| | | /** |
| | | * 附件中心-根据多个所属编号查询附件 |
| | |
| | | * @return ReturnBO |
| | | */ |
| | | @PostMapping("/api/client/fileInfo/listInfoByOwnerIdList") |
| | | ReturnBO listInfoByOwnerIdList(@RequestBody Map<String, Object> term, @RequestParam(value = "mainId") String mainId); |
| | | ReturnBO listInfoByOwnerIdList(@RequestBody Map<String, Object> term); |
| | | |
| | | /** |
| | | * 附件中心-根据多个所属编号查询附件 |
| | |
| | | * @param term 所属业务编号 |
| | | * @return List |
| | | */ |
| | | public List<FileIdTypeInfoBaseDTO> listIdTypeInfoByOwnerIdList(Map<String, Object> term, String mainId){ |
| | | public List<FileIdTypeInfoBaseDTO> listIdTypeInfoByOwnerIdList(Map<String, Object> term){ |
| | | List<FileIdTypeInfoBaseDTO> fileIdTypeInfoBaseDTOList = new ArrayList<>(); |
| | | try{ |
| | | ReturnBO returnBo = sysClient.listTypeInfoByOwnerIdList(term, mainId); |
| | | ReturnBO returnBo = sysClient.listTypeInfoByOwnerIdList(term); |
| | | if (ReturnConsts.OK == returnBo.getCode()){ |
| | | if (ObjectUtils.isNotEmpty(returnBo.getData())){ |
| | | List<LinkedHashMap> list = (List<LinkedHashMap>) returnBo.getData(); |
| | |
| | | * @param term 所属业务编号 |
| | | * @return List |
| | | */ |
| | | public List<FileIdInfoBaseDTO> listIdInfoByOwnerIdList(Map<String, Object> term, String mainId){ |
| | | public List<FileIdInfoBaseDTO> listIdInfoByOwnerIdList(Map<String, Object> term){ |
| | | List<FileIdInfoBaseDTO> fileIdInfoBaseDTOList = new ArrayList<>(); |
| | | try{ |
| | | ReturnBO returnBo = sysClient.listInfoByOwnerIdList(term, mainId); |
| | | ReturnBO returnBo = sysClient.listInfoByOwnerIdList(term); |
| | | if (ReturnConsts.OK == returnBo.getCode()){ |
| | | if (ObjectUtils.isNotEmpty(returnBo.getData())){ |
| | | List<LinkedHashMap> list = (List<LinkedHashMap>) returnBo.getData(); |
| | |
| | | String ids = idList.stream().map(String::valueOf).collect(Collectors.joining("','")); |
| | | ids = "'"+ ids + "'"; |
| | | Map<String, Object> term = new HashMap<>(); |
| | | term.put("mainId", caseId); |
| | | term.put("ownerIds", ids); |
| | | //查询所有附件 |
| | | List<FileIdTypeInfoBaseDTO> fileInfoList = sysClient.listIdTypeInfoByOwnerIdList(term, caseId); |
| | | List<FileIdTypeInfoBaseDTO> fileInfoList = sysClient.listIdTypeInfoByOwnerIdList(term); |
| | | //把附件根据编号放入 |
| | | for(FileIdTypeInfoBaseDTO fileInfo: fileInfoList){ |
| | | if(caseId.equals(fileInfo.getOwnerId())){ |
| | |
| | | |
| | | /** |
| | | * 根据多个所属编号查询附件并根据先根据ownerId再根据附件类型分组 |
| | | * @url {ctx}/api/client/fileRelate/listIdTypeInfoByOwnerIdList |
| | | * @url {ctx}/api/client/fileInfo/listIdTypeInfoByOwnerIdList |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/listIdTypeInfoByOwnerIdList") |
| | | public Object listIdTypeInfoByOwnerIdList(@RequestBody Map<String, Object> term, @RequestParam(value = "mainId") String mainId) { |
| | | public Object listIdTypeInfoByOwnerIdList(@RequestBody Map<String, Object> term) { |
| | | try { |
| | | return ReturnSucUtils.getRepInfo(service.listIdTypeInfoByOwnerIdList(term, mainId)); |
| | | return ReturnSucUtils.getRepInfo(service.listIdTypeInfoByOwnerIdList(term)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | |
| | | |
| | | /** |
| | | * 根据多个所属编号查询附件 |
| | | * @url {ctx}/api/client/fileRelate/listInfoByOwnerIdList |
| | | * @url {ctx}/api/client/fileInfo/listInfoByOwnerIdList |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/listInfoByOwnerIdList") |
| | | public Object listInfoByOwnerIdList(@RequestBody Map<String, Object> term, @RequestParam(value = "mainId") String mainId) { |
| | | public Object listInfoByOwnerIdList(@RequestBody Map<String, Object> term) { |
| | | try { |
| | | return ReturnSucUtils.getRepInfo(service.listInfoByOwnerIdList(term, mainId)); |
| | | return ReturnSucUtils.getRepInfo(service.listInfoByOwnerIdList(term)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | |
| | | package cn.huge.module.file.controller.web; |
| | | |
| | | import cn.huge.base.common.exception.ClientException; |
| | | import cn.huge.module.file.domain.dto.IdFileDTO; |
| | | import cn.huge.module.utils.BaiduOcrUtils; |
| | | import cn.huge.base.common.utils.ContentTypeUtils; |
| | | import cn.huge.base.common.utils.ReturnFailUtils; |
| | |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.util.ArrayList; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @title: 附件信息表接口api-web端 |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据多个所属编号查询附件并根据先根据ownerId再根据附件类型分组 |
| | | * @url {ctx}/api/web/fileInfo/listIdTypeInfo |
| | | * @return Object |
| | | */ |
| | | @PostMapping("/listIdTypeInfo") |
| | | public Object listIdTypeInfo(@RequestBody IdFileDTO idFileDTO) { |
| | | try { |
| | | Map<String, Object> term = new HashMap<>(); |
| | | String ownerIds = idFileDTO.getOwnerIdList().stream().map(String:: valueOf).collect(Collectors.joining("','")); |
| | | String types = idFileDTO.getTypeList().stream().map(String:: valueOf).collect(Collectors.joining("','")); |
| | | if(StringUtils.isNotBlank(ownerIds)){ |
| | | ownerIds = "'" + ownerIds + "'"; |
| | | } |
| | | if(StringUtils.isNotBlank(types)){ |
| | | types = "'" + types + "'"; |
| | | } |
| | | term.put("ownerIds", ownerIds); |
| | | term.put("types", types); |
| | | term.put("mainId", idFileDTO.getMainId()); |
| | | return ReturnSucUtils.getRepInfo(service.listIdTypeInfoByOwnerIdList(term)); |
| | | } catch (Exception e) { |
| | | return ReturnFailUtils.getRepInfo(); |
| | | } |
| | | } |
| | | } |
| | |
| | | * @param terms |
| | | * @return List<FileRelate> |
| | | */ |
| | | List<FileInfo> listByids(@Param("terms") Map<String, Object> terms, @Param("mainId") String mainId); |
| | | List<FileInfo> listFile(@Param("terms") Map<String, Object> terms); |
| | | } |
| | |
| | | </select> |
| | | |
| | | <!-- 根据多个编号查询 --> |
| | | <select id="listByids" resultMap="fileResult"> |
| | | <select id="listFile" 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}) |
| | | WHERE |
| | | t1.delete_status = 0 |
| | | and t2.main_id = #{terms.mainId} |
| | | <if test="terms.ownerIds != null and terms.ownerIds !=''"> |
| | | and t2.owner_id in (${terms.ownerIds}) |
| | | </if> |
| | | <if test="terms.types = null and terms.types =''"> |
| | | and t2.owner_type in (${types}) |
| | | <if test="terms.types != null and terms.types !=''"> |
| | | and t2.owner_type in (${terms.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> |
| | | <!-- <!– 根据多个编号查询 –>--> |
| | | <!-- <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> |
New file |
| | |
| | | package cn.huge.module.file.domain.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class IdFileDTO { |
| | | |
| | | /** |
| | | * 事项ID |
| | | */ |
| | | private String mainId; |
| | | |
| | | /** |
| | | * 所属编号 |
| | | */ |
| | | private List<String> ownerIdList; |
| | | |
| | | /** |
| | | * 限定类型 |
| | | */ |
| | | private List<String> typeList; |
| | | } |
| | |
| | | * @param terms |
| | | * @return List |
| | | */ |
| | | public List<FileIdTypeInfoBaseDTO> listIdTypeInfoByOwnerIdList(Map<String, Object> terms, String mainId){ |
| | | List<FileIdTypeInfoBaseDTO> fileTypeInfoBaseDTOList = new ArrayList<>(); |
| | | public List<FileIdTypeInfoBaseDTO> listIdTypeInfoByOwnerIdList(Map<String, Object> terms){ |
| | | try { |
| | | List<FileIdTypeInfoBaseDTO> fileTypeInfoBaseDTOList = new ArrayList<>(); |
| | | |
| | | List<FileInfo> fileInfoList = mapper.listByids(terms, mainId); |
| | | if(CollectionUtils.isNotEmpty(fileInfoList)){ |
| | | fileTypeInfoBaseDTOList = this.getIdFileTypeInfoBaseDTOList(fileInfoList); |
| | | List<FileInfo> fileInfoList = mapper.listFile(terms); |
| | | if(CollectionUtils.isNotEmpty(fileInfoList)){ |
| | | fileTypeInfoBaseDTOList = this.getIdFileTypeInfoBaseDTOList(fileInfoList); |
| | | } |
| | | |
| | | return fileTypeInfoBaseDTOList; |
| | | }catch (Exception e){ |
| | | log.error("[FileInfoService.listIdTypeInfoByOwnerIdList]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("FileInfoService.listIdTypeInfoByOwnerIdList", e); |
| | | } |
| | | |
| | | return fileTypeInfoBaseDTOList; |
| | | } |
| | | |
| | | /** |
| | |
| | | fileTypeInfoBaseDTO.setOwnerTypeName(FileOwnerTypeBaseEnum.getDes(ownerType)); |
| | | fileTypeInfoBaseDTO.setSize(ownerIdFileInfoList.size()); |
| | | List<FileInfoBaseDTO> fileInfoBaseDTOList = new ArrayList<>(); |
| | | StringBuffer fileNames = new StringBuffer(); |
| | | for(FileInfo fileInfo: ownerIdFileInfoList){ |
| | | if(ownerType.equals(fileInfo.getOwnerType())){ |
| | | FileInfoBaseDTO fileInfoBaseDTO = new FileInfoBaseDTO(); |
| | |
| | | fileInfoBaseDTO.setOwnerCatName(FileOwnerTypeBaseEnum.getDes(fileInfo.getOwnerCat())); |
| | | fileInfoBaseDTO.setOwnerTypeName(FileOwnerTypeBaseEnum.getDes(fileInfo.getOwnerType())); |
| | | fileInfoBaseDTOList.add(fileInfoBaseDTO); |
| | | if(StringUtils.isNotBlank(fileNames)){ |
| | | fileNames.append(fileInfo.getName()); |
| | | }else{ |
| | | fileNames.append("、" + fileInfo.getName()); |
| | | } |
| | | |
| | | } |
| | | } |
| | | fileTypeInfoBaseDTO.setFileNames(fileNames.toString()); |
| | | fileTypeInfoBaseDTO.setFileList(fileInfoBaseDTOList); |
| | | fileTypeInfoBaseDTOList.add(fileTypeInfoBaseDTO); |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | 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); |
| | | public List<FileIdInfoBaseDTO> listInfoByOwnerIdList(Map<String, Object> terms) { |
| | | try { |
| | | List<FileIdInfoBaseDTO> fileIdInfoBaseDTOList = new ArrayList<>(); |
| | | List<FileInfo> fileInfoList = mapper.listFile(terms); |
| | | if(CollectionUtils.isNotEmpty(fileInfoList)){ |
| | | fileIdInfoBaseDTOList = this.getFileInfoBaseDTOList(fileInfoList); |
| | | } |
| | | return fileIdInfoBaseDTOList; |
| | | }catch (Exception e){ |
| | | log.error("[FileInfoService.listInfoByOwnerIdList]调用失败,异常信息:"+e, e); |
| | | throw new ServiceException("FileInfoService.listInfoByOwnerIdList", e); |
| | | } |
| | | return fileIdInfoBaseDTOList; |
| | | |
| | | } |
| | | |
| | | /** |