|
@@ -6,7 +6,9 @@ import com.grkj.iscs.R
|
|
|
import com.grkj.iscs.databinding.FragmentJobProgressBinding
|
|
import com.grkj.iscs.databinding.FragmentJobProgressBinding
|
|
|
import com.grkj.iscs.model.bo.PageChangeBO
|
|
import com.grkj.iscs.model.bo.PageChangeBO
|
|
|
import com.grkj.iscs.model.vo.ticket.TicketDetailMonitorRespVO
|
|
import com.grkj.iscs.model.vo.ticket.TicketDetailMonitorRespVO
|
|
|
|
|
+import com.grkj.iscs.view.activity.HomeActivity
|
|
|
import com.grkj.iscs.view.base.BaseMvpFragment
|
|
import com.grkj.iscs.view.base.BaseMvpFragment
|
|
|
|
|
+import com.grkj.iscs.view.dialog.TipDialog
|
|
|
import com.grkj.iscs.view.iview.IJobProgressVIew
|
|
import com.grkj.iscs.view.iview.IJobProgressVIew
|
|
|
import com.grkj.iscs.view.presenter.JobProgressPresenter
|
|
import com.grkj.iscs.view.presenter.JobProgressPresenter
|
|
|
import com.zhy.adapter.recyclerview.CommonAdapter
|
|
import com.zhy.adapter.recyclerview.CommonAdapter
|
|
@@ -22,6 +24,7 @@ class JobProgressFragment(val goBack: () -> Unit) :
|
|
|
private val mUserList = mutableListOf<TicketDetailMonitorRespVO.IsJobTicketUser>()
|
|
private val mUserList = mutableListOf<TicketDetailMonitorRespVO.IsJobTicketUser>()
|
|
|
private var mStep = 0
|
|
private var mStep = 0
|
|
|
private var mPageChangeBO: PageChangeBO? = null
|
|
private var mPageChangeBO: PageChangeBO? = null
|
|
|
|
|
+ private var mTipDialog: TipDialog? = null
|
|
|
|
|
|
|
|
override val viewBinding: FragmentJobProgressBinding
|
|
override val viewBinding: FragmentJobProgressBinding
|
|
|
get() = FragmentJobProgressBinding.inflate(layoutInflater)
|
|
get() = FragmentJobProgressBinding.inflate(layoutInflater)
|
|
@@ -99,6 +102,30 @@ class JobProgressFragment(val goBack: () -> Unit) :
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ fun getCardNo(cardNo: String) {
|
|
|
|
|
+ presenter?.getCardInfoByNfc(cardNo) {
|
|
|
|
|
+ if (it == null) {
|
|
|
|
|
+ return@getCardInfoByNfc
|
|
|
|
|
+ }
|
|
|
|
|
+ mTipDialog ?: {
|
|
|
|
|
+ mTipDialog = TipDialog(requireActivity())
|
|
|
|
|
+ }
|
|
|
|
|
+ val jobStatus = mUserList.find { itUser -> itUser.userId == it.userId }?.jobStatus
|
|
|
|
|
+ if (jobStatus == null || jobStatus >= 5) {
|
|
|
|
|
+ return@getCardInfoByNfc
|
|
|
|
|
+ }
|
|
|
|
|
+ if (jobStatus < 4) {
|
|
|
|
|
+ mTipDialog?.setTip(getString(R.string.confirm_to_colock, it.userName))
|
|
|
|
|
+ } else {
|
|
|
|
|
+ mTipDialog?.setTip(getString(R.string.confirm_to_uncolock, it.userName))
|
|
|
|
|
+ }
|
|
|
|
|
+ mTipDialog?.setConfirmListener {
|
|
|
|
|
+ // TODO 共锁人刷卡接口
|
|
|
|
|
+ }
|
|
|
|
|
+ mTipDialog?.showCancelCountdown(10)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
override fun onPause() {
|
|
override fun onPause() {
|
|
|
super.onPause()
|
|
super.onPause()
|
|
|
mStep = 0
|
|
mStep = 0
|