result = iIndexService.lawInfo(searcher);
+ return AjaxResult.success(result);
}
}
diff --git a/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/AuditRecord.java b/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/AuditRecord.java
index 14f6aadb..b3c7995e 100644
--- a/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/AuditRecord.java
+++ b/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/AuditRecord.java
@@ -88,6 +88,6 @@ public class AuditRecord implements Serializable {
/**
* 备注
*/
- private String remake;
+ private String remark;
}
diff --git a/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/CaseInformation.java b/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/CaseInformation.java
index 6a9a2503..15676f06 100644
--- a/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/CaseInformation.java
+++ b/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/CaseInformation.java
@@ -1,4 +1,5 @@
package com.tcctlo.law.entity;
+
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.*;
@@ -12,6 +13,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.JsonNode;
import lombok.Data;
import lombok.EqualsAndHashCode;
+
/**
*
* 案件信息表
@@ -93,7 +95,7 @@ public class CaseInformation implements Serializable {
/**
* 付款期限备注
*/
- private String paymentDeadlineRemake;
+ private String paymentDeadlineRemark;
/**
* 预留款
@@ -154,13 +156,24 @@ public class CaseInformation implements Serializable {
/**
* 案件涉及律师ID集合
+ * FIXME 关联的地方进行修改后,将该字段删除
*/
- private String caseLawyerIds;
+// private String caseLawyerIds;
+
+ /**
+ * 委托律师
+ */
+ private Long entrustedLawyerId;
+
+ /**
+ * 协办律师,多个逗号分隔
+ */
+ private String coLawyerIds;
/**
* 案件信息备注
*/
- private String caseRemake;
+ private String caseRemark;
/**
* 状态【0:正常,1:停用】
@@ -198,6 +211,18 @@ public class CaseInformation implements Serializable {
/**
* 备注
*/
- private String remake;
+ private String remark;
+
+ /**
+ * 委托律师姓名
+ */
+ @TableField(exist = false)
+ private String entrustedLawyerName;
+
+ /**
+ * 协办律师姓名,多个英文逗号分隔
+ */
+ @TableField(exist = false)
+ private String coLawyerNames;
}
diff --git a/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/CaseLawyer.java b/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/CaseLawyer.java
index f7bc42e5..aebfa1f8 100644
--- a/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/CaseLawyer.java
+++ b/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/CaseLawyer.java
@@ -87,6 +87,6 @@ public class CaseLawyer implements Serializable {
/**
* 备注
*/
- private String remake;
+ private String remark;
}
diff --git a/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/CollectionRecord.java b/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/CollectionRecord.java
index 1e478208..e837d664 100644
--- a/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/CollectionRecord.java
+++ b/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/CollectionRecord.java
@@ -47,8 +47,13 @@ public class CollectionRecord implements Serializable {
/**
* 收款相关凭证【关联文件管理表ID】
+ * FIXME 修改完成后,将该字段删除,需要前端做调整
*/
- private String collectionUrlId;
+// private String collectionUrlId;
+
+
+ /** 收款记录凭证地址,多条收款凭证英文逗号分隔 */
+ private String collectionUrl;
/**
* 收款时间
@@ -59,7 +64,7 @@ public class CollectionRecord implements Serializable {
/**
* 收款记录
*/
- private String collectionRemake;
+ private String collectionRemark;
/**
* 收款人ID
@@ -112,6 +117,6 @@ public class CollectionRecord implements Serializable {
/**
* 备注
*/
- private String remake;
+ private String remark;
}
diff --git a/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/ContractFormParameter.java b/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/ContractFormParameter.java
index d09ef6b9..66cc3dac 100644
--- a/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/ContractFormParameter.java
+++ b/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/ContractFormParameter.java
@@ -86,6 +86,6 @@ public class ContractFormParameter implements Serializable {
/**
* 备注
*/
- private String remake;
+ private String remark;
}
diff --git a/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/ContractTemplate.java b/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/ContractTemplate.java
index b306f783..1d03ad97 100644
--- a/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/ContractTemplate.java
+++ b/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/ContractTemplate.java
@@ -125,6 +125,6 @@ public class ContractTemplate implements Serializable {
/**
* 备注
*/
- private String remake;
+ private String remark;
}
diff --git a/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/DemandPaymentRecord.java b/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/DemandPaymentRecord.java
index 12c6d29c..651a0300 100644
--- a/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/DemandPaymentRecord.java
+++ b/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/DemandPaymentRecord.java
@@ -87,6 +87,6 @@ public class DemandPaymentRecord implements Serializable {
/**
* 备注
*/
- private String remake;
+ private String remark;
}
diff --git a/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/FileManager.java b/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/FileManager.java
index 5f32bcad..a6db4962 100644
--- a/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/FileManager.java
+++ b/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/FileManager.java
@@ -93,6 +93,6 @@ public class FileManager implements Serializable {
/**
* 备注
*/
- private String remake;
+ private String remark;
}
diff --git a/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/ImpulseInformation.java b/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/ImpulseInformation.java
index 19d4c521..7e0817ab 100644
--- a/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/ImpulseInformation.java
+++ b/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/ImpulseInformation.java
@@ -107,6 +107,6 @@ public class ImpulseInformation implements Serializable {
/**
* 备注
*/
- private String remake;
+ private String remark;
}
diff --git a/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/InvoiceRecord.java b/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/InvoiceRecord.java
index 9b5cb2bc..8659f056 100644
--- a/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/InvoiceRecord.java
+++ b/tcctlo-law-office/src/main/java/com/tcctlo/law/entity/InvoiceRecord.java
@@ -101,6 +101,6 @@ public class InvoiceRecord implements Serializable {
/**
* 备注
*/
- private String remake;
+ private String remark;
}
diff --git a/tcctlo-law-office/src/main/java/com/tcctlo/law/mapper/CaseInformationMapper.java b/tcctlo-law-office/src/main/java/com/tcctlo/law/mapper/CaseInformationMapper.java
index b514ce2d..cfcbc915 100644
--- a/tcctlo-law-office/src/main/java/com/tcctlo/law/mapper/CaseInformationMapper.java
+++ b/tcctlo-law-office/src/main/java/com/tcctlo/law/mapper/CaseInformationMapper.java
@@ -3,7 +3,9 @@ package com.tcctlo.law.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tcctlo.law.entity.CaseInformation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.tcctlo.law.searcher.TimeSearcher;
import com.tcctlo.law.vo.CaseInformationListVO;
+import com.tcctlo.law.vo.IndexLawCaseMoneyInfo;
import com.tcctlo.law.vo.IndexLawInfo;
import org.apache.ibatis.annotations.Param;
@@ -124,7 +126,7 @@ public interface CaseInformationMapper extends BaseMapper {
* @param params 参数
* @return 结案结果
*/
- Boolean caseClosed(@Param("params") Map params);
+ Integer caseClosed(@Param("params") Map params);
/**
* 根据业务类型查询案件数量
@@ -253,4 +255,10 @@ public interface CaseInformationMapper extends BaseMapper {
* @return 结果集
*/
BigDecimal selectLawCaseMoneyCount(@Param("lawId") Long lawId);
+
+ /**
+ * 统计所有律师的案件信息及已收款信息
+ * @return
+ */
+ List staticCaseNumAndMoney(TimeSearcher searcher);
}
diff --git a/tcctlo-law-office/src/main/java/com/tcctlo/law/mapper/ImpulseInformationMapper.java b/tcctlo-law-office/src/main/java/com/tcctlo/law/mapper/ImpulseInformationMapper.java
index 96eb3ae5..142344fc 100644
--- a/tcctlo-law-office/src/main/java/com/tcctlo/law/mapper/ImpulseInformationMapper.java
+++ b/tcctlo-law-office/src/main/java/com/tcctlo/law/mapper/ImpulseInformationMapper.java
@@ -21,6 +21,7 @@ public interface ImpulseInformationMapper extends BaseMapper
/**
* 批量插入
+ *
* @param list 数据集
* @return 受影响行数
*/
@@ -28,6 +29,7 @@ public interface ImpulseInformationMapper extends BaseMapper
/**
* 批量软删除
+ *
* @param list 参数
* @return 结果集
*/
@@ -36,7 +38,8 @@ public interface ImpulseInformationMapper extends BaseMapper
/**
* 根据案件id查询
- * @param caseId 案件ID
+ *
+ * @param caseId 案件ID
* @param clientFlag 是否委托方标志
* @return 结果集
*/
@@ -44,6 +47,7 @@ public interface ImpulseInformationMapper extends BaseMapper
/**
* 查询修改后的【委托方】+【相对方】信息
+ *
* @param caseId 案件ID
* @return 结果集
*/
@@ -51,6 +55,7 @@ public interface ImpulseInformationMapper extends BaseMapper
/**
* 利冲检索
+ *
* @param impulseInformation 检索数据
* @return 结果集
*/
@@ -58,6 +63,7 @@ public interface ImpulseInformationMapper extends BaseMapper
/**
* 根据案件ID批量删除
+ *
* @param caseId 案件ID集合
* @return 结果集
*/
@@ -66,7 +72,8 @@ public interface ImpulseInformationMapper extends BaseMapper
/**
* 分页条件查询
- * @param page 分页
+ *
+ * @param page 分页
* @param condition 条件
* @return 结果集
*/
@@ -74,8 +81,17 @@ public interface ImpulseInformationMapper extends BaseMapper
/**
* 根据案件ID查询利冲信息,在审核时做利冲消息提示
+ *
* @param caseId 案件ID
* @return 结果集
*/
List auditClashMsg(Long caseId);
+
+ /**
+ * 根据caseId将利冲信息表中关联案件的利冲信息置为无需检索
+ *
+ * @param caseId
+ * @return
+ */
+ Integer updateByCaseId(@Param("caseId") Long caseId);
}
diff --git a/tcctlo-law-office/src/main/java/com/tcctlo/law/searcher/CaseInformationEnterSearcher.java b/tcctlo-law-office/src/main/java/com/tcctlo/law/searcher/CaseInformationEnterSearcher.java
new file mode 100644
index 00000000..e2be02a7
--- /dev/null
+++ b/tcctlo-law-office/src/main/java/com/tcctlo/law/searcher/CaseInformationEnterSearcher.java
@@ -0,0 +1,42 @@
+package com.tcctlo.law.searcher;
+
+import com.tcctlo.law.entity.CaseInformation;
+import com.tcctlo.law.entity.CaseLawyer;
+import com.tcctlo.law.entity.ImpulseInformation;
+import com.tcctlo.law.vo.CollectionRecordEnterVO;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.List;
+
+@Data
+public class CaseInformationEnterSearcher implements Serializable {
+
+ private static final long serialVersionUID = 4014133758567882903L;
+ /**
+ * 案件未收款的金额
+ */
+ private BigDecimal uncollectedMoney;
+
+ /**
+ * 案件信息
+ */
+ private CaseInformation caseInformation;
+
+ /**
+ * 利冲信息-委托方信息
+ */
+ private List entrustingParty;
+
+ /**
+ * 利冲信息-相对方
+ */
+ private List opposite;
+
+ /**
+ * 案件收款记录信息
+ */
+ private List collectionRecordList;
+
+}
diff --git a/tcctlo-law-office/src/main/java/com/tcctlo/law/searcher/CollectionRecordSearcher.java b/tcctlo-law-office/src/main/java/com/tcctlo/law/searcher/CollectionRecordSearcher.java
new file mode 100644
index 00000000..ce8135c0
--- /dev/null
+++ b/tcctlo-law-office/src/main/java/com/tcctlo/law/searcher/CollectionRecordSearcher.java
@@ -0,0 +1,62 @@
+package com.tcctlo.law.searcher;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+public class CollectionRecordSearcher implements Serializable {
+
+ private static final long serialVersionUID = 3318529006642229496L;
+
+ /**
+ * 主键ID
+ */
+ private Long id;
+
+
+ /**
+ * 关联案件表id
+ */
+ private Long caseId;
+
+ /**
+ * 收款方式
+ */
+ private String collectionType;
+
+ /**
+ * 已收金额
+ */
+ private BigDecimal amountReceived;
+
+
+ /** 收款记录凭证地址,多条收款凭证英文逗号分隔 */
+ private String collectionUrl;
+
+ /**
+ * 收款时间
+ */
+ @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ private Date collectionDate;
+
+ /**
+ * 收款记录备注
+ */
+ private String collectionRemark;
+
+ /**
+ * 收款人ID
+ */
+ private Long userId;
+
+ /**
+ * 收款人名称
+ */
+ private String userName;
+
+}
diff --git a/tcctlo-law-office/src/main/java/com/tcctlo/law/searcher/TimeSearcher.java b/tcctlo-law-office/src/main/java/com/tcctlo/law/searcher/TimeSearcher.java
new file mode 100644
index 00000000..330b29aa
--- /dev/null
+++ b/tcctlo-law-office/src/main/java/com/tcctlo/law/searcher/TimeSearcher.java
@@ -0,0 +1,21 @@
+package com.tcctlo.law.searcher;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class TimeSearcher implements Serializable {
+
+ private static final long serialVersionUID = 4196456675491042591L;
+
+ /** 开始时间 */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date startTime;
+
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ /** 结束时间 */
+ private Date endTime;
+}
diff --git a/tcctlo-law-office/src/main/java/com/tcctlo/law/service/ICaseInformationService.java b/tcctlo-law-office/src/main/java/com/tcctlo/law/service/ICaseInformationService.java
index 84a00576..b10158e0 100644
--- a/tcctlo-law-office/src/main/java/com/tcctlo/law/service/ICaseInformationService.java
+++ b/tcctlo-law-office/src/main/java/com/tcctlo/law/service/ICaseInformationService.java
@@ -5,7 +5,9 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.tcctlo.law.entity.CaseInformation;
import com.tcctlo.law.entity.CaseStatistics;
import com.tcctlo.law.entity.FileManager;
+import com.tcctlo.law.searcher.CaseInformationEnterSearcher;
import com.tcctlo.law.vo.CaseArchivedVO;
+import com.tcctlo.law.vo.CaseInformationEnterOverrideVO;
import com.tcctlo.law.vo.CaseInformationEnterVO;
import com.tcctlo.law.vo.CaseInformationListVO;
@@ -88,21 +90,21 @@ public interface ICaseInformationService extends IService{
* @param caseInfo 案件信息
* @return 是否录入成功
*/
- Boolean enterCaseInfo(CaseInformationEnterVO caseInfo);
+// Boolean enterCaseInfo(CaseInformationEnterVO caseInfo);
/**
* 根据案件ID查询案件详细信息
* @param id 案件ID
* @return 结果集
*/
- CaseInformationEnterVO selectCaseInfoById(Long id);
+// CaseInformationEnterVO selectCaseInfoById(Long id);
/**
* 案件信息修改
* @param params 案件信息
* @return 受影响行数
*/
- Boolean updateCaseInfo(CaseInformationEnterVO params);
+// Boolean updateCaseInfo(CaseInformationEnterVO params);
/**
* 删除案件信息
@@ -145,7 +147,7 @@ public interface ICaseInformationService extends IService{
* @param params 参数
* @return 是否结案成功
*/
- Boolean caseClosed(Map params);
+ Integer caseClosed(Map params);
/**
* 案件相关文件上传
@@ -159,4 +161,25 @@ public interface ICaseInformationService extends IService{
*/
Map> statisticsCaseStatus(Integer type);
+ /**
+ *
+ * 案件信息录入
+ * @param searcher
+ * @return
+ */
+ Integer enterCaseInfo2(CaseInformationEnterSearcher searcher);
+
+ /**
+ * 案件信息详情接口
+ * @param id
+ * @return
+ */
+ CaseInformationEnterOverrideVO selectCaseInfoByIdOverride(Long id);
+
+ /**
+ * 案件信息修改接口
+ * @param params
+ * @return
+ */
+ Integer updateCaseInfoOverride(CaseInformationEnterSearcher params);
}
diff --git a/tcctlo-law-office/src/main/java/com/tcctlo/law/service/ICollectionRecordService.java b/tcctlo-law-office/src/main/java/com/tcctlo/law/service/ICollectionRecordService.java
index 6c772cb1..fb10502f 100644
--- a/tcctlo-law-office/src/main/java/com/tcctlo/law/service/ICollectionRecordService.java
+++ b/tcctlo-law-office/src/main/java/com/tcctlo/law/service/ICollectionRecordService.java
@@ -75,14 +75,14 @@ public interface ICollectionRecordService extends IService {
*
* @param params 参数
*/
- void casePayment(CollectionRecordEnterVO params);
+// void casePayment(CollectionRecordEnterVO params);
- /**
- * 批量案件缴费
- *
- * @param params 参数
- */
- Boolean casePaymentBatch(List params);
+// /**
+// * 批量案件缴费
+// *
+// * @param params 参数
+// */
+// Boolean casePaymentBatch(List params);
/**
* 逻辑删除缴费记录
diff --git a/tcctlo-law-office/src/main/java/com/tcctlo/law/service/IIndexService.java b/tcctlo-law-office/src/main/java/com/tcctlo/law/service/IIndexService.java
index 57786410..60876d69 100644
--- a/tcctlo-law-office/src/main/java/com/tcctlo/law/service/IIndexService.java
+++ b/tcctlo-law-office/src/main/java/com/tcctlo/law/service/IIndexService.java
@@ -1,6 +1,8 @@
package com.tcctlo.law.service;
import com.tcctlo.law.entity.IndexStatistics;
+import com.tcctlo.law.searcher.TimeSearcher;
+import com.tcctlo.law.vo.IndexLawCaseMoneyInfo;
import java.util.Date;
import java.util.List;
@@ -44,5 +46,5 @@ public interface IIndexService {
* 所有律师信息
* @return 结果集
*/
- Object lawInfo();
+ List lawInfo(TimeSearcher searcher);
}
diff --git a/tcctlo-law-office/src/main/java/com/tcctlo/law/service/impl/CaseInformationServiceImpl.java b/tcctlo-law-office/src/main/java/com/tcctlo/law/service/impl/CaseInformationServiceImpl.java
index 13f7cad4..0c529b17 100644
--- a/tcctlo-law-office/src/main/java/com/tcctlo/law/service/impl/CaseInformationServiceImpl.java
+++ b/tcctlo-law-office/src/main/java/com/tcctlo/law/service/impl/CaseInformationServiceImpl.java
@@ -3,24 +3,30 @@ package com.tcctlo.law.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tcctlo.common.core.domain.entity.SysRole;
+import com.tcctlo.common.core.domain.entity.SysUser;
import com.tcctlo.common.core.domain.model.LoginUser;
import com.tcctlo.common.utils.SecurityUtils;
import com.tcctlo.common.utils.StringUtils;
import com.tcctlo.law.CaseEnum;
import com.tcctlo.law.entity.*;
import com.tcctlo.law.mapper.*;
+import com.tcctlo.law.searcher.CaseInformationEnterSearcher;
+import com.tcctlo.law.searcher.CollectionRecordSearcher;
import com.tcctlo.law.service.*;
import com.tcctlo.law.tools.RedisGenerateCaseNo;
import com.tcctlo.law.tools.RichTextToWordSimple;
import com.tcctlo.law.vo.*;
import com.tcctlo.system.mapper.SysUserMapper;
+import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import java.math.BigDecimal;
@@ -73,7 +79,7 @@ public class CaseInformationServiceImpl extends ServiceImpl list(Integer pageNo, Integer pageSize, Map params) {
LoginUser loginUser = SecurityUtils.getLoginUser();
@@ -176,7 +183,7 @@ public class CaseInformationServiceImpl extends ServiceImpl sysUserList = sysUserMapper.queryUserList();
+ Map userIdAndNameMap = new HashMap<>();
+ if (!CollectionUtils.isEmpty(sysUserList)) {
+ for (SysUser sysUser : sysUserList) {
+ userIdAndNameMap.put(sysUser.getUserId(), sysUser.getNickName());
+ }
+ }
+ item.setEntrustedLawyerName(userIdAndNameMap.get(item.getEntrustedLawyerId()));
+ // 考虑协办律师可能为空的情况,需要进行判空处理
+ if (!StringUtils.isEmpty(item.getCoLawyerIds())) {
+ List coLawyerIds = Arrays.asList(item.getCoLawyerIds().split(","));
+ List coLawyerNames = new ArrayList<>();
+ for (String coLawyerId : coLawyerIds) {
+ coLawyerNames.add(userIdAndNameMap.get(Long.parseLong(coLawyerId)));
+ }
+ item.setCoLawyerNames(StringUtils.join(coLawyerNames, ","));
}
- List assistingLawyer = caseLawyerMapper.selectAssistingLawyerByCaseId(item.getId());
- if (CollUtil.isNotEmpty(assistingLawyer)) {
- item.setAssistingLawyer(assistingLawyer.stream().map(CaseLawyer::getLawyerName).collect(Collectors.joining(",")));
- }
+// List assistingLawyer = caseLawyerMapper.selectAssistingLawyerByCaseId(item.getId());
+// if (CollUtil.isNotEmpty(assistingLawyer)) {
+// item.setAssistingLawyer(assistingLawyer.stream().map(CaseLawyer::getLawyerName).collect(Collectors.joining(",")));
+// }
item.setUncollectedMoney(item.getAmountReceivable().subtract(item.getAmountReceivedSum()));
- int fileNum = caseInformationMapper.selectCaseFileNum(item.getId());
- item.setFileFlag(fileNum > 0);
- item.setFileList(fileManagerMapper.selectFileByCaseId(item.getId()));
+// int fileNum = caseInformationMapper.selectCaseFileNum(item.getId());
+// item.setFileFlag(fileNum > 0);
+// item.setFileList(fileManagerMapper.selectFileByCaseId(item.getId()));
//开票状态
List invoiceRecords = invoiceRecordMapper.selectByCaseId(item.getId());
- if (invoiceRecords.size() > 0){
+ if (invoiceRecords.size() > 0) {
String invoiceMonet = invoiceRecords.stream().map(InvoiceRecord::getInvoiceMoney).collect(Collectors.toList()).stream().reduce(BigDecimal.ZERO, BigDecimal::add).toString();
item.setInvoiceStatus(invoiceMonet);
- }else {
+ } else {
item.setInvoiceStatus("0");
}
@@ -224,8 +249,23 @@ public class CaseInformationServiceImpl extends ServiceImpl sysUserList = sysUserMapper.queryUserList();
+ Map userIdAndNameMap = new HashMap<>();
+ if (!CollectionUtils.isEmpty(sysUserList)) {
+ for (SysUser sysUser : sysUserList) {
+ userIdAndNameMap.put(sysUser.getUserId(), sysUser.getNickName());
+ }
+ }
+ item.setEntrustedLawyerName(userIdAndNameMap.get(item.getEntrustedLawyerId()));
+ // 考虑协办律师可能为空的情况,需要进行判空处理
+ if (!StringUtils.isEmpty(item.getCoLawyerIds())) {
+ List coLawyerIds = Arrays.asList(item.getCoLawyerIds().split(","));
+ List coLawyerNames = new ArrayList<>();
+ for (String coLawyerId : coLawyerIds) {
+ coLawyerNames.add(userIdAndNameMap.get(Long.parseLong(coLawyerId)));
+ }
+ item.setCoLawyerNames(StringUtils.join(coLawyerNames, ","));
+ }
return item;
}
@@ -324,237 +364,236 @@ public class CaseInformationServiceImpl extends ServiceImpl impulseInformationList = new ArrayList<>();
+// List entrustingParty = caseInfo.getEntrustingParty();
+// if (CollUtil.isNotEmpty(entrustingParty)) {
+// impulseInformationList.addAll(caseInfo.getEntrustingParty().stream().peek(item -> {
+// item.setCaseId(caseId);
+// item.setIsClient(0);
+// }).collect(Collectors.toList()));
+// }
+// List opposite = caseInfo.getOpposite();
+// if (CollUtil.isNotEmpty(opposite)) {
+// impulseInformationList.addAll(caseInfo.getOpposite().stream().peek(item -> {
+// item.setCaseId(caseId);
+// item.setIsClient(1);
+// }).collect(Collectors.toList()));
+// }
+// impulseInformationService.saveBatch(impulseInformationList);
+// List impulseInformationIds = impulseInformationList.stream().map(item -> item.getId()).collect(Collectors.toList());
+// caseInformation.setImpulseInformationIds(StringUtils.join(impulseInformationIds, ","));
+//
+// //插入案件关联律师数据
+// List caseLawyerList = new ArrayList<>();
+// CaseLawyer attorneyAgent = caseInfo.getAttorneyAgent();
+// if (BeanUtil.isNotEmpty(attorneyAgent)) {
+// attorneyAgent.setLawyerType(0);
+// attorneyAgent.setCaseId(caseId);
+// caseLawyerList.add(attorneyAgent); //代理律师
+// }
+// List assistingLawyer = caseInfo.getAssistingLawyer();
+// if (CollUtil.isNotEmpty(assistingLawyer)) {
+// caseLawyerList.addAll(assistingLawyer.stream().peek(item -> {
+// item.setCaseId(caseId);
+// item.setLawyerType(1);
+// }).collect(Collectors.toList())); //协办律师
+// }
+// caseLawyerService.saveBatch(caseLawyerList);
+// List caseLawyerIds = caseLawyerList.stream().map(item -> item.getLawyerId()).collect(Collectors.toList());
+// caseInformation.setCaseLawyerIds(StringUtils.join(caseLawyerIds, ","));
+// caseInformationMapper.updateById(caseInformation); //更新案件表中的律师IDS和利冲信息IDS
+//
+// //插入案件关联收款记录信息【收款记录文件插入】
+// List collectionRecordList = caseInfo.getCollectionRecordList();
+// if (CollUtil.isNotEmpty(collectionRecordList)) {
+// collectionRecordList.forEach(item -> {
+// item.setCaseId(caseId);
+// List fileManagerList = item.getFileManager().stream().peek(i -> {
+// i.setCaseId(caseId);
+// i.setFileType(1); //设置文件类型为【收款记录文件】
+// }).collect(Collectors.toList());
+// fileManagerService.saveBatch(fileManagerList);
+// List fileIds = fileManagerList.stream().map(FileManager::getId).collect(Collectors.toList());
+// item.setCollectionUrlId(StringUtils.join(fileIds, ","));
+// item.setUserId(userId);
+// item.setUserName(nickName);
+// String collect = loginUser.getUser().getRoles().stream().map(SysRole::getRoleKey).collect(Collectors.joining(","));
+// if (!collect.contains("FINANCE")) {
+// item.setAuditStatus(0);
+// } else {
+// item.setAuditStatus(1);
+// }
+// collectionRecordMapper.insert(item);
+// });
+// }
+// } catch (Exception e) {
+// throw new RuntimeException("案件录入失败");
+// }
+// return true;
+// }
- LoginUser loginUser = SecurityUtils.getLoginUser();
- Long userId = loginUser.getUserId();
- String username = loginUser.getUsername();
- String nickName = loginUser.getUser().getNickName();
- try {
- CaseInformation caseInformation = caseInfo.getCaseInformation(); //案件信息
- caseInformation.setCaseNo(redisGenerateCaseNo.generateCaseNo(Integer.parseInt(caseInformation.getBusinessClassify()))); //生成案件编号
+// @Override
+// public CaseInformationEnterVO selectCaseInfoById(Long id) {
+// CaseInformationEnterVO result = new CaseInformationEnterVO();
+// //案件信息表----caseInformation
+// CaseInformation caseInformation = caseInformationMapper.selectCaseInfoById(id);
+// result.setCaseInformation(caseInformation);
+//
+// //设置案件未收金额
+// result.setUncollectedMoney(caseInformation.getAmountReceivable().subtract(caseInformation.getAmountReceivedSum()));
+//
+// //案件关联【委托方】----entrustingParty
+// result.setEntrustingParty(informationMapper.selectByCaseId(id, 0));
+//
+// //案件关联【相对方】----opposite
+// result.setOpposite(informationMapper.selectByCaseId(id, 1));
+//
+// //代理律师----attorneyAgent
+// result.setAttorneyAgent(caseLawyerMapper.selectAttorneyAgentLawByCaseId(id));
+//
+// //协办律师----assistingLawyer
+// result.setAssistingLawyer(caseLawyerMapper.selectAssistingLawyerByCaseId(id));
+//
+// /**
+// * 收款记录----collectionRecordList
+// * 收款记录基本信息
+// * 收款记录文件
+// */
+// List records = collectionRecordMapper.selectByCaseId(id);
+// result.setCollectionRecordList(records);
+// records.stream().peek(item -> {
+// if (StringUtils.isNotBlank(item.getCollectionUrlId())) {
+// List fileIds = Arrays.stream(item.getCollectionUrlId().split(","))
+// .map(Long::parseLong)
+// .collect(Collectors.toList());
+// item.setFileManager(fileManagerMapper.selectBatchIds(fileIds));
+// }
+// }).collect(Collectors.toList());
+// return result;
+// }
-
-
- caseInformationMapper.insert(caseInfo.getCaseInformation()); //插入案件信息
- Long caseId = caseInformation.getId(); //获取案件ID
-
- Date paymentDeadline = caseInformation.getPaymentDeadline();
- if (paymentDeadline != null) {
- if (DateUtil.compare(paymentDeadline, new Date()) < 0 && caseInformation.getAmountReceivedSum().compareTo(caseInformation.getAmountReceivable()) < 0) {
- caseInformationMapper.updateCollectionStatus(caseId,3);
- }
- }
-
-
- //插入案件关联利冲信息【设置委托方和相对方】
- List impulseInformationList = new ArrayList<>();
- List entrustingParty = caseInfo.getEntrustingParty();
- if (CollUtil.isNotEmpty(entrustingParty)) {
- impulseInformationList.addAll(caseInfo.getEntrustingParty().stream().peek(item -> {
- item.setCaseId(caseId);
- item.setIsClient(0);
- }).collect(Collectors.toList()));
- }
- List opposite = caseInfo.getOpposite();
- if (CollUtil.isNotEmpty(opposite)) {
- impulseInformationList.addAll(caseInfo.getOpposite().stream().peek(item -> {
- item.setCaseId(caseId);
- item.setIsClient(1);
- }).collect(Collectors.toList()));
- }
- informationService.saveBatch(impulseInformationList);
- List impulseInformationIds = impulseInformationList.stream().map(item -> item.getId()).collect(Collectors.toList());
- caseInformation.setImpulseInformationIds(StringUtils.join(impulseInformationIds, ","));
-
- //插入案件关联律师数据
- List caseLawyerList = new ArrayList<>();
- CaseLawyer attorneyAgent = caseInfo.getAttorneyAgent();
- if (BeanUtil.isNotEmpty(attorneyAgent)) {
- attorneyAgent.setLawyerType(0);
- attorneyAgent.setCaseId(caseId);
- caseLawyerList.add(attorneyAgent); //代理律师
- }
- List assistingLawyer = caseInfo.getAssistingLawyer();
- if (CollUtil.isNotEmpty(assistingLawyer)) {
- caseLawyerList.addAll(assistingLawyer.stream().peek(item -> {
- item.setCaseId(caseId);
- item.setLawyerType(1);
- }).collect(Collectors.toList())); //协办律师
- }
- caseLawyerService.saveBatch(caseLawyerList);
- List caseLawyerIds = caseLawyerList.stream().map(item -> item.getLawyerId()).collect(Collectors.toList());
- caseInformation.setCaseLawyerIds(StringUtils.join(caseLawyerIds, ","));
- caseInformationMapper.updateById(caseInformation); //更新案件表中的律师IDS和利冲信息IDS
-
- //插入案件关联收款记录信息【收款记录文件插入】
- List collectionRecordList = caseInfo.getCollectionRecordList();
- if (CollUtil.isNotEmpty(collectionRecordList)) {
- collectionRecordList.forEach(item -> {
- item.setCaseId(caseId);
- List fileManagerList = item.getFileManager().stream().peek(i -> {
- i.setCaseId(caseId);
- i.setFileType(1); //设置文件类型为【收款记录文件】
- }).collect(Collectors.toList());
- fileManagerService.saveBatch(fileManagerList);
- List fileIds = fileManagerList.stream().map(FileManager::getId).collect(Collectors.toList());
- item.setCollectionUrlId(StringUtils.join(fileIds, ","));
- item.setUserId(userId);
- item.setUserName(nickName);
- String collect = loginUser.getUser().getRoles().stream().map(SysRole::getRoleKey).collect(Collectors.joining(","));
- if (!collect.contains("FINANCE")) {
- item.setAuditStatus(0);
- } else {
- item.setAuditStatus(1);
- }
- collectionRecordMapper.insert(item);
- });
- }
- } catch (Exception e) {
- throw new RuntimeException("案件录入失败");
- }
- return true;
- }
-
- @Override
- public CaseInformationEnterVO selectCaseInfoById(Long id) {
- CaseInformationEnterVO result = new CaseInformationEnterVO();
- //案件信息表----caseInformation
- CaseInformation caseInformation = caseInformationMapper.selectCaseInfoById(id);
- result.setCaseInformation(caseInformation);
-
- //设置案件未收金额
- result.setUncollectedMoney(caseInformation.getAmountReceivable().subtract(caseInformation.getAmountReceivedSum()));
-
- //案件关联【委托方】----entrustingParty
- result.setEntrustingParty(informationMapper.selectByCaseId(id, 0));
-
- //案件关联【相对方】----opposite
- result.setOpposite(informationMapper.selectByCaseId(id, 1));
-
- //代理律师----attorneyAgent
- result.setAttorneyAgent(caseLawyerMapper.selectAttorneyAgentLawByCaseId(id));
-
- //协办律师----assistingLawyer
- result.setAssistingLawyer(caseLawyerMapper.selectAssistingLawyerByCaseId(id));
-
- /**
- * 收款记录----collectionRecordList
- * 收款记录基本信息
- * 收款记录文件
- */
- List records = collectionRecordMapper.selectByCaseId(id);
- result.setCollectionRecordList(records);
- records.stream().peek(item -> {
- if (StringUtils.isNotBlank(item.getCollectionUrlId())) {
- List fileIds = Arrays.stream(item.getCollectionUrlId().split(","))
- .map(Long::parseLong)
- .collect(Collectors.toList());
- item.setFileManager(fileManagerMapper.selectBatchIds(fileIds));
- }
- }).collect(Collectors.toList());
- return result;
- }
-
- @Override
- @Transactional(isolation = Isolation.DEFAULT, rollbackFor = Exception.class)
- public Boolean updateCaseInfo(CaseInformationEnterVO params) {
-
- LoginUser loginUser = SecurityUtils.getLoginUser();
- Long userId = loginUser.getUserId();
- String username = loginUser.getUsername();
- String nickName = loginUser.getUser().getNickName();
- try {
- //案件信息表----caseInformation
- CaseInformation caseInformation = params.getCaseInformation();
- Long caseId = caseInformation.getId();
-
- //案件关联【委托方】----entrustingParty--从数据库获取出原来的委托方信息与通过接口传入的进行比对
- List oldImpulse = informationMapper.selectByCaseId(params.getCaseInformation().getId(), 0);
- List newImpulse = params.getEntrustingParty();
- editImpulseInformation(oldImpulse, newImpulse, caseId);
-
- //案件关联【相对方】----opposite
- List oldOpposite = informationMapper.selectByCaseId(params.getCaseInformation().getId(), 1);
- List newOpposite = params.getOpposite();
- editImpulseInformation(oldOpposite, newOpposite, caseId);
- caseInformation.setImpulseInformationIds(informationMapper.selectByCaseIdAdnDelFlag(params.getCaseInformation().getId()).stream().map(i -> i.getId().toString()).collect(Collectors.joining(",")));
-
-
- //代理律师----attorneyAgent----修改原来的律师信息
- CaseLawyer newAttorneyAgent = params.getAttorneyAgent();
- if (BeanUtil.isNotEmpty(newAttorneyAgent)) {
- if (newAttorneyAgent.getId() == null) {
- CaseLawyer oldCaseLawyer = caseLawyerMapper.selectAttorneyAgentLawByCaseId(params.getCaseInformation().getId());
- if (oldCaseLawyer != null) {
- oldCaseLawyer.setIsPrime(1);
- caseLawyerMapper.updateById(oldCaseLawyer);
- }
- newAttorneyAgent.setCaseId(params.getCaseInformation().getId());
- caseLawyerMapper.insert(newAttorneyAgent);
- }
- }
-
-
- //协办律师----assistingLawyer
- List newAssistingLawyer = params.getAssistingLawyer(); //协办律师
- List oldAssistingLawyer = caseLawyerMapper.selectAssistingLawyerByCaseId(params.getCaseInformation().getId());
- editAssistingLawyer(oldAssistingLawyer, newAssistingLawyer, caseId);
- caseInformation.setCaseLawyerIds(caseLawyerMapper.selectAllPrimeLawyerByCaseId(params.getCaseInformation().getId()).stream().map(c -> c.getLawyerId().toString()).collect(Collectors.joining(",")));
-
- /**
- * 收款记录----collectionRecordList
- * 收款记录基本信息----collectionRecord
- * 收款记录文件----fileManager
- */
- List newData = params.getCollectionRecordList(); //收款记录信息
- List oldData = collectionRecordMapper.selectByCaseId(caseId);
- List newIds = newData.stream().map(item -> item.getId()).collect(Collectors.toList());
- List oldIds = oldData.stream().map(item -> item.getId()).collect(Collectors.toList());
- //获取新添加的收款记录,计算出新的收款记录金额,在总金额中加上
- List insert = newData.stream().filter(item -> item.getId() == null).peek(item -> item.setCaseId(caseId)).collect(Collectors.toList());
- insert.forEach(item -> {
- List 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(",")));
- item.setUserId(userId);
- item.setUserName(nickName);
- String collect = loginUser.getUser().getRoles().stream().map(SysRole::getRoleKey).collect(Collectors.joining(","));
- if (!collect.contains("FINANCE")) {
- item.setAuditStatus(0);
- } else {
- item.setAuditStatus(1);
- }
-
- });
- List list = BeanUtil.copyToList(insert, CollectionRecord.class);
- collectionRecordService.saveBatch(list);
-
- //获取删除的收款记录,计算出删除的收款记录的金额,在总金额中减去
- List deleteIds = (List) CollUtil.subtract(oldIds, newIds);
- List deleteData = oldData.stream().filter(item -> CollUtil.contains(deleteIds, item.getId())).peek(item -> {
- item.setDelFlag(1);
- item.setStatus(1);
- }).collect(Collectors.toList());
-
-
- for (CollectionRecordEnterVO item : deleteData) {
- //根据caseId和收款记录ID删除收款记录
- collectionRecordMapper.removeByCaseIdAdnRecordId(item.getId(), caseId);
- //根据caseId和收款记录ID删除收款记录文件
- List fileIds = Arrays.stream(item.getCollectionUrlId().split(","))
- .map(Long::parseLong)
- .collect(Collectors.toList());
- fileManagerMapper.removeByCaseIdAndFileIds(caseId, fileIds);
- }
- caseInformationMapper.updateById(caseInformation);
- } catch (Exception e) {
- throw new RuntimeException("保存失败");
- }
- return true;
- }
+ // @Override
+// @Transactional(isolation = Isolation.DEFAULT, rollbackFor = Exception.class)
+// public Boolean updateCaseInfo(CaseInformationEnterVO params) {
+//
+// LoginUser loginUser = SecurityUtils.getLoginUser();
+// Long userId = loginUser.getUserId();
+// String username = loginUser.getUsername();
+// String nickName = loginUser.getUser().getNickName();
+// try {
+// //案件信息表----caseInformation
+// CaseInformation caseInformation = params.getCaseInformation();
+// Long caseId = caseInformation.getId();
+//
+// //案件关联【委托方】----entrustingParty--从数据库获取出原来的委托方信息与通过接口传入的进行比对
+// List oldImpulse = informationMapper.selectByCaseId(params.getCaseInformation().getId(), 0);
+// List newImpulse = params.getEntrustingParty();
+// editImpulseInformation(oldImpulse, newImpulse, caseId);
+//
+// //案件关联【相对方】----opposite
+// List oldOpposite = informationMapper.selectByCaseId(params.getCaseInformation().getId(), 1);
+// List newOpposite = params.getOpposite();
+// editImpulseInformation(oldOpposite, newOpposite, caseId);
+// caseInformation.setImpulseInformationIds(informationMapper.selectByCaseIdAdnDelFlag(params.getCaseInformation().getId()).stream().map(i -> i.getId().toString()).collect(Collectors.joining(",")));
+//
+//
+// //代理律师----attorneyAgent----修改原来的律师信息
+// CaseLawyer newAttorneyAgent = params.getAttorneyAgent();
+// if (BeanUtil.isNotEmpty(newAttorneyAgent)) {
+// if (newAttorneyAgent.getId() == null) {
+// CaseLawyer oldCaseLawyer = caseLawyerMapper.selectAttorneyAgentLawByCaseId(params.getCaseInformation().getId());
+// if (oldCaseLawyer != null) {
+// oldCaseLawyer.setIsPrime(1);
+// caseLawyerMapper.updateById(oldCaseLawyer);
+// }
+// newAttorneyAgent.setCaseId(params.getCaseInformation().getId());
+// caseLawyerMapper.insert(newAttorneyAgent);
+// }
+// }
+//
+//
+// //协办律师----assistingLawyer
+// List newAssistingLawyer = params.getAssistingLawyer(); //协办律师
+// List oldAssistingLawyer = caseLawyerMapper.selectAssistingLawyerByCaseId(params.getCaseInformation().getId());
+// editAssistingLawyer(oldAssistingLawyer, newAssistingLawyer, caseId);
+// caseInformation.setCoLawyerIds(caseLawyerMapper.selectAllPrimeLawyerByCaseId(params.getCaseInformation().getId()).stream().map(c -> c.getLawyerId().toString()).collect(Collectors.joining(",")));
+//
+// /**
+// * 收款记录----collectionRecordList
+// * 收款记录基本信息----collectionRecord
+// * 收款记录文件----fileManager
+// */
+// List newData = params.getCollectionRecordList(); //收款记录信息
+// List oldData = collectionRecordMapper.selectByCaseId(caseId);
+// List newIds = newData.stream().map(item -> item.getId()).collect(Collectors.toList());
+// List oldIds = oldData.stream().map(item -> item.getId()).collect(Collectors.toList());
+// //获取新添加的收款记录,计算出新的收款记录金额,在总金额中加上
+// List insert = newData.stream().filter(item -> item.getId() == null).peek(item -> item.setCaseId(caseId)).collect(Collectors.toList());
+// insert.forEach(item -> {
+// List 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(",")));
+// item.setUserId(userId);
+// item.setUserName(nickName);
+// String collect = loginUser.getUser().getRoles().stream().map(SysRole::getRoleKey).collect(Collectors.joining(","));
+// if (!collect.contains("FINANCE")) {
+// item.setAuditStatus(0);
+// } else {
+// item.setAuditStatus(1);
+// }
+//
+// });
+// List list = BeanUtil.copyToList(insert, CollectionRecord.class);
+// collectionRecordService.saveBatch(list);
+//
+// //获取删除的收款记录,计算出删除的收款记录的金额,在总金额中减去
+// List deleteIds = (List) CollUtil.subtract(oldIds, newIds);
+// List deleteData = oldData.stream().filter(item -> CollUtil.contains(deleteIds, item.getId())).peek(item -> {
+// item.setDelFlag(1);
+// item.setStatus(1);
+// }).collect(Collectors.toList());
+//
+//
+// for (CollectionRecordEnterVO item : deleteData) {
+// //根据caseId和收款记录ID删除收款记录
+// collectionRecordMapper.removeByCaseIdAdnRecordId(item.getId(), caseId);
+// //根据caseId和收款记录ID删除收款记录文件
+// List fileIds = Arrays.stream(item.getCollectionUrlId().split(","))
+// .map(Long::parseLong)
+// .collect(Collectors.toList());
+// fileManagerMapper.removeByCaseIdAndFileIds(caseId, fileIds);
+// }
+// caseInformationMapper.updateById(caseInformation);
+// } catch (Exception e) {
+// throw new RuntimeException("保存失败");
+// }
+// return true;
+// }
@Override
@Transactional(isolation = Isolation.DEFAULT, rollbackFor = Exception.class)
@@ -566,11 +605,11 @@ public class CaseInformationServiceImpl extends ServiceImpl params) {
- return caseInformationMapper.caseClosed(params);
+ public Integer caseClosed(Map params) {
+ Integer result = caseInformationMapper.caseClosed(params);
+ //案件结案后,需要将利冲信息表中的用户信息置为无需检索
+ impulseInformationMapper.updateByCaseId((Long) params.get("id"));
+ return result;
}
@Override
@@ -628,7 +670,8 @@ public class CaseInformationServiceImpl extends ServiceImpl> getStatisticsCaseStatusDate(Integer type){
+
+ public Map> getStatisticsCaseStatusDate(Integer type) {
LoginUser loginUser = SecurityUtils.getLoginUser();
String roleKey = sysUserMapper.selectUserRoleByUserId(loginUser.getUserId());
@@ -723,14 +766,195 @@ public class CaseInformationServiceImpl extends ServiceImpl entrustingParty = searcher.getEntrustingParty();
+ List opposite = searcher.getOpposite();
+
+ List impulseInformationList = new ArrayList<>();
+ if (!CollectionUtils.isEmpty(entrustingParty)) {
+ impulseInformationList.addAll(entrustingParty.stream().peek(item -> {
+ item.setCaseId(caseId);
+ item.setIsClient(0);
+ }).collect(Collectors.toList()));
+ }
+ if (!CollectionUtils.isEmpty(opposite)) {
+ impulseInformationList.addAll(opposite.stream().peek(item -> {
+ item.setCaseId(caseId);
+ item.setIsClient(1);
+ }).collect(Collectors.toList()));
+ }
+ impulseInformationService.saveBatch(impulseInformationList);
+ List impulseInformationIds = impulseInformationList.stream().map(item -> item.getId()).collect(Collectors.toList());
+ caseInformation.setImpulseInformationIds(StringUtils.join(impulseInformationIds, ","));
+ caseInformationService.updateById(caseInformation);
+
+ //录入收款记录
+ List collectionRecordList = searcher.getCollectionRecordList();
+ List collectionRecordListNew = new ArrayList<>();
+ if (!CollectionUtils.isEmpty(collectionRecordList)) {
+ for (CollectionRecordSearcher item : collectionRecordList) {
+ item.setCaseId(caseId);
+ item.setUserId(userId);
+ item.setUserName(nickName);
+ CollectionRecord collectionRecord = new CollectionRecord();
+ BeanUtils.copyProperties(item, collectionRecord);
+ collectionRecordListNew.add(collectionRecord);
+ }
+ }
+ collectionRecordService.saveBatch(collectionRecordListNew);
+ return result;
+ }
+
+ @Override
+ public CaseInformationEnterOverrideVO selectCaseInfoByIdOverride(Long id) {
+ CaseInformationEnterOverrideVO resultVO = new CaseInformationEnterOverrideVO();
+ CaseInformation caseInformation = caseInformationMapper.selectById(id);
+ //处理委托律师及协办律师姓名
+ List sysUserList = sysUserMapper.queryUserList();
+ Map userIdAndNameMap = new HashMap<>();
+ if (!CollectionUtils.isEmpty(sysUserList)) {
+ for (SysUser sysUser : sysUserList) {
+ userIdAndNameMap.put(sysUser.getUserId(), sysUser.getNickName());
+ }
+ }
+ caseInformation.setEntrustedLawyerName(userIdAndNameMap.get(caseInformation.getEntrustedLawyerId()));
+ // 考虑协办律师可能为空的情况,需要进行判空处理
+ if (!StringUtils.isEmpty(caseInformation.getCoLawyerIds())) {
+ List coLawyerIds = Arrays.asList(caseInformation.getCoLawyerIds().split(","));
+ List coLawyerNames = new ArrayList<>();
+ for (String coLawyerId : coLawyerIds) {
+ coLawyerNames.add(userIdAndNameMap.get(Long.parseLong(coLawyerId)));
+ }
+ caseInformation.setCoLawyerNames(StringUtils.join(coLawyerNames, ","));
+ }
+ resultVO.setUncollectedMoney(caseInformation.getAmountReceivable().subtract(caseInformation.getAmountReceivedSum()));
+ resultVO.setCaseInformation(caseInformation);
+ //案件涉及的委托方与相对方:
+ //案件关联【委托方】----entrustingParty
+ resultVO.setEntrustingParty(informationMapper.selectByCaseId(id, 0));
+
+ //案件关联【相对方】----opposite
+ resultVO.setOpposite(informationMapper.selectByCaseId(id, 1));
+
+ //收款记录:
+ List collectionRecordList = collectionRecordMapper.selectByCaseId(id);
+ resultVO.setCollectionRecordList(collectionRecordList);
+ return resultVO;
+ }
+
+ @Override
+ public Integer updateCaseInfoOverride(CaseInformationEnterSearcher params) {
+ /*
+ * 修改接口可能存在修改的部分:
+ * 1、案件基本信息
+ * 2、案件关联的委托人、相对方,存在新增、修改、删除等情况
+ * 3、案件关联的收款记录,存在新增、修改、删除等情况,案件信息表中的已收金额需要重新进行汇总
+ * */
+ LoginUser loginUser = SecurityUtils.getLoginUser();
+ Long userId = loginUser.getUserId();
+ String nickName = loginUser.getUser().getNickName();
+
+ // 获取当前的案件信息
+ CaseInformation caseInformation = params.getCaseInformation();
+ Long caseId = caseInformation.getId();
+ //查询所有的案件关联的委托方与相对方信息,在修改信息的时候不再去做利冲检索,只负责修改
+ List currentImpulseInformationList = impulseInformationMapper.selectList(new QueryWrapper().lambda()
+ .eq(ImpulseInformation::getCaseId, caseId)
+ .eq(ImpulseInformation::getDelFlag, 0)
+ .eq(ImpulseInformation::getCheckFlag, 1)
+ );
+ //前端传进来的相对方与委托方
+ List entrustingParty = params.getEntrustingParty();
+ List opposite = params.getOpposite();
+ List impulseInformationList = new ArrayList<>();
+ if (!CollectionUtils.isEmpty(entrustingParty)) {
+ impulseInformationList.addAll(entrustingParty);
+ }
+ if (!CollectionUtils.isEmpty(opposite)) {
+ impulseInformationList.addAll(opposite);
+ }
+ //统一处理,对当前数据判断是需要新增、修改、还是删除
+ editImpulseInformation(currentImpulseInformationList, impulseInformationList, caseId);
+ //获取信息的利冲信息ids
+ String impulseInformationIds = informationMapper.selectByCaseIdAdnDelFlag(caseId).stream().map(i -> i.getId().toString()).collect(Collectors.joining(","));
+
+ //处理收款记录,没有收款记录id的是新增的,有id的是修改的,前端传的收款记录若不在收款记录列表中,则是删除的
+ List currentCollectionRecordList = collectionRecordMapper.selectList(new QueryWrapper().lambda()
+ .eq(CollectionRecord::getCaseId, caseId)
+ .eq(CollectionRecord::getDelFlag, 0)
+ .eq(CollectionRecord::getStatus, 0)
+ );
+ List currentCollectionRecordIdList = currentCollectionRecordList.stream().map(CollectionRecord::getId).collect(Collectors.toList());
+
+ List collectionRecordList = params.getCollectionRecordList();
+ //重新计算已收金额
+ BigDecimal amountReceivedSum = new BigDecimal("0");
+ List addCollectionRecordList = new ArrayList<>();
+ List updateCollectionRecordList = new ArrayList<>();
+ List deleteCollectionRecordList = new ArrayList<>();
+ if (!CollectionUtils.isEmpty(collectionRecordList)) {
+ List collectionRecordListNew = BeanUtil.copyToList(collectionRecordList, CollectionRecord.class);
+ for (CollectionRecord item : collectionRecordListNew) {
+ if (Objects.isNull(item.getId())) {
+ item.setCaseId(caseId);
+ item.setUserId(userId);
+ item.setUserName(nickName);
+ addCollectionRecordList.add(item);
+ } else if (currentCollectionRecordIdList.contains(item.getId())) {
+ updateCollectionRecordList.add(item);
+ } else {
+ deleteCollectionRecordList.add(item);
+ }
+ //重新计算已收金额
+ if (Objects.nonNull(item.getAmountReceived())) {
+ amountReceivedSum = amountReceivedSum.add(item.getAmountReceived());
+ }
+ }
+ }
+ collectionRecordService.saveBatch(addCollectionRecordList);
+ collectionRecordService.updateBatchById(updateCollectionRecordList);
+ collectionRecordService.removeBatchByIds(deleteCollectionRecordList);
+
+ //修改案件信息
+ caseInformation.setAmountReceivedSum(amountReceivedSum);
+ caseInformation.setImpulseInformationIds(impulseInformationIds);
+ Integer result = caseInformationMapper.updateById(caseInformation);
+ return result;
+ }
+
}
diff --git a/tcctlo-law-office/src/main/java/com/tcctlo/law/service/impl/CollectionRecordServiceImpl.java b/tcctlo-law-office/src/main/java/com/tcctlo/law/service/impl/CollectionRecordServiceImpl.java
index 6c80bfda..d637d401 100644
--- a/tcctlo-law-office/src/main/java/com/tcctlo/law/service/impl/CollectionRecordServiceImpl.java
+++ b/tcctlo-law-office/src/main/java/com/tcctlo/law/service/impl/CollectionRecordServiceImpl.java
@@ -90,97 +90,98 @@ public class CollectionRecordServiceImpl extends ServiceImpl fileManagerList = params.getFileManager().stream().peek(item -> item.setFileType(1)).collect(Collectors.toList());
+// fileManagerService.saveBatch(fileManagerList);
+// String fileIds = fileManagerList.stream().map(fileManager -> fileManager.getId().toString()).collect(Collectors.joining(","));
+// collectionRecord.setCollectionUrlId(fileIds);
+// collectionRecordMapper.insert(collectionRecord);
+//
+//
+// //修改案件信息表中的已收金额-----根据案件ID查询缴费记录,做一个累加
+// List lists = BeanUtil.copyToList(collectionRecordMapper.selectByCaseId(params.getCaseId()), CollectionRecord.class);
+// BigDecimal reduce = lists.stream().map(CollectionRecord::getAmountReceived).reduce(BigDecimal.ZERO, BigDecimal::add);
+// caseInformationMapper.updateCaseAmount(params.getCaseId(), reduce); //修改案件信息表中已收金额总计
+//
+// } catch (Exception e) {
+// e.printStackTrace();
+// throw new RuntimeException("缴费失败");
+// }
+// }
- List fileManagerList = params.getFileManager().stream().peek(item -> item.setFileType(1)).collect(Collectors.toList());
- fileManagerService.saveBatch(fileManagerList);
- String fileIds = fileManagerList.stream().map(fileManager -> fileManager.getId().toString()).collect(Collectors.joining(","));
- collectionRecord.setCollectionUrlId(fileIds);
- collectionRecordMapper.insert(collectionRecord);
-
-
- //修改案件信息表中的已收金额-----根据案件ID查询缴费记录,做一个累加
- List lists = BeanUtil.copyToList(collectionRecordMapper.selectByCaseId(params.getCaseId()), CollectionRecord.class);
- BigDecimal reduce = lists.stream().map(CollectionRecord::getAmountReceived).reduce(BigDecimal.ZERO, BigDecimal::add);
- caseInformationMapper.updateCaseAmount(params.getCaseId(), reduce); //修改案件信息表中已收金额总计
-
- } catch (Exception e) {
- e.printStackTrace();
- throw new RuntimeException("缴费失败");
- }
- }
-
- @Override
- @Transactional(isolation = Isolation.DEFAULT, rollbackFor = Exception.class)
- public Boolean casePaymentBatch(List params) {
- try {
- LoginUser loginUser = SecurityUtils.getLoginUser();
- Long userId = loginUser.getUserId();
- String nickName = loginUser.getUser().getNickName();
-
- if (CollUtil.isNotEmpty(params)) {
- List newData = params; //收款记录信息
-
- //获取新添加的收款记录,计算出新的收款记录金额,在总金额中加上
- List insert = newData.stream().filter(item -> item.getId() == null).collect(Collectors.toList());
- insert.forEach(item -> {
- if (CollUtil.isEmpty(item.getFileManager())){
- throw new RuntimeException("请上传缴费凭证");
- }
- List fileManager = item.getFileManager().stream().peek(item1 -> item1.setFileType(1)).collect(Collectors.toList());
- fileManagerService.saveBatch(fileManager);
- item.setCollectionUrlId(fileManager.stream().map(i -> i.getId().toString()).collect(Collectors.joining(",")));
- item.setUserId(userId);
- item.setUserName(nickName);
- String collect = loginUser.getUser().getRoles().stream().map(SysRole::getRoleKey).collect(Collectors.joining(","));
- if (!collect.contains("CAIWU")) {
- item.setAuditStatus(0);
- } else {
- item.setAuditStatus(1);
- }
- });
- List list = BeanUtil.copyToList(insert, CollectionRecord.class);
- BigDecimal addMoney = list.stream().map(CollectionRecord::getAmountReceived).reduce(BigDecimal.ZERO, BigDecimal::add); //新增收款记录金额
- this.saveBatch(list);
- Long caseId = list.get(0).getCaseId();
- CaseInformationListVO caseInfo = caseInformationMapper.selectCaseById(caseId);
- caseInformationMapper.updateCaseAmount(caseId, caseInfo.getAmountReceivedSum().add(addMoney));
- CaseInformationListVO updateInfo = caseInformationMapper.selectCaseById(caseId);
- Date paymentDeadline = updateInfo.getPaymentDeadline();
- if (paymentDeadline != null) {
- if (updateInfo.getAmountReceivedSum().compareTo(new BigDecimal(0.0)) == 0){
- caseInformationMapper.updateCollectionStatus(updateInfo.getId(),0);
- }
- if (updateInfo.getAmountReceivedSum().compareTo(updateInfo.getAmountReceivable()) < 0){
- caseInformationMapper.updateCollectionStatus(updateInfo.getId(),1);
- }
- if (updateInfo.getAmountReceivedSum().compareTo(updateInfo.getAmountReceivable()) == 0){
- caseInformationMapper.updateCollectionStatus(updateInfo.getId(),2);
- }
-
- }
- }
- return true;
- } catch (Exception e) {
- e.printStackTrace();
- throw new RuntimeException("批量收款失败");
- }
- }
+// @Override
+// @Transactional(isolation = Isolation.DEFAULT, rollbackFor = Exception.class)
+// public Boolean casePaymentBatch(List params) {
+// try {
+// LoginUser loginUser = SecurityUtils.getLoginUser();
+// Long userId = loginUser.getUserId();
+// String nickName = loginUser.getUser().getNickName();
+//
+// //TODO 待调整
+// if (CollUtil.isNotEmpty(params)) {
+// List newData = params; //收款记录信息
+//
+// //获取新添加的收款记录,计算出新的收款记录金额,在总金额中加上
+// List insert = newData.stream().filter(item -> item.getId() == null).collect(Collectors.toList());
+// insert.forEach(item -> {
+// if (CollUtil.isEmpty(item.getFileManager())){
+// throw new RuntimeException("请上传缴费凭证");
+// }
+// List fileManager = item.getFileManager().stream().peek(item1 -> item1.setFileType(1)).collect(Collectors.toList());
+// fileManagerService.saveBatch(fileManager);
+// item.setCollectionUrlId(fileManager.stream().map(i -> i.getId().toString()).collect(Collectors.joining(",")));
+// item.setUserId(userId);
+// item.setUserName(nickName);
+// String collect = loginUser.getUser().getRoles().stream().map(SysRole::getRoleKey).collect(Collectors.joining(","));
+// if (!collect.contains("CAIWU")) {
+// item.setAuditStatus(0);
+// } else {
+// item.setAuditStatus(1);
+// }
+// });
+// List list = BeanUtil.copyToList(insert, CollectionRecord.class);
+// BigDecimal addMoney = list.stream().map(CollectionRecord::getAmountReceived).reduce(BigDecimal.ZERO, BigDecimal::add); //新增收款记录金额
+// this.saveBatch(list);
+// Long caseId = list.get(0).getCaseId();
+// CaseInformationListVO caseInfo = caseInformationMapper.selectCaseById(caseId);
+// caseInformationMapper.updateCaseAmount(caseId, caseInfo.getAmountReceivedSum().add(addMoney));
+// CaseInformationListVO updateInfo = caseInformationMapper.selectCaseById(caseId);
+// Date paymentDeadline = updateInfo.getPaymentDeadline();
+// if (paymentDeadline != null) {
+// if (updateInfo.getAmountReceivedSum().compareTo(new BigDecimal(0.0)) == 0){
+// caseInformationMapper.updateCollectionStatus(updateInfo.getId(),0);
+// }
+// if (updateInfo.getAmountReceivedSum().compareTo(updateInfo.getAmountReceivable()) < 0){
+// caseInformationMapper.updateCollectionStatus(updateInfo.getId(),1);
+// }
+// if (updateInfo.getAmountReceivedSum().compareTo(updateInfo.getAmountReceivable()) == 0){
+// caseInformationMapper.updateCollectionStatus(updateInfo.getId(),2);
+// }
+//
+// }
+// }
+// return true;
+// } catch (Exception e) {
+// e.printStackTrace();
+// throw new RuntimeException("批量收款失败");
+// }
+// }
@Override
@Transactional(isolation = Isolation.DEFAULT, rollbackFor = Exception.class)
@@ -196,11 +197,11 @@ public class CollectionRecordServiceImpl extends ServiceImpl fileIds = Arrays.stream(collectionRecord.getCollectionUrlId().split(",")).map(Long::parseLong).collect(Collectors.toList());
- fileManagerMapper.removeByCaseIdAndFileIds(caseId, fileIds);
- }
+// String urlStr = collectionRecord.getCollectionUrlId();
+// if (StrUtil.isNotBlank(urlStr)){
+// List fileIds = Arrays.stream(collectionRecord.getCollectionUrlId().split(",")).map(Long::parseLong).collect(Collectors.toList());
+// fileManagerMapper.removeByCaseIdAndFileIds(caseId, fileIds);
+// }
} catch (Exception e) {
e.printStackTrace();
@@ -212,20 +213,20 @@ public class CollectionRecordServiceImpl extends ServiceImpl selectByCaseId(Long caseId) {
List lists = collectionRecordMapper.selectByCaseId(caseId);
- for (CollectionRecordEnterVO item : lists) {
- if (StrUtil.isNotBlank(item.getCollectionUrlId())){ //排除用户只进行缴费没有上传收费凭证的情况
- List collect = Arrays.stream(item.getCollectionUrlId().split(",")).map(Long::parseLong).collect(Collectors.toList());
- item.setFileManager(fileManagerMapper.selectByCRid(collect));
- }
- Long userId = item.getUserId();
- String roleKey = sysUserMapper.selectUserRoleByUserId(userId);
- if ("CAIWU".equals(roleKey)){
- item.setIsEdit(item.getAuditStatus() == 1);
- }else {
- item.setIsEdit(item.getAuditStatus() == 0);
- }
-
- }
+// for (CollectionRecordEnterVO item : lists) {
+// if (StrUtil.isNotBlank(item.getCollectionUrlId())){ //排除用户只进行缴费没有上传收费凭证的情况
+// List collect = Arrays.stream(item.getCollectionUrlId().split(",")).map(Long::parseLong).collect(Collectors.toList());
+// item.setFileManager(fileManagerMapper.selectByCRid(collect));
+// }
+// Long userId = item.getUserId();
+// String roleKey = sysUserMapper.selectUserRoleByUserId(userId);
+// if ("CAIWU".equals(roleKey)){
+// item.setIsEdit(item.getAuditStatus() == 1);
+// }else {
+// item.setIsEdit(item.getAuditStatus() == 0);
+// }
+//
+// }
return lists;
}
diff --git a/tcctlo-law-office/src/main/java/com/tcctlo/law/service/impl/IIndexServiceImpl.java b/tcctlo-law-office/src/main/java/com/tcctlo/law/service/impl/IIndexServiceImpl.java
index 57959d52..cf7c7fda 100644
--- a/tcctlo-law-office/src/main/java/com/tcctlo/law/service/impl/IIndexServiceImpl.java
+++ b/tcctlo-law-office/src/main/java/com/tcctlo/law/service/impl/IIndexServiceImpl.java
@@ -8,6 +8,7 @@ import com.tcctlo.law.entity.CollectionRecord;
import com.tcctlo.law.entity.IndexStatistics;
import com.tcctlo.law.mapper.CaseInformationMapper;
import com.tcctlo.law.mapper.CollectionRecordMapper;
+import com.tcctlo.law.searcher.TimeSearcher;
import com.tcctlo.law.service.ICollectionRecordService;
import com.tcctlo.law.service.IIndexService;
import com.tcctlo.law.vo.IndexLawCaseMoneyInfo;
@@ -125,26 +126,21 @@ public class IIndexServiceImpl implements IIndexService {
}
@Override
- public Object lawInfo() {
+ public List lawInfo(TimeSearcher searcher) {
List indexLawInfos = caseInformationMapper.selectLawInfo(); //所有的律师信息
- List res = indexLawInfos.stream().map(new Function() {
- @Override
- public IndexLawCaseMoneyInfo apply(IndexLawInfo item) {
- IndexLawCaseMoneyInfo caseLawItem = new IndexLawCaseMoneyInfo();
- caseLawItem.setLawName(item.getNickName());
- caseLawItem.setCaseNum(caseInformationMapper.selectLawCaseCount(item.getUserId())); //律师涉及案件数量
-
- //律师涉及案件金额总计
- BigDecimal sumMoney = caseInformationMapper.selectLawCaseMoneyCount(item.getUserId());
- if (sumMoney == null) {
- caseLawItem.setAmountReceived(new BigDecimal(0.0));
- } else {
- caseLawItem.setAmountReceived(sumMoney);
- }
- /*caseLawItem.setAmountReceived(caseInformationMapper.selectLawCaseMoneyCount(item.getUserId())); */
- return caseLawItem;
+ List statcicList = caseInformationMapper.staticCaseNumAndMoney(searcher);
+ Map indexLawCaseMoneyInfoMap = statcicList.stream().collect(Collectors.toMap(IndexLawCaseMoneyInfo::getLawyerId, Function.identity()));
+ List voList = new ArrayList<>();
+ for (IndexLawInfo item : indexLawInfos) {
+ IndexLawCaseMoneyInfo indexLawCaseMoneyInfo = new IndexLawCaseMoneyInfo();
+ indexLawCaseMoneyInfo.setLawyerId(item.getUserId());
+ indexLawCaseMoneyInfo.setLawName(item.getNickName());
+ if (indexLawCaseMoneyInfoMap.containsKey(item.getUserId())) {
+ indexLawCaseMoneyInfo.setCaseNum(indexLawCaseMoneyInfoMap.get(item.getUserId()).getCaseNum());
+ indexLawCaseMoneyInfo.setAmountReceived(indexLawCaseMoneyInfoMap.get(item.getUserId()).getAmountReceived());
}
- }).collect(Collectors.toList());
- return res;
+ voList.add(indexLawCaseMoneyInfo);
+ }
+ return voList;
}
}
diff --git a/tcctlo-law-office/src/main/java/com/tcctlo/law/service/impl/InvoiceRecordServiceImpl.java b/tcctlo-law-office/src/main/java/com/tcctlo/law/service/impl/InvoiceRecordServiceImpl.java
index 519ce0da..049532b3 100644
--- a/tcctlo-law-office/src/main/java/com/tcctlo/law/service/impl/InvoiceRecordServiceImpl.java
+++ b/tcctlo-law-office/src/main/java/com/tcctlo/law/service/impl/InvoiceRecordServiceImpl.java
@@ -11,6 +11,7 @@ import com.tcctlo.law.mapper.FileManagerMapper;
import com.tcctlo.law.vo.InvoiceRecordVO;
import com.tcctlo.law.mapper.InvoiceRecordMapper;
import com.tcctlo.law.service.IInvoiceRecordService;
+import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -22,15 +23,15 @@ import java.util.function.Function;
import java.util.stream.Collectors;
/**
-*
-* 开票记录表 服务实现类
-*
-*
-* @author
-* @since 2025-03-07
-*/
+ *
+ * 开票记录表 服务实现类
+ *
+ *
+ * @author
+ * @since 2025-03-07
+ */
@Service
-public class InvoiceRecordServiceImpl extends ServiceImpl implements IInvoiceRecordService {
+public class InvoiceRecordServiceImpl extends ServiceImpl implements IInvoiceRecordService {
@Resource
@@ -92,10 +93,19 @@ public class InvoiceRecordServiceImpl extends ServiceImpl selectByCaseId(Long caseId) {
List invoiceRecords = invoiceRecordMapper.selectByCaseId(caseId);
- invoiceRecords.stream().peek(item -> {
- List collect = Arrays.stream(item.getInvoiceFileUrl().split(",")).map(Long::parseLong).collect(Collectors.toList());
- item.setFileManager(fileManagerMapper.selectByCRid(collect));
- }).collect(Collectors.toList());
+// invoiceRecords.stream().peek(item -> {
+// List collect = Arrays.stream(item.getInvoiceFileUrl().split(",")).map(Long::parseLong).collect(Collectors.toList());
+ // TODO 此处的InvoiceFileUrl 中存的是fileManager 的id ,后续需要将对应的表结构同步进行调整
+// item.setFileManager(fileManagerMapper.selectByCRid(collect));
+// }).collect(Collectors.toList());
+
+ for (InvoiceRecordVO item : invoiceRecords) {
+ if (!StringUtils.isBlank(item.getInvoiceFileUrl())) {
+ String invoiceFileUrl = item.getInvoiceFileUrl();
+ List fileIds = Arrays.stream(invoiceFileUrl.split(",")).map(Long::parseLong).collect(Collectors.toList());
+ item.setFileManager(fileManagerMapper.selectBatchIds(fileIds));
+ }
+ }
return invoiceRecords;
}
diff --git a/tcctlo-law-office/src/main/java/com/tcctlo/law/vo/CaseInformationEnterOverrideVO.java b/tcctlo-law-office/src/main/java/com/tcctlo/law/vo/CaseInformationEnterOverrideVO.java
new file mode 100644
index 00000000..09b4499d
--- /dev/null
+++ b/tcctlo-law-office/src/main/java/com/tcctlo/law/vo/CaseInformationEnterOverrideVO.java
@@ -0,0 +1,42 @@
+package com.tcctlo.law.vo;
+
+import com.tcctlo.law.entity.CaseInformation;
+import com.tcctlo.law.entity.CaseLawyer;
+import com.tcctlo.law.entity.ImpulseInformation;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.List;
+
+@Data
+public class CaseInformationEnterOverrideVO implements Serializable {
+
+ private static final long serialVersionUID = 1964104079456373949L;
+
+ /**
+ * 案件未收款的金额
+ */
+ private BigDecimal uncollectedMoney;
+
+ /**
+ * 案件信息
+ */
+ private CaseInformation caseInformation;
+
+ /**
+ * 利冲信息-委托方信息
+ */
+ private List entrustingParty;
+
+ /**
+ * 利冲信息-相对方
+ */
+ private List opposite;
+
+ /**
+ * 案件收款记录信息
+ */
+ private List collectionRecordList;
+
+}
diff --git a/tcctlo-law-office/src/main/java/com/tcctlo/law/vo/CaseInformationListVO.java b/tcctlo-law-office/src/main/java/com/tcctlo/law/vo/CaseInformationListVO.java
index ee18624d..49509520 100644
--- a/tcctlo-law-office/src/main/java/com/tcctlo/law/vo/CaseInformationListVO.java
+++ b/tcctlo-law-office/src/main/java/com/tcctlo/law/vo/CaseInformationListVO.java
@@ -40,16 +40,6 @@ public class CaseInformationListVO extends CaseInformation {
*/
private String opposite;
- /**
- * 代理律师
- */
- private String attorneyAgent;
-
- /**
- * 协办律师
- */
- private String assistingLawyer;
-
/**
* 当前案件是否包含相关文件
* 主要用于前端来判断是否显示下载按钮
diff --git a/tcctlo-law-office/src/main/java/com/tcctlo/law/vo/CollectionRecordEnterVO.java b/tcctlo-law-office/src/main/java/com/tcctlo/law/vo/CollectionRecordEnterVO.java
index 9ecc7ebd..e6932e96 100644
--- a/tcctlo-law-office/src/main/java/com/tcctlo/law/vo/CollectionRecordEnterVO.java
+++ b/tcctlo-law-office/src/main/java/com/tcctlo/law/vo/CollectionRecordEnterVO.java
@@ -20,6 +20,7 @@ public class CollectionRecordEnterVO extends CollectionRecord {
/**
* 文件管理
+ * FIXME ,后续确认不需要了之后,可以将该字段删除
*/
private List fileManager;
}
diff --git a/tcctlo-law-office/src/main/java/com/tcctlo/law/vo/IndexLawCaseMoneyInfo.java b/tcctlo-law-office/src/main/java/com/tcctlo/law/vo/IndexLawCaseMoneyInfo.java
index ef04a8ed..4e09d14b 100644
--- a/tcctlo-law-office/src/main/java/com/tcctlo/law/vo/IndexLawCaseMoneyInfo.java
+++ b/tcctlo-law-office/src/main/java/com/tcctlo/law/vo/IndexLawCaseMoneyInfo.java
@@ -11,6 +11,8 @@ import java.math.BigDecimal;
@AllArgsConstructor
public class IndexLawCaseMoneyInfo {
+ private Long lawyerId;
+
/**
* 律师名称
*/
diff --git a/tcctlo-law-office/src/main/resources/mapper/tcctlo-law-office/CaseInformationMapper.xml b/tcctlo-law-office/src/main/resources/mapper/tcctlo-law-office/CaseInformationMapper.xml
index 36c9a6de..4d186963 100644
--- a/tcctlo-law-office/src/main/resources/mapper/tcctlo-law-office/CaseInformationMapper.xml
+++ b/tcctlo-law-office/src/main/resources/mapper/tcctlo-law-office/CaseInformationMapper.xml
@@ -17,7 +17,7 @@
ci.amount_receivable,
ci.amount_received_sum,
ci.payment_deadline,
- ci.payment_deadline_remake,
+ ci.payment_deadline_remark,
ci.reserve_money,
ci.term_of_consultancy_start,
ci.term_of_consultancy_end,
@@ -29,14 +29,14 @@
ci.is_finish_case,
ci.impulse_information_ids,
ci.case_lawyer_ids,
- ci.case_remake,
+ ci.case_remark,
ci.status,
ci.del_flag,
ci.create_by,
ci.create_time,
ci.update_by,
ci.update_time,
- ci.remake
+ ci.remark
update case_information ci
@@ -143,7 +143,7 @@
-
+
@@ -155,14 +155,14 @@
-
+
-
+
@@ -239,7 +239,7 @@
-
+
@@ -251,14 +251,14 @@
-
+
-
+
@@ -538,6 +538,23 @@
where find_in_set(#{lawId}, ci.case_lawyer_ids) and ci.status = 0 and ci.del_flag = 0
+
+