|
@@ -97,214 +97,213 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
warehouseBaseInfoWrapper.like(WarehouseBaseInfo.QueryFiles.WAREHOUSE_NAME, "%" + warehouseName + "%");
|
|
|
}
|
|
|
//PC端用
|
|
|
- if(!StringUtils.isEmpty(warehouseType)){
|
|
|
- if(!personCharge.equals("13333333333")){
|
|
|
- warehouseBaseInfoWrapper.andNew().eq("person_phone", personCharge).or()
|
|
|
- .like("other_person_charge", personCharge);
|
|
|
-
|
|
|
- }
|
|
|
+ if(!StringUtils.isEmpty(warehouseType)) {
|
|
|
warehouseBaseInfoWrapper.eq(WarehouseBaseInfo.QueryFiles.WAREHOUSE_TYPE, warehouseType);
|
|
|
- // 查出所有仓库
|
|
|
- List<WarehouseBaseInfo> warehouseBaseInfoList = this.selectList(warehouseBaseInfoWrapper);
|
|
|
- if (NumberConstant.CONSTANT1.equals(warehouseType)) {
|
|
|
- if (!CollectionUtils.isEmpty(warehouseBaseInfoList)) {
|
|
|
- for (WarehouseBaseInfo warehouseBaseInfo : warehouseBaseInfoList) {
|
|
|
- // 以库位为维度查询
|
|
|
- List<WarehousePositionInfo> warehousePositionInfos = warehousePositionInfoService.selectList(new EntityWrapper<WarehousePositionInfo>()
|
|
|
- .eq("base_id", warehouseBaseInfo.getId()));
|
|
|
- if (!CollectionUtils.isEmpty(warehousePositionInfos)) {
|
|
|
- for (WarehousePositionInfo warehousePositionInfo : warehousePositionInfos) {
|
|
|
- WarehouseView warehouseView = new WarehouseView();
|
|
|
- warehouseView.setWarehouseId(warehouseBaseInfo.getId());
|
|
|
- warehouseView.setWarehouseName(warehouseBaseInfo.getWarehouseName());
|
|
|
- warehouseView.setBinNumberId(warehousePositionInfo.getId());
|
|
|
- warehouseView.setBinNumber(warehousePositionInfo.getBinNumber());
|
|
|
- warehouseView.setCapacity(String.valueOf(warehousePositionInfo.getMaxStorage()));
|
|
|
- warehouseView.setRemark(warehousePositionInfo.getRemark());
|
|
|
- // 定义待完成数量
|
|
|
- int count = 0;
|
|
|
- // 定义应余量
|
|
|
- String storage = "";
|
|
|
- //定义入库
|
|
|
- String inNetWeight = "";
|
|
|
- // 子集合
|
|
|
- List<WarehouseNumView> warehouseNumViewList = new ArrayList<>();
|
|
|
- // 查询入库数量
|
|
|
- List<WarehouseInOutInfo> warehouseInOutInfoList = warehouseInOutInfoService.selectList(new EntityWrapper<WarehouseInOutInfo>()
|
|
|
- .eq("position_id", warehousePositionInfo.getId()).eq("status_flag", "3").eq("in_out_flag", "2").groupBy("goods_name_key").orderBy("goods_name_key"));
|
|
|
- if (!CollectionUtils.isEmpty(warehouseInOutInfoList)) {
|
|
|
- for (WarehouseInOutInfo warehouseInOutInfo : warehouseInOutInfoList) {
|
|
|
- WarehouseNumView warehouseNumView = new WarehouseNumView();
|
|
|
- // 查询入库数量
|
|
|
- List<WarehouseInOutInfo> warehouseInOutInfoAllList = warehouseInOutInfoService.selectList(new EntityWrapper<WarehouseInOutInfo>()
|
|
|
- .eq("position_id", warehousePositionInfo.getId()).eq("in_out_flag", "2")
|
|
|
- .eq("status_flag", "3").eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()));
|
|
|
+ }
|
|
|
+ if(!personCharge.equals("13333333333")){
|
|
|
+ warehouseBaseInfoWrapper.andNew().eq("person_phone", personCharge).or()
|
|
|
+ .like("other_person_charge", personCharge);
|
|
|
+
|
|
|
+ }
|
|
|
+ // 查出所有仓库
|
|
|
+ List<WarehouseBaseInfo> warehouseBaseInfoList = this.selectList(warehouseBaseInfoWrapper);
|
|
|
+ if (NumberConstant.CONSTANT1.equals(warehouseType)) {
|
|
|
+ if (!CollectionUtils.isEmpty(warehouseBaseInfoList)) {
|
|
|
+ for (WarehouseBaseInfo warehouseBaseInfo : warehouseBaseInfoList) {
|
|
|
+ // 以库位为维度查询
|
|
|
+ List<WarehousePositionInfo> warehousePositionInfos = warehousePositionInfoService.selectList(new EntityWrapper<WarehousePositionInfo>()
|
|
|
+ .eq("base_id", warehouseBaseInfo.getId()));
|
|
|
+ if (!CollectionUtils.isEmpty(warehousePositionInfos)) {
|
|
|
+ for (WarehousePositionInfo warehousePositionInfo : warehousePositionInfos) {
|
|
|
+ WarehouseView warehouseView = new WarehouseView();
|
|
|
+ warehouseView.setWarehouseId(warehouseBaseInfo.getId());
|
|
|
+ warehouseView.setWarehouseName(warehouseBaseInfo.getWarehouseName());
|
|
|
+ warehouseView.setBinNumberId(warehousePositionInfo.getId());
|
|
|
+ warehouseView.setBinNumber(warehousePositionInfo.getBinNumber());
|
|
|
+ warehouseView.setCapacity(String.valueOf(warehousePositionInfo.getMaxStorage()));
|
|
|
+ warehouseView.setRemark(warehousePositionInfo.getRemark());
|
|
|
+ // 定义待完成数量
|
|
|
+ int count = 0;
|
|
|
+ // 定义应余量
|
|
|
+ String storage = "";
|
|
|
+ //定义入库
|
|
|
+ String inNetWeight = "";
|
|
|
+ // 子集合
|
|
|
+ List<WarehouseNumView> warehouseNumViewList = new ArrayList<>();
|
|
|
+ // 查询入库数量
|
|
|
+ List<WarehouseInOutInfo> warehouseInOutInfoList = warehouseInOutInfoService.selectList(new EntityWrapper<WarehouseInOutInfo>()
|
|
|
+ .eq("position_id", warehousePositionInfo.getId()).eq("status_flag", "3").eq("in_out_flag", "2").groupBy("goods_name_key").orderBy("goods_name_key"));
|
|
|
+ if (!CollectionUtils.isEmpty(warehouseInOutInfoList)) {
|
|
|
+ for (WarehouseInOutInfo warehouseInOutInfo : warehouseInOutInfoList) {
|
|
|
+ WarehouseNumView warehouseNumView = new WarehouseNumView();
|
|
|
+ // 查询入库数量
|
|
|
+ List<WarehouseInOutInfo> warehouseInOutInfoAllList = warehouseInOutInfoService.selectList(new EntityWrapper<WarehouseInOutInfo>()
|
|
|
+ .eq("position_id", warehousePositionInfo.getId()).eq("in_out_flag", "2")
|
|
|
+ .eq("status_flag", "3").eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()));
|
|
|
|
|
|
- if (!CollectionUtils.isEmpty(warehouseInOutInfoAllList)) {
|
|
|
- Float netWeight = 0f;
|
|
|
- for (WarehouseInOutInfo warehouse : warehouseInOutInfoAllList) {
|
|
|
- //潮粮累计纯重,干粮累计净重
|
|
|
- netWeight = netWeight + (warehouse.getPureWeight()!=null?warehouse.getPureWeight():warehouse.getNetWeight());
|
|
|
- }
|
|
|
- warehouseNumView.setGoodsName(warehouseInOutInfoAllList.get(0).getGoodsName());
|
|
|
- warehouseNumView.setInNetWeight(String.valueOf(netWeight));
|
|
|
- if (StringUtils.isEmpty(inNetWeight)) {
|
|
|
- inNetWeight = "0";
|
|
|
- }
|
|
|
- inNetWeight = String.valueOf(Float.valueOf(inNetWeight) + netWeight);
|
|
|
+ if (!CollectionUtils.isEmpty(warehouseInOutInfoAllList)) {
|
|
|
+ Float netWeight = 0f;
|
|
|
+ for (WarehouseInOutInfo warehouse : warehouseInOutInfoAllList) {
|
|
|
+ //潮粮累计纯重,干粮累计净重
|
|
|
+ netWeight = netWeight + (warehouse.getPureWeight()!=null?warehouse.getPureWeight():warehouse.getNetWeight());
|
|
|
}
|
|
|
- // 查询应余量
|
|
|
- WarehousePositionStorageInfo warehousePositionStorageInfo = warehousePositionStorageInfoService.selectOne(new EntityWrapper<WarehousePositionStorageInfo>()
|
|
|
- .eq("position_id", warehouseInOutInfo.getPositionId()).eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()));
|
|
|
- if (warehousePositionStorageInfo != null) {
|
|
|
- storage = String.valueOf(warehousePositionStorageInfo.getStorage());
|
|
|
- } else {
|
|
|
- storage = "";
|
|
|
+ warehouseNumView.setGoodsName(warehouseInOutInfoAllList.get(0).getGoodsName());
|
|
|
+ warehouseNumView.setInNetWeight(String.valueOf(netWeight));
|
|
|
+ if (StringUtils.isEmpty(inNetWeight)) {
|
|
|
+ inNetWeight = "0";
|
|
|
}
|
|
|
- warehouseNumView.setStorage(storage);
|
|
|
- warehouseNumViewList.add(warehouseNumView);
|
|
|
+ inNetWeight = String.valueOf(Float.valueOf(inNetWeight) + netWeight);
|
|
|
}
|
|
|
-
|
|
|
+ // 查询应余量
|
|
|
+ WarehousePositionStorageInfo warehousePositionStorageInfo = warehousePositionStorageInfoService.selectOne(new EntityWrapper<WarehousePositionStorageInfo>()
|
|
|
+ .eq("position_id", warehouseInOutInfo.getPositionId()).eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()));
|
|
|
+ if (warehousePositionStorageInfo != null) {
|
|
|
+ storage = String.valueOf(warehousePositionStorageInfo.getStorage());
|
|
|
+ } else {
|
|
|
+ storage = "";
|
|
|
+ }
|
|
|
+ warehouseNumView.setStorage(storage);
|
|
|
+ warehouseNumViewList.add(warehouseNumView);
|
|
|
}
|
|
|
|
|
|
- //定义出库
|
|
|
- String outNetWeight = "";
|
|
|
- // 查询出库数量
|
|
|
- List<WarehouseInOutInfo> warehouseInOutInfos = warehouseInOutInfoService.selectList(new EntityWrapper<WarehouseInOutInfo>()
|
|
|
- .eq("position_id", warehousePositionInfo.getId()).eq("status_flag", "3").eq("in_out_flag", "1").groupBy("goods_name_key").orderBy("goods_name_key"));
|
|
|
- if (!CollectionUtils.isEmpty(warehouseInOutInfos)) {
|
|
|
- for (WarehouseInOutInfo warehouseInOutInfo : warehouseInOutInfos) {
|
|
|
- Float netWeight = 0f;
|
|
|
- outNetWeight = "0";
|
|
|
- List<WarehouseInOutInfo> warehouseInOutInfoAllList = warehouseInOutInfoService.selectList(new EntityWrapper<WarehouseInOutInfo>()
|
|
|
- .eq("status_flag", "3").eq("position_id", warehousePositionInfo.getId()).eq("in_out_flag", "1").eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()));
|
|
|
- if (!CollectionUtils.isEmpty(warehouseInOutInfoAllList)) {
|
|
|
- for (WarehouseInOutInfo warehouse : warehouseInOutInfoAllList) {
|
|
|
- //潮粮累计纯重,干粮累计净重
|
|
|
- netWeight = netWeight + (warehouse.getPureWeight()!=null?warehouse.getPureWeight():warehouse.getNetWeight());
|
|
|
- }
|
|
|
- if (StringUtils.isEmpty(outNetWeight)) {
|
|
|
- outNetWeight = "0";
|
|
|
- }
|
|
|
- outNetWeight = String.valueOf(Float.valueOf(outNetWeight) + netWeight);
|
|
|
- }
|
|
|
- for (WarehouseNumView warehouseNumView : warehouseNumViewList) {
|
|
|
- if (warehouseNumView.getGoodsName().equals(warehouseInOutInfo.getGoodsName())) {
|
|
|
- warehouseNumView.setOutNetWeight(outNetWeight);
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
+ //定义出库
|
|
|
+ String outNetWeight = "";
|
|
|
+ // 查询出库数量
|
|
|
+ List<WarehouseInOutInfo> warehouseInOutInfos = warehouseInOutInfoService.selectList(new EntityWrapper<WarehouseInOutInfo>()
|
|
|
+ .eq("position_id", warehousePositionInfo.getId()).eq("status_flag", "3").eq("in_out_flag", "1").groupBy("goods_name_key").orderBy("goods_name_key"));
|
|
|
+ if (!CollectionUtils.isEmpty(warehouseInOutInfos)) {
|
|
|
+ for (WarehouseInOutInfo warehouseInOutInfo : warehouseInOutInfos) {
|
|
|
+ Float netWeight = 0f;
|
|
|
+ outNetWeight = "0";
|
|
|
+ List<WarehouseInOutInfo> warehouseInOutInfoAllList = warehouseInOutInfoService.selectList(new EntityWrapper<WarehouseInOutInfo>()
|
|
|
+ .eq("status_flag", "3").eq("position_id", warehousePositionInfo.getId()).eq("in_out_flag", "1").eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()));
|
|
|
+ if (!CollectionUtils.isEmpty(warehouseInOutInfoAllList)) {
|
|
|
+ for (WarehouseInOutInfo warehouse : warehouseInOutInfoAllList) {
|
|
|
+ //潮粮累计纯重,干粮累计净重
|
|
|
+ netWeight = netWeight + (warehouse.getPureWeight()!=null?warehouse.getPureWeight():warehouse.getNetWeight());
|
|
|
}
|
|
|
+ if (StringUtils.isEmpty(outNetWeight)) {
|
|
|
+ outNetWeight = "0";
|
|
|
+ }
|
|
|
+ outNetWeight = String.valueOf(Float.valueOf(outNetWeight) + netWeight);
|
|
|
}
|
|
|
+ for (WarehouseNumView warehouseNumView : warehouseNumViewList) {
|
|
|
+ if (warehouseNumView.getGoodsName().equals(warehouseInOutInfo.getGoodsName())) {
|
|
|
+ warehouseNumView.setOutNetWeight(outNetWeight);
|
|
|
+ }
|
|
|
|
|
|
+ }
|
|
|
}
|
|
|
- // 查询入库数量
|
|
|
- count = warehouseInOutInfoService.selectCount(new EntityWrapper<WarehouseInOutInfo>()
|
|
|
- .eq("position_id", warehousePositionInfo.getId())
|
|
|
- .eq("status_flag", "1"));
|
|
|
- warehouseView.setNumber(count);
|
|
|
- warehouseView.setWarehouseNumViewList(warehouseNumViewList);
|
|
|
- warehouseViews.add(warehouseView);
|
|
|
|
|
|
}
|
|
|
+ // 查询入库数量
|
|
|
+ count = warehouseInOutInfoService.selectCount(new EntityWrapper<WarehouseInOutInfo>()
|
|
|
+ .eq("position_id", warehousePositionInfo.getId())
|
|
|
+ .eq("status_flag", "1"));
|
|
|
+ warehouseView.setNumber(count);
|
|
|
+ warehouseView.setWarehouseNumViewList(warehouseNumViewList);
|
|
|
+ warehouseViews.add(warehouseView);
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
- } else {
|
|
|
- if (!CollectionUtils.isEmpty(warehouseBaseInfoList)) {
|
|
|
- for (WarehouseBaseInfo warehouseBaseInfo : warehouseBaseInfoList) {
|
|
|
- WarehouseView warehouseView = new WarehouseView();
|
|
|
- warehouseView.setWarehouseId(warehouseBaseInfo.getId());
|
|
|
- warehouseView.setCreateType(warehouseBaseInfo.getCreateType());
|
|
|
- warehouseView.setClearStatus(warehouseBaseInfo.getClearStatus());
|
|
|
- warehouseView.setClearStatusFlag(warehouseBaseInfo.getClearStatusFlag());
|
|
|
- warehouseView.setWarehouseName(warehouseBaseInfo.getWarehouseName());
|
|
|
- warehouseView.setUpdateDate(warehouseBaseInfo.getUpdateDate());
|
|
|
- warehouseView.setAddress(warehouseBaseInfo.getWarehousePrivate() + warehouseBaseInfo.getWarehouseCity() + warehouseBaseInfo.getWarehouseArea() + warehouseBaseInfo.getDetailedAddress());
|
|
|
- // 定义待完成数量
|
|
|
- int count = 0;
|
|
|
- //定义入库
|
|
|
- String inNetWeight = "";
|
|
|
- // 子集合
|
|
|
- List<WarehouseNumView> warehouseNumViewList = new ArrayList<>();
|
|
|
- // 查询入库数量
|
|
|
- List<WarehouseInOutInfo> warehouseInOutInfoList = warehouseInOutInfoService.selectList(new EntityWrapper<WarehouseInOutInfo>()
|
|
|
- .eq("base_id", warehouseBaseInfo.getId()).eq("status_flag", "3").eq("in_out_flag", "2").groupBy("goods_name_key").orderBy("goods_name_key"));
|
|
|
- if (!CollectionUtils.isEmpty(warehouseInOutInfoList)) {
|
|
|
- for (WarehouseInOutInfo warehouseInOutInfo : warehouseInOutInfoList) {
|
|
|
- WarehouseNumView warehouseNumView = new WarehouseNumView();
|
|
|
- // 查询入库数量
|
|
|
- List<WarehouseInOutInfo> warehouseInOutInfoAllList = warehouseInOutInfoService.selectList(new EntityWrapper<WarehouseInOutInfo>()
|
|
|
- .eq("base_id", warehouseBaseInfo.getId()).eq("in_out_flag", "2")
|
|
|
- .eq("status_flag", "3").eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()));
|
|
|
+ }
|
|
|
|
|
|
- if (!CollectionUtils.isEmpty(warehouseInOutInfoAllList)) {
|
|
|
- Float netWeight = 0f;
|
|
|
- for (WarehouseInOutInfo warehouse : warehouseInOutInfoAllList) {
|
|
|
- //潮粮累计纯重,干粮累计净重
|
|
|
- netWeight = netWeight + (warehouse.getPureWeight()!=null?warehouse.getPureWeight():warehouse.getNetWeight());
|
|
|
- }
|
|
|
- warehouseNumView.setGoodsName(warehouseInOutInfoAllList.get(0).getGoodsName());
|
|
|
- warehouseNumView.setInNetWeight(String.valueOf(netWeight));
|
|
|
- if (StringUtils.isEmpty(inNetWeight)) {
|
|
|
- inNetWeight = "0";
|
|
|
- }
|
|
|
- inNetWeight = String.valueOf(Float.valueOf(inNetWeight) + netWeight);
|
|
|
+ } else {
|
|
|
+ if (!CollectionUtils.isEmpty(warehouseBaseInfoList)) {
|
|
|
+ for (WarehouseBaseInfo warehouseBaseInfo : warehouseBaseInfoList) {
|
|
|
+ WarehouseView warehouseView = new WarehouseView();
|
|
|
+ warehouseView.setWarehouseId(warehouseBaseInfo.getId());
|
|
|
+ warehouseView.setCreateType(warehouseBaseInfo.getCreateType());
|
|
|
+ warehouseView.setClearStatus(warehouseBaseInfo.getClearStatus());
|
|
|
+ warehouseView.setClearStatusFlag(warehouseBaseInfo.getClearStatusFlag());
|
|
|
+ warehouseView.setWarehouseName(warehouseBaseInfo.getWarehouseName());
|
|
|
+ warehouseView.setUpdateDate(warehouseBaseInfo.getUpdateDate());
|
|
|
+ warehouseView.setAddress(warehouseBaseInfo.getWarehousePrivate() + warehouseBaseInfo.getWarehouseCity() + warehouseBaseInfo.getWarehouseArea() + warehouseBaseInfo.getDetailedAddress());
|
|
|
+ // 定义待完成数量
|
|
|
+ int count = 0;
|
|
|
+ //定义入库
|
|
|
+ String inNetWeight = "";
|
|
|
+ // 子集合
|
|
|
+ List<WarehouseNumView> warehouseNumViewList = new ArrayList<>();
|
|
|
+ // 查询入库数量
|
|
|
+ List<WarehouseInOutInfo> warehouseInOutInfoList = warehouseInOutInfoService.selectList(new EntityWrapper<WarehouseInOutInfo>()
|
|
|
+ .eq("base_id", warehouseBaseInfo.getId()).eq("status_flag", "3").eq("in_out_flag", "2").groupBy("goods_name_key").orderBy("goods_name_key"));
|
|
|
+ if (!CollectionUtils.isEmpty(warehouseInOutInfoList)) {
|
|
|
+ for (WarehouseInOutInfo warehouseInOutInfo : warehouseInOutInfoList) {
|
|
|
+ WarehouseNumView warehouseNumView = new WarehouseNumView();
|
|
|
+ // 查询入库数量
|
|
|
+ List<WarehouseInOutInfo> warehouseInOutInfoAllList = warehouseInOutInfoService.selectList(new EntityWrapper<WarehouseInOutInfo>()
|
|
|
+ .eq("base_id", warehouseBaseInfo.getId()).eq("in_out_flag", "2")
|
|
|
+ .eq("status_flag", "3").eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()));
|
|
|
+
|
|
|
+ if (!CollectionUtils.isEmpty(warehouseInOutInfoAllList)) {
|
|
|
+ Float netWeight = 0f;
|
|
|
+ for (WarehouseInOutInfo warehouse : warehouseInOutInfoAllList) {
|
|
|
+ //潮粮累计纯重,干粮累计净重
|
|
|
+ netWeight = netWeight + (warehouse.getPureWeight()!=null?warehouse.getPureWeight():warehouse.getNetWeight());
|
|
|
+ }
|
|
|
+ warehouseNumView.setGoodsName(warehouseInOutInfoAllList.get(0).getGoodsName());
|
|
|
+ warehouseNumView.setInNetWeight(String.valueOf(netWeight));
|
|
|
+ if (StringUtils.isEmpty(inNetWeight)) {
|
|
|
+ inNetWeight = "0";
|
|
|
}
|
|
|
- warehouseNumViewList.add(warehouseNumView);
|
|
|
+ inNetWeight = String.valueOf(Float.valueOf(inNetWeight) + netWeight);
|
|
|
}
|
|
|
-
|
|
|
+ warehouseNumViewList.add(warehouseNumView);
|
|
|
}
|
|
|
|
|
|
- //定义出库
|
|
|
- String outNetWeight = "";
|
|
|
- // 查询出库数量
|
|
|
- List<WarehouseInOutInfo> warehouseInOutInfos = warehouseInOutInfoService.selectList(new EntityWrapper<WarehouseInOutInfo>()
|
|
|
- .eq("base_id", warehouseBaseInfo.getId()).eq("status_flag", "3").eq("in_out_flag", "1").groupBy("goods_name_key").orderBy("goods_name_key"));
|
|
|
- if (!CollectionUtils.isEmpty(warehouseInOutInfos)) {
|
|
|
- for (WarehouseInOutInfo warehouseInOutInfo : warehouseInOutInfos) {
|
|
|
- Float netWeight = 0f;
|
|
|
- outNetWeight = "0";
|
|
|
- List<WarehouseInOutInfo> warehouseInOutInfoAllList = warehouseInOutInfoService.selectList(new EntityWrapper<WarehouseInOutInfo>()
|
|
|
- .eq("status_flag", "3").eq("base_id", warehouseBaseInfo.getId()).eq("in_out_flag", "1").eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()));
|
|
|
- if (!CollectionUtils.isEmpty(warehouseInOutInfoAllList)) {
|
|
|
- for (WarehouseInOutInfo warehouse : warehouseInOutInfoAllList) {
|
|
|
- //潮粮累计纯重,干粮累计净重
|
|
|
- netWeight = netWeight + (warehouse.getPureWeight()!=null?warehouse.getPureWeight():warehouse.getNetWeight());
|
|
|
- }
|
|
|
- if (StringUtils.isEmpty(outNetWeight)) {
|
|
|
- outNetWeight = "0";
|
|
|
- }
|
|
|
- outNetWeight = String.valueOf(Float.valueOf(outNetWeight) + netWeight);
|
|
|
- }
|
|
|
- for (WarehouseNumView warehouseNumView : warehouseNumViewList) {
|
|
|
- if (warehouseNumView.getGoodsName().equals(warehouseInOutInfo.getGoodsName())) {
|
|
|
- warehouseNumView.setOutNetWeight(outNetWeight);
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
+ //定义出库
|
|
|
+ String outNetWeight = "";
|
|
|
+ // 查询出库数量
|
|
|
+ List<WarehouseInOutInfo> warehouseInOutInfos = warehouseInOutInfoService.selectList(new EntityWrapper<WarehouseInOutInfo>()
|
|
|
+ .eq("base_id", warehouseBaseInfo.getId()).eq("status_flag", "3").eq("in_out_flag", "1").groupBy("goods_name_key").orderBy("goods_name_key"));
|
|
|
+ if (!CollectionUtils.isEmpty(warehouseInOutInfos)) {
|
|
|
+ for (WarehouseInOutInfo warehouseInOutInfo : warehouseInOutInfos) {
|
|
|
+ Float netWeight = 0f;
|
|
|
+ outNetWeight = "0";
|
|
|
+ List<WarehouseInOutInfo> warehouseInOutInfoAllList = warehouseInOutInfoService.selectList(new EntityWrapper<WarehouseInOutInfo>()
|
|
|
+ .eq("status_flag", "3").eq("base_id", warehouseBaseInfo.getId()).eq("in_out_flag", "1").eq("goods_name_key", warehouseInOutInfo.getGoodsNameKey()));
|
|
|
+ if (!CollectionUtils.isEmpty(warehouseInOutInfoAllList)) {
|
|
|
+ for (WarehouseInOutInfo warehouse : warehouseInOutInfoAllList) {
|
|
|
+ //潮粮累计纯重,干粮累计净重
|
|
|
+ netWeight = netWeight + (warehouse.getPureWeight()!=null?warehouse.getPureWeight():warehouse.getNetWeight());
|
|
|
}
|
|
|
+ if (StringUtils.isEmpty(outNetWeight)) {
|
|
|
+ outNetWeight = "0";
|
|
|
+ }
|
|
|
+ outNetWeight = String.valueOf(Float.valueOf(outNetWeight) + netWeight);
|
|
|
}
|
|
|
+ for (WarehouseNumView warehouseNumView : warehouseNumViewList) {
|
|
|
+ if (warehouseNumView.getGoodsName().equals(warehouseInOutInfo.getGoodsName())) {
|
|
|
+ warehouseNumView.setOutNetWeight(outNetWeight);
|
|
|
+ }
|
|
|
|
|
|
+ }
|
|
|
}
|
|
|
- // 查询入库数量
|
|
|
- count = warehouseInOutInfoService.selectCount(new EntityWrapper<WarehouseInOutInfo>()
|
|
|
- .eq("base_id", warehouseBaseInfo.getId())
|
|
|
- .eq("status_flag", "1"));
|
|
|
- warehouseView.setNumber(count);
|
|
|
- // 定义待完成数量
|
|
|
- int outCount = 0;
|
|
|
- outCount = warehouseInOutInfoService.selectCount(new EntityWrapper<WarehouseInOutInfo>()
|
|
|
- .eq("base_id", warehouseBaseInfo.getId())
|
|
|
- .eq("in_out_flag", "1")
|
|
|
- .eq("status_flag", "1"));
|
|
|
- warehouseView.setOutNumber(outCount);
|
|
|
- warehouseView.setWarehouseNumViewList(warehouseNumViewList);
|
|
|
- warehouseViews.add(warehouseView);
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
- }
|
|
|
+ // 查询入库数量
|
|
|
+ count = warehouseInOutInfoService.selectCount(new EntityWrapper<WarehouseInOutInfo>()
|
|
|
+ .eq("base_id", warehouseBaseInfo.getId())
|
|
|
+ .eq("status_flag", "1"));
|
|
|
+ warehouseView.setNumber(count);
|
|
|
+ // 定义待完成数量
|
|
|
+ int outCount = 0;
|
|
|
+ outCount = warehouseInOutInfoService.selectCount(new EntityWrapper<WarehouseInOutInfo>()
|
|
|
+ .eq("base_id", warehouseBaseInfo.getId())
|
|
|
+ .eq("in_out_flag", "1")
|
|
|
+ .eq("status_flag", "1"));
|
|
|
+ warehouseView.setOutNumber(outCount);
|
|
|
+ warehouseView.setWarehouseNumViewList(warehouseNumViewList);
|
|
|
+ warehouseViews.add(warehouseView);
|
|
|
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return warehouseViews;
|