修改同步时间

master
Yangwl 3 months ago
parent fd5e4d25e5
commit dd3595a64e

@ -3,6 +3,8 @@ package com.op.system.service.impl;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletRequest;
@ -671,8 +673,12 @@ public class SysUserServiceImpl implements ISysUserService {
DynamicDataSourceContextHolder.push("ds_1000");
// 调用 sendPost 方法(确保此方法内部使用 POST 方法发送数据)
// 获取前一天的日期
LocalDate yesterday = LocalDate.now().minusDays(1);
// 格式化为指定格式
String formattedDate = yesterday.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
Map param=new HashMap();
param.put("day",DateUtils.getDate());
param.put("day",formattedDate);
String result = HttpUtils.sendPostForm(attendanceRecordUrl, param);
List<MesClockRecord> mesClockRecordList =JSONArray.parseArray(result,MesClockRecord.class);
SimpleDateFormat sdfs = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

Loading…
Cancel
Save