首页2,权限修改

This commit is contained in:
猫猫guowen
2025-06-18 17:12:49 +08:00
parent 3d9a6064f4
commit 8f1e944602
22 changed files with 91 additions and 40 deletions

View File

@@ -2,6 +2,9 @@ package com.ruoyi.index.service.impl;
import java.util.ArrayList;
import java.util.List;
import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.index.mapper.BillStatusCountMapper;
@@ -22,23 +25,25 @@ public class BillStatusCountServiceImpl implements IBillStatusCountService {
* @return 单据状态统计列表
*/
@Override
public List<BillStatusCount> selectAllBillStatusCount() {
@DataScope
// @DataScope(warehouseAlias = "")
public List<BillStatusCount> selectAllBillStatusCount(BaseEntity baseEntity) {
List<BillStatusCount> resultList = new ArrayList<>();
// 查询入库单据状态统计
List<BillStatusCount> stockinList = billStatusCountMapper.selectStockinStatusCount();
List<BillStatusCount> stockinList = billStatusCountMapper.selectStockinStatusCount(baseEntity);
if (stockinList != null) {
resultList.addAll(stockinList);
}
// 查询出库单据状态统计
List<BillStatusCount> stockoutList = billStatusCountMapper.selectStockoutStatusCount();
List<BillStatusCount> stockoutList = billStatusCountMapper.selectStockoutStatusCount(baseEntity);
if (stockoutList != null) {
resultList.addAll(stockoutList);
}
// 查询盘点单据状态统计
List<BillStatusCount> stockcheckList = billStatusCountMapper.selectStockcheckStatusCount();
List<BillStatusCount> stockcheckList = billStatusCountMapper.selectStockcheckStatusCount(baseEntity);
if (stockcheckList != null) {
resultList.addAll(stockcheckList);
}

View File

@@ -1,5 +1,7 @@
package com.ruoyi.index.service.impl;
import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.index.domain.CargoSpaceCount;
import com.ruoyi.index.mapper.CargoSpaceCountMapper;
import com.ruoyi.index.service.ICargoSpaceCountService;
@@ -24,9 +26,10 @@ public class CargoSpaceCountServiceImpl implements ICargoSpaceCountService {
* @return 货位状态统计对象
*/
@Override
public CargoSpaceCount selectStatusCount() {
@DataScope
public CargoSpaceCount selectStatusCount(BaseEntity baseEntity) {
// 查询各状态货位数量
List<Map<String, Object>> statusCounts = cargoSpaceCountMapper.selectStatusCount();
List<Map<String, Object>> statusCounts = cargoSpaceCountMapper.selectStatusCount(baseEntity);
// 初始化结果数组,默认所有状态数量为0
List<Integer> counts = new ArrayList<>();

View File

@@ -1,5 +1,7 @@
package com.ruoyi.index.service.impl;
import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.index.mapper.IndexCountMapper;
@@ -24,12 +26,13 @@ public class IndexCountServiceImpl implements IIndexCountService
* @return 统计结果
*/
@Override
public IndexCount selectFinishCount()
@DataScope
public IndexCount selectFinishCount(BaseEntity baseEntity)
{
IndexCount indexCount = new IndexCount();
indexCount.setStockinCount(indexCountMapper.selectStockinFinishCount());
indexCount.setStockoutCount(indexCountMapper.selectStockoutFinishCount());
indexCount.setStockcheckCount(indexCountMapper.selectStockcheckFinishCount());
indexCount.setStockinCount(indexCountMapper.selectStockinFinishCount(baseEntity));
indexCount.setStockoutCount(indexCountMapper.selectStockoutFinishCount(baseEntity));
indexCount.setStockcheckCount(indexCountMapper.selectStockcheckFinishCount(baseEntity));
return indexCount;
}
}

View File

@@ -7,6 +7,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -32,7 +33,7 @@ public class WeekJobCountServiceImpl implements IWeekJobCountService
* @return 近一周的入库和出库作业数量统计
*/
@Override
public WeekJobCount getWeekJobCount()
public WeekJobCount getWeekJobCount(BaseEntity baseEntity)
{
// 获取当前日期
LocalDate now = LocalDate.now();
@@ -53,8 +54,8 @@ public class WeekJobCountServiceImpl implements IWeekJobCountService
List<Integer> outJobCounts = Arrays.asList(0, 0, 0, 0, 0, 0, 0);
// 查询近一周的入库和出库作业数量
List<Integer> queryInCounts = weekJobCountMapper.selectInJobCounts(startDate, endDate);
List<Integer> queryOutCounts = weekJobCountMapper.selectOutJobCounts(startDate, endDate);
List<Integer> queryInCounts = weekJobCountMapper.selectInJobCounts(startDate, endDate,baseEntity);
List<Integer> queryOutCounts = weekJobCountMapper.selectOutJobCounts(startDate, endDate,baseEntity);
// 如果查询结果不为空,更新对应日期的数量
if (queryInCounts != null && !queryInCounts.isEmpty()) {