Redeem 1 éve
szülő
commit
56c39107a2

+ 1 - 5
src/main/java/com/steerinfo/dil/service/impl/AmsContractTransportPriceServiceImpl.java

@@ -7,14 +7,11 @@ import com.steerinfo.dil.model.AmsContractTransportPrice;
 import com.steerinfo.dil.model.RmsReceivePlace;
 import com.steerinfo.dil.service.IAmsContractTransportPriceService;
 import com.steerinfo.dil.util.DataChange;
-import com.sun.org.apache.bcel.internal.generic.IF_ACMPEQ;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
-import java.text.SimpleDateFormat;
 import java.util.Date;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -89,6 +86,7 @@ public class AmsContractTransportPriceServiceImpl implements IAmsContractTranspo
         String carrierId = mapValue.get("carrierId").toString().replace("[","").replace("]","").replace(" ","");
         String[] split = carrierId.split(",");
         Date date1=new Date();
+        String place = (String) mapValue.get("place");
         if (split.length>1) {
             for (int i = 0; i < split.length; i++) {
                 BigDecimal addressId = DataChange.dataToBigDecimal(mapValue.get("addressId"));
@@ -103,7 +101,6 @@ public class AmsContractTransportPriceServiceImpl implements IAmsContractTranspo
                 BigDecimal oilpriceChangeThreshold = DataChange.dataToBigDecimal(mapValue.get("oilpriceChangeThreshold"));
                 BigDecimal haulDistance = DataChange.dataToBigDecimal(mapValue.get("haulDistance"));
                 AmsContractTransportPrice amsContractTransportPrice = new AmsContractTransportPrice();
-                String place = (String) mapValue.get("place");
                 if (place != null && place.length() != 0) {
                     BigDecimal placeId = rmsReceivePlaceMapper.getPlaceId(mapValue);
                     if (placeId != null) {
@@ -161,7 +158,6 @@ public class AmsContractTransportPriceServiceImpl implements IAmsContractTranspo
             BigDecimal oilpriceChangeThreshold = DataChange.dataToBigDecimal(mapValue.get("oilpriceChangeThreshold"));
             BigDecimal haulDistance = DataChange.dataToBigDecimal(mapValue.get("haulDistance"));
             AmsContractTransportPrice amsContractTransportPrice = new AmsContractTransportPrice();
-            String place = (String) mapValue.get("place");
             if (place != null && place.length() != 0) {
                 BigDecimal placeId = rmsReceivePlaceMapper.getPlaceId(mapValue);
                 if (placeId != null) {

+ 1 - 0
src/main/resources/com/steerinfo/dil/mapper/RmsReceivePlaceMapper.xml

@@ -352,6 +352,7 @@
         FROM RMS_RECEIVE_PLACE RRP
         WHERE RRP.ADDRESS_DELIVERY_ADDRESS = #{place}
           AND RRP.ADDRESS_ID = #{addressId}
+        FETCH NEXT 1 ROW ONLY
     </select>
 
 </mapper>