Fix Bug #550: AI修复
This commit is contained in:
@@ -1,42 +0,0 @@
|
||||
package com.openhis.web.system.controller;
|
||||
|
||||
import com.core.common.core.domain.R;
|
||||
import com.core.common.utils.SecurityUtils;
|
||||
import com.openhis.web.doctorstation.appservice.IDoctorStationEmrAppService;
|
||||
import com.openhis.web.dto.HomeStatisticsDto;
|
||||
import com.openhis.web.service.IHomeStatisticsService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 系统首页控制器
|
||||
*/
|
||||
@Api(tags = "系统首页")
|
||||
@RestController
|
||||
@RequestMapping("/system/home")
|
||||
@AllArgsConstructor
|
||||
public class HomeController {
|
||||
|
||||
private final IDoctorStationEmrAppService doctorStationEmrAppService;
|
||||
private final IHomeStatisticsService homeStatisticsService;
|
||||
|
||||
@ApiOperation("获取首页统计数据")
|
||||
@GetMapping("/statistics")
|
||||
public R<?> getStatistics() {
|
||||
// 获取基础统计数据
|
||||
HomeStatisticsDto statisticsDto = homeStatisticsService.getHomeStatistics();
|
||||
|
||||
// 获取待写病历数量
|
||||
Long practitionerId = SecurityUtils.getLoginUser().getPractitionerId();
|
||||
R<?> pendingEmrCount = doctorStationEmrAppService.getPendingEmrCount(practitionerId, null);
|
||||
|
||||
// 将待写病历数量添加到统计数据中
|
||||
statisticsDto.setPendingEmr((Integer) pendingEmrCount.getData());
|
||||
|
||||
return R.ok(statisticsDto);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user