|
|
@@ -454,7 +454,7 @@ public class CyFtpServiceImpl implements CyFtpService {
|
|
|
.eq(BCorps::getCode, apiRequest.getStationCode())
|
|
|
.last("LIMIT 1"));
|
|
|
if (bCorps == null) {
|
|
|
- msg.append("场站代码:").append(apiRequest.getStationCode()).append("不正确,请联系相关人员!");
|
|
|
+ msg.append("场站代码:").append(apiRequest.getStationCode()).append("不正确;");
|
|
|
}
|
|
|
// 3. 港口代码有效性校验
|
|
|
BPorts ports = bPortsService.getOne(new LambdaQueryWrapper<BPorts>()
|
|
|
@@ -463,7 +463,7 @@ public class CyFtpServiceImpl implements CyFtpService {
|
|
|
.in(BPorts::getUnCode, apiRequest.getPortNo())
|
|
|
.last("LIMIT 1"));
|
|
|
if (ports == null) {
|
|
|
- msg.append("港口代码:").append(apiRequest.getPortNo()).append("不正确,请联系相关人员!");
|
|
|
+ msg.append("港口代码:").append(apiRequest.getPortNo()).append("不正确;");
|
|
|
}
|
|
|
// 4. 箱型代码有效性校验
|
|
|
List<String> boxType = apiRequest.getItem().stream().map(ApiItem::getCtnrType).filter(Objects::nonNull)
|
|
|
@@ -475,7 +475,7 @@ public class CyFtpServiceImpl implements CyFtpService {
|
|
|
.eq(BCntrTypes::getIsDeleted, 0)
|
|
|
.in(BCntrTypes::getCode95, boxType));
|
|
|
if (boxTypeList.isEmpty()) {
|
|
|
- msg.append("箱型不正确,请联系相关人员!");
|
|
|
+ msg.append("箱型不正确;");
|
|
|
}
|
|
|
}
|
|
|
List<String> boxCodeList = apiRequest.getItem().stream().map(ApiItem::getCtnrNo).filter(Objects::nonNull)
|
|
|
@@ -490,7 +490,7 @@ public class CyFtpServiceImpl implements CyFtpService {
|
|
|
.eq(PutBox::getIsDeleted, 0)
|
|
|
.in(PutBox::getContainerNumber, releaseNoList));
|
|
|
if (putBoxList.isEmpty()) {
|
|
|
- msg.append("放箱号不存在!");
|
|
|
+ msg.append("放箱号不存在;");
|
|
|
}
|
|
|
}
|
|
|
// 6.提单号有效性校验
|
|
|
@@ -504,7 +504,7 @@ public class CyFtpServiceImpl implements CyFtpService {
|
|
|
.apply("find_in_set(bill_type,'DD,MH')")
|
|
|
.and(i -> i.in(Bills::getHblno, mblnoList).or().in(Bills::getMblno, mblnoList)));
|
|
|
if (billsList.isEmpty()) {
|
|
|
- msg.append("提单号不存在!");
|
|
|
+ msg.append("提单号不存在;");
|
|
|
}
|
|
|
}
|
|
|
BoxDynamicsRecord boxDynamicsRecord = new BoxDynamicsRecord();
|
|
|
@@ -568,7 +568,7 @@ public class CyFtpServiceImpl implements CyFtpService {
|
|
|
try {
|
|
|
recordItems.setApproachExitDate(formatter.parse(item.getApproachExitDate()));
|
|
|
} catch (ParseException e) {
|
|
|
- msg.append("进出场日期格式不正确,请传入格式为‘yyyy-MM-dd’正确格式日期");
|
|
|
+ msg.append("进出场日期格式不正确,请传入格式为‘yyyy-MM-dd’正确格式日期;");
|
|
|
}
|
|
|
itemsList.add(recordItems);
|
|
|
}
|
|
|
@@ -588,7 +588,7 @@ public class CyFtpServiceImpl implements CyFtpService {
|
|
|
}
|
|
|
// 13. 错误处理:如果有错误信息则直接返回
|
|
|
if (ObjectUtils.isNotNull(msg.toString())) {
|
|
|
- return R.fail(500, msg.toString());
|
|
|
+ return R.fail(500, msg +" 请联系相关人员!");
|
|
|
} else {
|
|
|
// 14. 数据保存处理
|
|
|
boxDynamicsRecordService.insert(boxDynamicsRecord);
|
|
|
@@ -630,20 +630,20 @@ public class CyFtpServiceImpl implements CyFtpService {
|
|
|
List<Bills> bills = billsList.stream().filter(e -> e.getMblno().equals(item.getMblno()) ||
|
|
|
e.getHblno().equals(item.getMblno())).collect(Collectors.toList());
|
|
|
if (bills.isEmpty()) {
|
|
|
- msg.append("提单号:").append(item.getMblno()).append("不存在!");
|
|
|
+ msg.append("提单号:").append(item.getMblno()).append("不存在;");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (!boxTypeList.isEmpty()) {
|
|
|
BCntrTypes cntrTypes = boxTypeList.stream().filter(e -> e.getCode95().equals(item.getCtnrType())).findFirst().orElse(null);
|
|
|
if (cntrTypes == null) {
|
|
|
- msg.append("箱型:").append(item.getCtnrType()).append("不正确,请联系相关人员!");
|
|
|
+ msg.append("箱型:").append(item.getCtnrType()).append("不正确,");
|
|
|
}
|
|
|
}
|
|
|
if (!putBoxList.isEmpty()) {
|
|
|
PutBox putBox = putBoxList.stream().filter(e -> e.getContainerNumber().equals(item.getReleaseNo())).findFirst().orElse(null);
|
|
|
if (putBox == null) {
|
|
|
- msg.append("放箱号:").append(item.getReleaseNo()).append("不存在!");
|
|
|
+ msg.append("放箱号:").append(item.getReleaseNo()).append("不存在;");
|
|
|
}
|
|
|
}
|
|
|
}
|