fix 获取最大版本错误
This commit is contained in:
parent
5d713f84dd
commit
6eee207e29
|
|
@ -85,10 +85,11 @@ public class EBomForwardReport extends BaseForwardReport {
|
||||||
if (CollUtil.isEmpty(reportBomVersionVO.getVList())) {
|
if (CollUtil.isEmpty(reportBomVersionVO.getVList())) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
if (reportBomVersionVO.getVList().size() == 1) {
|
//单条
|
||||||
|
if (reportBomVersionVO.getVList().size() ==1) {
|
||||||
return reportBomVersionVO.getVList().get(0).getVersion();
|
return reportBomVersionVO.getVList().get(0).getVersion();
|
||||||
}
|
}
|
||||||
|
//比较最大
|
||||||
String maxVersion = reportBomVersionVO.getVList().get(0).getVersion();
|
String maxVersion = reportBomVersionVO.getVList().get(0).getVersion();
|
||||||
for (int index = 1; index < reportBomVersionVO.getVList().size(); index++) {
|
for (int index = 1; index < reportBomVersionVO.getVList().size(); index++) {
|
||||||
String version = reportBomVersionVO.getVList().get(index).getVersion();
|
String version = reportBomVersionVO.getVList().get(index).getVersion();
|
||||||
|
|
|
||||||
|
|
@ -86,10 +86,14 @@ public class PBomForwardReport extends BaseForwardReport {
|
||||||
*/
|
*/
|
||||||
public String getMaxVersion() {
|
public String getMaxVersion() {
|
||||||
ReportBomVersionVO reportBomVersionVO = bomVersion();
|
ReportBomVersionVO reportBomVersionVO = bomVersion();
|
||||||
if (reportBomVersionVO.getVList().size() == 1) {
|
if (CollUtil.isEmpty(reportBomVersionVO.getVList())) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
//且为单条数据
|
||||||
|
if (reportBomVersionVO.getVList().size() ==1) {
|
||||||
return reportBomVersionVO.getVList().get(0).getVersion();
|
return reportBomVersionVO.getVList().get(0).getVersion();
|
||||||
}
|
}
|
||||||
|
//比较最大版本
|
||||||
String maxVersion = reportBomVersionVO.getVList().get(0).getVersion();
|
String maxVersion = reportBomVersionVO.getVList().get(0).getVersion();
|
||||||
for (int index = 1; index < reportBomVersionVO.getVList().size(); index++) {
|
for (int index = 1; index < reportBomVersionVO.getVList().size(); index++) {
|
||||||
String version = reportBomVersionVO.getVList().get(index).getVersion();
|
String version = reportBomVersionVO.getVList().get(index).getVersion();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue