forked from gzzfw/backEnd/gz-dyh

xusd
2024-10-28 b0b1e641a31a0494262187f97034807fc53515dd
Merge branch 'gzdyh_test' into gzdyh_grid

# Conflicts:
# dyh-service/dyh-mediate/src/main/java/cn/huge/module/client/api/SysClient.java
# dyh-service/dyh-mediate/src/main/java/cn/huge/module/client/api/impl/SysClientImpl.java
32 files added
3 files modified
5858 ■■■■■ changed files
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/controller/web/CaseBookWebController.java 311 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/dao/mapper/CasebookAgentMapper.java 64 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/dao/mapper/CasebookAssistInfoMapper.java 64 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/dao/mapper/CasebookFileMapper.java 64 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/dao/mapper/CasebookInfoMapper.java 102 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/dao/mapper/CasebookInfoUnfoldMapper.java 64 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/dao/mapper/CasebookPersonMapper.java 64 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/dao/mapper/xml/CasebookAgentMapper.xml 430 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/dao/mapper/xml/CasebookAssistInfoMapper.xml 181 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/dao/mapper/xml/CasebookFileMapper.xml 145 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/dao/mapper/xml/CasebookInfoMapper.xml 678 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/dao/mapper/xml/CasebookInfoUnfoldMapper.xml 391 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/dao/mapper/xml/CasebookPersonMapper.xml 436 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/domain/bo/CasebookAgentBO.java 17 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/domain/bo/CasebookAssistInfoBO.java 17 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/domain/bo/CasebookFileBO.java 17 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/domain/bo/CasebookInfoBO.java 17 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/domain/bo/CasebookInfoUnfoldBO.java 17 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/domain/bo/CasebookPersonBO.java 17 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/domain/dto/CaseBookPageDTO.java 81 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/domain/po/CasebookAgent.java 354 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/domain/po/CasebookAssistInfo.java 107 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/domain/po/CasebookFile.java 71 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/domain/po/CasebookInfo.java 450 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/domain/po/CasebookInfoUnfold.java 317 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/domain/po/CasebookPerson.java 360 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/service/CasebookAgentService.java 133 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/service/CasebookAssistInfoService.java 133 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/service/CasebookFileService.java 133 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/service/CasebookInfoService.java 303 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/service/CasebookInfoUnfoldService.java 133 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/service/CasebookPersonService.java 133 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/client/api/SysClient.java 9 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/client/api/impl/SysClientImpl.java 22 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-sys/src/main/java/cn/huge/module/file/controller/client/FileInfoClientController.java 23 ●●●●● patch | view | raw | blame | history
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/controller/web/CaseBookWebController.java
New file
@@ -0,0 +1,311 @@
package cn.huge.module.casebook.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.casebook.domain.dto.CaseBookPageDTO;
import cn.huge.module.casebook.domain.po.CasebookInfo;
import cn.huge.module.casebook.service.CasebookInfoService;
import cn.huge.module.client.api.impl.CustClientImpl;
import cn.huge.module.cust.dto.CtUserDTO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.google.common.collect.Maps;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
 * @title: dyh_casebook_info接口api-web端
 * @description: dyh_casebook_info接口api-web端
 * @company: hugeinfo
 * @author: liyj
 * @time: 2024-10-26 12:31:22
 * @version: 1.0.0
 */
