|
@@ -3,11 +3,9 @@ package com.diagbot.facade;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.diagbot.dto.SysPlanInfoDTO;
|
|
|
import com.diagbot.dto.SysSetInfoDTO;
|
|
|
-import com.diagbot.entity.SysPlan;
|
|
|
-import com.diagbot.entity.SysSet;
|
|
|
+import com.diagbot.entity.Plan;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.enums.StatusEnum;
|
|
|
-import com.diagbot.enums.SysTypeEnum;
|
|
|
import com.diagbot.service.impl.SysPlanServiceImpl;
|
|
|
import com.diagbot.util.BeanUtil;
|
|
|
import com.diagbot.util.StringUtil;
|
|
@@ -32,24 +30,24 @@ public class SysPlanFacade extends SysPlanServiceImpl {
|
|
|
public SysPlanInfoDTO getSysPlanInfoData(HospitalPlanVO hospitalPlanVO) {
|
|
|
//查询该医院有没有相关方案配置, 要是没有取默认的
|
|
|
SysPlanInfoDTO sysPlanInfoDTO = new SysPlanInfoDTO();
|
|
|
- QueryWrapper<SysPlan> sysPlanInfo = new QueryWrapper<>();
|
|
|
+ QueryWrapper<Plan> sysPlanInfo = new QueryWrapper<>();
|
|
|
sysPlanInfo.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
sysPlanInfo.eq("hospital_id", hospitalPlanVO.getHospitalId());
|
|
|
sysPlanInfo.eq(StringUtil.isNotBlank(hospitalPlanVO.getPlanCode()), "plan_code", hospitalPlanVO.getPlanCode());
|
|
|
sysPlanInfo.eq("plan_status", StatusEnum.Enable.getKey());
|
|
|
- SysPlan sysPlanInfoData = getOne(sysPlanInfo, false);
|
|
|
+ Plan sysPlanInfoData = getOne(sysPlanInfo, false);
|
|
|
Long planId = -1L;
|
|
|
Long hospitalId = hospitalPlanVO.getHospitalId();
|
|
|
if (sysPlanInfoData != null) {
|
|
|
BeanUtil.copyProperties(sysPlanInfoData, sysPlanInfoDTO);
|
|
|
planId = sysPlanInfoDTO.getId();
|
|
|
} else {
|
|
|
- QueryWrapper<SysPlan> sysPlandefault = new QueryWrapper<>();
|
|
|
+ QueryWrapper<Plan> sysPlandefault = new QueryWrapper<>();
|
|
|
sysPlandefault.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
sysPlandefault.eq("hospital_id", -1);
|
|
|
sysPlandefault.eq(StringUtil.isNotBlank(hospitalPlanVO.getPlanCode()), "plan_code", hospitalPlanVO.getPlanCode());
|
|
|
sysPlandefault.eq("plan_status", StatusEnum.Enable.getKey());
|
|
|
- SysPlan sysPlandefaultData = getOne(sysPlandefault, false);
|
|
|
+ Plan sysPlandefaultData = getOne(sysPlandefault, false);
|
|
|
if (sysPlandefaultData != null) {
|
|
|
planId = sysPlandefaultData.getId();
|
|
|
hospitalId = sysPlandefaultData.getHospitalId();
|