package com.xinelu.applet.controller.nurseappletpersonworkorder;


import com.xinelu.applet.dto.nursepersonapplogin.OrderFallbackDTO;
import com.xinelu.applet.service.nurseappletpersonworkorder.NurseAppletPersonWorkOrderService;
import com.xinelu.common.annotation.MobileRequestAuthorization;
import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.custominterface.Update;
import org.springframework.validation.annotation.Validated;
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;

/**
 * 护理员工单Controller
 *
 * @author zh
 * @date 2023-03-30
 */
@RestController
@RequestMapping("/nurseApplet/personWorkOrder")
public class NurseAppletPersonWorkOrderController {
    @Resource
    private NurseAppletPersonWorkOrderService nurseAppletPersonWorkOrderService;


    /**
     * 护理员接单共用
     *
     * @param orderFallbackDTO 订单信息
     * @return AjaxResult
     */
    @MobileRequestAuthorization
    @PostMapping("/receiveOrders")
    public AjaxResult receiveOrders(@Validated(Update.class) @RequestBody OrderFallbackDTO orderFallbackDTO) {
        return nurseAppletPersonWorkOrderService.receiveOrders(orderFallbackDTO);
    }
}
