Commit f1f180ff77963f837acac390e94690cefcd05f95
1 parent
798dd326
【新增】字典归类
【修改】规范实体命名和字段类型修改
Showing
16 changed files
with
64 additions
and
163 deletions
yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/DictTypeConstants.java
| ... | ... | @@ -11,5 +11,6 @@ public interface DictTypeConstants { |
| 11 | 11 | String CRM_CUSTOMER_INDUSTRY = "crm_customer_industry"; // CRM 客户所属行业 |
| 12 | 12 | String CRM_CUSTOMER_LEVEL = "crm_customer_level"; // CRM 客户等级 |
| 13 | 13 | String CRM_CUSTOMER_SOURCE = "crm_customer_source"; // CRM 客户来源 |
| 14 | + String CRM_RECEIVABLE_CHECK_STATUS = "crm_receivable_check_status"; // CRM 审批状态 | |
| 14 | 15 | |
| 15 | 16 | } | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivableBaseVO.java
| ... | ... | @@ -19,30 +19,22 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ |
| 19 | 19 | @Data |
| 20 | 20 | public class ReceivableBaseVO { |
| 21 | 21 | |
| 22 | - // TODO @liuhongfeng:部分缺少 example 的字段,要补充下; | |
| 23 | - // TODO @liuhongfeng:部分字段,需要必传,要写 requiredMode = Schema.RequiredMode.REQUIRED,以及对应的 validator 非空校验 | |
| 24 | - | |
| 25 | - @Schema(description = "回款编号") | |
| 22 | + @Schema(description = "回款编号",requiredMode = Schema.RequiredMode.REQUIRED, example = "31177") | |
| 26 | 23 | private String no; |
| 27 | 24 | |
| 28 | - // TODO @liuhongfeng:中英文之间,有个空格,这样更干净; | |
| 29 | - @Schema(description = "回款计划ID", example = "31177") | |
| 25 | + @Schema(description = "回款计划", example = "31177") | |
| 30 | 26 | private Long planId; |
| 31 | 27 | |
| 32 | - @Schema(description = "客户ID", example = "4963") | |
| 28 | + @Schema(description = "客户名称", example = "4963") | |
| 33 | 29 | private Long customerId; |
| 34 | 30 | |
| 35 | - @Schema(description = "合同ID", example = "30305") | |
| 31 | + @Schema(description = "合同名称", example = "30305") | |
| 36 | 32 | private Long contractId; |
| 37 | 33 | |
| 38 | 34 | @Schema(description = "审批状态", example = "1") |
| 39 | 35 | @InEnum(AuditStatusEnum.class) |
| 40 | 36 | private Integer checkStatus; |
| 41 | 37 | |
| 42 | - // TODO @liuhongfeng:这个字段,应该不是前端传递的噢,而是后端自己生成的,所以不适合放在 base 里面; | |
| 43 | - @Schema(description = "工作流编号", example = "16568") | |
| 44 | - private Long processInstanceId; | |
| 45 | - | |
| 46 | 38 | @Schema(description = "回款日期") |
| 47 | 39 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 48 | 40 | private LocalDateTime returnTime; |
| ... | ... | @@ -50,9 +42,8 @@ public class ReceivableBaseVO { |
| 50 | 42 | @Schema(description = "回款方式", example = "2") |
| 51 | 43 | private String returnType; |
| 52 | 44 | |
| 53 | - // TODO @liuhongfeng:使用 Int 哈,分; | |
| 54 | 45 | @Schema(description = "回款金额", example = "31859") |
| 55 | - private BigDecimal price; | |
| 46 | + private Integer price; | |
| 56 | 47 | |
| 57 | 48 | @Schema(description = "负责人", example = "22202") |
| 58 | 49 | private Long ownerUserId; |
| ... | ... | @@ -63,19 +54,7 @@ public class ReceivableBaseVO { |
| 63 | 54 | @Schema(description = "显示顺序") |
| 64 | 55 | private Integer sort; |
| 65 | 56 | |
| 66 | - // TODO @芋艿:这个字段在看看;dataScope、dataScopeDeptIds | |
| 67 | - @Schema(description = "数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)") | |
| 68 | - private Integer dataScope; | |
| 69 | - | |
| 70 | - @Schema(description = "数据范围(指定部门数组)") | |
| 71 | - private String dataScopeDeptIds; | |
| 72 | - | |
| 73 | - // TODO @liuhongfeng:这个字段,这个字段,应该不是前端传递的噢,而是后端自己生成的,所以不适合放在 base 里面; | |
| 74 | - @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | |
| 75 | - @NotNull(message = "状态不能为空") | |
| 76 | - private Integer status; | |
| 77 | - | |
| 78 | - @Schema(description = "备注", example = "随便") | |
| 57 | + @Schema(description = "备注", example = "备注") | |
| 79 | 58 | private String remark; |
| 80 | 59 | |
| 81 | 60 | } | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivableExcelVO.java
| 1 | 1 | package cn.iocoder.yudao.module.crm.controller.admin.receivable.vo; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.module.system.enums.DictTypeConstants; | |
| 3 | 4 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | 5 | import lombok.*; |
| 5 | 6 | import java.util.*; |
| ... | ... | @@ -30,14 +31,14 @@ public class ReceivableExcelVO { |
| 30 | 31 | @ExcelProperty("回款计划ID") |
| 31 | 32 | private Long planId; |
| 32 | 33 | |
| 33 | - @ExcelProperty("客户ID") | |
| 34 | + @ExcelProperty("客户名称") | |
| 34 | 35 | private Long customerId; |
| 35 | 36 | |
| 36 | - @ExcelProperty("合同ID") | |
| 37 | + @ExcelProperty("合同名称") | |
| 37 | 38 | private Long contractId; |
| 38 | 39 | |
| 39 | 40 | @ExcelProperty(value = "审批状态", converter = DictConvert.class) |
| 40 | - @DictFormat("crm_receivable_check_status") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中 | |
| 41 | + @DictFormat(cn.iocoder.yudao.module.crm.enums.DictTypeConstants.CRM_RECEIVABLE_CHECK_STATUS) | |
| 41 | 42 | private Integer checkStatus; |
| 42 | 43 | |
| 43 | 44 | @ExcelProperty("工作流编号") |
| ... | ... | @@ -50,7 +51,7 @@ public class ReceivableExcelVO { |
| 50 | 51 | private String returnType; |
| 51 | 52 | |
| 52 | 53 | @ExcelProperty("回款金额") |
| 53 | - private BigDecimal price; | |
| 54 | + private Integer price; | |
| 54 | 55 | |
| 55 | 56 | @ExcelProperty("负责人") |
| 56 | 57 | private Long ownerUserId; |
| ... | ... | @@ -58,17 +59,8 @@ public class ReceivableExcelVO { |
| 58 | 59 | @ExcelProperty("批次") |
| 59 | 60 | private Long batchId; |
| 60 | 61 | |
| 61 | - //@ExcelProperty("显示顺序") | |
| 62 | - //private Integer sort; | |
| 63 | - | |
| 64 | - //@ExcelProperty("数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)") | |
| 65 | - //private Integer dataScope; | |
| 66 | - | |
| 67 | - //@ExcelProperty("数据范围(指定部门数组)") | |
| 68 | - //private String dataScopeDeptIds; | |
| 69 | - | |
| 70 | 62 | @ExcelProperty(value = "状态", converter = DictConvert.class) |
| 71 | - @DictFormat("common_status") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中 | |
| 63 | + @DictFormat(DictTypeConstants.COMMON_STATUS) | |
| 72 | 64 | private Integer status; |
| 73 | 65 | |
| 74 | 66 | @ExcelProperty("备注") | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivableExportReqVO.java
| ... | ... | @@ -4,7 +4,6 @@ import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | 4 | import lombok.Data; |
| 5 | 5 | import org.springframework.format.annotation.DateTimeFormat; |
| 6 | 6 | |
| 7 | -import java.math.BigDecimal; | |
| 8 | 7 | import java.time.LocalDateTime; |
| 9 | 8 | |
| 10 | 9 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| ... | ... | @@ -19,21 +18,18 @@ public class ReceivableExportReqVO { |
| 19 | 18 | @Schema(description = "回款编号") |
| 20 | 19 | private String no; |
| 21 | 20 | |
| 22 | - @Schema(description = "回款计划ID", example = "31177") | |
| 21 | + @Schema(description = "回款计划", example = "31177") | |
| 23 | 22 | private Long planId; |
| 24 | 23 | |
| 25 | - @Schema(description = "客户ID", example = "4963") | |
| 24 | + @Schema(description = "客户名称", example = "4963") | |
| 26 | 25 | private Long customerId; |
| 27 | 26 | |
| 28 | - @Schema(description = "合同ID", example = "30305") | |
| 27 | + @Schema(description = "合同名称", example = "30305") | |
| 29 | 28 | private Long contractId; |
| 30 | 29 | |
| 31 | 30 | @Schema(description = "审批状态", example = "1") |
| 32 | 31 | private Integer checkStatus; |
| 33 | 32 | |
| 34 | - @Schema(description = "工作流编号", example = "16568") | |
| 35 | - private Long processInstanceId; | |
| 36 | - | |
| 37 | 33 | @Schema(description = "回款日期") |
| 38 | 34 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 39 | 35 | private LocalDateTime[] returnTime; |
| ... | ... | @@ -42,7 +38,7 @@ public class ReceivableExportReqVO { |
| 42 | 38 | private String returnType; |
| 43 | 39 | |
| 44 | 40 | @Schema(description = "回款金额", example = "31859") |
| 45 | - private BigDecimal price; | |
| 41 | + private Integer price; | |
| 46 | 42 | |
| 47 | 43 | @Schema(description = "负责人", example = "22202") |
| 48 | 44 | private Long ownerUserId; |
| ... | ... | @@ -50,15 +46,6 @@ public class ReceivableExportReqVO { |
| 50 | 46 | @Schema(description = "批次", example = "2539") |
| 51 | 47 | private Long batchId; |
| 52 | 48 | |
| 53 | - @Schema(description = "显示顺序") | |
| 54 | - private Integer sort; | |
| 55 | - | |
| 56 | - @Schema(description = "数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)") | |
| 57 | - private Integer dataScope; | |
| 58 | - | |
| 59 | - @Schema(description = "数据范围(指定部门数组)") | |
| 60 | - private String dataScopeDeptIds; | |
| 61 | - | |
| 62 | 49 | @Schema(description = "状态", example = "1") |
| 63 | 50 | private Integer status; |
| 64 | 51 | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePageReqVO.java
| ... | ... | @@ -18,25 +18,21 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ |
| 18 | 18 | @ToString(callSuper = true) |
| 19 | 19 | public class ReceivablePageReqVO extends PageParam { |
| 20 | 20 | |
| 21 | - // TODO @liuhongfeng:目前就使用 no 检索即可; | |
| 22 | 21 | @Schema(description = "回款编号") |
| 23 | 22 | private String no; |
| 24 | 23 | |
| 25 | 24 | @Schema(description = "回款计划ID", example = "31177") |
| 26 | 25 | private Long planId; |
| 27 | 26 | |
| 28 | - @Schema(description = "客户ID", example = "4963") | |
| 27 | + @Schema(description = "客户名称", example = "4963") | |
| 29 | 28 | private Long customerId; |
| 30 | 29 | |
| 31 | - @Schema(description = "合同ID", example = "30305") | |
| 30 | + @Schema(description = "合同名称", example = "30305") | |
| 32 | 31 | private Long contractId; |
| 33 | 32 | |
| 34 | 33 | @Schema(description = "审批状态", example = "1") |
| 35 | 34 | private Integer checkStatus; |
| 36 | 35 | |
| 37 | - @Schema(description = "工作流编号", example = "16568") | |
| 38 | - private Long processInstanceId; | |
| 39 | - | |
| 40 | 36 | @Schema(description = "回款日期") |
| 41 | 37 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 42 | 38 | private LocalDateTime[] returnTime; |
| ... | ... | @@ -45,29 +41,15 @@ public class ReceivablePageReqVO extends PageParam { |
| 45 | 41 | private String returnType; |
| 46 | 42 | |
| 47 | 43 | @Schema(description = "回款金额", example = "31859") |
| 48 | - private BigDecimal price; | |
| 44 | + private Integer price; | |
| 49 | 45 | |
| 50 | 46 | @Schema(description = "负责人", example = "22202") |
| 51 | 47 | private Long ownerUserId; |
| 52 | 48 | |
| 53 | - @Schema(description = "批次", example = "2539") | |
| 54 | - private Long batchId; | |
| 55 | - | |
| 56 | - @Schema(description = "显示顺序") | |
| 57 | - private Integer sort; | |
| 58 | - | |
| 59 | - @Schema(description = "数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)") | |
| 60 | - private Integer dataScope; | |
| 61 | - | |
| 62 | - @Schema(description = "数据范围(指定部门数组)") | |
| 63 | - private String dataScopeDeptIds; | |
| 64 | 49 | |
| 65 | 50 | @Schema(description = "状态", example = "1") |
| 66 | 51 | private Integer status; |
| 67 | 52 | |
| 68 | - @Schema(description = "备注", example = "随便") | |
| 69 | - private String remark; | |
| 70 | - | |
| 71 | 53 | @Schema(description = "创建时间") |
| 72 | 54 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 73 | 55 | private LocalDateTime[] createTime; | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanBaseVO.java
| 1 | 1 | package cn.iocoder.yudao.module.crm.controller.admin.receivable.vo; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.common.validation.InEnum; | |
| 4 | +import cn.iocoder.yudao.module.crm.enums.AuditStatusEnum; | |
| 3 | 5 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | 6 | import lombok.Data; |
| 5 | 7 | import org.springframework.format.annotation.DateTimeFormat; |
| 6 | 8 | |
| 7 | -import java.math.BigDecimal; | |
| 8 | 9 | import java.time.LocalDateTime; |
| 9 | 10 | |
| 10 | 11 | import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; |
| ... | ... | @@ -16,57 +17,46 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ |
| 16 | 17 | @Data |
| 17 | 18 | public class ReceivablePlanBaseVO { |
| 18 | 19 | |
| 19 | - // TODO 芋艿:这个字段,在想想命名; | |
| 20 | - @Schema(description = "期数") | |
| 20 | + @Schema(description = "期数", example = "1") | |
| 21 | 21 | private Integer period; |
| 22 | 22 | |
| 23 | - // TODO @liuhongfeng:中英文之间,有个空格,这样更干净; | |
| 24 | - @Schema(description = "回款ID", example = "19852") | |
| 23 | + @Schema(description = "回款计划", example = "19852") | |
| 25 | 24 | private Long receivableId; |
| 26 | 25 | |
| 27 | 26 | @Schema(description = "完成状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") |
| 28 | - //@NotNull(message = "完成状态不能为空") | |
| 29 | 27 | private Integer status; |
| 30 | 28 | |
| 31 | - // TODO @liuhongfeng:这个字段,可以写个枚举,然后 InEnum 去校验下; | |
| 32 | - // TODO @liuhongfeng:这个字段,应该不是前端传递的噢,而是后端自己生成的 | |
| 33 | 29 | @Schema(description = "审批状态", example = "1") |
| 30 | + @InEnum(AuditStatusEnum.class) | |
| 34 | 31 | private Integer checkStatus; |
| 35 | 32 | |
| 36 | - // TODO @liuhongfeng:这个字段,应该不是前端传递的噢,而是后端自己生成的,所以不适合放在 base 里面; | |
| 37 | - @Schema(description = "工作流编号", example = "8909") | |
| 38 | - private Long processInstanceId; | |
| 39 | - | |
| 40 | - // TODO @liuhongfeng:使用 Int 哈,分; | |
| 41 | 33 | @Schema(description = "计划回款金额", example = "29675") |
| 42 | - private BigDecimal price; | |
| 34 | + private Integer price; | |
| 43 | 35 | |
| 44 | 36 | @Schema(description = "计划回款日期") |
| 45 | 37 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 46 | 38 | private LocalDateTime returnTime; |
| 47 | 39 | |
| 48 | - // TODO @liuhongfeng:这个字段,Integer | |
| 49 | 40 | @Schema(description = "提前几天提醒") |
| 50 | - private Long remindDays; | |
| 41 | + private Integer remindDays; | |
| 51 | 42 | |
| 52 | 43 | @Schema(description = "提醒日期") |
| 53 | 44 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 54 | 45 | private LocalDateTime remindTime; |
| 55 | 46 | |
| 56 | - @Schema(description = "客户ID", example = "18026") | |
| 47 | + @Schema(description = "客户名称", example = "18026") | |
| 57 | 48 | private Long customerId; |
| 58 | 49 | |
| 59 | - @Schema(description = "合同ID", example = "3473") | |
| 50 | + @Schema(description = "合同名称", example = "3473") | |
| 60 | 51 | private Long contractId; |
| 61 | 52 | |
| 62 | - // TODO @liuhongfeng:这个字段,应该不是前端传递的噢,而是后端自己生成的,所以不适合放在 base 里面; | |
| 63 | 53 | @Schema(description = "负责人", example = "17828") |
| 64 | 54 | private Long ownerUserId; |
| 65 | 55 | |
| 66 | 56 | @Schema(description = "显示顺序") |
| 67 | 57 | private Integer sort; |
| 68 | 58 | |
| 69 | - @Schema(description = "备注", example = "随便") | |
| 59 | + @Schema(description = "备注", example = "备注") | |
| 70 | 60 | private String remark; |
| 71 | 61 | |
| 72 | 62 | } | ... | ... |
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 cn.iocoder.yudao.module.system.enums.DictTypeConstants; | |
| 3 | 4 | import lombok.*; |
| 4 | 5 | |
| 5 | 6 | import java.math.BigDecimal; |
| ... | ... | @@ -27,25 +28,25 @@ public class ReceivablePlanExcelVO { |
| 27 | 28 | @ExcelProperty("回款ID") |
| 28 | 29 | private Long receivableId; |
| 29 | 30 | |
| 30 | - @ExcelProperty(value = "完成状态", converter = DictConvert.class) | |
| 31 | - @DictFormat("common_status") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中 | |
| 31 | + @ExcelProperty(value = "状态", converter = DictConvert.class) | |
| 32 | + @DictFormat(DictTypeConstants.COMMON_STATUS) | |
| 32 | 33 | private Integer status; |
| 33 | 34 | |
| 34 | 35 | @ExcelProperty(value = "审批状态", converter = DictConvert.class) |
| 35 | - @DictFormat("crm_receivable_check_status") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中 | |
| 36 | + @DictFormat(cn.iocoder.yudao.module.crm.enums.DictTypeConstants.CRM_RECEIVABLE_CHECK_STATUS) | |
| 36 | 37 | private Integer checkStatus; |
| 37 | 38 | |
| 38 | 39 | //@ExcelProperty("工作流编号") |
| 39 | 40 | //private Long processInstanceId; |
| 40 | 41 | |
| 41 | 42 | @ExcelProperty("计划回款金额") |
| 42 | - private BigDecimal price; | |
| 43 | + private Integer price; | |
| 43 | 44 | |
| 44 | 45 | @ExcelProperty("计划回款日期") |
| 45 | 46 | private LocalDateTime returnTime; |
| 46 | 47 | |
| 47 | 48 | @ExcelProperty("提前几天提醒") |
| 48 | - private Long remindDays; | |
| 49 | + private Integer remindDays; | |
| 49 | 50 | |
| 50 | 51 | @ExcelProperty("提醒日期") |
| 51 | 52 | private LocalDateTime remindTime; |
| ... | ... | @@ -53,7 +54,7 @@ public class ReceivablePlanExcelVO { |
| 53 | 54 | @ExcelProperty("客户ID") |
| 54 | 55 | private Long customerId; |
| 55 | 56 | |
| 56 | - @ExcelProperty("合同ID") | |
| 57 | + @ExcelProperty("合同名称") | |
| 57 | 58 | private Long contractId; |
| 58 | 59 | |
| 59 | 60 | @ExcelProperty("负责人") | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanExportReqVO.java
| ... | ... | @@ -26,16 +26,16 @@ public class ReceivablePlanExportReqVO { |
| 26 | 26 | private LocalDateTime[] returnTime; |
| 27 | 27 | |
| 28 | 28 | @Schema(description = "提前几天提醒") |
| 29 | - private Long remindDays; | |
| 29 | + private Integer remindDays; | |
| 30 | 30 | |
| 31 | 31 | @Schema(description = "提醒日期") |
| 32 | 32 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 33 | 33 | private LocalDateTime[] remindTime; |
| 34 | 34 | |
| 35 | - @Schema(description = "客户ID", example = "18026") | |
| 35 | + @Schema(description = "客户名称", example = "18026") | |
| 36 | 36 | private Long customerId; |
| 37 | 37 | |
| 38 | - @Schema(description = "合同ID", example = "3473") | |
| 38 | + @Schema(description = "合同名称", example = "3473") | |
| 39 | 39 | private Long contractId; |
| 40 | 40 | |
| 41 | 41 | @Schema(description = "负责人", example = "17828") | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanPageReqVO.java
| ... | ... | @@ -17,11 +17,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ |
| 17 | 17 | @ToString(callSuper = true) |
| 18 | 18 | public class ReceivablePlanPageReqVO extends PageParam { |
| 19 | 19 | |
| 20 | - // TODO 芋艿:筛选字段,需要去掉几个,在想想; | |
| 21 | - | |
| 22 | - @Schema(description = "期数") | |
| 23 | - private Integer period; | |
| 24 | - | |
| 25 | 20 | @Schema(description = "完成状态", example = "2") |
| 26 | 21 | private Integer status; |
| 27 | 22 | |
| ... | ... | @@ -32,25 +27,19 @@ public class ReceivablePlanPageReqVO extends PageParam { |
| 32 | 27 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 33 | 28 | private LocalDateTime[] returnTime; |
| 34 | 29 | |
| 35 | - @Schema(description = "提前几天提醒") | |
| 36 | - private Long remindDays; | |
| 37 | - | |
| 38 | 30 | @Schema(description = "提醒日期") |
| 39 | 31 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 40 | 32 | private LocalDateTime[] remindTime; |
| 41 | 33 | |
| 42 | - @Schema(description = "客户ID", example = "18026") | |
| 34 | + @Schema(description = "客户名称", example = "18026") | |
| 43 | 35 | private Long customerId; |
| 44 | 36 | |
| 45 | - @Schema(description = "合同ID", example = "3473") | |
| 37 | + @Schema(description = "合同名称", example = "3473") | |
| 46 | 38 | private Long contractId; |
| 47 | 39 | |
| 48 | 40 | @Schema(description = "负责人", example = "17828") |
| 49 | 41 | private Long ownerUserId; |
| 50 | 42 | |
| 51 | - @Schema(description = "备注", example = "随便") | |
| 52 | - private String remark; | |
| 53 | - | |
| 54 | 43 | @Schema(description = "创建时间") |
| 55 | 44 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) |
| 56 | 45 | private LocalDateTime[] createTime; | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/dataobject/receivable/ReceivableDO.java
| ... | ... | @@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.annotation.TableId; |
| 6 | 6 | import com.baomidou.mybatisplus.annotation.TableName; |
| 7 | 7 | import lombok.*; |
| 8 | 8 | |
| 9 | -import java.math.BigDecimal; | |
| 10 | 9 | import java.time.LocalDateTime; |
| 11 | 10 | |
| 12 | 11 | /** |
| ... | ... | @@ -34,27 +33,26 @@ public class ReceivableDO extends BaseDO { |
| 34 | 33 | */ |
| 35 | 34 | private String no; |
| 36 | 35 | /** |
| 37 | - * 回款计划ID | |
| 36 | + * 回款计划 | |
| 38 | 37 | * |
| 39 | - * TODO @liuhongfeng:这个字段,后续要写下关联的实体哈 | |
| 38 | + * 对应实体 {@link cn.iocoder.yudao.module.crm.dal.dataobject.receivable.ReceivablePlanDO} | |
| 40 | 39 | */ |
| 41 | 40 | private Long planId; |
| 42 | 41 | /** |
| 43 | 42 | * 客户ID |
| 44 | 43 | * |
| 45 | - * TODO @liuhongfeng:这个字段,后续要写下关联的实体哈 | |
| 44 | + * 对应实体 {@link cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO} | |
| 46 | 45 | */ |
| 47 | 46 | private Long customerId; |
| 48 | 47 | /** |
| 49 | 48 | * 合同ID |
| 50 | 49 | * |
| 51 | - * TODO @liuhongfeng:这个字段,后续要写下关联的实体哈 | |
| 50 | + * 对应实体 {@link cn.iocoder.yudao.module.crm.dal.dataobject.contract.ContractDO} | |
| 52 | 51 | */ |
| 53 | 52 | private Long contractId; |
| 54 | 53 | /** |
| 55 | 54 | * 审批状态 |
| 56 | - * | |
| 57 | - * 枚举 {@link TODO crm_receivable_check_status 对应的类} | |
| 55 | + * 对应字典 {@link cn.iocoder.yudao.module.crm.enums.DictTypeConstants#CRM_RECEIVABLE_CHECK_STATUS} | |
| 58 | 56 | */ |
| 59 | 57 | private Integer checkStatus; |
| 60 | 58 | /** |
| ... | ... | @@ -74,7 +72,7 @@ public class ReceivableDO extends BaseDO { |
| 74 | 72 | /** |
| 75 | 73 | * 回款金额 |
| 76 | 74 | */ |
| 77 | - private BigDecimal price; | |
| 75 | + private Integer price; | |
| 78 | 76 | /** |
| 79 | 77 | * 负责人 |
| 80 | 78 | */ |
| ... | ... | @@ -99,7 +97,8 @@ public class ReceivableDO extends BaseDO { |
| 99 | 97 | /** |
| 100 | 98 | * 状态 |
| 101 | 99 | * |
| 102 | - * 枚举 {@link TODO common_status 对应的类} | |
| 100 | + * 枚举 {@link cn.iocoder.yudao.framework.common.enums.CommonStatusEnum} | |
| 101 | + * | |
| 103 | 102 | */ |
| 104 | 103 | private Integer status; |
| 105 | 104 | /** | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/dataobject/receivable/ReceivablePlanDO.java
| ... | ... | @@ -37,15 +37,15 @@ public class ReceivablePlanDO extends BaseDO { |
| 37 | 37 | */ |
| 38 | 38 | private Long receivableId; |
| 39 | 39 | /** |
| 40 | - * 完成状态 | |
| 40 | + * 状态 | |
| 41 | + * | |
| 42 | + * 枚举 {@link cn.iocoder.yudao.framework.common.enums.CommonStatusEnum} | |
| 41 | 43 | * |
| 42 | - * 枚举 {@link TODO common_status 对应的类} | |
| 43 | 44 | */ |
| 44 | 45 | private Integer status; |
| 45 | 46 | /** |
| 46 | 47 | * 审批状态 |
| 47 | - * | |
| 48 | - * 枚举 {@link TODO crm_receivable_check_status 对应的类} | |
| 48 | + * 对应字典 {@link cn.iocoder.yudao.module.crm.enums.DictTypeConstants#CRM_RECEIVABLE_CHECK_STATUS} | |
| 49 | 49 | */ |
| 50 | 50 | private Integer checkStatus; |
| 51 | 51 | /** |
| ... | ... | @@ -55,7 +55,7 @@ public class ReceivablePlanDO extends BaseDO { |
| 55 | 55 | /** |
| 56 | 56 | * 计划回款金额 |
| 57 | 57 | */ |
| 58 | - private BigDecimal price; | |
| 58 | + private Integer price; | |
| 59 | 59 | /** |
| 60 | 60 | * 计划回款日期 |
| 61 | 61 | */ |
| ... | ... | @@ -63,7 +63,7 @@ public class ReceivablePlanDO extends BaseDO { |
| 63 | 63 | /** |
| 64 | 64 | * 提前几天提醒 |
| 65 | 65 | */ |
| 66 | - private Long remindDays; | |
| 66 | + private Integer remindDays; | |
| 67 | 67 | /** |
| 68 | 68 | * 提醒日期 |
| 69 | 69 | */ | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/receivable/ReceivableMapper.java
| ... | ... | @@ -24,17 +24,11 @@ public interface ReceivableMapper extends BaseMapperX<ReceivableDO> { |
| 24 | 24 | .eqIfPresent(ReceivableDO::getCustomerId, reqVO.getCustomerId()) |
| 25 | 25 | .eqIfPresent(ReceivableDO::getContractId, reqVO.getContractId()) |
| 26 | 26 | .eqIfPresent(ReceivableDO::getCheckStatus, reqVO.getCheckStatus()) |
| 27 | - .eqIfPresent(ReceivableDO::getProcessInstanceId, reqVO.getProcessInstanceId()) | |
| 28 | 27 | .betweenIfPresent(ReceivableDO::getReturnTime, reqVO.getReturnTime()) |
| 29 | 28 | .eqIfPresent(ReceivableDO::getReturnType, reqVO.getReturnType()) |
| 30 | 29 | .eqIfPresent(ReceivableDO::getPrice, reqVO.getPrice()) |
| 31 | 30 | .eqIfPresent(ReceivableDO::getOwnerUserId, reqVO.getOwnerUserId()) |
| 32 | - .eqIfPresent(ReceivableDO::getBatchId, reqVO.getBatchId()) | |
| 33 | - .eqIfPresent(ReceivableDO::getSort, reqVO.getSort()) | |
| 34 | - .eqIfPresent(ReceivableDO::getDataScope, reqVO.getDataScope()) | |
| 35 | - .eqIfPresent(ReceivableDO::getDataScopeDeptIds, reqVO.getDataScopeDeptIds()) | |
| 36 | 31 | .eqIfPresent(ReceivableDO::getStatus, reqVO.getStatus()) |
| 37 | - .eqIfPresent(ReceivableDO::getRemark, reqVO.getRemark()) | |
| 38 | 32 | .betweenIfPresent(ReceivableDO::getCreateTime, reqVO.getCreateTime()) |
| 39 | 33 | .orderByDesc(ReceivableDO::getId)); |
| 40 | 34 | } |
| ... | ... | @@ -46,15 +40,11 @@ public interface ReceivableMapper extends BaseMapperX<ReceivableDO> { |
| 46 | 40 | .eqIfPresent(ReceivableDO::getCustomerId, reqVO.getCustomerId()) |
| 47 | 41 | .eqIfPresent(ReceivableDO::getContractId, reqVO.getContractId()) |
| 48 | 42 | .eqIfPresent(ReceivableDO::getCheckStatus, reqVO.getCheckStatus()) |
| 49 | - .eqIfPresent(ReceivableDO::getProcessInstanceId, reqVO.getProcessInstanceId()) | |
| 50 | 43 | .betweenIfPresent(ReceivableDO::getReturnTime, reqVO.getReturnTime()) |
| 51 | 44 | .eqIfPresent(ReceivableDO::getReturnType, reqVO.getReturnType()) |
| 52 | 45 | .eqIfPresent(ReceivableDO::getPrice, reqVO.getPrice()) |
| 53 | 46 | .eqIfPresent(ReceivableDO::getOwnerUserId, reqVO.getOwnerUserId()) |
| 54 | 47 | .eqIfPresent(ReceivableDO::getBatchId, reqVO.getBatchId()) |
| 55 | - .eqIfPresent(ReceivableDO::getSort, reqVO.getSort()) | |
| 56 | - .eqIfPresent(ReceivableDO::getDataScope, reqVO.getDataScope()) | |
| 57 | - .eqIfPresent(ReceivableDO::getDataScopeDeptIds, reqVO.getDataScopeDeptIds()) | |
| 58 | 48 | .eqIfPresent(ReceivableDO::getStatus, reqVO.getStatus()) |
| 59 | 49 | .eqIfPresent(ReceivableDO::getRemark, reqVO.getRemark()) |
| 60 | 50 | .betweenIfPresent(ReceivableDO::getCreateTime, reqVO.getCreateTime()) | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/receivable/ReceivablePlanMapper.java
| ... | ... | @@ -19,16 +19,13 @@ 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::getPeriod, reqVO.getPeriod()) | |
| 23 | 22 | .eqIfPresent(ReceivablePlanDO::getStatus, reqVO.getStatus()) |
| 24 | 23 | .eqIfPresent(ReceivablePlanDO::getCheckStatus, reqVO.getCheckStatus()) |
| 25 | 24 | .betweenIfPresent(ReceivablePlanDO::getReturnTime, reqVO.getReturnTime()) |
| 26 | - .eqIfPresent(ReceivablePlanDO::getRemindDays, reqVO.getRemindDays()) | |
| 27 | 25 | .betweenIfPresent(ReceivablePlanDO::getRemindTime, reqVO.getRemindTime()) |
| 28 | 26 | .eqIfPresent(ReceivablePlanDO::getCustomerId, reqVO.getCustomerId()) |
| 29 | 27 | .eqIfPresent(ReceivablePlanDO::getContractId, reqVO.getContractId()) |
| 30 | 28 | .eqIfPresent(ReceivablePlanDO::getOwnerUserId, reqVO.getOwnerUserId()) |
| 31 | - .eqIfPresent(ReceivablePlanDO::getRemark, reqVO.getRemark()) | |
| 32 | 29 | .betweenIfPresent(ReceivablePlanDO::getCreateTime, reqVO.getCreateTime()) |
| 33 | 30 | .orderByDesc(ReceivablePlanDO::getId)); |
| 34 | 31 | } | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/ReceivableServiceImpl.java
| ... | ... | @@ -14,6 +14,7 @@ import cn.iocoder.yudao.module.crm.convert.receivable.ReceivableConvert; |
| 14 | 14 | import cn.iocoder.yudao.module.crm.dal.dataobject.contract.ContractDO; |
| 15 | 15 | import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; |
| 16 | 16 | import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.ReceivableDO; |
| 17 | +import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.ReceivablePlanDO; | |
| 17 | 18 | import cn.iocoder.yudao.module.crm.dal.mysql.receivable.ReceivableMapper; |
| 18 | 19 | import cn.iocoder.yudao.module.crm.enums.AuditStatusEnum; |
| 19 | 20 | import cn.iocoder.yudao.module.crm.service.contract.ContractService; |
| ... | ... | @@ -43,10 +44,11 @@ public class ReceivableServiceImpl implements ReceivableService { |
| 43 | 44 | private ContractService contractService; |
| 44 | 45 | @Resource |
| 45 | 46 | private CrmCustomerService crmCustomerService; |
| 47 | + @Resource | |
| 48 | + private ReceivablePlanService receivablePlanService; | |
| 46 | 49 | |
| 47 | 50 | @Override |
| 48 | 51 | public Long createReceivable(ReceivableCreateReqVO createReqVO) { |
| 49 | - // TODO @liuhongfeng:planId 是否存在,是否合法,需要去校验; | |
| 50 | 52 | // 插入 |
| 51 | 53 | ReceivableDO receivable = ReceivableConvert.INSTANCE.convert(createReqVO); |
| 52 | 54 | if (ObjectUtil.isNull(receivable.getStatus())){ |
| ... | ... | @@ -80,6 +82,11 @@ public class ReceivableServiceImpl implements ReceivableService { |
| 80 | 82 | throw exception(CUSTOMER_NOT_EXISTS); |
| 81 | 83 | } |
| 82 | 84 | |
| 85 | + ReceivablePlanDO receivablePlan = receivablePlanService.getReceivablePlan(receivable.getPlanId()); | |
| 86 | + if(ObjectUtil.isNull(receivablePlan)){ | |
| 87 | + throw exception(RECEIVABLE_PLAN_NOT_EXISTS); | |
| 88 | + } | |
| 89 | + | |
| 83 | 90 | } |
| 84 | 91 | |
| 85 | 92 | @Override | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/test/java/cn/iocoder/yudao/module/crm/service/receivable/ReceivablePlanServiceImplTest.java
| ... | ... | @@ -144,16 +144,13 @@ 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.setPeriod(null); | |
| 148 | 147 | reqVO.setStatus(null); |
| 149 | 148 | reqVO.setCheckStatus(null); |
| 150 | 149 | reqVO.setReturnTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28)); |
| 151 | - reqVO.setRemindDays(null); | |
| 152 | 150 | reqVO.setRemindTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28)); |
| 153 | 151 | reqVO.setCustomerId(null); |
| 154 | 152 | reqVO.setContractId(null); |
| 155 | 153 | reqVO.setOwnerUserId(null); |
| 156 | - reqVO.setRemark(null); | |
| 157 | 154 | reqVO.setCreateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28)); |
| 158 | 155 | |
| 159 | 156 | // 调用 | ... | ... |
yudao-module-crm/yudao-module-crm-biz/src/test/java/cn/iocoder/yudao/module/crm/service/receivable/ReceivableServiceImplTest.java
| ... | ... | @@ -167,17 +167,11 @@ public class ReceivableServiceImplTest extends BaseDbUnitTest { |
| 167 | 167 | reqVO.setCustomerId(null); |
| 168 | 168 | reqVO.setContractId(null); |
| 169 | 169 | reqVO.setCheckStatus(null); |
| 170 | - reqVO.setProcessInstanceId(null); | |
| 171 | 170 | reqVO.setReturnTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28)); |
| 172 | 171 | reqVO.setReturnType(null); |
| 173 | 172 | reqVO.setPrice(null); |
| 174 | 173 | reqVO.setOwnerUserId(null); |
| 175 | - reqVO.setBatchId(null); | |
| 176 | - reqVO.setSort(null); | |
| 177 | - reqVO.setDataScope(null); | |
| 178 | - reqVO.setDataScopeDeptIds(null); | |
| 179 | 174 | reqVO.setStatus(null); |
| 180 | - reqVO.setRemark(null); | |
| 181 | 175 | reqVO.setCreateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28)); |
| 182 | 176 | |
| 183 | 177 | // 调用 |
| ... | ... | @@ -253,15 +247,11 @@ public class ReceivableServiceImplTest extends BaseDbUnitTest { |
| 253 | 247 | reqVO.setCustomerId(null); |
| 254 | 248 | reqVO.setContractId(null); |
| 255 | 249 | reqVO.setCheckStatus(null); |
| 256 | - reqVO.setProcessInstanceId(null); | |
| 257 | 250 | reqVO.setReturnTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28)); |
| 258 | 251 | reqVO.setReturnType(null); |
| 259 | 252 | reqVO.setPrice(null); |
| 260 | 253 | reqVO.setOwnerUserId(null); |
| 261 | 254 | reqVO.setBatchId(null); |
| 262 | - reqVO.setSort(null); | |
| 263 | - reqVO.setDataScope(null); | |
| 264 | - reqVO.setDataScopeDeptIds(null); | |
| 265 | 255 | reqVO.setStatus(null); |
| 266 | 256 | reqVO.setRemark(null); |
| 267 | 257 | reqVO.setCreateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28)); | ... | ... |