package com.zd.system.api.chemical;

import com.zd.common.core.constant.ServiceNameConstants;
import com.zd.common.core.domain.R;
import com.zd.system.api.chemical.factory.RemoteStockFallbackFactory;
import com.zd.system.api.domain.InventoryTag;
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 javax.validation.constraints.NotNull;

/**
 * 化学品库存
 */
@FeignClient(contextId = "remoteStockService", value = ServiceNameConstants.CHEMICAL_SERVICE, fallbackFactory = RemoteStockFallbackFactory.class)
public interface RemoteStockService {


    @PostMapping(value = "/hxpStock/RFIDCheck")
    public R<Boolean> rfidCheck(@RequestBody InventoryTag tag);

    @GetMapping(value = "/hxpStock/expireCheck")
    public void expireCheck();

    @GetMapping(value = "/hxpUserecord/checkOvertime")
    public void checkOvertime();

    @PostMapping("/hxpChemical/indicatorMonitoring")
    public void indicatorMonitoring();

    @GetMapping(value = "/hxpUserecord/queryUplink")
    public void queryUplinkResult();

    @GetMapping(value = "/hxpStock/sendSydSms")
    public R sendSydSms(@RequestParam(value = "content") String content,
                        @RequestParam(value = "purpose") Integer purpose,
                        @RequestParam(value = "lockApplyId", required = false) Long lockApplyId,
                        @RequestParam(value = "phones") @NotNull String... phones);

    /**
     * 四医大短信告警方案阶梯式通知流程
     */
    @GetMapping("/hxpAlarmRecord/sendPhoneBySyd")
    public void sendPhoneBySyd();
}
