package com.grkj.iscs.presenter import com.grkj.iscs.base.BasePresenter import com.grkj.iscs.iview.ICreateTicketView import com.grkj.iscs.model.UrlConsts import com.grkj.iscs.model.vo.SopPageVO import com.grkj.iscs.model.vo.TicketTypeVO import com.grkj.iscs.util.NetApi class CreateTicketPresenter : BasePresenter() { var mSopList = mutableListOf() var mTicketTypeList = mutableListOf() fun initData() { NetApi.getTicketType { mTicketTypeList = it as MutableList } NetApi.getAutoCode(UrlConsts.AUTOCODE_TICKET_NUMBER) { println("getAutoCode : $it") } } fun getSopList() { NetApi.getSopPage(0, 10) { mSopList = it?.records as MutableList mvpView?.showSopList(mSopList) } } fun getTicketTypeName(type: String): String? { return mTicketTypeList.find { it.dictValue == type }?.dictLabel } }