package com.tofly.ghrq_route.module.survey.controller;

import android.content.Context;

import com.tofly.ghrq_route.module.survey.domain.SurveyBean;
import com.tofly.ghrq_route.module.survey.service.ISurveyService;
import com.tofly.ghrq_route.module.survey.service.SurveyServiceImpl;
import com.tofly.ghrq_route.module.trouble.domain.TroubleAudioBean;
import com.tofly.ghrq_route.module.trouble.domain.TroublePictureBean;

import java.util.List;

/**
 * Created by Amu on 2017/3/8.
 */

public class SurveyController {
    /**
     * 是否在綫
     */
    boolean mbOnline;

    /**
     * Trouble接口实现对象
     */
    ISurveyService surveyService;

    public SurveyController(){
        mbOnline = true;
        surveyService = new SurveyServiceImpl();
    }

    public SurveyController(boolean online){
        mbOnline = online;
        surveyService = new SurveyServiceImpl();
    }

    /**
     * 获取应急调度列表
     */
    public void getSurveyList(Context context, int select_state, int work_state, String keyword, int pageindex,
                                 int pagesize, final SurveyCallBack surveyCallBack) {
        surveyService.getSurveyList(context, select_state, work_state, keyword, pageindex, pagesize, surveyCallBack);
    }


    /**
     * 增加测绘前记录申请
     */
    public void addSurveyBefore(Context context, SurveyBean surveyBean, List<TroublePictureBean> photos,
                                List<TroubleAudioBean> audios, List<TroubleAudioBean> files, SurveyCallBack surveyCallBack) {
        surveyService.addSurveyBefore(context, surveyBean, photos, audios, files, surveyCallBack);
    }
}
