|
|
@@ -164,7 +164,7 @@ public class HkLeaveAuthServ extends Serv {
|
|
|
Timestamp now = new Timestamp(System.currentTimeMillis());
|
|
|
if (!ifLeaveEnded(freshCtx.jssj, now) && ifLeaveStarted(freshCtx.kssj, now)) {
|
|
|
for (LeaveAuthItemRow newItemRow : selLeaveAuthItemRowList(itemGdba, rcid))
|
|
|
- executePendingLeaveAuthItemSync(newItemRow, now, 0);
|
|
|
+ executePendingLeaveAuthItemSync(newItemRow, now, 0, Map.of());
|
|
|
}
|
|
|
return;
|
|
|
}
|
|
|
@@ -1046,7 +1046,7 @@ public class HkLeaveAuthServ extends Serv {
|
|
|
int skippedCount = 0;
|
|
|
int failedCount = 0;
|
|
|
for (LeaveAuthItemRow itemRow : itemRowList) {
|
|
|
- Map<String, Object> item = executePendingLeaveAuthItemSync(itemRow, now, retryDelaySeconds);
|
|
|
+ Map<String, Object> item = executePendingLeaveAuthItemSync(itemRow, now, retryDelaySeconds, makeReqOverrideParm());
|
|
|
detailList.add(item);
|
|
|
|
|
|
if (rdBoolLike(item.get("platformConfigConfirmed")) || rdBoolLike(item.get("configSearchMatched"))) {
|
|
|
@@ -1226,7 +1226,8 @@ public class HkLeaveAuthServ extends Serv {
|
|
|
*/
|
|
|
private static Map<String, Object> executePendingLeaveAuthItemSync(LeaveAuthItemRow itemRow,
|
|
|
Timestamp now,
|
|
|
- int retryDelaySeconds) {
|
|
|
+ int retryDelaySeconds,
|
|
|
+ Map<String, Object> overrideParm) {
|
|
|
Map<String, Object> result = new LinkedHashMap<>();
|
|
|
result.put("pendingAction", "search");
|
|
|
result.put("retryDelaySeconds", retryDelaySeconds);
|
|
|
@@ -1287,7 +1288,7 @@ public class HkLeaveAuthServ extends Serv {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- Map<String, Object> runResult = executePlatformConfigAddForItem(gdba, ctx, itemRow, true);
|
|
|
+ Map<String, Object> runResult = executePlatformConfigAddForItem(gdba, ctx, itemRow, true, overrideParm);
|
|
|
runResult.put("pendingAction", StringUtils.defaultIfBlank(rdStr(runResult.get("pendingAction")), "retryAdd"));
|
|
|
updLeaveAuthItemRow(gdba, itemRow.itemId, runResult);
|
|
|
gdba.commit();
|
|
|
@@ -2503,7 +2504,8 @@ public class HkLeaveAuthServ extends Serv {
|
|
|
private static Map<String, Object> executePlatformConfigAddForItem(Db gdba,
|
|
|
LeaveAuthSyncCtx ctx,
|
|
|
LeaveAuthItemRow itemRow,
|
|
|
- boolean autoTrigger) throws Exception {
|
|
|
+ boolean autoTrigger,
|
|
|
+ Map<String, Object> overrideParm) throws Exception {
|
|
|
Map<String, Object> result = new LinkedHashMap<>();
|
|
|
result.put("ok", true);
|
|
|
result.put("autoTrigger", autoTrigger);
|
|
|
@@ -2535,6 +2537,11 @@ public class HkLeaveAuthServ extends Serv {
|
|
|
markLeaveAuthStagePending(result, ctx, "pending", new Timestamp(System.currentTimeMillis()), false, 0);
|
|
|
return result;
|
|
|
}
|
|
|
+ String tagId = rdCfgOrOverride(overrideParm, "tagId", CFG_TAG_ID, "HK_LEAVE_AUTH_TAG_ID", HK_DEF_TAG_ID);
|
|
|
+ if (StringUtils.isNotBlank(tagId))
|
|
|
+ hkConnParm.put("tagId", tagId);
|
|
|
+ result.put("tagId", tagId);
|
|
|
+ result.put("tagIdSource", rdCfgSource(overrideParm, "tagId", CFG_TAG_ID, "HK_LEAVE_AUTH_TAG_ID", HK_DEF_TAG_ID));
|
|
|
result.put("hkConn", makeSafeHkConnResp(hkConnParm));
|
|
|
|
|
|
Map<String, Map<String, Object>> personInfoMap = HK_API_CLIENT.loadPersonInfoMapByJobNo(
|