给首页的金额进行权限控制
This commit is contained in:
@@ -425,7 +425,7 @@ public class DepotHeadController {
|
||||
String yearBegin = Tools.getYearBegin() + BusinessConstants.DAY_FIRST_TIME;
|
||||
String yearEnd = Tools.getYearEnd() + BusinessConstants.DAY_LAST_TIME;
|
||||
Map<String, Object> map = depotHeadService.getBuyAndSaleStatistics(today, monthFirstDay,
|
||||
yesterdayBegin, yesterdayEnd, yearBegin, yearEnd, roleType);
|
||||
yesterdayBegin, yesterdayEnd, yearBegin, yearEnd, roleType, request);
|
||||
res.code = 200;
|
||||
res.data = map;
|
||||
} catch(Exception e){
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -140,7 +140,7 @@ public class UserController {
|
||||
Map<String, Object> data = new HashMap<String, Object>();
|
||||
data.put("msgTip", msgTip);
|
||||
if(user!=null){
|
||||
String roleType = userService.getRoleTypeByUserId(user.getId()); //角色类型
|
||||
String roleType = userService.getRoleTypeByUserId(user.getId()).getType(); //角色类型
|
||||
redisService.storageObjectBySession(token,"roleType",roleType);
|
||||
redisService.storageObjectBySession(token,"clientIp", Tools.getLocalIp(request));
|
||||
logService.insertLogWithUserId(user.getId(), user.getTenantId(), "用户",
|
||||
|
||||
Reference in New Issue
Block a user