Commit fbdf6a3f authored by huyf's avatar huyf

提货箱数、提货率、提货状态回填

parent 70944743
......@@ -210,11 +210,10 @@ public class OrderPickupServiceImpl extends AbstractService<OrderPickupMapper, O
private void dealDeliveryRate(String orderNo,Integer pickNum,Integer sumNum,Integer pickState) {
List<OrderPickupDO> orderPickupDOS = orderPickupMapper.selectList(OrderPickupDO::getOrderId, orderNo);
int pickedSum = orderPickupDOS.stream().mapToInt(OrderPickupDO::getPickNum).sum();
int allPickNum = pickedSum + pickNum;
BigDecimal pickRatio = new BigDecimal((double) (allPickNum / sumNum) * 100 );
BigDecimal pickRatio = new BigDecimal((double) (pickedSum / sumNum) * 100 );
pickRatio.setScale(2, RoundingMode.HALF_UP);
orderService.update(new LambdaUpdateWrapper<OrderDO>()
.set(OrderDO::getPickNum, allPickNum)
.set(OrderDO::getPickNum, pickedSum)
.set(OrderDO::getPickRatio, pickRatio)
.set(OrderDO::getPickState,pickState)
.eq(OrderDO::getOrderNo,orderNo)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment