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.RemoteChemicalAlarmFallbackFactory;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

/**
 * 化学品智能报警Feign调用接口
 */
@FeignClient(contextId = "remoteChemicalAlarmService", value = ServiceNameConstants.CHEMICAL_SERVICE, fallbackFactory = RemoteChemicalAlarmFallbackFactory.class)
public interface RemoteChemicalAlarmService {

    /**
     * 化学品智能报警日志列表
     */
    @ApiOperation(value = "查询化学品数据列表")
    @PostMapping("/hxpAlarmRecord/getList")
    R<List <LinkedHashMap <String,String>>> getList(@RequestBody Map alarmMap);

    /**
     * 修改报警日志变为已处理
     */
    @ApiOperation(value = "修改 化学品设备管理状态")
    @PutMapping("/hxpAlarmRecord/handle")
    R<Boolean> updateStatus(@RequestBody Map alarmMap);
}
