Browse Source

feat(all): 修改价格体系多版本维护问题

1 增加历史版本页面生效状态
dist.1.3.0
zhaoqiaobo 8 months ago
parent
commit
a379d9afbf
  1. 3
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataPricePageVO.java
  2. 13
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java

3
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataPricePageVO.java

@ -57,6 +57,9 @@ public class BasicdataPricePageVO implements Serializable {
@ApiModelProperty(value = "维护状态") @ApiModelProperty(value = "维护状态")
private String maintenanceStatus; private String maintenanceStatus;
@ApiModelProperty(value = "生效状态")
private String effectiveStatus;
@ApiModelProperty(value = "修改时间") @ApiModelProperty(value = "修改时间")
private String updateTime; private String updateTime;

13
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java

@ -180,11 +180,22 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
if (CollUtil.isNotEmpty(basicdataPriceVOS)) { if (CollUtil.isNotEmpty(basicdataPriceVOS)) {
for (BasicdataPricePageVO basicdataPriceVO : basicdataPriceVOS) { for (BasicdataPricePageVO basicdataPriceVO : basicdataPriceVOS) {
// 维护状态 // 维护状态
DateTime now = DateUtil.date();
if (ObjectUtil.isNotEmpty(basicdataPriceVO.getExpiryTime())) { if (ObjectUtil.isNotEmpty(basicdataPriceVO.getExpiryTime())) {
DateTime now = DateUtil.date();
if (now.isAfter(basicdataPriceVO.getExpiryTime())) { if (now.isAfter(basicdataPriceVO.getExpiryTime())) {
// 已到期 // 已到期
basicdataPriceVO.setMaintenanceStatus("已过期"); basicdataPriceVO.setMaintenanceStatus("已过期");
basicdataPriceVO.setEffectiveStatus("已失效");
}
}
if (ObjectUtil.isNotEmpty(basicdataPriceVO.getEffectiveTime())) {
if (now.isBefore(basicdataPriceVO.getEffectiveTime())) {
basicdataPriceVO.setEffectiveStatus("待生效");
}
}
if (ObjectUtil.isAllNotEmpty(basicdataPriceVO.getEffectiveTime(), basicdataPriceVO.getExpiryTime())) {
if (now.isIn(basicdataPriceVO.getEffectiveTime(), basicdataPriceVO.getExpiryTime())) {
basicdataPriceVO.setEffectiveStatus("生效中");
} }
} }
// 服务类型 // 服务类型

Loading…
Cancel
Save