Browse Source

#日常维护任务派发定时任务

zhongwei
yang_shj 1 year ago
parent
commit
fae4de653e
  1. 0
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/vo/OperMaintenanceTaskEntityVo.java
  2. 8
      hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/task/TaskContants.java
  3. 11
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/operation/MaintenancePlanMapper.java
  4. 21
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/BusinessScheduledTask.java
  5. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/MonitorScheduledTask.java
  6. 3
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java
  7. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/ReportScheduledTask.java
  8. 3
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/ShowScheduledTask.java
  9. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/inspect/impl/TaskServiceImpl.java
  10. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/alarm/AbnormalAlarmService.java
  11. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/alarm/RecordService.java
  12. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/alarm/impl/AbnormalAlarmServiceImpl.java
  13. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/alarm/impl/RecordServiceImpl.java
  14. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/AccessService.java
  15. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/DefectService.java
  16. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/DutyMainService.java
  17. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/DutyService.java
  18. 11
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/MaintenancePlanService.java
  19. 5
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/MaintenanceService.java
  20. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/PhenomenonService.java
  21. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/impl/AccessServiceImpl.java
  22. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/impl/DefectServiceImpl.java
  23. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/impl/DutyMainServiceImpl.java
  24. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/impl/DutyServiceImpl.java
  25. 19
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/impl/MaintenancePlanServiceImpl.java
  26. 294
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/impl/MaintenanceServiceImpl.java
  27. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/impl/PhenomenonServiceImpl.java
  28. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/GenerateService.java
  29. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/OtherService.java
  30. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/OverDetailsService.java
  31. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/OverService.java
  32. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/PowerService.java
  33. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/SolveService.java
  34. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/UseService.java
  35. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/impl/GenerateServiceImpl.java
  36. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/impl/OtherServiceImpl.java
  37. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/impl/OverDetailsServiceImpl.java
  38. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/impl/OverServiceImpl.java
  39. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/impl/PowerServiceImpl.java
  40. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/impl/SolveServiceImpl.java
  41. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/impl/UseServiceImpl.java
  42. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/ModelStationService.java
  43. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/RealTargetService.java
  44. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/ShowService.java
  45. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/ModelStationServiceImpl.java
  46. 11
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java
  47. 8
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/ShowServiceImpl.java
  48. 124
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/MaintenanceServiceImpl.java
  49. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/monitor/MonitorService.java
  50. 9
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/monitor/impl/MonitorServiceImpl.java
  51. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/plate/DataService.java
  52. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/plate/impl/DataServiceImpl.java
  53. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/report/ReportService.java
  54. 8
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/report/impl/ReportServiceImpl.java
  55. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/station/StationAttrConfigService.java
  56. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/station/StationAttributeService.java
  57. 2
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/station/StationService.java
  58. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/station/impl/StationAttrConfigServiceImpl.java
  59. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/station/impl/StationAttributeServiceImpl.java
  60. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/station/impl/StationServiceImpl.java
  61. 5
      hzims-service/hzims-scheduled/src/main/resources/mapper/operation/MaintenancePlanMapper.xml
  62. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/WindHomeServiceImpl.java
  63. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskCreateTask.java

0
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/vo/OperMaintenanceTaskEntityVo.java → hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/vo/OperMaintenanceTaskEntityVo.java

8
hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/task/TaskContants.java

@ -5,18 +5,18 @@ package com.hnac.hzinfo.inspect.task;
import lombok.Getter; import lombok.Getter;
import java.util.HashSet;
import java.util.Set;
/** /**
* @author ninglong * @author ninglong
* *
*/ */
public interface TaskContants { public interface TaskContants {
// 巡检任务派发 定时任务 // 巡检任务派发
String INSPECT_TASK_DISTRIBUTE = "taskJobDistribute"; String INSPECT_TASK_DISTRIBUTE = "taskJobDistribute";
// 日常维护任务派发
String MAINTENANCE_TASK_DISTRIBUTE = "maintenanceTaskDistribute";
/** /**
* 处理同时开启几个任务的 * 处理同时开启几个任务的
*/ */

11
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/operation/MaintenancePlanMapper.java

@ -0,0 +1,11 @@
package com.hnac.hzims.scheduled.mapper.operation;
import com.hnac.hzims.operational.maintenance.entity.OperMaintenancePlanEntity;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
/**
* @author ysj
*/
public interface MaintenancePlanMapper extends UserDataScopeBaseMapper<OperMaintenancePlanEntity> {
}

21
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/BusinessScheduledTask.java

@ -1,6 +1,7 @@
package com.hnac.hzims.scheduled.scheduled; package com.hnac.hzims.scheduled.scheduled;
import com.hnac.hzims.scheduled.service.inspect.TaskService; import com.hnac.hzims.scheduled.service.inspect.TaskService;
import com.hnac.hzims.scheduled.service.operation.business.MaintenanceService;
import com.xxl.job.core.biz.model.ReturnT; import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob; import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -9,8 +10,7 @@ import org.springblade.core.tool.utils.Func;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.Date; import java.util.Date;
import static com.hnac.hzinfo.inspect.task.TaskContants.*;
import static com.hnac.hzinfo.inspect.task.TaskContants.INSPECT_TASK_DISTRIBUTE;
/** /**
@ -24,8 +24,10 @@ public class BusinessScheduledTask {
@Autowired @Autowired
private TaskService service; private TaskService service;
private MaintenanceService maintenanceService;
/** /**
* 首页-指标数据加载 * 巡检任务派发 : 一分钟执行一次
*/ */
@XxlJob(INSPECT_TASK_DISTRIBUTE) @XxlJob(INSPECT_TASK_DISTRIBUTE)
//@Scheduled(cron = "0/40 * * * * ? ") //@Scheduled(cron = "0/40 * * * * ? ")
@ -37,4 +39,17 @@ public class BusinessScheduledTask {
return new ReturnT<>("SUCCESS"); return new ReturnT<>("SUCCESS");
} }
/**
* 巡检任务派发 : 一天执行一次 凌晨0时执行
*/
@XxlJob(MAINTENANCE_TASK_DISTRIBUTE)
//@Scheduled(cron = "0/40 * * * * ? ")
public ReturnT<String> maintenanceTaskDistribute(String param) {
if (Func.isBlank(param)) {
param = DateUtil.format(new Date(), "yyyy-MM");
}
maintenanceService.maintenanceTaskDistribute(param);
return new ReturnT<>("SUCCESS");
}
} }

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/MonitorScheduledTask.java

@ -1,6 +1,6 @@
package com.hnac.hzims.scheduled.scheduled; package com.hnac.hzims.scheduled.scheduled;
import com.hnac.hzims.scheduled.service.operation.MonitorService; import com.hnac.hzims.scheduled.service.operation.monitor.MonitorService;
import com.xxl.job.core.biz.model.ReturnT; import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob; import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;

3
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/RealTargetScheduledTask.java

@ -1,14 +1,13 @@
package com.hnac.hzims.scheduled.scheduled; package com.hnac.hzims.scheduled.scheduled;
import com.hnac.hzims.operational.main.constant.HomePageConstant; import com.hnac.hzims.operational.main.constant.HomePageConstant;
import com.hnac.hzims.scheduled.service.operation.RealTargetService; import com.hnac.hzims.scheduled.service.operation.home.RealTargetService;
import com.xxl.job.core.biz.model.ReturnT; import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob; import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.Func;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.Arrays; import java.util.Arrays;

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/ReportScheduledTask.java

