package com.prolog.cs.biz.outbound.resource;

import com.prolog.cs.biz.inbound.dto.IsSuperviseDTO;
import com.prolog.cs.biz.inbound.dto.SuperviseResultDTO;
import com.prolog.cs.biz.inbound.dto.rcv.RcvInstockLinesDTO;
import com.prolog.cs.biz.inbound.model.SupervisionCode;
import com.prolog.cs.biz.inbound.vo.OutBoundUploadCircubParamVO;
import com.prolog.cs.biz.inbound.vo.UploadCircubParamVO;
import com.prolog.framework.common.message.RestMessage;
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.inbound}")
public interface InBoundClient {

	/**
	 * // 校验是否扫描监管码
	 */
	@PostMapping("/supervisionCode/isSupervise")
	public RestMessage<List<? extends IsSuperviseDTO>> isSupervise(@RequestBody List<? extends IsSuperviseDTO> list,
																   @RequestParam("stage") Integer stage);
	/**
	 * // 扫描监管码
	 */
	@PostMapping("/supervisionCode/addSupervisionCode")
	public RestMessage<SuperviseResultDTO> addSupervisionCode(@RequestBody SupervisionCode dto);

	/**
	 * // 批量扫描监管码
	 */
	@PostMapping("/supervisionCode/addSupervisionCodeList")
	public RestMessage<SuperviseResultDTO> addSupervisionCodeList(@RequestBody List<SupervisionCode> dtos);

	@GetMapping("/supervisionCode/findCodesByBill")
	public RestMessage<SuperviseResultDTO> findCodesByBill(@RequestParam("refBillId") String refBillId,
														   @RequestParam("refBillLineId") String refBillLineId);

	/**
	 * 是否完成扫描监管码
	 */
	@PostMapping("/supervisionCode/isSupervised")
	public RestMessage<Boolean> isSupervised(@RequestBody List<SupervisionCode> list);

	/**
	 * 出库补货上架
	 */
	@PostMapping("/rcvInstockLines/replenis-instock")
	RestMessage<Object> replenisInstock(@RequestBody List<RcvInstockLinesDTO> rcvInstockLinesDTOList);

	/**
	 * 上传监管码
	 */
	@PostMapping("/rqcHeaders/uploadCircubill")
	RestMessage<Object> uploadCircubill(@RequestBody UploadCircubParamVO uploadCircubParamVO);

	/**
	 * 上传监管码
	 */
	@PostMapping("/rqcHeaders/outBoundUploadCircubill")
	RestMessage<Object> outBoundUploadCircubill(@RequestBody OutBoundUploadCircubParamVO uploadCircubParamVO);

	/**
	 * 批量保存监管码
	 */
	@PostMapping("/supervisionCode/batchAdd")
	RestMessage<Object> batchAddSupCode(@RequestBody List<SupervisionCode> supSaves);

}
