Compare commits
	
		
			No commits in common. "cce498a5f59cbae412e9dadd1f1eba7e50e9b1cc" and "a6258767daa3baef77bc5854ea8d5e95de395e3b" have entirely different histories.
		
	
	
		
			cce498a5f5
			...
			a6258767da
		
	
		| 
						 | 
					@ -5,7 +5,6 @@ import com.tcctlo.common.core.controller.BaseController;
 | 
				
			||||||
import com.tcctlo.common.core.domain.AjaxResult;
 | 
					import com.tcctlo.common.core.domain.AjaxResult;
 | 
				
			||||||
import com.tcctlo.law.entity.CaseInformation;
 | 
					import com.tcctlo.law.entity.CaseInformation;
 | 
				
			||||||
import com.tcctlo.law.service.ICaseInformationService;
 | 
					import com.tcctlo.law.service.ICaseInformationService;
 | 
				
			||||||
import com.tcctlo.law.vo.CaseArchivedVO;
 | 
					 | 
				
			||||||
import com.tcctlo.law.vo.CaseInformationEnterVO;
 | 
					import com.tcctlo.law.vo.CaseInformationEnterVO;
 | 
				
			||||||
import com.tcctlo.law.vo.CaseInformationListVO;
 | 
					import com.tcctlo.law.vo.CaseInformationListVO;
 | 
				
			||||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
					import org.springframework.beans.factory.annotation.Autowired;
 | 
				
			||||||
| 
						 | 
					@ -26,25 +25,10 @@ import java.util.Map;
 | 
				
			||||||
@RequestMapping("/caseInformation")
 | 
					@RequestMapping("/caseInformation")
 | 
				
			||||||
public class CaseInformationController extends BaseController {
 | 
					public class CaseInformationController extends BaseController {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Autowired
 | 
					    @Autowired
 | 
				
			||||||
    private ICaseInformationService iCaseInformationService;
 | 
					    private ICaseInformationService iCaseInformationService;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 案件信息录入
 | 
					 | 
				
			||||||
     *
 | 
					 | 
				
			||||||
     * @param caseInfo 案件信息
 | 
					 | 
				
			||||||
     * @return 是否录入成功
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    @PostMapping(value = "/enterCaseInfo")
 | 
					 | 
				
