
package org.nl.acs.ext.wms.rest;


import cn.dev33.satoken.annotation.SaIgnore;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.acs.ext.wms.liKuData.InStoreReportRequest;
import org.nl.acs.ext.wms.liKuData.MoveStoreReportRequest;
import org.nl.acs.ext.wms.liKuData.OutStoreReportRequest;
import org.nl.acs.ext.wms.liKuData.putEmptyPalletRequest;
import org.nl.acs.ext.wms.service.LiKuToAcsService;
//import org.nl.modules.logging.InterfaceLogType;
import org.nl.common.logging.annotation.Log;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
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 wangs
 * @date 2021-07-21
 **/
@RestController
@RequiredArgsConstructor
@Api(tags = "立库接口")
@RequestMapping("/api/likuToACS")
@Slf4j
public class LiKuToACSController {
    private final LiKuToAcsService liKuToAcsService;

    @SaIgnore
    @PostMapping("/inStoreReport")
    @Log(value = "立库反馈入库任务状态")
    @ApiOperation("立库反馈入库任务状态")
    public ResponseEntity<Object> inStoreReport(@RequestBody InStoreReportRequest requestParam) throws Exception {
        return new ResponseEntity<>(liKuToAcsService.inStoreReport(requestParam), HttpStatus.OK);
    }

    @SaIgnore
    @PostMapping("/outStoreReport")
    @Log(value = "立库反馈出库任务状态")
    @ApiOperation("立库反馈出库任务状态")
    public ResponseEntity<Object> outStoreReport(@RequestBody OutStoreReportRequest requestParam) throws Exception {
        return new ResponseEntity<>(liKuToAcsService.outStoreReport(requestParam), HttpStatus.OK);
    }

    @SaIgnore
    @PostMapping("/moveStoreReport")
    @Log(value = "立库反馈移库任务状态")
    @ApiOperation("立库反馈移库任务状态")
    public ResponseEntity<Object> moveStoreReport(@RequestBody MoveStoreReportRequest requestParam) throws Exception {
        return new ResponseEntity<>(liKuToAcsService.moveStoreReport(requestParam), HttpStatus.OK);
    }

    @SaIgnore
    @PostMapping("/putEmptyPallet")
    @Log(value = "立库请求放空盘")
    @ApiOperation("立库请求放空盘")
    public ResponseEntity<Object> putEmptyPallet(@RequestBody putEmptyPalletRequest requestParam) throws Exception {
        return new ResponseEntity<>(liKuToAcsService.putEmptyPallet(requestParam), HttpStatus.OK);
    }


}
