|
|
@@ -2240,7 +2240,15 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
|
|
|
detail.setInStorageList(new ArrayList<>());
|
|
|
detail.setOutStorageList(new ArrayList<>());
|
|
|
}
|
|
|
-
|
|
|
+ List<FilesCenter> filesCenterList = filesCenterService.list(new LambdaQueryWrapper<FilesCenter>()
|
|
|
+ .eq(FilesCenter::getTenantId, AuthUtil.getTenantId())
|
|
|
+ .eq(FilesCenter::getIsDeleted, 0)
|
|
|
+ .eq(FilesCenter::getPid, detail.getId()));
|
|
|
+ if (!dispatchVehiclesList.isEmpty()) {
|
|
|
+ detail.setFilesList(filesCenterList);
|
|
|
+ } else {
|
|
|
+ detail.setFilesList(new ArrayList<>());
|
|
|
+ }
|
|
|
return detail;
|
|
|
}
|
|
|
|
|
|
@@ -2487,12 +2495,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
|
|
|
Integer other = 0;
|
|
|
BigDecimal teu = new BigDecimal("0.00");
|
|
|
StringBuilder boxTypeSum = new StringBuilder();
|
|
|
-
|
|
|
if (ObjectUtils.isNotNull(bills.getPreContainersList())) {
|
|
|
- bills.setQuantity(bills.getPreContainersList().stream().map(PreContainers::getNumber).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
- bills.setGrossWeight(bills.getPreContainersList().stream().map(PreContainers::getGrossWeight).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
- bills.setNetWeight(bills.getPreContainersList().stream().map(PreContainers::getNetWeight).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
- bills.setMeasurement(bills.getPreContainersList().stream().map(PreContainers::getMeasurement).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
for (PreContainers item : bills.getPreContainersList()) {
|
|
|
if (item.getId() == null) {
|
|
|
item.setPid(bills.getId());
|
|
|
@@ -2666,6 +2669,24 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
|
|
|
}
|
|
|
agentItemsMapper.updateById(items);
|
|
|
}
|
|
|
+ if (ObjectUtils.isNotNull(bills.getFilesList())) {
|
|
|
+ for (FilesCenter item : bills.getFilesList()) {
|
|
|
+ item.setPid(bills.getId());
|
|
|
+ if (item.getId() == null) {
|
|
|
+ item.setCreateTime(new Date());
|
|
|
+ item.setCreateUser(AuthUtil.getUserId());
|
|
|
+ item.setCreateUserName(AuthUtil.getUserName());
|
|
|
+ if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
|
|
|
+ item.setCreateDeptName(deptName);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ item.setUpdateUser(AuthUtil.getUserId());
|
|
|
+ item.setUpdateTime(new Date());
|
|
|
+ item.setUpdateUserName(AuthUtil.getUserName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ filesCenterService.saveOrUpdateBatch(bills.getFilesList());
|
|
|
+ }
|
|
|
return R.data(bills);
|
|
|
}
|
|
|
|