|
@@ -1043,24 +1043,29 @@ public class ProjectStaffRecordServiceImpl implements ProjectStaffRecordService
|
|
|
int index = 2;
|
|
int index = 2;
|
|
|
int day = 0;
|
|
int day = 0;
|
|
|
list2=list2.subList(2,size-1);
|
|
list2=list2.subList(2,size-1);
|
|
|
- for (Object o : list2) {
|
|
|
|
|
- UserClockDataDetailsBo userClockDataDetailsBo = new UserClockDataDetailsBo();
|
|
|
|
|
- String str = o.toString();
|
|
|
|
|
- userClockDataDetailsBo.setDuration(new BigDecimal(str));
|
|
|
|
|
- String s = title2.get(index);
|
|
|
|
|
- userClockDataDetailsBo.setDateStr(str);
|
|
|
|
|
- if (s.equals("六")||s.equals("日")){
|
|
|
|
|
- day++;
|
|
|
|
|
- LocalDate localDate1 = localDate.withDayOfMonth(day);
|
|
|
|
|
- userClockDataDetailsBo.setDate(localDate1);
|
|
|
|
|
- }else {
|
|
|
|
|
- day=Integer.parseInt(s);
|
|
|
|
|
- LocalDate localDate1 = localDate.withDayOfMonth(day);
|
|
|
|
|
- userClockDataDetailsBo.setDate(localDate1);
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ for (Object o : list2) {
|
|
|
|
|
+ UserClockDataDetailsBo userClockDataDetailsBo = new UserClockDataDetailsBo();
|
|
|
|
|
+ String str = o.toString();
|
|
|
|
|
+ userClockDataDetailsBo.setDuration(new BigDecimal(str));
|
|
|
|
|
+ String s = title2.get(index);
|
|
|
|
|
+ userClockDataDetailsBo.setDateStr(str);
|
|
|
|
|
+
|
|
|
|
|
+ if (s.equals("六")||s.equals("日")){
|
|
|
|
|
+ day++;
|
|
|
|
|
+ LocalDate localDate1 = localDate.withDayOfMonth(day);
|
|
|
|
|
+ userClockDataDetailsBo.setDate(localDate1);
|
|
|
|
|
+ }else {
|
|
|
|
|
+ day=Integer.parseInt(s);
|
|
|
|
|
+ LocalDate localDate1 = localDate.withDayOfMonth(day);
|
|
|
|
|
+ userClockDataDetailsBo.setDate(localDate1);
|
|
|
|
|
+ }
|
|
|
|
|
+ ul.add(userClockDataDetailsBo);
|
|
|
|
|
+ index++;
|
|
|
}
|
|
}
|
|
|
- ul.add(userClockDataDetailsBo);
|
|
|
|
|
- index++;
|
|
|
|
|
-
|
|
|
|
|
|
|
+ }catch (DateTimeException dte){
|
|
|
|
|
+ int monthValue = localDate.getMonthValue();
|
|
|
|
|
+ throw new RuntimeException(StringUtils.format("日期格式{}月{}错误,请检查",monthValue, day));
|
|
|
}
|
|
}
|
|
|
userClockDataBo.setList(ul);
|
|
userClockDataBo.setList(ul);
|
|
|
listData.add(userClockDataBo);
|
|
listData.add(userClockDataBo);
|