|
@@ -82,8 +82,8 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
List<WarehouseInOutInfo> warehouseInOutInfoList = warehouseInOutInfoService.selectList(new EntityWrapper<WarehouseInOutInfo>()
|
|
List<WarehouseInOutInfo> warehouseInOutInfoList = warehouseInOutInfoService.selectList(new EntityWrapper<WarehouseInOutInfo>()
|
|
.eq("position_id", warehousePositionInfo.getId()).eq("in_out_flag", "2").groupBy("goods_name_key").orderBy("goods_name_key"));
|
|
.eq("position_id", warehousePositionInfo.getId()).eq("in_out_flag", "2").groupBy("goods_name_key").orderBy("goods_name_key"));
|
|
if (!CollectionUtils.isEmpty(warehouseInOutInfoList)) {
|
|
if (!CollectionUtils.isEmpty(warehouseInOutInfoList)) {
|
|
- WarehouseNumView warehouseNumView = new WarehouseNumView();
|
|
|
|
for (WarehouseInOutInfo warehouseInOutInfo : warehouseInOutInfoList) {
|
|
for (WarehouseInOutInfo warehouseInOutInfo : warehouseInOutInfoList) {
|
|
|
|
+ WarehouseNumView warehouseNumView = new WarehouseNumView();
|
|
// 查询入库数量
|
|
// 查询入库数量
|
|
List<WarehouseInOutInfo> warehouseInOutInfoAllList = warehouseInOutInfoService.selectList(new EntityWrapper<WarehouseInOutInfo>()
|
|
List<WarehouseInOutInfo> warehouseInOutInfoAllList = warehouseInOutInfoService.selectList(new EntityWrapper<WarehouseInOutInfo>()
|
|
.eq("position_id", warehousePositionInfo.getId()).eq("in_out_flag", "2")
|
|
.eq("position_id", warehousePositionInfo.getId()).eq("in_out_flag", "2")
|
|
@@ -99,14 +99,17 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
}
|
|
}
|
|
warehouseNumView.setGoodsName(warehouseInOutInfoAllList.get(0).getGoodsName());
|
|
warehouseNumView.setGoodsName(warehouseInOutInfoAllList.get(0).getGoodsName());
|
|
warehouseNumView.setInNetWeight(String.valueOf(netWeight));
|
|
warehouseNumView.setInNetWeight(String.valueOf(netWeight));
|
|
- inNetWeight = String.valueOf(netWeight);
|
|
|
|
|
|
+ if(StringUtils.isEmpty(inNetWeight)){
|
|
|
|
+ inNetWeight = "0";
|
|
|
|
+ }
|
|
|
|
+ inNetWeight = String.valueOf(Float.valueOf(inNetWeight) + netWeight);
|
|
}
|
|
}
|
|
// 查询应余量
|
|
// 查询应余量
|
|
WarehousePositionStorageInfo warehousePositionStorageInfo = warehousePositionStorageInfoService.selectOne(new EntityWrapper<WarehousePositionStorageInfo>()
|
|
WarehousePositionStorageInfo warehousePositionStorageInfo = warehousePositionStorageInfoService.selectOne(new EntityWrapper<WarehousePositionStorageInfo>()
|
|
.eq("position_id", warehouseInOutInfo.getPositionId()).eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()));
|
|
.eq("position_id", warehouseInOutInfo.getPositionId()).eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()));
|
|
storage = String.valueOf(warehousePositionStorageInfo.getStorage());
|
|
storage = String.valueOf(warehousePositionStorageInfo.getStorage());
|
|
- warehouseView.setStorage(storage);
|
|
|
|
- warehouseView.setInNetWeight(inNetWeight);
|
|
|
|
|
|
+ warehouseNumView.setStorage(storage);
|
|
|
|
+ warehouseNumViewList.add(warehouseNumView);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -128,12 +131,14 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
count++;
|
|
count++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
- outNetWeight = outNetWeight + netWeight;
|
|
|
|
|
|
+ if(StringUtils.isEmpty(outNetWeight)){
|
|
|
|
+ outNetWeight = "0";
|
|
|
|
+ }
|
|
|
|
+ outNetWeight = String.valueOf(Float.valueOf(outNetWeight) + netWeight);
|
|
}
|
|
}
|
|
for(WarehouseNumView warehouseNumView : warehouseNumViewList){
|
|
for(WarehouseNumView warehouseNumView : warehouseNumViewList){
|
|
if(warehouseNumView.getGoodsName().equals(warehouseInOutInfos.get(0).getGoodsName())){
|
|
if(warehouseNumView.getGoodsName().equals(warehouseInOutInfos.get(0).getGoodsName())){
|
|
- warehouseNumView.setOutNetWeight(String.valueOf(outNetWeight));
|
|
|
|
|
|
+ warehouseNumView.setOutNetWeight(outNetWeight);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -141,8 +146,6 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- warehouseView.setOutNetWeight(outNetWeight);
|
|
|
|
- warehouseView.setNumber(count);
|
|
|
|
warehouseView.setWarehouseNumViewList(warehouseNumViewList);
|
|
warehouseView.setWarehouseNumViewList(warehouseNumViewList);
|
|
warehouseViews.add(warehouseView);
|
|
warehouseViews.add(warehouseView);
|
|
|
|
|