|
|
@@ -1330,18 +1330,22 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
yhhbjList.add(sumyhh.toString());
|
|
|
subOrderVos.add(subOrderVo);
|
|
|
}
|
|
|
- //最优惠公司
|
|
|
- int index = getCompanyNameByMinAmount(yhhbjList)+1;
|
|
|
- companyName = companyAllList.get(index);
|
|
|
- // priceList.add(getZYList(companyList,index,false));
|
|
|
- priceList.add(companyList);
|
|
|
- priceList.add(getZYList(jqList,index,false));
|
|
|
- priceList.add(getZYList(syList,index,false));
|
|
|
- priceList.add(getZYList(ccList,index,false));
|
|
|
- priceList.add(getZYList(jyList,index,false));
|
|
|
- priceList.add(getZYList(zbfList,index,false));
|
|
|
- priceList.add(getZYList(yhjList,index,false));
|
|
|
- priceList.add(getZYList(yhhList,index,true));
|
|
|
+ Set<String> set = new HashSet<String>(yhhbjList);
|
|
|
+ //判断是否相等
|
|
|
+ if(set.size()>1){
|
|
|
+ //最优惠公司
|
|
|
+ int index = getCompanyNameByMinAmount(yhhbjList)+1;
|
|
|
+ companyName = companyAllList.get(index);
|
|
|
+ // priceList.add(getZYList(companyList,index,false));
|
|
|
+ priceList.add(companyList);
|
|
|
+ priceList.add(getZYList(jqList,index,false));
|
|
|
+ priceList.add(getZYList(syList,index,false));
|
|
|
+ priceList.add(getZYList(ccList,index,false));
|
|
|
+ priceList.add(getZYList(jyList,index,false));
|
|
|
+ priceList.add(getZYList(zbfList,index,false));
|
|
|
+ priceList.add(getZYList(yhjList,index,false));
|
|
|
+ priceList.add(getZYList(yhhList,index,true));
|
|
|
+ }
|
|
|
}
|
|
|
return new InquiryDetalsVo(insOrderVo,subOrderVos,priceList,companyName);
|
|
|
}
|
|
|
@@ -1354,7 +1358,7 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
private List<PriceParityVo> getZYList(List<PriceParityVo> companyList, int index, boolean flag) {
|
|
|
List<PriceParityVo> newList=new ArrayList<>();
|
|
|
if(companyList !=null && companyList.size()>0){
|
|
|
- for (int i = 1; i < companyList.size(); i++) {
|
|
|
+ for (int i = 0; i < companyList.size(); i++) {
|
|
|
if (i==index) {
|
|
|
PriceParityVo priceParityVo = companyList.get(i);
|
|
|
priceParityVo.setFlag(true);
|
|
|
@@ -1378,7 +1382,7 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
|
|
|
int minIndex=0;
|
|
|
if(yhhbjList !=null && yhhbjList.size()>0){
|
|
|
String minValue = yhhbjList.get(0);
|
|
|
- for (int i = 1; i < yhhbjList.size(); i++) {
|
|
|
+ for (int i = 0; i < yhhbjList.size(); i++) {
|
|
|
if (minValue.compareTo(yhhbjList.get(i)) > 0) {
|
|
|
minIndex = i;
|
|
|
}
|