@ -1,6 +1,6 @@
package com.hnac.hzims.scheduled.scheduled; package com.hnac.hzims.scheduled.scheduled;
import com.hnac.hzims.scheduled.service.operation.ReportService; import com.hnac.hzims.scheduled.service.operation.report.ReportService;
import com.xxl.job.core.biz.model.ReturnT; import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob; import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;

3
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/scheduled/ShowScheduledTask.java

@ -1,13 +1,12 @@
package com.hnac.hzims.scheduled.scheduled; package com.hnac.hzims.scheduled.scheduled;
import com.hnac.hzims.scheduled.service.operation.ShowService; import com.hnac.hzims.scheduled.service.operation.home.ShowService;
import com.xxl.job.core.biz.model.ReturnT; import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob; import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.Func;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.Date; import java.util.Date;

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/inspect/impl/TaskServiceImpl.java

@ -12,7 +12,7 @@ import com.google.common.collect.Lists;
import com.hnac.hzims.operational.duty.vo.ImsDutyMainFeignVO; import com.hnac.hzims.operational.duty.vo.ImsDutyMainFeignVO;
import com.hnac.hzims.scheduled.mapper.inspect.TaskMapper; import com.hnac.hzims.scheduled.mapper.inspect.TaskMapper;
import com.hnac.hzims.scheduled.service.inspect.*; import com.hnac.hzims.scheduled.service.inspect.*;
import com.hnac.hzims.scheduled.service.operation.DutyMainService; import com.hnac.hzims.scheduled.service.operation.business.DutyMainService;
import com.hnac.hzinfo.inspect.obj.entity.*; import com.hnac.hzinfo.inspect.obj.entity.*;
import com.hnac.hzinfo.inspect.plan.PlanContants; import com.hnac.hzinfo.inspect.plan.PlanContants;
import com.hnac.hzinfo.inspect.plan.entity.*; import com.hnac.hzinfo.inspect.plan.entity.*;

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/AbnormalAlarmService.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/alarm/AbnormalAlarmService.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation; package com.hnac.hzims.scheduled.service.operation.alarm;
import com.hnac.hzims.operational.alert.entity.AbnormalAlarmEntity; import com.hnac.hzims.operational.alert.entity.AbnormalAlarmEntity;
import org.springblade.core.mp.base.BaseService; import org.springblade.core.mp.base.BaseService;

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/RecordService.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/alarm/RecordService.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation; package com.hnac.hzims.scheduled.service.operation.alarm;
import com.hnac.hzims.operational.config.entity.StAlarmRecordEntity; import com.hnac.hzims.operational.config.entity.StAlarmRecordEntity;

4
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/AbnormalAlarmServiceImpl.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/alarm/impl/AbnormalAlarmServiceImpl.java

@ -1,8 +1,8 @@
package com.hnac.hzims.scheduled.service.operation.impl; package com.hnac.hzims.scheduled.service.operation.alarm.impl;
import com.hnac.hzims.operational.alert.entity.AbnormalAlarmEntity; import com.hnac.hzims.operational.alert.entity.AbnormalAlarmEntity;
import com.hnac.hzims.scheduled.mapper.operation.AbnormalAlarmMapper; import com.hnac.hzims.scheduled.mapper.operation.AbnormalAlarmMapper;
import com.hnac.hzims.scheduled.service.operation.AbnormalAlarmService; import com.hnac.hzims.scheduled.service.operation.alarm.AbnormalAlarmService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;

4
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/RecordServiceImpl.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/alarm/impl/RecordServiceImpl.java

@ -1,8 +1,8 @@
package com.hnac.hzims.scheduled.service.operation.impl; package com.hnac.hzims.scheduled.service.operation.alarm.impl;
import com.hnac.hzims.operational.config.entity.StAlarmRecordEntity; import com.hnac.hzims.operational.config.entity.StAlarmRecordEntity;
import com.hnac.hzims.scheduled.mapper.operation.RecordMapper; import com.hnac.hzims.scheduled.mapper.operation.RecordMapper;
import com.hnac.hzims.scheduled.service.operation.RecordService; import com.hnac.hzims.scheduled.service.operation.alarm.RecordService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/AccessService.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/AccessService.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation; package com.hnac.hzims.scheduled.service.operation.business;
import com.hnac.hzims.operational.access.entity.OperAccessTaskEntity; import com.hnac.hzims.operational.access.entity.OperAccessTaskEntity;
import com.hnac.hzims.operational.main.vo.OverhaulVo; import com.hnac.hzims.operational.main.vo.OverhaulVo;

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/DefectService.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/DefectService.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation; package com.hnac.hzims.scheduled.service.operation.business;
import com.hnac.hzims.operational.defect.entity.OperDefectEntity; import com.hnac.hzims.operational.defect.entity.OperDefectEntity;
import org.springblade.core.mp.base.BaseService; import org.springblade.core.mp.base.BaseService;

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/DutyMainService.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/DutyMainService.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation; package com.hnac.hzims.scheduled.service.operation.business;
import com.hnac.hzims.operational.duty.entity.ImsDutyMainEntity; import com.hnac.hzims.operational.duty.entity.ImsDutyMainEntity;
import com.hnac.hzims.operational.duty.vo.ImsDutyMainFeignVO; import com.hnac.hzims.operational.duty.vo.ImsDutyMainFeignVO;

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/DutyService.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/DutyService.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation; package com.hnac.hzims.scheduled.service.operation.business;
import com.hnac.hzims.operational.duty.entity.ImsDutyMainEntity; import com.hnac.hzims.operational.duty.entity.ImsDutyMainEntity;
import com.hnac.hzims.operational.duty.vo.DutyInfoVo; import com.hnac.hzims.operational.duty.vo.DutyInfoVo;

11
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/MaintenancePlanService.java

@ -0,0 +1,11 @@
package com.hnac.hzims.scheduled.service.operation.business;
import com.hnac.hzims.operational.maintenance.entity.OperMaintenancePlanEntity;
import org.springblade.core.mp.base.BaseService;
/**
* @author ysj
*/
public interface MaintenancePlanService extends BaseService<OperMaintenancePlanEntity> {
}

5
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/MaintenanceService.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/MaintenanceService.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation; package com.hnac.hzims.scheduled.service.operation.business;
import com.hnac.hzims.operational.main.vo.MaintainVo; import com.hnac.hzims.operational.main.vo.MaintainVo;
import com.hnac.hzims.operational.main.vo.RegularWorkVO; import com.hnac.hzims.operational.main.vo.RegularWorkVO;
@ -13,7 +13,8 @@ import java.util.List;
*/ */
public interface MaintenanceService extends BaseService<OperMaintenanceTaskEntity> { public interface MaintenanceService extends BaseService<OperMaintenanceTaskEntity> {
// 查询当年日常维护数量 void maintenanceTaskDistribute(String param);
Integer maintenanceCount(List<Long> areas); Integer maintenanceCount(List<Long> areas);
MaintainVo maintain(String start, String end, List<Long> areas); MaintainVo maintain(String start, String end, List<Long> areas);

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/PhenomenonService.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/PhenomenonService.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation; package com.hnac.hzims.scheduled.service.operation.business;
import com.hnac.hzims.operational.defect.entity.OperPhenomenonEntity; import com.hnac.hzims.operational.defect.entity.OperPhenomenonEntity;
import com.hnac.hzims.operational.main.vo.ShortagesVo; import com.hnac.hzims.operational.main.vo.ShortagesVo;

4
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/AccessServiceImpl.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/impl/AccessServiceImpl.java

@ -1,11 +1,11 @@
package com.hnac.hzims.scheduled.service.operation.impl; package com.hnac.hzims.scheduled.service.operation.business.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hnac.hzims.operational.access.constants.AccessConstants; import com.hnac.hzims.operational.access.constants.AccessConstants;
import com.hnac.hzims.operational.access.entity.OperAccessTaskEntity; import com.hnac.hzims.operational.access.entity.OperAccessTaskEntity;
import com.hnac.hzims.operational.main.vo.OverhaulVo; import com.hnac.hzims.operational.main.vo.OverhaulVo;
import com.hnac.hzims.scheduled.mapper.operation.AccessMapper; import com.hnac.hzims.scheduled.mapper.operation.AccessMapper;
import com.hnac.hzims.scheduled.service.operation.AccessService; import com.hnac.hzims.scheduled.service.operation.business.AccessService;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;

4
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/DefectServiceImpl.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/impl/DefectServiceImpl.java

@ -1,9 +1,9 @@
package com.hnac.hzims.scheduled.service.operation.impl; package com.hnac.hzims.scheduled.service.operation.business.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hnac.hzims.operational.defect.entity.OperDefectEntity; import com.hnac.hzims.operational.defect.entity.OperDefectEntity;
import com.hnac.hzims.scheduled.mapper.operation.DefectMapper; import com.hnac.hzims.scheduled.mapper.operation.DefectMapper;
import com.hnac.hzims.scheduled.service.operation.DefectService; import com.hnac.hzims.scheduled.service.operation.business.DefectService;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.CollectionUtil;

4
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/DutyMainServiceImpl.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/impl/DutyMainServiceImpl.java

@ -1,10 +1,10 @@
package com.hnac.hzims.scheduled.service.operation.impl; package com.hnac.hzims.scheduled.service.operation.business.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hnac.hzims.operational.duty.entity.ImsDutyMainEntity; import com.hnac.hzims.operational.duty.entity.ImsDutyMainEntity;
import com.hnac.hzims.operational.duty.vo.ImsDutyMainFeignVO; import com.hnac.hzims.operational.duty.vo.ImsDutyMainFeignVO;
import com.hnac.hzims.scheduled.mapper.operation.DutyMainMapper; import com.hnac.hzims.scheduled.mapper.operation.DutyMainMapper;
import com.hnac.hzims.scheduled.service.operation.DutyMainService; import com.hnac.hzims.scheduled.service.operation.business.DutyMainService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.core.tool.utils.ObjectUtil;

4
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/DutyServiceImpl.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/impl/DutyServiceImpl.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation.impl; package com.hnac.hzims.scheduled.service.operation.business.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hnac.hzims.operational.duty.entity.ImsDutyGroupEntity; import com.hnac.hzims.operational.duty.entity.ImsDutyGroupEntity;
@ -10,7 +10,7 @@ import com.hnac.hzims.operational.duty.vo.NextDutyInfoVo;
import com.hnac.hzims.scheduled.mapper.operation.DutyGroupMapper; import com.hnac.hzims.scheduled.mapper.operation.DutyGroupMapper;
import com.hnac.hzims.scheduled.mapper.operation.DutyMapper; import com.hnac.hzims.scheduled.mapper.operation.DutyMapper;
import com.hnac.hzims.scheduled.mapper.operation.DutyPersonMapper; import com.hnac.hzims.scheduled.mapper.operation.DutyPersonMapper;
import com.hnac.hzims.scheduled.service.operation.DutyService; import com.hnac.hzims.scheduled.service.operation.business.DutyService;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;

19
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/impl/MaintenancePlanServiceImpl.java

@ -0,0 +1,19 @@
package com.hnac.hzims.scheduled.service.operation.business.impl;
import com.hnac.hzims.operational.maintenance.entity.OperMaintenancePlanEntity;
import com.hnac.hzims.scheduled.mapper.operation.MaintenancePlanMapper;
import com.hnac.hzims.scheduled.service.operation.business.MaintenancePlanService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
/**
* @author ysj
*/
@Service
@AllArgsConstructor
@Slf4j
public class MaintenancePlanServiceImpl extends BaseServiceImpl<MaintenancePlanMapper, OperMaintenancePlanEntity> implements MaintenancePlanService {
}

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

@ -0,0 +1,294 @@
package com.hnac.hzims.scheduled.service.operation.business.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hnac.hzims.message.dto.PlanMsgRecordDto;
import com.hnac.hzims.message.entity.config.MessageTemplateEntity;
import com.hnac.hzims.message.fegin.IMessageClient;
import com.hnac.hzims.operational.duty.entity.ImsDutyMainEntity;
import com.hnac.hzims.operational.main.vo.MaintainVo;
import com.hnac.hzims.operational.main.vo.RegularWorkVO;
import com.hnac.hzims.operational.maintenance.constants.MaintenanceConstant;
import com.hnac.hzims.operational.maintenance.entity.OperMaintenancePlanEntity;
import com.hnac.hzims.operational.maintenance.entity.OperMaintenanceTaskEntity;
import com.hnac.hzims.operational.maintenance.vo.OperMaintenanceTaskEntityVo;
import com.hnac.hzims.scheduled.mapper.operation.MaintenanceMapper;
import com.hnac.hzims.scheduled.service.operation.business.MaintenancePlanService;
import com.hnac.hzims.scheduled.service.operation.business.MaintenanceService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.*;
import org.springblade.flow.core.feign.IFlowClient;
import org.springframework.beans.BeanUtils;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.stereotype.Service;
import org.springframework.transaction.TransactionDefinition;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.support.DefaultTransactionDefinition;
import java.beans.Transient;
import java.time.*;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static org.springblade.core.tool.utils.DateUtil.PATTERN_DATE;
/**
* @author ysj
*/
@Service
@RequiredArgsConstructor
@Slf4j
public class MaintenanceServiceImpl extends BaseServiceImpl<MaintenanceMapper, OperMaintenanceTaskEntity> implements MaintenanceService {
private final MaintenancePlanService planService;
private final DutyMainServiceImpl dutyMainService;
private final IFlowClient flowClient;
private final IMessageClient messageClient;
private final DataSourceTransactionManager manager;
private final ThreadPoolExecutor executor;
/**
* 日常维护任务派发
* @param param
*/
@Override
@Transient
public void maintenanceTaskDistribute(String param) {
// 开始时间
Date start = DateUtil.parse(DateUtil.formatDate(DateUtil.now()), DateUtil.PATTERN_DATE);
// 结束时间
Date end = DateUtil.parse(DateUtil.formatDate(DateUtil.plusDays(start, 1)), DateUtil.PATTERN_DATE);
// 查询日常维护计划
List<OperMaintenancePlanEntity> plans = planService.list(Wrappers.<OperMaintenancePlanEntity>lambdaQuery()
.ge(OperMaintenancePlanEntity::getDisposeTime,start)
.lt(OperMaintenancePlanEntity::getDisposeTime,end)
.isNotNull(OperMaintenancePlanEntity::getCreateTaskTime)
);
// 遍历计划列表生成相应任务
if(CollectionUtil.isEmpty(plans)){
return;
}
plans.forEach(plan -> {
// 生成日常任务对象
OperMaintenanceTaskEntity task = BeanUtil.copy(plan,OperMaintenanceTaskEntity.class);
if(StringUtil.isEmpty(task.getEmCode())){
this.taskDistribute(task,plan);
}else{
for (String code : plan.getEmCode().split(",")) {
task.setEmCode(code);
this.taskDistribute(task,plan);
}
}
});
}
/**
* 日常维护任务派发
* @param task
* @param plan
*/
private void taskDistribute(OperMaintenanceTaskEntity task, OperMaintenancePlanEntity plan) {
DefaultTransactionDefinition defaultTransactionDefinition = new DefaultTransactionDefinition();
defaultTransactionDefinition.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRES_NEW);
TransactionStatus transaction = manager.getTransaction(defaultTransactionDefinition);
task.setId(null);
task.setCreateTime(new Date());
task.setUpdateTime(new Date());
task.setPlanId(plan.getId());
task.setTaskCode(UUID.randomUUID().toString());
if (task.getRefLibraryId() != 0) {
task.setCreateTime(DateUtil.now());
}
if(ObjectUtil.isNotEmpty(plan.getDisposer())){
task.setDisposer(plan.getDisposer().toString());
}
//补充计划结束时间
Instant instant = task.getDisposeTime().toInstant();
ZoneId zoneId = ZoneId.systemDefault();
LocalDateTime disposeTime = instant.atZone(zoneId).toLocalDateTime();
task.setPlanEndTime(disposeTime.plusHours(task.getHours()));
//获取值班人员
if (ObjectUtil.isNotEmpty(plan.getMaintenanceModel()) && plan.getMaintenanceModel() == 2) {
//查询值班信息
LambdaQueryWrapper<ImsDutyMainEntity> dutyWrapper = new LambdaQueryWrapper<>();
dutyWrapper.eq(ImsDutyMainEntity::getDutyDate, DateTimeFormatter.ofPattern(PATTERN_DATE).format(disposeTime));
dutyWrapper.eq(ImsDutyMainEntity::getClassId, plan.getImsDutyClassId());
ImsDutyMainEntity entity = dutyMainService.getOne(dutyWrapper);
if (ObjectUtil.isEmpty(entity) || StringUtils.isEmpty(entity.getDutyPersonIds())) {
log.error("计划ID为:{}未查询到排班记录", plan.getId());
return;
}
String userId = entity.getDutyPersonIds();
task.setDisposer(userId.replaceAll("\\^", ","));
}
this.save(task);
// 事务提交
manager.commit(transaction);
//启动流程
String processInstanceId = this.startProcess(plan.getProcDefId(), task);
//推送消息
CompletableFuture<Void> operMaintenanceTaskEntityCompletableFuture =
CompletableFuture.runAsync(() -> {
task.setProcessInstanceId(processInstanceId);
this.updateById(task);
plan.setCreateTaskTime(new Date());
planService.updateById(plan);
//推送消息
this.pushTaskMessage(task.getId());
}, executor);
//启动队列
try {
CompletableFuture.allOf(operMaintenanceTaskEntityCompletableFuture).get();
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 开启一个流程实例
**/
private String startProcess(String processDefinitionKey, OperMaintenanceTaskEntity taskEntity) {
OperMaintenanceTaskEntityVo operMaintenanceTaskEntityVo = new OperMaintenanceTaskEntityVo();
BeanUtils.copyProperties(taskEntity, operMaintenanceTaskEntityVo);
Map<String, Object> params = new HashMap<>();
params.put("taskId", taskEntity.getId());
List<String> userIdList = Stream.of(taskEntity.getDisposer().split(",")).collect(Collectors.toList());
String taskUsers = userIdList.stream().filter(StringUtils::isNotBlank).map("taskUser_"::concat).collect(Collectors.joining(","));
params.put("initUserIds", taskUsers);
params.put("operMaintenanceTaskEntityVo", operMaintenanceTaskEntityVo);
return flowClient.startProcessInstanceContainNameByKey(processDefinitionKey, String.valueOf(taskEntity.getId()), taskEntity.getTitle(), params).getData().getProcessInstanceId();
}
/**
* 推送消息
*/
private void pushTaskMessage(Long taskId) {
OperMaintenanceTaskEntity task = this.getById(taskId);
if(ObjectUtil.isEmpty(task)){
return;
}
// 根据消息模板Id查询模板
R<MessageTemplateEntity> result = messageClient.getMsgTemplateById(task.getMessageTemplateId());
if (result.isSuccess() && ObjectUtil.isNotEmpty(result.getData())) {
Func.toLongList(",", task.getDisposer()).forEach(userId -> {
//推送消息
ZoneId zoneId = ZoneId.systemDefault();
PlanMsgRecordDto msg = new PlanMsgRecordDto();
msg.setTemplateId(task.getMessageTemplateId());
msg.setCreateUser(task.getCreateUser());
msg.setPlanTime(LocalDateTime.ofInstant(task.getDisposeTime().toInstant(), zoneId));
msg.setTaskId(task.getId());
msg.setDeptId(task.getCreateDept());
msg.setReceiver(userId);
msg.setContent("距离任务执行时间已不满一小时,请及时处理");
messageClient.planSendMessage(msg);
});
}
}
/**
* 获取日常维护数量
* @param departList
* @return
*/
@Override
public Integer maintenanceCount(List<Long> departList) {
if(CollectionUtil.isEmpty(departList)){
return 0;
}
LocalDate firstDay = LocalDate.now().withDayOfYear(1);
LocalDateTime firstDateTime = LocalDateTime.of(firstDay, LocalTime.MIN);
LocalDateTime now = LocalDateTime.now();
//日常维护
List<OperMaintenanceTaskEntity> mTaskList = this.list(new LambdaQueryWrapper<OperMaintenanceTaskEntity>(){{
ge(OperMaintenanceTaskEntity::getDisposeTime,firstDateTime);
le(OperMaintenanceTaskEntity::getDisposeTime,now);
in(OperMaintenanceTaskEntity::getCreateDept,departList);
}});
if(CollectionUtil.isEmpty(mTaskList)){
return 0;
}
return mTaskList.size();
}
/**
* 时间区间机构的日常维护数据查询
* @param start
* @param end
* @param areas
* @return
*/
@Override
public MaintainVo maintain(String start, String end, List<Long> areas) {
MaintainVo maintainVo = new MaintainVo();
//日常维护
List<OperMaintenanceTaskEntity> maintainList = this.list(new LambdaQueryWrapper<OperMaintenanceTaskEntity>(){{
ge(OperMaintenanceTaskEntity::getDisposeTime,start);
le(OperMaintenanceTaskEntity::getDisposeTime,end);
in(OperMaintenanceTaskEntity::getCreateDept,areas);
}});
if(CollectionUtil.isEmpty(maintainList)){
maintainVo.setMaintain(0);
maintainVo.setMaintainFinish(0);
return maintainVo;
}
// 日常维护完成数
maintainVo.setMaintain(maintainList.size());
List<Long> maintainFinish = maintainList.stream().filter(o-> Func.isNotEmpty(o.getStatus()) && MaintenanceConstant.TASK_STATUS_5 == o.getStatus())
.map(OperMaintenanceTaskEntity::getId).collect(Collectors.toList());
if(CollectionUtil.isEmpty(maintainFinish)){
maintainVo.setMaintainFinish(0);
}
maintainVo.setMaintainFinish(maintainFinish.size());
return maintainVo;
}
/**
* 查询日常维护-定期工作类型数据
* @param start
* @param end
* @param areas
* @return
*/
@Override
public RegularWorkVO regularWork(Date start, Date end, List<Long> areas) {
RegularWorkVO regularWorkVO = new RegularWorkVO();
// 查询定期工作任务
List<OperMaintenanceTaskEntity> regularWorkList = this.list(new LambdaQueryWrapper<OperMaintenanceTaskEntity>() {{
ge(OperMaintenanceTaskEntity::getDisposeTime, start)
.le(OperMaintenanceTaskEntity::getDisposeTime, end)
.eq(OperMaintenanceTaskEntity::getTypeCode, "05")
.in(OperMaintenanceTaskEntity::getCreateDept, areas);
}});
if (CollectionUtil.isEmpty(regularWorkList)) {
regularWorkVO.setRegularWorkSum(0);
regularWorkVO.setRegularWork(0);
return regularWorkVO;
}
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());
if (CollectionUtil.isEmpty(regularWorkFinishList)) {
regularWorkVO.setRegularWork(0);
return regularWorkVO;
}
regularWorkVO.setRegularWork(regularWorkFinishList.size());
return regularWorkVO;
}
}

4
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/PhenomenonServiceImpl.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/business/impl/PhenomenonServiceImpl.java

@ -1,11 +1,11 @@
package com.hnac.hzims.scheduled.service.operation.impl; package com.hnac.hzims.scheduled.service.operation.business.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hnac.hzims.operational.defect.entity.OperPhenomenonEntity; import com.hnac.hzims.operational.defect.entity.OperPhenomenonEntity;
import com.hnac.hzims.operational.main.vo.ShortagesVo; import com.hnac.hzims.operational.main.vo.ShortagesVo;
import com.hnac.hzims.operational.report.vo.DutyDefectVO; import com.hnac.hzims.operational.report.vo.DutyDefectVO;
import com.hnac.hzims.scheduled.mapper.operation.PhenomenonMapper; import com.hnac.hzims.scheduled.mapper.operation.PhenomenonMapper;
import com.hnac.hzims.scheduled.service.operation.PhenomenonService; import com.hnac.hzims.scheduled.service.operation.business.PhenomenonService;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/GenerateService.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/GenerateService.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation; package com.hnac.hzims.scheduled.service.operation.fill;
import com.hnac.hzims.operational.fill.entity.GenerateEntity; import com.hnac.hzims.operational.fill.entity.GenerateEntity;
import com.hnac.hzims.operational.main.vo.GenerationPowerVo; import com.hnac.hzims.operational.main.vo.GenerationPowerVo;

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/OtherService.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/OtherService.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation; package com.hnac.hzims.scheduled.service.operation.fill;
import com.hnac.hzims.operational.fill.entity.OtherEntity; import com.hnac.hzims.operational.fill.entity.OtherEntity;
import org.springblade.core.mp.base.BaseService; import org.springblade.core.mp.base.BaseService;

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/OverDetailsService.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/OverDetailsService.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation; package com.hnac.hzims.scheduled.service.operation.fill;
import com.hnac.hzims.operational.fill.entity.OverDetailsEntity; import com.hnac.hzims.operational.fill.entity.OverDetailsEntity;

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/OverService.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/OverService.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation; package com.hnac.hzims.scheduled.service.operation.fill;
import com.hnac.hzims.operational.fill.entity.OverEntity; import com.hnac.hzims.operational.fill.entity.OverEntity;
import org.springblade.core.mp.base.BaseService; import org.springblade.core.mp.base.BaseService;

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/PowerService.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/PowerService.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation; package com.hnac.hzims.scheduled.service.operation.fill;
import com.hnac.hzims.operational.fill.entity.PowerEntity; import com.hnac.hzims.operational.fill.entity.PowerEntity;
import com.hnac.hzims.operational.main.vo.PowerMonthVo; import com.hnac.hzims.operational.main.vo.PowerMonthVo;

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/SolveService.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/SolveService.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation; package com.hnac.hzims.scheduled.service.operation.fill;
import com.hnac.hzims.operational.fill.entity.SolveEntity; import com.hnac.hzims.operational.fill.entity.SolveEntity;
import org.springblade.core.mp.base.BaseService; import org.springblade.core.mp.base.BaseService;

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/UseService.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/UseService.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation; package com.hnac.hzims.scheduled.service.operation.fill;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.operational.fill.entity.UseEntity; import com.hnac.hzims.operational.fill.entity.UseEntity;

4
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/GenerateServiceImpl.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/impl/GenerateServiceImpl.java

@ -1,11 +1,11 @@
package com.hnac.hzims.scheduled.service.operation.impl; package com.hnac.hzims.scheduled.service.operation.fill.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hnac.hzims.operational.fill.entity.GenerateEntity; import com.hnac.hzims.operational.fill.entity.GenerateEntity;
import com.hnac.hzims.operational.main.vo.GenerationPowerVo; import com.hnac.hzims.operational.main.vo.GenerationPowerVo;
import com.hnac.hzims.operational.main.vo.PowerMonthVo; import com.hnac.hzims.operational.main.vo.PowerMonthVo;
import com.hnac.hzims.scheduled.mapper.operation.GenerateMapper; import com.hnac.hzims.scheduled.mapper.operation.GenerateMapper;
import com.hnac.hzims.scheduled.service.operation.GenerateService; import com.hnac.hzims.scheduled.service.operation.fill.GenerateService;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;

4
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/OtherServiceImpl.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/impl/OtherServiceImpl.java

@ -1,8 +1,8 @@
package com.hnac.hzims.scheduled.service.operation.impl; package com.hnac.hzims.scheduled.service.operation.fill.impl;
import com.hnac.hzims.operational.fill.entity.OtherEntity; import com.hnac.hzims.operational.fill.entity.OtherEntity;
import com.hnac.hzims.scheduled.mapper.operation.OtherMapper; import com.hnac.hzims.scheduled.mapper.operation.OtherMapper;
import com.hnac.hzims.scheduled.service.operation.OtherService; import com.hnac.hzims.scheduled.service.operation.fill.OtherService;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;

4
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/OverDetailsServiceImpl.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/impl/OverDetailsServiceImpl.java

@ -1,8 +1,8 @@
package com.hnac.hzims.scheduled.service.operation.impl; package com.hnac.hzims.scheduled.service.operation.fill.impl;
import com.hnac.hzims.operational.fill.entity.OverDetailsEntity; import com.hnac.hzims.operational.fill.entity.OverDetailsEntity;
import com.hnac.hzims.scheduled.mapper.operation.OverDetailsMapper; import com.hnac.hzims.scheduled.mapper.operation.OverDetailsMapper;
import com.hnac.hzims.scheduled.service.operation.OverDetailsService; import com.hnac.hzims.scheduled.service.operation.fill.OverDetailsService;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;

4
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/OverServiceImpl.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/impl/OverServiceImpl.java

@ -1,8 +1,8 @@
package com.hnac.hzims.scheduled.service.operation.impl; package com.hnac.hzims.scheduled.service.operation.fill.impl;
import com.hnac.hzims.operational.fill.entity.OverEntity; import com.hnac.hzims.operational.fill.entity.OverEntity;
import com.hnac.hzims.scheduled.mapper.operation.OverMapper; import com.hnac.hzims.scheduled.mapper.operation.OverMapper;
import com.hnac.hzims.scheduled.service.operation.OverService; import com.hnac.hzims.scheduled.service.operation.fill.OverService;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;

4
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/PowerServiceImpl.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/impl/PowerServiceImpl.java

@ -1,10 +1,10 @@
package com.hnac.hzims.scheduled.service.operation.impl; package com.hnac.hzims.scheduled.service.operation.fill.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hnac.hzims.operational.fill.entity.PowerEntity; import com.hnac.hzims.operational.fill.entity.PowerEntity;
import com.hnac.hzims.operational.main.vo.PowerMonthVo; import com.hnac.hzims.operational.main.vo.PowerMonthVo;
import com.hnac.hzims.scheduled.mapper.operation.PowerMapper; import com.hnac.hzims.scheduled.mapper.operation.PowerMapper;
import com.hnac.hzims.scheduled.service.operation.PowerService; import com.hnac.hzims.scheduled.service.operation.fill.PowerService;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;

4
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/SolveServiceImpl.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/impl/SolveServiceImpl.java

@ -1,8 +1,8 @@
package com.hnac.hzims.scheduled.service.operation.impl; package com.hnac.hzims.scheduled.service.operation.fill.impl;
import com.hnac.hzims.operational.fill.entity.SolveEntity; import com.hnac.hzims.operational.fill.entity.SolveEntity;
import com.hnac.hzims.scheduled.mapper.operation.SolveMapper; import com.hnac.hzims.scheduled.mapper.operation.SolveMapper;
import com.hnac.hzims.scheduled.service.operation.SolveService; import com.hnac.hzims.scheduled.service.operation.fill.SolveService;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;

4
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/UseServiceImpl.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/fill/impl/UseServiceImpl.java

@ -1,10 +1,10 @@
package com.hnac.hzims.scheduled.service.operation.impl; package com.hnac.hzims.scheduled.service.operation.fill.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hnac.hzims.operational.fill.entity.UseEntity; import com.hnac.hzims.operational.fill.entity.UseEntity;
import com.hnac.hzims.operational.main.vo.UsrPowerVo; import com.hnac.hzims.operational.main.vo.UsrPowerVo;
import com.hnac.hzims.scheduled.mapper.operation.UseMapper; import com.hnac.hzims.scheduled.mapper.operation.UseMapper;
import com.hnac.hzims.scheduled.service.operation.UseService; import com.hnac.hzims.scheduled.service.operation.fill.UseService;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/ModelStationService.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/ModelStationService.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation; package com.hnac.hzims.scheduled.service.operation.home;
import com.hnac.hzims.operational.station.entity.HzimsAnalyzeModelStationEntity; import com.hnac.hzims.operational.station.entity.HzimsAnalyzeModelStationEntity;

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/RealTargetService.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/RealTargetService.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation; package com.hnac.hzims.scheduled.service.operation.home;
import java.util.List; import java.util.List;

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/ShowService.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/ShowService.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation; package com.hnac.hzims.scheduled.service.operation.home;
/** /**
* @author ysj * @author ysj

4
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/ModelStationServiceImpl.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/ModelStationServiceImpl.java

@ -1,9 +1,9 @@
package com.hnac.hzims.scheduled.service.operation.impl; package com.hnac.hzims.scheduled.service.operation.home.impl;
import com.hnac.hzims.operational.station.entity.HzimsAnalyzeModelStationEntity; import com.hnac.hzims.operational.station.entity.HzimsAnalyzeModelStationEntity;
import com.hnac.hzims.scheduled.mapper.operation.ModelStationMapper; import com.hnac.hzims.scheduled.mapper.operation.ModelStationMapper;
import com.hnac.hzims.scheduled.service.operation.ModelStationService; import com.hnac.hzims.scheduled.service.operation.home.ModelStationService;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;

11
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/RealTargetServiceImpl.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation.impl; package com.hnac.hzims.scheduled.service.operation.home.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference; import com.alibaba.fastjson.TypeReference;
@ -14,7 +14,14 @@ import com.hnac.hzims.operational.station.entity.HzimsAnalyzeModelStationEntity;
import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.operational.station.entity.StationEntity;
import com.hnac.hzims.scheduled.service.equipment.DeviceParamService; import com.hnac.hzims.scheduled.service.equipment.DeviceParamService;
import com.hnac.hzims.scheduled.service.equipment.DeviceService; import com.hnac.hzims.scheduled.service.equipment.DeviceService;
import com.hnac.hzims.scheduled.service.operation.*; import com.hnac.hzims.scheduled.service.operation.home.ModelStationService;
import com.hnac.hzims.scheduled.service.operation.home.RealTargetService;
import com.hnac.hzims.scheduled.service.operation.fill.GenerateService;
import com.hnac.hzims.scheduled.service.operation.fill.PowerService;
import com.hnac.hzims.scheduled.service.operation.fill.UseService;
import com.hnac.hzims.scheduled.service.operation.station.StationAttributeService;
import com.hnac.hzims.scheduled.service.operation.station.StationService;
import com.hnac.hzims.scheduled.service.operation.plate.DataService;
import com.hnac.hzinfo.datasearch.PointData; import com.hnac.hzinfo.datasearch.PointData;
import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData; import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData;
import com.hnac.hzinfo.datasearch.analyse.po.AnalyseCodeByAnalyseDataPO; import com.hnac.hzinfo.datasearch.analyse.po.AnalyseCodeByAnalyseDataPO;

8
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/ShowServiceImpl.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/ShowServiceImpl.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation.impl; package com.hnac.hzims.scheduled.service.operation.home.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference; import com.alibaba.fastjson.TypeReference;
@ -23,7 +23,11 @@ import com.hnac.hzims.operational.report.vo.DutyDefectVO;
import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.operational.station.entity.StationEntity;
import com.hnac.hzims.scheduled.service.equipment.PlanService; import com.hnac.hzims.scheduled.service.equipment.PlanService;
import com.hnac.hzims.scheduled.service.inspect.TaskService; import com.hnac.hzims.scheduled.service.inspect.TaskService;
import com.hnac.hzims.scheduled.service.operation.*; import com.hnac.hzims.scheduled.service.operation.business.*;
import com.hnac.hzims.scheduled.service.operation.home.ShowService;
import com.hnac.hzims.scheduled.service.operation.fill.*;
import com.hnac.hzims.scheduled.service.operation.station.StationService;
import com.hnac.hzims.scheduled.service.operation.plate.DataService;
import com.hnac.hzims.scheduled.service.ticket.TicketService; import com.hnac.hzims.scheduled.service.ticket.TicketService;
import com.hnac.hzims.scheduled.service.ticket.WorkTicketService; import com.hnac.hzims.scheduled.service.ticket.WorkTicketService;
import com.hnac.hzims.ticket.allTicket.vo.DoublePassRateVO; import com.hnac.hzims.ticket.allTicket.vo.DoublePassRateVO;

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

@ -1,124 +0,0 @@
package com.hnac.hzims.scheduled.service.operation.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hnac.hzims.operational.main.vo.MaintainVo;
import com.hnac.hzims.operational.main.vo.RegularWorkVO;
import com.hnac.hzims.operational.maintenance.constants.MaintenanceConstant;
import com.hnac.hzims.operational.maintenance.entity.OperMaintenanceTaskEntity;
import com.hnac.hzims.scheduled.mapper.operation.MaintenanceMapper;
import com.hnac.hzims.scheduled.service.operation.MaintenanceService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.Func;
import org.springframework.stereotype.Service;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author ysj
*/
@Service
@RequiredArgsConstructor
@Slf4j
public class MaintenanceServiceImpl extends BaseServiceImpl<MaintenanceMapper, OperMaintenanceTaskEntity> implements MaintenanceService {
/**
* 获取日常维护数量
* @param departList
* @return
*/
@Override
public Integer maintenanceCount(List<Long> departList) {
if(CollectionUtil.isEmpty(departList)){
return 0;
}
LocalDate firstDay = LocalDate.now().withDayOfYear(1);
LocalDateTime firstDateTime = LocalDateTime.of(firstDay, LocalTime.MIN);
LocalDateTime now = LocalDateTime.now();
//日常维护
List<OperMaintenanceTaskEntity> mTaskList = this.list(new LambdaQueryWrapper<OperMaintenanceTaskEntity>(){{
ge(OperMaintenanceTaskEntity::getDisposeTime,firstDateTime);
le(OperMaintenanceTaskEntity::getDisposeTime,now);
in(OperMaintenanceTaskEntity::getCreateDept,departList);
}});
if(CollectionUtil.isEmpty(mTaskList)){
return 0;
}
return mTaskList.size();
}
/**
* 时间区间机构的日常维护数据查询
* @param start
* @param end
* @param areas
* @return
*/
@Override
public MaintainVo maintain(String start, String end, List<Long> areas) {
MaintainVo maintainVo = new MaintainVo();
//日常维护
List<OperMaintenanceTaskEntity> maintainList = this.list(new LambdaQueryWrapper<OperMaintenanceTaskEntity>(){{
ge(OperMaintenanceTaskEntity::getDisposeTime,start);
le(OperMaintenanceTaskEntity::getDisposeTime,end);
in(OperMaintenanceTaskEntity::getCreateDept,areas);
}});
if(CollectionUtil.isEmpty(maintainList)){
maintainVo.setMaintain(0);
maintainVo.setMaintainFinish(0);
return maintainVo;
}
// 日常维护完成数
maintainVo.setMaintain(maintainList.size());
List<Long> maintainFinish = maintainList.stream().filter(o-> Func.isNotEmpty(o.getStatus()) && MaintenanceConstant.TASK_STATUS_5 == o.getStatus())
.map(OperMaintenanceTaskEntity::getId).collect(Collectors.toList());
if(CollectionUtil.isEmpty(maintainFinish)){
maintainVo.setMaintainFinish(0);
}
maintainVo.setMaintainFinish(maintainFinish.size());
return maintainVo;
}
/**
* 查询日常维护-定期工作类型数据
* @param start
* @param end
* @param areas
* @return
*/
@Override
public RegularWorkVO regularWork(Date start, Date end, List<Long> areas) {
RegularWorkVO regularWorkVO = new RegularWorkVO();
// 查询定期工作任务
List<OperMaintenanceTaskEntity> regularWorkList = this.list(new LambdaQueryWrapper<OperMaintenanceTaskEntity>() {{
ge(OperMaintenanceTaskEntity::getDisposeTime, start)
.le(OperMaintenanceTaskEntity::getDisposeTime, end)
.eq(OperMaintenanceTaskEntity::getTypeCode, "05")
.in(OperMaintenanceTaskEntity::getCreateDept, areas);
}});
if (CollectionUtil.isEmpty(regularWorkList)) {
regularWorkVO.setRegularWorkSum(0);
regularWorkVO.setRegularWork(0);
return regularWorkVO;
}
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());
if (CollectionUtil.isEmpty(regularWorkFinishList)) {
regularWorkVO.setRegularWork(0);
return regularWorkVO;
}
regularWorkVO.setRegularWork(regularWorkFinishList.size());
return regularWorkVO;
}
}

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/MonitorService.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/monitor/MonitorService.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation; package com.hnac.hzims.scheduled.service.operation.monitor;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;

9
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/MonitorServiceImpl.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/monitor/impl/MonitorServiceImpl.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation.impl; package com.hnac.hzims.scheduled.service.operation.monitor.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference; import com.alibaba.fastjson.TypeReference;
@ -19,7 +19,12 @@ import com.hnac.hzims.operational.main.vo.RealStationVo;
import com.hnac.hzims.operational.station.entity.StationAttributeEntity; import com.hnac.hzims.operational.station.entity.StationAttributeEntity;
import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.operational.station.entity.StationEntity;
import com.hnac.hzims.scheduled.service.equipment.WorkshopInfoService; import com.hnac.hzims.scheduled.service.equipment.WorkshopInfoService;
import com.hnac.hzims.scheduled.service.operation.*; import com.hnac.hzims.scheduled.service.operation.alarm.AbnormalAlarmService;
import com.hnac.hzims.scheduled.service.operation.alarm.RecordService;
import com.hnac.hzims.scheduled.service.operation.monitor.MonitorService;
import com.hnac.hzims.scheduled.service.operation.station.StationAttrConfigService;
import com.hnac.hzims.scheduled.service.operation.station.StationAttributeService;
import com.hnac.hzims.scheduled.service.operation.station.StationService;
import com.hnac.hzinfo.datasearch.analyse.IAnalyseDataSearchClient; import com.hnac.hzinfo.datasearch.analyse.IAnalyseDataSearchClient;
import com.hnac.hzinfo.datasearch.analyse.vo.AnalyzeCodeBySignagesVO; import com.hnac.hzinfo.datasearch.analyse.vo.AnalyzeCodeBySignagesVO;
import com.hnac.hzinfo.sdk.analyse.po.MultiAnalyzeCodePO; import com.hnac.hzinfo.sdk.analyse.po.MultiAnalyzeCodePO;

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/DataService.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/plate/DataService.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation; package com.hnac.hzims.scheduled.service.operation.plate;
import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData; import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData;
import com.hnac.hzinfo.datasearch.analyse.vo.AnalyseDataTaosVO; import com.hnac.hzinfo.datasearch.analyse.vo.AnalyseDataTaosVO;

4
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/DataServiceImpl.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/plate/impl/DataServiceImpl.java

@ -1,7 +1,7 @@
package com.hnac.hzims.scheduled.service.operation.impl; package com.hnac.hzims.scheduled.service.operation.plate.impl;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.hnac.hzims.scheduled.service.operation.DataService; import com.hnac.hzims.scheduled.service.operation.plate.DataService;
import com.hnac.hzinfo.datasearch.analyse.IAnalyseDataSearchClient; import com.hnac.hzinfo.datasearch.analyse.IAnalyseDataSearchClient;
import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData; import com.hnac.hzinfo.datasearch.analyse.domain.FieldsData;
import com.hnac.hzinfo.datasearch.analyse.po.AnalyseCodeByAnalyseDataPO; import com.hnac.hzinfo.datasearch.analyse.po.AnalyseCodeByAnalyseDataPO;

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/ReportService.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/report/ReportService.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation; package com.hnac.hzims.scheduled.service.operation.report;
/** /**
* @author ysj * @author ysj

8
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/ReportServiceImpl.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/report/impl/ReportServiceImpl.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation.impl; package com.hnac.hzims.scheduled.service.operation.report.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.google.common.util.concurrent.ThreadFactoryBuilder; import com.google.common.util.concurrent.ThreadFactoryBuilder;
@ -14,7 +14,11 @@ import com.hnac.hzims.operational.station.entity.StationEntity;
import com.hnac.hzims.safeproduct.dto.SafeEquipmentTrialDTO; import com.hnac.hzims.safeproduct.dto.SafeEquipmentTrialDTO;
import com.hnac.hzims.scheduled.service.equipment.PlanService; import com.hnac.hzims.scheduled.service.equipment.PlanService;
import com.hnac.hzims.scheduled.service.inspect.TaskService; import com.hnac.hzims.scheduled.service.inspect.TaskService;
import com.hnac.hzims.scheduled.service.operation.*; import com.hnac.hzims.scheduled.service.operation.business.AccessService;
import com.hnac.hzims.scheduled.service.operation.business.MaintenanceService;
import com.hnac.hzims.scheduled.service.operation.business.PhenomenonService;
import com.hnac.hzims.scheduled.service.operation.station.StationService;
import com.hnac.hzims.scheduled.service.operation.report.ReportService;
import com.hnac.hzims.scheduled.service.safeproduct.MonthService; import com.hnac.hzims.scheduled.service.safeproduct.MonthService;
import com.hnac.hzims.scheduled.service.safeproduct.TrialService; import com.hnac.hzims.scheduled.service.safeproduct.TrialService;
import com.hnac.hzims.scheduled.service.ticket.TicketService; import com.hnac.hzims.scheduled.service.ticket.TicketService;

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/StationAttrConfigService.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/station/StationAttrConfigService.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation; package com.hnac.hzims.scheduled.service.operation.station;
import com.hnac.hzims.operational.station.entity.StationAttrConfigEntity; import com.hnac.hzims.operational.station.entity.StationAttrConfigEntity;
import org.springblade.core.mp.base.BaseService; import org.springblade.core.mp.base.BaseService;

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/StationAttributeService.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/station/StationAttributeService.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation; package com.hnac.hzims.scheduled.service.operation.station;
import com.hnac.hzims.operational.station.entity.StationAttributeEntity; import com.hnac.hzims.operational.station.entity.StationAttributeEntity;
import org.springblade.core.mp.base.BaseService; import org.springblade.core.mp.base.BaseService;

2
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/StationService.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/station/StationService.java

@ -1,4 +1,4 @@
package com.hnac.hzims.scheduled.service.operation; package com.hnac.hzims.scheduled.service.operation.station;
import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.operational.station.entity.StationEntity;
import org.springblade.core.mp.base.BaseService; import org.springblade.core.mp.base.BaseService;

4
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/StationAttrConfigServiceImpl.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/station/impl/StationAttrConfigServiceImpl.java

@ -1,9 +1,9 @@
package com.hnac.hzims.scheduled.service.operation.impl; package com.hnac.hzims.scheduled.service.operation.station.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hnac.hzims.operational.station.entity.StationAttrConfigEntity; import com.hnac.hzims.operational.station.entity.StationAttrConfigEntity;
import com.hnac.hzims.scheduled.mapper.operation.StationAttrConfigMapper; import com.hnac.hzims.scheduled.mapper.operation.StationAttrConfigMapper;
import com.hnac.hzims.scheduled.service.operation.StationAttrConfigService; import com.hnac.hzims.scheduled.service.operation.station.StationAttrConfigService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.CollectionUtil;

4
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/StationAttributeServiceImpl.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/station/impl/StationAttributeServiceImpl.java

@ -1,8 +1,8 @@
package com.hnac.hzims.scheduled.service.operation.impl; package com.hnac.hzims.scheduled.service.operation.station.impl;
import com.hnac.hzims.operational.station.entity.StationAttributeEntity; import com.hnac.hzims.operational.station.entity.StationAttributeEntity;
import com.hnac.hzims.scheduled.mapper.operation.StationAttributeMapper; import com.hnac.hzims.scheduled.mapper.operation.StationAttributeMapper;
import com.hnac.hzims.scheduled.service.operation.StationAttributeService; import com.hnac.hzims.scheduled.service.operation.station.StationAttributeService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;

4
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/impl/StationServiceImpl.java → hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/station/impl/StationServiceImpl.java

@ -1,8 +1,8 @@
package com.hnac.hzims.scheduled.service.operation.impl; package com.hnac.hzims.scheduled.service.operation.station.impl;
import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.operational.station.entity.StationEntity;
import com.hnac.hzims.scheduled.mapper.operation.StationMapper; import com.hnac.hzims.scheduled.mapper.operation.StationMapper;
import com.hnac.hzims.scheduled.service.operation.StationService; import com.hnac.hzims.scheduled.service.operation.station.StationService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;

5
hzims-service/hzims-scheduled/src/main/resources/mapper/operation/MaintenancePlanMapper.xml

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hnac.hzims.scheduled.mapper.operation.MaintenancePlanMapper">
</mapper>

1
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/WindHomeServiceImpl.java

@ -43,7 +43,6 @@ import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.core.tool.utils.StringUtil; import org.springblade.core.tool.utils.StringUtil;
import org.springblade.system.entity.Dept; import org.springblade.system.entity.Dept;
import org.springblade.system.entity.Region;
import org.springblade.system.feign.ISysClient; import org.springblade.system.feign.ISysClient;
import org.springblade.system.user.cache.UserCache; import org.springblade.system.user.cache.UserCache;
import org.springblade.system.user.entity.User; import org.springblade.system.user.entity.User;

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskCreateTask.java

@ -59,7 +59,7 @@ public class MaintenanceTaskCreateTask {
private final IOperMaintenanceTaskService taskService; private final IOperMaintenanceTaskService taskService;
private final IImsDutyMainService mainService; private final IImsDutyMainService mainService;
private final RedisTemplate redisTemplate; private final RedisTemplate redisTemplate;
private final IMessageClient messageClient; 1
private final BladeLogger logger; private final BladeLogger logger;

Loading…
Cancel
Save