|
|
|
@ -21,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
@ -462,6 +463,13 @@ public class BoxForNotificationServiceImpl implements BoxForNotificationService |
|
|
|
throw new RuntimeException("箱内没有卷,不允许装托!"); |
|
|
|
} |
|
|
|
|
|
|
|
// 计算箱内所有卷的数量之和 |
|
|
|
BigDecimal totalRollQty = boxRolls.stream() |
|
|
|
.map(SoReceiveBoxRollsData::getRollQty) |
|
|
|
.filter(qty -> qty != null) |
|
|
|
.reduce(BigDecimal.ZERO, BigDecimal::add); |
|
|
|
inData.setBoxesQty(totalRollQty.intValue()); |
|
|
|
|
|
|
|
// 3. 添加箱到托 |
|
|
|
boxForNotificationMapper.addBoxToPallet(inData); |
|
|
|
|
|
|
|
|