[UPDATE]:更新
This commit is contained in:
parent
f2773f3ea8
commit
ec12480ded
|
@ -137,11 +137,11 @@ dromara:
|
||||||
aliyun-oss:
|
aliyun-oss:
|
||||||
- platform: aliyun-oss-1 # 存储平台标识
|
- platform: aliyun-oss-1 # 存储平台标识
|
||||||
enable-storage: true # 启用存储
|
enable-storage: true # 启用存储
|
||||||
access-key: LTAI5tL4rKPPR71Ki5CgEHme
|
access-key:
|
||||||
secret-key: 8OFQDahu0XHj0ctxGrywA37c81PDiU
|
secret-key:
|
||||||
end-point: oss-cn-beijing.aliyuncs.com
|
end-point:
|
||||||
bucket-name: low-office
|
bucket-name: low-office
|
||||||
domain: https://low-office.oss-cn-beijing.aliyuncs.com/ # 访问域名,注意“/”结尾,例如:https://abc.oss-cn-shanghai.aliyuncs.com/
|
domain: # 访问域名,注意“/”结尾,例如:https://abc.oss-cn-shanghai.aliyuncs.com/
|
||||||
base-path: low-office-images/ # 基础路径
|
base-path: low-office-images/ # 基础路径
|
||||||
minio:
|
minio:
|
||||||
- platform: minio-1 # 存储平台标识
|
- platform: minio-1 # 存储平台标识
|
||||||
|
|
|
@ -32,8 +32,6 @@ public class CaseInformationController extends BaseController {
|
||||||
private ICaseInformationService iCaseInformationService;
|
private ICaseInformationService iCaseInformationService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 案件审核
|
* 案件审核
|
||||||
* @param params 参数:案件编号、审核状态、审核意见【id、auditStatus、auditOpinion】
|
* @param params 参数:案件编号、审核状态、审核意见【id、auditStatus、auditOpinion】
|
||||||
|
@ -101,7 +99,9 @@ public class CaseInformationController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@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) {
|
||||||
current = 1;
|
current = 1;
|
||||||
}
|
}
|
||||||
|
@ -199,5 +199,13 @@ public class CaseInformationController extends BaseController {
|
||||||
return AjaxResult.success(result);
|
return AjaxResult.success(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据案件状态统计案件数量
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/statisticsCaseStatus")
|
||||||
|
public AjaxResult statisticsCaseStatus(@RequestParam(value = "type",required = false) Integer type){
|
||||||
|
return AjaxResult.success(iCaseInformationService.statisticsCaseStatus(type));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,10 +4,7 @@ import com.tcctlo.common.core.domain.AjaxResult;
|
||||||
import com.tcctlo.law.entity.IndexStatistics;
|
import com.tcctlo.law.entity.IndexStatistics;
|
||||||
import com.tcctlo.law.service.IIndexService;
|
import com.tcctlo.law.service.IIndexService;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@ -71,5 +68,14 @@ public class IndexController {
|
||||||
return AjaxResult.success(integerIntegerMap);
|
return AjaxResult.success(integerIntegerMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计所有律师信息
|
||||||
|
* @return 结果集
|
||||||
|
*/
|
||||||
|
@PostMapping("/lawInfo")
|
||||||
|
public AjaxResult lawInfo() {
|
||||||
|
Object res = iIndexService.lawInfo();
|
||||||
|
return AjaxResult.success(res);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,96 @@
|
||||||
|
package com.tcctlo.law.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.tcctlo.common.core.domain.AjaxResult;
|
||||||
|
import com.tcctlo.law.entity.InvoiceRecord;
|
||||||
|
import com.tcctlo.law.vo.InvoiceRecordVO;
|
||||||
|
import com.tcctlo.law.service.IInvoiceRecordService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 开票记录表 前端控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author
|
||||||
|
* @since 2025-03-07
|
||||||
|
*/
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/invoiceRecord")
|
||||||
|
public class InvoiceRecordController {
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IInvoiceRecordService iInvoiceRecordService;
|
||||||
|
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public AjaxResult list(@RequestParam(required = false) Integer current, @RequestParam(required = false) Integer size) {
|
||||||
|
if (current == null) {
|
||||||
|
current = 1;
|
||||||
|
}
|
||||||
|
if (size == null) {
|
||||||
|
size = 10;
|
||||||
|
}
|
||||||
|
Page<InvoiceRecord> pageList = iInvoiceRecordService.list(current, size);
|
||||||
|
return AjaxResult.success(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据案件ID获取开票记录
|
||||||
|
* @param caseId 案件ID
|
||||||
|
* @return 结果集
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/selectByCaseId/{caseId}")
|
||||||
|
public AjaxResult selectByCaseId(@PathVariable("caseId") Long caseId) {
|
||||||
|
List<InvoiceRecordVO> res = iInvoiceRecordService.selectByCaseId(caseId);
|
||||||
|
return AjaxResult.success(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getById(@PathVariable("id") Long id) {
|
||||||
|
InvoiceRecord invoiceRecord = iInvoiceRecordService.getById(id);
|
||||||
|
return AjaxResult.success(invoiceRecord);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "/create")
|
||||||
|
public AjaxResult create(@RequestBody InvoiceRecordVO params) {
|
||||||
|
return AjaxResult.success(iInvoiceRecordService.create(params));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "/delete/{id}")
|
||||||
|
public AjaxResult delete(@PathVariable("id") Long id) {
|
||||||
|
Integer result = iInvoiceRecordService.delete(id);
|
||||||
|
return AjaxResult.success(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逻辑删除
|
||||||
|
* @param params 参数
|
||||||
|
* @return 结果集
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/deleteBatch")
|
||||||
|
public AjaxResult deleteBatch(@RequestBody Map<String, String> params) {
|
||||||
|
AjaxResult ajaxResult = new AjaxResult();
|
||||||
|
Integer result = iInvoiceRecordService.deleteBatch(params);
|
||||||
|
if (result > 0) {
|
||||||
|
ajaxResult.put("msg", "删除成功");
|
||||||
|
ajaxResult.put("code", 200);
|
||||||
|
} else {
|
||||||
|
ajaxResult.put("msg", "删除失败");
|
||||||
|
ajaxResult.put("code", 500);
|
||||||
|
}
|
||||||
|
return ajaxResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping(value = "/update")
|
||||||
|
public AjaxResult update(@RequestBody InvoiceRecord params) {
|
||||||
|
Integer result = iInvoiceRecordService.update(params);
|
||||||
|
return AjaxResult.success(result);
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,8 +5,11 @@ import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.fasterxml.jackson.databind.JsonNode;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
/**
|
/**
|
||||||
|
@ -48,12 +51,12 @@ public class CaseInformation implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 业务类型【0:诉讼业务,1:非诉讼业务】
|
* 业务类型【0:诉讼业务,1:非诉讼业务】
|
||||||
*/
|
*/
|
||||||
private Integer businessType;
|
private String businessType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 业务分类【0:民商事业务、1:刑事辩护业务、2:行政复议及诉讼业务、3:企业常年法律顾问、4:企业专项法律顾问】
|
* 业务分类【0:民商事业务、1:刑事辩护业务、2:行政复议及诉讼业务、3:企业常年法律顾问、4:企业专项法律顾问】
|
||||||
*/
|
*/
|
||||||
private Integer businessClassify;
|
private String businessClassify;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 案件类型
|
* 案件类型
|
||||||
|
@ -63,12 +66,13 @@ public class CaseInformation implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 代理阶段
|
* 代理阶段
|
||||||
*/
|
*/
|
||||||
private String agencyStage;
|
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||||
|
private JsonNode agencyStage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 案件来源【0:市场案源,1:律师独立案源】
|
* 案件来源【0:市场案源,1:律师独立案源】
|
||||||
*/
|
*/
|
||||||
private Integer caseSource;
|
private String caseSource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 应收金额
|
* 应收金额
|
||||||
|
@ -86,16 +90,27 @@ public class CaseInformation implements Serializable {
|
||||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
private Date paymentDeadline;
|
private Date paymentDeadline;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 付款期限备注
|
||||||
|
*/
|
||||||
|
private String paymentDeadlineRemake;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 预留款
|
* 预留款
|
||||||
*/
|
*/
|
||||||
private BigDecimal reserveMoney;
|
private BigDecimal reserveMoney;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 顾问期限
|
* 顾问期限开始时间
|
||||||
*/
|
*/
|
||||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
private Date termOfConsultancy;
|
private Date termOfConsultancyStart;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 顾问期限结束时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date termOfConsultancyEnd;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 收款状态【0:未付款、1:部分付款,2:已结清】
|
* 收款状态【0:未付款、1:部分付款,2:已结清】
|
||||||
|
@ -142,6 +157,11 @@ public class CaseInformation implements Serializable {
|
||||||
*/
|
*/
|
||||||
private String caseLawyerIds;
|
private String caseLawyerIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案件信息备注
|
||||||
|
*/
|
||||||
|
private String caseRemake;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态【0:正常,1:停用】
|
* 状态【0:正常,1:停用】
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.tcctlo.law.entity;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案件不同状态统计实体类
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class CaseStatistics {
|
||||||
|
|
||||||
|
private String statusName;
|
||||||
|
|
||||||
|
private Integer statusNum;
|
||||||
|
}
|
|
@ -56,6 +56,11 @@ public class CollectionRecord implements Serializable {
|
||||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
private Date collectionDate;
|
private Date collectionDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收款记录
|
||||||
|
*/
|
||||||
|
private String collectionRemake;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 收款人ID
|
* 收款人ID
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -0,0 +1,106 @@
|
||||||
|
package com.tcctlo.law.entity;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 开票记录表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author
|
||||||
|
* @since 2025-03-07
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@TableName("invoice_record")
|
||||||
|
public class InvoiceRecord implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联案件 ID
|
||||||
|
*/
|
||||||
|
private Long caseId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开票日期
|
||||||
|
*/
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date invoiceDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开票金额
|
||||||
|
*/
|
||||||
|
private BigDecimal invoiceMoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发票 OSS 地址
|
||||||
|
*/
|
||||||
|
private String invoiceFileUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开票人ID
|
||||||
|
*/
|
||||||
|
private Long invoiceUserId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开票人名称
|
||||||
|
*/
|
||||||
|
private String invoiceUserName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开票状态【未开票:0,已开票:计算当前案件已开票的金额返回】
|
||||||
|
*/
|
||||||
|
private String invoiceStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态【0:正常,1:停用】
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标志【0:未删除,1:已删除】
|
||||||
|
*/
|
||||||
|
private Integer delFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新者
|
||||||
|
*/
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remake;
|
||||||
|
|
||||||
|
}
|
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.tcctlo.law.entity.CaseInformation;
|
import com.tcctlo.law.entity.CaseInformation;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.tcctlo.law.vo.CaseInformationListVO;
|
import com.tcctlo.law.vo.CaseInformationListVO;
|
||||||
|
import com.tcctlo.law.vo.IndexLawInfo;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
@ -21,16 +22,31 @@ import java.util.Map;
|
||||||
*/
|
*/
|
||||||
public interface CaseInformationMapper extends BaseMapper<CaseInformation> {
|
public interface CaseInformationMapper extends BaseMapper<CaseInformation> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首页统计律师信息--查询所有律师信息
|
||||||
|
* @return 所有律师信息
|
||||||
|
*/
|
||||||
|
List<IndexLawInfo> selectLawInfo();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页条件查询
|
* 分页条件查询
|
||||||
|
*
|
||||||
* @param page 分页对象
|
* @param page 分页对象
|
||||||
* @param condition 条件参数
|
* @param condition 条件参数
|
||||||
* @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 updateCollectionStatus(@Param("caseId") Long caseId, @Param("collectionStatus") Integer collectionStatus);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改案件审核状态
|
* 修改案件审核状态
|
||||||
|
*
|
||||||
* @param caseId 案件Id
|
* @param caseId 案件Id
|
||||||
* @param auditStatus 审核状态吗
|
* @param auditStatus 审核状态吗
|
||||||
* @return 结果集
|
* @return 结果集
|
||||||
|
@ -38,7 +54,6 @@ public interface CaseInformationMapper extends BaseMapper<CaseInformation> {
|
||||||
int updateAuditStatusInt(@Param("caseId") Long caseId, @Param("auditStatus") Integer auditStatus);
|
int updateAuditStatusInt(@Param("caseId") Long caseId, @Param("auditStatus") Integer auditStatus);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param caseId 案件ID
|
* @param caseId 案件ID
|
||||||
* @param amountReceived 收款金额
|
* @param amountReceived 收款金额
|
||||||
* @return 结果集
|
* @return 结果集
|
||||||
|
@ -47,14 +62,18 @@ public interface CaseInformationMapper extends BaseMapper<CaseInformation> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据案件ID查询案件信息
|
* 根据案件ID查询案件信息
|
||||||
|
*
|
||||||
* @param id 案件ID
|
* @param id 案件ID
|
||||||
* @return 结果集
|
* @return 结果集
|
||||||
*/
|
*/
|
||||||
CaseInformationListVO selectCaseById(@Param("id") Long id);
|
CaseInformationListVO selectCaseById(@Param("id") Long id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 案件归档
|
* 案件归档
|
||||||
|
*
|
||||||
* @param caseId 要归档的案件ID
|
* @param caseId 要归档的案件ID
|
||||||
* @return 受影响记录数
|
* @return 受影响记录数
|
||||||
*/
|
*/
|
||||||
|
@ -62,12 +81,14 @@ public interface CaseInformationMapper extends BaseMapper<CaseInformation> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量逻辑删除案件信息
|
* 批量逻辑删除案件信息
|
||||||
|
*
|
||||||
* @param longList 案件ID集合
|
* @param longList 案件ID集合
|
||||||
*/
|
*/
|
||||||
int removeByIds(@Param("ids") List<Long> longList);
|
int removeByIds(@Param("ids") List<Long> longList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断案件是否有相关文件
|
* 判断案件是否有相关文件
|
||||||
|
*
|
||||||
* @param id 案件id
|
* @param id 案件id
|
||||||
* @return 结果集
|
* @return 结果集
|
||||||
*/
|
*/
|
||||||
|
@ -75,6 +96,7 @@ public interface CaseInformationMapper extends BaseMapper<CaseInformation> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据案件ID查询案件信息
|
* 根据案件ID查询案件信息
|
||||||
|
*
|
||||||
* @param id 案件ID
|
* @param id 案件ID
|
||||||
* @return 结果集
|
* @return 结果集
|
||||||
*/
|
*/
|
||||||
|
@ -82,6 +104,7 @@ public interface CaseInformationMapper extends BaseMapper<CaseInformation> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 案件审核
|
* 案件审核
|
||||||
|
*
|
||||||
* @param params 参数
|
* @param params 参数
|
||||||
* @return 是否审核成功
|
* @return 是否审核成功
|
||||||
*/
|
*/
|
||||||
|
@ -89,6 +112,7 @@ public interface CaseInformationMapper extends BaseMapper<CaseInformation> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 案件撤销
|
* 案件撤销
|
||||||
|
*
|
||||||
* @param params 参数
|
* @param params 参数
|
||||||
* @return 是否撤销成功
|
* @return 是否撤销成功
|
||||||
*/
|
*/
|
||||||
|
@ -96,6 +120,7 @@ public interface CaseInformationMapper extends BaseMapper<CaseInformation> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 案件结案
|
* 案件结案
|
||||||
|
*
|
||||||
* @param params 参数
|
* @param params 参数
|
||||||
* @return 结案结果
|
* @return 结案结果
|
||||||
*/
|
*/
|
||||||
|
@ -103,6 +128,7 @@ public interface CaseInformationMapper extends BaseMapper<CaseInformation> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据业务类型查询案件数量
|
* 根据业务类型查询案件数量
|
||||||
|
*
|
||||||
* @param type 业务类型
|
* @param type 业务类型
|
||||||
* @return 结果集
|
* @return 结果集
|
||||||
*/
|
*/
|
||||||
|
@ -113,6 +139,7 @@ public interface CaseInformationMapper extends BaseMapper<CaseInformation> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 利冲统计
|
* 利冲统计
|
||||||
|
*
|
||||||
* @param caseStatus 收案状态
|
* @param caseStatus 收案状态
|
||||||
* @return 结果集
|
* @return 结果集
|
||||||
*/
|
*/
|
||||||
|
@ -123,6 +150,7 @@ public interface CaseInformationMapper extends BaseMapper<CaseInformation> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 未收款统计
|
* 未收款统计
|
||||||
|
*
|
||||||
* @return 结果集
|
* @return 结果集
|
||||||
*/
|
*/
|
||||||
Integer outstandingPayment(@Param("userId") String userId,
|
Integer outstandingPayment(@Param("userId") String userId,
|
||||||
|
@ -131,6 +159,7 @@ public interface CaseInformationMapper extends BaseMapper<CaseInformation> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部分收费统计
|
* 部分收费统计
|
||||||
|
*
|
||||||
* @return 结果集
|
* @return 结果集
|
||||||
*/
|
*/
|
||||||
Integer partialCharge(@Param("userId") String userId,
|
Integer partialCharge(@Param("userId") String userId,
|
||||||
|
@ -139,6 +168,7 @@ public interface CaseInformationMapper extends BaseMapper<CaseInformation> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 逾期未收费
|
* 逾期未收费
|
||||||
|
*
|
||||||
* @return 结果集
|
* @return 结果集
|
||||||
*/
|
*/
|
||||||
Integer overdue(@Param("userId") String userId,
|
Integer overdue(@Param("userId") String userId,
|
||||||
|
@ -148,9 +178,79 @@ public interface CaseInformationMapper extends BaseMapper<CaseInformation> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改案件涉及律师
|
* 修改案件涉及律师
|
||||||
|
*
|
||||||
* @param id 案件ID
|
* @param id 案件ID
|
||||||
* @param ids 涉及律师IDS
|
* @param ids 涉及律师IDS
|
||||||
* @return 结果集
|
* @return 结果集
|
||||||
*/
|
*/
|
||||||
Integer updateLawyerIds(@Param("caseId") Long caseId, @Param("lawIds") String lawIds);
|
Integer updateLawyerIds(@Param("caseId") Long caseId, @Param("lawIds") String lawIds);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户ID和案件状态统计案件数量
|
||||||
|
*
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param caseStatus 案件状态
|
||||||
|
* @return 结果集
|
||||||
|
*/
|
||||||
|
Integer statisticsCaseStatus(@Param("userId") String userId, @Param("caseStatus") Integer caseStatus, @Param("businessType") Integer businessType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户ID和收款状态统计案件数量
|
||||||
|
*
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param collectionStatus 收款状态
|
||||||
|
* @return 结果集
|
||||||
|
*/
|
||||||
|
Integer statisticsCaseCollectionStatus(@Param("userId") String userId, @Param("collectionStatus") Integer collectionStatus, @Param("businessType") Integer businessType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户ID和收款状态统计案件数量
|
||||||
|
*
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param impulseStatus 收款状态
|
||||||
|
* @return 结果集
|
||||||
|
*/
|
||||||
|
Integer statisticsCaseImpulseStatus(@Param("userId") String userId, @Param("impulseStatus") Integer impulseStatus, @Param("businessType") Integer businessType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户ID和审核状态统计案件数量
|
||||||
|
*
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param auditStatus 审核状态
|
||||||
|
* @return 结果集
|
||||||
|
*/
|
||||||
|
Integer statisticsCaseAuditStatus(@Param("userId") String userId, @Param("auditStatus") Integer auditStatus, @Param("businessType") Integer businessType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户ID和归档状态统计案件数量
|
||||||
|
*
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param archiveStatus 归档状态
|
||||||
|
* @return 结果集
|
||||||
|
*/
|
||||||
|
Integer statisticsCaseArchiveStatus(@Param("userId") String userId, @Param("archiveStatus") Integer archiveStatus, @Param("businessType") Integer businessType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据用户ID和结案状态统计案件数量
|
||||||
|
*
|
||||||
|
* @param userId 用户ID
|
||||||
|
* @param finishStatus 结案状态
|
||||||
|
* @return 结果集
|
||||||
|
*/
|
||||||
|
Integer statisticsCaseFinishStatus(@Param("userId") String userId, @Param("finishStatus") Integer finishStatus, @Param("businessType") Integer businessType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首页-统计律师涉及案件数量
|
||||||
|
* @param lawId 律师ID
|
||||||
|
* @return 结果集
|
||||||
|
*/
|
||||||
|
Integer selectLawCaseCount(@Param("lawId") Long lawId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首页-统计律师涉及案件金额总计
|
||||||
|
* @param lawId 律师ID
|
||||||
|
* @return 结果集
|
||||||
|
*/
|
||||||
|
BigDecimal selectLawCaseMoneyCount(@Param("lawId") Long lawId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,6 +56,7 @@ public interface FileManagerMapper extends BaseMapper<FileManager> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据收款记录表中记录的文件ID查询文件
|
* 根据收款记录表中记录的文件ID查询文件
|
||||||
|
* 根据开票记录表中记录的文件ID查询文件
|
||||||
* @param ids ids
|
* @param ids ids
|
||||||
* @return 数据集
|
* @return 数据集
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.tcctlo.law.mapper;
|
||||||
|
|
||||||
|
import com.tcctlo.law.entity.InvoiceRecord;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.tcctlo.law.vo.InvoiceRecordVO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 开票记录表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author
|
||||||
|
* @since 2025-03-07
|
||||||
|
*/
|
||||||
|
public interface InvoiceRecordMapper extends BaseMapper<InvoiceRecord> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逻辑删除
|
||||||
|
* @param ids ids
|
||||||
|
*/
|
||||||
|
int deleteBatch(@Param("ids") List<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据案件ID查询
|
||||||
|
* @param caseId 案件ID
|
||||||
|
* @return 结果集
|
||||||
|
*/
|
||||||
|
List<InvoiceRecordVO> selectByCaseId(@Param("caseId") Long caseId);
|
||||||
|
}
|
|
@ -3,6 +3,7 @@ package com.tcctlo.law.service;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.tcctlo.law.entity.CaseInformation;
|
import com.tcctlo.law.entity.CaseInformation;
|
||||||
|
import com.tcctlo.law.entity.CaseStatistics;
|
||||||
import com.tcctlo.law.entity.FileManager;
|
import com.tcctlo.law.entity.FileManager;
|
||||||
import com.tcctlo.law.vo.CaseArchivedVO;
|
import com.tcctlo.law.vo.CaseArchivedVO;
|
||||||
import com.tcctlo.law.vo.CaseInformationEnterVO;
|
import com.tcctlo.law.vo.CaseInformationEnterVO;
|
||||||
|
@ -152,4 +153,10 @@ public interface ICaseInformationService extends IService<CaseInformation>{
|
||||||
* @return 是否上传成功
|
* @return 是否上传成功
|
||||||
*/
|
*/
|
||||||
Boolean caseInfoUpload(List<FileManager> fileManager);
|
Boolean caseInfoUpload(List<FileManager> fileManager);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据案件状态统计案件数量
|
||||||
|
*/
|
||||||
|
Map<String, List<CaseStatistics>> statisticsCaseStatus(Integer type);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,4 +38,11 @@ public interface IIndexService {
|
||||||
* @return 数据集
|
* @return 数据集
|
||||||
*/
|
*/
|
||||||
List<IndexStatistics> earningsTrend(Date startTime, Date endTime);
|
List<IndexStatistics> earningsTrend(Date startTime, Date endTime);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所有律师信息
|
||||||
|
* @return 结果集
|
||||||
|
*/
|
||||||
|
Object lawInfo();
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,80 @@
|
||||||
|
package com.tcctlo.law.service;
|
||||||
|
|
||||||
|
import com.tcctlo.law.entity.InvoiceRecord;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.tcctlo.law.vo.InvoiceRecordVO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 开票记录表 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author
|
||||||
|
* @since 2025-03-07
|
||||||
|
*/
|
||||||
|
public interface IInvoiceRecordService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 分页列表查询
|
||||||
|
* </p>
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Page<InvoiceRecord> list(Integer pageNo, Integer pageSize);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 详情接口
|
||||||
|
* </p>
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
InvoiceRecord getById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 新增接口
|
||||||
|
* </p>
|
||||||
|
* @param invoiceRecord
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean create(InvoiceRecordVO invoiceRecord);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 删除接口
|
||||||
|
* </p>
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer delete(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 更新接口
|
||||||
|
* </p>
|
||||||
|
* @param invoiceRecord
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer update(InvoiceRecord invoiceRecord);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量逻辑删除
|
||||||
|
* @param params 参数
|
||||||
|
* @return 是否删除成功
|
||||||
|
*/
|
||||||
|
Integer deleteBatch(Map<String, String> params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据案件ID获取开票记录
|
||||||
|
* @return 结果集
|
||||||
|
*/
|
||||||
|
List<InvoiceRecordVO> selectByCaseId(Long caseId);
|
||||||
|
|
||||||
|
}
|
|
@ -15,10 +15,7 @@ import com.tcctlo.law.mapper.*;
|
||||||
import com.tcctlo.law.service.*;
|
import com.tcctlo.law.service.*;
|
||||||
import com.tcctlo.law.tools.RedisGenerateCaseNo;
|
import com.tcctlo.law.tools.RedisGenerateCaseNo;
|
||||||
import com.tcctlo.law.tools.RichTextToWordSimple;
|
import com.tcctlo.law.tools.RichTextToWordSimple;
|
||||||
import com.tcctlo.law.vo.CaseArchivedVO;
|
import com.tcctlo.law.vo.*;
|
||||||
import com.tcctlo.law.vo.CaseInformationEnterVO;
|
|
||||||
import com.tcctlo.law.vo.CaseInformationListVO;
|
|
||||||
import com.tcctlo.law.vo.CollectionRecordEnterVO;
|
|
||||||
import com.tcctlo.system.mapper.SysUserMapper;
|
import com.tcctlo.system.mapper.SysUserMapper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
@ -26,7 +23,9 @@ 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.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -112,6 +111,12 @@ public class CaseInformationServiceImpl extends ServiceImpl<CaseInformationMappe
|
||||||
@Resource
|
@Resource
|
||||||
private ICollectionRecordService collectionRecordService;
|
private ICollectionRecordService collectionRecordService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案件开票
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private InvoiceRecordMapper invoiceRecordMapper;
|
||||||
|
|
||||||
/*@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();
|
||||||
|
@ -171,7 +176,7 @@ public class CaseInformationServiceImpl extends ServiceImpl<CaseInformationMappe
|
||||||
Date paymentDeadline = item.getPaymentDeadline();
|
Date paymentDeadline = item.getPaymentDeadline();
|
||||||
if (paymentDeadline != null) {
|
if (paymentDeadline != null) {
|
||||||
if (DateUtil.compare(paymentDeadline, new Date()) < 0 && item.getAmountReceivedSum().compareTo(item.getAmountReceivable()) < 0) {
|
if (DateUtil.compare(paymentDeadline, new Date()) < 0 && item.getAmountReceivedSum().compareTo(item.getAmountReceivable()) < 0) {
|
||||||
item.setCollectionStatus(3);
|
caseInformationMapper.updateCollectionStatus(item.getId(),3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,6 +206,15 @@ public class CaseInformationServiceImpl extends ServiceImpl<CaseInformationMappe
|
||||||
item.setFileFlag(fileNum > 0);
|
item.setFileFlag(fileNum > 0);
|
||||||
item.setFileList(fileManagerMapper.selectFileByCaseId(item.getId()));
|
item.setFileList(fileManagerMapper.selectFileByCaseId(item.getId()));
|
||||||
|
|
||||||
|
//开票状态
|
||||||
|
List<InvoiceRecordVO> invoiceRecords = invoiceRecordMapper.selectByCaseId(item.getId());
|
||||||
|
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 {
|
||||||
|
item.setInvoiceStatus("0");
|
||||||
|
}
|
||||||
|
|
||||||
item.setDemandPaymentRecordList(demandPaymentRecordMapper.selectByCaseId(item.getId()));
|
item.setDemandPaymentRecordList(demandPaymentRecordMapper.selectByCaseId(item.getId()));
|
||||||
}
|
}
|
||||||
return caseInformationPage;
|
return caseInformationPage;
|
||||||
|
@ -320,10 +334,21 @@ public class CaseInformationServiceImpl extends ServiceImpl<CaseInformationMappe
|
||||||
String nickName = loginUser.getUser().getNickName();
|
String nickName = loginUser.getUser().getNickName();
|
||||||
try {
|
try {
|
||||||
CaseInformation caseInformation = caseInfo.getCaseInformation(); //案件信息
|
CaseInformation caseInformation = caseInfo.getCaseInformation(); //案件信息
|
||||||
caseInformation.setCaseNo(redisGenerateCaseNo.generateCaseNo(caseInformation.getBusinessClassify())); //生成案件编号
|
caseInformation.setCaseNo(redisGenerateCaseNo.generateCaseNo(Integer.parseInt(caseInformation.getBusinessClassify()))); //生成案件编号
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
caseInformationMapper.insert(caseInfo.getCaseInformation()); //插入案件信息
|
caseInformationMapper.insert(caseInfo.getCaseInformation()); //插入案件信息
|
||||||
Long caseId = caseInformation.getId(); //获取案件ID
|
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<ImpulseInformation> impulseInformationList = new ArrayList<>();
|
List<ImpulseInformation> impulseInformationList = new ArrayList<>();
|
||||||
List<ImpulseInformation> entrustingParty = caseInfo.getEntrustingParty();
|
List<ImpulseInformation> entrustingParty = caseInfo.getEntrustingParty();
|
||||||
|
@ -397,7 +422,7 @@ public class CaseInformationServiceImpl extends ServiceImpl<CaseInformationMappe
|
||||||
public CaseInformationEnterVO selectCaseInfoById(Long id) {
|
public CaseInformationEnterVO selectCaseInfoById(Long id) {
|
||||||
CaseInformationEnterVO result = new CaseInformationEnterVO();
|
CaseInformationEnterVO result = new CaseInformationEnterVO();
|
||||||
//案件信息表----caseInformation
|
//案件信息表----caseInformation
|
||||||
CaseInformation caseInformation = caseInformationMapper.selectById(id);
|
CaseInformation caseInformation = caseInformationMapper.selectCaseInfoById(id);
|
||||||
result.setCaseInformation(caseInformation);
|
result.setCaseInformation(caseInformation);
|
||||||
|
|
||||||
//设置案件未收金额
|
//设置案件未收金额
|
||||||
|
@ -598,6 +623,63 @@ public class CaseInformationServiceImpl extends ServiceImpl<CaseInformationMappe
|
||||||
return fileManagerService.saveBatch(fileManager);
|
return fileManagerService.saveBatch(fileManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, List<CaseStatistics>> statisticsCaseStatus(Integer type) {
|
||||||
|
return getStatisticsCaseStatusDate(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, List<CaseStatistics>> getStatisticsCaseStatusDate(Integer type){
|
||||||
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
|
String roleKey = sysUserMapper.selectUserRoleByUserId(loginUser.getUserId());
|
||||||
|
|
||||||
|
//如果当前登录用户的角色【律师】,则查询当前登录律师的案件信息,否则查询全部案件信息
|
||||||
|
String userId = "";
|
||||||
|
if (CaseEnum.LAWYER.getRoleKey().equals(roleKey)) {
|
||||||
|
userId = loginUser.getUserId().toString();
|
||||||
|
}
|
||||||
|
Map<String, List<CaseStatistics>> resMap = new HashMap<>();
|
||||||
|
//案件状态统计
|
||||||
|
List<CaseStatistics> caseStatus = new ArrayList<>();
|
||||||
|
caseStatus.add(new CaseStatistics("利冲收案", caseInformationMapper.statisticsCaseStatus(userId, 0, type)));
|
||||||
|
caseStatus.add(new CaseStatistics("正常收案", caseInformationMapper.statisticsCaseStatus(userId, 1, type)));
|
||||||
|
caseStatus.add(new CaseStatistics("终止收案", caseInformationMapper.statisticsCaseStatus(userId, 2, type)));
|
||||||
|
caseStatus.add(new CaseStatistics("案件撤销", caseInformationMapper.statisticsCaseStatus(userId, 3, type)));
|
||||||
|
resMap.put("caseStatus", caseStatus);
|
||||||
|
|
||||||
|
//收款状态统计
|
||||||
|
List<CaseStatistics> collectionStatus = new ArrayList<>();
|
||||||
|
collectionStatus.add(new CaseStatistics("未付款", caseInformationMapper.statisticsCaseCollectionStatus(userId, 0, type)));
|
||||||
|
collectionStatus.add(new CaseStatistics("部分付款", caseInformationMapper.statisticsCaseCollectionStatus(userId, 1, type)));
|
||||||
|
collectionStatus.add(new CaseStatistics("已结清", caseInformationMapper.statisticsCaseCollectionStatus(userId, 2, type)));
|
||||||
|
collectionStatus.add(new CaseStatistics("逾期部分未付款", caseInformationMapper.statisticsCaseCollectionStatus(userId, 3, type)));
|
||||||
|
resMap.put("collectionStatus", collectionStatus);
|
||||||
|
|
||||||
|
//利冲状态
|
||||||
|
List<CaseStatistics> impulseStatus = new ArrayList<>();
|
||||||
|
impulseStatus.add(new CaseStatistics("未检索", caseInformationMapper.statisticsCaseImpulseStatus(userId, 0, type)));
|
||||||
|
impulseStatus.add(new CaseStatistics("疑似利冲", caseInformationMapper.statisticsCaseImpulseStatus(userId, 1, type)));
|
||||||
|
impulseStatus.add(new CaseStatistics("检索通过", caseInformationMapper.statisticsCaseImpulseStatus(userId, 2, type)));
|
||||||
|
resMap.put("impulseStatus", impulseStatus);
|
||||||
|
|
||||||
|
//审核状态
|
||||||
|
List<CaseStatistics> auditStatus = new ArrayList<>();
|
||||||
|
auditStatus.add(new CaseStatistics("未审核", caseInformationMapper.statisticsCaseAuditStatus(userId, 0, type)));
|
||||||
|
auditStatus.add(new CaseStatistics("已审核", caseInformationMapper.statisticsCaseAuditStatus(userId, 1, type)));
|
||||||
|
auditStatus.add(new CaseStatistics("审核不通过", caseInformationMapper.statisticsCaseAuditStatus(userId, 2, type)));
|
||||||
|
resMap.put("auditStatus", auditStatus);
|
||||||
|
//归档状态
|
||||||
|
List<CaseStatistics> archiveStatus = new ArrayList<>();
|
||||||
|
archiveStatus.add(new CaseStatistics("未归档", caseInformationMapper.statisticsCaseArchiveStatus(userId, 0, type)));
|
||||||
|
archiveStatus.add(new CaseStatistics("已归档", caseInformationMapper.statisticsCaseArchiveStatus(userId, 1, type)));
|
||||||
|
resMap.put("archiveStatus", archiveStatus);
|
||||||
|
//结案状态
|
||||||
|
List<CaseStatistics> finishStatus = new ArrayList<>();
|
||||||
|
finishStatus.add(new CaseStatistics("未结案", caseInformationMapper.statisticsCaseFinishStatus(userId, 0, type)));
|
||||||
|
finishStatus.add(new CaseStatistics("已结案", caseInformationMapper.statisticsCaseFinishStatus(userId, 1, type)));
|
||||||
|
resMap.put("isFinishStatus", finishStatus);
|
||||||
|
return resMap;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑协办律师
|
* 编辑协办律师
|
||||||
*
|
*
|
||||||
|
@ -606,6 +688,12 @@ public class CaseInformationServiceImpl extends ServiceImpl<CaseInformationMappe
|
||||||
*/
|
*/
|
||||||
public void editAssistingLawyer(List<CaseLawyer> oldData, List<CaseLawyer> newData, Long caseId) {
|
public void editAssistingLawyer(List<CaseLawyer> oldData, List<CaseLawyer> newData, Long caseId) {
|
||||||
List<CaseLawyer> insert = newData.stream().filter(c -> c.getId() == null).peek(c -> c.setCaseId(caseId)).collect(Collectors.toList());
|
List<CaseLawyer> insert = newData.stream().filter(c -> c.getId() == null).peek(c -> c.setCaseId(caseId)).collect(Collectors.toList());
|
||||||
|
insert.stream().peek(new Consumer<CaseLawyer>() {
|
||||||
|
@Override
|
||||||
|
public void accept(CaseLawyer item) {
|
||||||
|
item.setLawyerType(1);
|
||||||
|
}
|
||||||
|
}).collect(Collectors.toList());
|
||||||
List<Long> oldIds = oldData.stream().map(c -> c.getId()).collect(Collectors.toList());
|
List<Long> oldIds = oldData.stream().map(c -> c.getId()).collect(Collectors.toList());
|
||||||
List<Long> newIds = newData.stream().map(c -> c.getId()).collect(Collectors.toList());
|
List<Long> newIds = newData.stream().map(c -> c.getId()).collect(Collectors.toList());
|
||||||
List<Long> deleteIds = (List<Long>) CollUtil.subtract(oldIds, newIds); //将原来的数据与现在数据进行比较,得到需要删除的ID
|
List<Long> deleteIds = (List<Long>) CollUtil.subtract(oldIds, newIds); //将原来的数据与现在数据进行比较,得到需要删除的ID
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.tcctlo.law.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
@ -17,17 +18,16 @@ import com.tcctlo.law.mapper.CollectionRecordMapper;
|
||||||
import com.tcctlo.law.mapper.FileManagerMapper;
|
import com.tcctlo.law.mapper.FileManagerMapper;
|
||||||
import com.tcctlo.law.service.ICollectionRecordService;
|
import com.tcctlo.law.service.ICollectionRecordService;
|
||||||
import com.tcctlo.law.service.IFileManagerService;
|
import com.tcctlo.law.service.IFileManagerService;
|
||||||
|
import com.tcctlo.law.vo.CaseInformationListVO;
|
||||||
import com.tcctlo.law.vo.CollectionRecordEnterVO;
|
import com.tcctlo.law.vo.CollectionRecordEnterVO;
|
||||||
|
import com.tcctlo.system.mapper.SysUserMapper;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Isolation;
|
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.math.BigDecimal;
|
||||||
import java.util.Arrays;
|
import java.util.*;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
@ -56,6 +56,12 @@ public class CollectionRecordServiceImpl extends ServiceImpl<CollectionRecordMap
|
||||||
@Resource
|
@Resource
|
||||||
private CaseInformationMapper caseInformationMapper;
|
private CaseInformationMapper caseInformationMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统用户mapper
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private SysUserMapper sysUserMapper;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<CollectionRecord> list(Integer pageNo, Integer pageSize) {
|
public Page<CollectionRecord> list(Integer pageNo, Integer pageSize) {
|
||||||
|
@ -133,13 +139,16 @@ public class CollectionRecordServiceImpl extends ServiceImpl<CollectionRecordMap
|
||||||
//获取新添加的收款记录,计算出新的收款记录金额,在总金额中加上
|
//获取新添加的收款记录,计算出新的收款记录金额,在总金额中加上
|
||||||
List<CollectionRecordEnterVO> insert = newData.stream().filter(item -> item.getId() == null).collect(Collectors.toList());
|
List<CollectionRecordEnterVO> insert = newData.stream().filter(item -> item.getId() == null).collect(Collectors.toList());
|
||||||
insert.forEach(item -> {
|
insert.forEach(item -> {
|
||||||
|
if (CollUtil.isEmpty(item.getFileManager())){
|
||||||
|
throw new RuntimeException("请上传缴费凭证");
|
||||||
|
}
|
||||||
List<FileManager> fileManager = item.getFileManager().stream().peek(item1 -> item1.setFileType(1)).collect(Collectors.toList());
|
List<FileManager> fileManager = item.getFileManager().stream().peek(item1 -> item1.setFileType(1)).collect(Collectors.toList());
|
||||||
fileManagerService.saveBatch(fileManager);
|
fileManagerService.saveBatch(fileManager);
|
||||||
item.setCollectionUrlId(fileManager.stream().map(i -> i.getId().toString()).collect(Collectors.joining(",")));
|
item.setCollectionUrlId(fileManager.stream().map(i -> i.getId().toString()).collect(Collectors.joining(",")));
|
||||||
item.setUserId(userId);
|
item.setUserId(userId);
|
||||||
item.setUserName(nickName);
|
item.setUserName(nickName);
|
||||||
String collect = loginUser.getUser().getRoles().stream().map(SysRole::getRoleKey).collect(Collectors.joining(","));
|
String collect = loginUser.getUser().getRoles().stream().map(SysRole::getRoleKey).collect(Collectors.joining(","));
|
||||||
if (!collect.contains("FINANCE")) {
|
if (!collect.contains("CAIWU")) {
|
||||||
item.setAuditStatus(0);
|
item.setAuditStatus(0);
|
||||||
} else {
|
} else {
|
||||||
item.setAuditStatus(1);
|
item.setAuditStatus(1);
|
||||||
|
@ -149,7 +158,22 @@ public class CollectionRecordServiceImpl extends ServiceImpl<CollectionRecordMap
|
||||||
BigDecimal addMoney = list.stream().map(CollectionRecord::getAmountReceived).reduce(BigDecimal.ZERO, BigDecimal::add); //新增收款记录金额
|
BigDecimal addMoney = list.stream().map(CollectionRecord::getAmountReceived).reduce(BigDecimal.ZERO, BigDecimal::add); //新增收款记录金额
|
||||||
this.saveBatch(list);
|
this.saveBatch(list);
|
||||||
Long caseId = list.get(0).getCaseId();
|
Long caseId = list.get(0).getCaseId();
|
||||||
caseInformationMapper.updateCaseAmount(caseId, caseInformationMapper.selectCaseById(caseId).getAmountReceivedSum().add(addMoney));
|
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;
|
return true;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -168,9 +192,15 @@ public class CollectionRecordServiceImpl extends ServiceImpl<CollectionRecordMap
|
||||||
BigDecimal delMoney = collectionRecord.getAmountReceived(); //要减去的金额
|
BigDecimal delMoney = collectionRecord.getAmountReceived(); //要减去的金额
|
||||||
collectionRecordMapper.removeByCaseIdAdnRecordId(id, caseId); //从收款记录中删除
|
collectionRecordMapper.removeByCaseIdAdnRecordId(id, caseId); //从收款记录中删除
|
||||||
caseInformationMapper.updateCaseAmount(caseId, caseInformationMapper.selectCaseById(caseId).getAmountReceivedSum().subtract(delMoney));
|
caseInformationMapper.updateCaseAmount(caseId, caseInformationMapper.selectCaseById(caseId).getAmountReceivedSum().subtract(delMoney));
|
||||||
|
CaseInformationListVO caseInfo = caseInformationMapper.selectCaseById(caseId);
|
||||||
|
if (caseInfo.getAmountReceivedSum().compareTo(new BigDecimal(0.0)) == 0){
|
||||||
|
caseInformationMapper.updateCollectionStatus(caseId,0);
|
||||||
|
}
|
||||||
|
String urlStr = collectionRecord.getCollectionUrlId();
|
||||||
|
if (StrUtil.isNotBlank(urlStr)){
|
||||||
List<Long> fileIds = Arrays.stream(collectionRecord.getCollectionUrlId().split(",")).map(Long::parseLong).collect(Collectors.toList());
|
List<Long> fileIds = Arrays.stream(collectionRecord.getCollectionUrlId().split(",")).map(Long::parseLong).collect(Collectors.toList());
|
||||||
fileManagerMapper.removeByCaseIdAndFileIds(caseId, fileIds);
|
fileManagerMapper.removeByCaseIdAndFileIds(caseId, fileIds);
|
||||||
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -187,8 +217,15 @@ public class CollectionRecordServiceImpl extends ServiceImpl<CollectionRecordMap
|
||||||
List<Long> collect = Arrays.stream(item.getCollectionUrlId().split(",")).map(Long::parseLong).collect(Collectors.toList());
|
List<Long> collect = Arrays.stream(item.getCollectionUrlId().split(",")).map(Long::parseLong).collect(Collectors.toList());
|
||||||
item.setFileManager(fileManagerMapper.selectByCRid(collect));
|
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);
|
item.setIsEdit(item.getAuditStatus() == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
return lists;
|
return lists;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -84,9 +84,11 @@ public class DemandPaymentRecordServiceImpl extends ServiceImpl<DemandPaymentRec
|
||||||
BigDecimal amountReceivedSum = caseInformation.getAmountReceivedSum(); //案件已收金额
|
BigDecimal amountReceivedSum = caseInformation.getAmountReceivedSum(); //案件已收金额
|
||||||
Date paymentDeadline = caseInformation.getPaymentDeadline(); //付款期限 DateUtil.format(paymentDeadline,"yyyy-MM-dd")
|
Date paymentDeadline = caseInformation.getPaymentDeadline(); //付款期限 DateUtil.format(paymentDeadline,"yyyy-MM-dd")
|
||||||
BigDecimal reserveMoney = caseInformation.getReserveMoney(); //预留款
|
BigDecimal reserveMoney = caseInformation.getReserveMoney(); //预留款
|
||||||
Date termOfConsultancy = caseInformation.getTermOfConsultancy(); //顾问期限
|
Date termOfConsultancyStart = caseInformation.getTermOfConsultancyStart(); //顾问期限开始时间
|
||||||
|
Date termOfConsultancyEnd = caseInformation.getTermOfConsultancyEnd(); //顾问期限结束时间
|
||||||
|
|
||||||
String msg = caseName + "[" + caseNo + "],应收金额为:" + amountReceivable + ",已收金额为:" + amountReceivedSum + ",付款期限:" + (paymentDeadline == null ? "无" : DateUtil.format(paymentDeadline, "yyyy-MM-dd")) + ",预留款:" + reserveMoney + ",顾问期限:" + (termOfConsultancy == null ? "无" : DateUtil.format(termOfConsultancy, "yyyy-MM-dd")) + ",剩余:" + amountReceivable.subtract(amountReceivedSum) + "未缴费,请尽快缴费";
|
// String msg = caseName + "[" + caseNo + "],应收金额为:" + amountReceivable + ",已收金额为:" + amountReceivedSum + ",付款期限:" + (paymentDeadline == null ? "无" : DateUtil.format(paymentDeadline, "yyyy-MM-dd")) + ",预留款:" + reserveMoney + ",顾问期限:" + (termOfConsultancy == null ? "无" : DateUtil.format(termOfConsultancy, "yyyy-MM-dd")) + ",剩余:" + amountReceivable.subtract(amountReceivedSum) + "未缴费,请尽快缴费";
|
||||||
|
String msg = caseName + "[" + caseNo + "],应收金额为:" + amountReceivable + ",已收金额为:" + amountReceivedSum + ",付款期限:" + (paymentDeadline == null ? "无" : DateUtil.format(paymentDeadline, "yyyy-MM-dd")) + ",预留款:" + reserveMoney + ",顾问期限开始时间:" + (termOfConsultancyStart == null ? "无" : DateUtil.format(termOfConsultancyStart, "yyyy-MM-dd")) + "顾问期限结束时间:" + (termOfConsultancyEnd == null ? "无" : DateUtil.format(termOfConsultancyEnd, "yyyy-MM-dd")) + ",剩余:" + amountReceivable.subtract(amountReceivedSum) + "未缴费,请尽快缴费";
|
||||||
|
|
||||||
DemandPaymentRecord demandPaymentRecord = new DemandPaymentRecord();
|
DemandPaymentRecord demandPaymentRecord = new DemandPaymentRecord();
|
||||||
demandPaymentRecord.setCaseId(caseId);
|
demandPaymentRecord.setCaseId(caseId);
|
||||||
|
|
|
@ -10,10 +10,13 @@ import com.tcctlo.law.mapper.CaseInformationMapper;
|
||||||
import com.tcctlo.law.mapper.CollectionRecordMapper;
|
import com.tcctlo.law.mapper.CollectionRecordMapper;
|
||||||
import com.tcctlo.law.service.ICollectionRecordService;
|
import com.tcctlo.law.service.ICollectionRecordService;
|
||||||
import com.tcctlo.law.service.IIndexService;
|
import com.tcctlo.law.service.IIndexService;
|
||||||
|
import com.tcctlo.law.vo.IndexLawCaseMoneyInfo;
|
||||||
|
import com.tcctlo.law.vo.IndexLawInfo;
|
||||||
import com.tcctlo.system.mapper.SysUserMapper;
|
import com.tcctlo.system.mapper.SysUserMapper;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.BiConsumer;
|
import java.util.function.BiConsumer;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
@ -50,6 +53,9 @@ public class IIndexServiceImpl implements IIndexService {
|
||||||
res.add(new IndexStatistics("行政复议及诉讼业务", Double.valueOf(caseInformationMapper.selectCountByBusinessType(userId, 2, startTime, endTime))));
|
res.add(new IndexStatistics("行政复议及诉讼业务", Double.valueOf(caseInformationMapper.selectCountByBusinessType(userId, 2, startTime, endTime))));
|
||||||
res.add(new IndexStatistics("企业常年法律顾问", Double.valueOf(caseInformationMapper.selectCountByBusinessType(userId, 3, startTime, endTime))));
|
res.add(new IndexStatistics("企业常年法律顾问", Double.valueOf(caseInformationMapper.selectCountByBusinessType(userId, 3, startTime, endTime))));
|
||||||
res.add(new IndexStatistics("企业专项法律顾问", Double.valueOf(caseInformationMapper.selectCountByBusinessType(userId, 4, startTime, endTime))));
|
res.add(new IndexStatistics("企业专项法律顾问", Double.valueOf(caseInformationMapper.selectCountByBusinessType(userId, 4, startTime, endTime))));
|
||||||
|
res.add(new IndexStatistics("其他非诉讼业务", Double.valueOf(caseInformationMapper.selectCountByBusinessType(userId, 5, startTime, endTime))));
|
||||||
|
res.add(new IndexStatistics("劳动争议仲裁", Double.valueOf(caseInformationMapper.selectCountByBusinessType(userId, 6, startTime, endTime))));
|
||||||
|
res.add(new IndexStatistics("商事仲裁", Double.valueOf(caseInformationMapper.selectCountByBusinessType(userId, 7, startTime, endTime))));
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +110,7 @@ public class IIndexServiceImpl implements IIndexService {
|
||||||
}
|
}
|
||||||
|
|
||||||
List<CollectionRecord> list = recordMapper.earningsTrend(userId, startTime, endTime);
|
List<CollectionRecord> list = recordMapper.earningsTrend(userId, startTime, endTime);
|
||||||
Map<Date, List<CollectionRecord>> map = list.stream().collect(Collectors.groupingBy(item -> DateUtil.parse(DateUtil.format(item.getCreateTime(), "yyyy-MM-dd"))));
|
Map<Date, List<CollectionRecord>> map = list.stream().collect(Collectors.groupingBy(item -> DateUtil.parse(DateUtil.format(item.getCollectionDate(), "yyyy-MM-dd"))));
|
||||||
TreeMap<Date, List<CollectionRecord>> treeMap = new TreeMap<>(map);
|
TreeMap<Date, List<CollectionRecord>> treeMap = new TreeMap<>(map);
|
||||||
List<IndexStatistics> res = new ArrayList<>();
|
List<IndexStatistics> res = new ArrayList<>();
|
||||||
TreeMap<String, List<CollectionRecord>> itemMap = new TreeMap<>();
|
TreeMap<String, List<CollectionRecord>> itemMap = new TreeMap<>();
|
||||||
|
@ -117,4 +123,28 @@ public class IIndexServiceImpl implements IIndexService {
|
||||||
});
|
});
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object lawInfo() {
|
||||||
|
List<IndexLawInfo> indexLawInfos = caseInformationMapper.selectLawInfo(); //所有的律师信息
|
||||||
|
List<IndexLawCaseMoneyInfo> res = indexLawInfos.stream().map(new Function<IndexLawInfo, IndexLawCaseMoneyInfo>() {
|
||||||
|
@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;
|
||||||
|
}
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
return res;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.tcctlo.law.service.impl;
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.ObjUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
@ -52,7 +53,10 @@ public class ImpulseInformationServiceImpl extends ServiceImpl<ImpulseInformatio
|
||||||
if (item.getCaseId() != null) {
|
if (item.getCaseId() != null) {
|
||||||
CaseInformation caseInformation = caseInformationMapper.selectById(item.getCaseId());
|
CaseInformation caseInformation = caseInformationMapper.selectById(item.getCaseId());
|
||||||
item.setCaseInfoName(caseInformation.getCaseName());
|
item.setCaseInfoName(caseInformation.getCaseName());
|
||||||
item.setTermOfConsultancy(caseInformation.getTermOfConsultancy());
|
|
||||||
|
item.setTermOfConsultancyStart(caseInformation.getTermOfConsultancyStart());
|
||||||
|
item.setTermOfConsultancyEnd(caseInformation.getTermOfConsultancyEnd());
|
||||||
|
|
||||||
item.setArchiveStatus(caseInformation.getArchiveStatus());
|
item.setArchiveStatus(caseInformation.getArchiveStatus());
|
||||||
item.setIsFinishCase(caseInformation.getIsFinishCase());
|
item.setIsFinishCase(caseInformation.getIsFinishCase());
|
||||||
}
|
}
|
||||||
|
@ -154,20 +158,6 @@ public class ImpulseInformationServiceImpl extends ServiceImpl<ImpulseInformatio
|
||||||
TreeMap<String, Object> resMap = new TreeMap<>();
|
TreeMap<String, Object> resMap = new TreeMap<>();
|
||||||
List<ClashInfoVO> clashInfoVOS = new ArrayList<>();
|
List<ClashInfoVO> clashInfoVOS = new ArrayList<>();
|
||||||
Long id = impulseInformation.getId();
|
Long id = impulseInformation.getId();
|
||||||
/*if (id != null){
|
|
||||||
ImpulseInformation item = impulseInformationMapper.selectById(id);
|
|
||||||
if (item.getCheckFlag() == 0){
|
|
||||||
resMap.put("result", false);
|
|
||||||
ClashInfoVO clashInfoVO = BeanUtil.copyProperties(item, ClashInfoVO.class);
|
|
||||||
clashInfoVOS.add(clashInfoVO);
|
|
||||||
resMap.put("clashInfo", clashInfoVOS);
|
|
||||||
return resMap;
|
|
||||||
}else {
|
|
||||||
resMap.put("result", true);
|
|
||||||
resMap.put("clashInfo", null);
|
|
||||||
return resMap;
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
if (id != null) {
|
if (id != null) {
|
||||||
|
@ -204,13 +194,17 @@ public class ImpulseInformationServiceImpl extends ServiceImpl<ImpulseInformatio
|
||||||
for (ImpulseInformation item : resList) {
|
for (ImpulseInformation item : resList) {
|
||||||
ClashInfoVO clashInfoVO = new ClashInfoVO();
|
ClashInfoVO clashInfoVO = new ClashInfoVO();
|
||||||
CaseInformationListVO caseInformationListVO = caseInformationMapper.selectCaseById(item.getCaseId());
|
CaseInformationListVO caseInformationListVO = caseInformationMapper.selectCaseById(item.getCaseId());
|
||||||
clashInfoVO.setCaseId(item.getCaseId());
|
if (caseInformationListVO != null){
|
||||||
clashInfoVO.setCaseInfoName(caseInformationListVO.getCaseName());
|
clashInfoVO.setCaseId(ObjUtil.isEmpty(item.getCaseId()) ? null : item.getCaseId());
|
||||||
clashInfoVO.setCaseInfoNo(caseInformationListVO.getCaseNo());
|
clashInfoVO.setCaseInfoName(ObjUtil.isEmpty(caseInformationListVO.getCaseName()) ? null : caseInformationListVO.getCaseName());
|
||||||
clashInfoVO.setCaseName(item.getCaseName());
|
clashInfoVO.setCaseInfoNo(ObjUtil.isEmpty(caseInformationListVO.getCaseNo()) ? null : caseInformationListVO.getCaseNo());
|
||||||
clashInfoVO.setCaseNo(item.getCaseNo());
|
}
|
||||||
clashInfoVO.setCaseType(item.getCaseType());
|
|
||||||
clashInfoVO.setIsClient(item.getIsClient());
|
|
||||||
|
clashInfoVO.setCaseName(ObjUtil.isEmpty(item.getCaseName()) ? null : item.getCaseName());
|
||||||
|
clashInfoVO.setCaseNo(ObjUtil.isEmpty(item.getCaseNo()) ? null : item.getCaseNo());
|
||||||
|
clashInfoVO.setCaseType(ObjUtil.isEmpty(item.getCaseType()) ? null : item.getCaseType());
|
||||||
|
clashInfoVO.setIsClient(ObjUtil.isEmpty(item.getIsClient()) ? null : item.getIsClient());
|
||||||
clashInfoVOS.add(clashInfoVO);
|
clashInfoVOS.add(clashInfoVO);
|
||||||
}
|
}
|
||||||
resMap.put("clashInfo", clashInfoVOS);
|
resMap.put("clashInfo", clashInfoVOS);
|
||||||
|
@ -291,13 +285,19 @@ public class ImpulseInformationServiceImpl extends ServiceImpl<ImpulseInformatio
|
||||||
List<ImpulseInformation> resList = impulseInformationMapper.retrievalConflict(item);
|
List<ImpulseInformation> resList = impulseInformationMapper.retrievalConflict(item);
|
||||||
item.setIsClient(1 - item.getIsClient());
|
item.setIsClient(1 - item.getIsClient());
|
||||||
CaseInformation caseItem = caseInformationMapper.selectById(item.getCaseId()); //查询当前案件信息【暂时不需要】
|
CaseInformation caseItem = caseInformationMapper.selectById(item.getCaseId()); //查询当前案件信息【暂时不需要】
|
||||||
clashMsgWithCaseInfo.setMsgMain("当前案件中:" + (item.getIsClient() == 0 ? "【委托方】->" : "【相对方】->") + item.getCaseName() + "[" + item.getCaseNo() + "]" + "与以下案件中的委托方/相对方有利冲嫌疑:");
|
clashMsgWithCaseInfo.setMsgMain("当前案件中:" + (item.getIsClient() == 0 ? "【委托方】->" : "【相对方】->") + item.getCaseName() + (item.getCaseNo() == null ? "" : "[" + item.getCaseNo() + "]") + "与以下案件中的委托方/相对方有利冲嫌疑:");
|
||||||
List<ClashMsgCaseInfoItem> list = new ArrayList<>();
|
List<ClashMsgCaseInfoItem> list = new ArrayList<>();
|
||||||
for (ImpulseInformation in : resList) {
|
for (ImpulseInformation in : resList) {
|
||||||
CaseInformation ci = caseInformationMapper.selectById(in.getCaseId());
|
CaseInformation ci = null;
|
||||||
ClashMsgCaseInfoItem clashMsgCaseInfoItem = new ClashMsgCaseInfoItem();
|
ClashMsgCaseInfoItem clashMsgCaseInfoItem = new ClashMsgCaseInfoItem();
|
||||||
|
if (in.getCaseId() != null){
|
||||||
|
ci = caseInformationMapper.selectById(in.getCaseId());
|
||||||
clashMsgCaseInfoItem.setCaseId(ci.getId());
|
clashMsgCaseInfoItem.setCaseId(ci.getId());
|
||||||
clashMsgCaseInfoItem.setMsg(ci.getCaseName() + "【" + ci.getCaseNo() + "】案件中的" + (in.getIsClient() == 0 ? "【委托方】" : "【相对方】") + in.getCaseName() + "[" + in.getCaseNo() + "]" + "有疑似利冲信息");
|
clashMsgCaseInfoItem.setMsg(ci.getCaseName() + "【" + ci.getCaseNo() + "】案件中的" + (in.getIsClient() == 0 ? "【委托方】" : "【相对方】") + in.getCaseName() + "[" + in.getCaseNo() + "]" + "有疑似利冲信息");
|
||||||
|
}else {
|
||||||
|
clashMsgCaseInfoItem.setMsg((in.getIsClient() == 0 ? "【委托方】" : "【相对方】") + in.getCaseName() + "有疑似利冲信息");
|
||||||
|
}
|
||||||
|
|
||||||
list.add(clashMsgCaseInfoItem);
|
list.add(clashMsgCaseInfoItem);
|
||||||
}
|
}
|
||||||
clashMsgWithCaseInfo.setMsgSub(list);
|
clashMsgWithCaseInfo.setMsgSub(list);
|
||||||
|
|
|
@ -0,0 +1,102 @@
|
||||||
|
package com.tcctlo.law.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.tcctlo.common.core.domain.model.LoginUser;
|
||||||
|
import com.tcctlo.common.utils.SecurityUtils;
|
||||||
|
import com.tcctlo.law.entity.FileManager;
|
||||||
|
import com.tcctlo.law.entity.InvoiceRecord;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
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.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
import java.util.function.Function;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 开票记录表 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author
|
||||||
|
* @since 2025-03-07
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class InvoiceRecordServiceImpl extends ServiceImpl<InvoiceRecordMapper,InvoiceRecord> implements IInvoiceRecordService {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private InvoiceRecordMapper invoiceRecordMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private FileManagerServiceImpl fileManagerService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private FileManagerMapper fileManagerMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<InvoiceRecord> list(Integer pageNo, Integer pageSize) {
|
||||||
|
return invoiceRecordMapper.selectPage(new Page<>(pageNo, pageSize), new QueryWrapper<>());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InvoiceRecord getById(Long id) {
|
||||||
|
InvoiceRecord invoiceRecord = invoiceRecordMapper.selectById(id);
|
||||||
|
return invoiceRecord;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean create(InvoiceRecordVO invoiceRecord) {
|
||||||
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
|
Long userId = loginUser.getUserId();
|
||||||
|
String nickName = loginUser.getUser().getNickName();
|
||||||
|
invoiceRecord.setInvoiceUserId(userId);
|
||||||
|
invoiceRecord.setInvoiceUserName(nickName);
|
||||||
|
|
||||||
|
List<FileManager> fileManager = invoiceRecord.getFileManager();
|
||||||
|
fileManager.stream().peek(item -> item.setFileType(3)).collect(Collectors.toList());
|
||||||
|
fileManagerService.saveBatch(fileManager);
|
||||||
|
String ids = fileManager.stream().map(item -> item.getId().toString()).collect(Collectors.joining(","));
|
||||||
|
invoiceRecord.setInvoiceFileUrl(ids);
|
||||||
|
int insert = invoiceRecordMapper.insert(invoiceRecord);
|
||||||
|
return insert > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer delete(Long id) {
|
||||||
|
return invoiceRecordMapper.deleteById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer update(InvoiceRecord invoiceRecord) {
|
||||||
|
return invoiceRecordMapper.updateById(invoiceRecord);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer deleteBatch(Map<String, String> params) {
|
||||||
|
List<Long> ids = Arrays.stream(params.get("ids").split(","))
|
||||||
|
.map(Long::parseLong)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
return invoiceRecordMapper.deleteBatch(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<InvoiceRecordVO> selectByCaseId(Long caseId) {
|
||||||
|
List<InvoiceRecordVO> invoiceRecords = invoiceRecordMapper.selectByCaseId(caseId);
|
||||||
|
invoiceRecords.stream().peek(item -> {
|
||||||
|
List<Long> collect = Arrays.stream(item.getInvoiceFileUrl().split(",")).map(Long::parseLong).collect(Collectors.toList());
|
||||||
|
item.setFileManager(fileManagerMapper.selectByCRid(collect));
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
return invoiceRecords;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -34,11 +34,17 @@ public class RedisGenerateCaseNo {
|
||||||
case 1:
|
case 1:
|
||||||
return String.format("XS-%s-%03d", currentDate, counter);
|
return String.format("XS-%s-%03d", currentDate, counter);
|
||||||
case 2:
|
case 2:
|
||||||
return String.format("XZ-%s-%03d", currentDate, counter);
|
return String.format("XZFY-%s-%03d", currentDate, counter);
|
||||||
case 3:
|
case 3:
|
||||||
return String.format("CN-%s-%03d", currentDate, counter);
|
return String.format("QYCN-%s-%03d", currentDate, counter);
|
||||||
case 4:
|
case 4:
|
||||||
return String.format("ZX-%s-%03d", currentDate, counter);
|
return String.format("QYZX-%s-%03d", currentDate, counter);
|
||||||
|
case 5:
|
||||||
|
return String.format("QTFSS-%s-%03d", currentDate, counter);
|
||||||
|
case 6:
|
||||||
|
return String.format("LDZY-%s-%03d", currentDate, counter);
|
||||||
|
case 7:
|
||||||
|
return String.format("SHZC-%s-%03d", currentDate, counter);
|
||||||
}
|
}
|
||||||
|
|
||||||
return String.format("DEFAULT-%s-%03d", currentDate, counter);
|
return String.format("DEFAULT-%s-%03d", currentDate, counter);
|
||||||
|
|
|
@ -23,6 +23,13 @@ public class CaseInformationListVO extends CaseInformation {
|
||||||
*/
|
*/
|
||||||
private BigDecimal uncollectedMoney;
|
private BigDecimal uncollectedMoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案件发票
|
||||||
|
* 已开票金额:根据案件ID查询开票记录,将金额累加范湖
|
||||||
|
* 未开票:直接返回0
|
||||||
|
*/
|
||||||
|
private String invoiceStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 委托方
|
* 委托方
|
||||||
*/
|
*/
|
||||||
|
@ -61,4 +68,5 @@ public class CaseInformationListVO extends CaseInformation {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,8 +21,20 @@ public class ImpulseInformationVO extends ImpulseInformation {
|
||||||
/**
|
/**
|
||||||
* 顾问期限
|
* 顾问期限
|
||||||
*/
|
*/
|
||||||
|
/*@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date termOfConsultancy;*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 顾问期限开始时间
|
||||||
|
*/
|
||||||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
private Date termOfConsultancy;
|
private Date termOfConsultancyStart;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 顾问期限结束时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date termOfConsultancyEnd;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 归档状态【0:未归档,1:已归档】
|
* 归档状态【0:未归档,1:已归档】
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.tcctlo.law.vo;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class IndexLawCaseMoneyInfo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 律师名称
|
||||||
|
*/
|
||||||
|
private String lawName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 律师案件数量
|
||||||
|
*/
|
||||||
|
private int caseNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 律师涉及案件已收金额
|
||||||
|
*/
|
||||||
|
private BigDecimal amountReceived;
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
package com.tcctlo.law.vo;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首页律师信息
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class IndexLawInfo {
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户名称
|
||||||
|
*/
|
||||||
|
private String nickName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色ID
|
||||||
|
*/
|
||||||
|
private Long roleId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色名称
|
||||||
|
*/
|
||||||
|
private String roleName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色key
|
||||||
|
*/
|
||||||
|
private String roleKey;
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.tcctlo.law.vo;
|
||||||
|
|
||||||
|
import com.tcctlo.law.entity.FileManager;
|
||||||
|
import com.tcctlo.law.entity.InvoiceRecord;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 开票记录表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author
|
||||||
|
* @since 2025-03-07
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class InvoiceRecordVO extends InvoiceRecord implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开票文件
|
||||||
|
*/
|
||||||
|
private List<FileManager> fileManager;
|
||||||
|
|
||||||
|
}
|
|
@ -5,14 +5,42 @@
|
||||||
<mapper namespace="com.tcctlo.law.mapper.CaseInformationMapper">
|
<mapper namespace="com.tcctlo.law.mapper.CaseInformationMapper">
|
||||||
|
|
||||||
<sql id="baseColumn">
|
<sql id="baseColumn">
|
||||||
ci
|
ci.id,
|
||||||
.
|
ci.case_no,
|
||||||
id
|
ci.case_name,
|
||||||
,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.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.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.payment_deadline_remake,
|
||||||
|
ci.reserve_money,
|
||||||
|
ci.term_of_consultancy_start,
|
||||||
|
ci.term_of_consultancy_end,
|
||||||
|
ci.collection_status,
|
||||||
|
ci.impulse_state,
|
||||||
|
ci.case_status,
|
||||||
|
ci.audit_status,
|
||||||
|
ci.archive_status,
|
||||||
|
ci.is_finish_case,
|
||||||
|
ci.impulse_information_ids,
|
||||||
|
ci.case_lawyer_ids,
|
||||||
|
ci.case_remake,
|
||||||
|
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 id="caseArchived">
|
||||||
update case_information ci
|
update case_information ci
|
||||||
set ci.archive_status = 1
|
set ci.archive_status = 1,ci.is_finish_case = 1
|
||||||
where id = #{caseId}
|
where id = #{caseId}
|
||||||
</update>
|
</update>
|
||||||
<update id="removeByIds">
|
<update id="removeByIds">
|
||||||
|
@ -92,9 +120,53 @@
|
||||||
</set>
|
</set>
|
||||||
where ci.id = #{caseId}
|
where ci.id = #{caseId}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateCollectionStatus">
|
||||||
|
update case_information ci
|
||||||
|
<set>
|
||||||
|
ci.collection_status = #{collectionStatus}
|
||||||
|
</set>
|
||||||
|
where ci.id = #{caseId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectCondition" resultType="com.tcctlo.law.vo.CaseInformationListVO" parameterType="map">
|
|
||||||
|
<resultMap id="selectConditionResult" type="com.tcctlo.law.vo.CaseInformationListVO">
|
||||||
|
<id column="id" property="id"/>
|
||||||
|
<id column="case_no" property="caseNo"/>
|
||||||
|
<id column="case_name" property="caseName"/>
|
||||||
|
<id column="case_context" property="caseContext"/>
|
||||||
|
<id column="business_type" property="businessType"/>
|
||||||
|
<id column="business_classify" property="businessClassify"/>
|
||||||
|
<id column="case_type" property="caseType"/>
|
||||||
|
<id column="agency_stage" property="agencyStage" typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler"/>
|
||||||
|
<id column="case_source" property="caseSource"/>
|
||||||
|
<id column="amount_receivable" property="amountReceivable"/>
|
||||||
|
<id column="amount_received_sum" property="amountReceivedSum"/>
|
||||||
|
<id column="payment_deadline" property="paymentDeadline"/>
|
||||||
|
<id column="payment_deadline_remake" property="paymentDeadlineRemake"/>
|
||||||
|
<id column="reserve_money" property="reserveMoney"/>
|
||||||
|
<id column="term_of_consultancy_start" property="termOfConsultancyStart"/>
|
||||||
|
<id column="term_of_consultancy_end" property="termOfConsultancyEnd"/>
|
||||||
|
<id column="collection_status" property="collectionStatus"/>
|
||||||
|
<id column="impulse_state" property="impulseState"/>
|
||||||
|
<id column="case_status" property="caseStatus"/>
|
||||||
|
<id column="audit_status" property="auditStatus"/>
|
||||||
|
<id column="archive_status" property="archiveStatus"/>
|
||||||
|
<id column="is_finish_case" property="isFinishCase"/>
|
||||||
|
<id column="impulse_information_ids" property="impulseInformationIds"/>
|
||||||
|
<id column="case_lawyer_ids" property="caseLawyerIds"/>
|
||||||
|
<id column="case_remake" property="caseRemake"/>
|
||||||
|
<id column="status" property="status"/>
|
||||||
|
<id column="del_flag" property="delFlag"/>
|
||||||
|
<id column="create_by" property="createBy"/>
|
||||||
|
<id column="create_time" property="createTime"/>
|
||||||
|
<id column="update_by" property="updateBy"/>
|
||||||
|
<id column="update_time" property="updateTime"/>
|
||||||
|
<id column="remake" property="remake"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectCondition" resultType="com.tcctlo.law.vo.CaseInformationListVO" resultMap="selectConditionResult">
|
||||||
select
|
select
|
||||||
*
|
*
|
||||||
from case_information ci
|
from case_information ci
|
||||||
|
@ -137,7 +209,12 @@
|
||||||
and fm.status = 0
|
and fm.status = 0
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<select id="selectCaseInfoById" resultType="com.tcctlo.law.entity.CaseInformation">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectCaseInfoById" resultMap="selectCaseInfoByIdResult">
|
||||||
select
|
select
|
||||||
<include refid="baseColumn"/>
|
<include refid="baseColumn"/>
|
||||||
from case_information ci
|
from case_information ci
|
||||||
|
@ -149,6 +226,43 @@
|
||||||
and ci.status = 0 and ci.del_flag = 0
|
and ci.status = 0 and ci.del_flag = 0
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
<resultMap id="selectCaseInfoByIdResult" type="com.tcctlo.law.entity.CaseInformation">
|
||||||
|
<id column="id" property="id"/>
|
||||||
|
<id column="case_no" property="caseNo"/>
|
||||||
|
<id column="case_name" property="caseName"/>
|
||||||
|
<id column="case_context" property="caseContext"/>
|
||||||
|
<id column="business_type" property="businessType"/>
|
||||||
|
<id column="business_classify" property="businessClassify"/>
|
||||||
|
<id column="case_type" property="caseType"/>
|
||||||
|
<id column="agency_stage" property="agencyStage" typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler"/>
|
||||||
|
<id column="case_source" property="caseSource"/>
|
||||||
|
<id column="amount_receivable" property="amountReceivable"/>
|
||||||
|
<id column="amount_received_sum" property="amountReceivedSum"/>
|
||||||
|
<id column="payment_deadline" property="paymentDeadline"/>
|
||||||
|
<id column="payment_deadline_remake" property="paymentDeadlineRemake"/>
|
||||||
|
<id column="reserve_money" property="reserveMoney"/>
|
||||||
|
<id column="term_of_consultancy_start" property="termOfConsultancyStart"/>
|
||||||
|
<id column="term_of_consultancy_end" property="termOfConsultancyEnd"/>
|
||||||
|
<id column="collection_status" property="collectionStatus"/>
|
||||||
|
<id column="impulse_state" property="impulseState"/>
|
||||||
|
<id column="case_status" property="caseStatus"/>
|
||||||
|
<id column="audit_status" property="auditStatus"/>
|
||||||
|
<id column="archive_status" property="archiveStatus"/>
|
||||||
|
<id column="is_finish_case" property="isFinishCase"/>
|
||||||
|
<id column="impulse_information_ids" property="impulseInformationIds"/>
|
||||||
|
<id column="case_lawyer_ids" property="caseLawyerIds"/>
|
||||||
|
<id column="case_remake" property="caseRemake"/>
|
||||||
|
<id column="status" property="status"/>
|
||||||
|
<id column="del_flag" property="delFlag"/>
|
||||||
|
<id column="create_by" property="createBy"/>
|
||||||
|
<id column="create_time" property="createTime"/>
|
||||||
|
<id column="update_by" property="updateBy"/>
|
||||||
|
<id column="update_time" property="updateTime"/>
|
||||||
|
<id column="remake" property="remake"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<select id="selectCaseById" resultType="com.tcctlo.law.vo.CaseInformationListVO">
|
<select id="selectCaseById" resultType="com.tcctlo.law.vo.CaseInformationListVO">
|
||||||
select
|
select
|
||||||
<include refid="baseColumn"/>
|
<include refid="baseColumn"/>
|
||||||
|
@ -229,7 +343,7 @@
|
||||||
</select>-->
|
</select>-->
|
||||||
|
|
||||||
<!-- 费用统计-部分收费统计 -->
|
<!-- 费用统计-部分收费统计 -->
|
||||||
<select id="partialCharge" resultType="java.lang.Integer">
|
<!--<select id="partialCharge" resultType="java.lang.Integer">
|
||||||
select count(ci.id) as sumNum
|
select count(ci.id) as sumNum
|
||||||
from case_information ci
|
from case_information ci
|
||||||
<where>
|
<where>
|
||||||
|
@ -245,6 +359,22 @@
|
||||||
and ci.del_flag = 0
|
and ci.del_flag = 0
|
||||||
and ci.status = 0
|
and ci.status = 0
|
||||||
</where>
|
</where>
|
||||||
|
</select>-->
|
||||||
|
<select id="partialCharge" resultType="java.lang.Integer">
|
||||||
|
select count(ci.id) as sumNum
|
||||||
|
from case_information ci
|
||||||
|
<where>
|
||||||
|
1 = 1
|
||||||
|
and ci.collection_status = 1
|
||||||
|
<if test="userId != null and userId != ''">
|
||||||
|
and find_in_set(#{userId},ci.case_lawyer_ids)
|
||||||
|
</if>
|
||||||
|
<if test="startTime != null and endTime != null">
|
||||||
|
and ci.create_time between #{startTime} and #{endTime}
|
||||||
|
</if>
|
||||||
|
and ci.del_flag = 0
|
||||||
|
and ci.status = 0
|
||||||
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 费用统计-部分收费统计 -->
|
<!-- 费用统计-部分收费统计 -->
|
||||||
|
@ -260,7 +390,7 @@
|
||||||
|
|
||||||
|
|
||||||
<!-- 费用统计-逾期未收费 -->
|
<!-- 费用统计-逾期未收费 -->
|
||||||
<select id="overdue" resultType="java.lang.Integer">
|
<!--<select id="overdue" resultType="java.lang.Integer">
|
||||||
select count(ci.id) as sumNum
|
select count(ci.id) as sumNum
|
||||||
from case_information ci
|
from case_information ci
|
||||||
<where>
|
<where>
|
||||||
|
@ -277,8 +407,138 @@
|
||||||
and ci.del_flag = 0
|
and ci.del_flag = 0
|
||||||
and ci.status = 0
|
and ci.status = 0
|
||||||
</where>
|
</where>
|
||||||
|
</select>-->
|
||||||
|
<select id="overdue" resultType="java.lang.Integer">
|
||||||
|
select count(ci.id) as sumNum
|
||||||
|
from case_information ci
|
||||||
|
<where>
|
||||||
|
1 = 1
|
||||||
|
and ci.collection_status = 3
|
||||||
|
<if test="userId != null and userId != ''">
|
||||||
|
and find_in_set(#{userId},ci.case_lawyer_ids)
|
||||||
|
</if>
|
||||||
|
<if test="startTime != null and endTime != null">
|
||||||
|
and ci.create_time between #{startTime} and #{endTime}
|
||||||
|
</if>
|
||||||
|
and ci.del_flag = 0
|
||||||
|
and ci.status = 0
|
||||||
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="statisticsCaseStatus" resultType="int">
|
||||||
|
select count(id) from case_information ci
|
||||||
|
<where>
|
||||||
|
1 = 1
|
||||||
|
<if test="userId != null and userId != ''">
|
||||||
|
and find_in_set(#{userId},ci.case_lawyer_ids)
|
||||||
|
</if>
|
||||||
|
<if test="caseStatus != null">
|
||||||
|
and ci.case_status = #{caseStatus}
|
||||||
|
</if>
|
||||||
|
<if test="businessType != null">
|
||||||
|
and ci.business_type = #{businessType}
|
||||||
|
</if>
|
||||||
|
and ci.status = 0 and ci.del_flag = 0
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="statisticsCaseCollectionStatus" resultType="java.lang.Integer">
|
||||||
|
select count(id) from case_information ci
|
||||||
|
<where>
|
||||||
|
1 = 1
|
||||||
|
<if test="userId != null and userId != ''">
|
||||||
|
and find_in_set(#{userId},ci.case_lawyer_ids)
|
||||||
|
</if>
|
||||||
|
<if test="collectionStatus != null">
|
||||||
|
and ci.collection_status = #{collectionStatus}
|
||||||
|
</if>
|
||||||
|
<if test="businessType != null">
|
||||||
|
and ci.business_type = #{businessType}
|
||||||
|
</if>
|
||||||
|
and ci.status = 0 and ci.del_flag = 0
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="statisticsCaseAuditStatus" resultType="java.lang.Integer">
|
||||||
|
select count(id) from case_information ci
|
||||||
|
<where>
|
||||||
|
1 = 1
|
||||||
|
<if test="userId != null and userId != ''">
|
||||||
|
and find_in_set(#{userId},ci.case_lawyer_ids)
|
||||||
|
</if>
|
||||||
|
<if test="auditStatus != null">
|
||||||
|
and ci.audit_status = #{auditStatus}
|
||||||
|
</if>
|
||||||
|
<if test="businessType != null">
|
||||||
|
and ci.business_type = #{businessType}
|
||||||
|
</if>
|
||||||
|
and ci.status = 0 and ci.del_flag = 0
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="statisticsCaseArchiveStatus" resultType="java.lang.Integer">
|
||||||
|
select count(id) from case_information ci
|
||||||
|
<where>
|
||||||
|
1 = 1
|
||||||
|
<if test="userId != null and userId != ''">
|
||||||
|
and find_in_set(#{userId},ci.case_lawyer_ids)
|
||||||
|
</if>
|
||||||
|
<if test="archiveStatus != null">
|
||||||
|
and ci.archive_status = #{archiveStatus}
|
||||||
|
</if>
|
||||||
|
<if test="businessType != null">
|
||||||
|
and ci.business_type = #{businessType}
|
||||||
|
</if>
|
||||||
|
and ci.status = 0 and ci.del_flag = 0
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="statisticsCaseFinishStatus" resultType="java.lang.Integer">
|
||||||
|
select count(id) from case_information ci
|
||||||
|
<where>
|
||||||
|
1 = 1
|
||||||
|
<if test="userId != null and userId != ''">
|
||||||
|
and find_in_set(#{userId},ci.case_lawyer_ids)
|
||||||
|
</if>
|
||||||
|
<if test="finishStatus != null">
|
||||||
|
and ci.is_finish_case = #{finishStatus}
|
||||||
|
</if>
|
||||||
|
<if test="businessType != null">
|
||||||
|
and ci.business_type = #{businessType}
|
||||||
|
</if>
|
||||||
|
and ci.status = 0 and ci.del_flag = 0
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="statisticsCaseImpulseStatus" resultType="java.lang.Integer">
|
||||||
|
select count(id) from case_information ci
|
||||||
|
<where>
|
||||||
|
1 = 1
|
||||||
|
<if test="userId != null and userId != ''">
|
||||||
|
and find_in_set(#{userId},ci.case_lawyer_ids)
|
||||||
|
</if>
|
||||||
|
<if test="impulseStatus != null">
|
||||||
|
and ci.impulse_state = #{impulseStatus}
|
||||||
|
</if>
|
||||||
|
<if test="businessType != null">
|
||||||
|
and ci.business_type = #{businessType}
|
||||||
|
</if>
|
||||||
|
and ci.status = 0 and ci.del_flag = 0
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="selectLawInfo" resultType="com.tcctlo.law.vo.IndexLawInfo">
|
||||||
|
select su.user_id userId,su.nick_name nickName,sr.role_id roleId,sr.role_name roleName,sr.role_key roleKey from sys_user su, sys_role sr, sys_user_role sur
|
||||||
|
where su.user_id = sur.user_id and sur.role_id = sr.role_id and sr.role_key = 'LAWYER'
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectLawCaseCount" resultType="java.lang.Integer">
|
||||||
|
select count(id) from case_information ci
|
||||||
|
where find_in_set(#{lawId}, ci.case_lawyer_ids) and ci.status = 0 and ci.del_flag = 0
|
||||||
|
</select>
|
||||||
|
<select id="selectLawCaseMoneyCount" resultType="java.math.BigDecimal">
|
||||||
|
select sum(ci.amount_received_sum) from case_information ci
|
||||||
|
where find_in_set(#{lawId}, ci.case_lawyer_ids) and ci.status = 0 and ci.del_flag = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<!-- 费用统计-逾期未收费 -->
|
<!-- 费用统计-逾期未收费 -->
|
||||||
<!--<select id="overdue" resultType="java.lang.Integer">
|
<!--<select id="overdue" resultType="java.lang.Integer">
|
||||||
select count(ci.id) as sumNum
|
select count(ci.id) as sumNum
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
cr.amount_received amountReceived,
|
cr.amount_received amountReceived,
|
||||||
cr.collection_url_id collectionUrlId,
|
cr.collection_url_id collectionUrlId,
|
||||||
cr.collection_date collectionDate,
|
cr.collection_date collectionDate,
|
||||||
|
cr.collection_remake collectionRemake,
|
||||||
cr.user_id userId,
|
cr.user_id userId,
|
||||||
cr.user_name userName,
|
cr.user_name userName,
|
||||||
cr.audit_status auditStatus,
|
cr.audit_status auditStatus,
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
ii.case_address as address,
|
ii.case_address as address,
|
||||||
cl.lawyer_name as solicitor
|
cl.lawyer_name as solicitor
|
||||||
from case_information ci, impulse_information ii, case_lawyer cl
|
from case_information ci, impulse_information ii, case_lawyer cl
|
||||||
where ci.id = #{caseId} and ci.id = ii.case_id and ii.is_client = 0 and ci.id = cl.case_id and cl.is_prime = 0 and cl.lawyer_type = 0;
|
where ci.id = #{caseId} and ci.id = ii.case_id and ii.is_client = 0 and ci.id = cl.case_id and cl.is_prime = 0 and cl.lawyer_type = 0
|
||||||
</select>
|
</select>
|
||||||
<select id="selectCondition" resultType="com.tcctlo.law.entity.ContractTemplate">
|
<select id="selectCondition" resultType="com.tcctlo.law.entity.ContractTemplate">
|
||||||
select * from contract_template ct
|
select * from contract_template ct
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.tcctlo.law.mapper.InvoiceRecordMapper">
|
||||||
|
|
||||||
|
<delete id="deleteBatch">
|
||||||
|
update invoice_record ir
|
||||||
|
set ir.del_flag = 1, ir.status = 1
|
||||||
|
where id in
|
||||||
|
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<select id="selectByCaseId" resultType="com.tcctlo.law.vo.InvoiceRecordVO">
|
||||||
|
select * from invoice_record ir
|
||||||
|
<where>
|
||||||
|
1 = 1
|
||||||
|
<if test="caseId != null and caseId != ''">
|
||||||
|
and ir.case_id = #{caseId}
|
||||||
|
</if>
|
||||||
|
and ir.del_flag = 0
|
||||||
|
and ir.status = 0
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -14,6 +14,7 @@ import com.tcctlo.common.core.domain.entity.SysUser;
|
||||||
*/
|
*/
|
||||||
public interface SysUserMapper
|
public interface SysUserMapper
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据条件分页查询用户列表
|
* 根据条件分页查询用户列表
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue