|
@@ -3,6 +3,8 @@ package com.github.zuihou.business.edgeLibrary.service.impl;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.github.zuihou.authority.entity.auth.User;
|
|
|
import com.github.zuihou.base.R;
|
|
|
import com.github.zuihou.base.service.SuperServiceImpl;
|
|
|
import com.github.zuihou.business.DemoLine.DemoLineConstant;
|
|
@@ -23,6 +25,7 @@ import com.github.zuihou.business.productionReadyCenter.service.MToolMeterialSer
|
|
|
import com.github.zuihou.business.productionReadyCenter.service.MToolMeterialSpecsService;
|
|
|
import com.github.zuihou.business.productionReadyCenter.service.TrayService;
|
|
|
import com.github.zuihou.business.productionResourceCenter.entity.ProductionresourcePosition;
|
|
|
+import com.github.zuihou.business.util.CommonUtil;
|
|
|
import com.github.zuihou.common.constant.BizConstant;
|
|
|
import com.github.zuihou.common.constant.CodeRuleModule;
|
|
|
import com.github.zuihou.common.util.StringUtil;
|
|
@@ -32,7 +35,9 @@ import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
|
|
|
import com.github.zuihou.injection.annonation.InjectionResult;
|
|
|
import com.github.zuihou.tenant.service.CodeRuleService;
|
|
|
import com.github.zuihou.utils.BeanPlusUtil;
|
|
|
+import com.google.common.collect.Maps;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.compress.utils.Lists;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -126,8 +131,13 @@ public class StockInfoServiceImpl extends SuperServiceImpl<StockInfoMapper, Stoc
|
|
|
public Map iconList(Map map) {
|
|
|
Map returnMap = new HashMap();
|
|
|
|
|
|
+ String orgIdsStr = CommonUtil.getOrgIdsStr();
|
|
|
+ Map paramsMap = Maps.newHashMap();
|
|
|
+ if(StringUtil.isNotEmpty(orgIdsStr)) {
|
|
|
+ paramsMap.put("orgIds", orgIdsStr);
|
|
|
+ }
|
|
|
//根据货架查询里面数量
|
|
|
- List<Map> shelvesStockCountlist = baseMapper.getStockCountByShelves();
|
|
|
+ List<Map> shelvesStockCountlist = baseMapper.getStockCountByShelves(paramsMap);
|
|
|
Map<Long,Map>shelvesStockCountMap = new HashMap<Long,Map>();
|
|
|
//获取库位的库存数量,判断是否为空库存
|
|
|
List<Map> storgeStockCountlist= baseMapper.getStockCountByStorgeId();
|
|
@@ -142,7 +152,12 @@ public class StockInfoServiceImpl extends SuperServiceImpl<StockInfoMapper, Stoc
|
|
|
}
|
|
|
|
|
|
//查询出所有货架
|
|
|
- List<Storge> storgeList= storgeService.list(Wraps.<Storge>lbQ().orderByAsc(Storge::getWeight));
|
|
|
+ /*
|
|
|
+ LbqWrapper<Storge> query = Wraps.<Storge>lbQ()
|
|
|
+ .in(User::getId, idList)
|
|
|
+ .eq(User::getStatus, true); */
|
|
|
+ IPage<Storge> pages = storgeService.pageList(new Page<Storge>(1L, 50), Wraps.<Storge>lbQ().orderByAsc(Storge::getWeight));
|
|
|
+ List<Storge> storgeList= pages!=null? pages.getRecords(): Lists.newArrayList();
|
|
|
//查询所有的库位
|
|
|
Map<Long,List<Map>>storgeMap = new HashMap<Long,List<Map>>();
|
|
|
for(Storge storge:storgeList){
|
|
@@ -191,7 +206,7 @@ public class StockInfoServiceImpl extends SuperServiceImpl<StockInfoMapper, Stoc
|
|
|
}
|
|
|
returnMap.put("shelvesTreeList",shelvesMapTreeList);
|
|
|
|
|
|
- Map countMap = baseMapper.getCount();
|
|
|
+ Map countMap = baseMapper.getCount(paramsMap);
|
|
|
Integer shelvesCount = 0;
|
|
|
Integer storgeCount = 0;
|
|
|
Integer instockCount = 0;
|