Merge remote-tracking branch 'origin/fix_2nd_period' into fix_2nd_period
This commit is contained in:
+36
@@ -486,6 +486,7 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
|
||||
private List<DummyInventoryInfoEO> attestationRankSort(String orderBy, String orderByField, List<DummyInventoryInfoEO> dummyInventoryInfoEOList) {
|
||||
List<DummyInventoryInfoEO> list = new LinkedList<>();
|
||||
Collator comparator = Collator.getInstance(Locale.CHINESE);
|
||||
if(ObjectUtils.isNotEmpty(orderByField) && "attestationRank".equals(orderByField)){
|
||||
List<DummyInventoryInfoEO> wvta = dummyInventoryInfoEOList.stream()
|
||||
.filter(e -> e.getAttestationRankStr().startsWith(AttestationRankEnum.WVTA.getValue())).collect(Collectors.toList());
|
||||
@@ -502,6 +503,11 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
|
||||
|
||||
if (OrderEnum.POSITIVE.getValue().equals(orderBy)) {
|
||||
attestationRankPositive(orderBy, wvta, comparator);
|
||||
attestationRankPositive(orderBy, vta, comparator);
|
||||
attestationRankPositive(orderBy, market, comparator);
|
||||
attestationRankPositive(orderBy, regu, comparator);
|
||||
attestationRankPositive(orderBy, na, comparator);
|
||||
//正序
|
||||
list.addAll(valueNull);
|
||||
list.addAll(wvta);
|
||||
@@ -511,6 +517,11 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
list.addAll(na);
|
||||
|
||||
} else if (OrderEnum.REVERSE.getValue().equals(orderBy)) {
|
||||
attestationRankReverse(orderBy, wvta, comparator);
|
||||
attestationRankReverse(orderBy, vta, comparator);
|
||||
attestationRankReverse(orderBy, market, comparator);
|
||||
attestationRankReverse(orderBy, regu, comparator);
|
||||
attestationRankReverse(orderBy, na, comparator);
|
||||
//倒序
|
||||
list.addAll(na);
|
||||
list.addAll(regu);
|
||||
@@ -527,6 +538,31 @@ public class DummyInventoryInfoEOServiceImpl extends ServiceImpl<DummyInventoryI
|
||||
}
|
||||
}
|
||||
|
||||
//正序
|
||||
private void attestationRankPositive(String orderBy, List<DummyInventoryInfoEO> list, Collator comparator) {
|
||||
if(OrderEnum.POSITIVE.getValue().equals(orderBy)){
|
||||
Collections.sort(list,(e1, e2)->{
|
||||
return comparator.compare(e1.getAttestationRankStr(),e2.getAttestationRankStr());
|
||||
});
|
||||
}else if(OrderEnum.REVERSE.getValue().equals(orderBy)){
|
||||
Collections.sort(list,(e1,e2)->{
|
||||
return comparator.compare(e2.getAttestationRankStr(),e1.getAttestationRankStr());
|
||||
});
|
||||
}
|
||||
}
|
||||
//倒序
|
||||
private void attestationRankReverse(String orderBy, List<DummyInventoryInfoEO> list, Collator comparator) {
|
||||
if(OrderEnum.POSITIVE.getValue().equals(orderBy)){
|
||||
Collections.sort(list,(e1, e2)->{
|
||||
return comparator.compare(e1.getAttestationRankStr(),e2.getAttestationRankStr());
|
||||
});
|
||||
}else if(OrderEnum.REVERSE.getValue().equals(orderBy)){
|
||||
Collections.sort(list,(e1,e2)->{
|
||||
return comparator.compare(e2.getAttestationRankStr(),e1.getAttestationRankStr());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private List<DummyInventoryInfoEO> stateSort(String orderBy, String orderByField, List<DummyInventoryInfoEO> dummyInventoryInfoEOList, List<DummyInventoryInfoEO> list) {
|
||||
if(ObjectUtils.isNotEmpty(orderByField) && "state".equals(orderByField)){
|
||||
List<DummyInventoryInfoEO> active = dummyInventoryInfoEOList.stream()
|
||||
|
||||
+36
-1
@@ -1084,8 +1084,13 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
List<ProjectLawsInventoryEO> na = dummyInventoryInfoEOList.stream()
|
||||
.filter(e -> e.getAttestationRank_dictText().startsWith(AttestationRankEnum.NA.getValue())).collect(Collectors.toList());
|
||||
|
||||
|
||||
Collator comparator = Collator.getInstance(Locale.CHINESE);
|
||||
if (OrderEnum.POSITIVE.getValue().equals(orderBy)) {
|
||||
attestationRankPositive(orderBy, wvta, comparator);
|
||||
attestationRankPositive(orderBy, vta, comparator);
|
||||
attestationRankPositive(orderBy, market, comparator);
|
||||
attestationRankPositive(orderBy, regu, comparator);
|
||||
attestationRankPositive(orderBy, na, comparator);
|
||||
//正序
|
||||
List<ProjectLawsInventoryEO> collect = dummyInventoryInfoEOList.stream().filter(e -> StringUtils.isBlank(e.getAttestationRank_dictText())).collect(Collectors.toList());
|
||||
list.addAll(collect);
|
||||
@@ -1096,6 +1101,11 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
list.addAll(na);
|
||||
|
||||
} else if (OrderEnum.REVERSE.getValue().equals(orderBy)) {
|
||||
attestationRankReverse(orderBy, wvta, comparator);
|
||||
attestationRankReverse(orderBy, vta, comparator);
|
||||
attestationRankReverse(orderBy, market, comparator);
|
||||
attestationRankReverse(orderBy, regu, comparator);
|
||||
attestationRankReverse(orderBy, na, comparator);
|
||||
//倒序
|
||||
list.addAll(na);
|
||||
list.addAll(regu);
|
||||
@@ -1113,6 +1123,31 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
}
|
||||
}
|
||||
|
||||
//正序
|
||||
private void attestationRankPositive(String orderBy, List<ProjectLawsInventoryEO> list, Collator comparator) {
|
||||
if(OrderEnum.POSITIVE.getValue().equals(orderBy)){
|
||||
Collections.sort(list,(e1, e2)->{
|
||||
return comparator.compare(e1.getAttestationRank_dictText(),e2.getAttestationRank_dictText());
|
||||
});
|
||||
}else if(OrderEnum.REVERSE.getValue().equals(orderBy)){
|
||||
Collections.sort(list,(e1,e2)->{
|
||||
return comparator.compare(e2.getAttestationRank_dictText(),e1.getAttestationRank_dictText());
|
||||
});
|
||||
}
|
||||
}
|
||||
//倒序
|
||||
private void attestationRankReverse(String orderBy, List<ProjectLawsInventoryEO> list, Collator comparator) {
|
||||
if(OrderEnum.POSITIVE.getValue().equals(orderBy)){
|
||||
Collections.sort(list,(e1, e2)->{
|
||||
return comparator.compare(e1.getAttestationRank_dictText(),e2.getAttestationRank_dictText());
|
||||
});
|
||||
}else if(OrderEnum.REVERSE.getValue().equals(orderBy)){
|
||||
Collections.sort(list,(e1,e2)->{
|
||||
return comparator.compare(e2.getAttestationRank_dictText(),e1.getAttestationRank_dictText());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据字典数据处理方法
|
||||
* @param result 返回值
|
||||
|
||||
@@ -1075,7 +1075,10 @@
|
||||
} else {
|
||||
roleCodeIndex = 4
|
||||
}
|
||||
if (this.formInlineRoleSwitching.roleSwitchingCode == '11' || this.formInlineRoleSwitching.roleSwitchingCode == '12') {
|
||||
console.log(this.formInlineRoleSwitching.roleSwitchingCode);
|
||||
if (this.formInlineRoleSwitching.roleSwitchingCode == '11' ||
|
||||
this.formInlineRoleSwitching.roleSwitchingCode == '12' ||
|
||||
this.formInlineRoleSwitching.roleSwitchingCode == '13') {
|
||||
roleCodeIndex = 0
|
||||
}
|
||||
row.roleCodeIndex = roleCodeIndex
|
||||
@@ -1149,7 +1152,9 @@
|
||||
} else {
|
||||
roleCodeIndex = 4
|
||||
}
|
||||
if (this.formInlineRoleSwitching.roleSwitchingCode == '11' || this.formInlineRoleSwitching.roleSwitchingCode == '12') {
|
||||
if (this.formInlineRoleSwitching.roleSwitchingCode == '11' ||
|
||||
this.formInlineRoleSwitching.roleSwitchingCode == '12'||
|
||||
this.formInlineRoleSwitching.roleSwitchingCode == '13') {
|
||||
roleCodeIndex = 0
|
||||
}
|
||||
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
|
||||
@@ -1370,7 +1375,9 @@
|
||||
this.isDisplay = true
|
||||
} else {
|
||||
this.isDisplay = false
|
||||
if (this.formInlineRoleSwitching.roleSwitchingCode == '11' || this.formInlineRoleSwitching.roleSwitchingCode == '12') {
|
||||
if (this.formInlineRoleSwitching.roleSwitchingCode == '11' ||
|
||||
this.formInlineRoleSwitching.roleSwitchingCode == '12' ||
|
||||
this.formInlineRoleSwitching.roleSwitchingCode == '13') {
|
||||
this.isRoleSwitching = false
|
||||
}
|
||||
}
|
||||
@@ -1451,7 +1458,9 @@
|
||||
} else {
|
||||
roleCodeIndex = 4
|
||||
}
|
||||
if (this.formInlineRoleSwitching.roleSwitchingCode == '11' || this.formInlineRoleSwitching.roleSwitchingCode == '12') {
|
||||
if (this.formInlineRoleSwitching.roleSwitchingCode == '11' ||
|
||||
this.formInlineRoleSwitching.roleSwitchingCode == '12' ||
|
||||
this.formInlineRoleSwitching.roleSwitchingCode == '13') {
|
||||
roleCodeIndex = 0
|
||||
}
|
||||
item.roleCodeIndex = roleCodeIndex
|
||||
|
||||
Reference in New Issue
Block a user