|
@@ -79,7 +79,7 @@ public class SyncTranForAtsFacadeControllerBean extends AbstractSyncTranForAtsFa
|
|
|
if(!StringUtils.isEmpty(beginDate) ){
|
|
|
//开始日期字定义,结束日期都是今天
|
|
|
start = LocalDate.parse(beginDate, dateFormatter);
|
|
|
- }
|
|
|
+ }
|
|
|
if(!StringUtils.isEmpty(endDate)){
|
|
|
//开始日期,结束日期都是今天
|
|
|
end = LocalDate.parse(endDate, dateFormatter);
|
|
@@ -102,8 +102,10 @@ public class SyncTranForAtsFacadeControllerBean extends AbstractSyncTranForAtsFa
|
|
|
String token = DigestUtils.md5Hex(secretKey + currentTime);
|
|
|
// 构建查询参数
|
|
|
Map<String, String> queryParams = new HashMap<>();
|
|
|
- queryParams.put("timestamp", String.valueOf(currentTime));
|
|
|
- queryParams.put("token", token);
|
|
|
+// queryParams.put("timestamp", String.valueOf(currentTime));
|
|
|
+// queryParams.put("token", token);
|
|
|
+ //20250717 改用静态
|
|
|
+ queryParams.put("key", secretKey);
|
|
|
|
|
|
// 构建请求体(自动处理时间范围)
|
|
|
JSONObject requestBody = buildRequestParams(dayStr, dayStr); // 同一天
|
|
@@ -120,6 +122,8 @@ public class SyncTranForAtsFacadeControllerBean extends AbstractSyncTranForAtsFa
|
|
|
JSONArray items = data.getJSONArray("items");
|
|
|
logger.error("日期 " + dayStr + " 打卡同步接口,接口共传输记录数: " + items.size()+"条数据");
|
|
|
saveMJPunchCardData(ctx, items);
|
|
|
+ }else {
|
|
|
+ System.out.print("打卡,考勤,接口获取错误!");
|
|
|
}
|
|
|
}
|
|
|
} catch (Exception e) {
|