Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

lenovodn 2 лет назад
Родитель
Сommit
bb4544331b

+ 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);
+}

+ 14 - 4
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/service/impl/HomePageServiceImpl.java

@@ -1,6 +1,7 @@
 package org.jeecg.modules.medical.service.impl;
 
 import com.alibaba.fastjson.JSONObject;
+import org.aspectj.lang.annotation.Before;
 import org.jeecg.modules.medical.response.DashboardStatisticsBarResponse;
 import org.jeecg.modules.medical.response.DashboardStatisticsDetailedItem;
 import org.jeecg.modules.medical.response.DashboardStatisticsLineResponse;
@@ -256,11 +257,13 @@ public class HomePageServiceImpl implements IHomePageService {
      * @return
      */
     private DashboardStatisticsDetailedItem generateAfterDoctorsViolateTop(DashboardStatisticsBarResponse sourceData) {
+        Integer afterSupervisoryTotal = sourceData.getAfterSupervisoryTotal();
         DashboardStatisticsDetailedItem afterDoctorsViolateTop = new DashboardStatisticsDetailedItem();
         afterDoctorsViolateTop.setTitle("事中医生违规数排名前五");
+        afterDoctorsViolateTop.setTotal(afterSupervisoryTotal);
         ArrayList<JSONObject> rule1 = new ArrayList<>();
 
-        Integer afterSupervisoryTotal = sourceData.getAfterSupervisoryTotal();
+
         BigDecimal top1 = new BigDecimal(afterSupervisoryTotal).multiply(new BigDecimal("0.25")).setScale(0, BigDecimal.ROUND_HALF_DOWN);
         BigDecimal top2 = new BigDecimal(afterSupervisoryTotal).multiply(new BigDecimal("0.13")).setScale(0, BigDecimal.ROUND_HALF_DOWN);
         BigDecimal top3 = new BigDecimal(afterSupervisoryTotal).multiply(new BigDecimal("0.15")).setScale(0, BigDecimal.ROUND_HALF_DOWN);
@@ -302,11 +305,13 @@ public class HomePageServiceImpl implements IHomePageService {
      * @return
      */
     private DashboardStatisticsDetailedItem generateMiddleDoctorsViolateTop(DashboardStatisticsBarResponse sourceData) {
+        // 事中提醒总和
+        Integer middleReviewTotal = sourceData.getMiddleReviewTotal();
         DashboardStatisticsDetailedItem middleDoctorsViolateTop = new DashboardStatisticsDetailedItem();
         middleDoctorsViolateTop.setTitle("事中医生违规数排名前五");
+        middleDoctorsViolateTop.setTotal(middleReviewTotal);
         ArrayList<JSONObject> rule1 = new ArrayList<>();
-        // 事中提醒总和
-        Integer middleReviewTotal = sourceData.getMiddleReviewTotal();
+
         BigDecimal top1 = new BigDecimal(middleReviewTotal).multiply(new BigDecimal("0.25")).setScale(0, BigDecimal.ROUND_HALF_DOWN);
         BigDecimal top2 = new BigDecimal(middleReviewTotal).multiply(new BigDecimal("0.13")).setScale(0, BigDecimal.ROUND_HALF_DOWN);
         BigDecimal top3 = new BigDecimal(middleReviewTotal).multiply(new BigDecimal("0.15")).setScale(0, BigDecimal.ROUND_HALF_DOWN);
@@ -351,6 +356,7 @@ public class HomePageServiceImpl implements IHomePageService {
         afterRulesTop.setTitle("事后规则类型排名");
         ArrayList<JSONObject> rule1 = new ArrayList<>();
         Integer afterSupervisoryTotal = sourceData.getAfterSupervisoryTotal();
+        afterRulesTop.setTotal(afterSupervisoryTotal);
         BigDecimal top1 = new BigDecimal(afterSupervisoryTotal).multiply(new BigDecimal("0.25")).setScale(0, BigDecimal.ROUND_HALF_DOWN);
         BigDecimal top2 = new BigDecimal(afterSupervisoryTotal).multiply(new BigDecimal("0.13")).setScale(0, BigDecimal.ROUND_HALF_DOWN);
         BigDecimal top3 = new BigDecimal(afterSupervisoryTotal).multiply(new BigDecimal("0.15")).setScale(0, BigDecimal.ROUND_HALF_DOWN);
@@ -396,6 +402,7 @@ public class HomePageServiceImpl implements IHomePageService {
         ArrayList<JSONObject> rule1 = new ArrayList<>();
 
         Integer middleReviewTotal = sourceData.getMiddleReviewTotal();
+        middleRulesTop.setTotal(middleReviewTotal);
         BigDecimal top1 = new BigDecimal(middleReviewTotal).multiply(new BigDecimal("0.23")).setScale(0, BigDecimal.ROUND_HALF_DOWN);
         BigDecimal top2 = new BigDecimal(middleReviewTotal).multiply(new BigDecimal("0.16")).setScale(0, BigDecimal.ROUND_HALF_DOWN);
         BigDecimal top3 = new BigDecimal(middleReviewTotal).multiply(new BigDecimal("0.14")).setScale(0, BigDecimal.ROUND_HALF_DOWN);
@@ -431,12 +438,14 @@ public class HomePageServiceImpl implements IHomePageService {
     }
 
     private static DashboardStatisticsDetailedItem generateBeforeRuleTop(DashboardStatisticsBarResponse sourceData) {
+        Integer beforeReminderTotal = sourceData.getBeforeReminderTotal();
         // 生成事前规则类型排名
         DashboardStatisticsDetailedItem beforeRulesTop = new DashboardStatisticsDetailedItem();
         beforeRulesTop.setTitle("事前规则类型排名");
+        beforeRulesTop.setTotal(beforeReminderTotal);
         ArrayList<JSONObject> rule1 = new ArrayList<>();
 
-        Integer beforeReminderTotal = sourceData.getBeforeReminderTotal();
+
         BigDecimal top1 = new BigDecimal(beforeReminderTotal).multiply(new BigDecimal("0.23")).setScale(0, BigDecimal.ROUND_HALF_DOWN);
         BigDecimal top2 = new BigDecimal(beforeReminderTotal).multiply(new BigDecimal("0.17")).setScale(0, BigDecimal.ROUND_HALF_DOWN);
         BigDecimal top3 = new BigDecimal(beforeReminderTotal).multiply(new BigDecimal("0.14")).setScale(0, BigDecimal.ROUND_HALF_DOWN);
@@ -445,6 +454,7 @@ public class HomePageServiceImpl implements IHomePageService {
         JSONObject item1 = new JSONObject();
         item1.put("title", "频繁门诊");
         item1.put("total", top1);
+
         rule1.add(item1);
 
         JSONObject item2 = new JSONObject();

+ 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;
+    }
+}