@Slf4j
@RestController
@RequestMapping("/api/web/caseBook")
public class CaseBookWebController {
    @Autowired(required = false)
    private HttpServletRequest request;
    @Autowired
    private CasebookInfoService casebookInfoService;
    @Autowired
    private CustClientImpl custClient;
    /**
     * 案件导入-导入草稿
     * @url {ctx}/api/web/caseBook/pageImportDraft
     * @param page 页码
     * @param size 每页数量
     * @param sortType 排序方式(1:正序;2:倒序)
     * @return Object
     */
    @GetMapping("/pageImportDraft")
    public Object pageImportDraft(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size
            , @RequestParam(value = "sortType") int sortType, @CurrentUser String userId) {
        try {
            // 查询条件
            Map<String, Object> terms = Maps.newHashMap();
            // 导入时间区间
            String importStart = request.getParameter("importStart");
            String importEnd = request.getParameter("importEnd");
            if(StringUtils.isNotBlank(importStart) && StringUtils.isNotBlank(importEnd)) {
                terms.put("importStart", importStart);
                terms.put("importEnd", importEnd);
            }
            // 纠纷发生时间区间
            String occurStart = request.getParameter("occurStart");
            String occurEnd = request.getParameter("occurEnd");
            if(StringUtils.isNotBlank(occurStart) && StringUtils.isNotBlank(occurEnd)) {
                terms.put("occurStart", occurStart);
                terms.put("occurEnd", occurEnd);
            }
            // 申请方
            String plaintiffs = request.getParameter("plaintiffs");
            if (StringUtils.isNotBlank(plaintiffs)){
                terms.put("plaintiffs", plaintiffs);
            }
            // 被申请方
            String defendants = request.getParameter("defendants");
            if (StringUtils.isNotBlank(defendants)){
                terms.put("defendants", defendants);
            }
            // 调解员
            String mediator = request.getParameter("mediator");
            if (StringUtils.isNotBlank(mediator)){
                terms.put("mediator", mediator);
            }
            // 化解结果
            String mediResult = request.getParameter("mediResult");
            if (StringUtils.isNotBlank(mediResult)){
                terms.put("mediResult", mediResult);
            }
            // 纠纷类型
            String caseType = request.getParameter("caseType");
            if (StringUtils.isNotBlank(caseType)){
                terms.put("caseType", caseType);
            }
            // 协助调解员
            String assistMediator = request.getParameter("assistMediator");
            if (StringUtils.isNotBlank(assistMediator)){
                terms.put("assistMediator", assistMediator);
            }
            CtUserDTO loginUser = custClient.clientGetUserAll(userId);
            terms.put("inputUnitId", loginUser.getUnitId());
            // 排序
            Sort sort = null;
            if(sortType == 1) {
                sort = Sort.by(Sort.Direction.DESC, "t1.create_time");
            }
            if (sortType == 1){
                sort = Sort.by(Sort.Direction.ASC, "t1.create_time");
            }
            PageRequest pageRequest = PageRequest.of(page-1, size, sort);
            Page<CaseBookPageDTO> caseBookPageDTOPage = casebookInfoService.pageImportSuc(pageRequest, terms);
            return ReturnSucUtils.getRepInfo(caseBookPageDTOPage);
        } catch (Exception e) {
            log.error("[CaseBookWebController.pageImportDraft]请求失败,异常信息:"+e, e);
            return ReturnFailUtils.getRepInfo();
        }
    }
    /**
    * 案件导入-导入成功
    * @url {ctx}/api/web/caseBook/pageImportSuc
    * @param page 页码
    * @param size 每页数量
    * @param sortType 排序方式(1:正序;2:倒序)
    * @return Object
    */
    @GetMapping("/pageImportSuc")
    public Object pageImportSuc(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size
            , @RequestParam(value = "sortType") int sortType, @CurrentUser String userId) {
        try {
            // 查询条件
            Map<String, Object> terms = Maps.newHashMap();
            // 转入时间区间
            String importStart = request.getParameter("importStart");
            String importEnd = request.getParameter("importEnd");
            if(StringUtils.isNotBlank(importStart) && StringUtils.isNotBlank(importEnd)) {
                terms.put("importStart", importStart);
                terms.put("importEnd", importEnd);
            }
            // 纠纷发生时间区间
            String occurStart = request.getParameter("occurStart");
            String occurEnd = request.getParameter("occurEnd");
            if(StringUtils.isNotBlank(occurStart) && StringUtils.isNotBlank(occurEnd)) {
                terms.put("occurStart", occurStart);
                terms.put("occurEnd", occurEnd);
            }
            // 申请方
            String plaintiffs = request.getParameter("plaintiffs");
            if (StringUtils.isNotBlank(plaintiffs)){
                terms.put("plaintiffs", plaintiffs);
            }
            // 被申请方
            String defendants = request.getParameter("defendants");
            if (StringUtils.isNotBlank(defendants)){
                terms.put("defendants", defendants);
            }
            // 调解员
            String mediator = request.getParameter("mediator");
            if (StringUtils.isNotBlank(mediator)){
                terms.put("mediator", mediator);
            }
            // 化解结果
            String mediResult = request.getParameter("mediResult");
            if (StringUtils.isNotBlank(mediResult)){
                terms.put("mediResult", mediResult);
            }
            // 纠纷类型
            String caseType = request.getParameter("caseType");
            if (StringUtils.isNotBlank(caseType)){
                terms.put("caseType", caseType);
            }
            // 协助调解员
            String assistMediator = request.getParameter("assistMediator");
            if (StringUtils.isNotBlank(assistMediator)){
                terms.put("assistMediator", assistMediator);
            }
            CtUserDTO loginUser = custClient.clientGetUserAll(userId);
            terms.put("inputUnitId", loginUser.getUnitId());
            // 排序
            Sort sort = null;
            if(sortType == 1) {
                sort = Sort.by(Sort.Direction.DESC, "t1.create_time");
            }
            if (sortType == 1){
                sort = Sort.by(Sort.Direction.ASC, "t1.create_time");
            }
            PageRequest pageRequest = PageRequest.of(page-1, size, sort);
            Page<CaseBookPageDTO> caseBookPageDTOPage = casebookInfoService.pageImportSuc(pageRequest, terms);
            return ReturnSucUtils.getRepInfo(caseBookPageDTOPage);
        } catch (Exception e) {
            log.error("[CaseBookWebController.pageImportSuc]请求失败,异常信息:"+e, e);
            return ReturnFailUtils.getRepInfo();
        }
    }
    /**
    * 案件导入-导入操作
    * @url {ctx}/api/web/caseBook/inputCaseByExcel
    * @return Object
    */
    @GetMapping("/inputCaseByExcel")
    public Object inputCaseByExcel(@RequestParam(value = "fileId") String fileId, @CurrentUser String userId) {
        try {
            return casebookInfoService.inputCaseByExcel(fileId, userId, request);
        } catch (Exception e) {
            return ReturnFailUtils.getRepInfo();
        }
    }
    /**
    * 案件导入-删除草稿
    * @url {ctx}/api/web/caseBook/deleteDraft
    * @return Object
    */
    @PostMapping("/deleteDraft")
    public Object deleteDraft(@RequestBody List<String> idList, @CurrentUser String userId) {
        try {
            casebookInfoService.deleteDraft(idList);
            return ReturnSucUtils.getRepInfo();
        } catch (Exception e) {
            return ReturnFailUtils.getRepInfo();
        }
    }
    /**
    * 案件导入-草稿转入正式案件
    * @url {ctx}/api/web/caseBook/importToCase
    * @return Object
    */
    @PostMapping("/importToCase")
    public Object importToCase(@RequestBody List<String> idList, @CurrentUser String userId) {
        try {
            casebookInfoService.importToCase(idList, userId);
            return ReturnSucUtils.getRepInfo();
        } catch (Exception e) {
            return ReturnFailUtils.getRepInfo();
        }
    }
    /**
     * 案件导入-全部草稿转入正式案件
     * @url {ctx}/api/web/caseBook/importToCaseAll
     * @return Object
     */
    @GetMapping("/importToCaseAll")
    public Object importToCaseAll(@CurrentUser String userId) {
        try {
            // 查询条件
            Map<String, Object> terms = Maps.newHashMap();
            // 导入时间区间
            String importStart = request.getParameter("importStart");
            String importEnd = request.getParameter("importEnd");
            if(StringUtils.isNotBlank(importStart) && StringUtils.isNotBlank(importEnd)) {
                terms.put("importStart", importStart);
                terms.put("importEnd", importEnd);
            }
            // 纠纷发生时间区间
            String occurStart = request.getParameter("occurStart");
            String occurEnd = request.getParameter("occurEnd");
            if(StringUtils.isNotBlank(occurStart) && StringUtils.isNotBlank(occurEnd)) {
                terms.put("occurStart", occurStart);
                terms.put("occurEnd", occurEnd);
            }
            // 申请方
            String plaintiffs = request.getParameter("plaintiffs");
            if (StringUtils.isNotBlank(plaintiffs)){
                terms.put("plaintiffs", plaintiffs);
            }
            // 被申请方
            String defendants = request.getParameter("defendants");
            if (StringUtils.isNotBlank(defendants)){
                terms.put("defendants", defendants);
            }
            // 调解员
            String mediator = request.getParameter("mediator");
            if (StringUtils.isNotBlank(mediator)){
                terms.put("mediator", mediator);
            }
            // 化解结果
            String mediResult = request.getParameter("mediResult");
            if (StringUtils.isNotBlank(mediResult)){
                terms.put("mediResult", mediResult);
            }
            // 纠纷类型
            String caseType = request.getParameter("caseType");
            if (StringUtils.isNotBlank(caseType)){
                terms.put("caseType", caseType);
            }
            // 协助调解员
            String assistMediator = request.getParameter("assistMediator");
            if (StringUtils.isNotBlank(assistMediator)){
                terms.put("assistMediator", assistMediator);
            }
            CtUserDTO loginUser = custClient.clientGetUserAll(userId);
            terms.put("inputUnitId", loginUser.getUnitId());
            // 查询
            casebookInfoService.importToCaseAll(terms);
            return ReturnSucUtils.getRepInfo();
        } catch (Exception e) {
            log.error("[CaseBookWebController.importToCaseAll]请求失败,异常信息:"+e, e);
            return ReturnFailUtils.getRepInfo();
        }
    }
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/dao/mapper/CasebookAgentMapper.java
New file
@@ -0,0 +1,64 @@
package cn.huge.module.casebook.dao.mapper;
import cn.huge.module.casebook.domain.po.CasebookAgent;
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: dyh_casebook_agent持久层业务处理
* @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。
* @company: hugeinfo
* @author: liyj
* @time: 2024-10-26 12:31:21
* @version 1.0.0
*/
@Repository
public interface CasebookAgentMapper extends BaseMapper<CasebookAgent>{
    /**
    * 更新对象
    * @param entity 对象
    */
    void updateCasebookAgent(@Param("entity") CasebookAgent entity);
    /**
    * 条件更新对象
    * @param entity 对象
    * @param terms 条件
    */
    void updateCasebookAgentTerms(@Param("entity") CasebookAgent entity, @Param("terms") Map<String, Object> terms);
    /**
    * 根据编号物理删除
    * @param id 查询条件集合
    */
    void deleteCasebookAgent(@Param("id") String id);
    /**
    * 按条件查询结果集
    * @param terms 查询条件集合
    * @return List<CasebookAgent>
    */
    List<CasebookAgent> 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<CasebookAgent>
    */
    List<CasebookAgent> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms);
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/dao/mapper/CasebookAssistInfoMapper.java
New file
@@ -0,0 +1,64 @@
package cn.huge.module.casebook.dao.mapper;
import cn.huge.module.casebook.domain.po.CasebookAssistInfo;
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: dyh_casebook_assist_info持久层业务处理
* @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。
* @company: hugeinfo
* @author: liyj
* @time: 2024-10-26 12:31:22
* @version 1.0.0
*/
@Repository
public interface CasebookAssistInfoMapper extends BaseMapper<CasebookAssistInfo>{
    /**
    * 更新对象
    * @param entity 对象
    */
    void updateCasebookAssistInfo(@Param("entity") CasebookAssistInfo entity);
    /**
    * 条件更新对象
    * @param entity 对象
    * @param terms 条件
    */
    void updateCasebookAssistInfoTerms(@Param("entity") CasebookAssistInfo entity, @Param("terms") Map<String, Object> terms);
    /**
    * 根据编号物理删除
    * @param id 查询条件集合
    */
    void deleteCasebookAssistInfo(@Param("id") String id);
    /**
    * 按条件查询结果集
    * @param terms 查询条件集合
    * @return List<CasebookAssistInfo>
    */
    List<CasebookAssistInfo> 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<CasebookAssistInfo>
    */
    List<CasebookAssistInfo> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms);
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/dao/mapper/CasebookFileMapper.java
New file
@@ -0,0 +1,64 @@
package cn.huge.module.casebook.dao.mapper;
import cn.huge.module.casebook.domain.po.CasebookFile;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* @title: 一本账导入文件记录表持久层业务处理
* @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。
* @company: hugeinfo
* @author: liyj
* @time: 2024-10-27 16:16:40
* @version 1.0.0
*/
@Repository
public interface CasebookFileMapper extends BaseMapper<CasebookFile>{
    /**
    * 更新对象
    * @param entity 对象
    */
    void updateCasebookFile(@Param("entity") CasebookFile entity);
    /**
    * 条件更新对象
    * @param entity 对象
    * @param terms 条件
    */
    void updateCasebookFileTerms(@Param("entity") CasebookFile entity, @Param("terms") Map<String, Object> terms);
    /**
    * 根据编号物理删除
    * @param id 查询条件集合
    */
    void deleteCasebookFile(@Param("id") String id);
    /**
    * 按条件查询结果集
    * @param terms 查询条件集合
    * @return List<CasebookFile>
    */
    List<CasebookFile> 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<CasebookFile>
    */
    List<CasebookFile> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms);
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/dao/mapper/CasebookInfoMapper.java
New file
@@ -0,0 +1,102 @@
package cn.huge.module.casebook.dao.mapper;
import cn.huge.module.casebook.domain.dto.CaseBookPageDTO;
import cn.huge.module.casebook.domain.po.CasebookInfo;
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: dyh_casebook_info持久层业务处理
* @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。
* @company: hugeinfo
* @author: liyj
* @time: 2024-10-26 12:31:22
* @version 1.0.0
*/
@Repository
public interface CasebookInfoMapper extends BaseMapper<CasebookInfo>{
    /**
    * 更新对象
    * @param entity 对象
    */
    void updateCasebookInfo(@Param("entity") CasebookInfo entity);
    /**
    * 条件更新对象
    * @param entity 对象
    * @param terms 条件
    */
    void updateCasebookInfoTerms(@Param("entity") CasebookInfo entity, @Param("terms") Map<String, Object> terms);
    /**
    * 根据编号物理删除
    * @param id 查询条件集合
    */
    void deleteCasebookInfo(@Param("id") String id);
    /**
    * 按条件查询结果集
    * @param terms 查询条件集合
    * @return List<CasebookInfo>
    */
    List<CasebookInfo> 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<CasebookInfo>
    */
    List<CasebookInfo> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms);
    /**
    * 统计-导入草稿
    * @param terms 查询条件集合
    * @return long
    */
    long countImportDraft(@Param("terms") Map<String, Object> terms);
    /**
    * 条件分页查询-导入草稿
    * @param page 分页对象
    * @param terms 查询条件集合
    * @return List<CasebookInfo>
    */
    List<CaseBookPageDTO> pageImportDraft(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms);
    /**
    * 条件查询-导入草稿
    * @param terms 查询条件集合
    * @return List<CasebookInfo>
    */
    List<CaseBookPageDTO> listImportDraft(@Param("terms") Map<String, Object> terms);
    /**
    * 统计-导入成功
    * @param terms 查询条件集合
    * @return long
    */
    long countImportSuc(@Param("terms") Map<String, Object> terms);
    /**
    * 条件分页查询-导入成功
    * @param page 分页对象
    * @param terms 查询条件集合
    * @return List<CasebookInfo>
    */
    List<CaseBookPageDTO> pageImportSuc(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms);
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/dao/mapper/CasebookInfoUnfoldMapper.java
New file
@@ -0,0 +1,64 @@
package cn.huge.module.casebook.dao.mapper;
import cn.huge.module.casebook.domain.po.CasebookInfoUnfold;
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: dyh_casebook_info_unfold持久层业务处理
* @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。
* @company: hugeinfo
* @author: liyj
* @time: 2024-10-26 12:31:22
* @version 1.0.0
*/
@Repository
public interface CasebookInfoUnfoldMapper extends BaseMapper<CasebookInfoUnfold>{
    /**
    * 更新对象
    * @param entity 对象
    */
    void updateCasebookInfoUnfold(@Param("entity") CasebookInfoUnfold entity);
    /**
    * 条件更新对象
    * @param entity 对象
    * @param terms 条件
    */
    void updateCasebookInfoUnfoldTerms(@Param("entity") CasebookInfoUnfold entity, @Param("terms") Map<String, Object> terms);
    /**
    * 根据编号物理删除
    * @param id 查询条件集合
    */
    void deleteCasebookInfoUnfold(@Param("id") String id);
    /**
    * 按条件查询结果集
    * @param terms 查询条件集合
    * @return List<CasebookInfoUnfold>
    */
    List<CasebookInfoUnfold> 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<CasebookInfoUnfold>
    */
    List<CasebookInfoUnfold> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms);
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/dao/mapper/CasebookPersonMapper.java
New file
@@ -0,0 +1,64 @@
package cn.huge.module.casebook.dao.mapper;
import cn.huge.module.casebook.domain.po.CasebookPerson;
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: dyh_casebook_person持久层业务处理
* @Description 此处仅涉及复杂SQL操作,务必不要在此再次写单表的CRUD操作,因为mybatisPlus已经实现。
* @company: hugeinfo
* @author: liyj
* @time: 2024-10-26 12:31:22
* @version 1.0.0
*/
@Repository
public interface CasebookPersonMapper extends BaseMapper<CasebookPerson>{
    /**
    * 更新对象
    * @param entity 对象
    */
    void updateCasebookPerson(@Param("entity") CasebookPerson entity);
    /**
    * 条件更新对象
    * @param entity 对象
    * @param terms 条件
    */
    void updateCasebookPersonTerms(@Param("entity") CasebookPerson entity, @Param("terms") Map<String, Object> terms);
    /**
    * 根据编号物理删除
    * @param id 查询条件集合
    */
    void deleteCasebookPerson(@Param("id") String id);
    /**
    * 按条件查询结果集
    * @param terms 查询条件集合
    * @return List<CasebookPerson>
    */
    List<CasebookPerson> 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<CasebookPerson>
    */
    List<CasebookPerson> pageTerms(@Param("page") PageRequest page, @Param("terms") Map<String, Object> terms);
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/dao/mapper/xml/CasebookAgentMapper.xml
New file
@@ -0,0 +1,430 @@
<?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: dyh_casebook_agent
 * @description: 自定义sql,请自行实现业务逻辑
 * @company: hugeinfo
 * @author: liyj
 * @time:2024-10-26 12:31:21
 * @version 1.0.0
-->
<mapper namespace="cn.huge.module.casebook.dao.mapper.CasebookAgentMapper">
    <!-- 结果集 -->
    <resultMap id="dataResult" type="cn.huge.module.casebook.domain.po.CasebookAgent">
            <result property="id" column="id"/>
            <result property="caseId" column="case_id"/>
            <result property="partyUserId" column="party_user_id"/>
            <result property="perType" column="per_type"/>
            <result property="perTypeName" column="per_type_name"/>
            <result property="perClass" column="per_class"/>
            <result property="perClassName" column="per_class_name"/>
            <result property="trueName" column="true_name"/>
            <result property="mobile" column="mobile"/>
            <result property="certiType" column="certi_type"/>
            <result property="certiTypeName" column="certi_type_name"/>
            <result property="certiNo" column="certi_no"/>
            <result property="prov" column="prov"/>
            <result property="provName" column="prov_name"/>
            <result property="city" column="city"/>
            <result property="cityName" column="city_name"/>
            <result property="area" column="area"/>
            <result property="areaName" column="area_name"/>
            <result property="road" column="road"/>
            <result property="roadName" column="road_name"/>
            <result property="village" column="village"/>
            <result property="villageName" column="village_name"/>
            <result property="addr" column="addr"/>
            <result property="placeProv" column="place_prov"/>
            <result property="placeProvName" column="place_prov_name"/>
            <result property="placeCity" column="place_city"/>
            <result property="placeCityName" column="place_city_name"/>
            <result property="placeArea" column="place_area"/>
            <result property="placeAreaName" column="place_area_name"/>
            <result property="placeRoad" column="place_road"/>
            <result property="placeRoadName" column="place_road_name"/>
            <result property="placeVillage" column="place_village"/>
            <result property="placeVillageName" column="place_village_name"/>
            <result property="placeAddr" column="place_addr"/>
            <result property="workUnit" column="work_unit"/>
            <result property="nation" column="nation"/>
            <result property="nationName" column="nation_name"/>
            <result property="sex" column="sex"/>
            <result property="sexName" column="sex_name"/>
            <result property="extreme" column="extreme"/>
            <result property="agentRelate" column="agent_relate"/>
            <result property="agentRelateName" column="agent_relate_name"/>
            <result property="agentType" column="agent_type"/>
            <result property="agentTypeName" column="agent_type_name"/>
            <result property="personId" column="person_id"/>
            <result property="avatar" column="avatar"/>
            <result property="job" column="job"/>
            <result property="jobName" column="job_name"/>
            <result property="birthday" column="birthday"/>
            <result property="age" column="age"/>
            <result property="agentStatus" column="agent_status"/>
            <result property="custId" column="cust_id"/>
            <result property="deleteStatus" column="delete_status"/>
            <result property="createTime" column="create_time"/>
            <result property="updateTime" column="update_time"/>
    </resultMap>
    <!-- 表 -->
    <sql id='table-name'>dyh_casebook_agent</sql>
    <!-- 字段 -->
    <sql id="column-part">
        id,
        case_id,
        party_user_id,
        per_type,
        per_type_name,
        per_class,
        per_class_name,
        true_name,
        mobile,
        certi_type,
        certi_type_name,
        certi_no,
        prov,
        prov_name,
        city,
        city_name,
        area,
        area_name,
        road,
        road_name,
        village,
        village_name,
        addr,
        place_prov,
        place_prov_name,
        place_city,
        place_city_name,
        place_area,
        place_area_name,
        place_road,
        place_road_name,
        place_village,
        place_village_name,
        place_addr,
        work_unit,
        nation,
        nation_name,
        sex,
        sex_name,
        extreme,
        agent_relate,
        agent_relate_name,
        agent_type,
        agent_type_name,
        person_id,
        avatar,
        job,
        job_name,
        birthday,
        age,
        agent_status,
        cust_id,
        delete_status,
        create_time,
        update_time
    </sql>
    <!-- 更新实体字段 -->
    <sql id="set-part">
            <if test="entity.caseId != null">case_id = #{entity.caseId},</if>
            <if test="entity.partyUserId != null">party_user_id = #{entity.partyUserId},</if>
            <if test="entity.perType != null">per_type = #{entity.perType},</if>
            <if test="entity.perTypeName != null">per_type_name = #{entity.perTypeName},</if>
            <if test="entity.perClass != null">per_class = #{entity.perClass},</if>
            <if test="entity.perClassName != null">per_class_name = #{entity.perClassName},</if>
            <if test="entity.trueName != null">true_name = #{entity.trueName},</if>
            <if test="entity.mobile != null">mobile = #{entity.mobile},</if>
            <if test="entity.certiType != null">certi_type = #{entity.certiType},</if>
            <if test="entity.certiTypeName != null">certi_type_name = #{entity.certiTypeName},</if>
            <if test="entity.certiNo != null">certi_no = #{entity.certiNo},</if>
            <if test="entity.prov != null">prov = #{entity.prov},</if>
            <if test="entity.provName != null">prov_name = #{entity.provName},</if>
            <if test="entity.city != null">city = #{entity.city},</if>
            <if test="entity.cityName != null">city_name = #{entity.cityName},</if>
            <if test="entity.area != null">area = #{entity.area},</if>
            <if test="entity.areaName != null">area_name = #{entity.areaName},</if>
            <if test="entity.road != null">road = #{entity.road},</if>
            <if test="entity.roadName != null">road_name = #{entity.roadName},</if>
            <if test="entity.village != null">village = #{entity.village},</if>
            <if test="entity.villageName != null">village_name = #{entity.villageName},</if>
            <if test="entity.addr != null">addr = #{entity.addr},</if>
            <if test="entity.placeProv != null">place_prov = #{entity.placeProv},</if>
            <if test="entity.placeProvName != null">place_prov_name = #{entity.placeProvName},</if>
            <if test="entity.placeCity != null">place_city = #{entity.placeCity},</if>
            <if test="entity.placeCityName != null">place_city_name = #{entity.placeCityName},</if>
            <if test="entity.placeArea != null">place_area = #{entity.placeArea},</if>
            <if test="entity.placeAreaName != null">place_area_name = #{entity.placeAreaName},</if>
            <if test="entity.placeRoad != null">place_road = #{entity.placeRoad},</if>
            <if test="entity.placeRoadName != null">place_road_name = #{entity.placeRoadName},</if>
            <if test="entity.placeVillage != null">place_village = #{entity.placeVillage},</if>
            <if test="entity.placeVillageName != null">place_village_name = #{entity.placeVillageName},</if>
            <if test="entity.placeAddr != null">place_addr = #{entity.placeAddr},</if>
            <if test="entity.workUnit != null">work_unit = #{entity.workUnit},</if>
            <if test="entity.nation != null">nation = #{entity.nation},</if>
            <if test="entity.nationName != null">nation_name = #{entity.nationName},</if>
            <if test="entity.sex != null">sex = #{entity.sex},</if>
            <if test="entity.sexName != null">sex_name = #{entity.sexName},</if>
            <if test="entity.extreme != null">extreme = #{entity.extreme},</if>
            <if test="entity.agentRelate != null">agent_relate = #{entity.agentRelate},</if>
            <if test="entity.agentRelateName != null">agent_relate_name = #{entity.agentRelateName},</if>
            <if test="entity.agentType != null">agent_type = #{entity.agentType},</if>
            <if test="entity.agentTypeName != null">agent_type_name = #{entity.agentTypeName},</if>
            <if test="entity.personId != null">person_id = #{entity.personId},</if>
            <if test="entity.avatar != null">avatar = #{entity.avatar},</if>
            <if test="entity.job != null">job = #{entity.job},</if>
            <if test="entity.jobName != null">job_name = #{entity.jobName},</if>
            <if test="entity.birthday != null">birthday = #{entity.birthday},</if>
            <if test="entity.age != null">age = #{entity.age},</if>
            <if test="entity.agentStatus != null">agent_status = #{entity.agentStatus},</if>
            <if test="entity.custId != null">cust_id = #{entity.custId},</if>
            <if test="entity.deleteStatus != null">delete_status = #{entity.deleteStatus},</if>
            <if test="entity.createTime != null">create_time = #{entity.createTime},</if>
            <if test="entity.updateTime != null">update_time = #{entity.updateTime}</if>
    </sql>
    <!-- 条件 -->
    <sql id="where-part">
        <if test="terms != null">
            <where>
                <if test="terms.id != null and terms.id !=''">
                    and id = #{terms.id}
                </if>
                <if test="terms.caseId != null and terms.caseId !=''">
                    and case_id = #{terms.caseId}
                </if>
                <if test="terms.partyUserId != null and terms.partyUserId !=''">
                    and party_user_id = #{terms.partyUserId}
                </if>
                <if test="terms.perType != null and terms.perType !=''">
                    and per_type = #{terms.perType}
                </if>
                <if test="terms.perTypeName != null and terms.perTypeName !=''">
                    and per_type_name = #{terms.perTypeName}
                </if>
                <if test="terms.perClass != null and terms.perClass !=''">
                    and per_class = #{terms.perClass}
                </if>
                <if test="terms.perClassName != null and terms.perClassName !=''">
                    and per_class_name = #{terms.perClassName}
                </if>
                <if test="terms.trueName != null and terms.trueName !=''">
                    and true_name = #{terms.trueName}
                </if>
                <if test="terms.mobile != null and terms.mobile !=''">
                    and mobile = #{terms.mobile}
                </if>
                <if test="terms.certiType != null and terms.certiType !=''">
                    and certi_type = #{terms.certiType}
                </if>
                <if test="terms.certiTypeName != null and terms.certiTypeName !=''">
                    and certi_type_name = #{terms.certiTypeName}
                </if>
                <if test="terms.certiNo != null and terms.certiNo !=''">
                    and certi_no = #{terms.certiNo}
                </if>
                <if test="terms.prov != null and terms.prov !=''">
                    and prov = #{terms.prov}
                </if>
                <if test="terms.provName != null and terms.provName !=''">
                    and prov_name = #{terms.provName}
                </if>
                <if test="terms.city != null and terms.city !=''">
                    and city = #{terms.city}
                </if>
                <if test="terms.cityName != null and terms.cityName !=''">
                    and city_name = #{terms.cityName}
                </if>
                <if test="terms.area != null and terms.area !=''">
                    and area = #{terms.area}
                </if>
                <if test="terms.areaName != null and terms.areaName !=''">
                    and area_name = #{terms.areaName}
                </if>
                <if test="terms.road != null and terms.road !=''">
                    and road = #{terms.road}
                </if>
                <if test="terms.roadName != null and terms.roadName !=''">
                    and road_name = #{terms.roadName}
                </if>
                <if test="terms.village != null and terms.village !=''">
                    and village = #{terms.village}
                </if>
                <if test="terms.villageName != null and terms.villageName !=''">
                    and village_name = #{terms.villageName}
                </if>
                <if test="terms.addr != null and terms.addr !=''">
                    and addr = #{terms.addr}
                </if>
                <if test="terms.placeProv != null and terms.placeProv !=''">
                    and place_prov = #{terms.placeProv}
                </if>
                <if test="terms.placeProvName != null and terms.placeProvName !=''">
                    and place_prov_name = #{terms.placeProvName}
                </if>
                <if test="terms.placeCity != null and terms.placeCity !=''">
                    and place_city = #{terms.placeCity}
                </if>
                <if test="terms.placeCityName != null and terms.placeCityName !=''">
                    and place_city_name = #{terms.placeCityName}
                </if>
                <if test="terms.placeArea != null and terms.placeArea !=''">
                    and place_area = #{terms.placeArea}
                </if>
                <if test="terms.placeAreaName != null and terms.placeAreaName !=''">
                    and place_area_name = #{terms.placeAreaName}
                </if>
                <if test="terms.placeRoad != null and terms.placeRoad !=''">
                    and place_road = #{terms.placeRoad}
                </if>
                <if test="terms.placeRoadName != null and terms.placeRoadName !=''">
                    and place_road_name = #{terms.placeRoadName}
                </if>
                <if test="terms.placeVillage != null and terms.placeVillage !=''">
                    and place_village = #{terms.placeVillage}
                </if>
                <if test="terms.placeVillageName != null and terms.placeVillageName !=''">
                    and place_village_name = #{terms.placeVillageName}
                </if>
                <if test="terms.placeAddr != null and terms.placeAddr !=''">
                    and place_addr = #{terms.placeAddr}
                </if>
                <if test="terms.workUnit != null and terms.workUnit !=''">
                    and work_unit = #{terms.workUnit}
                </if>
                <if test="terms.nation != null and terms.nation !=''">
                    and nation = #{terms.nation}
                </if>
                <if test="terms.nationName != null and terms.nationName !=''">
                    and nation_name = #{terms.nationName}
                </if>
                <if test="terms.sex != null and terms.sex !=''">
                    and sex = #{terms.sex}
                </if>
                <if test="terms.sexName != null and terms.sexName !=''">
                    and sex_name = #{terms.sexName}
                </if>
                <if test="terms.extreme != null and terms.extreme !=''">
                    and extreme = #{terms.extreme}
                </if>
                <if test="terms.agentRelate != null and terms.agentRelate !=''">
                    and agent_relate = #{terms.agentRelate}
                </if>
                <if test="terms.agentRelateName != null and terms.agentRelateName !=''">
                    and agent_relate_name = #{terms.agentRelateName}
                </if>
                <if test="terms.agentType != null and terms.agentType !=''">
                    and agent_type = #{terms.agentType}
                </if>
                <if test="terms.agentTypeName != null and terms.agentTypeName !=''">
                    and agent_type_name = #{terms.agentTypeName}
                </if>
                <if test="terms.personId != null and terms.personId !=''">
                    and person_id = #{terms.personId}
                </if>
                <if test="terms.avatar != null and terms.avatar !=''">
                    and avatar = #{terms.avatar}
                </if>
                <if test="terms.job != null and terms.job !=''">
                    and job = #{terms.job}
                </if>
                <if test="terms.jobName != null and terms.jobName !=''">
                    and job_name = #{terms.jobName}
                </if>
                <if test="terms.birthday != null and terms.birthday !=''">
                    and birthday = #{terms.birthday}
                </if>
                <if test="terms.age != null and terms.age !=''">
                    and age = #{terms.age}
                </if>
                <if test="terms.agentStatus != null and terms.agentStatus !=''">
                    and agent_status = #{terms.agentStatus}
                </if>
                <if test="terms.custId != null and terms.custId !=''">
                    and cust_id = #{terms.custId}
                </if>
                <if test="terms.deleteStatus = null and terms.deleteStatus =''">
                    and delete_status = 0
                </if>
                <if test="terms.deleteStatus != null and terms.deleteStatus !=''">
                    and delete_status = #{terms.deleteStatus}
                </if>
                <if test="terms.createTime != null and terms.createTime !=''">
                    and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime}
                </if>
                <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''">
                    and (DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart}
                        and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.createEnd})
                </if>
                <if test="terms.updateTime != null and terms.updateTime !=''">
                    and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime}
                </if>
                <if test="terms.updateStart != null and terms.updateStart !='' and terms.updateEnd != null and terms.updateEnd !=''">
                    and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart}
                        and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd})
                </if>
            </where>
        </if>
    </sql>
    <!-- 更新对象 -->
    <update id="updateCasebookAgent">
        update
        <include refid="table-name"/>
        <set>
            <include refid="set-part"/>
        </set>
        <where>
            id = #{entity.id}
        </where>
    </update>
    <!-- 条件更新对象 -->
    <update id="updateCasebookAgentTerms">
        update
        <include refid="table-name"/>
        <set>
            <include refid="set-part"/>
        </set>
        <include refid="where-part"/>
    </update>
    <!--  根据编号物理删除  -->
    <delete id="deleteCasebookAgent">
        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>
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/dao/mapper/xml/CasebookAssistInfoMapper.xml
New file
@@ -0,0 +1,181 @@
<?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: dyh_casebook_assist_info
 * @description: 自定义sql,请自行实现业务逻辑
 * @company: hugeinfo
 * @author: liyj
 * @time:2024-10-26 12:31:22
 * @version 1.0.0
-->
<mapper namespace="cn.huge.module.casebook.dao.mapper.CasebookAssistInfoMapper">
    <!-- 结果集 -->
    <resultMap id="dataResult" type="cn.huge.module.casebook.domain.po.CasebookAssistInfo">
            <result property="id" column="id"/>
            <result property="caseId" column="case_id"/>
            <result property="processInstanceId" column="process_instance_id"/>
            <result property="caseTaskId" column="case_task_id"/>
            <result property="applyId" column="apply_id"/>
            <result property="assistUnitId" column="assist_unit_id"/>
            <result property="assistUnitName" column="assist_unit_name"/>
            <result property="acceptTime" column="accept_time"/>
            <result property="assistUserId" column="assist_user_id"/>
            <result property="assistUserName" column="assist_user_name"/>
            <result property="assistStatus" column="assist_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_casebook_assist_info</sql>
    <!-- 字段 -->
    <sql id="column-part">
        id,
        case_id,
        process_instance_id,
        case_task_id,
        apply_id,
        assist_unit_id,
        assist_unit_name,
        accept_time,
        assist_user_id,
        assist_user_name,
        assist_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.processInstanceId != null">process_instance_id = #{entity.processInstanceId},</if>
            <if test="entity.caseTaskId != null">case_task_id = #{entity.caseTaskId},</if>
            <if test="entity.applyId != null">apply_id = #{entity.applyId},</if>
            <if test="entity.assistUnitId != null">assist_unit_id = #{entity.assistUnitId},</if>
            <if test="entity.assistUnitName != null">assist_unit_name = #{entity.assistUnitName},</if>
            <if test="entity.acceptTime != null">accept_time = #{entity.acceptTime},</if>
            <if test="entity.assistUserId != null">assist_user_id = #{entity.assistUserId},</if>
            <if test="entity.assistUserName != null">assist_user_name = #{entity.assistUserName},</if>
            <if test="entity.assistStatus != null">assist_status = #{entity.assistStatus},</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.processInstanceId != null and terms.processInstanceId !=''">
                    and process_instance_id = #{terms.processInstanceId}
                </if>
                <if test="terms.caseTaskId != null and terms.caseTaskId !=''">
                    and case_task_id = #{terms.caseTaskId}
                </if>
                <if test="terms.applyId != null and terms.applyId !=''">
                    and apply_id = #{terms.applyId}
                </if>
                <if test="terms.assistUnitId != null and terms.assistUnitId !=''">
                    and assist_unit_id = #{terms.assistUnitId}
                </if>
                <if test="terms.assistUnitName != null and terms.assistUnitName !=''">
                    and assist_unit_name = #{terms.assistUnitName}
                </if>
                <if test="terms.acceptTime != null and terms.acceptTime !=''">
                    and accept_time = #{terms.acceptTime}
                </if>
                <if test="terms.assistUserId != null and terms.assistUserId !=''">
                    and assist_user_id = #{terms.assistUserId}
                </if>
                <if test="terms.assistUserName != null and terms.assistUserName !=''">
                    and assist_user_name = #{terms.assistUserName}
                </if>
                <if test="terms.assistStatus != null and terms.assistStatus !=''">
                    and assist_status = #{terms.assistStatus}
                </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="updateCasebookAssistInfo">
        update
        <include refid="table-name"/>
        <set>
            <include refid="set-part"/>
        </set>
        <where>
            id = #{entity.id}
        </where>
    </update>
    <!-- 条件更新对象 -->
    <update id="updateCasebookAssistInfoTerms">
        update
        <include refid="table-name"/>
        <set>
            <include refid="set-part"/>
        </set>
        <include refid="where-part"/>
    </update>
    <!--  根据编号物理删除  -->
    <delete id="deleteCasebookAssistInfo">
        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>
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/dao/mapper/xml/CasebookFileMapper.xml
New file
@@ -0,0 +1,145 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!--
 * @title: 一本账导入文件记录表
 * @description: 自定义sql,请自行实现业务逻辑
 * @company: hugeinfo
 * @author: liyj
 * @time:2024-10-27 16:16:40
 * @version 1.0.0
