|
|
@@ -1,7 +1,5 @@
|
|
|
package org.jeecg.modules.medical.service.impl;
|
|
|
|
|
|
-import cn.hutool.core.date.DateTime;
|
|
|
-import com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleDateTimeUnit;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import org.jeecg.modules.medical.response.DashboardStatisticsBarResponse;
|
|
|
import org.jeecg.modules.medical.response.DashboardStatisticsDetailedItem;
|
|
|
@@ -13,6 +11,7 @@ import org.jetbrains.annotations.NotNull;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
+import java.sql.Array;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
@@ -150,6 +149,8 @@ public class HomePageServiceImpl implements IHomePageService {
|
|
|
*/
|
|
|
@Override
|
|
|
public DashboardStatisticsViolateResponse loadStatisticsViolateRulesTop(String startTime, String endTime) {
|
|
|
+ DashboardStatisticsBarResponse sourceData = this.loadStatisticsBar(startTime, endTime);
|
|
|
+
|
|
|
DashboardStatisticsViolateResponse result = new DashboardStatisticsViolateResponse();
|
|
|
Date startTimeDate = DateTimeUtil.parse(startTime, DateTimeUtil.FULL_STYLE);
|
|
|
Date endTimeDate = DateTimeUtil.parse(endTime, DateTimeUtil.FULL_STYLE);
|
|
|
@@ -158,11 +159,43 @@ public class HomePageServiceImpl implements IHomePageService {
|
|
|
// 生成事前规则类型排名
|
|
|
DashboardStatisticsDetailedItem beforeRulesTop = new DashboardStatisticsDetailedItem();
|
|
|
beforeRulesTop.setTitle("事前规则类型排名");
|
|
|
+ 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);
|
|
|
+ BigDecimal top4 = new BigDecimal(beforeReminderTotal).multiply(new BigDecimal("0.11")).setScale(0, BigDecimal.ROUND_HALF_DOWN);
|
|
|
+ BigDecimal top5 = new BigDecimal(beforeReminderTotal).multiply(new BigDecimal("0.3")).setScale(0, BigDecimal.ROUND_HALF_DOWN);
|
|
|
+ JSONObject item1 = new JSONObject();
|
|
|
+ item1.put("title", "频繁门诊");
|
|
|
+ item1.put("total", top1);
|
|
|
+ rule1.add(item1);
|
|
|
+
|
|
|
+ JSONObject item2 = new JSONObject();
|
|
|
+ item2.put("title", "即往诊断信息提醒");
|
|
|
+ item2.put("total", top2);
|
|
|
+ rule1.add(item2);
|
|
|
+
|
|
|
+ JSONObject item3 = new JSONObject();
|
|
|
+ item3.put("title", "意外伤害类疾病提醒");
|
|
|
+ item3.put("total", top3);
|
|
|
+ rule1.add(item3);
|
|
|
+
|
|
|
+ JSONObject item4 = new JSONObject();
|
|
|
+ item4.put("title", "死亡人员提示");
|
|
|
+ item4.put("total", top4);
|
|
|
+ rule1.add(item4);
|
|
|
+
|
|
|
+ JSONObject item5 = new JSONObject();
|
|
|
+ item5.put("title", "药品违规提示");
|
|
|
+ item5.put("total", top5);
|
|
|
+ rule1.add(item5);
|
|
|
+
|
|
|
+ beforeRulesTop.setList(rule1);
|
|
|
+ result.setBeforeRulesTop(beforeRulesTop);
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- return null;
|
|
|
+ return result;
|
|
|
}
|
|
|
}
|