|
@@ -3,11 +3,13 @@ package com.grkj.iscs.presenter
|
|
|
import com.grkj.iscs.base.BasePresenter
|
|
import com.grkj.iscs.base.BasePresenter
|
|
|
import com.grkj.iscs.iview.ICreateTicketView
|
|
import com.grkj.iscs.iview.ICreateTicketView
|
|
|
import com.grkj.iscs.model.vo.SopPageVO
|
|
import com.grkj.iscs.model.vo.SopPageVO
|
|
|
|
|
+import com.grkj.iscs.model.vo.TicketTypeVO
|
|
|
import com.grkj.iscs.util.NetApi
|
|
import com.grkj.iscs.util.NetApi
|
|
|
|
|
|
|
|
class CreateTicketPresenter : BasePresenter<ICreateTicketView>() {
|
|
class CreateTicketPresenter : BasePresenter<ICreateTicketView>() {
|
|
|
|
|
|
|
|
var mSopList = mutableListOf<SopPageVO.Record>()
|
|
var mSopList = mutableListOf<SopPageVO.Record>()
|
|
|
|
|
+ var mTicketTypeList = mutableListOf<TicketTypeVO>()
|
|
|
|
|
|
|
|
fun getSopList() {
|
|
fun getSopList() {
|
|
|
NetApi.getSopPage(0, 10) {
|
|
NetApi.getSopPage(0, 10) {
|
|
@@ -15,4 +17,14 @@ class CreateTicketPresenter : BasePresenter<ICreateTicketView>() {
|
|
|
mvpView?.showSopList(mSopList)
|
|
mvpView?.showSopList(mSopList)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ fun getTicketType() {
|
|
|
|
|
+ NetApi.getTicketType {
|
|
|
|
|
+ mTicketTypeList = it as MutableList<TicketTypeVO>
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ fun getTicketTypeName(type: String): String? {
|
|
|
|
|
+ return mTicketTypeList.find { it.dictValue == type }?.dictLabel
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|