|
@@ -71,12 +71,9 @@ public class UserWithBeisenServiceImpl extends ServiceImpl<UserWithBeisenMapper,
|
|
DateTimeFormatter df2=DateTimeFormatter.ofPattern("HH:mm");
|
|
DateTimeFormatter df2=DateTimeFormatter.ofPattern("HH:mm");
|
|
DateTimeFormatter df3=DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
|
|
DateTimeFormatter df3=DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
|
|
DateTimeFormatter df4=DateTimeFormatter.ofPattern("HH:mm:ss");
|
|
DateTimeFormatter df4=DateTimeFormatter.ofPattern("HH:mm:ss");
|
|
- TimeType timeType = timeTypeMapper.selectById(companyId);
|
|
|
|
List<User> userList = userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getCompanyId, companyId));
|
|
List<User> userList = userMapper.selectList(new LambdaQueryWrapper<User>().eq(User::getCompanyId, companyId));
|
|
List<UserWithBeisen> userWithBeisenList = userWithBeisenService.list(new LambdaQueryWrapper<UserWithBeisen>().eq(UserWithBeisen::getCompanyId, companyId));
|
|
List<UserWithBeisen> userWithBeisenList = userWithBeisenService.list(new LambdaQueryWrapper<UserWithBeisen>().eq(UserWithBeisen::getCompanyId, companyId));
|
|
BeisenConfig beisenConfig = beisenConfigMapper.selectById(companyId);
|
|
BeisenConfig beisenConfig = beisenConfigMapper.selectById(companyId);
|
|
- //获取特殊节假日设置
|
|
|
|
- List<HolidaySetting> holidaySettings = holidaySettingService.list(new LambdaQueryWrapper<HolidaySetting>().eq(HolidaySetting::getCompanyId, companyId));
|
|
|
|
if(beisenConfig==null){
|
|
if(beisenConfig==null){
|
|
msg.setError("北森基础数据配置未完成,请联系服务商完成配置");
|
|
msg.setError("北森基础数据配置未完成,请联系服务商完成配置");
|
|
return msg;
|
|
return msg;
|
|
@@ -89,6 +86,18 @@ public class UserWithBeisenServiceImpl extends ServiceImpl<UserWithBeisenMapper,
|
|
JSONArray allVacationList=new JSONArray();
|
|
JSONArray allVacationList=new JSONArray();
|
|
JSONArray allDailyReportList=new JSONArray();
|
|
JSONArray allDailyReportList=new JSONArray();
|
|
List<LeaveSheet> leaveSheetList=new ArrayList<>();
|
|
List<LeaveSheet> leaveSheetList=new ArrayList<>();
|
|
|
|
+
|
|
|
|
+ List<UserFvTime> userFvTimeList=new ArrayList<>();
|
|
|
|
+ for (LocalDate localDate : workDaysListInRange) {
|
|
|
|
+ JSONArray statisticList = BeiSenUtils.getAttendanceStatistics(df.format(localDate), df.format(localDate), beisenConfig.getAppKey(), beisenConfig.getAppSecret(), 1, 100);
|
|
|
|
+ JSONArray overTimeList = BeiSenUtils.getOverTimeList(df.format(localDate), beisenConfig.getAppKey(), beisenConfig.getAppSecret(), 1, 100);
|
|
|
|
+ JSONArray vacationList = BeiSenUtils.getVacationList(df.format(localDate), beisenConfig.getAppKey(), beisenConfig.getAppSecret(),1,100);
|
|
|
|
+ JSONArray dailyReportList = BeiSenUtils.getDailyReportList(df.format(localDate), beisenConfig.getAppKey(), beisenConfig.getAppSecret(), 1, 100);
|
|
|
|
+ allOverTimeList.addAll(overTimeList);
|
|
|
|
+ attendanceStatistics.addAll(statisticList);
|
|
|
|
+ allVacationList.addAll(vacationList);
|
|
|
|
+ allDailyReportList.addAll(dailyReportList);
|
|
|
|
+ }
|
|
//同步休假数据到工时管家
|
|
//同步休假数据到工时管家
|
|
for (int i = 0; i < allVacationList.size(); i++) {
|
|
for (int i = 0; i < allVacationList.size(); i++) {
|
|
JSONObject jsonObject = allVacationList.getJSONObject(i);
|
|
JSONObject jsonObject = allVacationList.getJSONObject(i);
|
|
@@ -140,22 +149,7 @@ public class UserWithBeisenServiceImpl extends ServiceImpl<UserWithBeisenMapper,
|
|
if(leaveSheetList.size()>0){
|
|
if(leaveSheetList.size()>0){
|
|
leaveSheetService.saveOrUpdateBatch(leaveSheetList);
|
|
leaveSheetService.saveOrUpdateBatch(leaveSheetList);
|
|
}
|
|
}
|
|
- List<UserFvTime> userFvTimeList=new ArrayList<>();
|
|
|
|
- for (LocalDate localDate : workDaysListInRange) {
|
|
|
|
- JSONArray statisticList = BeiSenUtils.getAttendanceStatistics(df.format(localDate), df.format(localDate), beisenConfig.getAppKey(), beisenConfig.getAppSecret(), 1, 100);
|
|
|
|
- JSONArray overTimeList = BeiSenUtils.getOverTimeList(df.format(localDate), beisenConfig.getAppKey(), beisenConfig.getAppSecret(), 1, 100);
|
|
|
|
- JSONArray vacationList = BeiSenUtils.getVacationList(df.format(localDate), beisenConfig.getAppKey(), beisenConfig.getAppSecret(),1,100);
|
|
|
|
- JSONArray dailyReportList = BeiSenUtils.getDailyReportList(df.format(localDate), beisenConfig.getAppKey(), beisenConfig.getAppSecret(), 1, 100);
|
|
|
|
- allOverTimeList.addAll(overTimeList);
|
|
|
|
- attendanceStatistics.addAll(statisticList);
|
|
|
|
- allVacationList.addAll(vacationList);
|
|
|
|
- allDailyReportList.addAll(dailyReportList);
|
|
|
|
- }
|
|
|
|
//打印数据
|
|
//打印数据
|
|
- System.out.println("allOverTimeList:"+allOverTimeList);
|
|
|
|
- System.out.println("attendanceStatistics:"+attendanceStatistics);
|
|
|
|
- System.out.println("allVacationList:"+allVacationList);
|
|
|
|
- System.out.println("allDailyReportList:"+allDailyReportList);
|
|
|
|
for (LocalDate localDate : workDaysListInRange) {
|
|
for (LocalDate localDate : workDaysListInRange) {
|
|
Stream<JSONObject> swipingCardsStream = attendanceStatistics.stream().map(item -> (JSONObject) item);
|
|
Stream<JSONObject> swipingCardsStream = attendanceStatistics.stream().map(item -> (JSONObject) item);
|
|
//todo: 获取当天的考勤数据
|
|
//todo: 获取当天的考勤数据
|