|
|
|
@ -7,6 +7,8 @@ import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import com.supervision.manage.service.ConfigTreatmentPlanManageService;
|
|
|
|
|
import com.supervision.manage.service.DiseaseTreatmentPlanManageService;
|
|
|
|
|
import com.supervision.model.DiseaseTreatmentPlan;
|
|
|
|
|
import com.supervision.model.DiseaseTreatmentPlanDrug;
|
|
|
|
|
import com.supervision.service.DiseaseTreatmentPlanDrugService;
|
|
|
|
|
import com.supervision.service.DiseaseTreatmentPlanService;
|
|
|
|
|
import com.supervision.vo.manage.DiseaseTreatmentPlanResVo;
|
|
|
|
|
import com.supervision.vo.manage.DiseaseTreatmentPlanTreeNode;
|
|
|
|
@ -25,6 +27,8 @@ public class DiseaseTreatmentPlanManageServiceImpl implements DiseaseTreatmentPl
|
|
|
|
|
|
|
|
|
|
private final ConfigTreatmentPlanManageService configTreatmentPlanManageService;
|
|
|
|
|
|
|
|
|
|
private final DiseaseTreatmentPlanDrugService diseaseTreatmentPlanDrugService;;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<DiseaseTreatmentPlanResVo> queryListByDiseaseId(String diseaseId) {
|
|
|
|
|
|
|
|
|
@ -39,6 +43,18 @@ public class DiseaseTreatmentPlanManageServiceImpl implements DiseaseTreatmentPl
|
|
|
|
|
|
|
|
|
|
diseaseTreatmentPlanService.save(diseaseTreatmentPlan);
|
|
|
|
|
|
|
|
|
|
// 保存处置计划药品信息
|
|
|
|
|
if (CollUtil.isNotEmpty(diseaseTreatmentPlan.getDrugIds())){
|
|
|
|
|
List<DiseaseTreatmentPlanDrug> diseaseTreatmentPlanDrugList = diseaseTreatmentPlan.getDrugIds().stream().map(item -> {
|
|
|
|
|
DiseaseTreatmentPlanDrug diseaseTreatmentPlanDrug = new DiseaseTreatmentPlanDrug();
|
|
|
|
|
diseaseTreatmentPlanDrug.setDiseaseId(diseaseTreatmentPlan.getDiseaseId());
|
|
|
|
|
diseaseTreatmentPlanDrug.setTreatmentPlanId(diseaseTreatmentPlan.getTreatmentPlanId());
|
|
|
|
|
diseaseTreatmentPlanDrug.setDrugId(item);
|
|
|
|
|
return diseaseTreatmentPlanDrug;
|
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
|
diseaseTreatmentPlanDrugService.saveBatch(diseaseTreatmentPlanDrugList);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return diseaseTreatmentPlan;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|