Browse Source

#流程统计修改

zhongwei
yang_shj 1 year ago
parent
commit
261a0aa07b
  1. 2
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/constants/AbnormalAlarmConstant.java
  2. 5
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/StationEntity.java
  3. 6
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/impl/MaintenanceServiceImpl.java

2
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/constants/AbnormalAlarmConstant.java

@ -23,7 +23,7 @@ public interface AbnormalAlarmConstant {
/**故障**/
String FAULT = "3";
/**预警**/
Long EARLY_WARNING = 20L;

5
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/StationEntity.java

@ -173,4 +173,9 @@ public class StationEntity extends TenantEntity implements Serializable {
@QueryField(condition = SqlCondition.EQUAL)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Boolean isAbroad;
@ApiModelProperty("所属国家")
@QueryField(condition = SqlCondition.EQUAL)
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String refCountry;
}

6
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/impl/MaintenanceServiceImpl.java

@ -156,7 +156,7 @@ public class MaintenanceServiceImpl extends BaseServiceImpl<MaintenanceMapper, O
e.printStackTrace();
}
}
/**
* 开启一个流程实例
**/
@ -247,7 +247,7 @@ public class MaintenanceServiceImpl extends BaseServiceImpl<MaintenanceMapper, O
}
// 日常维护完成数
maintainVo.setMaintain(maintainList.size());
List<Long> maintainFinish = maintainList.stream().filter(o-> Func.isNotEmpty(o.getStatus()) && MaintenanceConstant.TASK_STATUS_5 == o.getStatus())
List<Long> maintainFinish = maintainList.stream().filter(o-> "结束".equals(o.getFlowTaskName()))
.map(OperMaintenanceTaskEntity::getId).collect(Collectors.toList());
if(CollectionUtil.isEmpty(maintainFinish)){
maintainVo.setMaintainFinish(0);
@ -281,7 +281,7 @@ public class MaintenanceServiceImpl extends BaseServiceImpl<MaintenanceMapper, O
regularWorkVO.setMainTaskIds(regularWorkList.stream().map(OperMaintenanceTaskEntity::getId).map(Object::toString).collect(Collectors.joining(",")));
regularWorkVO.setRegularWorkSum(regularWorkList.size());
// 定期工作任务完成数量
List<OperMaintenanceTaskEntity> regularWorkFinishList = regularWorkList.stream().filter(o -> MaintenanceConstant.TASK_STATUS_5 == o.getStatus()).collect(Collectors.toList());
List<OperMaintenanceTaskEntity> regularWorkFinishList = regularWorkList.stream().filter(o -> "结束".equals(o.getFlowTaskName())).collect(Collectors.toList());
if (CollectionUtil.isEmpty(regularWorkFinishList)) {
regularWorkVO.setRegularWork(0);
return regularWorkVO;

Loading…
Cancel
Save