|
|
@@ -2,6 +2,7 @@ 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
|
|
|
@@ -11,6 +12,15 @@ 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>
|
|
|
@@ -18,12 +28,6 @@ class CreateTicketPresenter : BasePresenter<ICreateTicketView>() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- fun getTicketType() {
|
|
|
- NetApi.getTicketType {
|
|
|
- mTicketTypeList = it as MutableList<TicketTypeVO>
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
fun getTicketTypeName(type: String): String? {
|
|
|
return mTicketTypeList.find { it.dictValue == type }?.dictLabel
|
|
|
}
|