package com.youchain.businessdata.rest;

import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.youchain.annotation.AnonymousAccess;
import com.youchain.annotation.Log;
import com.youchain.appupdate.inputJson.ContainerIn;
import com.youchain.appupdate.inputJson.MissionStateCallback;
import com.youchain.basicdata.domain.Point;
import com.youchain.basicdata.domain.Stock;
import com.youchain.basicdata.service.PointService;
import com.youchain.businessdata.domain.AgvTask;
import com.youchain.businessdata.domain.Task;
import com.youchain.businessdata.service.AgvTaskService;
import com.youchain.businessdata.service.TaskService;
import com.youchain.businessdata.service.dto.AgvTaskDto;
import com.youchain.exception.handler.ApiResult;
import com.youchain.utils.BaseStatus;
import com.youchain.utils.BizStatus;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import static org.springframework.http.HttpStatus.BAD_REQUEST;
import static org.springframework.http.HttpStatus.OK;

@RestController
@RequiredArgsConstructor
@Api(tags = "输送线")
@RequestMapping("/api/Robot/")
@Slf4j
public class LineController {

    @PostMapping("/NotifyConveyor")
    @Log("料箱机器人申请取货/放货/取放完成回调")
    @ApiOperation("料箱机器人申请取货/放货/取放完成回调")
    @AnonymousAccess
    public ResponseEntity<Object> NotifyConveyor(@RequestBody MissionStateCallback missionStateCallback) {

        return new ResponseEntity<>(ApiResult.success(OK.value(), "", ""), HttpStatus.OK);
    }
}
