package com.docus.server.message.controller;

import com.docus.server.message.busservice.ZqBusinessService;
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.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 javax.annotation.Resource;

/**
 * @author WYBDEV
 */
@Api("肇庆第一人民医院")
@RestController
@Slf4j
@RequestMapping("/hospital/zqFirstRy")
public class ZhaoQingFirstHospitalController {

    @Resource
    private ZqBusinessService zqBusinessService;


    @PostMapping("/wsRecordSubmit/do")
    @ApiOperation("肇庆第一人医电子病历提交消息接收")
    public MessageResponse receiveWsRecordSubmitMessage(@RequestBody Message message) {
        log.info("肇庆第一人医电子病历提交消息接收：{}", message);
        return zqBusinessService.recordSubmitHandle(message);
    }

    @PostMapping("/wsNurseSubmit/do")
    @ApiOperation("肇庆第一人医护理提交消息接收")
    public MessageResponse receiveWsNurseSubmitMessage(@RequestBody Message message) {
        log.info("肇庆第一人医护理提交消息接收：{}", message);
        return zqBusinessService.wsNurseSubmitHandle(message);
    }

}
