医生排班

This commit is contained in:
2025-12-10 15:44:36 +08:00
parent b863c14f2b
commit 391506e423
18 changed files with 747 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
package com.openhis.web.appointmentmanage.appservice;
import com.core.common.core.domain.R;
import com.openhis.administration.domain.DoctorSchedule;
public interface IDoctorScheduleAppService {
R<?> addDoctorSchedule(DoctorSchedule doctorSchedule);
R<?> removeDoctorSchedule(Integer doctorScheduleId);
}

View File

@@ -0,0 +1,35 @@
package com.openhis.web.appointmentmanage.appservice.impl;
import cn.hutool.core.util.ObjectUtil;
import com.core.common.core.domain.R;
import com.openhis.administration.domain.DoctorSchedule;
import com.openhis.administration.service.IDoctorScheduleService;
import com.openhis.web.appointmentmanage.appservice.IDoctorScheduleAppService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
public class DoctorScheduleAppServiceImpl implements IDoctorScheduleAppService {
@Resource
private IDoctorScheduleService doctorScheduleService;
@Override
public R<?> addDoctorSchedule(DoctorSchedule doctorSchedule) {
if (ObjectUtil.isEmpty(doctorSchedule)) {
return R.fail("医生排班不能为空");
}
boolean save = doctorScheduleService.save(doctorSchedule);
return R.ok(save);
}
@Override
public R<?> removeDoctorSchedule(Integer doctorScheduleId) {
if (doctorScheduleId == null && ObjectUtil.isEmpty(doctorScheduleId)) {
return R.fail("排班id不能为空");
}
boolean remove = doctorScheduleService.removeById(doctorScheduleId);
return R.ok(remove);
}
}

View File

@@ -0,0 +1,35 @@
package com.openhis.web.appointmentmanage.controller;
import com.core.common.core.domain.R;
import com.openhis.administration.domain.DoctorSchedule;
import com.openhis.web.appointmentmanage.appservice.IDoctorScheduleAppService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.websocket.server.PathParam;
@RestController
@RequestMapping("/doctor-schedule")
public class DoctorScheduleController {
@Resource
private IDoctorScheduleAppService doctorScheduleAppService;
/*
* 新增医生排班
*
* */
@PostMapping("/add")
public R<?> addDoctorSchedule(@RequestBody DoctorSchedule doctorSchedule) {
return R.ok(doctorScheduleAppService.addDoctorSchedule(doctorSchedule));
}
/*
* 删除医生排班
*
* */
@DeleteMapping("/delete/{doctorScheduleId}")
public R<?> removeDoctorSchedule(@PathVariable Integer doctorScheduleId){
return R.ok(doctorScheduleAppService.removeDoctorSchedule(doctorScheduleId));
}
}

View File

@@ -0,0 +1,7 @@
package com.openhis.web.appointmentmanage.mapper;
import org.springframework.stereotype.Repository;
@Repository
public interface DoctorScheduleAppMapper {
}