diff --git a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/InComingDTO.java b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/InComingDTO.java
index cc5a3e2ad..f9adbe245 100644
--- a/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/InComingDTO.java
+++ b/blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/InComingDTO.java
@@ -32,4 +32,6 @@ public class InComingDTO implements Serializable {
private String tenantId;
private String nickName;
+ private String customerTrain;
+
}
diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.xml b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.xml
index 77d991a27..e10f63437 100644
--- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.xml
+++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.xml
@@ -158,7 +158,7 @@
and ltad.incoming_time <= #{endByDateStr}
and ltad.incoming_warehouse_id = #{warehouseId}
- and ltad.customer_train = #{customerTrain}
+ and ltad.train_number = #{customerTrain}
group by ltad.advance_id) t
left join logpm_trunkline_advance lta on lta.id = t.advanceId
@@ -183,7 +183,7 @@
and ltad.incoming_time <= #{endByDateStr}
and ltad.incoming_warehouse_id = #{warehouseId}
- and ltad.customer_train = #{customerTrain}
+ and ltad.train_number = #{customerTrain}
group by ltad.advance_id) t
left join logpm_trunkline_advance lta on lta.id = t.advanceId
diff --git a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java
index ab5efec8d..4ada06c46 100644
--- a/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java
+++ b/blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java
@@ -197,6 +197,7 @@ public class InComingServiceImpl implements IInComingService {
Integer incomingType = inComingDTO.getIncomingType();//入库类型 1码板打托 2扫码入库 3直接入库 4 按车次号入库 5按订单入库 6扫描入库 7 批量卸车入库 8卸车托盘 9卸分一体 10补录数据入库
String trayCode = inComingDTO.getTrayCode();//托盘码
String trayType = inComingDTO.getTrayType();//打托方式
+ String customerTrain = inComingDTO.getCustomerTrain();//车次号
List packageCodes = Arrays.asList(orderPackageCode.split(","));
log.info("############incomingPackage: 包件入库开始 packageCodes={} billladingId={} warehouseId={}", packageCodes, billladingId, warehouseId);
@@ -209,6 +210,15 @@ public class InComingServiceImpl implements IInComingService {
log.warn("############incomingPackage: 包件不存在 packageCodes={} warehouseId={}", packageCodes, warehouseId);
return Resp.scanFail(405, "包件无数据", "包件无数据");
}
+ if(StringUtil.isNotBlank(customerTrain)){
+ for (TrunklineAdvanceDetailEntity advanceDetailEntity : advanceDetailEntityList) {
+ String trainNumber = advanceDetailEntity.getTrainNumber();
+ if(!trainNumber.equals(customerTrain)){
+ log.warn("############incomingPackage: 包件车次号不一致 packageCodes={} trainNumber={} trainNumber={}", packageCodes, trainNumber, customerTrain);
+ return Resp.scanFail(405, "包件车次号不一致", "包件车次号不一致");
+ }
+ }
+ }
//把advanceDetailEntityList通过packageStatus分组
Map> advanceDetailEntityMap = advanceDetailEntityList.stream().collect(Collectors.groupingBy(TrunklineAdvanceDetailEntity::getPackageStatus));