|
@@ -139,7 +139,13 @@ public class RecordsServiceImpl implements RecordsService {
|
|
|
System.out.println(vo.getJg());
|
|
|
vo.setHtqdsj(staffRecordSDO.getHtqdsj());
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
- if (vo.getRgssj() != null) {
|
|
|
+
|
|
|
+ if (vo.getYsrzsj() != null) {
|
|
|
+ LocalDateTime enterTime = staffRecordSDO.getYsrzsj();
|
|
|
+ int companyYear = Math.toIntExact(ChronoUnit.YEARS.between(enterTime, now));
|
|
|
+ int initYear = vo.getCssl() == null ? 0 : vo.getCssl();
|
|
|
+ vo.setSl(companyYear + initYear);
|
|
|
+ } else if (vo.getRgssj() != null) {
|
|
|
LocalDateTime enterTime = staffRecordSDO.getRgssj();
|
|
|
int companyYear = Math.toIntExact(ChronoUnit.YEARS.between(enterTime, now));
|
|
|
int initYear = vo.getCssl() == null ? 0 : vo.getCssl();
|
|
@@ -221,7 +227,7 @@ public class RecordsServiceImpl implements RecordsService {
|
|
|
|
|
|
List<SchoolDetailDO> schools = vo.getSchoolList().stream().filter(v -> StrUtil.isNotEmpty(v.getByxx())).sorted(
|
|
|
(o1, o2) -> {
|
|
|
- long b1 = o1.getBysj().toInstant(ZoneOffset.of("+8")).toEpochMilli();
|
|
|
+ long b1 = o1.getBysj().toInstant(ZoneOffset.of("+8")).toEpochMilli();
|
|
|
long b2 = o2.getBysj().toInstant(ZoneOffset.of("+8")).toEpochMilli();
|
|
|
return Long.compare(b2, b1);
|
|
|
}
|