|
@@ -25,6 +25,7 @@ import com.yh.saas.plugin.yiliangyiyun.entity.view.*;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.exception.YException;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.exception.YExceptionEnum;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.mapper.WarehouseBaseInfoMapper;
|
|
|
+import com.yh.saas.plugin.yiliangyiyun.mapper.WarehousePositionStorageInfoMapper;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.service.*;
|
|
|
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.util.Const;
|
|
@@ -117,6 +118,8 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
private OSSClient ossClient;
|
|
|
@Autowired
|
|
|
private CacheComponent cacheComponent;
|
|
|
+ @Autowired
|
|
|
+ private WarehousePositionStorageInfoMapper warehousePositionStorageInfoMapper;
|
|
|
|
|
|
/**
|
|
|
* 全部仓库
|
|
@@ -430,7 +433,6 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
pageView.put("compId", compId);
|
|
|
pageView.put("warehouseName", warehouseName);
|
|
|
List<WarehouseNumView> dataList = baseMapper.getReservesWarehouseListByCondition(pageView);
|
|
|
-
|
|
|
warehouseBaseInfos.setWarehouseViewList(warehouseViews);
|
|
|
warehouseBaseInfos.setWarehouseNumViewList(dataList);
|
|
|
return warehouseBaseInfos;
|
|
@@ -5776,4 +5778,54 @@ public class WarehouseBaseInfoServiceImpl extends ServiceImpl<WarehouseBaseInfoM
|
|
|
return warehouseBaseInfo1;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public WarehouseBaseInfo getQuantityZhe(String compId, String baseId) {
|
|
|
+ String seachMonth = "2022-10-01";
|
|
|
+ List<WarehouseNumView> warehouseNumViewList = warehousePositionStorageInfoMapper.getQuantityZhe(compId,baseId, "2", seachMonth);
|
|
|
+ List<WarehouseNumView> warehouseNumViewList1 = warehousePositionStorageInfoMapper.getQuantityZhe( compId,baseId, "1", seachMonth);
|
|
|
+ WarehouseBaseInfo warehouseBaseInfo = new WarehouseBaseInfo();
|
|
|
+ List<WarehouseNumView> list = new ArrayList<>();
|
|
|
+ if (org.apache.commons.collections.CollectionUtils.isNotEmpty(warehouseNumViewList)) {
|
|
|
+ for (int i = 0; i < warehouseNumViewList.size(); i++) {
|
|
|
+ WarehouseNumView biViewInfo = new WarehouseNumView();
|
|
|
+ biViewInfo.setGoodsName(warehouseNumViewList.get(i).getGoodsName());
|
|
|
+ biViewInfo.setPureWeight(warehouseNumViewList.get(i).getPureWeight());
|
|
|
+ if (org.apache.commons.collections.CollectionUtils.isNotEmpty(warehouseNumViewList1)) {
|
|
|
+ for (int j = 0; j < warehouseNumViewList1.size(); j++) {
|
|
|
+ if (warehouseNumViewList.get(i).getGoodsName().equals(warehouseNumViewList1.get(j).getGoodsName())) {
|
|
|
+ if(warehouseNumViewList.get(i).getPureWeight() - warehouseNumViewList1.get(j).getPureWeight() <= 0){
|
|
|
+ biViewInfo.setPureWeight(0d);
|
|
|
+ }else{
|
|
|
+ biViewInfo.setPureWeight(warehouseNumViewList.get(i).getPureWeight() - warehouseNumViewList1.get(j).getPureWeight());
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ if(biViewInfo.getPureWeight() == 0){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ list.add(biViewInfo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ warehouseBaseInfo.setWarehouseNumViewList(list);
|
|
|
+ return warehouseBaseInfo;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public WarehouseBaseInfo getQuantityReal(String compId, String warehouseName) {
|
|
|
+ WarehouseBaseInfo warehouseBaseInfos = new WarehouseBaseInfo();
|
|
|
+ //仓库储量柱形图
|
|
|
+ Map<String, Object> pageView = new HashMap<>();
|
|
|
+ // 公司ID
|
|
|
+ pageView.put("compId", compId);
|
|
|
+ pageView.put("warehouseName", warehouseName);
|
|
|
+ List<WarehouseNumView> dataList = baseMapper.getReservesWarehouseListByCondition(pageView);
|
|
|
+ warehouseBaseInfos.setWarehouseNumViewList(dataList);
|
|
|
+ return warehouseBaseInfos;
|
|
|
+ }
|
|
|
+
|
|
|
}
|