|
|
|
|
@ -259,4 +259,33 @@ public class TimeUtil {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 判断指定审批时长是否超时(按审批层级阈值) |
|
|
|
|
* @param usedSeconds 已用审批时长(秒) |
|
|
|
|
* @param dictValue 审批超时字典值,branch=分局审批,city=市局审批 |
|
|
|
|
* @return 未超时/已超时 |
|
|
|
|
*/ |
|
|
|
|
public static String getTimeoutStatus(long usedSeconds, String dictValue) { |
|
|
|
|
return getTimeoutStatus(usedSeconds, dictValue, false); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 判断指定审批时长是否超时(按审批层级阈值) |
|
|
|
|
* @param usedSeconds 已用审批时长(秒) |
|
|
|
|
* @param dictValue 审批超时字典值,branch=分局审批,city=市局审批 |
|
|
|
|
* @param detail 是否展示超时明细 |
|
|
|
|
* @return 未超时,或 已超时/超时xx天xx时xx分 |
|
|
|
|
*/ |
|
|
|
|
public static String getTimeoutStatus(long usedSeconds, String dictValue, boolean detail) { |
|
|
|
|
Long threshold = getApprovalLockThreshold(dictValue); |
|
|
|
|
long diff = threshold - usedSeconds; |
|
|
|
|
if (diff >= 0) { |
|
|
|
|
return "未超时"; |
|
|
|
|
} |
|
|
|
|
if (detail) { |
|
|
|
|
return "已超时/超时" + formatDuration(-diff); |
|
|
|
|
} |
|
|
|
|
return "已超时"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|