| | |
| | | * @Description: 设备加班时长算法统计 |
| | | * @date 2024/1/24 17:12 |
| | | */ |
| | | @PersistJobDataAfterExecution |
| | | @DisallowConcurrentExecution |
| | | @Slf4j |
| | | public class RunningOvertimeDurationJob implements Job { |
| | | |
| | |
| | | } else { |
| | | date = DateUtils.format(DateUtils.getNow(), DateUtils.STR_DATE); |
| | | } |
| | | List<MdcEquipment> equipmentList = mdcEquipmentService.list(new LambdaQueryWrapper<>()); |
| | | List<MdcEquipment> equipmentList = mdcEquipmentService.list(); |
| | | MdcSystemParameters mdcSystemParameters = mdcSystemParametersService.getOne(new LambdaQueryWrapper<MdcSystemParameters>().eq(MdcSystemParameters::getCode, "equip_log_statis_time")); |
| | | if (mdcSystemParameters == null) { |
| | | throw new JobExecutionException("mdc_system_parameters 表中数据缺失"); |
| | |
| | | } else { |
| | | // 没有班次配置,计算全天的设备加工状态 |
| | | Date startDate = DateUtils.toDate(date + " " + value, DateUtils.STR_DATE_TIME_SMALL); |
| | | Date endDate = DateUtils.plusTime(startDate, 1); |
| | | Date endDate = DateUtils.plusTime(startDate, 1); |
| | | List<MdcEquipmentRunningSection> equipmentRunningSectionList = mdcEquipmentRunningSectionService.selectRunningData(mdcEquipment.getEquipmentId(), startDate, endDate); |
| | | if (equipmentRunningSectionList != null && !equipmentRunningSectionList.isEmpty()) { |
| | | // 时间修正 |