			||||||
    public AjaxResult enterCaseInfo(@RequestBody CaseInformationEnterVO caseInfo) {
 | 
					 | 
				
			||||||
        Boolean result = iCaseInformationService.enterCaseInfo(caseInfo);
 | 
					 | 
				
			||||||
        if (result) {
 | 
					 | 
				
			||||||
            return AjaxResult.success("案件信息录入成功");
 | 
					 | 
				
			||||||
        } else {
 | 
					 | 
				
			||||||
            return AjaxResult.error("案件信息录入失败");
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @PostMapping(value = "/list")
 | 
					    @PostMapping(value = "/list")
 | 
				
			||||||
    public AjaxResult list(@RequestParam(required = false) Integer current, @RequestParam(required = false) Integer size, @RequestBody(required = false) Map<String, Object> params) {
 | 
					    public AjaxResult list(@RequestParam(required = false) Integer current, @RequestParam(required = false) Integer size, @RequestBody(required = false) Map<String, Object> params) {
 | 
				
			||||||
        if (current == null) {
 | 
					        if (current == null) {
 | 
				
			||||||
| 
						 | 
					@ -79,16 +63,6 @@ public class CaseInformationController extends BaseController {
 | 
				
			||||||
        return AjaxResult.success(result);
 | 
					        return AjaxResult.success(result);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 案件归档【单个案件】
 | 
					 | 
				
			||||||
     * @param caseArchivedVO 要归档的案件
 | 
					 | 
				
			||||||
     * @return 是否归档成功
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    @PostMapping(value = "/caseArchived")
 | 
					 | 
				
			||||||
    public AjaxResult caseArchived(@RequestBody CaseArchivedVO caseArchivedVO) {
 | 
					 | 
				
			||||||
        Boolean res = iCaseInformationService.caseArchived(caseArchivedVO);
 | 
					 | 
				
			||||||
        return AjaxResult.success(res);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @GetMapping(value = "/{id}")
 | 
					    @GetMapping(value = "/{id}")
 | 
				
			||||||
| 
						 | 
					@ -109,12 +83,7 @@ public class CaseInformationController extends BaseController {
 | 
				
			||||||
        return AjaxResult.success(result);
 | 
					        return AjaxResult.success(result);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    @PostMapping(value = "/deleteCase")
 | 
				
			||||||
     * 案件删除【批量删除+单个删除】
 | 
					 | 
				
			||||||
     * @param ids
 | 
					 | 
				
			||||||
     * @return
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    @GetMapping(value = "/deleteCase")
 | 
					 | 
				
			||||||
    public AjaxResult deleteCase(@RequestParam("ids") String ids) {
 | 
					    public AjaxResult deleteCase(@RequestParam("ids") String ids) {
 | 
				
			||||||
        return AjaxResult.success(iCaseInformationService.deleteCase(ids));
 | 
					        return AjaxResult.success(iCaseInformationService.deleteCase(ids));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					@ -125,5 +94,19 @@ public class CaseInformationController extends BaseController {
 | 
				
			||||||
        return AjaxResult.success(result);
 | 
					        return AjaxResult.success(result);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * 案件信息录入
 | 
				
			||||||
 | 
					     *
 | 
				
			||||||
 | 
					     * @param caseInfo 案件信息
 | 
				
			||||||
 | 
					     * @return 是否录入成功
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    @PostMapping(value = "/enterCaseInfo")
 | 
				
			||||||
 | 
					    public AjaxResult enterCaseInfo(@RequestBody CaseInformationEnterVO caseInfo) {
 | 
				
			||||||
 | 
					        Boolean result = iCaseInformationService.enterCaseInfo(caseInfo);
 | 
				
			||||||
 | 
					        if (result) {
 | 
				
			||||||
 | 
					            return AjaxResult.success("案件信息录入成功");
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            return AjaxResult.error("案件信息录入失败");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -54,8 +54,16 @@ public class ImpulseInformationController {
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    @PostMapping("/retrievalConflict")
 | 
					    @PostMapping("/retrievalConflict")
 | 
				
			||||||
    public AjaxResult retrievalConflict(@RequestBody ImpulseInformation impulseInformation) {
 | 
					    public AjaxResult retrievalConflict(@RequestBody ImpulseInformation impulseInformation) {
 | 
				
			||||||
 | 
					        AjaxResult ajaxResult = new AjaxResult();
 | 
				
			||||||
        Boolean res = iImpulseInformationService.retrievalConflict(impulseInformation);
 | 
					        Boolean res = iImpulseInformationService.retrievalConflict(impulseInformation);
 | 
				
			||||||
        return AjaxResult.success(res);
 | 
					        if (res){
 | 
				
			||||||
 | 
					            ajaxResult.put("code", 200);
 | 
				
			||||||
 | 
					            ajaxResult.put("msg", "检索通过");
 | 
				
			||||||
 | 
					        }else {
 | 
				
			||||||
 | 
					            ajaxResult.put("code", 401);
 | 
				
			||||||
 | 
					            ajaxResult.put("msg", "检索不通过");
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return ajaxResult;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @GetMapping(value = "/{id}")
 | 
					    @GetMapping(value = "/{id}")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -46,11 +46,6 @@ public class FileManager implements Serializable {
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private String fileUrl;
 | 
					    private String fileUrl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 文件类型【0:归档文件,1:收款记录文件】
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    private Integer fileType;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 状态【0:正常,1::停用】
 | 
					     * 状态【0:正常,1::停用】
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 | 
				
			||||||
import com.tcctlo.law.vo.CaseInformationListVO;
 | 
					import com.tcctlo.law.vo.CaseInformationListVO;
 | 
				
			||||||
import org.apache.ibatis.annotations.Param;
 | 
					import org.apache.ibatis.annotations.Param;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.util.List;
 | 
					 | 
				
			||||||
import java.util.Map;
 | 
					import java.util.Map;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
| 
						 | 
					@ -26,18 +25,4 @@ public interface CaseInformationMapper extends BaseMapper<CaseInformation> {
 | 
				
			||||||
     * @return 结果集
 | 
					     * @return 结果集
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    Page<CaseInformationListVO> selectCondition(@Param("page") Page<CaseInformationListVO> page, @Param("condition") Map<String, Object> condition);
 | 
					    Page<CaseInformationListVO> selectCondition(@Param("page") Page<CaseInformationListVO> page, @Param("condition") Map<String, Object> condition);
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 案件归档
 | 
					 | 
				
			||||||
     * @param caseId 要归档的案件ID
 | 
					 | 
				
			||||||
     * @return 受影响记录数
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    int caseArchived(@Param("caseId") Long caseId);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 批量逻辑删除案件信息
 | 
					 | 
				
			||||||
     * @param longList 案件ID集合
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    int removeByIds(@Param("ids") List<Long> longList);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -52,11 +52,4 @@ public interface CaseLawyerMapper extends BaseMapper<CaseLawyer> {
 | 
				
			||||||
     * @return 受影响行数
 | 
					     * @return 受影响行数
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    int updateByIds(@Param("ids") List<Long> ids);
 | 
					    int updateByIds(@Param("ids") List<Long> ids);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 根据案件ID逻辑删除案件相关律师信息
 | 
					 | 
				
			||||||
     * @param caseId 案件ID
 | 
					 | 
				
			||||||
     * @return 受影响行数
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    int deleteLawyerByCaseId(@Param("caseIds") List<Long> caseId);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,7 +3,7 @@ package com.tcctlo.law.mapper;
 | 
				
			||||||
import com.tcctlo.law.entity.CollectionRecord;
 | 
					import com.tcctlo.law.entity.CollectionRecord;
 | 
				
			||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 | 
					import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 | 
				
			||||||
import com.tcctlo.law.vo.CollectionRecordEnterVO;
 | 
					import com.tcctlo.law.vo.CollectionRecordEnterVO;
 | 
				
			||||||
import org.apache.ibatis.annotations.Param;
 | 
					import io.lettuce.core.dynamic.annotation.Param;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -23,19 +23,4 @@ public interface CollectionRecordMapper extends BaseMapper<CollectionRecord> {
 | 
				
			||||||
     * @return 结果集
 | 
					     * @return 结果集
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    List<CollectionRecordEnterVO> selectByCaseId(@Param("caseId") Long caseId);
 | 
					    List<CollectionRecordEnterVO> selectByCaseId(@Param("caseId") Long caseId);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 根据案件ID批量删除收款记录
 | 
					 | 
				
			||||||
     * @param caseIds 案件ID集合
 | 
					 | 
				
			||||||
     * @return 删除结果
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    int removeByCaseId(@Param("caseIds") List<Long> caseIds);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 根据案件ID和收款记录ID删除收款记录
 | 
					 | 
				
			||||||
     * @param id 收款记录ID
 | 
					 | 
				
			||||||
     * @param caseId 案件ID
 | 
					 | 
				
			||||||
     * @return 结果集
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    int removeByCaseIdAdnRecordId(@Param("id") Long id, @Param("caseId") Long caseId);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -31,18 +31,4 @@ public interface FileManagerMapper extends BaseMapper<FileManager> {
 | 
				
			||||||
     * @return 结果集
 | 
					     * @return 结果集
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    FileManager selectByCaseIdAndFileId(@Param("caseId") Long caseId, @Param("fileId") Long fileId);
 | 
					    FileManager selectByCaseIdAndFileId(@Param("caseId") Long caseId, @Param("fileId") Long fileId);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 根据案件ID批量删除文件管理信息
 | 
					 | 
				
			||||||
     * @param caseIds 案件ID集合
 | 
					 | 
				
			||||||
     * @return
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    int removeByCaseId(@Param("caseIds") List<Long> caseIds);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 根据案件ID和收款记录表中存储的文件ID批量删除文件管理信息
 | 
					 | 
				
			||||||
     * @param caseId 案件ID
 | 
					 | 
				
			||||||
     * @param fileIds 收款记录表中存储的文件ID
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    int removeByCaseIdAndFileIds(@Param("caseId") Long caseId, @Param("fileIds") List<Long> fileIds);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -52,11 +52,4 @@ public interface ImpulseInformationMapper extends BaseMapper<ImpulseInformation>
 | 
				
			||||||
     * @return 结果集
 | 
					     * @return 结果集
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    List<ImpulseInformation> retrievalConflict(@Param("info") ImpulseInformation impulseInformation);
 | 
					    List<ImpulseInformation> retrievalConflict(@Param("info") ImpulseInformation impulseInformation);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 根据案件ID批量删除
 | 
					 | 
				
			||||||
     * @param caseId 案件ID集合
 | 
					 | 
				
			||||||
     * @return 结果集
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    int removeByCaseId(@Param("caseId") List<Long> caseId);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,7 +3,6 @@ package com.tcctlo.law.service;
 | 
				
			||||||
import com.tcctlo.law.entity.CaseInformation;
 | 
					import com.tcctlo.law.entity.CaseInformation;
 | 
				
			||||||
import com.baomidou.mybatisplus.extension.service.IService;
 | 
					import com.baomidou.mybatisplus.extension.service.IService;
 | 
				
			||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 | 
					import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 | 
				
			||||||
import com.tcctlo.law.vo.CaseArchivedVO;
 | 
					 | 
				
			||||||
import com.tcctlo.law.vo.CaseInformationEnterVO;
 | 
					import com.tcctlo.law.vo.CaseInformationEnterVO;
 | 
				
			||||||
import com.tcctlo.law.vo.CaseInformationListVO;
 | 
					import com.tcctlo.law.vo.CaseInformationListVO;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -100,11 +99,4 @@ public interface ICaseInformationService extends IService<CaseInformation>{
 | 
				
			||||||
     * @return 结果集
 | 
					     * @return 结果集
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    Boolean deleteCase(String ids);
 | 
					    Boolean deleteCase(String ids);
 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 案件归档
 | 
					 | 
				
			||||||
     * @param caseArchivedVO 归档案件+归档文件
 | 
					 | 
				
			||||||
     * @return 是否归档成功
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    Boolean caseArchived(CaseArchivedVO caseArchivedVO);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -12,7 +12,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 | 
				
			||||||
 * @author 张世琪
 | 
					 * @author 张世琪
 | 
				
			||||||
 * @since 2025-02-06
 | 
					 * @since 2025-02-06
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
public interface ICollectionRecordService extends IService<CollectionRecord>{
 | 
					public interface ICollectionRecordService {
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
    * <p>
 | 
					    * <p>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,5 @@
 | 
				
			||||||
package com.tcctlo.law.service.impl;
 | 
					package com.tcctlo.law.service.impl;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import cn.hutool.core.bean.BeanUtil;
 | 
					 | 
				
			||||||
import cn.hutool.core.collection.CollUtil;
 | 
					import cn.hutool.core.collection.CollUtil;
 | 
				
			||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 | 
					import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 | 
				
			||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 | 
					import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 | 
				
			||||||
| 
						 | 
					@ -8,11 +7,16 @@ import com.tcctlo.common.core.domain.model.LoginUser;
 | 
				
			||||||
import com.tcctlo.common.utils.SecurityUtils;
 | 
					import com.tcctlo.common.utils.SecurityUtils;
 | 
				
			||||||
import com.tcctlo.common.utils.StringUtils;
 | 
					import com.tcctlo.common.utils.StringUtils;
 | 
				
			||||||
import com.tcctlo.law.CaseEnum;
 | 
					import com.tcctlo.law.CaseEnum;
 | 
				
			||||||
import com.tcctlo.law.entity.*;
 | 
					import com.tcctlo.law.entity.CaseInformation;
 | 
				
			||||||
 | 
					import com.tcctlo.law.entity.CaseLawyer;
 | 
				
			||||||
 | 
					import com.tcctlo.law.entity.FileManager;
 | 
				
			||||||
 | 
					import com.tcctlo.law.entity.ImpulseInformation;
 | 
				
			||||||
import com.tcctlo.law.mapper.*;
 | 
					import com.tcctlo.law.mapper.*;
 | 
				
			||||||
import com.tcctlo.law.service.*;
 | 
					import com.tcctlo.law.service.ICaseInformationService;
 | 
				
			||||||
 | 
					import com.tcctlo.law.service.ICaseLawyerService;
 | 
				
			||||||
 | 
					import com.tcctlo.law.service.IFileManagerService;
 | 
				
			||||||
 | 
					import com.tcctlo.law.service.IImpulseInformationService;
 | 
				
			||||||
import com.tcctlo.law.tools.GenerateCaseNo;
 | 
					import com.tcctlo.law.tools.GenerateCaseNo;
 | 
				
			||||||
import com.tcctlo.law.vo.CaseArchivedVO;
 | 
					 | 
				
			||||||
import com.tcctlo.law.vo.CaseInformationEnterVO;
 | 
					import com.tcctlo.law.vo.CaseInformationEnterVO;
 | 
				
			||||||
import com.tcctlo.law.vo.CaseInformationListVO;
 | 
					import com.tcctlo.law.vo.CaseInformationListVO;
 | 
				
			||||||
import com.tcctlo.law.vo.CollectionRecordEnterVO;
 | 
					import com.tcctlo.law.vo.CollectionRecordEnterVO;
 | 
				
			||||||
| 
						 | 
					@ -22,11 +26,8 @@ import org.springframework.transaction.annotation.Isolation;
 | 
				
			||||||
import org.springframework.transaction.annotation.Transactional;
 | 
					import org.springframework.transaction.annotation.Transactional;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import javax.annotation.Resource;
 | 
					import javax.annotation.Resource;
 | 
				
			||||||
import java.math.BigDecimal;
 | 
					 | 
				
			||||||
import java.util.*;
 | 
					import java.util.*;
 | 
				
			||||||
import java.util.function.Consumer;
 | 
					import java.util.function.Consumer;
 | 
				
			||||||
import java.util.function.Function;
 | 
					 | 
				
			||||||
import java.util.function.Predicate;
 | 
					 | 
				
			||||||
import java.util.stream.Collectors;
 | 
					import java.util.stream.Collectors;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
| 
						 | 
					@ -95,12 +96,6 @@ public class CaseInformationServiceImpl extends ServiceImpl<CaseInformationMappe
 | 
				
			||||||
    @Resource
 | 
					    @Resource
 | 
				
			||||||
    private CollectionRecordMapper collectionRecordMapper;
 | 
					    private CollectionRecordMapper collectionRecordMapper;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * 收款记录service
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    @Resource
 | 
					 | 
				
			||||||
    private ICollectionRecordService collectionRecordService;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /*@Override
 | 
					    /*@Override
 | 
				
			||||||
    public Page<CaseInformation> list(Integer pageNo, Integer pageSize, Map<String, Object> params) {
 | 
					    public Page<CaseInformation> list(Integer pageNo, Integer pageSize, Map<String, Object> params) {
 | 
				
			||||||
        LoginUser loginUser = SecurityUtils.getLoginUser();
 | 
					        LoginUser loginUser = SecurityUtils.getLoginUser();
 | 
				
			||||||
| 
						 | 
					@ -227,10 +222,7 @@ public class CaseInformationServiceImpl extends ServiceImpl<CaseInformationMappe
 | 
				
			||||||
            List<CollectionRecordEnterVO> collectionRecordList = caseInfo.getCollectionRecordList();
 | 
					            List<CollectionRecordEnterVO> collectionRecordList = caseInfo.getCollectionRecordList();
 | 
				
			||||||
            collectionRecordList.forEach(item -> {
 | 
					            collectionRecordList.forEach(item -> {
 | 
				
			||||||
                item.setCaseId(caseId);
 | 
					                item.setCaseId(caseId);
 | 
				
			||||||
                List<FileManager> fileManagerList = item.getFileManager().stream().peek(i -> {
 | 
					                List<FileManager> fileManagerList = item.getFileManager().stream().peek(i -> i.setCaseId(caseId)).collect(Collectors.toList());
 | 
				
			||||||
                    i.setCaseId(caseId);
 | 
					 | 
				
			||||||
                    i.setFileType(1);   //设置文件类型为【收款记录文件】
 | 
					 | 
				
			||||||
                }).collect(Collectors.toList());
 | 
					 | 
				
			||||||
                fileManagerService.saveBatch(fileManagerList);
 | 
					                fileManagerService.saveBatch(fileManagerList);
 | 
				
			||||||
                List<Long> fileIds = fileManagerList.stream().map(FileManager::getId).collect(Collectors.toList());
 | 
					                List<Long> fileIds = fileManagerList.stream().map(FileManager::getId).collect(Collectors.toList());
 | 
				
			||||||
                item.setCollectionUrlId(StringUtils.join(fileIds, ","));
 | 
					                item.setCollectionUrlId(StringUtils.join(fileIds, ","));
 | 
				
			||||||
| 
						 | 
					@ -284,7 +276,7 @@ public class CaseInformationServiceImpl extends ServiceImpl<CaseInformationMappe
 | 
				
			||||||
        CaseInformation caseInformation = params.getCaseInformation();
 | 
					        CaseInformation caseInformation = params.getCaseInformation();
 | 
				
			||||||
        Long caseId = caseInformation.getId();
 | 
					        Long caseId = caseInformation.getId();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
         //案件关联【委托方】----entrustingParty--从数据库获取出原来的委托方信息与通过接口传入的进行比对
 | 
					        //案件关联【委托方】----entrustingParty--从数据库获取出原来的委托方信息与通过接口传入的进行比对
 | 
				
			||||||
        List<ImpulseInformation> oldImpulse = informationMapper.selectByCaseId(params.getCaseInformation().getId(), 0);
 | 
					        List<ImpulseInformation> oldImpulse = informationMapper.selectByCaseId(params.getCaseInformation().getId(), 0);
 | 
				
			||||||
        List<ImpulseInformation> newImpulse = params.getEntrustingParty();
 | 
					        List<ImpulseInformation> newImpulse = params.getEntrustingParty();
 | 
				
			||||||
        editImpulseInformation(oldImpulse, newImpulse, caseId);
 | 
					        editImpulseInformation(oldImpulse, newImpulse, caseId);
 | 
				
			||||||
| 
						 | 
					@ -297,6 +289,7 @@ public class CaseInformationServiceImpl extends ServiceImpl<CaseInformationMappe
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //代理律师----attorneyAgent----修改原来的律师信息
 | 
					        //代理律师----attorneyAgent----修改原来的律师信息
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        CaseLawyer newAttorneyAgent = params.getAttorneyAgent();
 | 
					        CaseLawyer newAttorneyAgent = params.getAttorneyAgent();
 | 
				
			||||||
        if (newAttorneyAgent.getId() == null) {
 | 
					        if (newAttorneyAgent.getId() == null) {
 | 
				
			||||||
            CaseLawyer oldCaseLawyer = caseLawyerMapper.selectAttorneyAgentLawByCaseId(params.getCaseInformation().getId());
 | 
					            CaseLawyer oldCaseLawyer = caseLawyerMapper.selectAttorneyAgentLawByCaseId(params.getCaseInformation().getId());
 | 
				
			||||||
| 
						 | 
					@ -312,88 +305,21 @@ public class CaseInformationServiceImpl extends ServiceImpl<CaseInformationMappe
 | 
				
			||||||
        List<CaseLawyer> oldAssistingLawyer = caseLawyerMapper.selectAssistingLawyerByCaseId(params.getCaseInformation().getId());
 | 
					        List<CaseLawyer> oldAssistingLawyer = caseLawyerMapper.selectAssistingLawyerByCaseId(params.getCaseInformation().getId());
 | 
				
			||||||
        editAssistingLawyer(oldAssistingLawyer, newAssistingLawyer, caseId);
 | 
					        editAssistingLawyer(oldAssistingLawyer, newAssistingLawyer, caseId);
 | 
				
			||||||
        caseInformation.setCaseLawyerIds(caseLawyerMapper.selectAllPrimeLawyerByCaseId(params.getCaseInformation().getId()).stream().map(c -> c.getLawyerId().toString()).collect(Collectors.joining(",")));
 | 
					        caseInformation.setCaseLawyerIds(caseLawyerMapper.selectAllPrimeLawyerByCaseId(params.getCaseInformation().getId()).stream().map(c -> c.getLawyerId().toString()).collect(Collectors.joining(",")));
 | 
				
			||||||
 | 
					        caseInformationMapper.updateById(caseInformation);
 | 
				
			||||||
        /**
 | 
					        /**
 | 
				
			||||||
         * 收款记录----collectionRecordList
 | 
					         * 收款记录----collectionRecordList
 | 
				
			||||||
         * 收款记录基本信息----collectionRecord
 | 
					         * 收款记录基本信息----collectionRecord
 | 
				
			||||||
         * 收款记录文件----fileManager
 | 
					         * 收款记录文件----fileManager
 | 
				
			||||||
         */
 | 
					         */
 | 
				
			||||||
        List<CollectionRecordEnterVO> newData = params.getCollectionRecordList();  //收款记录信息
 | 
					 | 
				
			||||||
        List<CollectionRecordEnterVO> oldData = collectionRecordMapper.selectByCaseId(caseId);
 | 
					 | 
				
			||||||
        List<Long> newIds = newData.stream().map(item -> item.getId()).collect(Collectors.toList());
 | 
					 | 
				
			||||||
        List<Long> oldIds = oldData.stream().map(item -> item.getId()).collect(Collectors.toList());
 | 
					 | 
				
			||||||
        //获取新添加的收款记录,计算出新的收款记录金额,在总金额中加上
 | 
					 | 
				
			||||||
        List<CollectionRecordEnterVO> insert = newData.stream().filter(item -> item.getId() == null).peek(item -> item.setCaseId(caseId)).collect(Collectors.toList());
 | 
					 | 
				
			||||||
        insert.forEach(item -> {
 | 
					 | 
				
			||||||
            List<FileManager> fileManager = item.getFileManager().stream().peek(i -> i.setCaseId(caseId)).collect(Collectors.toList());
 | 
					 | 
				
			||||||
            fileManagerService.saveBatch(fileManager);
 | 
					 | 
				
			||||||
            item.setCollectionUrlId(fileManager.stream().map(i -> i.getId().toString()).collect(Collectors.joining(",")));
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
        List<CollectionRecord> list = BeanUtil.copyToList(insert, CollectionRecord.class);
 | 
					 | 
				
			||||||
        collectionRecordService.saveBatch(list);
 | 
					 | 
				
			||||||
        /*BigDecimal addSum = BigDecimal.valueOf(insert.stream().mapToDouble(item -> item.getAmountReceived().doubleValue()).sum());*/
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        //获取删除的收款记录,计算出删除的收款记录的金额,在总金额中减去
 | 
					 | 
				
			||||||
        List<Long> deleteIds = (List<Long>) CollUtil.subtract(oldIds, newIds);
 | 
					 | 
				
			||||||
        List<CollectionRecordEnterVO> deleteData = oldData.stream().filter(item -> CollUtil.contains(deleteIds, item.getId())).peek(item -> {
 | 
					 | 
				
			||||||
            item.setDelFlag(1);
 | 
					 | 
				
			||||||
            item.setStatus(1);
 | 
					 | 
				
			||||||
        }).collect(Collectors.toList());
 | 
					 | 
				
			||||||
        /*BigDecimal delSum = BigDecimal.valueOf(deleteData.stream().mapToDouble(item -> item.getAmountReceived().doubleValue()).sum());*/
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        for (CollectionRecordEnterVO item : deleteData) {
 | 
					 | 
				
			||||||
            //根据caseId和收款记录ID删除收款记录
 | 
					 | 
				
			||||||
            collectionRecordMapper.removeByCaseIdAdnRecordId(item.getId(),caseId);
 | 
					 | 
				
			||||||
            //根据caseId和收款记录ID删除收款记录文件
 | 
					 | 
				
			||||||
            List<Long> fileIds = Arrays.stream(item.getCollectionUrlId().split(","))
 | 
					 | 
				
			||||||
                    .map(Long::parseLong)
 | 
					 | 
				
			||||||
                    .collect(Collectors.toList());
 | 
					 | 
				
			||||||
            fileManagerMapper.removeByCaseIdAndFileIds(caseId, fileIds);
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        caseInformationMapper.updateById(caseInformation);
 | 
					 | 
				
			||||||
        return 0;
 | 
					        return 0;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    @Transactional(isolation = Isolation.DEFAULT, rollbackFor = Exception.class)
 | 
					 | 
				
			||||||
    public Boolean deleteCase(String ids) {
 | 
					    public Boolean deleteCase(String ids) {
 | 
				
			||||||
        try {
 | 
					        List<Long> longList = Arrays.stream(ids.split(","))
 | 
				
			||||||
            //逻辑删除案件信息
 | 
					                .map(Long::parseLong)
 | 
				
			||||||
            List<Long> longList = Arrays.stream(ids.split(","))
 | 
					                .collect(Collectors.toList());
 | 
				
			||||||
                    .map(Long::parseLong)
 | 
					        return caseInformationService.removeBatchByIds(longList);
 | 
				
			||||||
                    .collect(Collectors.toList());
 | 
					 | 
				
			||||||
            caseInformationMapper.removeByIds(longList);
 | 
					 | 
				
			||||||
            //逻辑删除案件相关律师信息
 | 
					 | 
				
			||||||
            caseLawyerMapper.deleteLawyerByCaseId(longList);
 | 
					 | 
				
			||||||
            //逻辑删除收款记录
 | 
					 | 
				
			||||||
            collectionRecordMapper.removeByCaseId(longList);
 | 
					 | 
				
			||||||
            //逻辑删除案件相关文件
 | 
					 | 
				
			||||||
            fileManagerMapper.removeByCaseId(longList);
 | 
					 | 
				
			||||||
            //将案件相关利冲信息设置为不需要检索,并将状态设置为停用、删除标志设置为已删除
 | 
					 | 
				
			||||||
            informationMapper.removeByCaseId(longList);
 | 
					 | 
				
			||||||
        } catch (Exception e) {
 | 
					 | 
				
			||||||
            throw new RuntimeException("案件删除失败");
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        return true;   //mybatis-plus自带的批量删除方法【逻辑删除】
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    @Override
 | 
					 | 
				
			||||||
    @Transactional(isolation = Isolation.DEFAULT, rollbackFor = Exception.class)
 | 
					 | 
				
			||||||
    public Boolean caseArchived(CaseArchivedVO caseArchivedVO) {
 | 
					 | 
				
			||||||
        try {
 | 
					 | 
				
			||||||
            Long caseId = caseArchivedVO.getCaseId();
 | 
					 | 
				
			||||||
            caseInformationMapper.caseArchived(caseId);
 | 
					 | 
				
			||||||
            List<FileManager> fileManager = caseArchivedVO.getFileManager();
 | 
					 | 
				
			||||||
            fileManager.stream().peek(item -> {
 | 
					 | 
				
			||||||
                item.setCaseId(caseId);
 | 
					 | 
				
			||||||
                item.setFileType(0);
 | 
					 | 
				
			||||||
            }).collect(Collectors.toList());
 | 
					 | 
				
			||||||
            fileManagerService.saveBatch(fileManager);
 | 
					 | 
				
			||||||
        } catch (Exception e) {
 | 
					 | 
				
			||||||
            throw new RuntimeException("案件归档失败");
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        return true;
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
| 
						 | 
					@ -431,7 +357,15 @@ public class CaseInformationServiceImpl extends ServiceImpl<CaseInformationMappe
 | 
				
			||||||
        List<ImpulseInformation> updateDate = newData.stream().filter(item -> CollUtil.contains(updateIds, item.getId())).collect(Collectors.toList());
 | 
					        List<ImpulseInformation> updateDate = newData.stream().filter(item -> CollUtil.contains(updateIds, item.getId())).collect(Collectors.toList());
 | 
				
			||||||
        List<ImpulseInformation> deleteData = oldData.stream().filter(item -> CollUtil.contains(deleteIds, item.getId())).collect(Collectors.toList());
 | 
					        List<ImpulseInformation> deleteData = oldData.stream().filter(item -> CollUtil.contains(deleteIds, item.getId())).collect(Collectors.toList());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /*if (!StringUtils.isEmpty(insert)){
 | 
				
			||||||
 | 
					            informationService.saveBatch(insert);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (!StringUtils.isEmpty(updateDate)){
 | 
				
			||||||
 | 
					            informationService.updateBatchById(updateDate);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        if (!StringUtils.isEmpty(deleteData)){
 | 
				
			||||||
 | 
					            informationMapper.deleteBatchLogic(deleteData);
 | 
				
			||||||
 | 
					        }*/
 | 
				
			||||||
        if (CollUtil.isNotEmpty(insert)) {
 | 
					        if (CollUtil.isNotEmpty(insert)) {
 | 
				
			||||||
            informationService.saveBatch(insert);
 | 
					            informationService.saveBatch(insert);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,21 +0,0 @@
 | 
				
			||||||
package com.tcctlo.law.vo;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import com.tcctlo.law.entity.FileManager;
 | 
					 | 
				
			||||||
import lombok.AllArgsConstructor;
 | 
					 | 
				
			||||||
import lombok.Data;
 | 
					 | 
				
			||||||
import lombok.NoArgsConstructor;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import java.util.List;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * 案件归档
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@Data
 | 
					 | 
				
			||||||
@NoArgsConstructor
 | 
					 | 
				
			||||||
@AllArgsConstructor
 | 
					 | 
				
			||||||
public class CaseArchivedVO {
 | 
					 | 
				
			||||||
    private Long caseId;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    private List<FileManager> fileManager;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
| 
						 | 
					@ -7,21 +7,10 @@
 | 
				
			||||||
    <sql id="baseColumn">
 | 
					    <sql id="baseColumn">
 | 
				
			||||||
        ci.id,ci.case_no,ci.case_name,ci.case_context,ci.business_type,ci.business_classify,ci.case_type,ci.agency_stage,ci.case_source,ci.amount_receivable,ci.amount_received_sum,ci.payment_deadline,ci.reserve_money,ci.term_of_consultancy,ci.collection_status,ci.impulse_state,ci.case_status,ci.audit_status,ci.archive_status,ci.is_finish_case,ci.audit_opinion,ci.impulse_information_ids,ci.case_lawyer_ids,ci.status,ci.del_flag,ci.create_by,ci.create_time,ci.update_by,ci.update_time,ci.remake
 | 
					        ci.id,ci.case_no,ci.case_name,ci.case_context,ci.business_type,ci.business_classify,ci.case_type,ci.agency_stage,ci.case_source,ci.amount_receivable,ci.amount_received_sum,ci.payment_deadline,ci.reserve_money,ci.term_of_consultancy,ci.collection_status,ci.impulse_state,ci.case_status,ci.audit_status,ci.archive_status,ci.is_finish_case,ci.audit_opinion,ci.impulse_information_ids,ci.case_lawyer_ids,ci.status,ci.del_flag,ci.create_by,ci.create_time,ci.update_by,ci.update_time,ci.remake
 | 
				
			||||||
    </sql>
 | 
					    </sql>
 | 
				
			||||||
    <update id="caseArchived">
 | 
					 | 
				
			||||||
        update case_information ci
 | 
					 | 
				
			||||||
        set ci.archive_status = 1
 | 
					 | 
				
			||||||
        where id = #{caseId}
 | 
					 | 
				
			||||||
    </update>
 | 
					 | 
				
			||||||
    <update id="removeByIds">
 | 
					 | 
				
			||||||
        update case_information ci
 | 
					 | 
				
			||||||
        set ci.del_flag = 1, ci.status = 1
 | 
					 | 
				
			||||||
        where id in
 | 
					 | 
				
			||||||
        <foreach collection="ids" item="id" open="(" separator="," close=")">
 | 
					 | 
				
			||||||
            #{id}
 | 
					 | 
				
			||||||
        </foreach>
 | 
					 | 
				
			||||||
    </update>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <select id="selectByCondition" resultType="com.tcctlo.law.entity.CaseInformation">
 | 
				
			||||||
 | 
					        select * from case_information
 | 
				
			||||||
 | 
					    </select>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <select id="selectCondition" resultType="com.tcctlo.law.vo.CaseInformationListVO" parameterType="map">
 | 
					    <select id="selectCondition" resultType="com.tcctlo.law.vo.CaseInformationListVO" parameterType="map">
 | 
				
			||||||
        select <include refid="baseColumn" /> from case_information ci
 | 
					        select <include refid="baseColumn" /> from case_information ci
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -17,15 +17,6 @@
 | 
				
			||||||
            #{id}
 | 
					            #{id}
 | 
				
			||||||
        </foreach>
 | 
					        </foreach>
 | 
				
			||||||
    </update>
 | 
					    </update>
 | 
				
			||||||
    <update id="deleteLawyerByCaseId">
 | 
					 | 
				
			||||||
        update case_lawyer cl
 | 
					 | 
				
			||||||
        set cl.status   = 1,
 | 
					 | 
				
			||||||
            cl.del_flag = 1
 | 
					 | 
				
			||||||
        where cl.case_id in
 | 
					 | 
				
			||||||
        <foreach collection="caseIds" item="id" open="(" separator="," close=")">
 | 
					 | 
				
			||||||
            #{id}
 | 
					 | 
				
			||||||
        </foreach>
 | 
					 | 
				
			||||||
    </update>
 | 
					 | 
				
			||||||
    <select id="selectAttorneyAgentLawByCaseId" resultType="com.tcctlo.law.entity.CaseLawyer">
 | 
					    <select id="selectAttorneyAgentLawByCaseId" resultType="com.tcctlo.law.entity.CaseLawyer">
 | 
				
			||||||
        select * from case_lawyer cl
 | 
					        select * from case_lawyer cl
 | 
				
			||||||
        <where>
 | 
					        <where>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,19 +16,6 @@
 | 
				
			||||||
        cr.update_time updateTime,
 | 
					        cr.update_time updateTime,
 | 
				
			||||||
        cr.remake remake
 | 
					        cr.remake remake
 | 
				
			||||||
    </sql>
 | 
					    </sql>
 | 
				
			||||||
    <update id="removeByCaseId">
 | 
					 | 
				
			||||||
        update collection_record cr
 | 
					 | 
				
			||||||
        set cr.del_flag = 1, cr.status = 1
 | 
					 | 
				
			||||||
        where case_id in
 | 
					 | 
				
			||||||
        <foreach collection="caseIds" item="id" open="(" separator="," close=")">
 | 
					 | 
				
			||||||
            #{id}
 | 
					 | 
				
			||||||
        </foreach>
 | 
					 | 
				
			||||||
    </update>
 | 
					 | 
				
			||||||
    <update id="removeByCaseIdAdnRecordId">
 | 
					 | 
				
			||||||
        update collection_record cr
 | 
					 | 
				
			||||||
        set cr.del_flag = 1, cr.status = 1
 | 
					 | 
				
			||||||
        where case_id = #{caseId} and id = #{id}
 | 
					 | 
				
			||||||
    </update>
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <select id="selectByCaseId" resultType="com.tcctlo.law.vo.CollectionRecordEnterVO">
 | 
					    <select id="selectByCaseId" resultType="com.tcctlo.law.vo.CollectionRecordEnterVO">
 | 
				
			||||||
        select <include refid="baseColumn"/> from collection_record cr
 | 
					        select <include refid="baseColumn"/> from collection_record cr
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,29 +3,12 @@
 | 
				
			||||||
<mapper namespace="com.tcctlo.law.mapper.FileManagerMapper">
 | 
					<mapper namespace="com.tcctlo.law.mapper.FileManagerMapper">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <insert id="insertBatch">
 | 
					    <insert id="insertBatch">
 | 
				
			||||||
        INSERT INTO file_manager (case_id, new_file_name, old_file_name, file_url, file_type)
 | 
					        INSERT INTO file_manager (case_id, new_file_name, old_file_name, file_url)
 | 
				
			||||||
        VALUES
 | 
					        VALUES
 | 
				
			||||||
        <foreach collection="list" item="item" separator=",">
 | 
					        <foreach collection="list" item="item" separator=",">
 | 
				
			||||||
            (#{item.caseId}, #{item.newFileName}, #{item.oldFileName}, #{item.fileurl}, #{item.fileType})
 | 
					            (#{item.caseId}, #{item.newFileName}, #{item.oldFileName}, #{item.fileurl})
 | 
				
			||||||
        </foreach>
 | 
					        </foreach>
 | 
				
			||||||
    </insert>
 | 
					    </insert>
 | 
				
			||||||
    <update id="removeByCaseId">
 | 
					 | 
				
			||||||
        update file_manager fm
 | 
					 | 
				
			||||||
        set fm.status = 1, fm.del_flag = 1
 | 
					 | 
				
			||||||
        where fm.case_id in
 | 
					 | 
				
			||||||
        <foreach collection="caseIds" item="id" open="(" separator="," close=")">
 | 
					 | 
				
			||||||
            #{id}
 | 
					 | 
				
			||||||
        </foreach>
 | 
					 | 
				
			||||||
    </update>
 | 
					 | 
				
			||||||
    <update id="removeByCaseIdAndFileIds">
 | 
					 | 
				
			||||||
        update file_manager fm
 | 
					 | 
				
			||||||
        set fm.status = 1, fm.del_flag = 1
 | 
					 | 
				
			||||||
        where fm.case_id = #{caseId}
 | 
					 | 
				
			||||||
        and fm.id in
 | 
					 | 
				
			||||||
        <foreach collection="fileIds" item="id" open="(" separator="," close=")">
 | 
					 | 
				
			||||||
            #{id}
 | 
					 | 
				
			||||||
        </foreach>
 | 
					 | 
				
			||||||
    </update>
 | 
					 | 
				
			||||||
    <select id="selectByCaseIdAndFileId" resultType="com.tcctlo.law.entity.FileManager">
 | 
					    <select id="selectByCaseIdAndFileId" resultType="com.tcctlo.law.entity.FileManager">
 | 
				
			||||||
        select * from file_manager fm
 | 
					        select * from file_manager fm
 | 
				
			||||||
        <where>
 | 
					        <where>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -19,16 +19,6 @@
 | 
				
			||||||
            #{item.id}
 | 
					            #{item.id}
 | 
				
			||||||
        </foreach>
 | 
					        </foreach>
 | 
				
			||||||
    </update>
 | 
					    </update>
 | 
				
			||||||
    <update id="removeByCaseId">
 | 
					 | 
				
			||||||
        update impulse_information ii
 | 
					 | 
				
			||||||
        set ii.del_flag = 1,
 | 
					 | 
				
			||||||
            ii.status = 1,
 | 
					 | 
				
			||||||
            ii.check_flag = 1
 | 
					 | 
				
			||||||
        where ii.case_id in
 | 
					 | 
				
			||||||
        <foreach collection="caseId" item="item" open="(" close=")" separator=",">
 | 
					 | 
				
			||||||
            #{item}
 | 
					 | 
				
			||||||
        </foreach>
 | 
					 | 
				
			||||||
    </update>
 | 
					 | 
				
			||||||
    <select id="selectByCaseId" resultType="com.tcctlo.law.entity.ImpulseInformation">
 | 
					    <select id="selectByCaseId" resultType="com.tcctlo.law.entity.ImpulseInformation">
 | 
				
			||||||
        select * from impulse_information ii
 | 
					        select * from impulse_information ii
 | 
				
			||||||
        <where>
 | 
					        <where>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue