|
@@ -12,8 +12,11 @@ import com.grkj.iscs.model.bo.PageChangeBO
|
|
|
import com.grkj.iscs.model.eventmsg.MsgEvent
|
|
import com.grkj.iscs.model.eventmsg.MsgEvent
|
|
|
import com.grkj.iscs.model.eventmsg.MsgEventConstants.MSG_EVENT_UPDATE_TICKET_PROGRESS
|
|
import com.grkj.iscs.model.eventmsg.MsgEventConstants.MSG_EVENT_UPDATE_TICKET_PROGRESS
|
|
|
import com.grkj.iscs.model.eventmsg.UpdateTicketProgressMsg
|
|
import com.grkj.iscs.model.eventmsg.UpdateTicketProgressMsg
|
|
|
|
|
+import com.grkj.iscs.model.vo.ticket.StepDetailRespVO
|
|
|
import com.grkj.iscs.model.vo.ticket.TicketDetailMonitorRespVO
|
|
import com.grkj.iscs.model.vo.ticket.TicketDetailMonitorRespVO
|
|
|
import com.grkj.iscs.model.vo.ticket.TicketDetailRespVO
|
|
import com.grkj.iscs.model.vo.ticket.TicketDetailRespVO
|
|
|
|
|
+import com.grkj.iscs.util.Executor
|
|
|
|
|
+import com.grkj.iscs.util.NetApi
|
|
|
import com.grkj.iscs.util.SPUtils
|
|
import com.grkj.iscs.util.SPUtils
|
|
|
import com.grkj.iscs.util.ToastUtils
|
|
import com.grkj.iscs.util.ToastUtils
|
|
|
import com.grkj.iscs.util.log.LogUtil
|
|
import com.grkj.iscs.util.log.LogUtil
|
|
@@ -34,6 +37,7 @@ class JobProgressFragment(val goBack: () -> Unit) :
|
|
|
private val mUserList = mutableListOf<TicketDetailMonitorRespVO.IsJobTicketUser>()
|
|
private val mUserList = mutableListOf<TicketDetailMonitorRespVO.IsJobTicketUser>()
|
|
|
private var mTicketDetail: TicketDetailRespVO? = null
|
|
private var mTicketDetail: TicketDetailRespVO? = null
|
|
|
private var mStep = 0
|
|
private var mStep = 0
|
|
|
|
|
+ private var mCurrentStep: StepDetailRespVO? = null
|
|
|
private var mPageChangeBO: PageChangeBO? = null
|
|
private var mPageChangeBO: PageChangeBO? = null
|
|
|
private var mTipDialog: TipDialog? = null
|
|
private var mTipDialog: TipDialog? = null
|
|
|
private lateinit var observer: Observer<MsgEvent>
|
|
private lateinit var observer: Observer<MsgEvent>
|
|
@@ -121,21 +125,40 @@ class JobProgressFragment(val goBack: () -> Unit) :
|
|
|
} else if (mStep == 7) {
|
|
} else if (mStep == 7) {
|
|
|
val checkResult = presenter?.checkUnlock(requireContext(), mUserList)
|
|
val checkResult = presenter?.checkUnlock(requireContext(), mUserList)
|
|
|
if (checkResult?.isEmpty() == true) {
|
|
if (checkResult?.isEmpty() == true) {
|
|
|
- if (SPUtils.isKeyTake(mPageChangeBO?.ticketId!!)) {
|
|
|
|
|
|
|
+ //如果所有隔离点都有交叉作业,弹窗提醒确认就结束
|
|
|
|
|
+ if (mTicketDetail?.ticketPointsVOList?.all {
|
|
|
|
|
+ it.pointId in (mTicketDetail?.noUnlockTicketPointsVOSet?.map { it.pointId }
|
|
|
|
|
+ ?: mutableListOf())
|
|
|
|
|
+ } == true) {
|
|
|
if (mTipDialog == null) {
|
|
if (mTipDialog == null) {
|
|
|
mTipDialog = TipDialog(requireContext())
|
|
mTipDialog = TipDialog(requireContext())
|
|
|
}
|
|
}
|
|
|
- mTipDialog?.setTip(getString(R.string.take_one_more_key_hint))
|
|
|
|
|
|
|
+ mTipDialog?.setTip(getString(R.string.all_point_have_other_job_not_finish))
|
|
|
mTipDialog?.setType(TipDialog.TYPE_HINT)
|
|
mTipDialog?.setType(TipDialog.TYPE_HINT)
|
|
|
mTipDialog?.setConfirmListener {
|
|
mTipDialog?.setConfirmListener {
|
|
|
- BusinessManager.sendLoadingEventMsg(getString(R.string.system_is_processing))
|
|
|
|
|
- presenter?.handleUnlockProcess(mPageChangeBO?.ticketId!!)
|
|
|
|
|
|
|
+ mCurrentStep?.stepId?.let {
|
|
|
|
|
+ presenter?.updateStep(it, "1") {
|
|
|
|
|
+ goBack()
|
|
|
|
|
+ }
|
|
|
|
|
+ } ?: ToastUtils.tip(getString(R.string.current_step_can_not_be_process))
|
|
|
}
|
|
}
|
|
|
mTipDialog?.showCancelCountdown(10)
|
|
mTipDialog?.showCancelCountdown(10)
|
|
|
} else {
|
|
} else {
|
|
|
- BusinessManager.sendLoadingEventMsg(getString(R.string.system_is_processing))
|
|
|
|
|
- presenter?.handleUnlockProcess(mPageChangeBO?.ticketId!!)
|
|
|
|
|
- SPUtils.takeKey(mPageChangeBO?.ticketId!!)
|
|
|
|
|
|
|
+ if (SPUtils.isKeyTake(mPageChangeBO?.ticketId!!)) {
|
|
|
|
|
+ if (mTipDialog == null) {
|
|
|
|
|
+ mTipDialog = TipDialog(requireContext())
|
|
|
|
|
+ }
|
|
|
|
|
+ mTipDialog?.setTip(getString(R.string.take_one_more_key_hint))
|
|
|
|
|
+ mTipDialog?.setType(TipDialog.TYPE_HINT)
|
|
|
|
|
+ mTipDialog?.setConfirmListener {
|
|
|
|
|
+ BusinessManager.sendLoadingEventMsg(getString(R.string.system_is_processing))
|
|
|
|
|
+ presenter?.handleUnlockProcess(mPageChangeBO?.ticketId!!)
|
|
|
|
|
+ }
|
|
|
|
|
+ mTipDialog?.showCancelCountdown(10)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ BusinessManager.sendLoadingEventMsg(getString(R.string.system_is_processing))
|
|
|
|
|
+ presenter?.handleUnlockProcess(mPageChangeBO?.ticketId!!)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
ToastUtils.tip(checkResult)
|
|
ToastUtils.tip(checkResult)
|
|
@@ -299,6 +322,7 @@ class JobProgressFragment(val goBack: () -> Unit) :
|
|
|
it?.filter { it.stepStatus == "1" }?.maxByOrNull { it.stepIndex!! }?.stepIndex?.let {
|
|
it?.filter { it.stepStatus == "1" }?.maxByOrNull { it.stepIndex!! }?.stepIndex?.let {
|
|
|
mStep = it
|
|
mStep = it
|
|
|
}
|
|
}
|
|
|
|
|
+ mCurrentStep = it?.get(mStep)
|
|
|
handleActionBtnVisibility()
|
|
handleActionBtnVisibility()
|
|
|
callback?.invoke()
|
|
callback?.invoke()
|
|
|
}
|
|
}
|