-->
<mapper namespace="cn.huge.module.casebook.dao.mapper.CasebookFileMapper">
    <!-- 结果集 -->
    <resultMap id="dataResult" type="cn.huge.module.casebook.domain.po.CasebookFile">
            <result property="id" column="id"/>
            <result property="fileName" column="file_name"/>
            <result property="fileSize" column="file_size"/>
            <result property="userId" column="user_id"/>
            <result property="userName" column="user_name"/>
            <result property="createTime" column="create_time"/>
            <result property="updateTime" column="update_time"/>
            <result property="custId" column="cust_id"/>
    </resultMap>
    <!-- 表 -->
    <sql id='table-name'>dyh_casebook_file</sql>
    <!-- 字段 -->
    <sql id="column-part">
        id,
        file_name,
        file_size,
        user_id,
        user_name,
        create_time,
        update_time,
        cust_id
    </sql>
    <!-- 更新实体字段 -->
    <sql id="set-part">
            <if test="entity.fileName != null">file_name = #{entity.fileName},</if>
            <if test="entity.fileSize != null">file_size = #{entity.fileSize},</if>
            <if test="entity.userId != null">user_id = #{entity.userId},</if>
            <if test="entity.userName != null">user_name = #{entity.userName},</if>
            <if test="entity.createTime != null">create_time = #{entity.createTime},</if>
            <if test="entity.updateTime != null">update_time = #{entity.updateTime},</if>
            <if test="entity.custId != null">cust_id = #{entity.custId}</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.fileName != null and terms.fileName !=''">
                    and file_name = #{terms.fileName}
                </if>
                <if test="terms.fileSize != null and terms.fileSize !=''">
                    and file_size = #{terms.fileSize}
                </if>
                <if test="terms.userId != null and terms.userId !=''">
                    and user_id = #{terms.userId}
                </if>
                <if test="terms.userName != null and terms.userName !=''">
                    and user_name = #{terms.userName}
                </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>
                <if test="terms.custId != null and terms.custId !=''">
                    and cust_id = #{terms.custId}
                </if>
            </where>
        </if>
    </sql>
    <!-- 更新对象 -->
    <update id="updateCasebookFile">
        update
        <include refid="table-name"/>
        <set>
            <include refid="set-part"/>
        </set>
        <where>
            id = #{entity.id}
        </where>
    </update>
    <!-- 条件更新对象 -->
    <update id="updateCasebookFileTerms">
        update
        <include refid="table-name"/>
        <set>
            <include refid="set-part"/>
        </set>
        <include refid="where-part"/>
    </update>
    <!--  根据编号物理删除  -->
    <delete id="deleteCasebookFile">
        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>
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/dao/mapper/xml/CasebookInfoMapper.xml
New file
@@ -0,0 +1,678 @@
<?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: dyh_casebook_info
 * @description: 自定义sql,请自行实现业务逻辑
 * @company: hugeinfo
 * @author: liyj
 * @time:2024-10-26 12:31:22
 * @version 1.0.0
