|
|
@@ -669,7 +669,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
.eq(Bills::getTenantId, AuthUtil.getTenantId())
|
|
|
.eq(Bills::getIsDeleted, 0)
|
|
|
.eq(Bills::getBusinessType, "SE")
|
|
|
- .in(Bills::getMblno, mblno));
|
|
|
+ .in(Bills::getHblno, mblno));
|
|
|
if (!billsList.isEmpty()) {
|
|
|
containersList = containersService.list(new LambdaQueryWrapper<Containers>()
|
|
|
.eq(Containers::getTenantId, AuthUtil.getTenantId())
|
|
|
@@ -830,7 +830,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
}
|
|
|
Bills bills = null;
|
|
|
if (!containersList.isEmpty()) {
|
|
|
- List<Containers> containerItemList = containersList.stream().filter(e -> item.getMblno().equals(e.getMblno())
|
|
|
+ List<Containers> containerItemList = containersList.stream().filter(e -> item.getMblno().equals(e.getHblno())
|
|
|
&& item.getBoxCode().equals(e.getCntrNo())).collect(Collectors.toList());
|
|
|
if (!containerItemList.isEmpty()) {
|
|
|
List<Long> billsIds = containerItemList.stream().map(Containers::getPid).distinct().collect(Collectors.toList());
|
|
|
@@ -847,7 +847,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
e.getPid().equals(putBoxData.getId())).findFirst().orElse(null);
|
|
|
if (putBoxItem != null) {
|
|
|
putBoxItem.setPid(putBoxData.getId());
|
|
|
- putBoxItem.setMblno(item.getMblno());
|
|
|
+ putBoxItem.setMblno(bills.getMblno());
|
|
|
putBoxItem.setBoxDynamics("空箱出场");
|
|
|
putBoxItem.setPolCyId(corps.getId());
|
|
|
putBoxItem.setPolCyCode(corps.getCode());
|
|
|
@@ -858,6 +858,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
putBoxItem.setHblno(bills.getHblno());
|
|
|
putBoxItem.setVoyage(bills.getVoyageNo());
|
|
|
putBoxItem.setShipNameId(bills.getVesselId());
|
|
|
+ putBoxItem.setAgentName(bills.getForeignAgencyCnName());
|
|
|
putBoxItem.setShipCname(bills.getVesselCnName());
|
|
|
putBoxItem.setShipEname(bills.getVesselEnName());
|
|
|
putBoxItem.setPolFreeBoxUseDays(bills.getPolFreeBoxUseDays());
|
|
|
@@ -873,9 +874,10 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
putBoxItem.setStatus("使用中");
|
|
|
putBoxItem.setPid(putBoxData.getId());
|
|
|
putBoxItem.setContainerNumber(item.getContainerNumber());
|
|
|
+ putBoxItem.setAgentName(bills.getForeignAgencyCnName());
|
|
|
putBoxItem.setBoxCode(item.getBoxCode());
|
|
|
putBoxItem.setBoxType(item.getBoxType());
|
|
|
- putBoxItem.setMblno(item.getMblno());
|
|
|
+ putBoxItem.setMblno(bills.getMblno());
|
|
|
putBoxItem.setBoxDynamics("空箱出场");
|
|
|
putBoxItem.setPolCyId(corps.getId());
|
|
|
putBoxItem.setPolCyCode(corps.getCode());
|
|
|
@@ -903,12 +905,13 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
putBoxItem.setContainerNumber(item.getContainerNumber());
|
|
|
putBoxItem.setBoxCode(item.getBoxCode());
|
|
|
putBoxItem.setBoxType(item.getBoxType());
|
|
|
- putBoxItem.setMblno(item.getMblno());
|
|
|
+ putBoxItem.setMblno(bills.getMblno());
|
|
|
putBoxItem.setBoxDynamics("空箱出场");
|
|
|
putBoxItem.setPolCyId(corps.getId());
|
|
|
putBoxItem.setPolCyCode(corps.getCode());
|
|
|
putBoxItem.setPolCyCname(corps.getCnName());
|
|
|
putBoxItem.setPolCyEname(corps.getEnName());
|
|
|
+ putBoxItem.setAgentName(bills.getForeignAgencyCnName());
|
|
|
putBoxItem.setPolStationEmptyContainerExitDate(item.getBoxStatusDate());
|
|
|
putBoxItem.setCorpId(bills.getCorpId());
|
|
|
putBoxItem.setCorpName(bills.getCorpCnName());
|
|
|
@@ -943,7 +946,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
.findFirst().orElse(null);
|
|
|
if (tradingBoxItem != null) {
|
|
|
tradingBoxItem.setPid(tradingBox.getId());
|
|
|
- tradingBoxItem.setMblno(item.getMblno());
|
|
|
+ tradingBoxItem.setMblno(bills.getMblno());
|
|
|
tradingBoxItem.setBoxDynamics("空箱出场");
|
|
|
tradingBoxItem.setPortId(ports.getId());
|
|
|
tradingBoxItem.setPortCode(ports.getCode());
|
|
|
@@ -957,6 +960,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
tradingBoxItem.setPolCyCode(corps.getCode());
|
|
|
tradingBoxItem.setPolCyCname(corps.getCnName());
|
|
|
tradingBoxItem.setPolCyEname(corps.getEnName());
|
|
|
+ tradingBoxItem.setAgentName(bills.getForeignAgencyCnName());
|
|
|
if (ObjectUtils.isNotNull(item.getBoxStatusDate())) {
|
|
|
tradingBoxItem.setPolStationEmptyContainerExitDate(item.getBoxStatusDate());
|
|
|
} else {
|
|
|
@@ -984,9 +988,10 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
tradingBoxItem.setBoxCondition("新");
|
|
|
tradingBoxItem.setBoxStatus("好");
|
|
|
tradingBoxItem.setPid(tradingBox.getId());
|
|
|
+ tradingBoxItem.setAgentName(bills.getForeignAgencyCnName());
|
|
|
tradingBoxItem.setContainerNumber(item.getContainerNumber());
|
|
|
tradingBoxItem.setCode(item.getBoxCode());
|
|
|
- tradingBoxItem.setMblno(item.getMblno());
|
|
|
+ tradingBoxItem.setMblno(bills.getMblno());
|
|
|
tradingBoxItem.setBoxDynamics("空箱出场");
|
|
|
tradingBoxItem.setBoxType(cntrTypes.getCnName());
|
|
|
tradingBoxItem.setBoxTypeId(cntrTypes.getId());
|
|
|
@@ -1032,7 +1037,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
tradingBoxItem.setPid(tradingBox.getId());
|
|
|
tradingBoxItem.setContainerNumber(item.getContainerNumber());
|
|
|
tradingBoxItem.setCode(item.getBoxCode());
|
|
|
- tradingBoxItem.setMblno(item.getMblno());
|
|
|
+ tradingBoxItem.setMblno(bills.getMblno());
|
|
|
tradingBoxItem.setBoxDynamics("空箱出场");
|
|
|
tradingBoxItem.setBoxType(cntrTypes.getCnName());
|
|
|
tradingBoxItem.setBoxTypeId(cntrTypes.getId());
|
|
|
@@ -1041,6 +1046,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
tradingBoxItem.setPortCname(ports.getCnName());
|
|
|
tradingBoxItem.setPortEname(ports.getEnName());
|
|
|
tradingBoxItem.setStationId(corps.getId());
|
|
|
+ tradingBoxItem.setAgentName(bills.getForeignAgencyCnName());
|
|
|
tradingBoxItem.setStationCode(corps.getCode());
|
|
|
tradingBoxItem.setStationCname(corps.getCnName());
|
|
|
tradingBoxItem.setStationEname(corps.getEnName());
|
|
|
@@ -1085,7 +1091,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
putBoxData.getBusType().equals(e.getBusType())).findFirst().orElse(null);
|
|
|
if (putBox1 != null) {*/
|
|
|
if (!containersList.isEmpty()) {
|
|
|
- List<Containers> containerItemList = containersList.stream().filter(e -> item.getMblno().equals(e.getMblno())
|
|
|
+ List<Containers> containerItemList = containersList.stream().filter(e -> item.getMblno().equals(e.getHblno())
|
|
|
&& item.getBoxCode().equals(e.getCntrNo())).collect(Collectors.toList());
|
|
|
for (Containers containers : containerItemList) {
|
|
|
containers.setPodStationId(corps.getId());
|
|
|
@@ -1648,10 +1654,8 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
List<Bills> billsList = billsMapper.selectList(new LambdaQueryWrapper<Bills>()
|
|
|
.eq(Bills::getTenantId, AuthUtil.getTenantId())
|
|
|
.eq(Bills::getIsDeleted, 0)
|
|
|
- .in(Bills::getMblno, mblnoList)
|
|
|
- .eq(Bills::getBusinessType, "SE")
|
|
|
- .apply("find_in_set(bill_type,'DD,MH')")
|
|
|
- );
|
|
|
+ .in(Bills::getHblno, mblnoList)
|
|
|
+ .eq(Bills::getBusinessType, "SE"));
|
|
|
if (billsList.isEmpty()) {
|
|
|
throw new RuntimeException("未查到对应提单号海运进出口单据");
|
|
|
}
|
|
|
@@ -1702,7 +1706,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
throw new RuntimeException("箱号未在配箱信息中查到");
|
|
|
}
|
|
|
//查找OW明细提单号对应海运进出口单据
|
|
|
- Bills bills = billsList.stream().filter(e -> e.getMblno().equals(item.getMblno()) && e.getId().equals(containers.getPid()))
|
|
|
+ Bills bills = billsList.stream().filter(e -> e.getHblno().equals(item.getMblno()) && e.getId().equals(containers.getPid()))
|
|
|
.findFirst().orElse(null);
|
|
|
if (bills == null) {
|
|
|
throw new RuntimeException("未查到提单号:" + item.getMblno() + "海运进出口单据");
|
|
|
@@ -1711,7 +1715,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
String exrateType = currencyUtils.standardCurrency(bills.getBranchId());
|
|
|
//对应海运进出口单据所属公司所有币别
|
|
|
List<BCurExrate> curExrateList = currencyUtils.obtainRate(new Date(), "1", bills.getBranchId());
|
|
|
- Date polPickUpDate = item.getPolPickUpDate();
|
|
|
+ Date polPickUpDate = item.getPolStationEmptyContainerExitDate();
|
|
|
//起运港超期天数
|
|
|
if (ObjectUtils.isNotNull(polPickUpDate) && ObjectUtils.isNotNull(bills.getEtd())) {
|
|
|
//所属公司具体超期标准
|
|
|
@@ -1752,8 +1756,8 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
feeCenterC.setAmount(feeCenterC.getQuantity().multiply(feeCenterC.getPrice()));
|
|
|
feeCenterC.setAmountLoc(feeCenterC.getAmount().multiply(feeCenter.getExrate()));
|
|
|
feeCenterList.add(feeCenterC);
|
|
|
+ item.setPolOverdueBoxUseDays(Integer.parseInt(days + ""));
|
|
|
}
|
|
|
- item.setPodBoxUseDays(Integer.parseInt(days + ""));
|
|
|
putBoxItemsList.add(item);
|
|
|
if ("OW(拿),OW(放)".contains(putBox.getBusType())) {
|
|
|
TradingBoxItem tradingBoxItem = tradingBoxItemOldList.stream().filter(e -> e.getCode().equals(item.getBoxCode())).findFirst().orElse(null);
|
|
|
@@ -1907,6 +1911,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
feeCenter.setBillCorpEnName(bills.getCorpEnName());
|
|
|
feeCenter.setBillShortName(bills.getCorpShortName());
|
|
|
feeCenter.setMblno(bills.getMblno());
|
|
|
+ feeCenter.setHblno(bills.getHblno());
|
|
|
feeCenter.setPolId(bills.getPolId());
|
|
|
feeCenter.setPolCode(bills.getPolCode());
|
|
|
feeCenter.setPolCnName(bills.getPolCnName());
|
|
|
@@ -3918,7 +3923,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
.eq(Bills::getTenantId, AuthUtil.getTenantId())
|
|
|
.eq(Bills::getIsDeleted, 0)
|
|
|
.eq(Bills::getBusinessType, "SE")
|
|
|
- .in(Bills::getMblno, mblno));
|
|
|
+ .in(Bills::getHblno, mblno));
|
|
|
if (!billsList.isEmpty()) {
|
|
|
containersList = containersService.list(new LambdaQueryWrapper<Containers>()
|
|
|
.eq(Containers::getTenantId, AuthUtil.getTenantId())
|
|
|
@@ -4075,7 +4080,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
"OW(放)".equals(e.getBusType())).findFirst().orElse(null);
|
|
|
if (putBox1 == null) {*/
|
|
|
if (!containersList.isEmpty()) {
|
|
|
- List<Containers> containerItemList = containersList.stream().filter(e -> item.getMblno().equals(e.getMblno())
|
|
|
+ List<Containers> containerItemList = containersList.stream().filter(e -> item.getMblno().equals(e.getHblno())
|
|
|
&& item.getBoxCode().equals(e.getCntrNo())).collect(Collectors.toList());
|
|
|
if (containerItemList.isEmpty()) {
|
|
|
analysis.setResult("失败");
|
|
|
@@ -5257,7 +5262,7 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
throw new RuntimeException("请先维护基础资料-超期标准");
|
|
|
}
|
|
|
LocalDateTime ldt1 = item.getPodEmptyContainerReturnDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
|
|
|
- LocalDateTime ldt2 = billsHYJK.getEta().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
|
|
|
+ LocalDateTime ldt2 = billsHYJK.getActualEta().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
|
|
|
long days = ChronoUnit.DAYS.between(ldt2, ldt1);
|
|
|
//超期天数
|
|
|
int overdueDays = 0;
|
|
|
@@ -5282,8 +5287,8 @@ public class PutBoxServiceImpl extends ServiceImpl<PutBoxMapper, PutBox> impleme
|
|
|
feeCenterC.setAmount(feeCenterC.getQuantity().multiply(feeCenterC.getPrice()));
|
|
|
feeCenterC.setAmountLoc(feeCenterC.getAmount().multiply(feeCenter.getExrate()));
|
|
|
feeCenterList.add(feeCenterC);
|
|
|
+ item.setPodBoxUseDays(Integer.parseInt(days + ""));
|
|
|
}
|
|
|
- item.setPodBoxUseDays(Integer.parseInt(days + ""));
|
|
|
putBoxItemsList.add(item);
|
|
|
if ("OW(拿),OW(放)".contains(putBox.getBusType())) {
|
|
|
TradingBoxItem tradingBoxItem = tradingBoxItemOldList.stream().filter(e -> e.getCode().equals(item.getBoxCode())).findFirst().orElse(null);
|