|
|
@ -4,8 +4,7 @@ package com.supervision.service.impl;
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
import com.supervision.constant.TreatmentPlanIdConstant;
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
import com.supervision.exception.BusinessException;
|
|
|
|
|
|
|
|
import com.supervision.model.*;
|
|
|
|
import com.supervision.model.*;
|
|
|
|
import com.supervision.model.Process;
|
|
|
|
import com.supervision.model.Process;
|
|
|
|
import com.supervision.pojo.vo.*;
|
|
|
|
import com.supervision.pojo.vo.*;
|
|
|
@ -15,9 +14,7 @@ import com.supervision.vo.result.AncillaryRecordByResultDAO;
|
|
|
|
import com.supervision.vo.result.PhysicalRecordByResultDAO;
|
|
|
|
import com.supervision.vo.result.PhysicalRecordByResultDAO;
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
|
|
import java.util.function.Function;
|
|
|
|
import java.util.function.Function;
|
|
|
@ -81,7 +78,7 @@ public class AskDiagnosisResultServiceImpl implements AskDiagnosisResultService
|
|
|
|
DealPlanResVO dealPlanResVO = new DealPlanResVO();
|
|
|
|
DealPlanResVO dealPlanResVO = new DealPlanResVO();
|
|
|
|
|
|
|
|
|
|
|
|
// 1. 查询处置计划记录
|
|
|
|
// 1. 查询处置计划记录
|
|
|
|
List<TreatmentPlanRecord> treatmentPlanRecordList = treatmentPlanRecordService.lambdaQuery().eq(TreatmentPlanRecord::getProcessId, processId).list();
|
|
|
|
List<TreatmentPlanRecord> treatmentPlanRecordList = treatmentPlanRecordService.queryByProcessId(processId);
|
|
|
|
if (CollectionUtil.isEmpty(treatmentPlanRecordList)) {
|
|
|
|
if (CollectionUtil.isEmpty(treatmentPlanRecordList)) {
|
|
|
|
return dealPlanResVO;
|
|
|
|
return dealPlanResVO;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -99,10 +96,9 @@ public class AskDiagnosisResultServiceImpl implements AskDiagnosisResultService
|
|
|
|
ArrayList<DealPlanResVO.TreatmentPlanResult> otherTreatmentPlanResults = new ArrayList<>();
|
|
|
|
ArrayList<DealPlanResVO.TreatmentPlanResult> otherTreatmentPlanResults = new ArrayList<>();
|
|
|
|
for (TreatmentPlanRecord treatmentPlanRecord : treatmentPlanRecordList) {
|
|
|
|
for (TreatmentPlanRecord treatmentPlanRecord : treatmentPlanRecordList) {
|
|
|
|
DealPlanResVO.TreatmentPlanResult bean = BeanUtil.toBean(treatmentPlanRecord, DealPlanResVO.TreatmentPlanResult.class);
|
|
|
|
DealPlanResVO.TreatmentPlanResult bean = BeanUtil.toBean(treatmentPlanRecord, DealPlanResVO.TreatmentPlanResult.class);
|
|
|
|
//药物id 8055ef3412a69f95
|
|
|
|
boolean flag = StrUtil.isNotEmpty(bean.getDrugId()) ? drugIds.contains(bean.getDrugId()) : planIds.contains(bean.getTreatmentPlanId());
|
|
|
|
boolean flag = bean.getDisposalPlan().equals(TreatmentPlanIdConstant.DRUG_ID) ? drugIds.contains(bean.getDrugId()) : planIds.contains(bean.getTreatmentPlanId());
|
|
|
|
|
|
|
|
bean.setFlag(flag ? 1 : 0);
|
|
|
|
bean.setFlag(flag ? 1 : 0);
|
|
|
|
if (bean.getDisposalPlan().equals(TreatmentPlanIdConstant.DRUG_ID)) {
|
|
|
|
if (StrUtil.isNotEmpty(bean.getDrugId())) {
|
|
|
|
drugTreatmentPlanResults.add(bean);
|
|
|
|
drugTreatmentPlanResults.add(bean);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
otherTreatmentPlanResults.add(bean);
|
|
|
|
otherTreatmentPlanResults.add(bean);
|
|
|
|