code review:crm 合同流程

This commit is contained in:
YunaiV 2023-10-17 22:52:14 +08:00
parent 07f3d09e38
commit b133acd8cd
2 changed files with 10 additions and 10 deletions

View File

@ -19,7 +19,6 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid; import javax.validation.Valid;
import java.io.IOException; import java.io.IOException;
import java.util.Collection;
import java.util.List; import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@ -67,15 +66,6 @@ public class ContractController {
return success(ContractConvert.INSTANCE.convert(contract)); return success(ContractConvert.INSTANCE.convert(contract));
} }
@GetMapping("/list")
@Operation(summary = "获得合同列表")
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048")
@PreAuthorize("@ss.hasPermission('crm:contract:query')")
public CommonResult<List<ContractRespVO>> getContractList(@RequestParam("ids") Collection<Long> ids) {
List<ContractDO> list = contractService.getContractList(ids);
return success(ContractConvert.INSTANCE.convertList(list));
}
@GetMapping("/page") @GetMapping("/page")
@Operation(summary = "获得合同分页") @Operation(summary = "获得合同分页")
@PreAuthorize("@ss.hasPermission('crm:contract:query')") @PreAuthorize("@ss.hasPermission('crm:contract:query')")

View File

@ -9,6 +9,7 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
// TODO @dhb52所有类带下 Crm 前缀避免和别的模块重复
/** /**
* 合同 Base VO提供给添加修改详细的子 VO 使用 * 合同 Base VO提供给添加修改详细的子 VO 使用
* 如果子 VO 存在差异的字段请不要添加到这里影响 Swagger 文档生成 * 如果子 VO 存在差异的字段请不要添加到这里影响 Swagger 文档生成
@ -16,10 +17,13 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
@Data @Data
public class ContractBaseVO { public class ContractBaseVO {
// TODO @dhb52类似 no 字段的 example 要写xia
@Schema(description = "合同名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") @Schema(description = "合同名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
@NotNull(message = "合同名称不能为空") @NotNull(message = "合同名称不能为空")
private String name; private String name;
// TODO @dhb52这个必须传递
@Schema(description = "客户编号", example = "18336") @Schema(description = "客户编号", example = "18336")
private Long customerId; private Long customerId;
@ -29,13 +33,17 @@ public class ContractBaseVO {
@Schema(description = "工作流编号", example = "1043") @Schema(description = "工作流编号", example = "1043")
private Long processInstanceId; private Long processInstanceId;
// TODO @dhb52这个必须传递
@Schema(description = "下单日期") @Schema(description = "下单日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime orderDate; private LocalDateTime orderDate;
// TODO @dhb52这个必须传递
@Schema(description = "负责人的用户编号", example = "17144") @Schema(description = "负责人的用户编号", example = "17144")
private Long ownerUserId; private Long ownerUserId;
// TODO @芋艿未来应该支持自动生成
// TODO @dhb52这个必须传递
@Schema(description = "合同编号") @Schema(description = "合同编号")
private String no; private String no;
@ -69,4 +77,6 @@ public class ContractBaseVO {
@Schema(description = "备注", example = "你猜") @Schema(description = "备注", example = "你猜")
private String remark; private String remark;
// TODO @dhb52增加一个 status 字段具体有哪些值你来枚举下主要页面上有个草稿提交审核的流程可以看看然后要对接工作流这块也可以看看不确定的地方问我
} }