package com.rc.httpcore.client

import com.rc.httpcore.apk.AppInfo
import com.rc.httpcore.apk.ProcessedBean
import com.rc.httpcore.bean.*
import com.rc.httpcore.vo.request.*
import com.rc.httpcore.vo.response.*
import io.reactivex.rxjava3.core.Observable
import java.io.File

interface ChemicalClient {
    /**
     * 查询LOGO配置列表
     */
    fun queryLogoConfInfo(): Observable<ConfLogo>

    /**
     * 查询APK版本
     *
     * @param id 设备唯一编码
     */
//    fun apkVersion(id: String): Observable<ApkInfoResp>

//    fun apkVersion(deviceNum: String,type:Int,version:Double): Observable<AppUpDateBean>

    fun getCheck(deviceNum: String, type: String, version: Double): Observable<AppInfo>

    fun cardNum(cardNum: String): Observable<UserData>

    fun userCardValidation(userId: String, subId: String): Observable<UserValidationBean>

//    fun userValidation(map: Map<String, String>): Observable<UserValidationBean>

    fun useCardVerify(map: Map<String, String>): Observable<UserValidationBean>

    fun searchChemica(
        searchChemica: String,
        chemicalLevel: String?
    ): Observable<List<ChemicalSearchBean>>

    fun getOptions(typs: String): Observable<List<ChemicalTypeBean>>

    fun searchProducer(): Observable<List<SearchBean>>

    fun searchSpec(specNum: String): Observable<SearchSpecBean>

    fun getSelects(searchValue: String): Observable<List<BelongingPersonBean>>

    fun getTopicList(userId: String): Observable<List<TopicDataBean>>

    fun getCabinetList(subId: String): Observable<List<RuleBean>>

    fun getScanCode(macId: String, code: String, subId: String): Observable<UserData>

    fun certitude(model: ChemicalABean): Observable<ChemicalABean>

    fun certitude(model: HxpChemicalVo): Observable<HxpChemicalVo>

    fun getRelList(model: String): Observable<ChemicalInfoBean>

    fun getUserIds(subId: String): Observable<List<String>>

    fun getCabinetBySubId(subId: String): Observable<List<RuleBean>>

    fun stockWaitAdd(model: StockModeBean): Observable<Boolean>

    fun addStockCheck(model: StockModel): Observable<Boolean>

    fun getStockWaitDetails(waitId: String): Observable<UnifiedVerBean>

    fun waitList(
        mutableMap: Map<String, Any>
    ): Observable<PageHxpStockBean>

    fun getStockList(
        mutableMap: Map<String, Any>
    ): Observable<HxpStockWaitModeBean>

    fun getByRfid(rfidCode: String): Observable<UseBean>

    fun indexDetailbyRfid(rfidCode: String): Observable<UseNoBean>

    fun getStockDetailsByCode(rfidCode: String): Observable<UseNoTwoBean>

    fun addUseRecord(model: UsePostDataBean): Observable<String>

    fun useList(mutableMap: Map<String, String>): Observable<ReturningChemicalsBean>

    fun updateRfid(ids: String, rfidCode: String?): Observable<String>

    fun backDetail(rfidCode: String, subId: String): Observable<ReturnDetailsBean>

    fun chemicalSearchBean(rfidCode: String, subId: String): Observable<ChemicalSearchBean>

    fun discardDetail(rfidCode: String): Observable<ReturnDetailsBean>

    fun giveBack(model: GiveBackBean): Observable<Boolean>

    fun returnGiveBack(model: GiveBackBean): Observable<ReturnGiveBackBean>

    fun stockDetailsList(
        mutableMap: Map<String, String>
    ): Observable<WasteChemicalsBean>

    fun getCabinetLock(doorId: String): Observable<List<LockVoListBean>>

    fun indexStockList(map: Map<String, String>): Observable<HxpStockWaitModeBean>

    fun warningNoticeList(map: Map<String, String>): Observable<EarlyWarningBean>

    fun warningNoticeDetail(id: String): Observable<ProcessedBean>

    fun handleMessage(noticeId: String, handleNotes: String): Observable<ProcessedBean>

    fun warningNoticeCount(subId: String): Observable<String>

    fun indexDetailsList(map: Map<String, String>): Observable<QueryTwoBean>

    fun useValidation(
        cardNum: String,
        subId: String,
        doorId: String
    ): Observable<UserValidationBean>

    fun aioScanLogin(subId: String, doorId: String, code: String): Observable<UserValidationBean>

    fun lockOperate(map: Map<String, Any>): Observable<Boolean>

    fun outTimeWarn(map: Map<String, Any>): Observable<Boolean>

    fun getLocks(subId: String, lockNum: String): Observable<Boolean>

    fun basicConfig(subId: String): Observable<ConfigBean>

    fun useRecords(map: Map<String, Any>): Observable<UseLedBean>

    fun stockLedger(map: Map<String, Any>): Observable<InventoryListBean>

    fun useReturnList(subId: String): Observable<UseLedBean>

    fun tagDetailsList(map: Map<String, Any>): Observable<QueryTwoBean>

    fun getDetailsById(id: String): Observable<ReturnDetailsBean>

    fun getMsdsDetails(searchValue: String?): Observable<MsdsBean>

    fun msdsDetails(id: String): Observable<MsdsListBean>

    fun controlConfigs(chemicalLevel: Int): Observable<ChemicalConfsBean>

    fun getControlConfigs(chemicalLevel: Int): Observable<HxpControlConfig>

    fun checkRfids(rfid: String): Observable<Boolean>

    /**
     * 上传APK更新状态
     *
     * @param state 0:升级失败; 1:升级成功; 2:升级中
     */
    fun onepcApkUpdate(id: String, state: String): Observable<Boolean>

    /**
     * 退出登录
     */
    fun loginOut(): Observable<Boolean>

    fun monitor(deviceNo: String): Observable<Boolean>

    /**
     * 人脸比对
     */
    fun faceCompare(file: File, param: FaceCompareReq): Observable<UserData>

    fun checkUserFaceByPic(file: File, param: FaceCompareReq): Observable<UserValidationBean>

}