package cn.estsh.i3plus.ext.mes.icloud.sdk;

import cn.estsh.i3plus.ext.mes.icloud.sdkfallback.WmsBomTakeEffectFallbackFactory;
import cn.estsh.i3plus.ext.mes.pojo.model.WmsBomTotalModel;
import cn.estsh.i3plus.platform.common.util.CommonConstWords;
import cn.estsh.i3plus.pojo.base.bean.BaseResultBean;
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;

/**
 * 文件描述
 *
 * @author xiangming.liao
 * @date 2021年03月27日 16:46
 */
@FeignClient(name = "i3wms", //对应配置文件中的spring.application.name
        path = CommonConstWords.WHITELIST_URL + "/bom",
        fallbackFactory = WmsBomTakeEffectFallbackFactory.class
)
public interface IWmsBomTakeEffectCloud {
    @GetMapping(value = "/find-by-partNo")
    BaseResultBean  getBomTotalByPartNo(@RequestParam("partNo") String partNo,
                                       @RequestParam("organizeCode") String organizeCode);

    /*@PostMapping("/effect")
    BaseResultBean doEffect(@RequestBody List<WmsBomTotalModel> wmsBomTotalModels);*/

    @PostMapping("/effect")
    BaseResultBean doEffect(@RequestParam("partNo") String partNo,
                            @RequestParam("organizeCode") String organizeCode);
}
