|
|
@@ -83,6 +83,8 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
|
|
|
private final IBFeesService bFeesService;
|
|
|
|
|
|
+ private final IBoxAdjustmentCostService boxAdjustmentCostService;
|
|
|
+
|
|
|
@Override
|
|
|
public TradingBox getDetail(TradingBox tradingBox) {
|
|
|
if (tradingBox.getId() == null) {
|
|
|
@@ -121,6 +123,12 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
.eq(TradingBoxType::getPid, details.getId());
|
|
|
List<TradingBoxType> tradingBoxTypeList = tradingBoxTypeService.list(typeLambdaQueryWrapper);
|
|
|
details.setBoxTypeList(tradingBoxTypeList.isEmpty() ? new ArrayList<>() : tradingBoxTypeList);
|
|
|
+ LambdaQueryWrapper<BoxAdjustmentCost> costLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ costLambdaQueryWrapper.eq(BoxAdjustmentCost::getIsDeleted, 0)
|
|
|
+ .eq(BoxAdjustmentCost::getTenantId, AuthUtil.getTenantId())
|
|
|
+ .eq(BoxAdjustmentCost::getPid, details.getId());
|
|
|
+ List<BoxAdjustmentCost> boxAdjustmentCostList = boxAdjustmentCostService.list(costLambdaQueryWrapper);
|
|
|
+ details.setBoxAdjustmentCostList(boxAdjustmentCostList.isEmpty() ? new ArrayList<>() : boxAdjustmentCostList);
|
|
|
}
|
|
|
return details;
|
|
|
}
|
|
|
@@ -181,6 +189,9 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
} else if ("CCSQ".equals(tradingBox.getType())) {
|
|
|
billNoFormat = "CCSQ";
|
|
|
businessTypeCode = "CCSQ";
|
|
|
+ }else if ("DXCB".equals(tradingBox.getType())) {
|
|
|
+ billNoFormat = "DXCB";
|
|
|
+ businessTypeCode = "DXCB";
|
|
|
} else {
|
|
|
throw new Error("缺少必要参数类型");
|
|
|
}
|
|
|
@@ -423,7 +434,7 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
//箱型箱量
|
|
|
List<TradingBoxType> boxTypeList = tradingBox.getBoxTypeList();
|
|
|
if (ObjectUtils.isNotNull(boxTypeList) && !boxTypeList.isEmpty() &&
|
|
|
- ("ZR".equals(tradingBox.getType()) || "ZC".equals(tradingBox.getType()) || "DL".equals(tradingBox.getType()))) {
|
|
|
+ "ZR,ZC,DL,XGDX,CCSQ".contains(tradingBox.getType())) {
|
|
|
//箱号拼接字符串
|
|
|
List<String> boxType = boxTypeList.stream().map(TradingBoxType::getBoxType).distinct().collect(Collectors.toList());
|
|
|
if (boxTypeList.size() != boxType.size()) {
|
|
|
@@ -433,17 +444,21 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
for (TradingBoxType item : boxTypeList) {
|
|
|
boxTypeText.append(item.getBoxType()).append("*").append(item.getNumber()).append(",");
|
|
|
if (item.getId() == null) {
|
|
|
+ item.setCreateUserName(AuthUtil.getUserName());
|
|
|
item.setCreateUser(AuthUtil.getUserId());
|
|
|
item.setCreateTime(new Date());
|
|
|
item.setTenantId(AuthUtil.getTenantId());
|
|
|
item.setPid(tradingBox.getId());
|
|
|
} else {
|
|
|
+ item.setUpdateUserName(AuthUtil.getUserName());
|
|
|
item.setUpdateUser(AuthUtil.getUserId());
|
|
|
item.setUpdateTime(new Date());
|
|
|
item.setPid(tradingBox.getId());
|
|
|
}
|
|
|
}
|
|
|
- tradingBox.setBoxTypeQuantityOne(boxTypeText.toString());
|
|
|
+ if (!"XGDX,CCSQ".contains(tradingBox.getType())){
|
|
|
+ tradingBox.setBoxTypeQuantityOne(boxTypeText.toString());
|
|
|
+ }
|
|
|
tradingBoxTypeService.saveOrUpdateBatch(boxTypeList);
|
|
|
tradingBox.setBoxTypeList(boxTypeList);
|
|
|
}
|
|
|
@@ -466,6 +481,22 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
rentTermService.saveOrUpdateBatch(rentTermList);
|
|
|
tradingBox.setRentTermList(rentTermList);
|
|
|
}
|
|
|
+ if ("DXCB".equals(tradingBox.getType()) && ObjectUtils.isNotNull(tradingBox.getBoxAdjustmentCostList())
|
|
|
+ && !tradingBox.getBoxAdjustmentCostList().isEmpty()) {
|
|
|
+ for (BoxAdjustmentCost item : tradingBox.getBoxAdjustmentCostList()) {
|
|
|
+ if (item.getId() == null) {
|
|
|
+ item.setCreateUser(AuthUtil.getUserId());
|
|
|
+ item.setCreateTime(new Date());
|
|
|
+ item.setTenantId(AuthUtil.getTenantId());
|
|
|
+ item.setPid(tradingBox.getId());
|
|
|
+ } else {
|
|
|
+ item.setUpdateUser(AuthUtil.getUserId());
|
|
|
+ item.setUpdateTime(new Date());
|
|
|
+ item.setPid(tradingBox.getId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ boxAdjustmentCostService.saveOrUpdateBatch(tradingBox.getBoxAdjustmentCostList());
|
|
|
+ }
|
|
|
baseMapper.updateById(tradingBox);
|
|
|
return tradingBox;
|
|
|
}
|
|
|
@@ -1786,6 +1817,8 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
putBox.setSysNo((String) clientBillNo.getData());
|
|
|
putBox.setBoxEastId(tradingBox.getPurchaseCompanyId() + "");
|
|
|
putBox.setBoxEastName(tradingBox.getPurchaseCompanyName());
|
|
|
+ putBox.setAgentId(tradingBox.getPurchaseCompanyId());
|
|
|
+ putBox.setAgentName(tradingBox.getPurchaseCompanyName());
|
|
|
putBox.setContainerNumber(detail.getContainerNumber());
|
|
|
if ("DL".equals(tradingBox.getType())) {
|
|
|
putBox.setBusType("代理箱");
|
|
|
@@ -1897,6 +1930,89 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
tradingBox.setUpdateUser(AuthUtil.getUserId());
|
|
|
tradingBox.setUpdateUserName(AuthUtil.getUserName());
|
|
|
baseMapper.updateById(tradingBox);
|
|
|
+ if ("XGDX".equals(tradingBox.getType()) || "CCSQ".equals(tradingBox.getType())) {
|
|
|
+ List<TradingBoxItem> tradingBoxItemList = tradingBoxItemService.list(new LambdaQueryWrapper<TradingBoxItem>()
|
|
|
+ .eq(TradingBoxItem::getPid, tradingBox.getId())
|
|
|
+ .eq(TradingBoxItem::getTenantId, AuthUtil.getTenantId())
|
|
|
+ .eq(TradingBoxItem::getIsDeleted, 0));
|
|
|
+ if (tradingBoxItemList.isEmpty()) {
|
|
|
+ throw new RuntimeException("调箱明细不能为空");
|
|
|
+ }
|
|
|
+ List<String> boxCode = tradingBoxItemList.stream().map(TradingBoxItem::getCode).collect(Collectors.toList());
|
|
|
+ List<Archives> archivesList = archivesService.list(new LambdaQueryWrapper<Archives>()
|
|
|
+ .eq(Archives::getTenantId, AuthUtil.getTenantId())
|
|
|
+ .eq(Archives::getIsDeleted, 0)
|
|
|
+ .eq(Archives::getStatus, "待使用")
|
|
|
+ .in(Archives::getCode, boxCode));
|
|
|
+ if (archivesList.isEmpty()) {
|
|
|
+ throw new RuntimeException("未查到可调箱");
|
|
|
+ }
|
|
|
+ List<Archives> archivesListNew = new ArrayList<>();
|
|
|
+ List<ArchivesTrajectory> archivesTrajectoryList = new ArrayList<>();
|
|
|
+ for (TradingBoxItem item : tradingBoxItemList) {
|
|
|
+ Archives archives = archivesList.stream().filter(e -> e.getCode().equals(item.getCode())).findFirst().orElse(null);
|
|
|
+ if (archives == null) {
|
|
|
+ throw new RuntimeException("箱号:" + item.getCode() + "未查到或状态不可用");
|
|
|
+ }
|
|
|
+ archives.setNewDate(new Date());
|
|
|
+ archives.setAddressId(Long.parseLong(tradingBox.getPodId()));
|
|
|
+ archives.setAddressCode(tradingBox.getPodCode());
|
|
|
+ archives.setAddressCname(tradingBox.getPodCname());
|
|
|
+ archives.setAddressEname(tradingBox.getPodEname());
|
|
|
+ archives.setStationId(tradingBox.getPodStationId());
|
|
|
+ archives.setStationCode(tradingBox.getPodStationCode());
|
|
|
+ archives.setStationCname(tradingBox.getPodStationCname());
|
|
|
+ archives.setStationEname(tradingBox.getPodStationEname());
|
|
|
+ archives.setUpdateTime(new Date());
|
|
|
+ archives.setUpdateUser(AuthUtil.getUserId());
|
|
|
+ archives.setUpdateUserName(AuthUtil.getUserName());
|
|
|
+ archivesListNew.add(archives);
|
|
|
+ //记录箱轨迹信息
|
|
|
+ ArchivesTrajectory archivesTrajectory = new ArchivesTrajectory();
|
|
|
+ if ("CCSQ".equals(tradingBox.getType())){
|
|
|
+ archivesTrajectory.setStatus("出场申请");
|
|
|
+ }else if ("XGDX".equals(tradingBox.getType())){
|
|
|
+ archivesTrajectory.setStatus("调箱");
|
|
|
+ }else{
|
|
|
+ archivesTrajectory.setStatus("");
|
|
|
+ }
|
|
|
+ archivesTrajectory.setPortId(Long.parseLong(tradingBox.getPodId()));
|
|
|
+ archivesTrajectory.setPortCode(tradingBox.getPodCode());
|
|
|
+ archivesTrajectory.setPortCname(tradingBox.getPodCname());
|
|
|
+ archivesTrajectory.setPortEname(tradingBox.getPodEname());
|
|
|
+ archivesTrajectory.setStationId(tradingBox.getPodStationId());
|
|
|
+ archivesTrajectory.setStationCode(tradingBox.getPodStationCode());
|
|
|
+ archivesTrajectory.setStationCname(tradingBox.getPodStationCname());
|
|
|
+ archivesTrajectory.setStationEname(tradingBox.getPodStationEname());
|
|
|
+ archivesTrajectory.setContainerNumber(item.getContainerNumber());
|
|
|
+ archivesTrajectory.setBoxType(item.getBoxType());
|
|
|
+ archivesTrajectory.setBoxCategory(item.getBoxCategory());
|
|
|
+ archivesTrajectory.setBoxEastId(item.getBoxEastId());
|
|
|
+ archivesTrajectory.setBoxEastName(item.getBoxEastName());
|
|
|
+ archivesTrajectory.setMblno(item.getMblno());
|
|
|
+ archivesTrajectory.setBoxDynamics(item.getBoxDynamics());
|
|
|
+ archivesTrajectory.setNewDate(tradingBox.getRentDate());
|
|
|
+ archivesTrajectory.setCorpId(tradingBox.getPurchaseCompanyId());
|
|
|
+ archivesTrajectory.setCorpName(tradingBox.getPurchaseCompanyName());
|
|
|
+ archivesTrajectory.setContractNo(tradingBox.getContractNo());
|
|
|
+ archivesTrajectory.setBillType(tradingBox.getType());
|
|
|
+ archivesTrajectory.setCode(item.getCode());
|
|
|
+ archivesTrajectory.setPortCname(tradingBox.getAddressCname());
|
|
|
+ archivesTrajectory.setNewDate(new Date());
|
|
|
+ archivesTrajectory.setCreateTime(new Date());
|
|
|
+ archivesTrajectory.setCreateUser(AuthUtil.getUserId());
|
|
|
+ archivesTrajectory.setCreateUserName(AuthUtil.getUserName());
|
|
|
+ archivesTrajectory.setTenantId(AuthUtil.getTenantId());
|
|
|
+ archivesTrajectory.setSrcId(tradingBox.getId());
|
|
|
+ archivesTrajectoryList.add(archivesTrajectory);
|
|
|
+ }
|
|
|
+ if (!archivesListNew.isEmpty()) {
|
|
|
+ archivesService.updateBatchById(archivesListNew);
|
|
|
+ }
|
|
|
+ if (!archivesTrajectoryList.isEmpty()) {
|
|
|
+ archivesTrajectoryService.saveBatch(archivesTrajectoryList);
|
|
|
+ }
|
|
|
+ }
|
|
|
return tradingBox;
|
|
|
}
|
|
|
|
|
|
@@ -1925,9 +2041,7 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
.eq(TradingBoxItem::getTenantId, AuthUtil.getTenantId())
|
|
|
.eq(TradingBoxItem::getIsDeleted, 0)
|
|
|
.eq(TradingBoxItem::getPid, detail.getId())
|
|
|
- .eq(TradingBoxItem::getWhetherCountRent, "0")
|
|
|
- .isNotNull(TradingBoxItem::getPolStationEmptyContainerExitDate)
|
|
|
- .isNotNull(TradingBoxItem::getPodEmptyContainerReturnDate)
|
|
|
+ .lt(TradingBoxItem::getRentEndDate, tradingBox.getRentDate())
|
|
|
);
|
|
|
if (putBoxItemsList.isEmpty()) {
|
|
|
throw new RuntimeException("未查到需计算租金明细");
|
|
|
@@ -1953,20 +2067,20 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
BigDecimal exrateC = bCurrencyService.getCnyExrate(new Date(), "USD", "C", "1");
|
|
|
List<FeeCenter> feeCenterList = new ArrayList<>();
|
|
|
for (TradingBoxItem item : putBoxItemsList) {
|
|
|
- item.setWhetherCountRent("1");
|
|
|
- item.setUpdateTime(new Date());
|
|
|
- item.setUpdateUserName(AuthUtil.getUserName());
|
|
|
- item.setUpdateUser(AuthUtil.getUserId());
|
|
|
FeeCenter feeCenter = new FeeCenter();
|
|
|
feeCenter.setBillType("箱东");
|
|
|
- feeCenter.setCorpId(tradingBox.getPurchaseCompanyId());
|
|
|
- feeCenter.setCorpCnName(tradingBox.getPurchaseCompanyName());
|
|
|
- feeCenter.setCorpEnName(tradingBox.getPurchaseCompanyName());
|
|
|
+ feeCenter.setCorpId(detail.getPurchaseCompanyId());
|
|
|
+ feeCenter.setCorpCnName(detail.getPurchaseCompanyName());
|
|
|
+ feeCenter.setCorpEnName(detail.getPurchaseCompanyName());
|
|
|
feeCenter.setCreateTime(new Date());
|
|
|
feeCenter.setCreateUser(AuthUtil.getUserId());
|
|
|
feeCenter.setCreateUserName(AuthUtil.getUserName());
|
|
|
feeCenter.setPid(item.getPid());
|
|
|
- feeCenter.setDc("C");
|
|
|
+ if ("OW(拿)".equals(detail.getType())) {
|
|
|
+ feeCenter.setDc("C");
|
|
|
+ } else {
|
|
|
+ feeCenter.setDc("D");
|
|
|
+ }
|
|
|
feeCenter.setFeeId(fees.getId());
|
|
|
feeCenter.setFeeCode(fees.getCode());
|
|
|
feeCenter.setFeeCnName(fees.getCnName());
|
|
|
@@ -1974,15 +2088,16 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
feeCenter.setCurCode(fees.getCurNo());
|
|
|
feeCenter.setCntrNo(item.getCode());
|
|
|
feeCenter.setUnitNo(item.getBoxType());
|
|
|
- Instant instant1 = item.getPolStationEmptyContainerExitDate().toInstant();
|
|
|
- Instant instant2 = item.getPodEmptyContainerReturnDate().toInstant();
|
|
|
+ if (ObjectUtils.isNotNull(item.getPodEmptyContainerReturnDate())
|
|
|
+ && tradingBox.getRentDate().compareTo(item.getPodEmptyContainerReturnDate()) > 0) {
|
|
|
+ throw new RuntimeException("箱号:" + item.getCode() + "租金计算截止时间大于pod还想日期");
|
|
|
+ }
|
|
|
+ Instant instant1 = item.getRentEndDate().toInstant();
|
|
|
+ Instant instant2 = tradingBox.getRentDate().toInstant();
|
|
|
LocalDate date1 = instant1.atZone(ZoneId.systemDefault()).toLocalDate();
|
|
|
LocalDate date2 = instant2.atZone(ZoneId.systemDefault()).toLocalDate();
|
|
|
Duration duration = Duration.between(date1.atStartOfDay(), date2.atStartOfDay());
|
|
|
- Calendar calendar = Calendar.getInstance();
|
|
|
- calendar.setTime(tradingBox.getRentEndDate());
|
|
|
- calendar.add(Calendar.DAY_OF_MONTH, 1);
|
|
|
- feeCenter.setStorageDate(item.getPolStationEmptyContainerExitDate());
|
|
|
+ feeCenter.setStorageDate(item.getRentEndDate());
|
|
|
feeCenter.setDays(Integer.parseInt(duration.toDays() + ""));
|
|
|
Integer days = feeCenter.getDays();
|
|
|
int earlySumDays = 0;
|
|
|
@@ -2018,20 +2133,24 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
feeCenter.setAmount(amount);
|
|
|
feeCenter.setRemarks(text);
|
|
|
feeCenter.setQuantity(new BigDecimal("1"));
|
|
|
- feeCenter.setOutboundDate(item.getPodEmptyContainerReturnDate());
|
|
|
- feeCenter.setBillNo(tradingBox.getSysNo());
|
|
|
- feeCenter.setBusinessType(tradingBox.getType());
|
|
|
- feeCenter.setBillDate(tradingBox.getPurchaseDate());
|
|
|
- feeCenter.setBillCorpId(tradingBox.getPurchaseCompanyId());
|
|
|
- feeCenter.setBillCorpCnName(tradingBox.getPurchaseCompanyName());
|
|
|
- feeCenter.setBillCorpEnName(tradingBox.getPurchaseCompanyName());
|
|
|
- feeCenter.setBillShortName(tradingBox.getPurchaseCompanyName());
|
|
|
- feeCenter.setMblno(tradingBox.getContainerNumber());
|
|
|
- feeCenter.setPolId(tradingBox.getPolId());
|
|
|
- feeCenter.setPolCode(tradingBox.getPolCode());
|
|
|
- feeCenter.setPolCnName(tradingBox.getPolCname());
|
|
|
- feeCenter.setPolEnName(tradingBox.getPolEname());
|
|
|
+ feeCenter.setOutboundDate(tradingBox.getRentDate());
|
|
|
+ feeCenter.setBillNo(detail.getSysNo());
|
|
|
+ feeCenter.setBusinessType(detail.getType());
|
|
|
+ feeCenter.setBillDate(detail.getPurchaseDate());
|
|
|
+ feeCenter.setBillCorpId(detail.getPurchaseCompanyId());
|
|
|
+ feeCenter.setBillCorpCnName(detail.getPurchaseCompanyName());
|
|
|
+ feeCenter.setBillCorpEnName(detail.getPurchaseCompanyName());
|
|
|
+ feeCenter.setBillShortName(detail.getPurchaseCompanyName());
|
|
|
+ feeCenter.setMblno(detail.getContainerNumber());
|
|
|
+ feeCenter.setPolId(detail.getPolId());
|
|
|
+ feeCenter.setPolCode(detail.getPolCode());
|
|
|
+ feeCenter.setPolCnName(detail.getPolCname());
|
|
|
+ feeCenter.setPolEnName(detail.getPolEname());
|
|
|
feeCenterList.add(feeCenter);
|
|
|
+ item.setUpdateTime(new Date());
|
|
|
+ item.setUpdateUserName(AuthUtil.getUserName());
|
|
|
+ item.setUpdateUser(AuthUtil.getUserId());
|
|
|
+ item.setRentEndDate(tradingBox.getRentDate());
|
|
|
}
|
|
|
tradingBoxItemService.updateBatchById(putBoxItemsList);
|
|
|
if (!feeCenterList.isEmpty()) {
|
|
|
@@ -2040,4 +2159,54 @@ public class TradingBoxServiceImpl extends ServiceImpl<TradingBoxMapper, Trading
|
|
|
return R.data(tradingBox);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public R revokeCountRent(TradingBox tradingBox) {
|
|
|
+ TradingBox detail = baseMapper.selectById(tradingBox.getId());
|
|
|
+ List<TradingBoxItem> tradingBoxItemList = tradingBoxItemService.list(new LambdaQueryWrapper<TradingBoxItem>()
|
|
|
+ .eq(TradingBoxItem::getTenantId, AuthUtil.getTenantId())
|
|
|
+ .eq(TradingBoxItem::getIsDeleted, 0)
|
|
|
+ .eq(TradingBoxItem::getPid, detail.getId())
|
|
|
+ );
|
|
|
+ if (tradingBoxItemList.isEmpty()) {
|
|
|
+ throw new RuntimeException("未查到明细");
|
|
|
+ }
|
|
|
+ //获取订单费用信息
|
|
|
+ LambdaQueryWrapper<FeeCenter> tradingBoxFeesLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
+ tradingBoxFeesLambdaQueryWrapper.eq(FeeCenter::getIsDeleted, 0)
|
|
|
+ .eq(FeeCenter::getPid, tradingBox.getId())
|
|
|
+ .eq(FeeCenter::getTenantId, AuthUtil.getTenantId())
|
|
|
+ .eq(FeeCenter::getFeeCode, "BOX-ZJ")
|
|
|
+ .orderByDesc(FeeCenter::getCreateTime);
|
|
|
+ List<FeeCenter> feeCenters = feeCenterService.list(tradingBoxFeesLambdaQueryWrapper);
|
|
|
+ if (feeCenters.isEmpty()) {
|
|
|
+ throw new RuntimeException("未计算过租金,撤销失败");
|
|
|
+ }
|
|
|
+ List<TradingBoxItem> itemList = new ArrayList<>();
|
|
|
+ for (TradingBoxItem item : tradingBoxItemList) {
|
|
|
+ List<FeeCenter> feeCenterList = feeCenters.stream().filter(e -> e.getCntrNo().equals(item.getCode())).collect(Collectors.toList());
|
|
|
+ if (!feeCenterList.isEmpty()) {
|
|
|
+ FeeCenter feeCenter = feeCenterList.get(0);
|
|
|
+ if (1 == feeCenter.getAccStatus()) {
|
|
|
+ throw new RuntimeException("箱型:" + item.getBoxType() + "费用已生成账单,撤销失败");
|
|
|
+ }
|
|
|
+ feeCenterService.removeById(feeCenter.getId());
|
|
|
+ item.setUpdateTime(new Date());
|
|
|
+ item.setUpdateUser(AuthUtil.getUserId());
|
|
|
+ item.setUpdateUserName(AuthUtil.getUserName());
|
|
|
+ item.setCount(item.getCount() - 1);
|
|
|
+ if (feeCenterList.size() == 1) {
|
|
|
+ item.setRentEndDate(item.getPolStationEmptyContainerExitDate());
|
|
|
+ } else {
|
|
|
+ item.setRentEndDate(feeCenter.getStorageDate());
|
|
|
+ }
|
|
|
+ itemList.add(item);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!itemList.isEmpty()) {
|
|
|
+ tradingBoxItemService.updateBatchById(itemList);
|
|
|
+ }
|
|
|
+ tradingBox.setTradingBoxItemsList(tradingBoxItemList);
|
|
|
+ return R.data(tradingBox);
|
|
|
+ }
|
|
|
+
|
|
|
}
|