人员数据同步调换一下先后顺序

This commit is contained in:
fl 2025-02-12 09:38:59 +08:00
parent 9117c69c1b
commit 803298ae60
1 changed files with 13 additions and 13 deletions

View File

@ -52,36 +52,37 @@ public class WechatTasks {
* 人员基础数据同步定时器
*/
// @Scheduled(cron = "0 0/10 * * * ?")
@Scheduled(initialDelay = 60000,fixedDelay = 60000 * 30)
// @Scheduled(initialDelay = 60000,fixedDelay = 60000 * 30)
@Async
public void pushPersonTask() {
log.info("--------人员基础数据同步定时器开启------");
index=4;
//人脸更新
List<AttFaceBean> faceList = dao.getWebFaceList();
String jsonStr2 = "{}";
String method2 = "getWeChatFaceList";
String string2 = httpPost(method2, jsonStr2);
List<AttFaceBean> wechatFaceList = FastJsonHelper.jsonArrStrToBeanList(string2, AttFaceBean.class);
syncFaceToDatabase(faceList, wechatFaceList);
//考勤库人员
List<SysUser> list = dao.getPersonList();
//考勤小程序库人员
// List<SysUser> wechatList = dao.getWeChatPersonList();
String jsonStr = "{}";
String method = "getWeChatPersonList";
String string = httpPost(method, jsonStr);
List<SysUser> wechatList = FastJsonHelper.jsonArrStrToBeanList(string, SysUser.class);
// //所有字段同步
syncListsToDatabase(list, wechatList);
//人脸更新
List<AttFaceBean> faceList = dao.getWebFaceList();
// List<AttFaceBean> wechatFaceList = dao.getWeChatFaceList();
String jsonStr2 = "{}";
String method2 = "getWeChatFaceList";
String string2 = httpPost(method2, jsonStr2);
List<AttFaceBean> wechatFaceList = FastJsonHelper.jsonArrStrToBeanList(string2, AttFaceBean.class);
syncFaceToDatabase(faceList, wechatFaceList);
log.info("--------人员基础数据同步定时器完毕------");
}
/**
* 休假出差数据同步定时器
*/
@Scheduled(initialDelay = 60000 * 2,fixedDelay = 60000 * 30)
// @Scheduled(initialDelay = 60000 * 2,fixedDelay = 60000 * 30)
@Async
public void leaveTask() {
log.info("--------休假出差数据定时器开启------");
@ -152,7 +153,7 @@ public class WechatTasks {
/**
* 考勤数据同步定时器
*/
@Scheduled(initialDelay = 60000 * 3,fixedDelay = 60000 * 30)
// @Scheduled(initialDelay = 6000 * 3,fixedDelay = 60000 * 30)
@Async
public void wechatAttTask() {
log.info("--------考勤数据定时器开启------");
@ -356,7 +357,6 @@ public class WechatTasks {
* @String isCheck
*/
public int checkWechatIsFace(SysUser user){
// dao.checkWechatIsFace(user);
String jsonStr = FastJsonHelper.beanToJsonStr(user);
String method = "checkWechatIsFace";
String string = httpPost(method, jsonStr);