NyaRis преди 3 дни
родител
ревизия
e337ea518a

+ 249 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/controller/BjOverviewController.java

@@ -0,0 +1,249 @@
+package com.ruoyi.business.controller;
+
+import java.util.List;
+
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.ruoyi.business.domain.vo.BjNotificationTopVo;
+import com.ruoyi.business.domain.vo.BjNotificationOverviewVo;
+import com.ruoyi.business.domain.vo.BjNotificationReleaseAndReceiveOverviewVo;
+import com.ruoyi.business.domain.vo.BjNotificationStatusVo;
+import com.ruoyi.business.domain.vo.BjOverviewVo;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.RequiredArgsConstructor;
+
+@Tag(name = "统计分析总览")
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/overview")
+public class BjOverviewController {
+
+    /**
+     * 获取通报采取措施统计信息
+     */
+    @Operation(summary = "获取统计分析总览")
+    // @SaCheckPermission("business:timeLimit:query")
+    @GetMapping("/total")
+    public AjaxResult getInfo() {
+        var notificationOverviewTotal = BjNotificationOverviewVo.builder()
+                .title("总通报数量")
+                .tag("近一月")
+                .firstLineTitle("发布数量")
+                .firstLineTotal(542)
+                .firstLineProportion(43)
+                .firstLineYoy(12)
+                .firstLineMon(8)
+                .lastLineTitle("接收数量")
+                .lastLineTotal(987)
+                .lastLineProportion(23)
+                .lastLineYoy(2)
+                .lastLineMon(4)
+                .build();
+
+        var notificationOverviewHandled = BjNotificationOverviewVo.builder()
+                .title("通报处置数量")
+                .tag("近一月")
+                .firstLineTitle("发布数量")
+                .firstLineTotal(32)
+                .firstLineProportion(43)
+                .firstLineYoy(12)
+                .firstLineMon(8)
+                .lastLineTitle("接收数量")
+                .lastLineTotal(66)
+                .lastLineProportion(23)
+                .lastLineYoy(2)
+                .lastLineMon(4)
+                .build();
+
+        var notificationOverviewOverdure = BjNotificationOverviewVo.builder()
+                .title("通报超时数量")
+                .tag("近一月")
+                .firstLineTitle("发布数量")
+                .firstLineTotal(8)
+                .firstLineProportion(56)
+                .firstLineYoy(12)
+                .firstLineMon(8)
+                .lastLineTitle("接收数量")
+                .lastLineTotal(6)
+                .lastLineProportion(23)
+                .build();
+
+        var notificationOverviewSpecial = BjNotificationOverviewVo.builder()
+                .title("专项通报数量")
+                .tag("近一月")
+                .firstLineTitle("发布数量")
+                .firstLineTotal(13)
+                .firstLineProportion(43)
+                .firstLineYoy(12)
+                .firstLineMon(8)
+                .lastLineTitle("接收数量")
+                .lastLineTotal(17)
+                .lastLineProportion(23)
+                .lastLineYoy(2)
+                .lastLineMon(4)
+                .build();
+
+        var notificationReleaseAndReceiveOverview = BjNotificationReleaseAndReceiveOverviewVo.builder()
+                .xData(List.of("地方政府", "船舶检验机构", "直属海事管理机构", "农业农村部门", "海警机构", "长江航务管理局", "珠江航务管理局"))
+                .onlineRelease(List.of(29, 27, 24, 35, 28, 29, 21))
+                .onlineReceive(List.of(19, 17, 14, 13, 18, 17, 16))
+                .offlineRelease(List.of(25, 29, 34, 28, 29, 27, 24))
+                .offlineReceive(List.of(15, 13, 12, 10, 18, 17, 16))
+                .build();
+
+        var notificationStatus = BjNotificationStatusVo.builder()
+                .published(320)
+                .received(23)
+                .completed(46)
+                .corrected(6)
+                .returned(32)
+                .closed(320)
+                .build();
+
+        var notificationMeasureTop1 = BjNotificationTopVo.builder()
+                .index(1)
+                .title("增加检查频次")
+                .count(136)
+                .percent(85)
+                .build();
+        var notificationMeasureTop2 = BjNotificationTopVo.builder()
+                .index(2)
+                .title("警示教育")
+                .count(120)
+                .percent(75)
+                .build();
+        var notificationMeasureTop3 = BjNotificationTopVo.builder()
+                .index(3)
+                .title("约谈")
+                .count(108)
+                .percent(65)
+                .build();
+        var notificationMeasureTop4 = BjNotificationTopVo.builder()
+                .index(4)
+                .title("其他措施")
+                .count(96)
+                .percent(57)
+                .build();
+        var notificationMeasureTop5 = BjNotificationTopVo.builder()
+                .index(5)
+                .title("采取信用...")
+                .count(88)
+                .percent(46)
+                .build();
+        var notificationMeasureTop6 = BjNotificationTopVo.builder()
+                .index(6)
+                .title("转报其他...")
+                .count(72)
+                .percent(25)
+                .build();
+        var notificationMeasureTop7 = BjNotificationTopVo.builder()
+                .index(7)
+                .title("船员实操...")
+                .count(70)
+                .percent(24)
+                .build();
+        var notificationMeasureTop8 = BjNotificationTopVo.builder()
+                .index(8)
+                .title("责令公司...")
+                .count(61)
+                .percent(18)
+                .build();
+        var notificationMeasureTop9 = BjNotificationTopVo.builder()
+                .index(9)
+                .title("船舶监督...")
+                .count(20)
+                .percent(8)
+                .build();
+        var notificationMeasureTop10 = BjNotificationTopVo.builder()
+                .index(10)
+                .title("行政调查...")
+                .count(8)
+                .percent(2)
+                .build();
+
+        var notificationEventTop1 = BjNotificationTopVo.builder()
+                .index(1)
+                .title("客运船舶相关违法违规行为")
+                .count(58)
+                .percent(85)
+                .build();
+        var notificationEventTop2 = BjNotificationTopVo.builder()
+                .index(2)
+                .title("航运公司安全管理相关信息及突出违法行为")
+                .count(46)
+                .percent(75)
+                .build();
+        var notificationEventTop3 = BjNotificationTopVo.builder()
+                .index(3)
+                .title("从事休闲活动船舶相关违法违规行为")
+                .count(40)
+                .percent(65)
+                .build();
+        var notificationEventTop4 = BjNotificationTopVo.builder()
+                .index(4)
+                .title("配员不足")
+                .count(32)
+                .percent(57)
+                .build();
+        var notificationEventTop5 = BjNotificationTopVo.builder()
+                .index(5)
+                .title("船舶、码头等相关防污染违规行为")
+                .count(28)
+                .percent(46)
+                .build();
+        var notificationEventTop6 = BjNotificationTopVo.builder()
+                .index(6)
+                .title("船舶注销登记相关信息")
+                .count(22)
+                .percent(25)
+                .build();
+        var notificationEventTop7 = BjNotificationTopVo.builder()
+                .index(7)
+                .title("托运人托运危险货物相关违法违规信息")
+                .count(19)
+                .percent(24)
+                .build();
+        var notificationEventTop8 = BjNotificationTopVo.builder()
+                .index(8)
+                .title("船舶注销未登记的")
+                .count(14)
+                .percent(18)
+                .build();
+        var notificationEventTop9 = BjNotificationTopVo.builder()
+                .index(9)
+                .title("船舶被列入或脱离重点跟踪船舶的")
+                .count(12)
+                .percent(8)
+                .build();
+        var notificationEventTop10 = BjNotificationTopVo.builder()
+                .index(10)
+                .title("船舶被滞留、禁止船舶进港或责令船舶离港的")
+                .count(10)
+                .percent(2)
+                .build();
+
+        var vo = BjOverviewVo.builder()
+                .notificationOverview(
+                        List.of(notificationOverviewTotal, notificationOverviewHandled, notificationOverviewOverdure,
+                                notificationOverviewSpecial))
+                .notificationStatus(notificationStatus)
+                .notificationReleaseAndReceiveOverview(notificationReleaseAndReceiveOverview)
+                .notificationMeasureTopList(List.of(notificationMeasureTop1, notificationMeasureTop2,
+                        notificationMeasureTop3, notificationMeasureTop4, notificationMeasureTop5,
+                        notificationMeasureTop6, notificationMeasureTop7, notificationMeasureTop8,
+                        notificationMeasureTop9, notificationMeasureTop10))
+                .notificationEvent(List.of(notificationEventTop1, notificationEventTop2, notificationEventTop3,
+                        notificationEventTop4, notificationEventTop5, notificationEventTop6,
+                        notificationEventTop7, notificationEventTop8, notificationEventTop9,
+                        notificationEventTop10))
+                .build();
+        return AjaxResult.success(vo);
+    }
+}

