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

import cn.estsh.i3plus.ext.mes.icloud.sdkfallback.IQmsReworkRangeFactory;
import cn.estsh.i3plus.ext.mes.pojo.model.bu3.SxInsertReworkRangeModel;
import cn.estsh.i3plus.ext.mes.pojo.model.bu3.SxReworkRangeModel;
import cn.estsh.i3plus.pojo.base.bean.BaseResultBean;
import org.springframework.cloud.openfeign.FeignClient;
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;

/**
 * @PROJECT_NAME: i3plus-mes-panasonic-dev
 * @DESCRIPTION:
 * @USER: xinwang.yi
 * @DATE: 2023-06-30 10:38
 */
@FeignClient(name="i3qms", //对应配置文件中的spring.application.name
        path= "/qms",
        fallbackFactory = IQmsReworkRangeFactory.class
)
public interface IQmsReworkRangeCloud {
    @PostMapping(value = "/ext/rework-range/mes-status-update")
    BaseResultBean updateReworkRangeValidByIdsWithMes(@RequestParam("ids") Long[] ids, @RequestParam("status") Integer status, @RequestParam("userName") String userName);

    @PostMapping(value = "/ext/rework-range/mes-query-list-page")
    BaseResultBean queryReworkRangeListByPager(@RequestBody SxReworkRangeModel reworkRangeModel);

    @PostMapping(value = "/ext/rework-range/mes-insert-rework-range")
    BaseResultBean insertSxQmsReworkRangeWithMes(@RequestBody SxInsertReworkRangeModel sxInsertReworkRangeModel);

    @PostMapping(value = "/ext/rework-range/mes-unbind-rework-range")
    BaseResultBean unbindReworkRangeList(@RequestParam("workOrderNo") String workOrderNo, @RequestParam("serialNumberList") List<String> serialNumberList, @RequestParam("organizeCode") String organizeCode, @RequestParam("userName") String userName);
}