-->
<mapper namespace="cn.huge.module.casebook.dao.mapper.CasebookInfoMapper">
    <!-- 结果集 -->
    <resultMap id="dataResult" type="cn.huge.module.casebook.domain.po.CasebookInfo">
            <result property="id" column="id"/>
            <result property="caseTitle" column="case_title"/>
            <result property="caseRef" column="case_ref"/>
            <result property="caseLevel" column="case_level"/>
            <result property="visitTime" column="visit_time"/>
            <result property="visitPeopleNum" column="visit_people_num"/>
            <result property="mediType" column="medi_type"/>
            <result property="mediTypeName" column="medi_type_name"/>
            <result property="caseTypeFirst" column="case_type_first"/>
            <result property="caseTypeFirstName" column="case_type_first_name"/>
            <result property="caseType" column="case_type"/>
            <result property="caseTypeName" column="case_type_name"/>
            <result property="occurTime" column="occur_time"/>
            <result property="addr" column="addr"/>
            <result property="lng" column="lng"/>
            <result property="lat" column="lat"/>
            <result property="wgAddr" column="wg_addr"/>
            <result property="wgLng" column="wg_lng"/>
            <result property="wgLat" column="wg_lat"/>
            <result property="queProv" column="que_prov"/>
            <result property="queProvName" column="que_prov_name"/>
            <result property="queCity" column="que_city"/>
            <result property="queCityName" column="que_city_name"/>
            <result property="queArea" column="que_area"/>
            <result property="queAreaName" column="que_area_name"/>
            <result property="queRoad" column="que_road"/>
            <result property="queRoadName" column="que_road_name"/>
            <result property="queVillage" column="que_village"/>
            <result property="queVillageName" column="que_village_name"/>
            <result property="peopleNum" column="people_num"/>
            <result property="amount" column="amount"/>
            <result property="crowd" column="crowd"/>
            <result property="crowdName" column="crowd_name"/>
            <result property="canal" column="canal"/>
            <result property="canalName" column="canal_name"/>
            <result property="visitWay" column="visit_way"/>
            <result property="visitWayName" column="visit_way_name"/>
            <result property="zxslStatus" column="zxsl_status"/>
            <result property="caseDes" column="case_des"/>
            <result property="caseClaim" column="case_claim"/>
            <result property="majorStatus" column="major_status"/>
            <result property="source" column="source"/>
            <result property="sourceName" column="source_name"/>
            <result property="caseNo" column="case_no"/>
            <result property="mediateNo" column="mediate_no"/>
            <result property="mediateBookNo" column="mediate_book_no"/>
            <result property="civilNo" column="civil_no"/>
            <result property="plaintiffs" column="plaintiffs"/>
            <result property="pagents" column="pagents"/>
            <result property="defendants" column="defendants"/>
            <result property="dagents" column="dagents"/>
            <result property="partyShow" column="party_show"/>
            <result property="wantUnitId" column="want_unit_id"/>
            <result property="wantUnitName" column="want_unit_name"/>
            <result property="wantUserId" column="want_user_id"/>
            <result property="wantUserName" column="want_user_name"/>
            <result property="inputUnitId" column="input_unit_id"/>
            <result property="inputUnitName" column="input_unit_name"/>
            <result property="inputUserId" column="input_user_id"/>
            <result property="inputUserName" column="input_user_name"/>
            <result property="inputWay" column="input_way"/>
            <result property="status" column="status"/>
            <result property="statusName" column="status_name"/>
            <result property="process" column="process"/>
            <result property="processName" column="process_name"/>
            <result property="infoProcess" column="info_process"/>
            <result property="infoProcessName" column="info_process_name"/>
            <result property="deleteStatus" column="delete_status"/>
            <result property="custId" column="cust_id"/>
            <result property="createTime" column="create_time"/>
            <result property="updateTime" column="update_time"/>
    </resultMap>
    <!-- 表 -->
    <sql id='table-name'>dyh_casebook_info</sql>
    <!-- 字段 -->
    <sql id="column-part">
        id,
        case_title,
        case_ref,
        case_level,
        visit_time,
        visit_people_num,
        medi_type,
        medi_type_name,
        case_type_first,
        case_type_first_name,
        case_type,
        case_type_name,
        occur_time,
        addr,
        lng,
        lat,
        wg_addr,
        wg_lng,
        wg_lat,
        que_prov,
        que_prov_name,
        que_city,
        que_city_name,
        que_area,
        que_area_name,
        que_road,
        que_road_name,
        que_village,
        que_village_name,
        people_num,
        amount,
        crowd,
        crowd_name,
        canal,
        canal_name,
        visit_way,
        visit_way_name,
        zxsl_status,
        case_des,
        case_claim,
        major_status,
        source,
        source_name,
        case_no,
        mediate_no,
        mediate_book_no,
        civil_no,
        plaintiffs,
        pagents,
        defendants,
        dagents,
        party_show,
        want_unit_id,
        want_unit_name,
        want_user_id,
        want_user_name,
        input_unit_id,
        input_unit_name,
        input_user_id,
        input_user_name,
        input_way,
        status,
        status_name,
        process,
        process_name,
        info_process,
        info_process_name,
        delete_status,
        cust_id,
        create_time,
        update_time
    </sql>
    <!-- 更新实体字段 -->
    <sql id="set-part">
            <if test="entity.caseTitle != null">case_title = #{entity.caseTitle},</if>
            <if test="entity.caseRef != null">case_ref = #{entity.caseRef},</if>
            <if test="entity.caseLevel != null">case_level = #{entity.caseLevel},</if>
            <if test="entity.visitTime != null">visit_time = #{entity.visitTime},</if>
            <if test="entity.visitPeopleNum != null">visit_people_num = #{entity.visitPeopleNum},</if>
            <if test="entity.mediType != null">medi_type = #{entity.mediType},</if>
            <if test="entity.mediTypeName != null">medi_type_name = #{entity.mediTypeName},</if>
            <if test="entity.caseTypeFirst != null">case_type_first = #{entity.caseTypeFirst},</if>
            <if test="entity.caseTypeFirstName != null">case_type_first_name = #{entity.caseTypeFirstName},</if>
            <if test="entity.caseType != null">case_type = #{entity.caseType},</if>
            <if test="entity.caseTypeName != null">case_type_name = #{entity.caseTypeName},</if>
            <if test="entity.occurTime != null">occur_time = #{entity.occurTime},</if>
            <if test="entity.addr != null">addr = #{entity.addr},</if>
            <if test="entity.lng != null">lng = #{entity.lng},</if>
            <if test="entity.lat != null">lat = #{entity.lat},</if>
            <if test="entity.wgAddr != null">wg_addr = #{entity.wgAddr},</if>
            <if test="entity.wgLng != null">wg_lng = #{entity.wgLng},</if>
            <if test="entity.wgLat != null">wg_lat = #{entity.wgLat},</if>
            <if test="entity.queProv != null">que_prov = #{entity.queProv},</if>
            <if test="entity.queProvName != null">que_prov_name = #{entity.queProvName},</if>
            <if test="entity.queCity != null">que_city = #{entity.queCity},</if>
            <if test="entity.queCityName != null">que_city_name = #{entity.queCityName},</if>
            <if test="entity.queArea != null">que_area = #{entity.queArea},</if>
            <if test="entity.queAreaName != null">que_area_name = #{entity.queAreaName},</if>
            <if test="entity.queRoad != null">que_road = #{entity.queRoad},</if>
            <if test="entity.queRoadName != null">que_road_name = #{entity.queRoadName},</if>
            <if test="entity.queVillage != null">que_village = #{entity.queVillage},</if>
            <if test="entity.queVillageName != null">que_village_name = #{entity.queVillageName},</if>
            <if test="entity.peopleNum != null">people_num = #{entity.peopleNum},</if>
            <if test="entity.amount != null">amount = #{entity.amount},</if>
            <if test="entity.crowd != null">crowd = #{entity.crowd},</if>
            <if test="entity.crowdName != null">crowd_name = #{entity.crowdName},</if>
            <if test="entity.canal != null">canal = #{entity.canal},</if>
            <if test="entity.canalName != null">canal_name = #{entity.canalName},</if>
            <if test="entity.visitWay != null">visit_way = #{entity.visitWay},</if>
            <if test="entity.visitWayName != null">visit_way_name = #{entity.visitWayName},</if>
            <if test="entity.zxslStatus != null">zxsl_status = #{entity.zxslStatus},</if>
            <if test="entity.caseDes != null">case_des = #{entity.caseDes},</if>
            <if test="entity.caseClaim != null">case_claim = #{entity.caseClaim},</if>
            <if test="entity.majorStatus != null">major_status = #{entity.majorStatus},</if>
            <if test="entity.source != null">source = #{entity.source},</if>
            <if test="entity.sourceName != null">source_name = #{entity.sourceName},</if>
            <if test="entity.caseNo != null">case_no = #{entity.caseNo},</if>
            <if test="entity.mediateNo != null">mediate_no = #{entity.mediateNo},</if>
            <if test="entity.mediateBookNo != null">mediate_book_no = #{entity.mediateBookNo},</if>
            <if test="entity.civilNo != null">civil_no = #{entity.civilNo},</if>
            <if test="entity.plaintiffs != null">plaintiffs = #{entity.plaintiffs},</if>
            <if test="entity.pagents != null">pagents = #{entity.pagents},</if>
            <if test="entity.defendants != null">defendants = #{entity.defendants},</if>
            <if test="entity.dagents != null">dagents = #{entity.dagents},</if>
            <if test="entity.partyShow != null">party_show = #{entity.partyShow},</if>
            <if test="entity.wantUnitId != null">want_unit_id = #{entity.wantUnitId},</if>
            <if test="entity.wantUnitName != null">want_unit_name = #{entity.wantUnitName},</if>
            <if test="entity.wantUserId != null">want_user_id = #{entity.wantUserId},</if>
            <if test="entity.wantUserName != null">want_user_name = #{entity.wantUserName},</if>
            <if test="entity.inputUnitId != null">input_unit_id = #{entity.inputUnitId},</if>
            <if test="entity.inputUnitName != null">input_unit_name = #{entity.inputUnitName},</if>
            <if test="entity.inputUserId != null">input_user_id = #{entity.inputUserId},</if>
            <if test="entity.inputUserName != null">input_user_name = #{entity.inputUserName},</if>
            <if test="entity.inputWay != null">input_way = #{entity.inputWay},</if>
            <if test="entity.status != null">status = #{entity.status},</if>
            <if test="entity.statusName != null">status_name = #{entity.statusName},</if>
            <if test="entity.process != null">process = #{entity.process},</if>
            <if test="entity.processName != null">process_name = #{entity.processName},</if>
            <if test="entity.infoProcess != null">info_process = #{entity.infoProcess},</if>
            <if test="entity.infoProcessName != null">info_process_name = #{entity.infoProcessName},</if>
            <if test="entity.deleteStatus != null">delete_status = #{entity.deleteStatus},</if>
            <if test="entity.custId != null">cust_id = #{entity.custId},</if>
            <if test="entity.createTime != null">create_time = #{entity.createTime},</if>
            <if test="entity.updateTime != null">update_time = #{entity.updateTime}</if>
    </sql>
    <!-- 条件 -->
    <sql id="where-part">
        <if test="terms != null">
            <where>
                <if test="terms.id != null and terms.id !=''">
                    and id = #{terms.id}
                </if>
                <if test="terms.caseTitle != null and terms.caseTitle !=''">
                    and case_title = #{terms.caseTitle}
                </if>
                <if test="terms.caseRef != null and terms.caseRef !=''">
                    and case_ref = #{terms.caseRef}
                </if>
                <if test="terms.caseLevel != null and terms.caseLevel !=''">
                    and case_level = #{terms.caseLevel}
                </if>
                <if test="terms.visitTime != null and terms.visitTime !=''">
                    and visit_time = #{terms.visitTime}
                </if>
                <if test="terms.visitPeopleNum != null and terms.visitPeopleNum !=''">
                    and visit_people_num = #{terms.visitPeopleNum}
                </if>
                <if test="terms.mediType != null and terms.mediType !=''">
                    and medi_type = #{terms.mediType}
                </if>
                <if test="terms.mediTypeName != null and terms.mediTypeName !=''">
                    and medi_type_name = #{terms.mediTypeName}
                </if>
                <if test="terms.caseTypeFirst != null and terms.caseTypeFirst !=''">
                    and case_type_first = #{terms.caseTypeFirst}
                </if>
                <if test="terms.caseTypeFirstName != null and terms.caseTypeFirstName !=''">
                    and case_type_first_name = #{terms.caseTypeFirstName}
                </if>
                <if test="terms.caseType != null and terms.caseType !=''">
                    and case_type = #{terms.caseType}
                </if>
                <if test="terms.caseTypeName != null and terms.caseTypeName !=''">
                    and case_type_name = #{terms.caseTypeName}
                </if>
                <if test="terms.occurTime != null and terms.occurTime !=''">
                    and occur_time = #{terms.occurTime}
                </if>
                <if test="terms.addr != null and terms.addr !=''">
                    and addr = #{terms.addr}
                </if>
                <if test="terms.lng != null and terms.lng !=''">
                    and lng = #{terms.lng}
                </if>
                <if test="terms.lat != null and terms.lat !=''">
                    and lat = #{terms.lat}
                </if>
                <if test="terms.wgAddr != null and terms.wgAddr !=''">
                    and wg_addr = #{terms.wgAddr}
                </if>
                <if test="terms.wgLng != null and terms.wgLng !=''">
                    and wg_lng = #{terms.wgLng}
                </if>
                <if test="terms.wgLat != null and terms.wgLat !=''">
                    and wg_lat = #{terms.wgLat}
                </if>
                <if test="terms.queProv != null and terms.queProv !=''">
                    and que_prov = #{terms.queProv}
                </if>
                <if test="terms.queProvName != null and terms.queProvName !=''">
                    and que_prov_name = #{terms.queProvName}
                </if>
                <if test="terms.queCity != null and terms.queCity !=''">
                    and que_city = #{terms.queCity}
                </if>
                <if test="terms.queCityName != null and terms.queCityName !=''">
                    and que_city_name = #{terms.queCityName}
                </if>
                <if test="terms.queArea != null and terms.queArea !=''">
                    and que_area = #{terms.queArea}
                </if>
                <if test="terms.queAreaName != null and terms.queAreaName !=''">
                    and que_area_name = #{terms.queAreaName}
                </if>
                <if test="terms.queRoad != null and terms.queRoad !=''">
                    and que_road = #{terms.queRoad}
                </if>
                <if test="terms.queRoadName != null and terms.queRoadName !=''">
                    and que_road_name = #{terms.queRoadName}
                </if>
                <if test="terms.queVillage != null and terms.queVillage !=''">
                    and que_village = #{terms.queVillage}
                </if>
                <if test="terms.queVillageName != null and terms.queVillageName !=''">
                    and que_village_name = #{terms.queVillageName}
                </if>
                <if test="terms.peopleNum != null and terms.peopleNum !=''">
                    and people_num = #{terms.peopleNum}
                </if>
                <if test="terms.amount != null and terms.amount !=''">
                    and amount = #{terms.amount}
                </if>
                <if test="terms.crowd != null and terms.crowd !=''">
                    and crowd = #{terms.crowd}
                </if>
                <if test="terms.crowdName != null and terms.crowdName !=''">
                    and crowd_name = #{terms.crowdName}
                </if>
                <if test="terms.canal != null and terms.canal !=''">
                    and canal = #{terms.canal}
                </if>
                <if test="terms.canalName != null and terms.canalName !=''">
                    and canal_name = #{terms.canalName}
                </if>
                <if test="terms.visitWay != null and terms.visitWay !=''">
                    and visit_way = #{terms.visitWay}
                </if>
                <if test="terms.visitWayName != null and terms.visitWayName !=''">
                    and visit_way_name = #{terms.visitWayName}
                </if>
                <if test="terms.zxslStatus != null and terms.zxslStatus !=''">
                    and zxsl_status = #{terms.zxslStatus}
                </if>
                <if test="terms.caseDes != null and terms.caseDes !=''">
                    and case_des = #{terms.caseDes}
                </if>
                <if test="terms.caseClaim != null and terms.caseClaim !=''">
                    and case_claim = #{terms.caseClaim}
                </if>
                <if test="terms.majorStatus != null and terms.majorStatus !=''">
                    and major_status = #{terms.majorStatus}
                </if>
                <if test="terms.source != null and terms.source !=''">
                    and source = #{terms.source}
                </if>
                <if test="terms.sourceName != null and terms.sourceName !=''">
                    and source_name = #{terms.sourceName}
                </if>
                <if test="terms.caseNo != null and terms.caseNo !=''">
                    and case_no = #{terms.caseNo}
                </if>
                <if test="terms.mediateNo != null and terms.mediateNo !=''">
                    and mediate_no = #{terms.mediateNo}
                </if>
                <if test="terms.mediateBookNo != null and terms.mediateBookNo !=''">
                    and mediate_book_no = #{terms.mediateBookNo}
                </if>
                <if test="terms.civilNo != null and terms.civilNo !=''">
                    and civil_no = #{terms.civilNo}
                </if>
                <if test="terms.plaintiffs != null and terms.plaintiffs !=''">
                    and plaintiffs = #{terms.plaintiffs}
                </if>
                <if test="terms.pagents != null and terms.pagents !=''">
                    and pagents = #{terms.pagents}
                </if>
                <if test="terms.defendants != null and terms.defendants !=''">
                    and defendants = #{terms.defendants}
                </if>
                <if test="terms.dagents != null and terms.dagents !=''">
                    and dagents = #{terms.dagents}
                </if>
                <if test="terms.partyShow != null and terms.partyShow !=''">
                    and party_show = #{terms.partyShow}
                </if>
                <if test="terms.wantUnitId != null and terms.wantUnitId !=''">
                    and want_unit_id = #{terms.wantUnitId}
                </if>
                <if test="terms.wantUnitName != null and terms.wantUnitName !=''">
                    and want_unit_name = #{terms.wantUnitName}
                </if>
                <if test="terms.wantUserId != null and terms.wantUserId !=''">
                    and want_user_id = #{terms.wantUserId}
                </if>
                <if test="terms.wantUserName != null and terms.wantUserName !=''">
                    and want_user_name = #{terms.wantUserName}
                </if>
                <if test="terms.inputUnitId != null and terms.inputUnitId !=''">
                    and input_unit_id = #{terms.inputUnitId}
                </if>
                <if test="terms.inputUnitName != null and terms.inputUnitName !=''">
                    and input_unit_name = #{terms.inputUnitName}
                </if>
                <if test="terms.inputUserId != null and terms.inputUserId !=''">
                    and input_user_id = #{terms.inputUserId}
                </if>
                <if test="terms.inputUserName != null and terms.inputUserName !=''">
                    and input_user_name = #{terms.inputUserName}
                </if>
                <if test="terms.inputWay != null and terms.inputWay !=''">
                    and input_way = #{terms.inputWay}
                </if>
                <if test="terms.status != null and terms.status !=''">
                    and status = #{terms.status}
                </if>
                <if test="terms.statusName != null and terms.statusName !=''">
                    and status_name = #{terms.statusName}
                </if>
                <if test="terms.process != null and terms.process !=''">
                    and process = #{terms.process}
                </if>
                <if test="terms.processName != null and terms.processName !=''">
                    and process_name = #{terms.processName}
                </if>
                <if test="terms.infoProcess != null and terms.infoProcess !=''">
                    and info_process = #{terms.infoProcess}
                </if>
                <if test="terms.infoProcessName != null and terms.infoProcessName !=''">
                    and info_process_name = #{terms.infoProcessName}
                </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.occurStart != null and terms.occurStart !='' and terms.updateEnd != null and terms.updateEnd !=''">
                    and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.occurStart}
                        and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd})
                </if>
            </where>
        </if>
    </sql>
    <!-- 更新对象 -->
    <update id="updateCasebookInfo">
        update
        <include refid="table-name"/>
        <set>
            <include refid="set-part"/>
        </set>
        <where>
            id = #{entity.id}
        </where>
    </update>
    <!-- 条件更新对象 -->
    <update id="updateCasebookInfoTerms">
        update
        <include refid="table-name"/>
        <set>
            <include refid="set-part"/>
        </set>
        <include refid="where-part"/>
    </update>
    <!--  根据编号物理删除  -->
    <delete id="deleteCasebookInfo">
        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>
    <!-- 条件-导入草稿 -->
    <sql id="importDraft-where-part">
        <if test="terms != null">
            <if test="terms.importStart != null and terms.importStart !='' and terms.importEnd != null and terms.importEnd !=''">
                and (DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.importStart}
                and DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.importEnd})
            </if>
            <if test="terms.occurStart != null and terms.occurStart !='' and terms.occurEnd != null and terms.occurEnd !=''">
                and (DATE_FORMAT(t1.occur_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart}
                and DATE_FORMAT(t1.occur_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.occurEnd})
            </if>
            <if test="terms.plaintiffs != null and terms.plaintiffs !=''">
                and concat_ws('', ifnull(t1.plaintiffs, ''), ifnull(t1.pagents, '')) like concat('%', #{terms.plaintiffs}, '%')
            </if>
            <if test="terms.defendants != null and terms.defendants !=''">
                and concat_ws('', ifnull(t1.defendants, ''), ifnull(t1.dagents, '')) like concat('%', #{terms.defendants}, '%')
            </if>
            <if test="terms.mediator != null and terms.mediator !=''">
                and t2.mediator like concat('%', #{terms.mediator}, '%')
            </if>
            <if test="terms.mediResult != null and terms.mediResult !=''">
                and t1.medi_result = #{terms.mediResult}
            </if>
            <if test="terms.caseType != null and terms.caseType !=''">
                and t1.case_type = #{terms.caseType}
            </if>
            <if test="terms.assistMediator != null and terms.assistMediator !=''">
                and t3.assist_user_name like concat('%', #{terms.assistMediator}, '%')
            </if>
        </if>
    </sql>
    <!--  统计-导入草稿  -->
    <select id="countImportDraft" resultType="java.lang.Long">
        select count(DISTINCT t1.id)
        from dyh_casebook_info t1
        left join dyh_casebook_info_unfold t2 on t1.id = t2.id
        left join dyh_casebook_assist_info t3 on t1.id = t3.case_id
        where t1.delete_status = 0
        and t1.input_way = 2
        and t1.input_unit_id = #{terms.inputUnitId}
        <include refid="importDraft-where-part"/>
    </select>
    <!--  条件分页查询-导入草稿  -->
    <select id="pageImportDraft" resultType="cn.huge.module.casebook.domain.dto.CaseBookPageDTO">
        select t1.id, t1.occur_time as occurTime, t1.addr, concat_ws('', ifnull(t1.plaintiffs, ''), ifnull(t1.pagents, '')) as plaintiffs,
        concat_ws('', ifnull(t1.defendants, ''), ifnull(t1.dagents, '')) as defendants,
        concat_ws('', ifnull(t1.case_type_first_name, ''), '/' , ifnull(t1.case_type_name, '')) as caseType,
        t2.mediate_unit_name as mediateUnitName, t2.mediator, t3.assist_user_name as assistUserName,
        t2.medi_result as mediResult, t2.medi_result_name as mediResultName, t1.create_time as createTime
        from dyh_casebook_info t1
        left join dyh_casebook_info_unfold t2 on t1.id = t2.id
        left join dyh_casebook_assist_info t3 on t1.id = t3.case_id
        where t1.delete_status = 0
        and t1.input_way = 2
        and t1.input_unit_id = #{terms.inputUnitId}
        <include refid="importDraft-where-part"/>
        <if test="page.sort != null">
            <foreach collection="page.sort" item="s" index="index" separator="," open="order by ">
                isnull(${s.property}), ${s.property} ${s.direction}
            </foreach>
        </if>
        <if test="page.sort == null">
            order by isnull(create_time), create_time desc
        </if>
        limit #{page.offset}, #{page.size}
    </select>
    <!--  条件分页查询-导入草稿  -->
    <select id="listImportDraft" resultType="cn.huge.module.casebook.domain.dto.CaseBookPageDTO">
        select t1.id, t1.occur_time as occurTime, t1.addr, concat_ws('', ifnull(t1.plaintiffs, ''), ifnull(t1.pagents, '')) as plaintiffs,
        concat_ws('', ifnull(t1.defendants, ''), ifnull(t1.dagents, '')) as defendants,
        concat_ws('', ifnull(t1.case_type_first_name, ''), '/' , ifnull(t1.case_type_name, '')) as caseType,
        t2.mediate_unit_name as mediateUnitName, t2.mediator, t3.assist_user_name as assistUserName,
        t2.medi_result as mediResult, t2.medi_result_name as mediResultName, t1.create_time as createTime
        from dyh_casebook_info t1
        left join dyh_casebook_info_unfold t2 on t1.id = t2.id
        left join dyh_casebook_assist_info t3 on t1.id = t3.case_id
        where t1.delete_status = 0
        and t1.input_way = 2
        and t1.input_unit_id = #{terms.inputUnitId}
        <include refid="importDraft-where-part"/>
        order by t1.create_time
    </select>
    <!-- 条件-导入成功 -->
    <sql id="importSuc-where-part">
        <if test="terms != null">
            <if test="terms.importStart != null and terms.importStart !='' and terms.importEnd != null and terms.importEnd !=''">
                and (DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.importStart}
                and DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.importEnd})
            </if>
            <if test="terms.occurStart != null and terms.occurStart !='' and terms.occurEnd != null and terms.occurEnd !=''">
                and (DATE_FORMAT(t1.occur_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart}
                and DATE_FORMAT(t1.occur_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.occurEnd})
            </if>
            <if test="terms.plaintiffs != null and terms.plaintiffs !=''">
                and concat_ws('', ifnull(t1.plaintiffs, ''), ifnull(t1.pagents, '')) like concat('%', #{terms.plaintiffs}, '%')
            </if>
            <if test="terms.defendants != null and terms.defendants !=''">
                and concat_ws('', ifnull(t1.defendants, ''), ifnull(t1.dagents, '')) like concat('%', #{terms.defendants}, '%')
            </if>
            <if test="terms.mediator != null and terms.mediator !=''">
                and t2.mediator like concat('%', #{terms.mediator}, '%')
            </if>
            <if test="terms.mediResult != null and terms.mediResult !=''">
                and t1.medi_result = #{terms.mediResult}
            </if>
            <if test="terms.caseType != null and terms.caseType !=''">
                and t1.case_type = #{terms.caseType}
            </if>
            <if test="terms.assistMediator != null and terms.assistMediator !=''">
                and t3.assist_user_name like concat('%', #{terms.assistMediator}, '%')
            </if>
        </if>
    </sql>
    <!--  统计-导入成功  -->
    <select id="countImportSuc" resultType="java.lang.Long">
        select count(DISTINCT t1.id)
        from dyh_case_info t1
        left join dyh_case_info_unfold t2 on t1.id = t2.id
        left join dyh_case_assist_info t3 on t1.id = t3.case_id
        where t1.delete_status = 0
        and t1.input_way = 2
        and t1.input_unit_id = #{terms.inputUnitId}
        <include refid="importSuc-where-part"/>
    </select>
    <!--  条件分页查询-导入成功  -->
    <select id="pageImportSuc" resultType="cn.huge.module.casebook.domain.dto.CaseBookPageDTO">
        select t1.id, t1.occur_time as occurTime, t1.addr, concat_ws('', ifnull(t1.plaintiffs, ''), ifnull(t1.pagents, '')) as plaintiffs,
        concat_ws('', ifnull(t1.defendants, ''), ifnull(t1.dagents, '')) as defendants,
        concat_ws('', ifnull(t1.case_type_first_name, ''), '/' , ifnull(t1.case_type_name, '')) as caseType,
        t2.mediate_unit_name as mediateUnitName, t2.mediator, t3.assist_user_name as assistUserName,
        t2.medi_result as mediResult, t2.medi_result_name as mediResultName, t1.create_time as createTime
        from dyh_case_info t1
        left join dyh_case_info_unfold t2 on t1.id = t2.id
        left join dyh_case_assist_info t3 on t1.id = t3.case_id
        where t1.delete_status = 0
        and t1.input_way = 2
        and t1.input_unit_id = #{terms.inputUnitId}
        <include refid="importSuc-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>
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/dao/mapper/xml/CasebookInfoUnfoldMapper.xml
New file
@@ -0,0 +1,391 @@
<?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: dyh_casebook_info_unfold
 * @description: 自定义sql,请自行实现业务逻辑
 * @company: hugeinfo
 * @author: liyj
 * @time:2024-10-26 12:31:22
 * @version 1.0.0
-->
<mapper namespace="cn.huge.module.casebook.dao.mapper.CasebookInfoUnfoldMapper">
    <!-- 结果集 -->
    <resultMap id="dataResult" type="cn.huge.module.casebook.domain.po.CasebookInfoUnfold">
            <result property="id" column="id"/>
            <result property="acceptTime" column="accept_time"/>
            <result property="mediateUnitId" column="mediate_unit_id"/>
            <result property="mediateUnitName" column="mediate_unit_name"/>
            <result property="mediateDeptId" column="mediate_dept_id"/>
            <result property="mediateDeptName" column="mediate_dept_name"/>
            <result property="mediatorId" column="mediator_id"/>
            <result property="mediator" column="mediator"/>
            <result property="mediatorMobile" column="mediator_mobile"/>
            <result property="assistUnitId" column="assist_unit_id"/>
            <result property="assistUnitName" column="assist_unit_name"/>
            <result property="mediStartTime" column="medi_start_time"/>
            <result property="mediEndTime" column="medi_end_time"/>
            <result property="mediResult" column="medi_result"/>
            <result property="mediResultName" column="medi_result_name"/>
            <result property="agreeType" column="agree_type"/>
            <result property="agreeTypeName" column="agree_type_name"/>
            <result property="agreeContent" column="agree_content"/>
            <result property="windupContent" column="windup_content"/>
            <result property="mediFalse" column="medi_false"/>
            <result property="mediFalseName" column="medi_false_name"/>
            <result property="civilStatus" column="civil_status"/>
            <result property="courtId" column="court_id"/>
            <result property="courtName" column="court_name"/>
            <result property="closeTime" column="close_time"/>
            <result property="judicApply" column="judic_apply"/>
            <result property="judicResult" column="judic_result"/>
            <result property="judicResultName" column="judic_result_name"/>
            <result property="fileStatus" column="file_status"/>
            <result property="fileUserId" column="file_user_id"/>
            <result property="fileUserName" column="file_user_name"/>
            <result property="fileTime" column="file_time"/>
            <result property="fileYear" column="file_year"/>
            <result property="fileBookName" column="file_book_name"/>
            <result property="fileBookNo" column="file_book_no"/>
            <result property="fileNo" column="file_no"/>
            <result property="fileLimitYear" column="file_limit_year"/>
            <result property="fileAddr" column="file_addr"/>
            <result property="fileContent" column="file_content"/>
            <result property="fulfilSitu" column="fulfil_situ"/>
            <result property="fulfilSituName" column="fulfil_situ_name"/>
            <result property="visitUpStatus" column="visit_up_status"/>
            <result property="visitUpContent" column="visit_up_content"/>
            <result property="partyJoy" column="party_joy"/>
            <result property="custId" column="cust_id"/>
            <result property="createTime" column="create_time"/>
            <result property="updateTime" column="update_time"/>
            <result property="belongUnitId" column="belong_unit_id"/>
            <result property="belongUnitName" column="belong_unit_name"/>
    </resultMap>
    <!-- 表 -->
    <sql id='table-name'>dyh_casebook_info_unfold</sql>
    <!-- 字段 -->
    <sql id="column-part">
        id,
        accept_time,
        mediate_unit_id,
        mediate_unit_name,
        mediate_dept_id,
        mediate_dept_name,
        mediator_id,
        mediator,
        mediator_mobile,
        assist_unit_id,
        assist_unit_name,
        medi_start_time,
        medi_end_time,
        medi_result,
        medi_result_name,
        agree_type,
        agree_type_name,
        agree_content,
        windup_content,
        medi_false,
        medi_false_name,
        civil_status,
        court_id,
        court_name,
        close_time,
        judic_apply,
        judic_result,
        judic_result_name,
        file_status,
        file_user_id,
        file_user_name,
        file_time,
        file_year,
        file_book_name,
        file_book_no,
        file_no,
        file_limit_year,
        file_addr,
        file_content,
        fulfil_situ,
        fulfil_situ_name,
        visit_up_status,
        visit_up_content,
        party_joy,
        cust_id,
        create_time,
        update_time,
        belong_unit_id,
        belong_unit_name
    </sql>
    <!-- 更新实体字段 -->
    <sql id="set-part">
            <if test="entity.acceptTime != null">accept_time = #{entity.acceptTime},</if>
            <if test="entity.mediateUnitId != null">mediate_unit_id = #{entity.mediateUnitId},</if>
            <if test="entity.mediateUnitName != null">mediate_unit_name = #{entity.mediateUnitName},</if>
            <if test="entity.mediateDeptId != null">mediate_dept_id = #{entity.mediateDeptId},</if>
            <if test="entity.mediateDeptName != null">mediate_dept_name = #{entity.mediateDeptName},</if>
            <if test="entity.mediatorId != null">mediator_id = #{entity.mediatorId},</if>
            <if test="entity.mediator != null">mediator = #{entity.mediator},</if>
            <if test="entity.mediatorMobile != null">mediator_mobile = #{entity.mediatorMobile},</if>
            <if test="entity.assistUnitId != null">assist_unit_id = #{entity.assistUnitId},</if>
            <if test="entity.assistUnitName != null">assist_unit_name = #{entity.assistUnitName},</if>
            <if test="entity.mediStartTime != null">medi_start_time = #{entity.mediStartTime},</if>
            <if test="entity.mediEndTime != null">medi_end_time = #{entity.mediEndTime},</if>
            <if test="entity.mediResult != null">medi_result = #{entity.mediResult},</if>
            <if test="entity.mediResultName != null">medi_result_name = #{entity.mediResultName},</if>
            <if test="entity.agreeType != null">agree_type = #{entity.agreeType},</if>
            <if test="entity.agreeTypeName != null">agree_type_name = #{entity.agreeTypeName},</if>
            <if test="entity.agreeContent != null">agree_content = #{entity.agreeContent},</if>
            <if test="entity.windupContent != null">windup_content = #{entity.windupContent},</if>
            <if test="entity.mediFalse != null">medi_false = #{entity.mediFalse},</if>
            <if test="entity.mediFalseName != null">medi_false_name = #{entity.mediFalseName},</if>
            <if test="entity.civilStatus != null">civil_status = #{entity.civilStatus},</if>
            <if test="entity.courtId != null">court_id = #{entity.courtId},</if>
            <if test="entity.courtName != null">court_name = #{entity.courtName},</if>
            <if test="entity.closeTime != null">close_time = #{entity.closeTime},</if>
            <if test="entity.judicApply != null">judic_apply = #{entity.judicApply},</if>
            <if test="entity.judicResult != null">judic_result = #{entity.judicResult},</if>
            <if test="entity.judicResultName != null">judic_result_name = #{entity.judicResultName},</if>
            <if test="entity.fileStatus != null">file_status = #{entity.fileStatus},</if>
            <if test="entity.fileUserId != null">file_user_id = #{entity.fileUserId},</if>
            <if test="entity.fileUserName != null">file_user_name = #{entity.fileUserName},</if>
            <if test="entity.fileTime != null">file_time = #{entity.fileTime},</if>
            <if test="entity.fileYear != null">file_year = #{entity.fileYear},</if>
            <if test="entity.fileBookName != null">file_book_name = #{entity.fileBookName},</if>
            <if test="entity.fileBookNo != null">file_book_no = #{entity.fileBookNo},</if>
            <if test="entity.fileNo != null">file_no = #{entity.fileNo},</if>
            <if test="entity.fileLimitYear != null">file_limit_year = #{entity.fileLimitYear},</if>
            <if test="entity.fileAddr != null">file_addr = #{entity.fileAddr},</if>
            <if test="entity.fileContent != null">file_content = #{entity.fileContent},</if>
            <if test="entity.fulfilSitu != null">fulfil_situ = #{entity.fulfilSitu},</if>
            <if test="entity.fulfilSituName != null">fulfil_situ_name = #{entity.fulfilSituName},</if>
            <if test="entity.visitUpStatus != null">visit_up_status = #{entity.visitUpStatus},</if>
            <if test="entity.visitUpContent != null">visit_up_content = #{entity.visitUpContent},</if>
            <if test="entity.partyJoy != null">party_joy = #{entity.partyJoy},</if>
            <if test="entity.custId != null">cust_id = #{entity.custId},</if>
            <if test="entity.createTime != null">create_time = #{entity.createTime},</if>
            <if test="entity.updateTime != null">update_time = #{entity.updateTime},</if>
            <if test="entity.belongUnitId != null">belong_unit_id = #{entity.belongUnitId},</if>
            <if test="entity.belongUnitName != null">belong_unit_name = #{entity.belongUnitName}</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.acceptTime != null and terms.acceptTime !=''">
                    and accept_time = #{terms.acceptTime}
                </if>
                <if test="terms.mediateUnitId != null and terms.mediateUnitId !=''">
                    and mediate_unit_id = #{terms.mediateUnitId}
                </if>
                <if test="terms.mediateUnitName != null and terms.mediateUnitName !=''">
                    and mediate_unit_name = #{terms.mediateUnitName}
                </if>
                <if test="terms.mediateDeptId != null and terms.mediateDeptId !=''">
                    and mediate_dept_id = #{terms.mediateDeptId}
                </if>
                <if test="terms.mediateDeptName != null and terms.mediateDeptName !=''">
                    and mediate_dept_name = #{terms.mediateDeptName}
                </if>
                <if test="terms.mediatorId != null and terms.mediatorId !=''">
                    and mediator_id = #{terms.mediatorId}
                </if>
                <if test="terms.mediator != null and terms.mediator !=''">
                    and mediator = #{terms.mediator}
                </if>
                <if test="terms.mediatorMobile != null and terms.mediatorMobile !=''">
                    and mediator_mobile = #{terms.mediatorMobile}
                </if>
                <if test="terms.assistUnitId != null and terms.assistUnitId !=''">
                    and assist_unit_id = #{terms.assistUnitId}
                </if>
                <if test="terms.assistUnitName != null and terms.assistUnitName !=''">
                    and assist_unit_name = #{terms.assistUnitName}
                </if>
                <if test="terms.mediStartTime != null and terms.mediStartTime !=''">
                    and medi_start_time = #{terms.mediStartTime}
                </if>
                <if test="terms.mediEndTime != null and terms.mediEndTime !=''">
                    and medi_end_time = #{terms.mediEndTime}
                </if>
                <if test="terms.mediResult != null and terms.mediResult !=''">
                    and medi_result = #{terms.mediResult}
                </if>
                <if test="terms.mediResultName != null and terms.mediResultName !=''">
                    and medi_result_name = #{terms.mediResultName}
                </if>
                <if test="terms.agreeType != null and terms.agreeType !=''">
                    and agree_type = #{terms.agreeType}
                </if>
                <if test="terms.agreeTypeName != null and terms.agreeTypeName !=''">
                    and agree_type_name = #{terms.agreeTypeName}
                </if>
                <if test="terms.agreeContent != null and terms.agreeContent !=''">
                    and agree_content = #{terms.agreeContent}
                </if>
                <if test="terms.windupContent != null and terms.windupContent !=''">
                    and windup_content = #{terms.windupContent}
                </if>
                <if test="terms.mediFalse != null and terms.mediFalse !=''">
                    and medi_false = #{terms.mediFalse}
                </if>
                <if test="terms.mediFalseName != null and terms.mediFalseName !=''">
                    and medi_false_name = #{terms.mediFalseName}
                </if>
                <if test="terms.civilStatus != null and terms.civilStatus !=''">
                    and civil_status = #{terms.civilStatus}
                </if>
                <if test="terms.courtId != null and terms.courtId !=''">
                    and court_id = #{terms.courtId}
                </if>
                <if test="terms.courtName != null and terms.courtName !=''">
                    and court_name = #{terms.courtName}
                </if>
                <if test="terms.closeTime != null and terms.closeTime !=''">
                    and close_time = #{terms.closeTime}
                </if>
                <if test="terms.judicApply != null and terms.judicApply !=''">
                    and judic_apply = #{terms.judicApply}
                </if>
                <if test="terms.judicResult != null and terms.judicResult !=''">
                    and judic_result = #{terms.judicResult}
                </if>
                <if test="terms.judicResultName != null and terms.judicResultName !=''">
                    and judic_result_name = #{terms.judicResultName}
                </if>
                <if test="terms.fileStatus != null and terms.fileStatus !=''">
                    and file_status = #{terms.fileStatus}
                </if>
                <if test="terms.fileUserId != null and terms.fileUserId !=''">
                    and file_user_id = #{terms.fileUserId}
                </if>
                <if test="terms.fileUserName != null and terms.fileUserName !=''">
                    and file_user_name = #{terms.fileUserName}
                </if>
                <if test="terms.fileTime != null and terms.fileTime !=''">
                    and file_time = #{terms.fileTime}
                </if>
                <if test="terms.fileYear != null and terms.fileYear !=''">
                    and file_year = #{terms.fileYear}
                </if>
                <if test="terms.fileBookName != null and terms.fileBookName !=''">
                    and file_book_name = #{terms.fileBookName}
                </if>
                <if test="terms.fileBookNo != null and terms.fileBookNo !=''">
                    and file_book_no = #{terms.fileBookNo}
                </if>
                <if test="terms.fileNo != null and terms.fileNo !=''">
                    and file_no = #{terms.fileNo}
                </if>
                <if test="terms.fileLimitYear != null and terms.fileLimitYear !=''">
                    and file_limit_year = #{terms.fileLimitYear}
                </if>
                <if test="terms.fileAddr != null and terms.fileAddr !=''">
                    and file_addr = #{terms.fileAddr}
                </if>
                <if test="terms.fileContent != null and terms.fileContent !=''">
                    and file_content = #{terms.fileContent}
                </if>
                <if test="terms.fulfilSitu != null and terms.fulfilSitu !=''">
                    and fulfil_situ = #{terms.fulfilSitu}
                </if>
                <if test="terms.fulfilSituName != null and terms.fulfilSituName !=''">
                    and fulfil_situ_name = #{terms.fulfilSituName}
                </if>
                <if test="terms.visitUpStatus != null and terms.visitUpStatus !=''">
                    and visit_up_status = #{terms.visitUpStatus}
                </if>
                <if test="terms.visitUpContent != null and terms.visitUpContent !=''">
                    and visit_up_content = #{terms.visitUpContent}
                </if>
                <if test="terms.partyJoy != null and terms.partyJoy !=''">
                    and party_joy = #{terms.partyJoy}
                </if>
                <if test="terms.custId != null and terms.custId !=''">
                    and cust_id = #{terms.custId}
                </if>
                <if test="terms.createTime != null and terms.createTime !=''">
                    and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime}
                </if>
                <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''">
                    and (DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart}
                        and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.createEnd})
                </if>
                <if test="terms.updateTime != null and terms.updateTime !=''">
                    and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime}
                </if>
                <if test="terms.updateStart != null and terms.updateStart !='' and terms.updateEnd != null and terms.updateEnd !=''">
                    and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart}
                        and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd})
                </if>
                <if test="terms.belongUnitId != null and terms.belongUnitId !=''">
                    and belong_unit_id = #{terms.belongUnitId}
                </if>
                <if test="terms.belongUnitName != null and terms.belongUnitName !=''">
                    and belong_unit_name = #{terms.belongUnitName}
                </if>
            </where>
        </if>
    </sql>
    <!-- 更新对象 -->
    <update id="updateCasebookInfoUnfold">
        update
        <include refid="table-name"/>
        <set>
            <include refid="set-part"/>
        </set>
        <where>
            id = #{entity.id}
        </where>
    </update>
    <!-- 条件更新对象 -->
    <update id="updateCasebookInfoUnfoldTerms">
        update
        <include refid="table-name"/>
        <set>
            <include refid="set-part"/>
        </set>
        <include refid="where-part"/>
    </update>
    <!--  根据编号物理删除  -->
    <delete id="deleteCasebookInfoUnfold">
        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>
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/dao/mapper/xml/CasebookPersonMapper.xml
New file
@@ -0,0 +1,436 @@
<?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: dyh_casebook_person
 * @description: 自定义sql,请自行实现业务逻辑
 * @company: hugeinfo
 * @author: liyj
 * @time:2024-10-26 12:31:22
 * @version 1.0.0
