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

feat:家庭医生初始化

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