|
|
@@ -1079,7 +1079,6 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- @GlobalTransactional(rollbackFor = Exception.class, timeoutMills = 12000000)
|
|
|
public R getBillNo(Bills bills) {
|
|
|
BusinessType businessType = bBusinessTypeService.getOne(new LambdaQueryWrapper<BusinessType>()
|
|
|
.eq(BusinessType::getTenantId, AuthUtil.getTenantId())
|
|
|
@@ -1643,6 +1642,14 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
|
|
|
copyBills.setCfsGrossWeight(new BigDecimal("0.00"));
|
|
|
copyBills.setCfsMeasurement(new BigDecimal("0.00"));
|
|
|
copyBills.setFilesList(filesList);
|
|
|
+ copyBills.setDispatchVehiclesList(new ArrayList<>());
|
|
|
+ copyBills.setContainersList(new ArrayList<>());
|
|
|
+ copyBills.setContainersReportsList(new ArrayList<>());
|
|
|
+ copyBills.setWaitingBoxList(new ArrayList<>());
|
|
|
+ copyBills.setFeeCenterList(new ArrayList<>());
|
|
|
+ copyBills.setFeeCenterAmendList(new ArrayList<>());
|
|
|
+ copyBills.setInStorageList(new ArrayList<>());
|
|
|
+ copyBills.setOutStorageList(new ArrayList<>());
|
|
|
return copyBills;
|
|
|
}
|
|
|
|
|
|
@@ -2239,7 +2246,6 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- @GlobalTransactional(rollbackFor = Exception.class, timeoutMills = 12000000)
|
|
|
public R submitTrade(Bills bills) {
|
|
|
String deptId = "";
|
|
|
String deptName = "";
|
|
|
@@ -2369,7 +2375,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
|
|
|
amountCrUsd = amountCrUsd.add(usd);
|
|
|
}
|
|
|
}
|
|
|
- feeCenterService.submitList(bills.getFeeCenterListC());
|
|
|
+ feeCenterService.submitListTrade(bills.getFeeCenterListC());
|
|
|
}
|
|
|
//应收
|
|
|
int statusD = 0;
|
|
|
@@ -2421,7 +2427,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
|
|
|
amountDrUsd = amountDrUsd.add(usd);
|
|
|
}
|
|
|
}
|
|
|
- feeCenterService.submitList(bills.getFeeCenterListD());
|
|
|
+ feeCenterService.submitListTrade(bills.getFeeCenterListD());
|
|
|
}
|
|
|
if (0 == statusD && 0 == statusC) {
|
|
|
bills.setAccountStatus(0);
|
|
|
@@ -2488,6 +2494,21 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
|
|
|
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());
|
|
|
+ item.setCreateTime(new Date());
|
|
|
+ item.setCreateUser(AuthUtil.getUserId());
|
|
|
+ item.setCreateUserName(AuthUtil.getUserName());
|
|
|
+ if (ObjectUtils.isNotNull(branchId)) {
|
|
|
+ item.setBranchId(branchId);
|
|
|
+ item.setCreateDept(deptId);
|
|
|
+ item.setCreateDeptName(deptName);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ item.setUpdateUser(AuthUtil.getUserId());
|
|
|
+ item.setUpdateTime(new Date());
|
|
|
+ item.setUpdateUserName(AuthUtil.getUserName());
|
|
|
+ }
|
|
|
if (!agentItemsList.isEmpty() && ObjectUtils.isNotNull(item.getInspectionDate())) {
|
|
|
for (AgentItems items : agentItemsList) {
|
|
|
if (item.getBoxNo().equals(items.getBoxNo())) {
|
|
|
@@ -2519,10 +2540,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
|
|
|
teu = teu.add(new BigDecimal(item.getQuantity()).multiply(item.getTeu()));
|
|
|
}
|
|
|
}
|
|
|
- R res = preContainersService.submitList(bills.getPreContainersList());
|
|
|
- if (!res.isSuccess()) {
|
|
|
- throw new RuntimeException("保存失败");
|
|
|
- }
|
|
|
+ preContainersService.saveOrUpdateBatch(bills.getPreContainersList());
|
|
|
if (boxTypeSum.length() > 0) {
|
|
|
boxTypeSum = new StringBuilder(boxTypeSum.substring(0, boxTypeSum.length() - 1));
|
|
|
bills.setQuantityCntrDescr(boxTypeSum.toString());
|