|
@@ -4,9 +4,12 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.diagbot.dto.PlanDetailDTO;
|
|
|
+import com.diagbot.dto.PlanDetailDefaultDTO;
|
|
|
+import com.diagbot.dto.PlanInfoDefaultDTO;
|
|
|
import com.diagbot.dto.PlanInfoPageDTO;
|
|
|
import com.diagbot.dto.SysPlanInfoDTO;
|
|
|
import com.diagbot.entity.Plan;
|
|
|
+import com.diagbot.entity.PlanDetail;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
|
import com.diagbot.enums.StatusEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
@@ -225,4 +228,21 @@ public class PlanFacade extends PlanServiceImpl {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ public PlanInfoDefaultDTO getDefaultPlan() {
|
|
|
+ PlanInfoDefaultDTO data = new PlanInfoDefaultDTO();
|
|
|
+ QueryWrapper<Plan> planFand = new QueryWrapper<>();
|
|
|
+ planFand.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("plan_code", "plan_default")
|
|
|
+ .eq("hospital_id", 0L);
|
|
|
+ Plan plan = getOne(planFand, false);
|
|
|
+ BeanUtil.copyProperties(plan, data);
|
|
|
+ QueryWrapper<PlanDetail> planDetailFand = new QueryWrapper<>();
|
|
|
+ planDetailFand.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("plan_id", plan.getId())
|
|
|
+ .eq("hospital_id", 0);
|
|
|
+ List<PlanDetail> list = sysSetFacade.list(planDetailFand);
|
|
|
+ List<PlanDetailDefaultDTO> listDefault = BeanUtil.listCopyTo(list, PlanDetailDefaultDTO.class);
|
|
|
+ data.setPlanDetailDefault(listDefault);
|
|
|
+ return data;
|
|
|
+ }
|
|
|
}
|