Merge pull request '产品计划修改为产品里程碑' (#800) from otto/microservices:product_refact into product_refact
This commit is contained in:
commit
6235bb6fe0
|
|
@ -164,7 +164,7 @@ public class ProductReqSpecsController extends BaseController {
|
|||
value = "【字段说明】(非必填字段不传递则代表不更新,传null则代表置空):\n" +
|
||||
"idList:需求Id列表(必填),示例:[1,2,3];\n" +
|
||||
"pmsProductModuleId:关联产品模块ID;\n" +
|
||||
"pmsProductPlanId:关联产品计划ID;\n")
|
||||
"pmsProductPlanId:关联产品里程碑ID;\n")
|
||||
@RequestBody JSONObject pmsProductRequirementBatchUpdateVo) {
|
||||
return toAjax(pmsProductRequirementService.batchUpdatePmsProductRequirement(pmsProductRequirementBatchUpdateVo));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,22 +12,26 @@ import lombok.Data;
|
|||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 产品计划对象 pms_product_plan
|
||||
* 产品里程碑对象 pms_product_plan
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2023-10-10
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("产品计划对象")
|
||||
@ApiModel("产品里程碑对象")
|
||||
public class PmsProductPlan extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 产品计划ID */
|
||||
/**
|
||||
* 产品里程碑ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/** 计划标题 */
|
||||
@ApiModelProperty(value = "计划标题")
|
||||
/**
|
||||
* 里程碑标题
|
||||
*/
|
||||
@ApiModelProperty(value = "里程碑标题")
|
||||
private String planTitle;
|
||||
|
||||
/** 关联产品标识 */
|
||||
|
|
@ -52,8 +56,10 @@ public class PmsProductPlan extends BaseEntity
|
|||
@ApiModelProperty(value = "结束时间")
|
||||
private Date endTime;
|
||||
|
||||
/** 计划描述 */
|
||||
@ApiModelProperty(value = "计划描述")
|
||||
/**
|
||||
* 里程碑描述
|
||||
*/
|
||||
@ApiModelProperty(value = "里程碑描述")
|
||||
private String planDescription;
|
||||
|
||||
/** 工作量 */
|
||||
|
|
|
|||
|
|
@ -26,8 +26,10 @@ public class PmsProductPriority extends BaseEntity
|
|||
@ApiModelProperty(value = "优先级名称")
|
||||
private String name;
|
||||
|
||||
/** 优先级类型(1产品计划 2产品需求) */
|
||||
@ApiModelProperty(value = "优先级类型(1=产品计划,2=产品需求)")
|
||||
/**
|
||||
* 优先级类型(1产品里程碑 2产品需求)
|
||||
*/
|
||||
@ApiModelProperty(value = "优先级类型(1=产品里程碑,2=产品需求)")
|
||||
private Integer type;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
|
|
|
|||
|
|
@ -51,7 +51,9 @@ public class PmsProductRequirement extends BaseEntity
|
|||
@ApiModelProperty(value = "关联产品模块ID")
|
||||
private Long pmsProductModuleId;
|
||||
|
||||
/** 关联产品计划ID */
|
||||
/**
|
||||
* 关联产品里程碑ID
|
||||
*/
|
||||
@ApiModelProperty(value = "关联产品里程碑ID")
|
||||
private Long pmsProductPlanId;
|
||||
|
||||
|
|
|
|||
|
|
@ -26,8 +26,10 @@ public class PmsProductStatus extends BaseEntity
|
|||
@ApiModelProperty(value = "状态名称")
|
||||
private String name;
|
||||
|
||||
/** 状态类型(1产品计划 2产品需求) */
|
||||
@ApiModelProperty(value = "状态类型(1=产品计划,2=产品需求)")
|
||||
/**
|
||||
* 状态类型(1产品里程碑 2产品需求)
|
||||
*/
|
||||
@ApiModelProperty(value = "状态类型(1=产品里程碑,2=产品需求)")
|
||||
private Integer type;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
|
|
|
|||
|
|
@ -9,16 +9,18 @@ import lombok.Data;
|
|||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 产品计划对象 pms_product_plan
|
||||
* 产品里程碑对象 pms_product_plan
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2023-10-10
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("产品计划数据对象")
|
||||
@ApiModel("产品里程碑数据对象")
|
||||
public class PmsProductPlanDataVo
|
||||
{
|
||||
/** 产品计划ID */
|
||||
/**
|
||||
* 产品里程碑ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/** 计划标题 */
|
||||
|
|
|
|||
|
|
@ -13,13 +13,13 @@ import javax.validation.constraints.Size;
|
|||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 产品计划对象 pms_product_plan
|
||||
* 产品里程碑对象 pms_product_plan
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2023-10-10
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("产品计划输入对象")
|
||||
@ApiModel("产品里程碑输入对象")
|
||||
public class PmsProductPlanInputVo
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@ import lombok.Data;
|
|||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* 产品计划对象 pms_product_plan
|
||||
* 产品里程碑对象 pms_product_plan
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2023-10-10
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("产品计划搜索对象")
|
||||
@ApiModel("产品里程碑搜索对象")
|
||||
public class PmsProductPlanSearchVo
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -12,18 +12,20 @@ import javax.validation.constraints.Size;
|
|||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 产品计划对象 pms_product_plan
|
||||
* 产品里程碑对象 pms_product_plan
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2023-10-10
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("产品计划更新对象")
|
||||
@ApiModel("产品里程碑更新对象")
|
||||
public class PmsProductPlanUpdateVo
|
||||
{
|
||||
/** 产品计划ID */
|
||||
/**
|
||||
* 产品里程碑ID
|
||||
*/
|
||||
@NotNull
|
||||
@ApiModelProperty(value = "产品计划ID")
|
||||
@ApiModelProperty(value = "产品里程碑ID")
|
||||
private Long id;
|
||||
|
||||
/** 计划标题 */
|
||||
|
|
|
|||
|
|
@ -34,8 +34,10 @@ public class PmsProductRequirementBatchUpdateVo
|
|||
private Long pmsProductModuleId;
|
||||
private Boolean pmsProductModuleIdIsChange = false;
|
||||
|
||||
/** 关联产品计划ID */
|
||||
@ApiModelProperty(value = "关联产品计划ID")
|
||||
/**
|
||||
* 关联产品里程碑ID
|
||||
*/
|
||||
@ApiModelProperty(value = "关联产品里程碑ID")
|
||||
private Long pmsProductPlanId;
|
||||
private Boolean pmsProductPlanIdIsChange = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -54,9 +54,9 @@ public class PmsProductRequirementDataVo extends BaseEntityVo
|
|||
private PmsProduct pmsProduct;
|
||||
|
||||
/**
|
||||
* 关联产品计划
|
||||
* 关联产品里程碑
|
||||
*/
|
||||
@ApiModelProperty(value = "关联产品计划")
|
||||
@ApiModelProperty(value = "关联产品里程碑")
|
||||
private PmsProductPlan pmsProductPlan;
|
||||
|
||||
/** 标记名称,使用逗号分割的字符 */
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ public class PmsProductRequirementDetailVo extends PmsProductRequirementDataVo
|
|||
private List<SysFileInfo> fileList;
|
||||
|
||||
/**
|
||||
* 关联产品计划
|
||||
* 关联产品里程碑
|
||||
*/
|
||||
@ApiModelProperty(value = "关联产品计划")
|
||||
@ApiModelProperty(value = "关联产品里程碑")
|
||||
private PmsProductPlan pmsProductPlan;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,8 +78,10 @@ public class PmsProductRequirementInputVo
|
|||
@ApiModelProperty(value = "关联项目ID")
|
||||
private Long pmsProjectId;
|
||||
|
||||
/** 关联产品计划ID */
|
||||
@ApiModelProperty(value = "关联产品计划ID")
|
||||
/**
|
||||
* 关联产品里程碑ID
|
||||
*/
|
||||
@ApiModelProperty(value = "关联产品里程碑ID")
|
||||
private Long pmsProductPlanId;
|
||||
|
||||
public PmsProductRequirement toPmsProductRequirement(){
|
||||
|
|
|
|||
|
|
@ -26,8 +26,10 @@ public class PmsProductRequirementSearchVo
|
|||
@ApiModelProperty(value = "关联产品模块ID(传0查询不属于任何模块的需求)")
|
||||
private Long pmsProductModuleId;
|
||||
|
||||
/** 关联产品计划ID */
|
||||
@ApiModelProperty(value = "关联产品计划ID")
|
||||
/**
|
||||
* 关联产品里程碑ID
|
||||
*/
|
||||
@ApiModelProperty(value = "关联产品里程碑ID")
|
||||
private Long pmsProductPlanId;
|
||||
|
||||
/** 关联产品模块标识 */
|
||||
|
|
|
|||
|
|
@ -38,8 +38,10 @@ public class PmsProductRequirementUpdateVo
|
|||
@ApiModelProperty(value = "关联产品模块ID")
|
||||
private Long pmsProductModuleId;
|
||||
|
||||
/** 关联产品计划ID */
|
||||
@ApiModelProperty(value = "关联产品计划ID")
|
||||
/**
|
||||
* 关联产品里程碑ID
|
||||
*/
|
||||
@ApiModelProperty(value = "关联产品里程碑ID")
|
||||
private Long pmsProductPlanId;
|
||||
|
||||
/** 正文 */
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ public class PmsTypeDataVo
|
|||
@ApiModelProperty(value = "名称")
|
||||
private String name;
|
||||
/** 类型 */
|
||||
@ApiModelProperty(value = "类型(1=产品计划,2=产品需求)")
|
||||
@ApiModelProperty(value = "类型(1=产品里程碑,2=产品需求)")
|
||||
private Integer type;
|
||||
|
||||
/** 颜色 */
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import javax.validation.constraints.NotNull;
|
|||
public class PmsTypeSearchVo
|
||||
{
|
||||
/** 类型 */
|
||||
@ApiModelProperty(value = "类型(1=产品计划,2=产品需求)")
|
||||
@ApiModelProperty(value = "类型(1=产品里程碑,2=产品需求)")
|
||||
@NotNull
|
||||
private Integer type;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 产品计划Mapper接口
|
||||
* 产品里程碑Mapper接口
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2023-10-10
|
||||
|
|
@ -18,47 +18,47 @@ import java.util.List;
|
|||
public interface PmsProductPlanMapper
|
||||
{
|
||||
/**
|
||||
* 查询产品计划
|
||||
*
|
||||
* @param id 产品计划主键
|
||||
* @return 产品计划
|
||||
* 查询产品里程碑
|
||||
*
|
||||
* @param id 产品里程碑主键
|
||||
* @return 产品里程碑
|
||||
*/
|
||||
public PmsProductPlan selectPmsProductPlanById(Long id);
|
||||
|
||||
/**
|
||||
* 查询产品计划列表
|
||||
*
|
||||
* @param pmsProductPlan 产品计划
|
||||
* @return 产品计划集合
|
||||
* 查询产品里程碑列表
|
||||
*
|
||||
* @param pmsProductPlan 产品里程碑
|
||||
* @return 产品里程碑集合
|
||||
*/
|
||||
public List<PmsProductPlan> selectPmsProductPlanList(PmsProductPlan pmsProductPlan);
|
||||
|
||||
/**
|
||||
* 新增产品计划
|
||||
*
|
||||
* @param pmsProductPlan 产品计划
|
||||
* 新增产品里程碑
|
||||
*
|
||||
* @param pmsProductPlan 产品里程碑
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPmsProductPlan(PmsProductPlan pmsProductPlan);
|
||||
|
||||
/**
|
||||
* 修改产品计划
|
||||
*
|
||||
* @param pmsProductPlan 产品计划
|
||||
* 修改产品里程碑
|
||||
*
|
||||
* @param pmsProductPlan 产品里程碑
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePmsProductPlan(PmsProductPlan pmsProductPlan);
|
||||
|
||||
/**
|
||||
* 删除产品计划
|
||||
*
|
||||
* @param id 产品计划主键
|
||||
* 删除产品里程碑
|
||||
*
|
||||
* @param id 产品里程碑主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePmsProductPlanById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除产品计划
|
||||
* 批量删除产品里程碑
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
|
|
@ -66,16 +66,16 @@ public interface PmsProductPlanMapper
|
|||
public int deletePmsProductPlanByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 查询即将过期的产品计划
|
||||
* 查询即将过期的产品里程碑
|
||||
* @param date 时间
|
||||
* @return 产品计划列表
|
||||
* @return 产品里程碑列表
|
||||
*/
|
||||
List<PmsProductPlan> selectExpiringPmsProductPlanList(Date date);
|
||||
|
||||
/**
|
||||
* 查询产品计划数量
|
||||
* @param pmsProductPlan 产品计划查询条件
|
||||
* @return 产品计划总数
|
||||
* 查询产品里程碑数量
|
||||
* @param pmsProductPlan 产品里程碑查询条件
|
||||
* @return 产品里程碑总数
|
||||
*/
|
||||
Integer selectPmsProductPlanCount(PmsProductPlan pmsProductPlan);
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import com.microservices.pms.product.domain.vo.ReqStatusStatVo;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 产品计划Service接口
|
||||
* 产品里程碑Service接口
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2023-10-10
|
||||
|
|
@ -16,78 +16,78 @@ import java.util.List;
|
|||
public interface IPmsProductPlanService
|
||||
{
|
||||
/**
|
||||
* 查询产品计划
|
||||
* 查询产品里程碑
|
||||
*
|
||||
* @param id 产品计划主键
|
||||
* @param id 产品里程碑主键
|
||||
* @param checkRole
|
||||
* @return 产品计划
|
||||
* @return 产品里程碑
|
||||
*/
|
||||
public PmsProductPlan selectPmsProductPlanById(Long id, boolean checkRole);
|
||||
|
||||
/**
|
||||
* 查询产品计划列表
|
||||
*
|
||||
* @param pmsProductPlan 产品计划
|
||||
* @return 产品计划集合
|
||||
* 查询产品里程碑列表
|
||||
*
|
||||
* @param pmsProductPlan 产品里程碑
|
||||
* @return 产品里程碑集合
|
||||
*/
|
||||
public GenericsTableDataInfo<PmsProductPlanDataVo> selectPmsProductPlanList(PmsProductPlan pmsProductPlan);
|
||||
|
||||
/**
|
||||
* 新增产品计划
|
||||
*
|
||||
* @param pmsProductPlan 产品计划
|
||||
* 新增产品里程碑
|
||||
*
|
||||
* @param pmsProductPlan 产品里程碑
|
||||
* @return 结果
|
||||
*/
|
||||
public Long insertPmsProductPlan(PmsProductPlan pmsProductPlan);
|
||||
|
||||
/**
|
||||
* 修改产品计划
|
||||
*
|
||||
* @param pmsProductPlan 产品计划
|
||||
* 修改产品里程碑
|
||||
*
|
||||
* @param pmsProductPlan 产品里程碑
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePmsProductPlan(PmsProductPlan pmsProductPlan);
|
||||
|
||||
/**
|
||||
* 更新产品计划变更
|
||||
* 更新产品里程碑变更
|
||||
*
|
||||
* @param id 产品计划Id
|
||||
* @param id 产品里程碑Id
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePmsProductPlanChange(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除产品计划
|
||||
*
|
||||
* @param ids 需要删除的产品计划主键集合
|
||||
* 批量删除产品里程碑
|
||||
*
|
||||
* @param ids 需要删除的产品里程碑主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePmsProductPlanByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除产品计划信息
|
||||
*
|
||||
* @param id 产品计划主键
|
||||
* 删除产品里程碑信息
|
||||
*
|
||||
* @param id 产品里程碑主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePmsProductPlanById(Long id);
|
||||
|
||||
/**
|
||||
* 查询产品计划详情
|
||||
* @param id 产品计划id
|
||||
* @return 产品计划详情
|
||||
* 查询产品里程碑详情
|
||||
* @param id 产品里程碑id
|
||||
* @return 产品里程碑详情
|
||||
*/
|
||||
PmsProductPlanDataVo selectPmsProductPlanDataById(Long id);
|
||||
|
||||
/**
|
||||
* 查询产品计划数量
|
||||
* @param pmsProductPlan 产品计划查询条件
|
||||
* @return 产品计划总数
|
||||
* 查询产品里程碑数量
|
||||
* @param pmsProductPlan 产品里程碑查询条件
|
||||
* @return 产品里程碑总数
|
||||
*/
|
||||
Integer selectPmsProductPlanCount(PmsProductPlan pmsProductPlan);
|
||||
|
||||
/**
|
||||
* 删除产品下所有产品计划
|
||||
* 删除产品下所有产品里程碑
|
||||
*
|
||||
* @param productIdentifier 产品标识
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 产品计划Service业务层处理
|
||||
* 产品里程碑Service业务层处理
|
||||
*
|
||||
* @author microservices
|
||||
* @date 2023-10-10
|
||||
|
|
@ -43,17 +43,17 @@ public class PmsProductPlanServiceImpl implements IPmsProductPlanService {
|
|||
private IPmsProductRequirementService pmsProductRequirementService;
|
||||
|
||||
/**
|
||||
* 查询产品计划
|
||||
* 查询产品里程碑
|
||||
*
|
||||
* @param id 产品计划主键
|
||||
* @param id 产品里程碑主键
|
||||
* @param checkRole 是否校验角色(仅允许组织管理员和产品负责人操作当前产品)
|
||||
* @return 产品计划
|
||||
* @return 产品里程碑
|
||||
*/
|
||||
@Override
|
||||
public PmsProductPlan selectPmsProductPlanById(Long id, boolean checkRole) {
|
||||
PmsProductPlan pmsProductPlan = pmsProductPlanMapper.selectPmsProductPlanById(id);
|
||||
if (pmsProductPlan == null) {
|
||||
throw new ServiceException("该产品计划不存在(产品计划Id[%d])", id);
|
||||
throw new ServiceException("该产品里程碑不存在(产品里程碑Id[%d])", id);
|
||||
}
|
||||
PmsProduct pmsProduct = pmsProductService.selectPmsProductByIdentifier(pmsProductPlan.getPmsProductIdentifier());
|
||||
if (checkRole) {
|
||||
|
|
@ -63,10 +63,10 @@ public class PmsProductPlanServiceImpl implements IPmsProductPlanService {
|
|||
}
|
||||
|
||||
/**
|
||||
* 查询产品计划列表
|
||||
* 查询产品里程碑列表
|
||||
*
|
||||
* @param pmsProductPlan 产品计划
|
||||
* @return 产品计划
|
||||
* @param pmsProductPlan 产品里程碑
|
||||
* @return 产品里程碑
|
||||
*/
|
||||
@Override
|
||||
public GenericsTableDataInfo<PmsProductPlanDataVo> selectPmsProductPlanList(PmsProductPlan pmsProductPlan) {
|
||||
|
|
@ -78,9 +78,9 @@ public class PmsProductPlanServiceImpl implements IPmsProductPlanService {
|
|||
}
|
||||
|
||||
/**
|
||||
* 新增产品计划
|
||||
* 新增产品里程碑
|
||||
*
|
||||
* @param pmsProductPlan 产品计划
|
||||
* @param pmsProductPlan 产品里程碑
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
|
|
@ -88,15 +88,15 @@ public class PmsProductPlanServiceImpl implements IPmsProductPlanService {
|
|||
// 校验产品是否存在
|
||||
PmsProduct pmsProduct = pmsProductService.selectPmsProductByIdentifier(pmsProductPlan.getPmsProductIdentifier());
|
||||
pmsProductService.checkManageRole(pmsProduct);
|
||||
// 设置产品计划优先级,若未传入则设置为默认优先级
|
||||
// 设置产品里程碑优先级,若未传入则设置为默认优先级
|
||||
Long priorityId =
|
||||
pmsProductPriorityService.selectPmsProductPriorityIdByInputId(pmsProductPlan.getPriorityId(), PmsConstants.PRODUCT_STATUS_OR_PRIORITY_PLAN_TYPE);
|
||||
pmsProductPlan.setPriorityId(priorityId);
|
||||
checkProductPlan(pmsProductPlan);
|
||||
if (pmsProductPlan.getStartTime() == null || pmsProductPlan.getEndTime() == null) {
|
||||
throw new ServiceException("产品计划的开始时间和结束时间不能为空");
|
||||
throw new ServiceException("产品里程碑的开始时间和结束时间不能为空");
|
||||
}
|
||||
// 设置产品计划状态
|
||||
// 设置产品里程碑状态
|
||||
Long statusId =
|
||||
pmsProductStatusService.selectPmsProductPlanStatusByDateOrStatusId(pmsProductPlan.getStartTime(), pmsProductPlan.getEndTime(), null, null, pmsProductPlan.getStatusId(), null);
|
||||
pmsProductPlan.setStatusId(statusId);
|
||||
|
|
@ -122,17 +122,17 @@ public class PmsProductPlanServiceImpl implements IPmsProductPlanService {
|
|||
}
|
||||
|
||||
/**
|
||||
* 修改产品计划
|
||||
* 修改产品里程碑
|
||||
*
|
||||
* @param pmsProductPlan 产品计划
|
||||
* @param pmsProductPlan 产品里程碑
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updatePmsProductPlan(PmsProductPlan pmsProductPlan) {
|
||||
// 通过id检查需修改的产品计划是否存在
|
||||
// 通过id检查需修改的产品里程碑是否存在
|
||||
PmsProductPlan oldPmsProductPlan = selectPmsProductPlanById(pmsProductPlan.getId(), true);
|
||||
if (pmsProductPlan.getPriorityId() != null) {
|
||||
// 设置产品计划优先级
|
||||
// 设置产品里程碑优先级
|
||||
Long priorityId =
|
||||
pmsProductPriorityService.selectPmsProductPriorityIdByInputId(pmsProductPlan.getPriorityId(), PmsConstants.PRODUCT_STATUS_OR_PRIORITY_PLAN_TYPE);
|
||||
pmsProductPlan.setPriorityId(priorityId);
|
||||
|
|
@ -147,7 +147,7 @@ public class PmsProductPlanServiceImpl implements IPmsProductPlanService {
|
|||
throw new ServiceException("结束时间不能早于开始时间");
|
||||
}
|
||||
}
|
||||
// 设置产品计划状态
|
||||
// 设置产品里程碑状态
|
||||
Long statusId =
|
||||
pmsProductStatusService.selectPmsProductPlanStatusByDateOrStatusId(
|
||||
pmsProductPlan.getStartTime(), pmsProductPlan.getEndTime(), oldPmsProductPlan.getStartTime(), oldPmsProductPlan.getEndTime(), pmsProductPlan.getStatusId(), oldPmsProductPlan.getStatusId());
|
||||
|
|
@ -170,9 +170,9 @@ public class PmsProductPlanServiceImpl implements IPmsProductPlanService {
|
|||
}
|
||||
|
||||
/**
|
||||
* 批量删除产品计划
|
||||
* 批量删除产品里程碑
|
||||
*
|
||||
* @param ids 需要删除的产品计划主键
|
||||
* @param ids 需要删除的产品里程碑主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
|
|
@ -186,9 +186,9 @@ public class PmsProductPlanServiceImpl implements IPmsProductPlanService {
|
|||
}
|
||||
|
||||
/**
|
||||
* 删除产品计划信息
|
||||
* 删除产品里程碑信息
|
||||
*
|
||||
* @param id 产品计划主键
|
||||
* @param id 产品里程碑主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -167,11 +167,11 @@ public class PmsProductRequirementServiceImpl implements IPmsProductRequirementS
|
|||
}
|
||||
|
||||
private void checkReqSpecsParameter(PmsProductRequirement pmsProductRequirement, PmsProduct pmsProduct, PmsProductRequirement oldPmsProductRequirement) {
|
||||
// 校验产品计划是否存在
|
||||
// 校验产品里程碑是否存在
|
||||
if (pmsProductRequirement.getPmsProductPlanId() != null) {
|
||||
PmsProductPlan pmsProductPlan = pmsProductPlanService.selectPmsProductPlanById(pmsProductRequirement.getPmsProductPlanId(), false);
|
||||
if (!pmsProductPlan.getPmsProductIdentifier().equals(pmsProduct.getProductIdentifier())) {
|
||||
throw new ServiceException("该产品计划不属于当前产品(计划标题[%s],产品名称[%s])", pmsProductPlan.getPlanTitle(), pmsProduct.getProductName());
|
||||
throw new ServiceException("该产品里程碑不属于当前产品(产品里程碑标题[%s],产品名称[%s])", pmsProductPlan.getPlanTitle(), pmsProduct.getProductName());
|
||||
}
|
||||
|
||||
if (oldPmsProductRequirement == null || oldPmsProductRequirement.getPmsProductPlanId() == null) {
|
||||
|
|
@ -410,7 +410,7 @@ public class PmsProductRequirementServiceImpl implements IPmsProductRequirementS
|
|||
, pmsProductRequirement.getPmsProductModuleId())
|
||||
);
|
||||
}
|
||||
// 设置产品计划
|
||||
// 设置产品里程碑
|
||||
if (pmsProductRequirement.getPmsProductPlanId() != null) {
|
||||
productReqSpecsDataVo.setPmsProductPlan(
|
||||
PmsUtils.getSelectObjectInCache(
|
||||
|
|
@ -829,7 +829,7 @@ public class PmsProductRequirementServiceImpl implements IPmsProductRequirementS
|
|||
checkGitlinkUserIds(gitlinkUserIdStrList, pmsProduct);
|
||||
}
|
||||
|
||||
// 校验产品计划是否存在
|
||||
// 校验产品里程碑是否存在
|
||||
if (pmsProductRequirementBatchUpdateVo.getPmsProductPlanIdIsChange()
|
||||
&& pmsProductRequirementBatchUpdateVo.getPmsProductPlanId() != null) {
|
||||
checkProductPlanId(pmsProductRequirementBatchUpdateVo.getPmsProductPlanId(), pmsProduct);
|
||||
|
|
@ -887,7 +887,7 @@ public class PmsProductRequirementServiceImpl implements IPmsProductRequirementS
|
|||
private void checkProductPlanId(Long productPlanId, PmsProduct pmsProduct) {
|
||||
PmsProductPlan pmsProductPlan = pmsProductPlanService.selectPmsProductPlanById(productPlanId, false);
|
||||
if (!pmsProductPlan.getPmsProductIdentifier().equals(pmsProduct.getProductIdentifier())) {
|
||||
throw new ServiceException("该产品计划不属于当前产品(计划标题[%s],产品名称[%s])", pmsProductPlan.getPlanTitle(), pmsProduct.getProductName());
|
||||
throw new ServiceException("该产品里程碑不属于当前产品(计划标题[%s],产品名称[%s])", pmsProductPlan.getPlanTitle(), pmsProduct.getProductName());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -135,12 +135,12 @@ public class PmsProductStatusServiceImpl implements IPmsProductStatusService {
|
|||
if(statusId!=null){
|
||||
if (oldStatusId.equals(notStartedStatusId) || oldStatusId.equals(expiredStatusId) || oldStatusId.equals(inProgressStatusId)) {
|
||||
if (!statusId.equals(completedStatusId) && !statusId.equals(closedStatusId)) {
|
||||
throw new ServiceException("产品计划状态仅允许手动切换为已完成");
|
||||
throw new ServiceException("产品里程碑状态仅允许手动切换为已完成");
|
||||
}
|
||||
}
|
||||
if (oldStatusId.equals(completedStatusId) || oldStatusId.equals(closedStatusId)) {
|
||||
if (!statusId.equals(inProgressStatusId)) {
|
||||
throw new ServiceException("产品计划状态在已完成状态下仅允许进行重开计划操作");
|
||||
throw new ServiceException("产品里程碑状态在已完成状态下仅允许进行重开计划操作");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@ public class PmsJob {
|
|||
private IPmsProductStatusService pmsProductStatusService;
|
||||
|
||||
/**
|
||||
* 每日凌晨检查产品计划:
|
||||
* 1、未启动的产品计划是否有已达到开始时间的,若存在则设置为已过期
|
||||
* 2、进行中的产品计划是否有已过期,若存在则设置为已过期
|
||||
* 每日凌晨检查产品里程碑:
|
||||
* 1、未启动的产品里程碑是否有已达到开始时间的,若存在则设置为已过期
|
||||
* 2、进行中的产品里程碑是否有已过期,若存在则设置为已过期
|
||||
*/
|
||||
@Scheduled(cron = "0 0 0 * * ?")
|
||||
public void checkProductPlanStatus() {
|
||||
|
|
@ -49,7 +49,7 @@ public class PmsJob {
|
|||
if(!nowZeroTime.before(startZeroTime)){
|
||||
pmsProductPlan.setStatusId(inProgressStatusId);
|
||||
pmsProductPlanMapper.updatePmsProductPlan(pmsProductPlan);
|
||||
log.info("产品计划【{}】状态发生变更:由[未启动]变为[进行中]", pmsProductPlan.getPlanTitle());
|
||||
log.info("产品里程碑【{}】状态发生变更:由[未启动]变为[进行中]", pmsProductPlan.getPlanTitle());
|
||||
}
|
||||
});
|
||||
// 获取进行中计划列表,更新状态
|
||||
|
|
@ -60,7 +60,7 @@ public class PmsJob {
|
|||
if(nowZeroTime.after(endZeroTime)){
|
||||
pmsProductPlan.setStatusId(expiredStatusId);
|
||||
pmsProductPlanMapper.updatePmsProductPlan(pmsProductPlan);
|
||||
log.info("产品计划【{}】状态发生变更:由[进行中]变为[已过期]", pmsProductPlan.getPlanTitle());
|
||||
log.info("产品里程碑【{}】状态发生变更:由[进行中]变为[已过期]", pmsProductPlan.getPlanTitle());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ public class PmsConstants {
|
|||
public final static String USER_NOT_IN_ORG_MSG = "组织成员不存在";
|
||||
|
||||
/**
|
||||
* (状态/优先级)产品计划类型
|
||||
* (状态/优先级)产品里程碑类型
|
||||
*/
|
||||
public final static Integer PRODUCT_STATUS_OR_PRIORITY_PLAN_TYPE = 1;
|
||||
/**
|
||||
|
|
@ -22,23 +22,23 @@ public class PmsConstants {
|
|||
*/
|
||||
public final static Integer PRODUCT_STATUS_OR_PRIORITY_REQUIREMENT_TYPE = 2;
|
||||
/**
|
||||
* 产品计划状态-未启动
|
||||
* 产品里程碑状态-未启动
|
||||
*/
|
||||
public final static String PRODUCT_PLAN_NOT_STARTED_STATUS_NAME = "未启动";
|
||||
/**
|
||||
* 产品计划状态-进行中
|
||||
* 产品里程碑状态-进行中
|
||||
*/
|
||||
public final static String PRODUCT_PLAN_IN_PROGRESS_STATUS_NAME = "进行中";
|
||||
/**
|
||||
* 产品计划状态-已过期
|
||||
* 产品里程碑状态-已过期
|
||||
*/
|
||||
public final static String PRODUCT_PLAN_EXPIRED_STATUS_NAME = "已过期";
|
||||
/**
|
||||
* 产品计划状态-已完成
|
||||
* 产品里程碑状态-已完成
|
||||
*/
|
||||
public final static String PRODUCT_PLAN_COMPLETED_STATUS_NAME = "已完成";
|
||||
/**
|
||||
* 产品计划状态-已关闭
|
||||
* 产品里程碑状态-已关闭
|
||||
*/
|
||||
public final static String PRODUCT_PLAN_CLOSED_STATUS_NAME = "已关闭";
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue