package com.docus.server.message.controller;

import com.docus.server.message.busservice.MzsyBusinessService;
import com.docus.server.message.busservice.NkBusinessService;
import com.docus.server.message.dto.Message;
import com.docus.server.message.dto.MessageResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
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;

/**
 * @author WYBDEV
 */
@Api("梅州三院")
@RestController
@Slf4j
@RequestMapping("/hospital/mzsy")
public class MzsyHospitalController {

    @Autowired
    private MzsyBusinessService mzsyBusinessService;

    @PostMapping("/wsRecordSubmit/do")
    @ApiOperation("梅州三院电子病例提交消息接收")
    public MessageResponse wsRecordSubmit(@RequestBody Message message) {
        log.info("梅州三院电子病例提交消息接收：{}", message);
        return mzsyBusinessService.recordSubmitHandle(message);
    }

    @PostMapping("/wsNurseSubmit/do")
    @ApiOperation("梅州三院护理提交消息接收")
    public MessageResponse wsNurseSubmit(@RequestBody Message message) {
        log.info("梅州三院护理提交消息接收：{}", message);
        return mzsyBusinessService.nurseSubmitHandle(message);
    }

}
