|
@@ -25,6 +25,7 @@ import org.springframework.data.mongodb.core.query.Criteria;
|
|
|
import org.springframework.data.mongodb.core.query.Query;
|
|
import org.springframework.data.mongodb.core.query.Query;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
|
import java.util.regex.Pattern;
|
|
import java.util.regex.Pattern;
|
|
@@ -90,6 +91,8 @@ public class KwOrderService {
|
|
|
List<SckwTradeOrder> list = mongoTemplate.find(query, SckwTradeOrder.class);
|
|
List<SckwTradeOrder> list = mongoTemplate.find(query, SckwTradeOrder.class);
|
|
|
List<OrderListRes> result = new ArrayList<>();
|
|
List<OrderListRes> result = new ArrayList<>();
|
|
|
list.forEach(e -> {
|
|
list.forEach(e -> {
|
|
|
|
|
+ BigDecimal actualAmount = Objects.isNull(e.getActualAmount()) ? BigDecimal.ZERO : BigDecimal.valueOf(e.getActualAmount());
|
|
|
|
|
+ BigDecimal unitPrice = Objects.isNull(e.getUnitPrice()) ? BigDecimal.ZERO : BigDecimal.valueOf(e.getUnitPrice());
|
|
|
OrderListRes order = BeanUtils.copyProperties(e, OrderListRes.class);
|
|
OrderListRes order = BeanUtils.copyProperties(e, OrderListRes.class);
|
|
|
String loadCityName = Objects.isNull(e.getLoadCityName()) ? "" : e.getLoadCityName();
|
|
String loadCityName = Objects.isNull(e.getLoadCityName()) ? "" : e.getLoadCityName();
|
|
|
String unloadCityName = Objects.isNull(e.getUnloadCityName()) ? "" : e.getUnloadCityName();
|
|
String unloadCityName = Objects.isNull(e.getUnloadCityName()) ? "" : e.getUnloadCityName();
|
|
@@ -105,7 +108,8 @@ public class KwOrderService {
|
|
|
.setSource(DictEnum.getLabel(DictTypeEnum.TORDER_SOURCE.getType(), e.getSource()))
|
|
.setSource(DictEnum.getLabel(DictTypeEnum.TORDER_SOURCE.getType(), e.getSource()))
|
|
|
.setLoadDetailAddressInfo(loadCityName + loadDetailAddress)
|
|
.setLoadDetailAddressInfo(loadCityName + loadDetailAddress)
|
|
|
.setUnloadDetailAddressInfo(unloadCityName + unloadDetailAddress)
|
|
.setUnloadDetailAddressInfo(unloadCityName + unloadDetailAddress)
|
|
|
- .setWaitEntrustAmount(getWaitEntrustAmount(e.getAmount(), e.getEntrustAmount()));
|
|
|
|
|
|
|
+ .setWaitEntrustAmount(getWaitEntrustAmount(e.getAmount(), e.getEntrustAmount()))
|
|
|
|
|
+ .setActualPrice(actualAmount.multiply(unitPrice).doubleValue());
|
|
|
result.add(order);
|
|
result.add(order);
|
|
|
});
|
|
});
|
|
|
return PageResult.build(page, pageSize, count, result);
|
|
return PageResult.build(page, pageSize, count, result);
|