Scott 2 лет назад
Родитель
Сommit
03bccb9619

+ 2 - 0
jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java

@@ -144,6 +144,8 @@ public class ShiroConfig {
         filterChainDefinitionMap.put("/vxeSocket/**", "anon");//JVxeTable无痕刷新示例
         filterChainDefinitionMap.put("/notify/**", "anon"); // nw弹窗页面
         filterChainDefinitionMap.put("/medical/homepage/**", "anon"); // 首页数据看板临时放通
+        filterChainDefinitionMap.put("/medical/violation/analysis/**", "anon"); // 违规分析看板临时放通
+
 //        filterChainDefinitionMap.put("/medical/**", "anon");//JVxeTable无痕刷新示例
 
         //性能监控——安全隐患泄露TOEKN(durid连接池也有)

+ 45 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/controller/ViolationAnalysisController.java

@@ -0,0 +1,45 @@
+package org.jeecg.modules.medical.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.modules.medical.common.bo.before.AuditAdvanceWarningAuditDetailResponse;
+import org.jeecg.modules.medical.service.IViolationAnalysisService;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
+
+/**
+ * @author Scott
+ * @time 2023/10/18 15:06 星期三
+ * @description '违规分析'
+ * @parentProject medical-java
+ */
+@Api(tags="违规分析")
+@RestController
+@RequestMapping("/medical/violation/analysis")
+@Slf4j
+public class ViolationAnalysisController {
+
+    private IViolationAnalysisService violationAnalysisService;
+
+    @ApiOperation(value="违规分析-事前提醒明细统计", notes="违规分析-事前提醒明细统计")
+    @GetMapping(value = "/before/list")
+    public Result<IPage<AuditAdvanceWarningAuditDetailResponse>> queryPageList(AuditAdvanceWarningAuditDetailResponse advanceWarningAuditDetail,
+                                                                               @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+                                                                               @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+                                                                               HttpServletRequest req) {
+        Map<String, String[]> parameterMap = req.getParameterMap();
+        IPage<AuditAdvanceWarningAuditDetailResponse> result = violationAnalysisService.loadBeforeList(advanceWarningAuditDetail, pageNo, pageSize, parameterMap);
+        return Result.OK(result);
+    }
+
+
+
+}

+ 2 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/response/DashboardStatisticsDetailedItem.java

@@ -17,6 +17,8 @@ import java.util.List;
 public class DashboardStatisticsDetailedItem implements Serializable {
     @ApiModelProperty(value = "明细title")
     private String title;
+    @ApiModelProperty(value = "总数")
+    private Integer total;
     @ApiModelProperty(value = "数据集合")
     private List<JSONObject> list;
 }

+ 16 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/service/IViolationAnalysisService.java

@@ -0,0 +1,16 @@
+package org.jeecg.modules.medical.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.jeecg.modules.medical.common.bo.before.AuditAdvanceWarningAuditDetailResponse;
+
+import java.util.Map;
+
+/**
+ * @author Scott
+ * @time 2023/10/18 15:22 星期三
+ * @description '违规分析服务类'
+ * @parentProject medical-java
+ */
+public interface IViolationAnalysisService {
+    IPage<AuditAdvanceWarningAuditDetailResponse> loadBeforeList(AuditAdvanceWarningAuditDetailResponse advanceWarningAuditDetail, Integer pageNo, Integer pageSize, Map<String, String[]> parameterMap);
+}

+ 54 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/service/impl/ViolationAnalysisServiceImpl.java

@@ -0,0 +1,54 @@
+package org.jeecg.modules.medical.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.modules.medical.common.bo.before.AuditAdvanceWarningAuditDetailResponse;
+import org.jeecg.modules.medical.entity.AdvanceWarningAuditDetail;
+import org.jeecg.modules.medical.service.IAdvanceWarningAuditDetailService;
+import org.jeecg.modules.medical.service.IViolationAnalysisService;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author yaowei
+ * @time 2023/10/18 15:23 星期三
+ * @description '这里写类描述'
+ * @parentProject medical-java
+ */
+@Service
+public class ViolationAnalysisServiceImpl implements IViolationAnalysisService {
+
+    @Autowired
+    private IAdvanceWarningAuditDetailService advanceWarningAuditDetailService;
+
+    @Override
+    public IPage<AuditAdvanceWarningAuditDetailResponse> loadBeforeList(AuditAdvanceWarningAuditDetailResponse advanceWarningAuditDetail, Integer pageNo, Integer pageSize, Map<String, String[]> parameterMap) {
+        IPage<AuditAdvanceWarningAuditDetailResponse> resultPage = new Page<>(pageNo, pageSize);
+
+        AdvanceWarningAuditDetail entity = new AdvanceWarningAuditDetail();
+        BeanUtils.copyProperties(advanceWarningAuditDetail, entity);
+        QueryWrapper<AdvanceWarningAuditDetail> queryWrapper = QueryGenerator.initQueryWrapper(entity, parameterMap);
+        Page<AdvanceWarningAuditDetail> page = new Page<AdvanceWarningAuditDetail>(pageNo, pageSize);
+        IPage<AdvanceWarningAuditDetail> pageList = advanceWarningAuditDetailService.page(page, queryWrapper);
+        List<AdvanceWarningAuditDetail> records = pageList.getRecords();
+        if (!CollectionUtils.isEmpty(records)) {
+            List<AuditAdvanceWarningAuditDetailResponse> resultLists = new ArrayList<>();
+            for (AdvanceWarningAuditDetail record : records) {
+                AuditAdvanceWarningAuditDetailResponse r = new AuditAdvanceWarningAuditDetailResponse();
+                BeanUtils.copyProperties(record, r);
+                resultLists.add(r);
+            }
+            BeanUtils.copyProperties(page, resultPage);
+            resultPage.setRecords(resultLists);
+        }
+        return resultPage;
+    }
+}