-->
<mapper namespace="cn.huge.module.casebook.dao.mapper.CasebookPersonMapper">
    <!-- 结果集 -->
    <resultMap id="dataResult" type="cn.huge.module.casebook.domain.po.CasebookPerson">
            <result property="id" column="id"/>
            <result property="caseId" column="case_id"/>
            <result property="partyUserId" column="party_user_id"/>
            <result property="perType" column="per_type"/>
            <result property="perTypeName" column="per_type_name"/>
            <result property="perClass" column="per_class"/>
            <result property="perClassName" column="per_class_name"/>
            <result property="trueName" column="true_name"/>
            <result property="mobile" column="mobile"/>
            <result property="orgaCode" column="orga_code"/>
            <result property="deputy" column="deputy"/>
            <result property="orgaType" column="orga_type"/>
            <result property="orgaTypeName" column="orga_type_name"/>
            <result property="certiType" column="certi_type"/>
            <result property="certiTypeName" column="certi_type_name"/>
            <result property="certiNo" column="certi_no"/>
            <result property="prov" column="prov"/>
            <result property="provName" column="prov_name"/>
            <result property="city" column="city"/>
            <result property="cityName" column="city_name"/>
            <result property="area" column="area"/>
            <result property="areaName" column="area_name"/>
            <result property="road" column="road"/>
            <result property="roadName" column="road_name"/>
            <result property="village" column="village"/>
            <result property="villageName" column="village_name"/>
            <result property="addr" column="addr"/>
            <result property="placeProv" column="place_prov"/>
            <result property="placeProvName" column="place_prov_name"/>
            <result property="placeCity" column="place_city"/>
            <result property="placeCityName" column="place_city_name"/>
            <result property="placeArea" column="place_area"/>
            <result property="placeAreaName" column="place_area_name"/>
            <result property="placeRoad" column="place_road"/>
            <result property="placeRoadName" column="place_road_name"/>
            <result property="placeVillage" column="place_village"/>
            <result property="placeVillageName" column="place_village_name"/>
            <result property="placeAddr" column="place_addr"/>
            <result property="workUnit" column="work_unit"/>
            <result property="nation" column="nation"/>
            <result property="nationName" column="nation_name"/>
            <result property="sex" column="sex"/>
            <result property="sexName" column="sex_name"/>
            <result property="extreme" column="extreme"/>
            <result property="avatar" column="avatar"/>
            <result property="job" column="job"/>
            <result property="jobName" column="job_name"/>
            <result property="birthday" column="birthday"/>
            <result property="age" column="age"/>
            <result property="agentStatus" column="agent_status"/>
            <result property="custId" column="cust_id"/>
            <result property="deleteStatus" column="delete_status"/>
            <result property="createTime" column="create_time"/>
            <result property="updateTime" column="update_time"/>
            <result property="companyId" column="company_id"/>
            <result property="workUnitId" column="work_unit_id"/>
    </resultMap>
    <!-- 表 -->
    <sql id='table-name'>dyh_casebook_person</sql>
    <!-- 字段 -->
    <sql id="column-part">
        id,
        case_id,
        party_user_id,
        per_type,
        per_type_name,
        per_class,
        per_class_name,
        true_name,
        mobile,
        orga_code,
        deputy,
        orga_type,
        orga_type_name,
        certi_type,
        certi_type_name,
        certi_no,
        prov,
        prov_name,
        city,
        city_name,
        area,
        area_name,
        road,
        road_name,
        village,
        village_name,
        addr,
        place_prov,
        place_prov_name,
        place_city,
        place_city_name,
        place_area,
        place_area_name,
        place_road,
        place_road_name,
        place_village,
        place_village_name,
        place_addr,
        work_unit,
        nation,
        nation_name,
        sex,
        sex_name,
        extreme,
        avatar,
        job,
        job_name,
        birthday,
        age,
        agent_status,
        cust_id,
        delete_status,
        create_time,
        update_time,
        company_id,
        work_unit_id
    </sql>
    <!-- 更新实体字段 -->
    <sql id="set-part">
            <if test="entity.caseId != null">case_id = #{entity.caseId},</if>
            <if test="entity.partyUserId != null">party_user_id = #{entity.partyUserId},</if>
            <if test="entity.perType != null">per_type = #{entity.perType},</if>
            <if test="entity.perTypeName != null">per_type_name = #{entity.perTypeName},</if>
            <if test="entity.perClass != null">per_class = #{entity.perClass},</if>
            <if test="entity.perClassName != null">per_class_name = #{entity.perClassName},</if>
            <if test="entity.trueName != null">true_name = #{entity.trueName},</if>
            <if test="entity.mobile != null">mobile = #{entity.mobile},</if>
            <if test="entity.orgaCode != null">orga_code = #{entity.orgaCode},</if>
            <if test="entity.deputy != null">deputy = #{entity.deputy},</if>
            <if test="entity.orgaType != null">orga_type = #{entity.orgaType},</if>
            <if test="entity.orgaTypeName != null">orga_type_name = #{entity.orgaTypeName},</if>
            <if test="entity.certiType != null">certi_type = #{entity.certiType},</if>
            <if test="entity.certiTypeName != null">certi_type_name = #{entity.certiTypeName},</if>
            <if test="entity.certiNo != null">certi_no = #{entity.certiNo},</if>
            <if test="entity.prov != null">prov = #{entity.prov},</if>
            <if test="entity.provName != null">prov_name = #{entity.provName},</if>
            <if test="entity.city != null">city = #{entity.city},</if>
            <if test="entity.cityName != null">city_name = #{entity.cityName},</if>
            <if test="entity.area != null">area = #{entity.area},</if>
            <if test="entity.areaName != null">area_name = #{entity.areaName},</if>
            <if test="entity.road != null">road = #{entity.road},</if>
            <if test="entity.roadName != null">road_name = #{entity.roadName},</if>
            <if test="entity.village != null">village = #{entity.village},</if>
            <if test="entity.villageName != null">village_name = #{entity.villageName},</if>
            <if test="entity.addr != null">addr = #{entity.addr},</if>
            <if test="entity.placeProv != null">place_prov = #{entity.placeProv},</if>
            <if test="entity.placeProvName != null">place_prov_name = #{entity.placeProvName},</if>
            <if test="entity.placeCity != null">place_city = #{entity.placeCity},</if>
            <if test="entity.placeCityName != null">place_city_name = #{entity.placeCityName},</if>
            <if test="entity.placeArea != null">place_area = #{entity.placeArea},</if>
            <if test="entity.placeAreaName != null">place_area_name = #{entity.placeAreaName},</if>
            <if test="entity.placeRoad != null">place_road = #{entity.placeRoad},</if>
            <if test="entity.placeRoadName != null">place_road_name = #{entity.placeRoadName},</if>
            <if test="entity.placeVillage != null">place_village = #{entity.placeVillage},</if>
            <if test="entity.placeVillageName != null">place_village_name = #{entity.placeVillageName},</if>
            <if test="entity.placeAddr != null">place_addr = #{entity.placeAddr},</if>
            <if test="entity.workUnit != null">work_unit = #{entity.workUnit},</if>
            <if test="entity.nation != null">nation = #{entity.nation},</if>
            <if test="entity.nationName != null">nation_name = #{entity.nationName},</if>
            <if test="entity.sex != null">sex = #{entity.sex},</if>
            <if test="entity.sexName != null">sex_name = #{entity.sexName},</if>
            <if test="entity.extreme != null">extreme = #{entity.extreme},</if>
            <if test="entity.avatar != null">avatar = #{entity.avatar},</if>
            <if test="entity.job != null">job = #{entity.job},</if>
            <if test="entity.jobName != null">job_name = #{entity.jobName},</if>
            <if test="entity.birthday != null">birthday = #{entity.birthday},</if>
            <if test="entity.age != null">age = #{entity.age},</if>
            <if test="entity.agentStatus != null">agent_status = #{entity.agentStatus},</if>
            <if test="entity.custId != null">cust_id = #{entity.custId},</if>
            <if test="entity.deleteStatus != null">delete_status = #{entity.deleteStatus},</if>
            <if test="entity.createTime != null">create_time = #{entity.createTime},</if>
            <if test="entity.updateTime != null">update_time = #{entity.updateTime},</if>
            <if test="entity.companyId != null">company_id = #{entity.companyId},</if>
            <if test="entity.workUnitId != null">work_unit_id = #{entity.workUnitId}</if>
    </sql>
    <!-- 条件 -->
    <sql id="where-part">
        <if test="terms != null">
            <where>
                <if test="terms.id != null and terms.id !=''">
                    and id = #{terms.id}
                </if>
                <if test="terms.caseId != null and terms.caseId !=''">
                    and case_id = #{terms.caseId}
                </if>
                <if test="terms.partyUserId != null and terms.partyUserId !=''">
                    and party_user_id = #{terms.partyUserId}
                </if>
                <if test="terms.perType != null and terms.perType !=''">
                    and per_type = #{terms.perType}
                </if>
                <if test="terms.perTypeName != null and terms.perTypeName !=''">
                    and per_type_name = #{terms.perTypeName}
                </if>
                <if test="terms.perClass != null and terms.perClass !=''">
                    and per_class = #{terms.perClass}
                </if>
                <if test="terms.perClassName != null and terms.perClassName !=''">
                    and per_class_name = #{terms.perClassName}
                </if>
                <if test="terms.trueName != null and terms.trueName !=''">
                    and true_name = #{terms.trueName}
                </if>
                <if test="terms.mobile != null and terms.mobile !=''">
                    and mobile = #{terms.mobile}
                </if>
                <if test="terms.orgaCode != null and terms.orgaCode !=''">
                    and orga_code = #{terms.orgaCode}
                </if>
                <if test="terms.deputy != null and terms.deputy !=''">
                    and deputy = #{terms.deputy}
                </if>
                <if test="terms.orgaType != null and terms.orgaType !=''">
                    and orga_type = #{terms.orgaType}
                </if>
                <if test="terms.orgaTypeName != null and terms.orgaTypeName !=''">
                    and orga_type_name = #{terms.orgaTypeName}
                </if>
                <if test="terms.certiType != null and terms.certiType !=''">
                    and certi_type = #{terms.certiType}
                </if>
                <if test="terms.certiTypeName != null and terms.certiTypeName !=''">
                    and certi_type_name = #{terms.certiTypeName}
                </if>
                <if test="terms.certiNo != null and terms.certiNo !=''">
                    and certi_no = #{terms.certiNo}
                </if>
                <if test="terms.prov != null and terms.prov !=''">
                    and prov = #{terms.prov}
                </if>
                <if test="terms.provName != null and terms.provName !=''">
                    and prov_name = #{terms.provName}
                </if>
                <if test="terms.city != null and terms.city !=''">
                    and city = #{terms.city}
                </if>
                <if test="terms.cityName != null and terms.cityName !=''">
                    and city_name = #{terms.cityName}
                </if>
                <if test="terms.area != null and terms.area !=''">
                    and area = #{terms.area}
                </if>
                <if test="terms.areaName != null and terms.areaName !=''">
                    and area_name = #{terms.areaName}
                </if>
                <if test="terms.road != null and terms.road !=''">
                    and road = #{terms.road}
                </if>
                <if test="terms.roadName != null and terms.roadName !=''">
                    and road_name = #{terms.roadName}
                </if>
                <if test="terms.village != null and terms.village !=''">
                    and village = #{terms.village}
                </if>
                <if test="terms.villageName != null and terms.villageName !=''">
                    and village_name = #{terms.villageName}
                </if>
                <if test="terms.addr != null and terms.addr !=''">
                    and addr = #{terms.addr}
                </if>
                <if test="terms.placeProv != null and terms.placeProv !=''">
                    and place_prov = #{terms.placeProv}
                </if>
                <if test="terms.placeProvName != null and terms.placeProvName !=''">
                    and place_prov_name = #{terms.placeProvName}
                </if>
                <if test="terms.placeCity != null and terms.placeCity !=''">
                    and place_city = #{terms.placeCity}
                </if>
                <if test="terms.placeCityName != null and terms.placeCityName !=''">
                    and place_city_name = #{terms.placeCityName}
                </if>
                <if test="terms.placeArea != null and terms.placeArea !=''">
                    and place_area = #{terms.placeArea}
                </if>
                <if test="terms.placeAreaName != null and terms.placeAreaName !=''">
                    and place_area_name = #{terms.placeAreaName}
                </if>
                <if test="terms.placeRoad != null and terms.placeRoad !=''">
                    and place_road = #{terms.placeRoad}
                </if>
                <if test="terms.placeRoadName != null and terms.placeRoadName !=''">
                    and place_road_name = #{terms.placeRoadName}
                </if>
                <if test="terms.placeVillage != null and terms.placeVillage !=''">
                    and place_village = #{terms.placeVillage}
                </if>
                <if test="terms.placeVillageName != null and terms.placeVillageName !=''">
                    and place_village_name = #{terms.placeVillageName}
                </if>
                <if test="terms.placeAddr != null and terms.placeAddr !=''">
                    and place_addr = #{terms.placeAddr}
                </if>
                <if test="terms.workUnit != null and terms.workUnit !=''">
                    and work_unit = #{terms.workUnit}
                </if>
                <if test="terms.nation != null and terms.nation !=''">
                    and nation = #{terms.nation}
                </if>
                <if test="terms.nationName != null and terms.nationName !=''">
                    and nation_name = #{terms.nationName}
                </if>
                <if test="terms.sex != null and terms.sex !=''">
                    and sex = #{terms.sex}
                </if>
                <if test="terms.sexName != null and terms.sexName !=''">
                    and sex_name = #{terms.sexName}
                </if>
                <if test="terms.extreme != null and terms.extreme !=''">
                    and extreme = #{terms.extreme}
                </if>
                <if test="terms.avatar != null and terms.avatar !=''">
                    and avatar = #{terms.avatar}
                </if>
                <if test="terms.job != null and terms.job !=''">
                    and job = #{terms.job}
                </if>
                <if test="terms.jobName != null and terms.jobName !=''">
                    and job_name = #{terms.jobName}
                </if>
                <if test="terms.birthday != null and terms.birthday !=''">
                    and birthday = #{terms.birthday}
                </if>
                <if test="terms.age != null and terms.age !=''">
                    and age = #{terms.age}
                </if>
                <if test="terms.agentStatus != null and terms.agentStatus !=''">
                    and agent_status = #{terms.agentStatus}
                </if>
                <if test="terms.custId != null and terms.custId !=''">
                    and cust_id = #{terms.custId}
                </if>
                <if test="terms.deleteStatus = null and terms.deleteStatus =''">
                    and delete_status = 0
                </if>
                <if test="terms.deleteStatus != null and terms.deleteStatus !=''">
                    and delete_status = #{terms.deleteStatus}
                </if>
                <if test="terms.createTime != null and terms.createTime !=''">
                    and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime}
                </if>
                <if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''">
                    and (DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart}
                        and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.createEnd})
                </if>
                <if test="terms.updateTime != null and terms.updateTime !=''">
                    and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime}
                </if>
                <if test="terms.updateStart != null and terms.updateStart !='' and terms.updateEnd != null and terms.updateEnd !=''">
                    and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart}
                        and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd})
                </if>
                <if test="terms.companyId != null and terms.companyId !=''">
                    and company_id = #{terms.companyId}
                </if>
                <if test="terms.workUnitId != null and terms.workUnitId !=''">
                    and work_unit_id = #{terms.workUnitId}
                </if>
            </where>
        </if>
    </sql>
    <!-- 更新对象 -->
    <update id="updateCasebookPerson">
        update
        <include refid="table-name"/>
        <set>
            <include refid="set-part"/>
        </set>
        <where>
            id = #{entity.id}
        </where>
    </update>
    <!-- 条件更新对象 -->
    <update id="updateCasebookPersonTerms">
        update
        <include refid="table-name"/>
        <set>
            <include refid="set-part"/>
        </set>
        <include refid="where-part"/>
    </update>
    <!--  根据编号物理删除  -->
    <delete id="deleteCasebookPerson">
        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>
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/domain/bo/CasebookAgentBO.java
New file
@@ -0,0 +1,17 @@
package cn.huge.module.casebook.domain.bo;
import cn.huge.module.casebook.domain.po.CasebookAgent;
/**
 * @title: dyh_casebook_agent业务扩展类
 * @description: dyh_casebook_agent业务扩展类
 * @company: hugeinfo
 * @author: liyj
 * @time: 2024-10-26 12:31:21
 * @version: 1.0.0
 * @see cn.huge.module.casebook.domain.po.CasebookAgent
 */
