|
|
@@ -668,13 +668,11 @@ class JobExecuteViewModel @Inject constructor(
|
|
|
fun getStepErrorTip(workflowStep: IsJobTicketStepDataVo?): Pair<String, Int?> {
|
|
|
return when {
|
|
|
|
|
|
- ((ticketData?.createBy == MainDomainData.userInfo?.userName && workflowStep?.confirmUser == null) || workflowStep?.currentUserCanConfirm() == true) &&
|
|
|
- (workflowStep?.enableSetLocker == true || workflowStep?.enableSetColocker == true) -> {
|
|
|
+ ((ticketData?.createBy == MainDomainData.userInfo?.userName && workflowStep?.confirmUser == null) || workflowStep?.currentUserCanConfirm() == true) && (workflowStep?.enableSetLocker == true || workflowStep?.enableSetColocker == true) -> {
|
|
|
CommonUtils.getStr(R.string.please_select_member).toString() to null
|
|
|
}
|
|
|
|
|
|
- ((ticketData?.createBy == MainDomainData.userInfo?.userName && workflowStep?.confirmUser == null) || workflowStep?.currentUserCanConfirm() == true) &&
|
|
|
- (workflowStep?.enableLock == true || workflowStep?.enableColock == true || workflowStep?.enableReleaseColock == true || workflowStep?.enableUnlock == true) -> {
|
|
|
+ ((ticketData?.createBy == MainDomainData.userInfo?.userName && workflowStep?.confirmUser == null) || workflowStep?.currentUserCanConfirm() == true) && (workflowStep?.enableLock == true || workflowStep?.enableColock == true || workflowStep?.enableReleaseColock == true || workflowStep?.enableUnlock == true) -> {
|
|
|
var tip = ""
|
|
|
var index: Int? = null
|
|
|
if (workflowStep.enableLock) {
|
|
|
@@ -736,13 +734,11 @@ class JobExecuteViewModel @Inject constructor(
|
|
|
fun getCurrentStepTip(): String {
|
|
|
val currentWorkflowStep = currentStepData
|
|
|
return when {
|
|
|
- ((ticketData?.createBy == MainDomainData.userInfo?.userName && currentWorkflowStep?.confirmUser == null) || currentWorkflowStep?.currentUserCanConfirm() == true) &&
|
|
|
- (currentWorkflowStep?.enableSetLocker == true || currentWorkflowStep?.enableSetColocker == true) -> {
|
|
|
+ ((ticketData?.createBy == MainDomainData.userInfo?.userName && currentWorkflowStep?.confirmUser == null) || currentWorkflowStep?.currentUserCanConfirm() == true) && (currentWorkflowStep?.enableSetLocker == true || currentWorkflowStep?.enableSetColocker == true) -> {
|
|
|
CommonUtils.getStr(R.string.please_select_member).toString()
|
|
|
}
|
|
|
|
|
|
- ((ticketData?.createBy == MainDomainData.userInfo?.userName && currentWorkflowStep?.confirmUser == null) || currentWorkflowStep?.currentUserCanConfirm() == true) &&
|
|
|
- (currentWorkflowStep?.enableLock == true || currentWorkflowStep?.enableColock == true || currentWorkflowStep?.enableReleaseColock == true || currentWorkflowStep?.enableUnlock == true) -> {
|
|
|
+ ((ticketData?.createBy == MainDomainData.userInfo?.userName && currentWorkflowStep?.confirmUser == null) || currentWorkflowStep?.currentUserCanConfirm() == true) && (currentWorkflowStep?.enableLock == true || currentWorkflowStep?.enableColock == true || currentWorkflowStep?.enableReleaseColock == true || currentWorkflowStep?.enableUnlock == true) -> {
|
|
|
var tip = ""
|
|
|
if (currentWorkflowStep.enableLock) {
|
|
|
if (ticketPoints.any { it.pointStatus != "1" } && ticketKey.isEmpty()) {
|
|
|
@@ -756,11 +752,11 @@ class JobExecuteViewModel @Inject constructor(
|
|
|
}
|
|
|
}
|
|
|
if (currentWorkflowStep.enableColock && ticketPoints.all { it.pointStatus == "1" } && ticketUser.filter { it.userRole == RoleEnum.JTCOLOCKER.roleKey }
|
|
|
- .any { it.jobStatus != "1" }) {
|
|
|
+ .any { it.jobStatus == "0" }) {
|
|
|
tip = CommonUtils.getStr(R.string.please_do_colock).toString()
|
|
|
}
|
|
|
if (currentWorkflowStep.enableReleaseColock && ticketUser.filter { it.userRole == RoleEnum.JTCOLOCKER.roleKey }
|
|
|
- .any { it.jobStatus != "2" }) {
|
|
|
+ .none { it.jobStatus == "0" }) {
|
|
|
tip =
|
|
|
CommonUtils.getStr(com.grkj.ui_base.R.string.please_do_uncolock).toString()
|
|
|
}
|