demand: 分批逻辑修复
This commit is contained in:
parent
e332b01163
commit
c445db1d3e
@ -12,3 +12,4 @@ import java.lang.annotation.*;
|
||||
public @interface WaybillLightCount {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -49,3 +49,4 @@ public class EmisWaybillOther extends BaseEntity {
|
||||
private String salesSupport;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -78,3 +78,4 @@ public interface EmisWaybillOtherMapper extends BaseMapper<EmisWaybillOther> {
|
||||
public int deleteEmisWaybillOtherByBillCode(@Param("billCode") String billCode);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -293,6 +293,15 @@ public class EmisTmsSiteBatchDtlServiceImpl implements IEmisTmsSiteBatchDtlServi
|
||||
}
|
||||
}
|
||||
|
||||
// 根据batchNo去重
|
||||
Map<String, EmisTmsSiteBatch> uniqueBatchMap = new LinkedHashMap<>();
|
||||
for (EmisTmsSiteBatch batch : existingBatches) {
|
||||
if (StringUtils.isNotBlank(batch.getBatchNo())) {
|
||||
uniqueBatchMap.putIfAbsent(batch.getBatchNo(), batch);
|
||||
}
|
||||
}
|
||||
existingBatches = new ArrayList<>(uniqueBatchMap.values());
|
||||
|
||||
// 计算去重后的批次总重量、总件数、总体积
|
||||
BigDecimal totalWeight = existingBatches.stream()
|
||||
.map(EmisTmsSiteBatch::getTotalWeight)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user