diff --git a/os-ems/src/main/java/com/os/ems/record/service/IEmsRecordAlarmDataService.java b/os-ems/src/main/java/com/os/ems/record/service/IEmsRecordAlarmDataService.java index b37bba4..8ca8de7 100644 --- a/os-ems/src/main/java/com/os/ems/record/service/IEmsRecordAlarmDataService.java +++ b/os-ems/src/main/java/com/os/ems/record/service/IEmsRecordAlarmDataService.java @@ -76,4 +76,9 @@ public interface IEmsRecordAlarmDataService */ public void exceedDnbThresholdAlarmsTask(); + /** + * 小时耗量告警定时任务 + */ + public void hourlyConsumptionAlarmsTask(); + } diff --git a/os-ems/src/main/java/com/os/ems/record/service/impl/EmsRecordAlarmDataServiceImpl.java b/os-ems/src/main/java/com/os/ems/record/service/impl/EmsRecordAlarmDataServiceImpl.java index 2739e88..5d2962f 100644 --- a/os-ems/src/main/java/com/os/ems/record/service/impl/EmsRecordAlarmDataServiceImpl.java +++ b/os-ems/src/main/java/com/os/ems/record/service/impl/EmsRecordAlarmDataServiceImpl.java @@ -17,6 +17,8 @@ import com.os.ems.record.domain.EmsRecordAlarmRule; import com.os.ems.record.domain.EmsRecordDnbInstant; import com.os.ems.record.mapper.EmsRecordAlarmRuleMapper; import com.os.ems.record.mapper.EmsRecordDnbInstantMapper; +import com.os.ems.report.domain.EmsReportPointDnb; +import com.os.ems.report.mapper.EmsReportPointDnbMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.os.ems.record.mapper.EmsRecordAlarmDataMapper; @@ -48,6 +50,9 @@ public class EmsRecordAlarmDataServiceImpl implements IEmsRecordAlarmDataService @Autowired private EmsBaseMonitorThresholdMapper emsBaseMonitorThresholdMapper; + @Autowired + private EmsReportPointDnbMapper emsReportPointDnbMapper; + /** * 查询异常数据记录 * @@ -285,4 +290,23 @@ public class EmsRecordAlarmDataServiceImpl implements IEmsRecordAlarmDataService return null; } + /** + * 小时耗量告警定时任务 + */ + public void hourlyConsumptionAlarmsTask() { + EmsBaseMonitorThreshold monitorThreshold = new EmsBaseMonitorThreshold(); + monitorThreshold.setMonitorType(2L); + List thresholdList = emsBaseMonitorThresholdMapper.selectEmsBaseMonitorThresholdList(monitorThreshold); + for (EmsBaseMonitorThreshold threshold : thresholdList) { + BigDecimal consumption = threshold.getHourConsumption(); + if (consumption.equals(new BigDecimal(0))){ + continue; + } + EmsReportPointDnb reportPointDnb = new EmsReportPointDnb(); + reportPointDnb.setMonitorCode(threshold.getMonitorCode()); + List dnbList = emsReportPointDnbMapper.selectEmsReportPointDnbList(reportPointDnb); + + } + } + } diff --git a/os-ems/src/main/java/com/os/ems/report/controller/EmsReportController.java b/os-ems/src/main/java/com/os/ems/report/controller/EmsReportController.java index 802a5f3..5aa6639 100644 --- a/os-ems/src/main/java/com/os/ems/report/controller/EmsReportController.java +++ b/os-ems/src/main/java/com/os/ems/report/controller/EmsReportController.java @@ -1,14 +1,11 @@ package com.os.ems.report.controller; -import com.os.common.annotation.Log; import com.os.common.core.controller.BaseController; import com.os.common.core.domain.AjaxResult; import com.os.common.core.page.TableDataInfo; -import com.os.common.enums.BusinessType; import com.os.common.utils.poi.ExcelUtil; import com.os.ems.report.domain.EnergyStatisticalReport; import com.os.ems.report.domain.PeaksValleysConsumptionReport; -import com.os.ems.report.service.IEmsReportPointDnbService; import com.os.ems.report.service.IEmsReportService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; diff --git a/os-mes/src/main/java/com/os/mes/report/controller/ReportBoardPortController.java b/os-mes/src/main/java/com/os/mes/report/controller/ReportBoardPortController.java new file mode 100644 index 0000000..5e2d72b --- /dev/null +++ b/os-mes/src/main/java/com/os/mes/report/controller/ReportBoardPortController.java @@ -0,0 +1,38 @@ +package com.os.mes.report.controller; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.os.common.core.controller.BaseController; +import com.os.common.core.domain.AjaxResult; +import com.os.mes.report.domain.ReportBoardPort; +import com.os.mes.report.service.IReportBoardPortService; + +/** + * 看板接口Controller + * + * @author Yinq + * @date 2024-07-11 + */ +@RestController +@RequestMapping("/mes/boardPort") +public class ReportBoardPortController extends BaseController +{ + @Autowired + private IReportBoardPortService reportBoardPortService; + + /** + * 查询看板接口列表 + */ + @GetMapping("/list") + public AjaxResult list(ReportBoardPort reportBoardPort) + { + List list = reportBoardPortService.selectReportBoardPortList(reportBoardPort); + return success(list); + } + + +} diff --git a/os-mes/src/main/java/com/os/mes/report/domain/ReportBoardPort.java b/os-mes/src/main/java/com/os/mes/report/domain/ReportBoardPort.java new file mode 100644 index 0000000..adce534 --- /dev/null +++ b/os-mes/src/main/java/com/os/mes/report/domain/ReportBoardPort.java @@ -0,0 +1,16 @@ +package com.os.mes.report.domain; + +import com.os.common.core.domain.BaseEntity; + +/** + * 看板接口对象 report_board_port + * + * @author Yinq + * @date 2024-07-11 + */ +public class ReportBoardPort extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + +} diff --git a/os-mes/src/main/java/com/os/mes/report/service/IReportBoardPortService.java b/os-mes/src/main/java/com/os/mes/report/service/IReportBoardPortService.java new file mode 100644 index 0000000..5923b0f --- /dev/null +++ b/os-mes/src/main/java/com/os/mes/report/service/IReportBoardPortService.java @@ -0,0 +1,23 @@ +package com.os.mes.report.service; + +import java.util.List; +import com.os.mes.report.domain.ReportBoardPort; + +/** + * 看板接口Service接口 + * + * @author Yinq + * @date 2024-07-11 + */ +public interface IReportBoardPortService +{ + /** + * 查询看板接口列表 + * + * @param reportBoardPort 看板接口 + * @return 看板接口集合 + */ + public List selectReportBoardPortList(ReportBoardPort reportBoardPort); + + +} diff --git a/os-mes/src/main/java/com/os/mes/report/service/impl/ReportBoardPortServiceImpl.java b/os-mes/src/main/java/com/os/mes/report/service/impl/ReportBoardPortServiceImpl.java new file mode 100644 index 0000000..8dc5121 --- /dev/null +++ b/os-mes/src/main/java/com/os/mes/report/service/impl/ReportBoardPortServiceImpl.java @@ -0,0 +1,22 @@ +package com.os.mes.report.service.impl; + +import java.util.List; +import org.springframework.stereotype.Service; +import com.os.mes.report.domain.ReportBoardPort; +import com.os.mes.report.service.IReportBoardPortService; + +/** + * 看板接口Service业务层处理 + * + * @author Yinq + * @date 2024-07-11 + */ +@Service +public class ReportBoardPortServiceImpl implements IReportBoardPortService +{ + + @Override + public List selectReportBoardPortList(ReportBoardPort reportBoardPort) { + return null; + } +} diff --git a/os-quartz/src/main/java/com/os/quartz/task/EMSTask.java b/os-quartz/src/main/java/com/os/quartz/task/EMSTask.java index d021cf6..92f1238 100644 --- a/os-quartz/src/main/java/com/os/quartz/task/EMSTask.java +++ b/os-quartz/src/main/java/com/os/quartz/task/EMSTask.java @@ -36,4 +36,11 @@ public class EMSTask { emsRecordAlarmDataService.exceedDnbThresholdAlarmsTask(); } + /** + * 小时耗量告警定时任务 + */ + public void hourlyConsumptionAlarmsTask() { + emsRecordAlarmDataService.hourlyConsumptionAlarmsTask(); + } + }