|
@@ -52,7 +52,7 @@ public class PlanFacade extends PlanServiceImpl {
|
|
|
PlanDetailFacade sysSetFacade;
|
|
|
|
|
|
public List<SysPlanInfoDTO> getSysPlanInfoData(HospitalPlanVO hospitalPlanVO) {
|
|
|
- //查询该医院有没有相关方案配置, 要是没有取默认的
|
|
|
+ //查询该医院有没有相关方案配置
|
|
|
List<SysPlanInfoDTO> sysPlanInfoDTO = new ArrayList<>();
|
|
|
QueryWrapper<Plan> sysPlanInfo = new QueryWrapper<>();
|
|
|
sysPlanInfo.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
@@ -67,23 +67,9 @@ public class PlanFacade extends PlanServiceImpl {
|
|
|
for (SysPlanInfoDTO data : sysPlanInfoDTO) {
|
|
|
planId.add(data.getId());
|
|
|
}
|
|
|
- } else {
|
|
|
- QueryWrapper<Plan> sysPlandefault = new QueryWrapper<>();
|
|
|
- sysPlandefault.eq("is_deleted", IsDeleteEnum.N.getKey());
|
|
|
- sysPlandefault.eq("hospital_id", -1);
|
|
|
- sysPlandefault.eq("plan_code", "plan_default");
|
|
|
- sysPlandefault.eq("plan_status", StatusEnum.Enable.getKey());
|
|
|
- List<Plan> sysPlandefaultData = list(sysPlandefault);
|
|
|
- if (ListUtil.isNotEmpty(sysPlandefaultData)) {
|
|
|
- sysPlanInfoDTO = BeanUtil.listCopyTo(sysPlandefaultData, SysPlanInfoDTO.class);
|
|
|
- for (SysPlanInfoDTO data : sysPlanInfoDTO) {
|
|
|
- planId.add(data.getId());
|
|
|
- }
|
|
|
- }
|
|
|
- hospitalId = -1L;
|
|
|
}
|
|
|
if(ListUtil.isEmpty(planId)){
|
|
|
- throw new CommonException(CommonErrorCode.NOT_EXISTS, "该医院没有配置默认方案或原始默认方案未添加");
|
|
|
+ throw new CommonException(CommonErrorCode.NOT_EXISTS, "该医院没有配置方案,请先配置方案!");
|
|
|
}
|
|
|
HospitalSetVO hospitalSetVO = new HospitalSetVO();
|
|
|
hospitalSetVO.setHospitalId(hospitalId);
|