提交 19923e80 authored 作者: 杨凯's avatar 杨凯

feat:家庭医生初始化

上级 5e6de5f5
...@@ -79,6 +79,14 @@ public class ServiceConfigServiceImpl implements ServiceConfigService { ...@@ -79,6 +79,14 @@ public class ServiceConfigServiceImpl implements ServiceConfigService {
throw new BusinessException("未查询到该医生上下线配置信息!"); throw new BusinessException("未查询到该医生上下线配置信息!");
} }
String date = DateUtils.dateToSimpleString(new Date());
String hourAndSecond = DateUtils.getHourAndSecond();
// 查询排班医生信息
List<ScheduleRecordEntity> scheduleRecordEntities = scheduleRecordMapper.selectByDate(String.valueOf(CommonConstants.ORGAN_CODE), 5, date, 1, hourAndSecond, serviceConfigEntity.getDoctorId());
if (!scheduleRecordEntities.isEmpty()){
throw new BusinessException("不能上下线,您今天有值班!");
}
serviceConfigEntity.setOfficeStatus(requestOnlineOrOfflineVo.getOfficeStatus()); serviceConfigEntity.setOfficeStatus(requestOnlineOrOfflineVo.getOfficeStatus());
int flag = serviceConfigMapper.updateById(serviceConfigEntity); int flag = serviceConfigMapper.updateById(serviceConfigEntity);
if (flag <= 0) { if (flag <= 0) {
...@@ -88,14 +96,6 @@ public class ServiceConfigServiceImpl implements ServiceConfigService { ...@@ -88,14 +96,6 @@ public class ServiceConfigServiceImpl implements ServiceConfigService {
throw new BusinessException("上线失败"); throw new BusinessException("上线失败");
} }
} }
String date = DateUtils.dateToSimpleString(new Date());
String hourAndSecond = DateUtils.getHourAndSecond();
// 查询排班医生信息
List<ScheduleRecordEntity> scheduleRecordEntities = scheduleRecordMapper.selectByDate(String.valueOf(CommonConstants.ORGAN_CODE), 5, date, 1, hourAndSecond, serviceConfigEntity.getDoctorId());
if (!scheduleRecordEntities.isEmpty()){
throw new BusinessException("不能上下线,您今天有值班!");
}
return requestOnlineOrOfflineVo; return requestOnlineOrOfflineVo;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论