|
|
@@ -428,7 +428,6 @@ class JobExecuteFragment : BaseFragment<FragmentJobExecuteBinding>() {
|
|
|
itemBinding.pointName.text = item.pointName
|
|
|
itemBinding.pointGroup.text = item.groupName
|
|
|
itemBinding.pointFunction.text = item.pointFunction
|
|
|
- itemBinding.lockStatusLayout.isVisible = item.pointStatus != "0"
|
|
|
when (item.pointStatus) {
|
|
|
"1" -> {
|
|
|
itemBinding.lockStatusTv.setTextColor(
|
|
|
@@ -607,8 +606,8 @@ class JobExecuteFragment : BaseFragment<FragmentJobExecuteBinding>() {
|
|
|
viewModel.groupInfo = viewModel.ticketPoints.groupBy { it.groupId to it.groupName }.filter {
|
|
|
val currentWorkflowStep = viewModel.currentStepData
|
|
|
if (currentWorkflowStep?.enableLock == true) {
|
|
|
- logger.info("当前步骤上锁:${it.value.all { it.pointStatus == "0" }}")
|
|
|
- it.value.any { it.pointStatus == "0" }
|
|
|
+ logger.info("当前步骤上锁:${it.value.all { it.pointStatus == "0" || (viewModel.isUnlockFirst && it.pointStatus == "2") }}")
|
|
|
+ it.value.any { it.pointStatus == "0"|| (viewModel.isUnlockFirst && it.pointStatus == "2") }
|
|
|
} else if (currentWorkflowStep?.enableUnlock == true) {
|
|
|
logger.info("当前步骤解锁:${it.value.all { it.pointStatus == "1" }}")
|
|
|
it.value.any { it.pointStatus == "1" }
|
|
|
@@ -625,7 +624,7 @@ class JobExecuteFragment : BaseFragment<FragmentJobExecuteBinding>() {
|
|
|
currentStep?.enableCancelJob == true && (viewModel.ticketPoints.all { it.pointStatus == "0" } || (viewModel.isUnlockFirst && currentStep?.enableCancelJob == true && viewModel.ticketPoints.all { it.pointStatus == "1" }))
|
|
|
binding.toLock.isVisible =
|
|
|
//步骤开启上锁,并且点位都还没有上锁
|
|
|
- (currentStep?.enableLock == true && viewModel.ticketPoints.any { it.pointStatus == "0" }) ||
|
|
|
+ (currentStep?.enableLock == true && viewModel.ticketPoints.any { it.pointStatus == "0" || (viewModel.isUnlockFirst && it.pointStatus == "2") }) ||
|
|
|
//步骤开启共锁,并且点位都不存在没有上锁的
|
|
|
(currentStep?.enableColock == true && viewModel.ticketPoints.all { it.pointStatus == "1" }) || (currentStep?.enableLock == true && viewModel.isUnlockFirst && viewModel.ticketPoints.all { it.pointStatus == "2" })
|
|
|
//步骤开启解锁,并且点位都已经上锁,并且如果支持共锁都已经解除
|