+ 0 - 1
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/domain/vo/BjNotificationBarChartItemVo.java

@@ -27,7 +27,6 @@ import lombok.Data;
 @Builder
 @Data
 public class BjNotificationBarChartItemVo {
-
     private Integer value;
     private Integer noOverdueCount;
     private Integer beenPublishCount;

+ 40 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/domain/vo/BjNotificationOverviewVo.java

@@ -0,0 +1,40 @@
+package com.ruoyi.business.domain.vo;
+
+import lombok.Builder;
+import lombok.Data;
+
+/**
+ * Example:
+ * {
+ * title: '总通报数量',
+ * tag: '近一月',
+ * totalNum: 1234,
+ * firstLineTitle: '发布数量',
+ * firstLineTotal: '542',
+ * firstLineProportion: '43%',
+ * firstLineYoy: '12%',
+ * firstLineMon: '8%',
+ * lastLineTitle: '接收数量',
+ * lastLineTotal: '542',
+ * lastLineProportion: '23%',
+ * lastLineYoy: '4%',
+ * lastLineMon: '2%',
+ * }
+ */
+@Data
+@Builder
+public class BjNotificationOverviewVo {
+    private String title;
+    private String tag;
+    private Integer totalNum;
+    private String firstLineTitle;
+    private Integer firstLineTotal;
+    private Integer firstLineProportion;
+    private Integer firstLineYoy;
+    private Integer firstLineMon;
+    private String lastLineTitle;
+    private Integer lastLineTotal;
+    private Integer lastLineProportion;
+    private Integer lastLineYoy;
+    private Integer lastLineMon;
+}

+ 25 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/domain/vo/BjNotificationReleaseAndReceiveOverviewVo.java

@@ -0,0 +1,25 @@
+package com.ruoyi.business.domain.vo;
+
+import java.util.List;
+
+import lombok.Builder;
+import lombok.Data;
+
+/**
+ * Example: 通报发布接收总览
+ * xData:[xxx,xxx], //'地方政府'
+ * onlineRelease:[29, 27, 24],// 线上发布通报
+ * onlineReceive:[29, 27, 24],// 线上接收通报
+ * offlineRelease:[29, 27, 24],// 线下发布通报
+ * offlineReceive:[29, 27, 24]// 线下接收通报
+ */
+@Data
+@Builder
+public class BjNotificationReleaseAndReceiveOverviewVo {
+    @com.fasterxml.jackson.annotation.JsonProperty("xData")
+    private List<String> xData;
+    private List<Integer> onlineRelease;
+    private List<Integer> onlineReceive;
+    private List<Integer> offlineRelease;
+    private List<Integer> offlineReceive;
+}

+ 26 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/domain/vo/BjNotificationStatusVo.java

@@ -0,0 +1,26 @@
+package com.ruoyi.business.domain.vo;
+
+import lombok.Builder;
+import lombok.Data;
+
+/**
+ * Eaxmple:
+ * {
+ * published: 320,
+ * received: 23,
+ * completed: 46,
+ * corrected: 6,
+ * returned: 32,
+ * closed: 320,
+ * }
+ */
+@Data
+@Builder
+public class BjNotificationStatusVo {
+    private Integer published;
+    private Integer received;
+    private Integer completed;
+    private Integer corrected;
+    private Integer returned;
+    private Integer closed;
+}

+ 22 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/domain/vo/BjNotificationTopVo.java

@@ -0,0 +1,22 @@
+package com.ruoyi.business.domain.vo;
+
+import lombok.Builder;
+import lombok.Data;
+
+/**
+ * Example:
+ * 
+ * index:1, //排名
+ * title: '增加检查...',
+ * percent: '85%',
+ * count: 136,
+ * }
+ */
+@Data
+@Builder
+public class BjNotificationTopVo {
+    private Integer index;
+    private String title;
+    private Integer percent;
+    private Integer count;
+}

+ 96 - 0
ruoyi-modules/ruoyi-business/src/main/java/com/ruoyi/business/domain/vo/BjOverviewVo.java

@@ -0,0 +1,96 @@
+package com.ruoyi.business.domain.vo;
+
+import java.util.List;
+
+import lombok.Builder;
+import lombok.Data;
+
+/**
+ * Example:
+ * `{
+ * <!-- 通报概览 -->
+ * 
+ * 'notificationOverview':[
+ * {
+ * title: '总通报数量',
+ * tag: '近一月',
+ * totalNum: 1234,
+ * firstLineTitle: '发布数量',
+ * firstLineTotal: '542',
+ * firstLineProportion: '43%',
+ * firstLineYoy: '12%',
+ * firstLineMon: '8%',
+ * lastLineTitle: '接收数量',
+ * lastLineTotal: '542',
+ * lastLineProportion: '23%',
+ * lastLineYoy: '4%',
+ * lastLineMon: '2%',
+ * }
+ * ],
+ * <!-- 通报状态 -->
+ * 
+ * 'notificationStatus':{
+ * published: 320,
+ * received: 23,
+ * completed: 46,
+ * corrected: 6,
+ * returned: 32,
+ * closed: 320,
+ * },
+ * <!-- 通报发布/接收概览 -->
+ * 
+ * 'notificationReleaseAndReceiveOverview':{
+ * xData:[xxx,xxx], //'地方政府'
+ * onlineRelease:[29, 27, 24],// 线上发布通报
+ * onlineReceive:[29, 27, 24],// 线上接收通报
+ * offlineRelease:[29, 27, 24],// 线下发布通报
+ * offlineReceive:[29, 27, 24]// 线下接收通报
+ * },
+ * <!-- 通报采取措施TOP10-措施数量由高到低 -->
+ * 
+ * 'notificationMeasureTopList':[
+ * {
+ * index:1, //排名
+ * title: '增加检查...',
+ * percent: '85%',
+ * count: 136,
+ * }
+ * ],
+ * <!-- 通报事项TOP10 -->
+ * 
+ * 'notificationEvent':[{
+ * label: '客运船舶相关违法违规行为',
+ * count: 58,
+ * percentage: 35
+ * }],
+ * 
+ * }`
+ */
+@Data
+@Builder
+public class BjOverviewVo {
+    /**
+     * 通报概览
+     */
+    private List<BjNotificationOverviewVo> notificationOverview;
+
+    /**
+     * 通报状态
+     */
+    private BjNotificationStatusVo notificationStatus;
+
+    /**
+     * 通报发布/接收概览
+     */
+    private BjNotificationReleaseAndReceiveOverviewVo notificationReleaseAndReceiveOverview;
+
+    /**
+     * 通报采取措施TOP10-措施数量由高到低
+     */
+    private java.util.List<BjNotificationTopVo> notificationMeasureTopList;
+
+    /**
+     * 通报事项TOP10
+     */
+    private java.util.List<BjNotificationTopVo> notificationEvent;
+}