|
|
@@ -1332,11 +1332,12 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
}
|
|
|
Set<BigDecimal> set = new HashSet<BigDecimal>(yhhbjList);
|
|
|
//判断是否相等
|
|
|
- if(set.size()>1){
|
|
|
+ if(set.size()==yhhbjList.size()){
|
|
|
//最优惠公司
|
|
|
- int index = getCompanyNameByMinAmount(yhhbjList)+1;
|
|
|
+ int index = getCompanyNameByMinAmount(yhhbjList);
|
|
|
companyName = companyAllList.get(index);
|
|
|
// priceList.add(getZYList(companyList,index,false));
|
|
|
+ index=index+1;
|
|
|
priceList.add(companyList);
|
|
|
priceList.add(getZYList(jqList,index,false));
|
|
|
priceList.add(getZYList(syList,index,false));
|
|
|
@@ -1391,7 +1392,12 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
int minIndex=0;
|
|
|
if(yhhbjList !=null && yhhbjList.size()>0){
|
|
|
BigDecimal min = yhhbjList.stream().filter(Objects::nonNull).min(BigDecimal::compareTo).orElse(new BigDecimal(0));
|
|
|
- minIndex = yhhbjList.indexOf(min);
|
|
|
+ for (int i = 0; i < yhhbjList.size(); i++) {
|
|
|
+ if(min.compareTo(yhhbjList.get(i))==0){
|
|
|
+ minIndex=i;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
return minIndex;
|
|
|
}
|