提交 f14056fb authored 作者: 杨凯's avatar 杨凯

feat:家庭医生初始化

上级 c9ca2df1
......@@ -13,11 +13,13 @@ import com.ebaiyihui.family.doctor.common.dto.*;
import com.ebaiyihui.family.doctor.common.vo.*;
import com.ebaiyihui.family.doctor.server.common.constants.ImConstants;
import com.ebaiyihui.family.doctor.server.common.enums.SignStatus;
import com.ebaiyihui.family.doctor.server.entity.PatientEntity;
import com.ebaiyihui.family.doctor.server.entity.PatientSignEntity;
import com.ebaiyihui.family.doctor.server.entity.ServiceConfigEntity;
import com.ebaiyihui.family.doctor.server.feign.DepartmentFeignClient;
import com.ebaiyihui.family.doctor.server.feign.DoctorInfofeignClient;
import com.ebaiyihui.family.doctor.server.feign.DoctorWorkingServiceClient;
import com.ebaiyihui.family.doctor.server.mapper.PatientMapper;
import com.ebaiyihui.family.doctor.server.mapper.PatientSignMapper;
import com.ebaiyihui.family.doctor.server.mapper.ServiceConfigMapper;
import com.ebaiyihui.family.doctor.server.service.DoctorService;
......@@ -33,6 +35,7 @@ import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
/**
......@@ -48,6 +51,9 @@ public class DoctorServiceImpl implements DoctorService {
@Autowired
private PatientSignMapper patientSignMapper;
@Autowired
private PatientMapper patientMapper;
@Autowired
private ServiceConfigMapper serviceConfigMapper;
......@@ -78,6 +84,15 @@ public class DoctorServiceImpl implements DoctorService {
patientSignEntity.setPatientId(reqVo.getPatientId());
patientSignEntity.setOrganId(reqVo.getOrganId());
patientSignEntity.setSignStatus(SignStatus.SIGNED.getValue());
QueryWrapper<PatientEntity> pWrapper = new QueryWrapper<>();
PatientEntity patient = new PatientEntity();
patient.setId(reqVo.getPatientId());
pWrapper.setEntity(patient);
PatientEntity patientEntity = patientMapper.selectOne(pWrapper);
if (Objects.nonNull(patientEntity)) {
patientSignEntity.setPatientPhone(patientEntity.getPhone());
}
wrapper.setEntity(patientSignEntity);
wrapper.orderByDesc("create_time");
wrapper.last("limit 1");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论