|
@@ -277,7 +277,7 @@ public class PackServiceImpl extends ServiceImpl<PackMapper, Pack> implements Pa
|
|
|
for (PackDetailVo packDetailVo : packDetailVos) {
|
|
|
|
|
|
List<PackDetailProduct> packDetailProductList = packDetailProductService.list(q -> q.eq(PackDetailProduct::getPackDetailId, packDetailVo.getId()));
|
|
|
- if(ObjectUtil.isEmpty(packDetailProductList)){
|
|
|
+ if (ObjectUtil.isEmpty(packDetailProductList)) {
|
|
|
continue;
|
|
|
}
|
|
|
List<Long> productIds = packDetailProductList.stream().map(PackDetailProduct::getProductId).collect(Collectors.toList());
|
|
@@ -295,7 +295,7 @@ public class PackServiceImpl extends ServiceImpl<PackMapper, Pack> implements Pa
|
|
|
packDetailProduct.setContractCode(contract.getCode());
|
|
|
|
|
|
List<FileInfoVo> fileInfoVos = fileInfoMap.get(packDetailProduct.getProductId());
|
|
|
- if (ObjectUtil.isNotEmpty(fileInfoVos)){
|
|
|
+ if (ObjectUtil.isNotEmpty(fileInfoVos)) {
|
|
|
FileInfoVo fileInfoVo = fileInfoVos.get(0);
|
|
|
packDetailProduct.setProductImgUrl(fileInfoVo.getFileUrl());
|
|
|
}
|
|
@@ -304,9 +304,13 @@ public class PackServiceImpl extends ServiceImpl<PackMapper, Pack> implements Pa
|
|
|
packDetailVo.setBomVolume(packDetailVo.getBoxLong().multiply(packDetailVo.getBoxWide()).multiply(packDetailVo.getBoxHigh()));
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
+ String shippingMark = "";
|
|
|
PackShipment packShipment = packShipmentService.getOne(q -> q.like(PackShipment::getPackDetailIds, packDetailList.get(0).getId()));
|
|
|
- Documents documents = documentsService.getOne(q->q.eq(Documents::getPackShipmentId,packShipment.getId()));
|
|
|
+ if (ObjectUtil.isNotEmpty(packShipment)) {
|
|
|
+ Documents documents = documentsService.getOne(q -> q.eq(Documents::getPackShipmentId, packShipment.getId()));
|
|
|
+ shippingMark = ObjectUtil.isEmpty(documents) ? "" : documents.getRemark();
|
|
|
+ }
|
|
|
|
|
|
BigDecimal packQuantity = packDetailList.stream().map(PackDetail::getPackQuantity).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
BigDecimal roughWeight = packDetailList.stream().map(PackDetail::getRoughWeight).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
@@ -318,12 +322,12 @@ public class PackServiceImpl extends ServiceImpl<PackMapper, Pack> implements Pa
|
|
|
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
- map.put("remark", ObjectUtil.isEmpty(documents)?"":documents.getRemark());
|
|
|
- map.put("packQuantity",packQuantity);
|
|
|
- map.put("roughWeight",roughWeight);
|
|
|
- map.put("netWeight",netWeight);
|
|
|
- map.put("volume",volume);
|
|
|
- map.put("packDetailList",packDetailVos);
|
|
|
+ map.put("remark", shippingMark);
|
|
|
+ map.put("packQuantity", packQuantity);
|
|
|
+ map.put("roughWeight", roughWeight);
|
|
|
+ map.put("netWeight", netWeight);
|
|
|
+ map.put("volume", volume);
|
|
|
+ map.put("packDetailList", packDetailVos);
|
|
|
|
|
|
return map;
|
|
|
}
|