package com.wms_main.controller.wms.mes;

import com.wms_main.model.dto.request.mes.MesInTaskRequest;
import com.wms_main.model.dto.request.mes.MesOutTaskRequest;
import com.wms_main.model.dto.response.wms.BaseWmsApiResponse;
import com.wms_main.service.controller.IMesControllerService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * 卡特相关控制类
 */
@RestController
@ResponseBody
@CrossOrigin
@RequiredArgsConstructor
@RequestMapping("/mes")
public class MesController {
    private final IMesControllerService mesControllerService;

    @PostMapping("/requestIn")
    public BaseWmsApiResponse requestIn(@RequestBody MesInTaskRequest mesInTaskRequest) {
        return mesControllerService.requestIn(mesInTaskRequest);
    }

    @PostMapping("/requestOut")
    public BaseWmsApiResponse requestOut(@RequestBody MesOutTaskRequest mesOutTaskRequest) {
        return mesControllerService.requestOut(mesOutTaskRequest);
    }
}
