|
@@ -1,5 +1,6 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
+import com.diagbot.dto.HospItemDTO;
|
|
|
import com.diagbot.dto.HospNameDTO;
|
|
|
import com.diagbot.dto.OptDTO;
|
|
|
import com.diagbot.dto.OptHospDTO;
|
|
@@ -12,6 +13,7 @@ import com.diagbot.util.HttpUtils;
|
|
|
import com.diagbot.util.ListUtil;
|
|
|
import com.diagbot.util.StringUtil;
|
|
|
import com.diagbot.vo.HospitalVO;
|
|
|
+import com.diagbot.vo.OptHospVO;
|
|
|
import com.diagbot.vo.OptVO;
|
|
|
import io.github.lvyahui8.spring.aggregate.facade.DataBeanAggregateQueryFacade;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -82,6 +84,41 @@ public class OptInfoFacade extends OptInfoServiceImpl {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ public OptDTO getOptSumNoDays(OptVO optVO) {
|
|
|
+ //入参验证
|
|
|
+ if (null != optVO && null != optVO.getStartDate()) {
|
|
|
+ optVO.setStartDate(DateUtil.getFirstTimeOfDay(optVO.getStartDate()));
|
|
|
+ }
|
|
|
+ if (null != optVO && null != optVO.getEndDate()) {
|
|
|
+ optVO.setEndDate(DateUtil.getLastTimeOfDay(optVO.getEndDate()));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (null != optVO && null != optVO.getStartDate() && null != optVO.getEndDate()) {
|
|
|
+ if (DateUtil.after(optVO.getStartDate(), optVO.getEndDate())) {
|
|
|
+ throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "开始时间大于结束时间!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //获取统计数据
|
|
|
+ OptDTO optDTO = new OptDTO();
|
|
|
+
|
|
|
+ try {
|
|
|
+ Map<String, Object> invokeParams = new HashMap<>();
|
|
|
+ invokeParams.put("optVO", optVO);
|
|
|
+ optDTO
|
|
|
+ = dataBeanAggregateQueryFacade.get("getAllOptSumNoDays", invokeParams, OptDTO.class);
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR);
|
|
|
+ }
|
|
|
+ // optDTO.setPvdto(this.getPV(optVO));
|
|
|
+ // optDTO.setPvSum(this.getPVSum(optVO));
|
|
|
+ // optDTO.setUvdto(this.getUV(optVO));
|
|
|
+ // optDTO.setUvSum(this.getUVSum(optVO));
|
|
|
+ // optDTO.setZzdto(this.getZZ(optVO));
|
|
|
+ // optDTO.setZzSum(this.getZZSum(optVO));
|
|
|
+ return optDTO;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
public OptHospDTO getOptSumHosp(OptVO optVO) {
|
|
|
//入参验证
|
|
@@ -113,6 +150,25 @@ public class OptInfoFacade extends OptInfoServiceImpl {
|
|
|
return optHospDTO;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ public List<HospItemDTO> getOptSumHospNoDays(OptHospVO optHospVO) {
|
|
|
+ //入参验证
|
|
|
+ if (null != optHospVO && null != optHospVO.getStartDate()) {
|
|
|
+ optHospVO.setStartDate(DateUtil.getFirstTimeOfDay(optHospVO.getStartDate()));
|
|
|
+ }
|
|
|
+ if (null != optHospVO && null != optHospVO.getEndDate()) {
|
|
|
+ optHospVO.setEndDate(DateUtil.getLastTimeOfDay(optHospVO.getEndDate()));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (null != optHospVO && null != optHospVO.getStartDate() && null != optHospVO.getEndDate()) {
|
|
|
+ if (DateUtil.after(optHospVO.getStartDate(), optHospVO.getEndDate())) {
|
|
|
+ throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "开始时间大于结束时间!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return this.getHospitalPUZ(optHospVO);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
public HospNameDTO getAllHospitalName(){
|
|
|
HospNameDTO hospNameDTO = new HospNameDTO();
|
|
|
List<String> hospitalList = optInfoFacade.getAllHospital();
|