package com.yeejoin.amos.boot.module.jxiop.api.feign;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jxiop.api.dto.RectificationUnitClassifyTreeDto;
import com.yeejoin.amos.component.feign.config.InnerInvokException;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
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.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

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

//@FeignClient(name = "${mcb.warning.name:MCB-SERVER}", path = "warning", configuration = {FeignConfiguration.class})
@FeignClient(name = "mcb", url = "http://10.20.1.160:10005", path = "warning", configuration = {
		FeignConfiguration.class })
public interface McbWarningFeign {

	/**
	 * 根据风险来源查询人员红黄绿吗信息
	 */
	@GetMapping("/task/getQrCodeCount")
	FeignClientResult<Map<String, Object>> getQrCodeCount(
			@RequestParam(required = false, value = "parentCode") String parentCode,
			@RequestParam(value = "warningObjectType") String warningObjectType);

	/**
	 * 根据风险来源查询人员红黄绿吗信息
	 */
	@GetMapping("/task/getWarningInfoCountByObjectId")
	FeignClientResult<Integer> getWarningInfoCountByObjectId(@RequestParam(value = "code") String code);

	/**
	 * 根据风险来源查询人员红黄绿吗信息
	 */
	@GetMapping("/task/getWarningInfoByTraceId")
	FeignClientResult<String> getWarningInfoByTraceId(@RequestParam(value = "traceId") String traceId);

	/**
	 * 根据风险来源查询人员红黄绿吗信息
	 */
	@PostMapping("/task/updateRawDataByTraceId")
	FeignClientResult<Boolean> updateRawDataByTraceId(@RequestParam(value = "traceId") String traceId,
			@RequestParam(value = "rawData") String rawData);

	/**
	 * 任务详情分页列表
	 */
	@GetMapping("/warning-warning-info/page")
	FeignClientResult<Page<Map<String, Object>>> getTaskDetailPage(@RequestParam Map<String, Object> map);

	/**
	 * 问题记录分页列表
	 */
	@GetMapping("/warning-question-info/questionPage")
	FeignClientResult<Page<Map<String, Object>>> getQuestionRecordPage(@RequestParam Map<String, Object> map);

	/**
	 * 任务详情、问题记录左侧树
	 */
	@GetMapping("/warning-warning-info/tree")
	FeignClientResult<List<RectificationUnitClassifyTreeDto>> getWarnTree();

	/**
	 * 任务详情列表统计
	 */
	@GetMapping("/warning-warning-info/statistics")
	FeignClientResult getTaskDetailStatistic(@RequestParam Map<String, Object> map);

	/**
	 * 问题记录列表统计
	 */
	@GetMapping("/warning-question-info/questionPageTopStatistics")
	FeignClientResult getQuestionRecordStatistic(@RequestParam Map<String, Object> map);

	/**
	 * 任务总览地图信息数据
	 */
	@GetMapping("/monitor/overview/getMapRouteInfoByCodes")
	FeignClientResult getMapRouteInfoByCodes(@RequestParam String province, @RequestParam("codes") List<String> codes,
			@RequestParam(value = "operator", defaultValue = "=") String operator);

	/**
	 * 跑马灯列表数据分页查询
	 */
	@GetMapping(value = "/monitor/overview/getLampListPage")
	FeignClientResult getLampListPage(@RequestParam(value = "questionRectificationStatus", required = false) String questionRectificationStatus,
			@RequestParam(value = "warningSourceType", required = false) String warningSourceType,
			@RequestParam(value = "objectName", required = false) String objectName,
			@RequestParam(value = "codes", required = false) List<String> codes,
			@RequestParam(value = "operator", defaultValue = "=") String operator,
			@RequestParam("current") Long current, @RequestParam("size") Long size);

	/**
	 * 跑马灯列表数据查询
	 */
	@GetMapping("/monitor/overview/getLampList")
	FeignClientResult getLampList(@RequestParam(value = "questionRectificationStatus", required = false) String questionRectificationStatus,
			@RequestParam(value = "warningSourceType", required = false) String warningSourceType,
			@RequestParam(value = "objectName", required = false) String objectName,
			@RequestParam(value = "codes", required = false) List<String> codes,
			@RequestParam(value = "operator", defaultValue = "=") String operator);

}
