| 12345678910111213141516171819202122232425262728293031323334 |
- 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<ICreateTicketView>() {
- var mSopList = mutableListOf<SopPageVO.Record>()
- var mTicketTypeList = mutableListOf<TicketTypeVO>()
- fun initData() {
- NetApi.getTicketType {
- mTicketTypeList = it as MutableList<TicketTypeVO>
- }
- NetApi.getAutoCode(UrlConsts.AUTOCODE_TICKET_NUMBER) {
- println("getAutoCode : $it")
- }
- }
- fun getSopList() {
- NetApi.getSopPage(0, 10) {
- mSopList = it?.records as MutableList<SopPageVO.Record>
- mvpView?.showSopList(mSopList)
- }
- }
- fun getTicketTypeName(type: String): String? {
- return mTicketTypeList.find { it.dictValue == type }?.dictLabel
- }
- }
|