public class CasebookAgentBO extends CasebookAgent {
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/domain/bo/CasebookAssistInfoBO.java
New file
@@ -0,0 +1,17 @@
package cn.huge.module.casebook.domain.bo;
import cn.huge.module.casebook.domain.po.CasebookAssistInfo;
/**
 * @title: dyh_casebook_assist_info业务扩展类
 * @description: dyh_casebook_assist_info业务扩展类
 * @company: hugeinfo
 * @author: liyj
 * @time: 2024-10-26 12:31:22
 * @version: 1.0.0
 * @see cn.huge.module.casebook.domain.po.CasebookAssistInfo
 */
public class CasebookAssistInfoBO extends CasebookAssistInfo {
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/domain/bo/CasebookFileBO.java
New file
@@ -0,0 +1,17 @@
package cn.huge.module.casebook.domain.bo;
import cn.huge.module.casebook.domain.po.CasebookFile;
/**
 * @title: 一本账导入文件记录表业务扩展类
 * @description: 一本账导入文件记录表业务扩展类
 * @company: hugeinfo
 * @author: liyj
 * @time: 2024-10-27 16:16:40
 * @version: 1.0.0
 * @see cn.huge.module.casebook.domain.po.CasebookFile
 */
public class CasebookFileBO extends CasebookFile {
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/domain/bo/CasebookInfoBO.java
New file
@@ -0,0 +1,17 @@
package cn.huge.module.casebook.domain.bo;
import cn.huge.module.casebook.domain.po.CasebookInfo;
/**
 * @title: dyh_casebook_info业务扩展类
 * @description: dyh_casebook_info业务扩展类
 * @company: hugeinfo
 * @author: liyj
 * @time: 2024-10-26 12:31:22
 * @version: 1.0.0
 * @see cn.huge.module.casebook.domain.po.CasebookInfo
 */
public class CasebookInfoBO extends CasebookInfo {
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/domain/bo/CasebookInfoUnfoldBO.java
New file
@@ -0,0 +1,17 @@
package cn.huge.module.casebook.domain.bo;
import cn.huge.module.casebook.domain.po.CasebookInfoUnfold;
/**
 * @title: dyh_casebook_info_unfold业务扩展类
 * @description: dyh_casebook_info_unfold业务扩展类
 * @company: hugeinfo
 * @author: liyj
 * @time: 2024-10-26 12:31:22
 * @version: 1.0.0
 * @see cn.huge.module.casebook.domain.po.CasebookInfoUnfold
 */
public class CasebookInfoUnfoldBO extends CasebookInfoUnfold {
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/domain/bo/CasebookPersonBO.java
New file
@@ -0,0 +1,17 @@
package cn.huge.module.casebook.domain.bo;
import cn.huge.module.casebook.domain.po.CasebookPerson;
/**
 * @title: dyh_casebook_person业务扩展类
 * @description: dyh_casebook_person业务扩展类
 * @company: hugeinfo
 * @author: liyj
 * @time: 2024-10-26 12:31:22
 * @version: 1.0.0
 * @see cn.huge.module.casebook.domain.po.CasebookPerson
 */
public class CasebookPersonBO extends CasebookPerson {
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/domain/dto/CaseBookPageDTO.java
New file
@@ -0,0 +1,81 @@
package cn.huge.module.casebook.domain.dto;
import cn.huge.module.cases.domain.po.CaseInfo;
import lombok.Data;
import java.util.Date;
/**
 * @title: 受理任务传输对象
 * @description: 受理任务传输对象
 * @company: hugeinfo
 * @author: liyj
 * @time: 2022-03-11 11:43:25
 * @version: 1.0.0
 * @see CaseInfo
 */
@Data
public class CaseBookPageDTO {
    /**
     * 案件编号
     */
    private String id;
    /**
     * 纠纷发生时间
     */
    private Date occurTime;
    /**
     * 纠纷发生地
     */
    private String addr;
    /**
     * 申请方
     */
    private String plaintiffs;
    /**
     * 被申请方
     */
    private String defendants;
    /**
     * 纠纷类型
     */
    private String caseType;
    /**
     * 调解员
     */
    private String mediator;
    /**
     * 调解组织
     */
    private String mediateUnitName;
    /**
     * 调解员
     */
    private String assistUserName;
    /**
     * 化解结果编码
     */
    private String mediResult;
    /**
     * 化解结果名称
     */
    private String mediResultName;
    /**
     * 转入时间
     */
    private Date createTime;
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/domain/po/CasebookAgent.java
New file
@@ -0,0 +1,354 @@
package cn.huge.module.casebook.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: dyh_casebook_agent数据库对应关系类
 * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。
 * @company:hugeinfo
 * @author: liyj
 * @time: 2024-10-26 12:31:21
 * @version 1.0.0
 */
@TableName(value = "dyh_casebook_agent")
@Data
public class CasebookAgent {
    /**
    * id
    */
    @TableId(value = "id")
    private String id;
    /**
    * case_id
    */
    @TableField(value = "case_id")
    private String caseId;
    /**
    * party_user_id
    */
    @TableField(value = "party_user_id")
    private String partyUserId;
    /**
    * per_type
    */
    @TableField(value = "per_type")
    private String perType;
    /**
    * per_type_name
    */
    @TableField(value = "per_type_name")
    private String perTypeName;
    /**
    * per_class
    */
    @TableField(value = "per_class")
    private String perClass;
    /**
    * per_class_name
    */
    @TableField(value = "per_class_name")
    private String perClassName;
    /**
    * true_name
    */
    @TableField(value = "true_name")
    private String trueName;
    /**
    * mobile
    */
    @TableField(value = "mobile")
    private String mobile;
    /**
    * certi_type
    */
    @TableField(value = "certi_type")
    private String certiType;
    /**
    * certi_type_name
    */
    @TableField(value = "certi_type_name")
    private String certiTypeName;
    /**
    * certi_no
    */
    @TableField(value = "certi_no")
    private String certiNo;
    /**
    * prov
    */
    @TableField(value = "prov")
    private String prov;
    /**
    * prov_name
    */
    @TableField(value = "prov_name")
    private String provName;
    /**
    * city
    */
    @TableField(value = "city")
    private String city;
    /**
    * city_name
    */
    @TableField(value = "city_name")
    private String cityName;
    /**
    * area
    */
    @TableField(value = "area")
    private String area;
    /**
    * area_name
    */
    @TableField(value = "area_name")
    private String areaName;
    /**
    * road
    */
    @TableField(value = "road")
    private String road;
    /**
    * road_name
    */
    @TableField(value = "road_name")
    private String roadName;
    /**
    * village
    */
    @TableField(value = "village")
    private String village;
    /**
    * village_name
    */
    @TableField(value = "village_name")
    private String villageName;
    /**
    * addr
    */
    @TableField(value = "addr")
    private String addr;
    /**
    * place_prov
    */
    @TableField(value = "place_prov")
    private String placeProv;
    /**
    * place_prov_name
    */
    @TableField(value = "place_prov_name")
    private String placeProvName;
    /**
    * place_city
    */
    @TableField(value = "place_city")
    private String placeCity;
    /**
    * place_city_name
    */
    @TableField(value = "place_city_name")
    private String placeCityName;
    /**
    * place_area
    */
    @TableField(value = "place_area")
    private String placeArea;
    /**
    * place_area_name
    */
    @TableField(value = "place_area_name")
    private String placeAreaName;
    /**
    * place_road
    */
    @TableField(value = "place_road")
    private String placeRoad;
    /**
    * place_road_name
    */
    @TableField(value = "place_road_name")
    private String placeRoadName;
    /**
    * place_village
    */
    @TableField(value = "place_village")
    private String placeVillage;
    /**
    * place_village_name
    */
    @TableField(value = "place_village_name")
    private String placeVillageName;
    /**
    * place_addr
    */
    @TableField(value = "place_addr")
    private String placeAddr;
    /**
    * work_unit
    */
    @TableField(value = "work_unit")
    private String workUnit;
    /**
    * nation
    */
    @TableField(value = "nation")
    private String nation;
    /**
    * nation_name
    */
    @TableField(value = "nation_name")
    private String nationName;
    /**
    * sex
    */
    @TableField(value = "sex")
    private String sex;
    /**
    * sex_name
    */
    @TableField(value = "sex_name")
    private String sexName;
    /**
    * extreme
    */
    @TableField(value = "extreme")
    private Integer extreme;
    /**
    * agent_relate
    */
    @TableField(value = "agent_relate")
    private String agentRelate;
    /**
    * agent_relate_name
    */
    @TableField(value = "agent_relate_name")
    private String agentRelateName;
    /**
    * agent_type
    */
    @TableField(value = "agent_type")
    private String agentType;
    /**
    * agent_type_name
    */
    @TableField(value = "agent_type_name")
    private String agentTypeName;
    /**
    * person_id
    */
    @TableField(value = "person_id")
    private String personId;
    /**
    * avatar
    */
    @TableField(value = "avatar")
    private String avatar;
    /**
    * job
    */
    @TableField(value = "job")
    private String job;
    /**
    * job_name
    */
    @TableField(value = "job_name")
    private String jobName;
    /**
    * birthday
    */
    @TableField(value = "birthday")
    private String birthday;
    /**
    * age
    */
    @TableField(value = "age")
    private Integer age;
    /**
    * agent_status
    */
    @TableField(value = "agent_status")
    private Integer agentStatus;
    /**
    * cust_id
    */
    @TableField(value = "cust_id")
    private String custId;
    /**
    * delete_status
    */
    @TableLogic
    @TableField(value = "delete_status")
    private Integer deleteStatus;
    /**
    * create_time
    */
    @TableField(value = "create_time")
    private Date createTime;
    /**
    * update_time
    */
    @TableField(value = "update_time")
    private Date updateTime;
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/domain/po/CasebookAssistInfo.java
New file
@@ -0,0 +1,107 @@
package cn.huge.module.casebook.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: dyh_casebook_assist_info数据库对应关系类
 * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。
 * @company:hugeinfo
 * @author: liyj
 * @time: 2024-10-26 12:31:22
 * @version 1.0.0
 */
@TableName(value = "dyh_casebook_assist_info")
@Data
public class CasebookAssistInfo {
    /**
    * id
    */
    @TableId(value = "id")
    private String id;
    /**
    * case_id
    */
    @TableField(value = "case_id")
    private String caseId;
    /**
    * process_instance_id
    */
    @TableField(value = "process_instance_id")
    private String processInstanceId;
    /**
    * case_task_id
    */
    @TableField(value = "case_task_id")
    private String caseTaskId;
    /**
    * apply_id
    */
    @TableField(value = "apply_id")
    private String applyId;
    /**
    * assist_unit_id
    */
    @TableField(value = "assist_unit_id")
    private String assistUnitId;
    /**
    * assist_unit_name
    */
    @TableField(value = "assist_unit_name")
    private String assistUnitName;
    /**
    * accept_time
    */
    @TableField(value = "accept_time")
    private Date acceptTime;
    /**
    * assist_user_id
    */
    @TableField(value = "assist_user_id")
    private String assistUserId;
    /**
    * assist_user_name
    */
    @TableField(value = "assist_user_name")
    private String assistUserName;
    /**
    * assist_status
    */
    @TableField(value = "assist_status")
    private Integer assistStatus;
    /**
    * cust_id
    */
    @TableField(value = "cust_id")
    private String custId;
    /**
    * create_time
    */
    @TableField(value = "create_time")
    private Date createTime;
    /**
    * update_time
    */
    @TableField(value = "update_time")
    private Date updateTime;
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/domain/po/CasebookFile.java
New file
@@ -0,0 +1,71 @@
package cn.huge.module.casebook.domain.po;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
/**
 * @title: 一本账导入文件记录表数据库对应关系类
 * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。
 * @company:hugeinfo
 * @author: liyj
 * @time: 2024-10-27 16:16:40
 * @version 1.0.0
 */
@TableName(value = "dyh_casebook_file")
@Data
public class CasebookFile {
    /**
    * 记录编号
    */
    @TableId(value = "id")
    private String id;
    /**
    * 导入文件名
    */
    @TableField(value = "file_name")
    private String fileName;
    /**
    * 导入文件大小
    */
    @TableField(value = "file_size")
    private String fileSize;
    /**
    * 导入人编号
    */
    @TableField(value = "user_id")
    private String userId;
    /**
    * 导入人名称
    */
    @TableField(value = "user_name")
    private String userName;
    /**
    * 导入时间
    */
    @TableField(value = "create_time")
    private Date createTime;
    /**
    * 更新时间
    */
    @TableField(value = "update_time")
    private Date updateTime;
    /**
    * 顾客编号
    */
    @TableField(value = "cust_id")
    private String custId;
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/domain/po/CasebookInfo.java
New file
@@ -0,0 +1,450 @@
package cn.huge.module.casebook.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: dyh_casebook_info数据库对应关系类
 * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。
 * @company:hugeinfo
 * @author: liyj
 * @time: 2024-10-26 12:31:22
 * @version 1.0.0
 */
@TableName(value = "dyh_casebook_info")
@Data
public class CasebookInfo {
    /**
    * id
    */
    @TableId(value = "id")
    private String id;
    /**
    * case_title
    */
    @TableField(value = "case_title")
    private String caseTitle;
    /**
    * case_ref
    */
    @TableField(value = "case_ref")
    private String caseRef;
    /**
    * case_level
    */
    @TableField(value = "case_level")
    private Integer caseLevel;
    /**
    * visit_time
    */
    @TableField(value = "visit_time")
    private Date visitTime;
    /**
    * visit_people_num
    */
    @TableField(value = "visit_people_num")
    private Integer visitPeopleNum;
    /**
    * medi_type
    */
    @TableField(value = "medi_type")
    private String mediType;
    /**
    * medi_type_name
    */
    @TableField(value = "medi_type_name")
    private String mediTypeName;
    /**
    * case_type_first
    */
    @TableField(value = "case_type_first")
    private String caseTypeFirst;
    /**
    * case_type_first_name
    */
    @TableField(value = "case_type_first_name")
    private String caseTypeFirstName;
    /**
    * case_type
    */
    @TableField(value = "case_type")
    private String caseType;
    /**
    * case_type_name
    */
    @TableField(value = "case_type_name")
    private String caseTypeName;
    /**
    * occur_time
    */
    @TableField(value = "occur_time")
    private Date occurTime;
    /**
    * addr
    */
    @TableField(value = "addr")
    private String addr;
    /**
    * lng
    */
    @TableField(value = "lng")
    private String lng;
    /**
    * lat
    */
    @TableField(value = "lat")
    private String lat;
    /**
    * wg_addr
    */
    @TableField(value = "wg_addr")
    private String wgAddr;
    /**
    * wg_lng
    */
    @TableField(value = "wg_lng")
    private String wgLng;
    /**
    * wg_lat
    */
    @TableField(value = "wg_lat")
    private String wgLat;
    /**
    * que_prov
    */
    @TableField(value = "que_prov")
    private String queProv;
    /**
    * que_prov_name
    */
    @TableField(value = "que_prov_name")
    private String queProvName;
    /**
    * que_city
    */
    @TableField(value = "que_city")
    private String queCity;
    /**
    * que_city_name
    */
    @TableField(value = "que_city_name")
    private String queCityName;
    /**
    * que_area
    */
    @TableField(value = "que_area")
    private String queArea;
    /**
    * que_area_name
    */
    @TableField(value = "que_area_name")
    private String queAreaName;
    /**
    * que_road
    */
    @TableField(value = "que_road")
    private String queRoad;
    /**
    * que_road_name
    */
    @TableField(value = "que_road_name")
    private String queRoadName;
    /**
    * que_village
    */
    @TableField(value = "que_village")
    private String queVillage;
    /**
    * que_village_name
    */
    @TableField(value = "que_village_name")
    private String queVillageName;
    /**
    * people_num
    */
    @TableField(value = "people_num")
    private Integer peopleNum;
    /**
    * amount
    */
    @TableField(value = "amount")
    private Double amount;
    /**
    * crowd
    */
    @TableField(value = "crowd")
    private String crowd;
    /**
    * crowd_name
    */
    @TableField(value = "crowd_name")
    private String crowdName;
    /**
    * canal
    */
    @TableField(value = "canal")
    private String canal;
    /**
    * canal_name
    */
    @TableField(value = "canal_name")
    private String canalName;
    /**
    * visit_way
    */
    @TableField(value = "visit_way")
    private String visitWay;
    /**
    * visit_way_name
    */
    @TableField(value = "visit_way_name")
    private String visitWayName;
    /**
    * zxsl_status
    */
    @TableField(value = "zxsl_status")
    private Integer zxslStatus;
    /**
    * case_des
    */
    @TableField(value = "case_des")
    private String caseDes;
    /**
    * case_claim
    */
    @TableField(value = "case_claim")
    private String caseClaim;
    /**
    * major_status
    */
    @TableField(value = "major_status")
    private Integer majorStatus;
    /**
    * source
    */
    @TableField(value = "source")
    private String source;
    /**
    * source_name
    */
    @TableField(value = "source_name")
    private String sourceName;
    /**
    * case_no
    */
    @TableField(value = "case_no")
    private String caseNo;
    /**
    * mediate_no
    */
    @TableField(value = "mediate_no")
    private String mediateNo;
    /**
    * mediate_book_no
    */
    @TableField(value = "mediate_book_no")
    private String mediateBookNo;
    /**
    * civil_no
    */
    @TableField(value = "civil_no")
    private String civilNo;
    /**
    * plaintiffs
    */
    @TableField(value = "plaintiffs")
    private String plaintiffs;
    /**
    * pagents
    */
    @TableField(value = "pagents")
    private String pagents;
    /**
    * defendants
    */
    @TableField(value = "defendants")
    private String defendants;
    /**
    * dagents
    */
    @TableField(value = "dagents")
    private String dagents;
    /**
    * party_show
    */
    @TableField(value = "party_show")
    private Integer partyShow;
    /**
    * want_unit_id
    */
    @TableField(value = "want_unit_id")
    private String wantUnitId;
    /**
    * want_unit_name
    */
    @TableField(value = "want_unit_name")
    private String wantUnitName;
    /**
    * want_user_id
    */
    @TableField(value = "want_user_id")
    private String wantUserId;
    /**
    * want_user_name
    */
    @TableField(value = "want_user_name")
    private String wantUserName;
    /**
    * input_unit_id
    */
    @TableField(value = "input_unit_id")
    private String inputUnitId;
    /**
    * input_unit_name
    */
    @TableField(value = "input_unit_name")
    private String inputUnitName;
    /**
    * input_user_id
    */
    @TableField(value = "input_user_id")
    private String inputUserId;
    /**
    * input_user_name
    */
    @TableField(value = "input_user_name")
    private String inputUserName;
    /**
    * input_way
    */
    @TableField(value = "input_way")
    private Integer inputWay;
    /**
    * status
    */
    @TableField(value = "status")
    private Integer status;
    /**
    * status_name
    */
    @TableField(value = "status_name")
    private String statusName;
    /**
    * process
    */
    @TableField(value = "process")
    private Integer process;
    /**
    * process_name
    */
    @TableField(value = "process_name")
    private String processName;
    /**
    * info_process
    */
    @TableField(value = "info_process")
    private Integer infoProcess;
    /**
    * info_process_name
    */
    @TableField(value = "info_process_name")
    private String infoProcessName;
    /**
    * delete_status
    */
    @TableLogic
    @TableField(value = "delete_status")
    private Integer deleteStatus;
    /**
    * cust_id
    */
    @TableField(value = "cust_id")
    private String custId;
    /**
    * create_time
    */
    @TableField(value = "create_time")
    private Date createTime;
    /**
    * update_time
    */
    @TableField(value = "update_time")
    private Date updateTime;
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/domain/po/CasebookInfoUnfold.java
New file
@@ -0,0 +1,317 @@
package cn.huge.module.casebook.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: dyh_casebook_info_unfold数据库对应关系类
 * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。
 * @company:hugeinfo
 * @author: liyj
 * @time: 2024-10-26 12:31:22
 * @version 1.0.0
 */
@TableName(value = "dyh_casebook_info_unfold")
@Data
public class CasebookInfoUnfold {
    /**
    * id
    */
    @TableId(value = "id")
    private String id;
    /**
    * accept_time
    */
    @TableField(value = "accept_time")
    private Date acceptTime;
    /**
    * mediate_unit_id
    */
    @TableField(value = "mediate_unit_id")
    private String mediateUnitId;
    /**
    * mediate_unit_name
    */
    @TableField(value = "mediate_unit_name")
    private String mediateUnitName;
    /**
    * mediate_dept_id
    */
    @TableField(value = "mediate_dept_id")
    private String mediateDeptId;
    /**
    * mediate_dept_name
    */
    @TableField(value = "mediate_dept_name")
    private String mediateDeptName;
    /**
    * mediator_id
    */
    @TableField(value = "mediator_id")
    private String mediatorId;
    /**
    * mediator
    */
    @TableField(value = "mediator")
    private String mediator;
    /**
    * mediator_mobile
    */
    @TableField(value = "mediator_mobile")
    private String mediatorMobile;
    /**
    * assist_unit_id
    */
    @TableField(value = "assist_unit_id")
    private String assistUnitId;
    /**
    * assist_unit_name
    */
    @TableField(value = "assist_unit_name")
    private String assistUnitName;
    /**
    * medi_start_time
    */
    @TableField(value = "medi_start_time")
    private Date mediStartTime;
    /**
    * medi_end_time
    */
    @TableField(value = "medi_end_time")
    private Date mediEndTime;
    /**
    * medi_result
    */
    @TableField(value = "medi_result")
    private String mediResult;
    /**
    * medi_result_name
    */
    @TableField(value = "medi_result_name")
    private String mediResultName;
    /**
    * agree_type
    */
    @TableField(value = "agree_type")
    private String agreeType;
    /**
    * agree_type_name
    */
    @TableField(value = "agree_type_name")
    private String agreeTypeName;
    /**
    * agree_content
    */
    @TableField(value = "agree_content")
    private String agreeContent;
    /**
    * windup_content
    */
    @TableField(value = "windup_content")
    private String windupContent;
    /**
    * medi_false
    */
    @TableField(value = "medi_false")
    private String mediFalse;
    /**
    * medi_false_name
    */
    @TableField(value = "medi_false_name")
    private String mediFalseName;
    /**
    * civil_status
    */
    @TableField(value = "civil_status")
    private Integer civilStatus;
    /**
    * court_id
    */
    @TableField(value = "court_id")
    private String courtId;
    /**
    * court_name
    */
    @TableField(value = "court_name")
    private String courtName;
    /**
    * close_time
    */
    @TableField(value = "close_time")
    private Date closeTime;
    /**
    * judic_apply
    */
    @TableField(value = "judic_apply")
    private Integer judicApply;
    /**
    * judic_result
    */
    @TableField(value = "judic_result")
    private String judicResult;
    /**
    * judic_result_name
    */
    @TableField(value = "judic_result_name")
    private String judicResultName;
    /**
    * file_status
    */
    @TableField(value = "file_status")
    private Integer fileStatus;
    /**
    * file_user_id
    */
    @TableField(value = "file_user_id")
    private String fileUserId;
    /**
    * file_user_name
    */
    @TableField(value = "file_user_name")
    private String fileUserName;
    /**
    * file_time
    */
    @TableField(value = "file_time")
    private Date fileTime;
    /**
    * file_year
    */
    @TableField(value = "file_year")
    private String fileYear;
    /**
    * file_book_name
    */
    @TableField(value = "file_book_name")
    private String fileBookName;
    /**
    * file_book_no
    */
    @TableField(value = "file_book_no")
    private String fileBookNo;
    /**
    * file_no
    */
    @TableField(value = "file_no")
    private String fileNo;
    /**
    * file_limit_year
    */
    @TableField(value = "file_limit_year")
    private Integer fileLimitYear;
    /**
    * file_addr
    */
    @TableField(value = "file_addr")
    private String fileAddr;
    /**
    * file_content
    */
    @TableField(value = "file_content")
    private String fileContent;
    /**
    * fulfil_situ
    */
    @TableField(value = "fulfil_situ")
    private String fulfilSitu;
    /**
    * fulfil_situ_name
    */
    @TableField(value = "fulfil_situ_name")
    private String fulfilSituName;
    /**
    * visit_up_status
    */
    @TableField(value = "visit_up_status")
    private Integer visitUpStatus;
    /**
    * visit_up_content
    */
    @TableField(value = "visit_up_content")
    private String visitUpContent;
    /**
    * party_joy
    */
    @TableField(value = "party_joy")
    private Integer partyJoy;
    /**
    * cust_id
    */
    @TableField(value = "cust_id")
    private String custId;
    /**
    * create_time
    */
    @TableField(value = "create_time")
    private Date createTime;
    /**
    * update_time
    */
    @TableField(value = "update_time")
    private Date updateTime;
    /**
    * belong_unit_id
    */
    @TableField(value = "belong_unit_id")
    private String belongUnitId;
    /**
    * belong_unit_name
    */
    @TableField(value = "belong_unit_name")
    private String belongUnitName;
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/domain/po/CasebookPerson.java
New file
@@ -0,0 +1,360 @@
package cn.huge.module.casebook.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: dyh_casebook_person数据库对应关系类
 * @description: PO中的属性与数据表是一一对应关系,如需根据业务处理不同,请使用BO对象。
 * @company:hugeinfo
 * @author: liyj
 * @time: 2024-10-26 12:31:22
 * @version 1.0.0
 */
@TableName(value = "dyh_casebook_person")
@Data
public class CasebookPerson {
    /**
    * id
    */
    @TableId(value = "id")
    private String id;
    /**
    * case_id
    */
    @TableField(value = "case_id")
    private String caseId;
    /**
    * party_user_id
    */
    @TableField(value = "party_user_id")
    private String partyUserId;
    /**
    * per_type
    */
    @TableField(value = "per_type")
    private String perType;
    /**
    * per_type_name
    */
    @TableField(value = "per_type_name")
    private String perTypeName;
    /**
    * per_class
    */
    @TableField(value = "per_class")
    private String perClass;
    /**
    * per_class_name
    */
    @TableField(value = "per_class_name")
    private String perClassName;
    /**
    * true_name
    */
    @TableField(value = "true_name")
    private String trueName;
    /**
    * mobile
    */
    @TableField(value = "mobile")
    private String mobile;
    /**
    * orga_code
    */
    @TableField(value = "orga_code")
    private String orgaCode;
    /**
    * deputy
    */
    @TableField(value = "deputy")
    private String deputy;
    /**
    * orga_type
    */
    @TableField(value = "orga_type")
    private String orgaType;
    /**
    * orga_type_name
    */
    @TableField(value = "orga_type_name")
    private String orgaTypeName;
    /**
    * certi_type
    */
    @TableField(value = "certi_type")
    private String certiType;
    /**
    * certi_type_name
    */
    @TableField(value = "certi_type_name")
    private String certiTypeName;
    /**
    * certi_no
    */
    @TableField(value = "certi_no")
    private String certiNo;
    /**
    * prov
    */
    @TableField(value = "prov")
    private String prov;
    /**
    * prov_name
    */
    @TableField(value = "prov_name")
    private String provName;
    /**
    * city
    */
    @TableField(value = "city")
    private String city;
    /**
    * city_name
    */
    @TableField(value = "city_name")
    private String cityName;
    /**
    * area
    */
    @TableField(value = "area")
    private String area;
    /**
    * area_name
    */
    @TableField(value = "area_name")
    private String areaName;
    /**
    * road
    */
    @TableField(value = "road")
    private String road;
    /**
    * road_name
    */
    @TableField(value = "road_name")
    private String roadName;
    /**
    * village
    */
    @TableField(value = "village")
    private String village;
    /**
    * village_name
    */
    @TableField(value = "village_name")
    private String villageName;
    /**
    * addr
    */
    @TableField(value = "addr")
    private String addr;
    /**
    * place_prov
    */
    @TableField(value = "place_prov")
    private String placeProv;
    /**
    * place_prov_name
    */
    @TableField(value = "place_prov_name")
    private String placeProvName;
    /**
    * place_city
    */
    @TableField(value = "place_city")
    private String placeCity;
    /**
    * place_city_name
    */
    @TableField(value = "place_city_name")
    private String placeCityName;
    /**
    * place_area
    */
    @TableField(value = "place_area")
    private String placeArea;
    /**
    * place_area_name
    */
    @TableField(value = "place_area_name")
    private String placeAreaName;
    /**
    * place_road
    */
    @TableField(value = "place_road")
    private String placeRoad;
    /**
    * place_road_name
    */
    @TableField(value = "place_road_name")
    private String placeRoadName;
    /**
    * place_village
    */
    @TableField(value = "place_village")
    private String placeVillage;
    /**
    * place_village_name
    */
    @TableField(value = "place_village_name")
    private String placeVillageName;
    /**
    * place_addr
    */
    @TableField(value = "place_addr")
    private String placeAddr;
    /**
    * work_unit
    */
    @TableField(value = "work_unit")
    private String workUnit;
    /**
    * nation
    */
    @TableField(value = "nation")
    private String nation;
    /**
    * nation_name
    */
    @TableField(value = "nation_name")
    private String nationName;
    /**
    * sex
    */
    @TableField(value = "sex")
    private String sex;
    /**
    * sex_name
    */
    @TableField(value = "sex_name")
    private String sexName;
    /**
    * extreme
    */
    @TableField(value = "extreme")
    private Integer extreme;
    /**
    * avatar
    */
    @TableField(value = "avatar")
    private String avatar;
    /**
    * job
    */
    @TableField(value = "job")
    private String job;
    /**
    * job_name
    */
    @TableField(value = "job_name")
    private String jobName;
    /**
    * birthday
    */
    @TableField(value = "birthday")
    private String birthday;
    /**
    * age
    */
    @TableField(value = "age")
    private Integer age;
    /**
    * agent_status
    */
    @TableField(value = "agent_status")
    private Integer agentStatus;
    /**
    * cust_id
    */
    @TableField(value = "cust_id")
    private String custId;
    /**
    * delete_status
    */
    @TableLogic
    @TableField(value = "delete_status")
    private Integer deleteStatus;
    /**
    * create_time
    */
    @TableField(value = "create_time")
    private Date createTime;
    /**
    * update_time
    */
    @TableField(value = "update_time")
    private Date updateTime;
    /**
    * company_id
    */
    @TableField(value = "company_id")
    private String companyId;
    /**
    * work_unit_id
    */
    @TableField(value = "work_unit_id")
    private String workUnitId;
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/service/CasebookAgentService.java
New file
@@ -0,0 +1,133 @@
package cn.huge.module.casebook.service;
import cn.huge.base.common.exception.ServiceException;
import cn.huge.base.common.utils.DateUtils;
import cn.huge.base.common.utils.IdUtils;
import cn.huge.module.client.api.impl.UtilsClientImpl;
import cn.huge.module.casebook.dao.mapper.CasebookAgentMapper;
import cn.huge.module.casebook.domain.po.CasebookAgent;
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: dyh_casebook_agent业务逻辑处理
 * @Description dyh_casebook_agent业务逻辑处理
 * @company hugeinfo
 * @author liyj
 * @Time 2024-10-26 12:31:21
 * @version 1.0.0
 */
@Slf4j
@Service
@Transactional(rollbackFor = Exception.class)
public class CasebookAgentService extends ServiceImpl<CasebookAgentMapper, CasebookAgent>{
    @Autowired
    private CasebookAgentMapper mapper;
    @Autowired
    private UtilsClientImpl utilsClient;
    /**
    * 更新对象
    * @param entity 对象
    */
    public void updateCasebookAgent(CasebookAgent entity){
        try{
            mapper.updateCasebookAgent(entity);
        }catch (Exception e){
            log.error("[CasebookAgentService.updateCasebookAgent]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookAgentService.updateCasebookAgent", e);
        }
    }
    /**
    * 条件更新对象
    * @param entity 对象
    * @param terms 条件
    */
    public void updateCasebookAgentTerms(CasebookAgent entity, Map<String, Object> terms){
        try{
            mapper.updateCasebookAgentTerms(entity, terms);
        }catch (Exception e){
            log.error("[CasebookAgentService.updateCasebookAgentTerms]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookAgentService.updateCasebookAgentTerms", e);
        }
    }
    /**
    * 根据编号物理删除
    * @param id 查询条件集合
    */
    public void deleteCasebookAgent(String id){
        try{
            mapper.deleteCasebookAgent(id);
        }catch (Exception e){
            log.error("[CasebookAgentService.deleteCasebookAgent]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookAgentService.deleteCasebookAgent", e);
        }
    }
    /**
    * 按条件查询
    * @param terms 条件
    * @return List
    */
    public List<CasebookAgent> 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<CasebookAgent> pageQuery(PageRequest page, Map<String, Object> terms){
        long total = mapper.countTerms(terms);
        List<CasebookAgent> content = mapper.pageTerms(page, terms);
        return new PageImpl<CasebookAgent>(content, page, total);
    }
    /**
    * 新增或更新对象
    * @param casebookAgent 实体对象
    */
    public void saveCasebookAgent(CasebookAgent casebookAgent){
        try{
            Date nowDate = DateUtils.getNowDate();
            // 判断是否新增
            if (IdUtils.checkNewId(casebookAgent.getId())){
                casebookAgent.setId(utilsClient.getNewTimeId());
                casebookAgent.setCreateTime(nowDate);
            }
            casebookAgent.setUpdateTime(nowDate);
            this.saveOrUpdate(casebookAgent);
        }catch (Exception e){
            log.error("[CasebookAgentService.saveCasebookAgent]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookAgentService.saveCasebookAgent", e);
        }
    }
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/service/CasebookAssistInfoService.java
New file
@@ -0,0 +1,133 @@
package cn.huge.module.casebook.service;
import cn.huge.base.common.exception.ServiceException;
import cn.huge.base.common.utils.DateUtils;
import cn.huge.base.common.utils.IdUtils;
import cn.huge.module.client.api.impl.UtilsClientImpl;
import cn.huge.module.casebook.dao.mapper.CasebookAssistInfoMapper;
import cn.huge.module.casebook.domain.po.CasebookAssistInfo;
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: dyh_casebook_assist_info业务逻辑处理
 * @Description dyh_casebook_assist_info业务逻辑处理
 * @company hugeinfo
 * @author liyj
 * @Time 2024-10-26 12:31:22
 * @version 1.0.0
 */
@Slf4j
@Service
@Transactional(rollbackFor = Exception.class)
public class CasebookAssistInfoService extends ServiceImpl<CasebookAssistInfoMapper, CasebookAssistInfo>{
    @Autowired
    private CasebookAssistInfoMapper mapper;
    @Autowired
    private UtilsClientImpl utilsClient;
    /**
    * 更新对象
    * @param entity 对象
    */
    public void updateCasebookAssistInfo(CasebookAssistInfo entity){
        try{
            mapper.updateCasebookAssistInfo(entity);
        }catch (Exception e){
            log.error("[CasebookAssistInfoService.updateCasebookAssistInfo]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookAssistInfoService.updateCasebookAssistInfo", e);
        }
    }
    /**
    * 条件更新对象
    * @param entity 对象
    * @param terms 条件
    */
    public void updateCasebookAssistInfoTerms(CasebookAssistInfo entity, Map<String, Object> terms){
        try{
            mapper.updateCasebookAssistInfoTerms(entity, terms);
        }catch (Exception e){
            log.error("[CasebookAssistInfoService.updateCasebookAssistInfoTerms]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookAssistInfoService.updateCasebookAssistInfoTerms", e);
        }
    }
    /**
    * 根据编号物理删除
    * @param id 查询条件集合
    */
    public void deleteCasebookAssistInfo(String id){
        try{
            mapper.deleteCasebookAssistInfo(id);
        }catch (Exception e){
            log.error("[CasebookAssistInfoService.deleteCasebookAssistInfo]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookAssistInfoService.deleteCasebookAssistInfo", e);
        }
    }
    /**
    * 按条件查询
    * @param terms 条件
    * @return List
    */
    public List<CasebookAssistInfo> 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<CasebookAssistInfo> pageQuery(PageRequest page, Map<String, Object> terms){
        long total = mapper.countTerms(terms);
        List<CasebookAssistInfo> content = mapper.pageTerms(page, terms);
        return new PageImpl<CasebookAssistInfo>(content, page, total);
    }
    /**
    * 新增或更新对象
    * @param casebookAssistInfo 实体对象
    */
    public void saveCasebookAssistInfo(CasebookAssistInfo casebookAssistInfo){
        try{
            Date nowDate = DateUtils.getNowDate();
            // 判断是否新增
            if (IdUtils.checkNewId(casebookAssistInfo.getId())){
                casebookAssistInfo.setId(utilsClient.getNewTimeId());
                casebookAssistInfo.setCreateTime(nowDate);
            }
            casebookAssistInfo.setUpdateTime(nowDate);
            this.saveOrUpdate(casebookAssistInfo);
        }catch (Exception e){
            log.error("[CasebookAssistInfoService.saveCasebookAssistInfo]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookAssistInfoService.saveCasebookAssistInfo", e);
        }
    }
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/service/CasebookFileService.java
New file
@@ -0,0 +1,133 @@
package cn.huge.module.casebook.service;
import cn.huge.base.common.exception.ServiceException;
import cn.huge.base.common.utils.DateUtils;
import cn.huge.base.common.utils.IdUtils;
import cn.huge.module.client.api.impl.UtilsClientImpl;
import cn.huge.module.casebook.dao.mapper.CasebookFileMapper;
import cn.huge.module.casebook.domain.po.CasebookFile;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.PostConstruct;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
 * @title: 一本账导入文件记录表业务逻辑处理
 * @Description 一本账导入文件记录表业务逻辑处理
 * @company hugeinfo
 * @author liyj
 * @Time 2024-10-27 16:16:40
 * @version 1.0.0
 */
@Slf4j
@Service
@Transactional(rollbackFor = Exception.class)
public class CasebookFileService extends ServiceImpl<CasebookFileMapper, CasebookFile>{
    @Autowired
    private CasebookFileMapper mapper;
    @Autowired
    private UtilsClientImpl utilsClient;
    /**
    * 更新对象
    * @param entity 对象
    */
    public void updateCasebookFile(CasebookFile entity){
        try{
            mapper.updateCasebookFile(entity);
        }catch (Exception e){
            log.error("[CasebookFileService.updateCasebookFile]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookFileService.updateCasebookFile", e);
        }
    }
    /**
    * 条件更新对象
    * @param entity 对象
    * @param terms 条件
    */
    public void updateCasebookFileTerms(CasebookFile entity, Map<String, Object> terms){
        try{
            mapper.updateCasebookFileTerms(entity, terms);
        }catch (Exception e){
            log.error("[CasebookFileService.updateCasebookFileTerms]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookFileService.updateCasebookFileTerms", e);
        }
    }
    /**
    * 根据编号物理删除
    * @param id 查询条件集合
    */
    public void deleteCasebookFile(String id){
        try{
            mapper.deleteCasebookFile(id);
        }catch (Exception e){
            log.error("[CasebookFileService.deleteCasebookFile]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookFileService.deleteCasebookFile", e);
        }
    }
    /**
    * 按条件查询
    * @param terms 条件
    * @return List
    */
    public List<CasebookFile> 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<CasebookFile> pageQuery(PageRequest page, Map<String, Object> terms){
        long total = mapper.countTerms(terms);
        List<CasebookFile> content = mapper.pageTerms(page, terms);
        return new PageImpl<CasebookFile>(content, page, total);
    }
    /**
    * 新增或更新对象
    * @param casebookFile 实体对象
    */
    public void saveCasebookFile(CasebookFile casebookFile){
        try{
            Date nowDate = DateUtils.getNowDate();
            // 判断是否新增
            if (IdUtils.checkNewId(casebookFile.getId())){
                casebookFile.setId(utilsClient.getNewTimeId());
                casebookFile.setCreateTime(nowDate);
            }
            casebookFile.setUpdateTime(nowDate);
            this.saveOrUpdate(casebookFile);
        }catch (Exception e){
            log.error("[CasebookFileService.saveCasebookFile]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookFileService.saveCasebookFile", e);
        }
    }
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/service/CasebookInfoService.java
New file
@@ -0,0 +1,303 @@
package cn.huge.module.casebook.service;
import cn.huge.base.common.constant.ReturnConsts;
import cn.huge.base.common.exception.ServiceException;
import cn.huge.base.common.utils.*;
import cn.huge.module.casebook.domain.dto.CaseBookPageDTO;
import cn.huge.module.casebook.domain.po.*;
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.casebook.dao.mapper.CasebookInfoMapper;
import cn.huge.module.cust.dto.CtUserDTO;
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.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.PageRequest;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest;
import java.text.SimpleDateFormat;
import java.util.*;
/**
 * @title: dyh_casebook_info业务逻辑处理
 * @Description dyh_casebook_info业务逻辑处理
 * @company hugeinfo
 * @author liyj
 * @Time 2024-10-26 12:31:22
 * @version 1.0.0
 */
@Slf4j
@Service
@Transactional(rollbackFor = Exception.class)
public class CasebookInfoService extends ServiceImpl<CasebookInfoMapper, CasebookInfo>{
    @Autowired
    private CasebookInfoMapper mapper;
    @Autowired
    private UtilsClientImpl utilsClient;
    @Autowired
    private CustClientImpl custClient;
    @Autowired
    private SysClientImpl sysClient;
    @Autowired
    private CasebookPersonService casebookPersonService;
    @Autowired
    private CasebookAgentService casebookAgentService;
    @Autowired
    private CasebookAssistInfoService casebookAssistInfoService;
    @Autowired
    private CasebookFileService casebookFileService;
    /**
    * 更新对象
    * @param entity 对象
    */
    public void updateCasebookInfo(CasebookInfo entity){
        try{
            mapper.updateCasebookInfo(entity);
        }catch (Exception e){
            log.error("[CasebookInfoService.updateCasebookInfo]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookInfoService.updateCasebookInfo", e);
        }
    }
    /**
    * 条件更新对象
    * @param entity 对象
    * @param terms 条件
    */
    public void updateCasebookInfoTerms(CasebookInfo entity, Map<String, Object> terms){
        try{
            mapper.updateCasebookInfoTerms(entity, terms);
        }catch (Exception e){
            log.error("[CasebookInfoService.updateCasebookInfoTerms]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookInfoService.updateCasebookInfoTerms", e);
        }
    }
    /**
    * 根据编号物理删除
    * @param id 查询条件集合
    */
    public void deleteCasebookInfo(String id){
        try{
            mapper.deleteCasebookInfo(id);
        }catch (Exception e){
            log.error("[CasebookInfoService.deleteCasebookInfo]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookInfoService.deleteCasebookInfo", e);
        }
    }
    /**
    * 按条件查询
    * @param terms 条件
    * @return List
    */
    public List<CasebookInfo> 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<CasebookInfo> pageQuery(PageRequest page, Map<String, Object> terms){
        long total = mapper.countTerms(terms);
        List<CasebookInfo> content = mapper.pageTerms(page, terms);
        return new PageImpl<CasebookInfo>(content, page, total);
    }
    /**
    * 新增或更新对象
    * @param casebookInfo 实体对象
    */
    public void saveCasebookInfo(CasebookInfo casebookInfo){
        try{
            Date nowDate = DateUtils.getNowDate();
            // 判断是否新增
            if (IdUtils.checkNewId(casebookInfo.getId())){
                casebookInfo.setId(utilsClient.getNewTimeId());
                casebookInfo.setCreateTime(nowDate);
            }
            casebookInfo.setUpdateTime(nowDate);
            this.saveOrUpdate(casebookInfo);
        }catch (Exception e){
            log.error("[CasebookInfoService.saveCasebookInfo]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookInfoService.saveCasebookInfo", e);
        }
    }
    /**
     * 条件分页查询-导入草稿
     * @param page 分页对象
     * @param terms 条件
     * @return Page
     */
    public Page<CaseBookPageDTO> pageImportDraft(PageRequest page, Map<String, Object> terms){
        long total = mapper.countImportDraft(terms);
        List<CaseBookPageDTO> content = mapper.pageImportDraft(page, terms);
        return new PageImpl<CaseBookPageDTO>(content, page, total);
    }
    /**
     * 条件分页查询-导入成功
     * @param page 分页对象
     * @param terms 条件
     * @return Page
     */
    public Page<CaseBookPageDTO> pageImportSuc(PageRequest page, Map<String, Object> terms){
        long total = mapper.countImportSuc(terms);
        List<CaseBookPageDTO> content = mapper.pageImportSuc(page, terms);
        return new PageImpl<CaseBookPageDTO>(content, page, total);
    }
    /**
     * 案件导入-导入操作-通过Excel导入
     * @param fileId
     * @param userId
     * @param request
     * @return
     */
    public Object inputCaseByExcel(String fileId, String userId, HttpServletRequest request){
        int row = 0;
        int cll = 0;
        int countFalse = 1;
        int countSuccess = 3;
        int all = 0;
        try{
            CtUserDTO loginUser = custClient.clientGetUser(userId);
            Date nowDate = DateUtils.getNowDate();
            SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd");
            SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy年MM月dd日");
            SimpleDateFormat sdf3 = new SimpleDateFormat("yyyy/MM/dd");
            SimpleDateFormat sdf5 = new SimpleDateFormat("yyyy.MM.dd");
            SimpleDateFormat sdf4 = new SimpleDateFormat("yyyy年");
            //当重复导入判断是否继续
            String adopt = request.getParameter("adopt");
            FileInfoBaseDTO fileInfo = sysClient.getFileInfoById(fileId);
            //判断是否近期内是否有重复导入
            if(StringUtils.isBlank(adopt) && ObjectUtils.isNotEmpty(fileInfo)){
                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                String dateStart = sdf.format(DateUtils.addDay(nowDate, -1));
                Map<String, Object> caseBookFileTerms = new HashMap<>();
                caseBookFileTerms.put("fileName", fileInfo.getTrueName());
                caseBookFileTerms.put("fileSize", fileInfo.getSize());
                caseBookFileTerms.put("userId", loginUser.getId());
                caseBookFileTerms.put("createTimeStart", dateStart);
                List<CasebookFile> caseBookFileList = casebookFileService.listTerms(caseBookFileTerms);
                if(CollectionUtils.isNotEmpty(caseBookFileList)){
                    return ReturnFailUtils.getAesInfo(ReturnConsts.ERROR_5, "", null);
                }
            }
            if (countFalse != all) {
                CasebookFile casebookFile = new CasebookFile();
                casebookFile.setFileName(fileInfo.getTrueName());
                casebookFile.setFileSize(String.valueOf(fileInfo.getSize()));
                casebookFile.setUserId(loginUser.getId());
                casebookFile.setUserName(loginUser.getTrueName());
                casebookFile.setCreateTime(nowDate);
                casebookFile.setUpdateTime(nowDate);
                casebookFile.setId(utilsClient.getNewTimeId());
                casebookFile.setCustId(loginUser.getCustId());
                casebookFileService.save(casebookFile);
            }
            List<String> reasonList = new ArrayList<>();
            String reason = "(1)序号14:纠纷受理时间数据格式错误";
            reasonList.add(reason);
            Map<String, Object> result = new HashMap<>();
            result.put("countSuccess", countSuccess);
            result.put("countFalse", countFalse);
            result.put("countFalseContent", reasonList);
            return ReturnSucUtils.getRepInfo(result);
        }catch (Exception e){
            log.error("[CasebookInfoService.inputCaseByExcel]调用失败,异常信息:"+e, e);
            return ReturnFailUtils.getAesInfo("您导入Excel的内容不正确");
        }
    }
    /**
     * 案件导入-删除草稿
     * @param idList
     * @return
     */
    public void deleteDraft(List<String> idList){
        try{
            QueryWrapper<CasebookInfo> caseBookQueryWrapper = new QueryWrapper<>();
            caseBookQueryWrapper.in("id", idList);
            this.remove(caseBookQueryWrapper);
            QueryWrapper<CasebookAgent> casebookAgentQueryWrapper = new QueryWrapper<>();
            casebookAgentQueryWrapper.in("case_id", idList);
            casebookAgentService.remove(casebookAgentQueryWrapper);
            QueryWrapper<CasebookPerson> casebookPersonQueryWrapper = new QueryWrapper<>();
            casebookPersonQueryWrapper.in("case_id", idList);
            casebookPersonService.remove(casebookPersonQueryWrapper);
            QueryWrapper<CasebookAssistInfo> casebookAssistInfoQueryWrapper = new QueryWrapper<>();
            casebookAssistInfoQueryWrapper.in("case_id", idList);
            casebookAssistInfoService.remove(casebookAssistInfoQueryWrapper);
        }catch (Exception e){
            log.error("[CasebookInfoService.deleteDraft]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookInfoService.deleteDraft", e);
        }
    }
    /**
     * 案件导入-草稿转入正式案件
     * @param idList
     * @return
     */
    public void importToCase(List<String> idList, String userId){
        try{
        }catch (Exception e){
            log.error("[CasebookInfoService.importToCase]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookInfoService.importToCase", e);
        }
    }
    /**
     * 案件导入-全部草稿转入正式案件
     * @param terms 条件
     * @return Page
     */
    public void importToCaseAll(Map<String, Object> terms){
        try{
            List<CaseBookPageDTO> caseBookPageDTOList = mapper.listImportDraft(terms);
            for (CaseBookPageDTO caseBookPageDTO: caseBookPageDTOList){
            }
        }catch (Exception e){
            log.error("[CasebookInfoService.importToCase]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookInfoService.importToCase", e);
        }
    }
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/service/CasebookInfoUnfoldService.java
New file
@@ -0,0 +1,133 @@
package cn.huge.module.casebook.service;
import cn.huge.base.common.exception.ServiceException;
import cn.huge.base.common.utils.DateUtils;
import cn.huge.base.common.utils.IdUtils;
import cn.huge.module.client.api.impl.UtilsClientImpl;
import cn.huge.module.casebook.dao.mapper.CasebookInfoUnfoldMapper;
import cn.huge.module.casebook.domain.po.CasebookInfoUnfold;
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: dyh_casebook_info_unfold业务逻辑处理
 * @Description dyh_casebook_info_unfold业务逻辑处理
 * @company hugeinfo
 * @author liyj
 * @Time 2024-10-26 12:31:22
 * @version 1.0.0
 */
@Slf4j
@Service
@Transactional(rollbackFor = Exception.class)
public class CasebookInfoUnfoldService extends ServiceImpl<CasebookInfoUnfoldMapper, CasebookInfoUnfold>{
    @Autowired
    private CasebookInfoUnfoldMapper mapper;
    @Autowired
    private UtilsClientImpl utilsClient;
    /**
    * 更新对象
    * @param entity 对象
    */
    public void updateCasebookInfoUnfold(CasebookInfoUnfold entity){
        try{
            mapper.updateCasebookInfoUnfold(entity);
        }catch (Exception e){
            log.error("[CasebookInfoUnfoldService.updateCasebookInfoUnfold]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookInfoUnfoldService.updateCasebookInfoUnfold", e);
        }
    }
    /**
    * 条件更新对象
    * @param entity 对象
    * @param terms 条件
    */
    public void updateCasebookInfoUnfoldTerms(CasebookInfoUnfold entity, Map<String, Object> terms){
        try{
            mapper.updateCasebookInfoUnfoldTerms(entity, terms);
        }catch (Exception e){
            log.error("[CasebookInfoUnfoldService.updateCasebookInfoUnfoldTerms]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookInfoUnfoldService.updateCasebookInfoUnfoldTerms", e);
        }
    }
    /**
    * 根据编号物理删除
    * @param id 查询条件集合
    */
    public void deleteCasebookInfoUnfold(String id){
        try{
            mapper.deleteCasebookInfoUnfold(id);
        }catch (Exception e){
            log.error("[CasebookInfoUnfoldService.deleteCasebookInfoUnfold]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookInfoUnfoldService.deleteCasebookInfoUnfold", e);
        }
    }
    /**
    * 按条件查询
    * @param terms 条件
    * @return List
    */
    public List<CasebookInfoUnfold> 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<CasebookInfoUnfold> pageQuery(PageRequest page, Map<String, Object> terms){
        long total = mapper.countTerms(terms);
        List<CasebookInfoUnfold> content = mapper.pageTerms(page, terms);
        return new PageImpl<CasebookInfoUnfold>(content, page, total);
    }
    /**
    * 新增或更新对象
    * @param casebookInfoUnfold 实体对象
    */
    public void saveCasebookInfoUnfold(CasebookInfoUnfold casebookInfoUnfold){
        try{
            Date nowDate = DateUtils.getNowDate();
            // 判断是否新增
            if (IdUtils.checkNewId(casebookInfoUnfold.getId())){
                casebookInfoUnfold.setId(utilsClient.getNewTimeId());
                casebookInfoUnfold.setCreateTime(nowDate);
            }
            casebookInfoUnfold.setUpdateTime(nowDate);
            this.saveOrUpdate(casebookInfoUnfold);
        }catch (Exception e){
            log.error("[CasebookInfoUnfoldService.saveCasebookInfoUnfold]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookInfoUnfoldService.saveCasebookInfoUnfold", e);
        }
    }
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/casebook/service/CasebookPersonService.java
New file
@@ -0,0 +1,133 @@
package cn.huge.module.casebook.service;
import cn.huge.base.common.exception.ServiceException;
import cn.huge.base.common.utils.DateUtils;
import cn.huge.base.common.utils.IdUtils;
import cn.huge.module.client.api.impl.UtilsClientImpl;
import cn.huge.module.casebook.dao.mapper.CasebookPersonMapper;
import cn.huge.module.casebook.domain.po.CasebookPerson;
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: dyh_casebook_person业务逻辑处理
 * @Description dyh_casebook_person业务逻辑处理
 * @company hugeinfo
 * @author liyj
 * @Time 2024-10-26 12:31:22
 * @version 1.0.0
 */
@Slf4j
@Service
@Transactional(rollbackFor = Exception.class)
public class CasebookPersonService extends ServiceImpl<CasebookPersonMapper, CasebookPerson>{
    @Autowired
    private CasebookPersonMapper mapper;
    @Autowired
    private UtilsClientImpl utilsClient;
    /**
    * 更新对象
    * @param entity 对象
    */
    public void updateCasebookPerson(CasebookPerson entity){
        try{
            mapper.updateCasebookPerson(entity);
        }catch (Exception e){
            log.error("[CasebookPersonService.updateCasebookPerson]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookPersonService.updateCasebookPerson", e);
        }
    }
    /**
    * 条件更新对象
    * @param entity 对象
    * @param terms 条件
    */
    public void updateCasebookPersonTerms(CasebookPerson entity, Map<String, Object> terms){
        try{
            mapper.updateCasebookPersonTerms(entity, terms);
        }catch (Exception e){
            log.error("[CasebookPersonService.updateCasebookPersonTerms]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookPersonService.updateCasebookPersonTerms", e);
        }
    }
    /**
    * 根据编号物理删除
    * @param id 查询条件集合
    */
    public void deleteCasebookPerson(String id){
        try{
            mapper.deleteCasebookPerson(id);
        }catch (Exception e){
            log.error("[CasebookPersonService.deleteCasebookPerson]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookPersonService.deleteCasebookPerson", e);
        }
    }
    /**
    * 按条件查询
    * @param terms 条件
    * @return List
    */
    public List<CasebookPerson> 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<CasebookPerson> pageQuery(PageRequest page, Map<String, Object> terms){
        long total = mapper.countTerms(terms);
        List<CasebookPerson> content = mapper.pageTerms(page, terms);
        return new PageImpl<CasebookPerson>(content, page, total);
    }
    /**
    * 新增或更新对象
    * @param casebookPerson 实体对象
    */
    public void saveCasebookPerson(CasebookPerson casebookPerson){
        try{
            Date nowDate = DateUtils.getNowDate();
            // 判断是否新增
            if (IdUtils.checkNewId(casebookPerson.getId())){
                casebookPerson.setId(utilsClient.getNewTimeId());
                casebookPerson.setCreateTime(nowDate);
            }
            casebookPerson.setUpdateTime(nowDate);
            this.saveOrUpdate(casebookPerson);
        }catch (Exception e){
            log.error("[CasebookPersonService.saveCasebookPerson]调用失败,异常信息:"+e, e);
            throw new ServiceException("CasebookPersonService.saveCasebookPerson", e);
        }
    }
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/client/api/SysClient.java
@@ -124,4 +124,13 @@
     */
    @PostMapping("/api/thrid/grid/todo/delete-task-todo")
    R<String> deleteTaskTodo(@RequestBody GridTaskVo gridTaskVo);
    /**
     * 根据id查询附件信息
     * @url {ctx}/api/client/fileInfo/getFileInfoById
     * @param id 条件
     * @return Object
     */
    @GetMapping("/api/client/fileInfo/getFileInfoById")
    ReturnBO getFileInfoById(@RequestParam(value = "id") String id);
}
dyh-service/dyh-mediate/src/main/java/cn/huge/module/client/api/impl/SysClientImpl.java
@@ -327,4 +327,26 @@
            log.error("service方法[SysClientImpl.deleteTaskTodo]调用异常:"+e, e);
        }
    }
    /**
     * 根据id查询附件信息
     * @url {ctx}/api/client/fileInfo/getFileInfoById
     * @param id 条件
     * @return
     */
    public FileInfoBaseDTO getFileInfoById(String id){
        FileInfoBaseDTO fileInfoBaseDTO = null;
        try{
            ReturnBO returnBo = sysClient.getFileInfoById(id);
            if (ReturnConsts.OK == returnBo.getCode()){
                if (ObjectUtils.isNotEmpty(returnBo.getData())){
                    fileInfoBaseDTO = new FileInfoBaseDTO();
                    fileInfoBaseDTO = objectMapper.convertValue(returnBo.getData(), FileInfoBaseDTO.class);
                }
            }
        }catch (Exception e){
            log.error("service方法[SysClientImpl.getFileInfoById]调用异常:"+e, e);
        }
        return fileInfoBaseDTO;
    }
}
dyh-service/dyh-sys/src/main/java/cn/huge/module/file/controller/client/FileInfoClientController.java
@@ -1,11 +1,15 @@
package cn.huge.module.file.controller.client;
import cn.huge.base.common.utils.ObjectUtils;
import cn.huge.base.common.utils.ReturnFailUtils;
import cn.huge.base.common.utils.ReturnSucUtils;
import cn.huge.module.file.domain.po.FileInfo;
import cn.huge.module.file.service.FileInfoService;
import cn.huge.module.sys.dto.FileInfoBaseDTO;
import io.lettuce.core.dynamic.annotation.Param;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -59,4 +63,23 @@
            return ReturnFailUtils.getRepInfo();
        }
    }
    /**
     * 根据id查询
     * @url {ctx}/api/client/fileInfo/getFileInfoById
     * @return Object
     */
    @GetMapping("/getFileInfoById")
    public Object getFileInfoById(@RequestParam(value = "id") String id) {
        try {
            FileInfoBaseDTO fileInfoBaseDTO = new FileInfoBaseDTO();
            FileInfo fileInfo = service.getById(id);
            if (ObjectUtils.isNotEmpty(fileInfo)){
                BeanUtils.copyProperties(fileInfo, fileInfoBaseDTO);
            }
            return ReturnSucUtils.getRepInfo(fileInfoBaseDTO);
        } catch (Exception e) {
            return ReturnFailUtils.getRepInfo();
        }
    }
}