Commit 921c2ab7571b3dc84cb1dff808a1f469d35178b4

Authored by liuhongfeng
1 parent fc087fa2

【新增】负责人

【修改】规范命名:期数:indexNo-》period
sql/mysql/crm.sql
@@ -41,7 +41,7 @@ CREATE TABLE `crm_receivable` ( @@ -41,7 +41,7 @@ CREATE TABLE `crm_receivable` (
41 DROP TABLE IF EXISTS `crm_receivable_plan`; 41 DROP TABLE IF EXISTS `crm_receivable_plan`;
42 CREATE TABLE `crm_receivable_plan` ( 42 CREATE TABLE `crm_receivable_plan` (
43 `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', 43 `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
44 - `index_no` bigint(20) NULL DEFAULT NULL COMMENT '期数', 44 + `period` tinyint(4) DEFAULT NULL COMMENT '期数',
45 `receivable_id` bigint(20) NULL DEFAULT NULL COMMENT '回款ID', 45 `receivable_id` bigint(20) NULL DEFAULT NULL COMMENT '回款ID',
46 `status` tinyint(4) NOT NULL COMMENT '完成状态', 46 `status` tinyint(4) NOT NULL COMMENT '完成状态',
47 `check_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '审批状态', 47 `check_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '审批状态',
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanBaseVO.java
@@ -18,7 +18,7 @@ public class ReceivablePlanBaseVO { @@ -18,7 +18,7 @@ public class ReceivablePlanBaseVO {
18 18
19 // TODO 芋艿:这个字段,在想想命名; 19 // TODO 芋艿:这个字段,在想想命名;
20 @Schema(description = "期数") 20 @Schema(description = "期数")
21 - private Long indexNo; 21 + private Integer period;
22 22
23 // TODO @liuhongfeng:中英文之间,有个空格,这样更干净; 23 // TODO @liuhongfeng:中英文之间,有个空格,这样更干净;
24 @Schema(description = "回款ID", example = "19852") 24 @Schema(description = "回款ID", example = "19852")
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanExcelVO.java
1 package cn.iocoder.yudao.module.crm.controller.admin.receivable.vo; 1 package cn.iocoder.yudao.module.crm.controller.admin.receivable.vo;
2 2
3 -import io.swagger.v3.oas.annotations.media.Schema;  
4 import lombok.*; 3 import lombok.*;
5 -import java.util.*; 4 +
6 import java.math.BigDecimal; 5 import java.math.BigDecimal;
7 import java.time.LocalDateTime; 6 import java.time.LocalDateTime;
8 -import java.time.LocalDateTime;  
9 -import java.time.LocalDateTime;  
10 -import java.time.LocalDateTime;  
11 7
12 import com.alibaba.excel.annotation.ExcelProperty; 8 import com.alibaba.excel.annotation.ExcelProperty;
13 import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; 9 import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
@@ -26,7 +22,7 @@ public class ReceivablePlanExcelVO { @@ -26,7 +22,7 @@ public class ReceivablePlanExcelVO {
26 private Long id; 22 private Long id;
27 23
28 @ExcelProperty("期数") 24 @ExcelProperty("期数")
29 - private Long indexNo; 25 + private Integer period;
30 26
31 @ExcelProperty("回款ID") 27 @ExcelProperty("回款ID")
32 private Long receivableId; 28 private Long receivableId;
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanExportReqVO.java
1 package cn.iocoder.yudao.module.crm.controller.admin.receivable.vo; 1 package cn.iocoder.yudao.module.crm.controller.admin.receivable.vo;
2 2
3 import lombok.*; 3 import lombok.*;
4 -import java.util.*;  
5 import io.swagger.v3.oas.annotations.media.Schema; 4 import io.swagger.v3.oas.annotations.media.Schema;
6 -import cn.iocoder.yudao.framework.common.pojo.PageParam; 5 +
7 import java.time.LocalDateTime; 6 import java.time.LocalDateTime;
8 import org.springframework.format.annotation.DateTimeFormat; 7 import org.springframework.format.annotation.DateTimeFormat;
9 8
@@ -14,7 +13,7 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @@ -14,7 +13,7 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
14 public class ReceivablePlanExportReqVO { 13 public class ReceivablePlanExportReqVO {
15 14
16 @Schema(description = "期数") 15 @Schema(description = "期数")
17 - private Long indexNo; 16 + private Integer period;
18 17
19 @Schema(description = "完成状态", example = "2") 18 @Schema(description = "完成状态", example = "2")
20 private Integer status; 19 private Integer status;
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanPageReqVO.java
@@ -20,7 +20,7 @@ public class ReceivablePlanPageReqVO extends PageParam { @@ -20,7 +20,7 @@ public class ReceivablePlanPageReqVO extends PageParam {
20 // TODO 芋艿:筛选字段,需要去掉几个,在想想; 20 // TODO 芋艿:筛选字段,需要去掉几个,在想想;
21 21
22 @Schema(description = "期数") 22 @Schema(description = "期数")
23 - private Long indexNo; 23 + private Integer period;
24 24
25 @Schema(description = "完成状态", example = "2") 25 @Schema(description = "完成状态", example = "2")
26 private Integer status; 26 private Integer status;
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/dataobject/receivable/ReceivablePlanDO.java
1 package cn.iocoder.yudao.module.crm.dal.dataobject.receivable; 1 package cn.iocoder.yudao.module.crm.dal.dataobject.receivable;
2 2
3 import lombok.*; 3 import lombok.*;
4 -import java.util.*; 4 +
5 import java.math.BigDecimal; 5 import java.math.BigDecimal;
6 import java.time.LocalDateTime; 6 import java.time.LocalDateTime;
7 -import java.time.LocalDateTime;  
8 -import java.time.LocalDateTime;  
9 -import java.time.LocalDateTime; 7 +
10 import com.baomidou.mybatisplus.annotation.*; 8 import com.baomidou.mybatisplus.annotation.*;
11 import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; 9 import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
12 10
@@ -33,7 +31,7 @@ public class ReceivablePlanDO extends BaseDO { @@ -33,7 +31,7 @@ public class ReceivablePlanDO extends BaseDO {
33 /** 31 /**
34 * 期数 32 * 期数
35 */ 33 */
36 - private Long indexNo; 34 + private Integer period;
37 /** 35 /**
38 * 回款ID 36 * 回款ID
39 */ 37 */
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/receivable/ReceivablePlanMapper.java
@@ -19,7 +19,7 @@ public interface ReceivablePlanMapper extends BaseMapperX<ReceivablePlanDO> { @@ -19,7 +19,7 @@ public interface ReceivablePlanMapper extends BaseMapperX<ReceivablePlanDO> {
19 19
20 default PageResult<ReceivablePlanDO> selectPage(ReceivablePlanPageReqVO reqVO) { 20 default PageResult<ReceivablePlanDO> selectPage(ReceivablePlanPageReqVO reqVO) {
21 return selectPage(reqVO, new LambdaQueryWrapperX<ReceivablePlanDO>() 21 return selectPage(reqVO, new LambdaQueryWrapperX<ReceivablePlanDO>()
22 - .eqIfPresent(ReceivablePlanDO::getIndexNo, reqVO.getIndexNo()) 22 + .eqIfPresent(ReceivablePlanDO::getPeriod, reqVO.getPeriod())
23 .eqIfPresent(ReceivablePlanDO::getStatus, reqVO.getStatus()) 23 .eqIfPresent(ReceivablePlanDO::getStatus, reqVO.getStatus())
24 .eqIfPresent(ReceivablePlanDO::getCheckStatus, reqVO.getCheckStatus()) 24 .eqIfPresent(ReceivablePlanDO::getCheckStatus, reqVO.getCheckStatus())
25 .betweenIfPresent(ReceivablePlanDO::getReturnTime, reqVO.getReturnTime()) 25 .betweenIfPresent(ReceivablePlanDO::getReturnTime, reqVO.getReturnTime())
@@ -35,7 +35,7 @@ public interface ReceivablePlanMapper extends BaseMapperX&lt;ReceivablePlanDO&gt; { @@ -35,7 +35,7 @@ public interface ReceivablePlanMapper extends BaseMapperX&lt;ReceivablePlanDO&gt; {
35 35
36 default List<ReceivablePlanDO> selectList(ReceivablePlanExportReqVO reqVO) { 36 default List<ReceivablePlanDO> selectList(ReceivablePlanExportReqVO reqVO) {
37 return selectList(new LambdaQueryWrapperX<ReceivablePlanDO>() 37 return selectList(new LambdaQueryWrapperX<ReceivablePlanDO>()
38 - .eqIfPresent(ReceivablePlanDO::getIndexNo, reqVO.getIndexNo()) 38 + .eqIfPresent(ReceivablePlanDO::getPeriod, reqVO.getPeriod())
39 .eqIfPresent(ReceivablePlanDO::getStatus, reqVO.getStatus()) 39 .eqIfPresent(ReceivablePlanDO::getStatus, reqVO.getStatus())
40 .eqIfPresent(ReceivablePlanDO::getCheckStatus, reqVO.getCheckStatus()) 40 .eqIfPresent(ReceivablePlanDO::getCheckStatus, reqVO.getCheckStatus())
41 .betweenIfPresent(ReceivablePlanDO::getReturnTime, reqVO.getReturnTime()) 41 .betweenIfPresent(ReceivablePlanDO::getReturnTime, reqVO.getReturnTime())
yudao-module-crm/yudao-module-crm-biz/src/test/java/cn/iocoder/yudao/module/crm/service/receivable/ReceivablePlanServiceImplTest.java
@@ -107,7 +107,7 @@ public class ReceivablePlanServiceImplTest extends BaseDbUnitTest { @@ -107,7 +107,7 @@ public class ReceivablePlanServiceImplTest extends BaseDbUnitTest {
107 public void testGetReceivablePlanPage() { 107 public void testGetReceivablePlanPage() {
108 // mock 数据 108 // mock 数据
109 ReceivablePlanDO dbReceivablePlan = randomPojo(ReceivablePlanDO.class, o -> { // 等会查询到 109 ReceivablePlanDO dbReceivablePlan = randomPojo(ReceivablePlanDO.class, o -> { // 等会查询到
110 - o.setIndexNo(null); 110 + o.setPeriod(null);
111 o.setStatus(null); 111 o.setStatus(null);
112 o.setCheckStatus(null); 112 o.setCheckStatus(null);
113 o.setReturnTime(null); 113 o.setReturnTime(null);
@@ -120,8 +120,8 @@ public class ReceivablePlanServiceImplTest extends BaseDbUnitTest { @@ -120,8 +120,8 @@ public class ReceivablePlanServiceImplTest extends BaseDbUnitTest {
120 o.setCreateTime(null); 120 o.setCreateTime(null);
121 }); 121 });
122 receivablePlanMapper.insert(dbReceivablePlan); 122 receivablePlanMapper.insert(dbReceivablePlan);
123 - // 测试 indexNo 不匹配  
124 - receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setIndexNo(null))); 123 + // 测试 Period 不匹配
  124 + receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setPeriod(null)));
125 // 测试 status 不匹配 125 // 测试 status 不匹配
126 receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setStatus(null))); 126 receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setStatus(null)));
127 // 测试 checkStatus 不匹配 127 // 测试 checkStatus 不匹配
@@ -144,7 +144,7 @@ public class ReceivablePlanServiceImplTest extends BaseDbUnitTest { @@ -144,7 +144,7 @@ public class ReceivablePlanServiceImplTest extends BaseDbUnitTest {
144 receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setCreateTime(null))); 144 receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setCreateTime(null)));
145 // 准备参数 145 // 准备参数
146 ReceivablePlanPageReqVO reqVO = new ReceivablePlanPageReqVO(); 146 ReceivablePlanPageReqVO reqVO = new ReceivablePlanPageReqVO();
147 - reqVO.setIndexNo(null); 147 + reqVO.setPeriod(null);
148 reqVO.setStatus(null); 148 reqVO.setStatus(null);
149 reqVO.setCheckStatus(null); 149 reqVO.setCheckStatus(null);
150 reqVO.setReturnTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28)); 150 reqVO.setReturnTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
@@ -169,7 +169,7 @@ public class ReceivablePlanServiceImplTest extends BaseDbUnitTest { @@ -169,7 +169,7 @@ public class ReceivablePlanServiceImplTest extends BaseDbUnitTest {
169 public void testGetReceivablePlanList() { 169 public void testGetReceivablePlanList() {
170 // mock 数据 170 // mock 数据
171 ReceivablePlanDO dbReceivablePlan = randomPojo(ReceivablePlanDO.class, o -> { // 等会查询到 171 ReceivablePlanDO dbReceivablePlan = randomPojo(ReceivablePlanDO.class, o -> { // 等会查询到
172 - o.setIndexNo(null); 172 + o.setPeriod(null);
173 o.setStatus(null); 173 o.setStatus(null);
174 o.setCheckStatus(null); 174 o.setCheckStatus(null);
175 o.setReturnTime(null); 175 o.setReturnTime(null);
@@ -182,8 +182,8 @@ public class ReceivablePlanServiceImplTest extends BaseDbUnitTest { @@ -182,8 +182,8 @@ public class ReceivablePlanServiceImplTest extends BaseDbUnitTest {
182 o.setCreateTime(null); 182 o.setCreateTime(null);
183 }); 183 });
184 receivablePlanMapper.insert(dbReceivablePlan); 184 receivablePlanMapper.insert(dbReceivablePlan);
185 - // 测试 indexNo 不匹配  
186 - receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setIndexNo(null))); 185 + // 测试 Period 不匹配
  186 + receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setPeriod(null)));
187 // 测试 status 不匹配 187 // 测试 status 不匹配
188 receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setStatus(null))); 188 receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setStatus(null)));
189 // 测试 checkStatus 不匹配 189 // 测试 checkStatus 不匹配
@@ -206,7 +206,7 @@ public class ReceivablePlanServiceImplTest extends BaseDbUnitTest { @@ -206,7 +206,7 @@ public class ReceivablePlanServiceImplTest extends BaseDbUnitTest {
206 receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setCreateTime(null))); 206 receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setCreateTime(null)));
207 // 准备参数 207 // 准备参数
208 ReceivablePlanExportReqVO reqVO = new ReceivablePlanExportReqVO(); 208 ReceivablePlanExportReqVO reqVO = new ReceivablePlanExportReqVO();
209 - reqVO.setIndexNo(null); 209 + reqVO.setPeriod(null);
210 reqVO.setStatus(null); 210 reqVO.setStatus(null);
211 reqVO.setCheckStatus(null); 211 reqVO.setCheckStatus(null);
212 reqVO.setReturnTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28)); 212 reqVO.setReturnTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));