IDEMPIERE-3799 Avoid users re-running a process that is already being processed / Peer review
This commit is contained in:
parent
0619c3d452
commit
aacf45495f
|
@ -176,6 +176,7 @@ public class MPInstance extends X_AD_PInstance
|
|||
if (!instanceParameter.equalParameter(para)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -239,17 +239,25 @@ public class MPInstancePara extends X_AD_PInstance_Para
|
|||
if (param == null)
|
||||
return false;
|
||||
|
||||
if (!Objects.equals(getP_String(),param.getP_String()) && !Objects.equals(getP_String_To(),param.getP_String_To()))
|
||||
String str = getP_String() == null ? "" : getP_String();
|
||||
String strParam = param.getP_String() == null ? "" : param.getP_String();
|
||||
String str2 = getP_String_To() == null ? "" : getP_String_To();
|
||||
String str2Param = param.getP_String_To() == null ? "" : param.getP_String_To();
|
||||
if (!Objects.equals(str, strParam) || !Objects.equals(str2, str2Param))
|
||||
return false;
|
||||
|
||||
BigDecimal bd = (BigDecimal)get_Value("P_Number");
|
||||
BigDecimal bdParam = (BigDecimal)param.get_Value("P_Number");
|
||||
BigDecimal bd2 = (BigDecimal)get_Value("P_Number_To");
|
||||
BigDecimal bd2Param = (BigDecimal)param.get_Value("P_Number_To");
|
||||
if (!Objects.equals(bd,bdParam) && !Objects.equals(bd2,bd2Param))
|
||||
BigDecimal bd = getP_Number();
|
||||
BigDecimal bdParam = param.getP_Number();
|
||||
BigDecimal bd2 = getP_Number_To();
|
||||
BigDecimal bd2Param = param.getP_Number_To();
|
||||
if (!Objects.equals(bd, bdParam) || !Objects.equals(bd2, bd2Param))
|
||||
return false;
|
||||
|
||||
if (!Objects.equals(getP_Date(),param.getP_Date()) && !Objects.equals(getP_Date_To(),param.getP_Date_To()))
|
||||
Timestamp ts = getP_Date();
|
||||
Timestamp tsParam = param.getP_Date();
|
||||
Timestamp ts2 = getP_Date_To();
|
||||
Timestamp ts2Param = param.getP_Date_To();
|
||||
if (!Objects.equals(ts, tsParam) || !Objects.equals(ts2, ts2Param))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue