package com.prolog.upcloud.base.wh.operate.resource;

import com.prolog.cs.biz.outbound.model.dto.InfTaskOutBackDTO;
import com.prolog.framework.common.message.RestMessage;
import com.prolog.upcloud.base.inventory.model.WmsInvStockLot;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "${prolog.service.gsp}")
public interface GspClient {

    /**
     * 养护移库确认
     *
     * @param arrList 养护明细ID
     * @return
     */
    @PostMapping("/gspUpkeepCheck/confirmUpkeepMove")
    RestMessage confirmUpkeepMove(@RequestBody String[] arrList);


    /**
     * 质量复核移库确认
     *
     * @param arrList 养护明细ID
     * @return
     */
    @PostMapping("/gspQualityReview/confirmQualityReviewMove")
    RestMessage confirmQualityReviewMove(@RequestBody String[] arrList);

    /**
     * 库存锁定生成复验申请单
     *
     * @param wmsInvStockLots
     * @return
     */
    @PostMapping("/gspUpkeepCheck/addStockLockCheck")
    RestMessage addStockLockCheck(@RequestBody List<WmsInvStockLot> wmsInvStockLots);

    /**
     * 出库任务回告
     */
    @PostMapping("/gspUpkeepCheck/callbackPushTask")
    RestMessage<Object> callbackPushTask(@RequestBody List<String> ids);

    /**
     * 货格移库查询是否需要指定货格
     * @param lineId 养护明显id
     * @return
     */
    @GetMapping("/gspUpkeepCheck/getLocationNoByLineId")
    RestMessage<String> getLocationNoByLineId(@RequestParam(name = "lineId") String lineId);


    @ApiOperation(value = "EIS出库任务回告-outbound服务调用，AGV货架和AGV托盘,四向库都走这个")
    @PostMapping("/gspUpkeepCheck/gspUpKeepOutBack")
    RestMessage<Object> gspUpKeepOutBack(@RequestBody List<InfTaskOutBackDTO> upkeepList);

}
