feat(wms): 添加物料卷统计总数功能
- 在WmsMaterialCoilServiceImpl中新增total_count字段统计 - 将统计结果添加到返回结果集中 - 处理空值情况并设置默认值为BigDecimal.ZERO
This commit is contained in:
@@ -404,6 +404,8 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
if (stats != null) {
|
||||
Object grossWeight = stats.get("total_gross_weight");
|
||||
Object netWeight = stats.get("total_net_weight");
|
||||
Object count = stats.get("total_count");
|
||||
result.put("total_count", count != null ? new BigDecimal(count.toString()) : BigDecimal.ZERO);
|
||||
result.put("total_gross_weight", grossWeight != null ? new BigDecimal(grossWeight.toString()) : BigDecimal.ZERO);
|
||||
result.put("total_net_weight", netWeight != null ? new BigDecimal(netWeight.toString()) : BigDecimal.ZERO);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user