|
|
@@ -3636,51 +3636,59 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
this.countOverdueFeeV1(billsHYJK, tradingBoxList, tradingBoxItemOldList, putBoxItemsOldList, putBoxList);
|
|
|
}
|
|
|
} else {*/
|
|
|
- for (Containers item : containersHYJKList) {
|
|
|
- if (ObjectUtils.isNull(item.getHblno())) {
|
|
|
- throw new RuntimeException("分单号不能为空");
|
|
|
- }
|
|
|
- item.setPodStationId(podStationR.getPodStationId());
|
|
|
- item.setPodStationCname(podStationR.getPodStationCname());
|
|
|
- item.setPodStationEname(podStationR.getPodStationEname());
|
|
|
- item.setPodStationCode(podStationR.getPodStationCode());
|
|
|
- item.setMarks(podStationR.getPodStationCode());
|
|
|
- item.setUpdateTime(new Date());
|
|
|
- item.setUpdateUser(AuthUtil.getUserId());
|
|
|
- item.setUpdateUserName(AuthUtil.getUserName());
|
|
|
- }
|
|
|
- containersService.updateBatchById(containersHYJKList);
|
|
|
- List<Bills> billsHYJKList = billsMapper.selectList(new LambdaQueryWrapper<Bills>()
|
|
|
- .eq(Bills::getTenantId, AuthUtil.getTenantId())
|
|
|
- .eq(Bills::getIsDeleted, 0)
|
|
|
- .in(Bills::getId, billsIds));
|
|
|
- if (billsHYJKList.isEmpty()) {
|
|
|
- throw new RuntimeException("未查到海运出口单据");
|
|
|
+ for (Containers item : containersHYJKList) {
|
|
|
+ if (ObjectUtils.isNull(item.getHblno())) {
|
|
|
+ throw new RuntimeException("分单号不能为空");
|
|
|
}
|
|
|
- List<Long> idHYJKList = billsHYJKList.stream().map(Bills::getMasterId).distinct().collect(Collectors.toList());
|
|
|
- List<Bills> billsHYJKListFD = billsMapper.selectList(new LambdaQueryWrapper<Bills>()
|
|
|
- .eq(Bills::getTenantId, AuthUtil.getTenantId())
|
|
|
- .eq(Bills::getIsDeleted, 0)
|
|
|
- .in(Bills::getId, idHYJKList));
|
|
|
- if (!billsHYJKListFD.isEmpty()) {
|
|
|
- List<Containers> containersList = containersService.list(new LambdaQueryWrapper<Containers>()
|
|
|
- .eq(Containers::getTenantId, AuthUtil.getTenantId())
|
|
|
- .eq(Containers::getIsDeleted, 0)
|
|
|
- .in(Containers::getPid, billsHYJKListFD.stream().map(Bills::getId).collect(Collectors.toList())));
|
|
|
- if (!containersList.isEmpty()) {
|
|
|
- for (Containers item : containersList) {
|
|
|
- item.setPodStationId(podStationR.getPodStationId());
|
|
|
- item.setPodStationCname(podStationR.getPodStationCname());
|
|
|
- item.setPodStationEname(podStationR.getPodStationEname());
|
|
|
- item.setPodStationCode(podStationR.getPodStationCode());
|
|
|
- item.setMarks(podStationR.getPodStationCode());
|
|
|
- item.setUpdateTime(new Date());
|
|
|
- item.setUpdateUser(AuthUtil.getUserId());
|
|
|
- item.setUpdateUserName(AuthUtil.getUserName());
|
|
|
- }
|
|
|
- containersService.updateBatchById(containersList);
|
|
|
+ item.setPodStationId(podStationR.getPodStationId());
|
|
|
+ item.setPodStationCname(podStationR.getPodStationCname());
|
|
|
+ item.setPodStationEname(podStationR.getPodStationEname());
|
|
|
+ item.setPodStationCode(podStationR.getPodStationCode());
|
|
|
+ item.setPodCyAddress(podStationR.getPodCyAddress());
|
|
|
+ item.setPodCyContact(podStationR.getPodCyContact());
|
|
|
+ item.setPodCyEmail(podStationR.getPodCyEmail());
|
|
|
+ item.setPodCyTel(podStationR.getPodCyTel());
|
|
|
+ item.setMarks(podStationR.getPodStationCode());
|
|
|
+ item.setUpdateTime(new Date());
|
|
|
+ item.setUpdateUser(AuthUtil.getUserId());
|
|
|
+ item.setUpdateUserName(AuthUtil.getUserName());
|
|
|
+ }
|
|
|
+ containersService.updateBatchById(containersHYJKList);
|
|
|
+ List<Bills> billsHYJKList = billsMapper.selectList(new LambdaQueryWrapper<Bills>()
|
|
|
+ .eq(Bills::getTenantId, AuthUtil.getTenantId())
|
|
|
+ .eq(Bills::getIsDeleted, 0)
|
|
|
+ .in(Bills::getId, billsIds));
|
|
|
+ if (billsHYJKList.isEmpty()) {
|
|
|
+ throw new RuntimeException("未查到海运出口单据");
|
|
|
+ }
|
|
|
+ List<Long> idHYJKList = billsHYJKList.stream().map(Bills::getMasterId).distinct().collect(Collectors.toList());
|
|
|
+ List<Bills> billsHYJKListFD = billsMapper.selectList(new LambdaQueryWrapper<Bills>()
|
|
|
+ .eq(Bills::getTenantId, AuthUtil.getTenantId())
|
|
|
+ .eq(Bills::getIsDeleted, 0)
|
|
|
+ .in(Bills::getId, idHYJKList));
|
|
|
+ if (!billsHYJKListFD.isEmpty()) {
|
|
|
+ List<Containers> containersList = containersService.list(new LambdaQueryWrapper<Containers>()
|
|
|
+ .eq(Containers::getTenantId, AuthUtil.getTenantId())
|
|
|
+ .eq(Containers::getIsDeleted, 0)
|
|
|
+ .in(Containers::getPid, billsHYJKListFD.stream().map(Bills::getId).collect(Collectors.toList())));
|
|
|
+ if (!containersList.isEmpty()) {
|
|
|
+ for (Containers item : containersList) {
|
|
|
+ item.setPodStationId(podStationR.getPodStationId());
|
|
|
+ item.setPodStationCname(podStationR.getPodStationCname());
|
|
|
+ item.setPodStationEname(podStationR.getPodStationEname());
|
|
|
+ item.setPodStationCode(podStationR.getPodStationCode());
|
|
|
+ item.setMarks(podStationR.getPodStationCode());
|
|
|
+ item.setPodCyAddress(podStationR.getPodCyAddress());
|
|
|
+ item.setPodCyContact(podStationR.getPodCyContact());
|
|
|
+ item.setPodCyEmail(podStationR.getPodCyEmail());
|
|
|
+ item.setPodCyTel(podStationR.getPodCyTel());
|
|
|
+ item.setUpdateTime(new Date());
|
|
|
+ item.setUpdateUser(AuthUtil.getUserId());
|
|
|
+ item.setUpdateUserName(AuthUtil.getUserName());
|
|
|
}
|
|
|
+ containersService.updateBatchById(containersList);
|
|
|
}
|
|
|
+ }
|
|
|
// }
|
|
|
} else {
|
|
|
for (Containers item : containersHYJKList) {
|
|
|
@@ -3691,6 +3699,10 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
item.setPodStationCname(podStationR.getPodStationCname());
|
|
|
item.setPodStationEname(podStationR.getPodStationEname());
|
|
|
item.setPodStationCode(podStationR.getPodStationCode());
|
|
|
+ item.setPodCyAddress(podStationR.getPodCyAddress());
|
|
|
+ item.setPodCyContact(podStationR.getPodCyContact());
|
|
|
+ item.setPodCyEmail(podStationR.getPodCyEmail());
|
|
|
+ item.setPodCyTel(podStationR.getPodCyTel());
|
|
|
item.setUpdateTime(new Date());
|
|
|
item.setUpdateUser(AuthUtil.getUserId());
|
|
|
item.setUpdateUserName(AuthUtil.getUserName());
|
|
|
@@ -3719,6 +3731,10 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
item.setPodStationCname(podStationR.getPodStationCname());
|
|
|
item.setPodStationEname(podStationR.getPodStationEname());
|
|
|
item.setPodStationCode(podStationR.getPodStationCode());
|
|
|
+ item.setPodCyAddress(podStationR.getPodCyAddress());
|
|
|
+ item.setPodCyContact(podStationR.getPodCyContact());
|
|
|
+ item.setPodCyEmail(podStationR.getPodCyEmail());
|
|
|
+ item.setPodCyTel(podStationR.getPodCyTel());
|
|
|
item.setUpdateTime(new Date());
|
|
|
item.setUpdateUser(AuthUtil.getUserId());
|
|
|
item.setUpdateUserName(AuthUtil.getUserName());
|
|
|
@@ -5238,6 +5254,37 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public R detele(List<Long> longList) {
|
|
|
+ List<PutBox> putBoxList = baseMapper.selectList(new LambdaQueryWrapper<PutBox>()
|
|
|
+ .eq(PutBox::getTenantId, AuthUtil.getTenantId())
|
|
|
+ .eq(PutBox::getIsDeleted, 0)
|
|
|
+ .in(PutBox::getId, longList));
|
|
|
+ List<PutBoxItems> boxItemsList = putBoxItemsService.list(new LambdaQueryWrapper<PutBoxItems>()
|
|
|
+ .eq(PutBoxItems::getTenantId, AuthUtil.getTenantId())
|
|
|
+ .eq(PutBoxItems::getIsDeleted, 0)
|
|
|
+ .in(PutBoxItems::getPid, longList));
|
|
|
+ for (PutBox item : putBoxList){
|
|
|
+ if (item.getOccupyNum() > 0) {
|
|
|
+ throw new RuntimeException("放箱号:" + item.getContainerNumber() + "操作已占用,撤销失败!");
|
|
|
+ }
|
|
|
+ List<PutBoxItems> itemsList = new ArrayList<>();
|
|
|
+ if (!boxItemsList.isEmpty()){
|
|
|
+ itemsList = boxItemsList.stream().filter(e-> e.getPid().equals(item.getId())).collect(Collectors.toList());
|
|
|
+ }
|
|
|
+ if ("OW(拿),OW(放)".contains(item.getBusType())) {
|
|
|
+ if (!itemsList.isEmpty()) {
|
|
|
+ throw new RuntimeException("放箱号:" + item.getContainerNumber() + "已导入箱号,撤销失败!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.removeByIds(longList);
|
|
|
+ if (!boxItemsList.isEmpty()){
|
|
|
+ putBoxItemsService.removeByIds(boxItemsList.stream().map(PutBoxItems::getId).collect(Collectors.toList()));
|
|
|
+ }
|
|
|
+ return R.success("删除成功");
|
|
|
+ }
|
|
|
+
|
|
|
private void countOverdueFeeV1(Bills billsHYJK, List<TradingBox> tradingBoxList,
|
|
|
List<TradingBoxItem> tradingBoxItemOldList, List<PutBoxItems> putBoxItemsOldList,
|
|
|
List<PutBox> putBoxList) {
|