|
@@ -104,7 +104,7 @@ public class IssueBillServiceImpl implements IssueBillService {
|
|
|
QueryWrapper<OrderEncasement> orderEncasementWrapper = new QueryWrapper<>();
|
|
|
orderEncasementWrapper.select(
|
|
|
"order_id as orderId",
|
|
|
- "ifnull(sum(netWeight*total),0) totalNetWeight",
|
|
|
+ "ifnull(sum(net_weight*total),0) totalNetWeight",
|
|
|
"ifnull(sum(length*width*height*total/1000000),0) totalVolume"
|
|
|
);
|
|
|
orderEncasementWrapper.in("order_id", orderIdList);
|
|
@@ -266,7 +266,7 @@ public class IssueBillServiceImpl implements IssueBillService {
|
|
|
OrderEncasement orderEncasement = orderEncasementService.getById(dto.getId());
|
|
|
orderEncasement.setTotal(orderEncasement.getTotal() + dto.getTotal());
|
|
|
orderEncasementService.updateById(dto);
|
|
|
- return verifiedQuantity(orderEncasement.getOrderId());
|
|
|
+ return verifiedQuantityAndGetDetail(orderEncasement.getOrderId());
|
|
|
}
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@@ -281,17 +281,16 @@ public class IssueBillServiceImpl implements IssueBillService {
|
|
|
|
|
|
orderEncasementDetailList.forEach(item -> {
|
|
|
item.setOrderEncasementId(dto.getId());
|
|
|
-
|
|
|
BigDecimal netWeight = ObjectUtil.defaultIfNull(bomSpecMap.get(item.getBomSpecId()).getNetWeight(), BigDecimal.ZERO);
|
|
|
dto.setNetWeight(dto.getNetWeight().add(netWeight));
|
|
|
});
|
|
|
- return verifiedQuantity(dto.getOrderId());
|
|
|
+ return verifiedQuantityAndGetDetail(dto.getOrderId());
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 验证数量
|
|
|
+ * 验证数量并获取明细
|
|
|
*/
|
|
|
- private AssemblyDetailVo verifiedQuantity(Long orderId) {
|
|
|
+ private AssemblyDetailVo verifiedQuantityAndGetDetail(Long orderId) {
|
|
|
AssemblyDetailVo assemblyDetailVo = assemblyDetail(orderId);
|
|
|
List<AssemblyDetailVo.SkuInfo> skuInfoList = assemblyDetailVo.getSkuInfoList();
|
|
|
for (AssemblyDetailVo.SkuInfo skuInfo : skuInfoList) {
|