Commit 921c2ab7571b3dc84cb1dff808a1f469d35178b4

Authored by liuhongfeng
1 parent fc087fa2

【新增】负责人

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