浏览代码

Merge branch 'master' of http://47.100.37.243:10080/wutt/manHourHousekeeper into master

seyason 2 年之前
父节点
当前提交
fd4aa59d64

+ 8 - 6
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/task/TimingTask.java

@@ -279,10 +279,10 @@ public class TimingTask {
 
 
     //每天2:11 同步钉钉用户前2天到未来30天时间段的打卡,请假,出差数据
-    @Scheduled(cron = "0 41 15 ? * *")
+    @Scheduled(cron = "0 11 2 ? * *")
     private void synFanWeiWorkData() {
-        /*if (isDev) return;
-        if(!isPrivateDeploy) return;*/
+        if (isDev) return;
+        if(!isPrivateDeploy) return;
         List<TimeType> timeTypeList = timeTypeMapper.selectList(new QueryWrapper<TimeType>().eq("sync_fanwei", 1));
         List<Integer> compIds = timeTypeList.stream().map(TimeType::getCompanyId).collect(Collectors.toList());
         if(compIds.isEmpty()){
@@ -306,14 +306,14 @@ public class TimingTask {
             List<UserFvTime> userFvTimeList=new ArrayList<>();
             List<LeaveSheet> leaveSheetList=new ArrayList<>();
             List<BusinessTrip> businessTripList=new ArrayList<>();
+            TimeType allDay = timeTypeMapper.selectOne(new QueryWrapper<TimeType>().eq("company_id", compId));
+            //获取休息设置
+            TimeAutoExclude timeAutoExclude = timeAutoExcludeMapper.selectOne(new QueryWrapper<TimeAutoExclude>().eq("company_id", compId));
             //Todo: 获取打卡数据
             HttpRespMsg workDataMsg = dockWithMLD.getResult("http://10.1.10.51:20175/api/cube/restful/interface/getModeDataPageList/getWorkData", jsonString);
             List<Map<String,Object>> workDataList= (List<Map<String, Object>>) workDataMsg.data;
             List<String> userIds = workDataList.stream().map(map -> String.valueOf(map.get("userId"))).collect(Collectors.toList());
             List<User> userList = userMapper.selectList(new QueryWrapper<User>().in("job_number", userIds));
-            //获取休息设置
-            TimeAutoExclude timeAutoExclude = timeAutoExcludeMapper.selectOne(new QueryWrapper<TimeAutoExclude>().eq("company_id", compId));
-            TimeType allDay = timeTypeMapper.selectOne(new QueryWrapper<TimeType>().eq("company_id", compId));
             for (User user : userList) {
                 System.out.println("需要同步的用户列表-----"+userList);
                 LocalTime startTime=null;
@@ -364,6 +364,7 @@ public class TimingTask {
             if(userFvTimeList.size()>0){
                 userFvTimeService.saveOrUpdateBatch(userFvTimeList);
             }
+            System.out.println(workDataList);
             //Todo: 获取请假数据
             HttpRespMsg leaveRecordMsg = dockWithMLD.getResult("http://10.1.10.51:20175/api/cube/restful/interface/getModeDataPageList/getLeaveRecord", jsonString);
             List<Map<String,Object>> leaveRecordList= (List<Map<String, Object>>) leaveRecordMsg.data;
@@ -428,6 +429,7 @@ public class TimingTask {
             if(leaveSheetList.size()>0){
                 leaveSheetService.saveOrUpdateBatch(leaveSheetList);
             }
+            System.out.println(leaveRecordList);
             //Todo: 获取出差数据
             HttpRespMsg travelRecordMsg = dockWithMLD.getResult("http://10.1.10.51:20175/api/cube/restful/interface/getModeDataPageList/getTravelRecord", jsonString);
             List<Map<String,Object>> travelRecordList= (List<Map<String, Object>>) travelRecordMsg.data;