Browse Source

日常维护新增站点

zhongwei
段飞宇 1 year ago
parent
commit
e4001ad418
  1. 6
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/entity/OperMaintenancePlanEntity.java
  2. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/dto/OperMaintenanceMonitorReportMonthDTO.java
  3. 7
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceMonitorServiceImpl.java
  4. 1
      hzims-service/operational/src/main/resources/db/1.0.1.sql

6
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/entity/OperMaintenancePlanEntity.java

@ -108,4 +108,10 @@ public class OperMaintenancePlanEntity extends TenantEntity {
@JsonSerialize(nullsUsing = NullSerializer.class)
private Long messageTemplateId;
/**
* 站点code
*/
private String stationCode;
}

5
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/dto/OperMaintenanceMonitorReportMonthDTO.java

@ -24,4 +24,9 @@ public class OperMaintenanceMonitorReportMonthDTO implements Serializable {
@ApiModelProperty(value = "月", required = true)
private Integer month;
/**
* 站点code
*/
private String stationCode;
}

7
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceMonitorServiceImpl.java

@ -12,6 +12,7 @@ import com.hnac.hzims.operational.maintenance.mapper.OperMaintenanceTaskMapper;
import com.hnac.hzims.operational.maintenance.service.IOperMaintenanceMonitorService;
import com.hnac.hzims.operational.maintenance.vo.OperMaintenancePlanVO;
import com.hnac.hzims.operational.maintenance.wrapper.OperMaintenancePlanWrapper;
import org.apache.commons.lang3.StringUtils;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.*;
import org.springblade.system.user.cache.UserCache;
@ -48,7 +49,8 @@ public class OperMaintenanceMonitorServiceImpl implements IOperMaintenanceMonito
// Date startTime = DateUtil.parse(DateUtil.format(DateUtil.now(), "yyyy-MM") + "-01", DateUtil.PATTERN_DATE);
eq(OperMaintenancePlanEntity::getIsDeleted, 0L);
ge(OperMaintenancePlanEntity::getDisposeTime, startDate);
lt(OperMaintenancePlanEntity::getDisposeTime, startDate.with(TemporalAdjusters.lastDayOfMonth()));
lt(OperMaintenancePlanEntity::getDisposeTime, startDate.with(TemporalAdjusters.lastDayOfMonth()))
.eq(StringUtils.isNoneBlank(req.getStationCode()), OperMaintenancePlanEntity::getStationCode, req.getStationCode());
}});
//获取列表班次ID集合
@ -73,8 +75,7 @@ public class OperMaintenanceMonitorServiceImpl implements IOperMaintenanceMonito
if (ObjectUtil.isNotEmpty(planEntity.getImsDutyClassId())) {
//类型为班次时 获取班次名称
planVO.setDutyClassName(finalClassMap.get(planEntity.getImsDutyClassId()).get(0).getClassName());
}
else if(ObjectUtil.isNotEmpty(planEntity.getDisposer())) {
} else if (ObjectUtil.isNotEmpty(planEntity.getDisposer())) {
//类型为人员类型时 获取执行人名称
planVO.setDisposerName(Optional.ofNullable(UserCache.getUser(planEntity.getDisposer())).map(User::getName).orElse(null));
}

1
hzims-service/operational/src/main/resources/db/1.0.1.sql

@ -0,0 +1 @@
alter table hzims_oper_maintenance_plan add station_code varchar(60) comment '站点编码'
Loading…
Cancel
Save