|
@@ -14,6 +14,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
import com.lemon.lifecenter.common.LifeCenterConfigVO;
|
|
|
import com.lemon.lifecenter.common.LifeCenterController;
|
|
|
+import com.lemon.lifecenter.common.LifeCenterFunction;
|
|
|
import com.lemon.lifecenter.common.LifeCenterPaging;
|
|
|
import com.lemon.lifecenter.dto.ApiMonitorDTO;
|
|
|
import com.lemon.lifecenter.dto.CenterInfoDTO;
|
|
@@ -74,8 +75,32 @@ public class ApiMonitoringController extends LifeCenterController {
|
|
|
}
|
|
|
|
|
|
@RequestMapping("/chart")
|
|
|
- public ModelAndView chart() {
|
|
|
+ public ModelAndView chart(@ModelAttribute("dto") ApiMonitorDTO dto,
|
|
|
+ @RequestParam(value="centerName", required=false, defaultValue="") String centerName,
|
|
|
+ @RequestParam(value="locationCode", required=false, defaultValue="") String locationCode,
|
|
|
+ @RequestParam(value="startDate", required=false, defaultValue="") String startDate,
|
|
|
+ @RequestParam(value="endDate", required=false, defaultValue="") String endDate) {
|
|
|
+
|
|
|
+ if( endDate.equals( "" ) ) {
|
|
|
+ endDate = LifeCenterFunction.getNow( "yyyy-MM-dd" );
|
|
|
+ }
|
|
|
+
|
|
|
+ if( startDate.equals( "" ) ) {
|
|
|
+ //기록상 최초 환자 입소일 이후부터 계산
|
|
|
+ startDate = "2021-02-15";
|
|
|
+ }
|
|
|
+
|
|
|
+ dto.setEndDate(endDate);
|
|
|
+ dto.setStartDate(startDate);
|
|
|
+
|
|
|
+ List<ApiMonitorDTO> charList = monitorService.selectStatisticsChart(dto);
|
|
|
+
|
|
|
ModelAndView mv = setMV("api/monitor/chart");
|
|
|
+ mv.addObject("startDate", startDate);
|
|
|
+ mv.addObject("endDate", endDate);
|
|
|
+ mv.addObject("locationCode", locationCode);
|
|
|
+ mv.addObject("centerName", centerName);
|
|
|
+ mv.addObject("chart", charList);
|
|
|
return mv;
|
|
|
}
|
|
|
|