Browse Source

1.提货数据关联逻辑修改

master
zhenghaoyu 8 months ago
parent
commit
75c295b202
  1. 2
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/InComingDTO.java
  2. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineBillladingMapper.xml
  3. 10
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java

2
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;
}

4
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}
<if test="customerTrain != null and customerTrain != ''">
and ltad.customer_train = #{customerTrain}
and ltad.train_number = #{customerTrain}
</if>
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 &lt;= #{endByDateStr}
and ltad.incoming_warehouse_id = #{warehouseId}
<if test="customerTrain != null and customerTrain != ''">
and ltad.customer_train = #{customerTrain}
and ltad.train_number = #{customerTrain}
</if>
group by ltad.advance_id) t
left join logpm_trunkline_advance lta on lta.id = t.advanceId

10
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<String> 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<String, List<TrunklineAdvanceDetailEntity>> advanceDetailEntityMap = advanceDetailEntityList.stream().collect(Collectors.groupingBy(TrunklineAdvanceDetailEntity::getPackageStatus));

Loading…
Cancel
Save