Merge pull request 'demand: 分批逻辑修复' (#265) from develop into master
Reviewed-on: http://git.xdadan.loc/tanex/emis-service/pulls/265
This commit is contained in:
commit
b68d02dbe9
@ -12,3 +12,4 @@ import java.lang.annotation.*;
|
|||||||
public @interface WaybillLightCount {
|
public @interface WaybillLightCount {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -49,3 +49,4 @@ public class EmisWaybillOther extends BaseEntity {
|
|||||||
private String salesSupport;
|
private String salesSupport;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -78,3 +78,4 @@ public interface EmisWaybillOtherMapper extends BaseMapper<EmisWaybillOther> {
|
|||||||
public int deleteEmisWaybillOtherByBillCode(@Param("billCode") String billCode);
|
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()
|
BigDecimal totalWeight = existingBatches.stream()
|
||||||
.map(EmisTmsSiteBatch::getTotalWeight)
|
.map(EmisTmsSiteBatch::getTotalWeight)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user