diff --git a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/controller/OilStatisticsController.java b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/controller/OilStatisticsController.java index 11d3801..a14868a 100644 --- a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/controller/OilStatisticsController.java +++ b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/controller/OilStatisticsController.java @@ -155,10 +155,27 @@ public class OilStatisticsController extends BaseController { resultMap.put("preMonthDs", preMonthDs); resultMap.put("lastYearDs", lastYearDs); return success(resultMap); - } + } + + @GetMapping("/monthData/dataDetailGangQuCompare") + public AjaxResult dataDetailGangQuCompare(Long deptId, String month) { + // 本月ds均值 + List> currentMonthDs = oilThDeviceReportService.monthReportDataOverviewGangQuCompare(deptId, month); + // 上月ds均值 + List> preMonthDs = oilThDeviceReportService.monthReportDataOverviewGangQuCompare(deptId, getPreviousMonth(month)); + // 去年同月ds均值 + List> lastYearDs = oilThDeviceReportService.monthReportDataOverviewGangQuCompare(deptId, getLastYearMonth(month)); + + Map resultMap = new HashMap<>(); + resultMap.put("currentMonthDs", currentMonthDs); + resultMap.put("preMonthDs", preMonthDs); + resultMap.put("lastYearDs", lastYearDs); + return success(resultMap); + } /** * 获取去年同月 + * * @param month 2024-09 * @return 2023-09 */ diff --git a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/controller/SysSendInfoController.java b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/controller/SysSendInfoController.java index bcea5f5..0c132af 100644 --- a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/controller/SysSendInfoController.java +++ b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/controller/SysSendInfoController.java @@ -53,7 +53,7 @@ public class SysSendInfoController extends BaseController { */ @Log(title = "发送消息", businessType = BusinessType.UPDATE) @GetMapping ("/sendMessage") - public AjaxResult sendMessage(SendMessageDTO sendMessageDTO) { + public AjaxResult sendMessage(SendMessageDTO sendMessageDTO) throws Exception { return success(iSysNoticeService.sendMessage(sendMessageDTO)); } diff --git a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/mapper/ThDeviceReportMapper.java b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/mapper/ThDeviceReportMapper.java index f03879d..f2ddf4c 100644 --- a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/mapper/ThDeviceReportMapper.java +++ b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/mapper/ThDeviceReportMapper.java @@ -65,6 +65,9 @@ public interface ThDeviceReportMapper { @MapKey("month") List> monthReportDataOverviewDeviceDs(@Param("deptId") Long deptId, @Param("month") String month); + @MapKey("month") + List> monthReportDataOverviewGangQuCompare(@Param("deptId") Long deptId, @Param("month") String month); + /** * 每日数据 * @param day 日期 2024-08-30 diff --git a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/service/IOilThDeviceReportService.java b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/service/IOilThDeviceReportService.java index 48d6047..a9f36ef 100644 --- a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/service/IOilThDeviceReportService.java +++ b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/service/IOilThDeviceReportService.java @@ -8,6 +8,8 @@ public interface IOilThDeviceReportService { List> monthReportDataOverviewDeviceDs(Long deptId, String month); + List> monthReportDataOverviewGangQuCompare(Long deptId, String month); + List> dailyReportDataOverview(String day); List> selectAlarmCountByDeptIdAndDateRange(Long deptId, String beginDate, String endDate); diff --git a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/service/impl/OilThDeviceReportService.java b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/service/impl/OilThDeviceReportService.java index 81ad6b3..30c6f29 100644 --- a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/service/impl/OilThDeviceReportService.java +++ b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/service/impl/OilThDeviceReportService.java @@ -26,6 +26,11 @@ public class OilThDeviceReportService implements IOilThDeviceReportService { return camelCaseMapListKey(thDeviceReportMapper.monthReportDataOverviewDeviceDs(deptId, month)); } + @Override + public List> monthReportDataOverviewGangQuCompare(Long deptId, String month) { + return camelCaseMapListKey(thDeviceReportMapper.monthReportDataOverviewGangQuCompare(deptId, month)); + } + @Override public List> dailyReportDataOverview(String day) { return camelCaseMapListKey(thDeviceReportMapper.dailyReportDataOverview(day)); diff --git a/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/ThDeviceReportMapper.xml b/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/ThDeviceReportMapper.xml index 64b28df..b2cdcab 100644 --- a/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/ThDeviceReportMapper.xml +++ b/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/ThDeviceReportMapper.xml @@ -145,6 +145,29 @@ ORDER BY pp.dept_name, p.dept_name + + +