|
@@ -2,12 +2,11 @@ package thyyxxk.webserver.controller.medicaladvice.patientinfo;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
import thyyxxk.webserver.config.auth.PassToken;
|
|
|
+import thyyxxk.webserver.config.exception.ExceptionEnum;
|
|
|
import thyyxxk.webserver.entity.ResultVo;
|
|
|
+import thyyxxk.webserver.entity.inpatient.ZyActpatient;
|
|
|
import thyyxxk.webserver.entity.medicaladvice.medicamanage.MzZyReq;
|
|
|
import thyyxxk.webserver.entity.medicaladvice.medicamanage.ZyBedPreMsg;
|
|
|
import thyyxxk.webserver.entity.medicaladvice.medicamanage.patientinfo.ZyBedMi;
|
|
@@ -45,6 +44,25 @@ public class AdjustBedController {
|
|
|
public ResultVo<IPage<ZyBedPreMsg>> queryZyBedPreMsg(@RequestBody ZyBedPreMsg msg){
|
|
|
return service.queryZyBedPreMsg(msg);
|
|
|
}
|
|
|
+
|
|
|
+ @GetMapping("queryPreAdmiss")
|
|
|
+ public ResultVo<List<ZyActpatient>> queryPreAdmiss(@RequestParam("ward") String ward) {
|
|
|
+ List<ZyActpatient> list = service.queryPreAdmiss(ward);
|
|
|
+ if (null == list || list.isEmpty()) {
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST, "没有待接收的患者。");
|
|
|
+ }
|
|
|
+ return ResultVoUtil.success(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("receivePatient")
|
|
|
+ public ResultVo<String> receivePatient(@RequestBody ZyActpatient actpatient) {
|
|
|
+ int res = service.receivePatient(actpatient);
|
|
|
+ if (res > 0) {
|
|
|
+ return ResultVoUtil.success("接收成功。");
|
|
|
+ }
|
|
|
+ return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST, "接收失败,更新数据失败。");
|
|
|
+ }
|
|
|
+
|
|
|
@PostMapping("getIdleBedNoList")
|
|
|
public ResultVo<List<Map>> getIdleBedNoList(@RequestBody ZyBedPreMsg msg){
|
|
|
return service.getIdleBedNoList(msg);
|