提交 253ca35f authored 作者: 杨凯's avatar 杨凯

feat:家庭医生初始化

上级 e67d08cf
...@@ -9,7 +9,6 @@ import com.ebaiyihui.family.doctor.common.dto.*; ...@@ -9,7 +9,6 @@ import com.ebaiyihui.family.doctor.common.dto.*;
import com.ebaiyihui.family.doctor.common.vo.*; import com.ebaiyihui.family.doctor.common.vo.*;
import com.ebaiyihui.family.doctor.server.common.enums.WhetherEnum; import com.ebaiyihui.family.doctor.server.common.enums.WhetherEnum;
import com.ebaiyihui.family.doctor.server.entity.ScheduleRecordEntity; import com.ebaiyihui.family.doctor.server.entity.ScheduleRecordEntity;
import com.ebaiyihui.family.doctor.server.entity.ServiceConfigEntity;
import com.ebaiyihui.family.doctor.server.feign.DoctorInfofeignClient; import com.ebaiyihui.family.doctor.server.feign.DoctorInfofeignClient;
import com.ebaiyihui.family.doctor.server.mapper.ScheduleRecordMapper; import com.ebaiyihui.family.doctor.server.mapper.ScheduleRecordMapper;
import com.ebaiyihui.family.doctor.server.service.ScheduleRecordService; import com.ebaiyihui.family.doctor.server.service.ScheduleRecordService;
...@@ -161,6 +160,7 @@ public class ScheduleRecordServiceImpl implements ScheduleRecordService { ...@@ -161,6 +160,7 @@ public class ScheduleRecordServiceImpl implements ScheduleRecordService {
timeIntervalEntity.setHospitalId(String.valueOf(requestGetScheduleForWeekDTO.getHospitalId())); timeIntervalEntity.setHospitalId(String.valueOf(requestGetScheduleForWeekDTO.getHospitalId()));
timeIntervalEntity.setDoctorId(requestGetScheduleForWeekDTO.getDoctorId()); timeIntervalEntity.setDoctorId(requestGetScheduleForWeekDTO.getDoctorId());
timeIntervalEntity.setDeptId(String.valueOf(requestGetScheduleForWeekDTO.getDeptId())); timeIntervalEntity.setDeptId(String.valueOf(requestGetScheduleForWeekDTO.getDeptId()));
timeIntervalEntity.setScheduleDate(weekDay);
timeIntervalEntity.setScheduleRange(j); timeIntervalEntity.setScheduleRange(j);
queryWrapper.setEntity(timeIntervalEntity); queryWrapper.setEntity(timeIntervalEntity);
ScheduleRecordEntity scheduleTimeIntervalEntity = scheduleRecordMapper.selectOne(queryWrapper); ScheduleRecordEntity scheduleTimeIntervalEntity = scheduleRecordMapper.selectOne(queryWrapper);
...@@ -171,25 +171,25 @@ public class ScheduleRecordServiceImpl implements ScheduleRecordService { ...@@ -171,25 +171,25 @@ public class ScheduleRecordServiceImpl implements ScheduleRecordService {
} }
scheduleOfDayVo.setScheduleTimeSaveListVo(saveListVo); scheduleOfDayVo.setScheduleTimeSaveListVo(saveListVo);
List<ScheduleRecordVo> scheduleRecordVoList = new ArrayList<>(); // List<ScheduleRecordVo> scheduleRecordVoList = new ArrayList<>();
if (!recordEntityList.isEmpty()) { // if (!recordEntityList.isEmpty()) {
for (ScheduleRecordEntity scheduleRecordEntity : recordEntityList) { // for (ScheduleRecordEntity scheduleRecordEntity : recordEntityList) {
if (DateUtils.dateToSimpleString(scheduleRecordEntity.getScheduleDate()).equals(DateUtils.dateToSimpleString(weekDay)) && scheduleRecordEntity.getScheduleRange().equals(j)) { // if (DateUtils.dateToSimpleString(scheduleRecordEntity.getScheduleDate()).equals(DateUtils.dateToSimpleString(weekDay)) && scheduleRecordEntity.getScheduleRange().equals(j)) {
ScheduleRecordVo scheduleRecordVo = new ScheduleRecordVo(); // ScheduleRecordVo scheduleRecordVo = new ScheduleRecordVo();
BeanUtils.copyProperties(scheduleRecordEntity, scheduleRecordVo); // BeanUtils.copyProperties(scheduleRecordEntity, scheduleRecordVo);
QueryWrapper configQuery = new QueryWrapper(); // QueryWrapper configQuery = new QueryWrapper();
//
ServiceConfigEntity configEntity = new ServiceConfigEntity(); // ServiceConfigEntity configEntity = new ServiceConfigEntity();
configEntity.setOrganId(String.valueOf(requestGetScheduleForWeekDTO.getHospitalId())); // configEntity.setOrganId(String.valueOf(requestGetScheduleForWeekDTO.getHospitalId()));
configEntity.setDoctorId(scheduleRecordEntity.getDoctorId()); // configEntity.setDoctorId(scheduleRecordEntity.getDoctorId());
configEntity.setDeptId(Long.parseLong(scheduleRecordEntity.getDeptId())); // configEntity.setDeptId(Long.parseLong(scheduleRecordEntity.getDeptId()));
configQuery.setEntity(configEntity); // configQuery.setEntity(configEntity);
configQuery.last("limit 1"); // configQuery.last("limit 1");
scheduleRecordVoList.add(scheduleRecordVo); // scheduleRecordVoList.add(scheduleRecordVo);
} // }
} // }
} // }
scheduleOfDayVo.setRecordVoList(scheduleRecordVoList); // scheduleOfDayVo.setRecordVoList(scheduleRecordVoList);
scheduleOfDayVoList.add(scheduleOfDayVo); scheduleOfDayVoList.add(scheduleOfDayVo);
} }
scheduleForWeekVo.setScheduleOfDayVoList(scheduleOfDayVoList); scheduleForWeekVo.setScheduleOfDayVoList(scheduleOfDayVoList);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论