|
@@ -1,7 +1,9 @@
|
|
|
package com.yh.saas.plugin.yiliangyiyun.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
|
|
+import com.baomidou.mybatisplus.mapper.Wrapper;
|
|
|
import com.yh.saas.common.support.util.IdGenerator;
|
|
|
+import com.yh.saas.common.support.util.StringUtils;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.WarehouseBaseInfo;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.WarehouseInOutInfo;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.WarehousePositionInfo;
|
|
@@ -44,10 +46,15 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public List<WarehouseView> selectWarehouseViewinfo(String compId) {
|
|
|
+ public List<WarehouseView> selectWarehouseViewinfo(String compId ,String warehouseName) {
|
|
|
List<WarehouseView> warehouseViews = new ArrayList<>();
|
|
|
+ Wrapper<WarehouseBaseInfo> warehouseBaseInfoWrapper = new EntityWrapper<>();
|
|
|
+ warehouseBaseInfoWrapper.eq("comp_id", compId).eq("delete_flag","0").eq("show_flag","1");
|
|
|
+ if(!StringUtils.isEmpty(warehouseName)){
|
|
|
+ warehouseBaseInfoWrapper.eq("warehouse_name",warehouseName);
|
|
|
+ }
|
|
|
// 查出所有仓库
|
|
|
- List<WarehouseBaseInfo> warehouseBaseInfoList = this.selectList(new EntityWrapper<WarehouseBaseInfo>().eq("comp_id", compId));
|
|
|
+ List<WarehouseBaseInfo> warehouseBaseInfoList = this.selectList(warehouseBaseInfoWrapper);
|
|
|
if (!CollectionUtils.isEmpty(warehouseBaseInfoList)) {
|
|
|
for (WarehouseBaseInfo warehouseBaseInfo : warehouseBaseInfoList) {
|
|
|
// 以库位为维度查询
|
|
@@ -61,6 +68,8 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
warehouseView.setBinNumberId(warehousePositionInfo.getId());
|
|
|
warehouseView.setBinNumber(warehousePositionInfo.getBinNumber());
|
|
|
warehouseView.setCapacity(String.valueOf(warehousePositionInfo.getMaxStorage()));
|
|
|
+ // 定义待完成数量
|
|
|
+ int count = 0;
|
|
|
// 定义应余量
|
|
|
String storage = "";
|
|
|
//定义入库
|
|
@@ -78,6 +87,9 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
Float netWeight = 0f;
|
|
|
for (WarehouseInOutInfo warehouse : warehouseInOutInfoAllList) {
|
|
|
netWeight = netWeight + warehouse.getNetWeight();
|
|
|
+ if("1".equals(warehouse.getStatusFlag())){
|
|
|
+ count++;
|
|
|
+ }
|
|
|
}
|
|
|
inNetWeight = inNetWeight + warehouseInOutInfo.getGoodsName() + "(" + netWeight + ") ";
|
|
|
}
|
|
@@ -103,6 +115,9 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
Float netWeight = 0f;
|
|
|
for (WarehouseInOutInfo warehouse : warehouseInOutInfoAllList) {
|
|
|
netWeight = netWeight + warehouse.getNetWeight();
|
|
|
+ if("1".equals(warehouse.getStatusFlag())){
|
|
|
+ count++;
|
|
|
+ }
|
|
|
}
|
|
|
outNetWeight = outNetWeight + warehouseInOutInfo.getGoodsName() + "(" + netWeight + ") ";
|
|
|
}
|
|
@@ -110,7 +125,9 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
|
|
|
}
|
|
|
warehouseView.setOutNetWeight(outNetWeight);
|
|
|
+ warehouseView.setNumber(count);
|
|
|
warehouseViews.add(warehouseView);
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|