给首页的金额进行权限控制

This commit is contained in:
季圣华
2022-10-23 17:09:48 +08:00
parent 9cf74048c4
commit fa300cc964
7 changed files with 57 additions and 30 deletions

View File

@@ -14,6 +14,7 @@ import com.jsh.erp.service.materialExtend.MaterialExtendService;
import com.jsh.erp.service.depotItem.DepotItemService;
import com.jsh.erp.service.material.MaterialService;
import com.jsh.erp.service.redis.RedisService;
import com.jsh.erp.service.role.RoleService;
import com.jsh.erp.service.unit.UnitService;
import com.jsh.erp.utils.*;
import io.swagger.annotations.Api;
@@ -58,6 +59,9 @@ public class DepotItemController {
@Resource
private DepotService depotService;
@Resource
private RoleService roleService;
/**
* 根据仓库和商品查询单据列表
* @param mId
@@ -670,7 +674,7 @@ public class DepotItemController {
BigDecimal outPrice = depotItemService.inOrOutPrice("入库", "采购", month, roleType);
BigDecimal inPrice = depotItemService.inOrOutPrice("出库", "采购退货", month, roleType);
obj.put("x", month);
obj.put("y", outPrice.subtract(inPrice));
obj.put("y", roleService.parsePriceByLimit(outPrice.subtract(inPrice), "buy", request));
buyPriceList.add(obj);
}
map.put("buyPriceList", buyPriceList);
@@ -680,7 +684,7 @@ public class DepotItemController {
BigDecimal outPrice = depotItemService.inOrOutPrice("出库", "销售", month, roleType);
BigDecimal inPrice = depotItemService.inOrOutPrice("入库", "销售退货", month, roleType);
obj.put("x", month);
obj.put("y", outPrice.subtract(inPrice));
obj.put("y", roleService.parsePriceByLimit(outPrice.subtract(inPrice), "sale", request));
salePriceList.add(obj);
}
map.put("salePriceList", salePriceList);
@@ -690,7 +694,7 @@ public class DepotItemController {
BigDecimal outPrice = depotItemService.inOrOutRetailPrice("出库", "零售", month, roleType);
BigDecimal inPrice = depotItemService.inOrOutRetailPrice("入库", "零售退货", month, roleType);
obj.put("x", month);
obj.put("y", outPrice.subtract(inPrice));
obj.put("y", roleService.parsePriceByLimit(outPrice.subtract(inPrice), "retail", request));
retailPriceList.add(obj);
}
map.put("retailPriceList", retailPriceList);