|
@@ -71,7 +71,7 @@ public class PlanFacade extends PlanServiceImpl {
|
|
|
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_code", "plan_default");
|
|
|
sysPlandefault.eq("plan_status", StatusEnum.Enable.getKey());
|
|
|
List<Plan> sysPlandefaultData = list(sysPlandefault);
|
|
|
if (ListUtil.isNotEmpty(sysPlandefaultData)) {
|
|
@@ -82,6 +82,9 @@ public class PlanFacade extends PlanServiceImpl {
|
|
|
}
|
|
|
hospitalId = -1L;
|
|
|
}
|
|
|
+ if(ListUtil.isEmpty(planId)){
|
|
|
+ throw new CommonException(CommonErrorCode.NOT_EXISTS, "该医院没有配置默认方案或原始默认方案未添加");
|
|
|
+ }
|
|
|
HospitalSetVO hospitalSetVO = new HospitalSetVO();
|
|
|
hospitalSetVO.setHospitalId(hospitalId);
|
|
|
hospitalSetVO.setPlanId(planId);
|