|
|
@@ -1,5 +1,6 @@
|
|
|
package com.nb.bus.controller;
|
|
|
|
|
|
+import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.nb.bus.enums.StatsAnalyseEnum;
|
|
|
@@ -31,9 +32,8 @@ import java.util.*;
|
|
|
public class BusStatsAnalyseController {
|
|
|
private final Map<StatsAnalyseEnum,CommonStats> statsMap=new EnumMap<>(StatsAnalyseEnum.class);
|
|
|
|
|
|
- private final LocalBusInfusionHistoryService infusionHistoryService;
|
|
|
|
|
|
- public BusStatsAnalyseController(List<CommonStats> statsList, LocalBusInfusionHistoryService infusionHistoryService) {
|
|
|
+ public BusStatsAnalyseController(List<CommonStats> statsList) {
|
|
|
if(CollectionUtil.isNotEmpty(statsList)){
|
|
|
for (CommonStats commonStats : statsList) {
|
|
|
statsMap.merge(commonStats.getId(),commonStats,(t1,t2)->{
|
|
|
@@ -41,10 +41,10 @@ public class BusStatsAnalyseController {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
- this.infusionHistoryService = infusionHistoryService;
|
|
|
}
|
|
|
|
|
|
@PostMapping("/{type}")
|
|
|
+ @SaCheckPermission("stats:analgesia:query")
|
|
|
@ApiOperation("统计")
|
|
|
public R stats(@RequestAttribute("tenantId")@ApiParam(hidden = true) String tenantId,@PathVariable("type")@ApiParam("统计类型 1、PCA镇痛分析 2、提示分析 3、评价分析 4、自控分析 5、输注量分析") Integer type, @RequestBody CombineQuery query){
|
|
|
if (StrUtil.isBlank(tenantId)) {
|