|
@@ -4,6 +4,7 @@ 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.PlanInfoDefaultDTO;
|
|
|
import com.diagbot.dto.PlanInfoPagesDTO;
|
|
|
import com.diagbot.entity.Plan;
|
|
|
import com.diagbot.enums.IsDeleteEnum;
|
|
@@ -66,10 +67,10 @@ public class PlanFacade extends PlanServiceImpl {
|
|
|
UpdateWrapper<Plan> planQuery = new UpdateWrapper<>();
|
|
|
planQuery.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("id", hospitalPlanSaveVO.getId())
|
|
|
- .set("gmt_modified",now)
|
|
|
+ .set("gmt_modified", now)
|
|
|
.set("gmt_create", now)
|
|
|
- .set("creator",UserUtils.getCurrentPrincipleID())
|
|
|
- .set("modifier",UserUtils.getCurrentPrincipleID())
|
|
|
+ .set("creator", UserUtils.getCurrentPrincipleID())
|
|
|
+ .set("modifier", UserUtils.getCurrentPrincipleID())
|
|
|
.set("hospital_id", hospitalPlanSaveVO.getHospitalId())
|
|
|
.set("plan_name", hospitalPlanSaveVO.getPlanName())
|
|
|
.set("plan_code", hospitalPlanSaveVO.getPlanCode())
|
|
@@ -180,12 +181,21 @@ public class PlanFacade extends PlanServiceImpl {
|
|
|
}
|
|
|
|
|
|
|
|
|
- public List<PlanInfoPagesDTO> getPlansDefaults() {
|
|
|
- List<Plan> list = this.list(new QueryWrapper<Plan>()
|
|
|
- .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .eq("hospital_id", 0
|
|
|
- ));
|
|
|
- List<PlanInfoPagesDTO> data = BeanUtil.listCopyTo(list,PlanInfoPagesDTO.class);
|
|
|
+ public PlanInfoDefaultDTO getPlansDefaults() {
|
|
|
+ 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);
|
|
|
+ List<Long> planId = new ArrayList<>();
|
|
|
+ planId.add(plan.getId());
|
|
|
+ HospitalSetVO hospitalSetVO = new HospitalSetVO();
|
|
|
+ hospitalSetVO.setHospitalId(0L);
|
|
|
+ hospitalSetVO.setPlanId(planId);
|
|
|
+ List<PlanDetailDTO> sysSetInfoData = planDetailFacade.getSysSetInfoData(hospitalSetVO);
|
|
|
+ data.setPlanDetailDefault(sysSetInfoData);
|
|
|
return data;
|
|
|
}
|
|
|
|