|
@@ -6,6 +6,7 @@ import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.zjugis.framework.common.pojo.CommonResult;
|
|
|
+import com.zjugis.framework.common.util.date.DateUtils;
|
|
|
import com.zjugis.framework.mybatis.core.query.LambdaQueryWrapperX;
|
|
|
import com.zjugis.module.adm.api.staff.dto.StaffRecordsDTO;
|
|
|
import com.zjugis.module.adm.api.staff.dto.StaffReportDTO;
|
|
@@ -32,6 +33,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import javax.annotation.Resource;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.LocalTime;
|
|
|
+import java.time.ZoneOffset;
|
|
|
import java.time.temporal.ChronoUnit;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
@@ -154,9 +156,9 @@ public class RecordsServiceImpl implements RecordsService {
|
|
|
if (CollectionUtil.isNotEmpty(schoolList)) {
|
|
|
List<SchoolDetailDO> schools = schoolList.stream().sorted(
|
|
|
(o1, o2) -> {
|
|
|
- int b1 = Integer.parseInt(o1.getXl());
|
|
|
- int b2 = Integer.parseInt(o2.getXl());
|
|
|
- return Integer.compare(b1, b2);
|
|
|
+ long b1 = o1.getBysj().toInstant(ZoneOffset.of("+8")).toEpochMilli();
|
|
|
+ long b2 = o2.getBysj().toInstant(ZoneOffset.of("+8")).toEpochMilli();
|
|
|
+ return -Long.compare(b2, b1);
|
|
|
}
|
|
|
).collect(Collectors.toList());
|
|
|
vo.setSchoolList(schools);
|
|
@@ -207,11 +209,12 @@ public class RecordsServiceImpl implements RecordsService {
|
|
|
updateSchoolList(vo.getUserId(), vo.getSchoolList());
|
|
|
if (CollectionUtil.isNotEmpty(vo.getSchoolList())) {
|
|
|
//获取最高学历 更新到档案中 用于统计员工学历
|
|
|
+
|
|
|
List<SchoolDetailDO> schools = vo.getSchoolList().stream().filter(v -> StrUtil.isNotEmpty(v.getByxx())).sorted(
|
|
|
(o1, o2) -> {
|
|
|
- int b1 = Integer.parseInt(o1.getXl());
|
|
|
- int b2 = Integer.parseInt(o2.getXl());
|
|
|
- return Integer.compare(b2, b1);
|
|
|
+ long b1 = o1.getBysj().toInstant(ZoneOffset.of("+8")).toEpochMilli();
|
|
|
+ long b2 = o2.getBysj().toInstant(ZoneOffset.of("+8")).toEpochMilli();
|
|
|
+ return Long.compare(b2, b1);
|
|
|
}
|
|
|
).collect(Collectors.toList());
|
|
|
|