Merge branch 'feature/salalryItemAndFieldSort' into release/2.9.1.2307.01

# Conflicts:
#	src/com/engine/salary/service/impl/SalaryItemServiceImpl.java
This commit is contained in:
Harryxzy 2023-07-11 13:24:37 +08:00
commit 5918de016e
1 changed files with 7 additions and 21 deletions

View File

@ -71,7 +71,7 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService
private SysSalaryItemBiz sysSalaryItemBiz = new SysSalaryItemBiz();
//
// @Autowired
// private LoggerTemplate salaryItemLoggerTemplate;
@Override
@ -140,27 +140,13 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService
.sorted(new Comparator<SalaryItemPO>() {
@Override
public int compare(SalaryItemPO o1, SalaryItemPO o2) {
if (o1 == null)
return 1;
if (o2 == null)
return -1;
if (o1 == null && o2 == null)
return 0;
if (o1.getSortedIndex() == null && o2.getSortedIndex() == null) {
Integer systemType1 = o1.getSystemType();
Integer systemType2 = o2.getSystemType();
if (systemType1 == null)
systemType1 = 0;
if (systemType2 == null)
systemType2 = 0;
if(o1.getSortedIndex() == null && o2.getSortedIndex() == null){
Integer systemType1=o1.getSystemType() == null ? 0 : o1.getSystemType();
Integer systemType2=o2.getSystemType() == null ? 0 : o2.getSystemType();
return systemType1.compareTo(systemType2);
} else {
Integer sortedIndex1 = o1.getSortedIndex();
Integer sortedIndex2 = o2.getSortedIndex();
if (sortedIndex1 == null)
sortedIndex1 = 0;
if (sortedIndex2 == null)
sortedIndex2 = 0;
}else{
Integer sortedIndex1=o1.getSortedIndex() == null ? 0 : o1.getSortedIndex();
Integer sortedIndex2=o2.getSortedIndex() == null ? 0 : o2.getSortedIndex();
return sortedIndex2.compareTo(sortedIndex1);
}
}