gydx_wx 2 months atrás
parent
commit
8e29855644
1 changed files with 6 additions and 4 deletions
  1. 6 4
      src/main/java/com/gydx/service/impl/BiddingMesImpl.java

+ 6 - 4
src/main/java/com/gydx/service/impl/BiddingMesImpl.java

@@ -108,14 +108,14 @@ public class BiddingMesImpl implements BiddingMesService {
         //1.3依据找到的值互相比较,取最低值,取到最低值和对应Id
         BiddingProcessVO biddingProcessVO = new BiddingProcessVO();
         biddingProcessVO.setBiddingMesID(mesVo.getBiddingMesID());
-        System.out.println("biddingProcessVO---------:"+biddingProcessVO.getBiddingMesID());
+        System.out.println("biddingProcessVO---------:" + biddingProcessVO.getBiddingMesID());
         List processList = biddingProcessMapper.queryAllByBiddingMesID(biddingProcessVO);
         final Integer[] minPrice = {999999};
         final String[] minId = {null};
         if (round == 2) {
             processList.forEach(item -> {
                 BiddingProcessVO processVO = (BiddingProcessVO) item;
-                if (processVO.getBRoundPrice() == null){
+                if (processVO.getBRoundPrice() == null) {
                     return;
                 }
                 int currentPrice = Integer.parseInt(processVO.getBRoundPrice());
@@ -127,7 +127,7 @@ public class BiddingMesImpl implements BiddingMesService {
         } else if (round == 3) {
             processList.forEach(item -> {
                 BiddingProcessVO processVO = (BiddingProcessVO) item;
-                if (processVO.getBRoundPrice() == null){
+                if (processVO.getCRoundPrice() == null) {
                     return;
                 }
                 int currentPrice = Integer.parseInt(processVO.getCRoundPrice());
@@ -143,8 +143,10 @@ public class BiddingMesImpl implements BiddingMesService {
         String finalMinId = minId[0];
         Integer finalMinPrice = minPrice[0];
         //2.2返回完成
+        if (finalMinPrice != 999999) {
+            mesVo.setSupplierPrice(String.valueOf(finalMinPrice));
+        }
         mesVo.setSupplierID(finalMinId);
-        mesVo.setSupplierPrice(String.valueOf(finalMinPrice));
         mesVo.setBiddingStatus("已结束");
         return biddingMesMapper.endRoundBiddingMes(mesVo);
     }