|
@@ -5,6 +5,7 @@ import cn.hnthyy.thmz.Utils.TokenUtil;
|
|
|
import cn.hnthyy.thmz.comment.UserLoginToken;
|
|
|
import cn.hnthyy.thmz.entity.thmz.ScheduleOfMedical;
|
|
|
import cn.hnthyy.thmz.entity.thmz.User;
|
|
|
+import cn.hnthyy.thmz.enums.YesNoEnum;
|
|
|
import cn.hnthyy.thmz.service.his.ZdUnitCodeService;
|
|
|
import cn.hnthyy.thmz.service.thmz.ScheduleOfMedicalService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -156,7 +157,17 @@ public class ScheduleOfMedicalController {
|
|
|
resultMap.put("message", "删除id查询医技预约排班失败,参数为空");
|
|
|
return resultMap;
|
|
|
}
|
|
|
-
|
|
|
+ ScheduleOfMedical scheduleOfMedical=scheduleOfMedicalService.queryScheduleOfMedicalById(id);
|
|
|
+ if(scheduleOfMedical==null){
|
|
|
+ resultMap.put("code", -1);
|
|
|
+ resultMap.put("message", "删除id查询医技预约排班失败,不存在对应的排班");
|
|
|
+ return resultMap;
|
|
|
+ }
|
|
|
+ if(YesNoEnum.YES.code.equals(scheduleOfMedical.getStatus())){
|
|
|
+ resultMap.put("code", -1);
|
|
|
+ resultMap.put("message", "无法删除已经被预约的排班信息!");
|
|
|
+ return resultMap;
|
|
|
+ }
|
|
|
int num =scheduleOfMedicalService.removeScheduleOfMedical(id);
|
|
|
if(num==1){
|
|
|
resultMap.put("code", 0);
|