UAT 81条。认证清单增加排序字段。

This commit is contained in:
wangzhijiang
2023-04-18 15:28:01 +08:00
parent 849db4819b
commit adbc45f760
@@ -1439,6 +1439,24 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
});
}
}
// WVTA ID wvtaId
if(StringUtils.equals("wvtaId",orderByField)){
if(OrderEnum.POSITIVE.getValue().equals(orderBy)){
Collections.sort(datas,(e1, e2)->{
String e1WvtaId = (StringUtils.isNotEmpty(e1.getWvtaId()) ? e1.getWvtaId() : "");
String e2WvtaId = (StringUtils.isNotEmpty(e2.getWvtaId()) ? e2.getWvtaId() : "");
return comparator.compare(e1WvtaId,e2WvtaId);
});
}else if(OrderEnum.REVERSE.getValue().equals(orderBy)){
Collections.sort(datas,(e1,e2)->{
String e1WvtaId = (StringUtils.isNotEmpty(e1.getWvtaId()) ? e1.getWvtaId() : "");
String e2WvtaId = (StringUtils.isNotEmpty(e2.getWvtaId()) ? e2.getWvtaId() : "");
return comparator.compare(e2WvtaId,e1WvtaId);
});
}
}
// 标准编号 serialNumber
if(StringUtils.equals("serialNumber",orderByField)){
if(OrderEnum.POSITIVE.getValue().equals(orderBy)){
@@ -1456,6 +1474,57 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
}
}
// 责任领域 dutyTerritoryName
if(StringUtils.equals("dutyTerritoryName",orderByField)){
if(OrderEnum.POSITIVE.getValue().equals(orderBy)){
Collections.sort(datas,(e1, e2)->{
String e1DutyTerritoryName = (StringUtils.isNotEmpty(e1.getDutyTerritoryName()) ? e1.getDutyTerritoryName() : "");
String e2DutyTerritoryName = (StringUtils.isNotEmpty(e2.getDutyTerritoryName()) ? e2.getDutyTerritoryName() : "");
return comparator.compare(e1DutyTerritoryName,e2DutyTerritoryName);
});
}else if(OrderEnum.REVERSE.getValue().equals(orderBy)){
Collections.sort(datas,(e1,e2)->{
String e1DutyTerritoryName = (StringUtils.isNotEmpty(e1.getDutyTerritoryName()) ? e1.getDutyTerritoryName() : "");
String e2DutyTerritoryName = (StringUtils.isNotEmpty(e2.getDutyTerritoryName()) ? e2.getDutyTerritoryName() : "");
return comparator.compare(e2DutyTerritoryName,e1DutyTerritoryName);
});
}
}
// 工程接口人 sdtName
if(StringUtils.equals("sdtName",orderByField)){
if(OrderEnum.POSITIVE.getValue().equals(orderBy)){
Collections.sort(datas,(e1, e2)->{
String e1SdtName = (StringUtils.isNotEmpty(e1.getSdtName()) ? e1.getSdtName() : "");
String e2SdtName = (StringUtils.isNotEmpty(e2.getSdtName()) ? e2.getSdtName() : "");
return comparator.compare(e1SdtName,e2SdtName);
});
}else if(OrderEnum.REVERSE.getValue().equals(orderBy)){
Collections.sort(datas,(e1,e2)->{
String e1SdtName = (StringUtils.isNotEmpty(e1.getSdtName()) ? e1.getSdtName() : "");
String e2SdtName = (StringUtils.isNotEmpty(e2.getSdtName()) ? e2.getSdtName() : "");
return comparator.compare(e2SdtName,e1SdtName);
});
}
}
// 责任人 dutyPersonName
if(StringUtils.equals("dutyPersonName",orderByField)){
if(OrderEnum.POSITIVE.getValue().equals(orderBy)){
Collections.sort(datas,(e1, e2)->{
String e1DutyPersonName = (StringUtils.isNotEmpty(e1.getDutyPersonName()) ? e1.getDutyPersonName() : "");
String e2DutyPersonName = (StringUtils.isNotEmpty(e2.getDutyPersonName()) ? e2.getDutyPersonName() : "");
return comparator.compare(e1DutyPersonName,e2DutyPersonName);
});
}else if(OrderEnum.REVERSE.getValue().equals(orderBy)){
Collections.sort(datas,(e1,e2)->{
String e1DutyPersonName = (StringUtils.isNotEmpty(e1.getDutyPersonName()) ? e1.getDutyPersonName() : "");
String e2DutyPersonName = (StringUtils.isNotEmpty(e2.getDutyPersonName()) ? e2.getDutyPersonName() : "");
return comparator.compare(e2DutyPersonName,e1DutyPersonName);
});
}
}
// 交付物类型 deliverableTypeName
if(StringUtils.equals("deliverableTypeName",orderByField)){
if(OrderEnum.POSITIVE.getValue().equals(orderBy)){