package com.tuoheng.admin.service.warningrecord;

import com.tuoheng.admin.entity.request.warningrecord.QueryWarningRecordByEmergencyMissionIdRequest;
import com.tuoheng.admin.entity.request.warningrecord.QueryWarningRecordListByWarningIdRequest;
import com.tuoheng.admin.service.warningrecord.query.QueryWarningRecordByEmergencyMissionIdService;
import com.tuoheng.admin.service.warningrecord.query.QueryWarningRecordListByWarningIdService;
import com.tuoheng.common.utils.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 预警记录Service业务层处理
 *
 * @author wanjing
 * @team tuoheng
 * @date 2023-02-06
 */
@Service
public class WarningRecordServiceImpl implements IWarningRecordService {

    @Autowired
    private QueryWarningRecordListByWarningIdService queryWarningRecordListByWarningIdService;

    @Autowired
    private QueryWarningRecordByEmergencyMissionIdService queryWarningRecordByEmergencyMissionIdService;

    /**
     * 查询预警记录列表
     *
     * @param request 预警记录
     * @return 预警记录
     */
    @Override
    public JsonResult getListByWarningId(QueryWarningRecordListByWarningIdRequest request) {
        return queryWarningRecordListByWarningIdService.getListByWarningId(request);
    }

    /**
     * 根据应急任务ID查询预警记录
     *
     * @param request 预警记录
     * @return 预警记录
     */
    @Override
    public JsonResult getOneByEmergencyMissionId(QueryWarningRecordByEmergencyMissionIdRequest request) {
        return queryWarningRecordByEmergencyMissionIdService.getOneByEmergencyMissionId(request);
    }

    /**
     * 查询预警记录
     *
     * @param id 预警记录主键
     * @return 预警记录
     */
    @Override
    public JsonResult getOneById(String id) {
        return null;
    }
}
