feat(产品需求、项目需求): 支持手动录入"来源业务编号",后端的sourceBizId改为sourceBizCode,也支持按"来源业务编号"搜索。
This commit is contained in:
@@ -46,4 +46,7 @@ public class ProductRequirementPageReqVO extends PageParam {
|
||||
@Schema(description = "来源类型(manual:手工新增, work_order:工单流转)", example = "manual")
|
||||
private String sourceType;
|
||||
|
||||
@Schema(description = "来源业务编号", example = "CRM-20260615-001")
|
||||
private String sourceBizCode;
|
||||
|
||||
}
|
||||
|
||||
@@ -43,8 +43,8 @@ public class ProductRequirementRespVO {
|
||||
@Schema(description = "需求来源类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "manual")
|
||||
private String sourceType;
|
||||
|
||||
@Schema(description = "来源业务ID", example = "1024")
|
||||
private Long sourceBizId;
|
||||
@Schema(description = "来源业务编号", example = "CRM-20260615-001")
|
||||
private String sourceBizCode;
|
||||
|
||||
@Schema(description = "优先级", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer priority;
|
||||
|
||||
@@ -45,6 +45,10 @@ public class ProductRequirementSaveReqVO {
|
||||
@Size(max = 64, message = "需求分类长度不能超过64个字符")
|
||||
private String category;
|
||||
|
||||
@Schema(description = "来源业务编号", example = "CRM-20260615-001")
|
||||
@Size(max = 255, message = "来源业务编号长度不能超过255个字符")
|
||||
private String sourceBizCode;
|
||||
|
||||
@Schema(description = "优先级,0低、1中、2高、3紧急", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "优先级不能为空")
|
||||
private Integer priority;
|
||||
|
||||
@@ -46,6 +46,10 @@ public class ProductRequirementUpdateReqVO {
|
||||
@Size(max = 64, message = "需求分类长度不能超过64个字符")
|
||||
private String category;
|
||||
|
||||
@Schema(description = "来源业务编号", example = "CRM-20260615-001")
|
||||
@Size(max = 255, message = "来源业务编号长度不能超过255个字符")
|
||||
private String sourceBizCode;
|
||||
|
||||
@Schema(description = "优先级,0低、1中、2高、3紧急", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "优先级不能为空")
|
||||
private Integer priority;
|
||||
|
||||
@@ -45,4 +45,7 @@ public class ProjectRequirementPageReqVO extends PageParam {
|
||||
@Schema(description = "来源类型", example = "manual")
|
||||
private String sourceType;
|
||||
|
||||
@Schema(description = "来源业务编号", example = "CRM-20260615-001")
|
||||
private String sourceBizCode;
|
||||
|
||||
}
|
||||
|
||||
@@ -46,8 +46,8 @@ public class ProjectRequirementRespVO {
|
||||
@Schema(description = "需求来源类型", example = "manual")
|
||||
private String sourceType;
|
||||
|
||||
@Schema(description = "来源业务ID", example = "1024")
|
||||
private Long sourceBizId;
|
||||
@Schema(description = "来源业务编号", example = "CRM-20260615-001")
|
||||
private String sourceBizCode;
|
||||
|
||||
@Schema(description = "优先级", example = "1")
|
||||
private Integer priority;
|
||||
|
||||
@@ -45,6 +45,10 @@ public class ProjectRequirementSaveReqVO {
|
||||
@Size(max = 64, message = "需求分类长度不能超过64个字符")
|
||||
private String category;
|
||||
|
||||
@Schema(description = "来源业务编号", example = "CRM-20260615-001")
|
||||
@Size(max = 255, message = "来源业务编号长度不能超过255个字符")
|
||||
private String sourceBizCode;
|
||||
|
||||
@Schema(description = "优先级,0低、1中、2高、3紧急", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "优先级不能为空")
|
||||
private Integer priority;
|
||||
|
||||
@@ -46,6 +46,10 @@ public class ProjectRequirementUpdateReqVO {
|
||||
@Size(max = 64, message = "需求分类长度不能超过64个字符")
|
||||
private String category;
|
||||
|
||||
@Schema(description = "来源业务编号", example = "CRM-20260615-001")
|
||||
@Size(max = 255, message = "来源业务编号长度不能超过255个字符")
|
||||
private String sourceBizCode;
|
||||
|
||||
@Schema(description = "优先级,0低、1中、2高、3紧急", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "优先级不能为空")
|
||||
private Integer priority;
|
||||
|
||||
@@ -58,9 +58,9 @@ public class ProductRequirementDO extends BaseDO {
|
||||
*/
|
||||
private String sourceType;
|
||||
/**
|
||||
* 来源业务ID
|
||||
* 来源业务编号
|
||||
*/
|
||||
private Long sourceBizId;
|
||||
private String sourceBizCode;
|
||||
/**
|
||||
* 优先级,0低、1中、2高、3紧急
|
||||
*/
|
||||
|
||||
@@ -62,9 +62,9 @@ public class ProjectRequirementDO extends BaseDO {
|
||||
*/
|
||||
private String sourceType;
|
||||
/**
|
||||
* 来源业务 ID
|
||||
* 来源业务编号
|
||||
*/
|
||||
private Long sourceBizId;
|
||||
private String sourceBizCode;
|
||||
/**
|
||||
* 优先级
|
||||
*/
|
||||
|
||||
@@ -53,6 +53,8 @@ public interface ProductRequirementMapper extends BaseMapperX<ProductRequirement
|
||||
.eqIfPresent(ProductRequirementDO::getCurrentHandlerUserId, reqVO.getCurrentHandlerUserId())
|
||||
// 来源类型精确匹配
|
||||
.eqIfPresent(ProductRequirementDO::getSourceType, reqVO.getSourceType())
|
||||
// 来源业务编号模糊匹配
|
||||
.likeIfPresent(ProductRequirementDO::getSourceBizCode, reqVO.getSourceBizCode())
|
||||
// 模块ID列表IN查询(优先使用moduleIds,用于支持子模块查询)
|
||||
.inIfPresent(ProductRequirementDO::getModuleId, reqVO.getModuleIds())
|
||||
// 模块ID精确匹配(当moduleIds为空时使用)
|
||||
|
||||
@@ -45,6 +45,7 @@ public interface ProjectRequirementMapper extends BaseMapperX<ProjectRequirement
|
||||
.eqIfPresent(ProjectRequirementDO::getStatusCode, reqVO.getStatusCode())
|
||||
.eqIfPresent(ProjectRequirementDO::getCurrentHandlerUserId, reqVO.getCurrentHandlerUserId())
|
||||
.eqIfPresent(ProjectRequirementDO::getSourceType, reqVO.getSourceType())
|
||||
.likeIfPresent(ProjectRequirementDO::getSourceBizCode, reqVO.getSourceBizCode())
|
||||
.inIfPresent(ProjectRequirementDO::getModuleId, reqVO.getModuleIds())
|
||||
.eqIfPresent(ProjectRequirementDO::getModuleId, reqVO.getModuleId())
|
||||
.eqIfPresent(ProjectRequirementDO::getParentId, reqVO.getParentId())
|
||||
|
||||
@@ -151,6 +151,7 @@ public class ProductRequirementServiceImpl implements ProductRequirementService
|
||||
requirement.setDescription(normalizeNullableText(createReqVO.getDescription()));
|
||||
requirement.setCategory(createReqVO.getCategory());
|
||||
requirement.setSourceType(SOURCE_TYPE_MANUAL); // 手工新增默认来源类型
|
||||
requirement.setSourceBizCode(normalizeNullableText(createReqVO.getSourceBizCode()));
|
||||
requirement.setPriority(createReqVO.getPriority());
|
||||
// 根据是否需要评审确定初始状态
|
||||
String initialStatus = Objects.equals(createReqVO.getReviewRequired(), 1)
|
||||
@@ -194,6 +195,7 @@ public class ProductRequirementServiceImpl implements ProductRequirementService
|
||||
requirement.setTitle(updateReqVO.getTitle().trim());
|
||||
requirement.setDescription(normalizeNullableText(updateReqVO.getDescription()));
|
||||
requirement.setCategory(updateReqVO.getCategory());
|
||||
requirement.setSourceBizCode(normalizeNullableText(updateReqVO.getSourceBizCode()));
|
||||
requirement.setPriority(updateReqVO.getPriority());
|
||||
requirement.setProposerId(updateReqVO.getProposerId());
|
||||
requirement.setProposerNickname(normalizeNullableText(updateReqVO.getProposerNickname()));
|
||||
@@ -907,6 +909,7 @@ public class ProductRequirementServiceImpl implements ProductRequirementService
|
||||
childRequirement.setDescription(normalizeNullableText(reqVO.getDescription()));
|
||||
childRequirement.setCategory(reqVO.getCategory());
|
||||
childRequirement.setSourceType(parentRequirement.getSourceType()); // 继承父需求来源类型
|
||||
childRequirement.setSourceBizCode(parentRequirement.getSourceBizCode()); // 继承父需求来源业务编号
|
||||
childRequirement.setPriority(reqVO.getPriority());
|
||||
// 子需求初始状态为待指派
|
||||
// 根据是否需要评审确定初始状态
|
||||
@@ -1671,7 +1674,7 @@ public class ProductRequirementServiceImpl implements ProductRequirementService
|
||||
target.setDescription(source.getDescription());
|
||||
target.setCategory(source.getCategory());
|
||||
target.setSourceType(source.getSourceType());
|
||||
target.setSourceBizId(source.getSourceBizId());
|
||||
target.setSourceBizCode(source.getSourceBizCode());
|
||||
target.setPriority(source.getPriority());
|
||||
target.setStatusCode(source.getStatusCode());
|
||||
target.setLastStatusReason(source.getLastStatusReason());
|
||||
@@ -1707,8 +1710,8 @@ public class ProductRequirementServiceImpl implements ProductRequirementService
|
||||
valueOf(after, ProductRequirementDO::getCategory));
|
||||
appendFieldChange(fieldChanges, "sourceType", valueOf(before, ProductRequirementDO::getSourceType),
|
||||
valueOf(after, ProductRequirementDO::getSourceType));
|
||||
appendFieldChange(fieldChanges, "sourceBizId", valueOf(before, ProductRequirementDO::getSourceBizId),
|
||||
valueOf(after, ProductRequirementDO::getSourceBizId));
|
||||
appendFieldChange(fieldChanges, "sourceBizCode", valueOf(before, ProductRequirementDO::getSourceBizCode),
|
||||
valueOf(after, ProductRequirementDO::getSourceBizCode));
|
||||
appendFieldChange(fieldChanges, "priority", valueOf(before, ProductRequirementDO::getPriority),
|
||||
valueOf(after, ProductRequirementDO::getPriority));
|
||||
appendFieldChange(fieldChanges, "statusCode", valueOf(before, ProductRequirementDO::getStatusCode),
|
||||
@@ -1805,7 +1808,7 @@ public class ProductRequirementServiceImpl implements ProductRequirementService
|
||||
newRequirement.setTitle(productRequirement.getTitle());
|
||||
newRequirement.setDescription(productRequirement.getDescription());
|
||||
newRequirement.setCategory(productRequirement.getCategory());
|
||||
newRequirement.setSourceBizId(productRequirement.getSourceBizId());
|
||||
newRequirement.setSourceBizCode(productRequirement.getSourceBizCode());
|
||||
newRequirement.setPriority(productRequirement.getPriority());
|
||||
newRequirement.setProposerId(productRequirement.getProposerId());
|
||||
newRequirement.setProposerNickname(productRequirement.getProposerNickname());
|
||||
|
||||
@@ -155,6 +155,7 @@ public class ProjectRequirementServiceImpl implements ProjectRequirementService
|
||||
requirement.setDescription(normalizeNullableText(createReqVO.getDescription()));
|
||||
requirement.setCategory(createReqVO.getCategory());
|
||||
requirement.setSourceType(SOURCE_TYPE_MANUAL);
|
||||
requirement.setSourceBizCode(normalizeNullableText(createReqVO.getSourceBizCode()));
|
||||
requirement.setPriority(createReqVO.getPriority());
|
||||
String initialStatus = Objects.equals(createReqVO.getReviewRequired(), 1)
|
||||
? STATUS_PENDING_REVIEW : STATUS_IMPLEMENTING;
|
||||
@@ -198,6 +199,7 @@ public class ProjectRequirementServiceImpl implements ProjectRequirementService
|
||||
requirement.setTitle(updateReqVO.getTitle().trim());
|
||||
requirement.setDescription(normalizeNullableText(updateReqVO.getDescription()));
|
||||
requirement.setCategory(updateReqVO.getCategory());
|
||||
requirement.setSourceBizCode(normalizeNullableText(updateReqVO.getSourceBizCode()));
|
||||
requirement.setPriority(updateReqVO.getPriority());
|
||||
requirement.setProposerId(updateReqVO.getProposerId());
|
||||
requirement.setProposerNickname(normalizeNullableText(updateReqVO.getProposerNickname()));
|
||||
@@ -442,7 +444,7 @@ public class ProjectRequirementServiceImpl implements ProjectRequirementService
|
||||
childRequirement.setCategory(reqVO.getCategory());
|
||||
childRequirement.setSourceType(parentRequirement.getSourceType());
|
||||
childRequirement.setProductRequirementId(parentRequirement.getProductRequirementId());
|
||||
childRequirement.setSourceBizId(parentRequirement.getSourceBizId());
|
||||
childRequirement.setSourceBizCode(parentRequirement.getSourceBizCode());
|
||||
childRequirement.setPriority(reqVO.getPriority());
|
||||
String initialStatus = Objects.equals(reqVO.getReviewRequired(), 1)
|
||||
? STATUS_PENDING_REVIEW : STATUS_IMPLEMENTING;
|
||||
@@ -1300,7 +1302,7 @@ public class ProjectRequirementServiceImpl implements ProjectRequirementService
|
||||
target.setDescription(source.getDescription());
|
||||
target.setCategory(source.getCategory());
|
||||
target.setSourceType(source.getSourceType());
|
||||
target.setSourceBizId(source.getSourceBizId());
|
||||
target.setSourceBizCode(source.getSourceBizCode());
|
||||
target.setPriority(source.getPriority());
|
||||
target.setStatusCode(source.getStatusCode());
|
||||
target.setLastStatusReason(source.getLastStatusReason());
|
||||
@@ -1337,8 +1339,8 @@ public class ProjectRequirementServiceImpl implements ProjectRequirementService
|
||||
valueOf(after, ProjectRequirementDO::getCategory));
|
||||
appendFieldChange(fieldChanges, "sourceType", valueOf(before, ProjectRequirementDO::getSourceType),
|
||||
valueOf(after, ProjectRequirementDO::getSourceType));
|
||||
appendFieldChange(fieldChanges, "sourceBizId", valueOf(before, ProjectRequirementDO::getSourceBizId),
|
||||
valueOf(after, ProjectRequirementDO::getSourceBizId));
|
||||
appendFieldChange(fieldChanges, "sourceBizCode", valueOf(before, ProjectRequirementDO::getSourceBizCode),
|
||||
valueOf(after, ProjectRequirementDO::getSourceBizCode));
|
||||
appendFieldChange(fieldChanges, "priority", valueOf(before, ProjectRequirementDO::getPriority),
|
||||
valueOf(after, ProjectRequirementDO::getPriority));
|
||||
appendFieldChange(fieldChanges, "statusCode", valueOf(before, ProjectRequirementDO::getStatusCode),
|
||||
@@ -1410,7 +1412,7 @@ public class ProjectRequirementServiceImpl implements ProjectRequirementService
|
||||
target.setDescription(source.getDescription());
|
||||
target.setCategory(source.getCategory());
|
||||
target.setSourceType(source.getSourceType());
|
||||
target.setSourceBizId(source.getSourceBizId());
|
||||
target.setSourceBizCode(source.getSourceBizCode());
|
||||
target.setPriority(source.getPriority());
|
||||
target.setStatusCode(source.getStatusCode());
|
||||
target.setLastStatusReason(source.getLastStatusReason());
|
||||
@@ -1443,8 +1445,8 @@ public class ProjectRequirementServiceImpl implements ProjectRequirementService
|
||||
valueOf(after, ProductRequirementDO::getCategory));
|
||||
appendFieldChange(fieldChanges, "sourceType", valueOf(before, ProductRequirementDO::getSourceType),
|
||||
valueOf(after, ProductRequirementDO::getSourceType));
|
||||
appendFieldChange(fieldChanges, "sourceBizId", valueOf(before, ProductRequirementDO::getSourceBizId),
|
||||
valueOf(after, ProductRequirementDO::getSourceBizId));
|
||||
appendFieldChange(fieldChanges, "sourceBizCode", valueOf(before, ProductRequirementDO::getSourceBizCode),
|
||||
valueOf(after, ProductRequirementDO::getSourceBizCode));
|
||||
appendFieldChange(fieldChanges, "priority", valueOf(before, ProductRequirementDO::getPriority),
|
||||
valueOf(after, ProductRequirementDO::getPriority));
|
||||
appendFieldChange(fieldChanges, "statusCode", valueOf(before, ProductRequirementDO::getStatusCode),
|
||||
|
||||
Reference in New Issue
Block a user