Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
b5a2fab9
"docs/vscode:/vscode.git/clone" did not exist on "2e844aae17a1c2d8c8ea87d44463dae39d2a3c4a"
Commit
b5a2fab9
authored
Oct 23, 2022
by
季圣华
Browse files
给首页的金额进行权限控制
parent
fa300cc9
Changes
3
Hide whitespace changes
Inline
Side-by-side
jshERP-boot/src/main/java/com/jsh/erp/controller/DepotItemController.java
View file @
b5a2fab9
...
@@ -674,7 +674,7 @@ public class DepotItemController {
...
@@ -674,7 +674,7 @@ public class DepotItemController {
BigDecimal
outPrice
=
depotItemService
.
inOrOutPrice
(
"入库"
,
"采购"
,
month
,
roleType
);
BigDecimal
outPrice
=
depotItemService
.
inOrOutPrice
(
"入库"
,
"采购"
,
month
,
roleType
);
BigDecimal
inPrice
=
depotItemService
.
inOrOutPrice
(
"出库"
,
"采购退货"
,
month
,
roleType
);
BigDecimal
inPrice
=
depotItemService
.
inOrOutPrice
(
"出库"
,
"采购退货"
,
month
,
roleType
);
obj
.
put
(
"x"
,
month
);
obj
.
put
(
"x"
,
month
);
obj
.
put
(
"y"
,
roleService
.
parsePriceByLimit
(
outPrice
.
subtract
(
inPrice
),
"buy"
,
request
));
obj
.
put
(
"y"
,
roleService
.
parsePriceByLimit
(
outPrice
.
subtract
(
inPrice
),
"buy"
,
"***"
,
request
));
buyPriceList
.
add
(
obj
);
buyPriceList
.
add
(
obj
);
}
}
map
.
put
(
"buyPriceList"
,
buyPriceList
);
map
.
put
(
"buyPriceList"
,
buyPriceList
);
...
@@ -684,7 +684,7 @@ public class DepotItemController {
...
@@ -684,7 +684,7 @@ public class DepotItemController {
BigDecimal
outPrice
=
depotItemService
.
inOrOutPrice
(
"出库"
,
"销售"
,
month
,
roleType
);
BigDecimal
outPrice
=
depotItemService
.
inOrOutPrice
(
"出库"
,
"销售"
,
month
,
roleType
);
BigDecimal
inPrice
=
depotItemService
.
inOrOutPrice
(
"入库"
,
"销售退货"
,
month
,
roleType
);
BigDecimal
inPrice
=
depotItemService
.
inOrOutPrice
(
"入库"
,
"销售退货"
,
month
,
roleType
);
obj
.
put
(
"x"
,
month
);
obj
.
put
(
"x"
,
month
);
obj
.
put
(
"y"
,
roleService
.
parsePriceByLimit
(
outPrice
.
subtract
(
inPrice
),
"sale"
,
request
));
obj
.
put
(
"y"
,
roleService
.
parsePriceByLimit
(
outPrice
.
subtract
(
inPrice
),
"sale"
,
"***"
,
request
));
salePriceList
.
add
(
obj
);
salePriceList
.
add
(
obj
);
}
}
map
.
put
(
"salePriceList"
,
salePriceList
);
map
.
put
(
"salePriceList"
,
salePriceList
);
...
@@ -694,7 +694,7 @@ public class DepotItemController {
...
@@ -694,7 +694,7 @@ public class DepotItemController {
BigDecimal
outPrice
=
depotItemService
.
inOrOutRetailPrice
(
"出库"
,
"零售"
,
month
,
roleType
);
BigDecimal
outPrice
=
depotItemService
.
inOrOutRetailPrice
(
"出库"
,
"零售"
,
month
,
roleType
);
BigDecimal
inPrice
=
depotItemService
.
inOrOutRetailPrice
(
"入库"
,
"零售退货"
,
month
,
roleType
);
BigDecimal
inPrice
=
depotItemService
.
inOrOutRetailPrice
(
"入库"
,
"零售退货"
,
month
,
roleType
);
obj
.
put
(
"x"
,
month
);
obj
.
put
(
"x"
,
month
);
obj
.
put
(
"y"
,
roleService
.
parsePriceByLimit
(
outPrice
.
subtract
(
inPrice
),
"retail"
,
request
));
obj
.
put
(
"y"
,
roleService
.
parsePriceByLimit
(
outPrice
.
subtract
(
inPrice
),
"retail"
,
"***"
,
request
));
retailPriceList
.
add
(
obj
);
retailPriceList
.
add
(
obj
);
}
}
map
.
put
(
"retailPriceList"
,
retailPriceList
);
map
.
put
(
"retailPriceList"
,
retailPriceList
);
...
...
jshERP-boot/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java
View file @
b5a2fab9
...
@@ -975,18 +975,18 @@ public class DepotHeadService {
...
@@ -975,18 +975,18 @@ public class DepotHeadService {
yearBegin
,
yearEnd
,
creatorArray
);
//今年零售出库
yearBegin
,
yearEnd
,
creatorArray
);
//今年零售出库
BigDecimal
yearRetailSaleBack
=
getBuyAndSaleRetailStatistics
(
"入库"
,
"零售退货"
,
BigDecimal
yearRetailSaleBack
=
getBuyAndSaleRetailStatistics
(
"入库"
,
"零售退货"
,
yearBegin
,
yearEnd
,
creatorArray
);
//今年零售退货
yearBegin
,
yearEnd
,
creatorArray
);
//今年零售退货
map
.
put
(
"todayBuy"
,
roleService
.
parsePriceByLimit
(
todayBuy
.
subtract
(
todayBuyBack
),
"buy"
,
request
));
map
.
put
(
"todayBuy"
,
roleService
.
parsePriceByLimit
(
todayBuy
.
subtract
(
todayBuyBack
),
"buy"
,
"***"
,
request
));
map
.
put
(
"todaySale"
,
roleService
.
parsePriceByLimit
(
todaySale
.
subtract
(
todaySaleBack
),
"sale"
,
request
));
map
.
put
(
"todaySale"
,
roleService
.
parsePriceByLimit
(
todaySale
.
subtract
(
todaySaleBack
),
"sale"
,
"***"
,
request
));
map
.
put
(
"todayRetailSale"
,
roleService
.
parsePriceByLimit
(
todayRetailSale
.
subtract
(
todayRetailSaleBack
),
"retail"
,
request
));
map
.
put
(
"todayRetailSale"
,
roleService
.
parsePriceByLimit
(
todayRetailSale
.
subtract
(
todayRetailSaleBack
),
"retail"
,
"***"
,
request
));
map
.
put
(
"monthBuy"
,
roleService
.
parsePriceByLimit
(
monthBuy
.
subtract
(
monthBuyBack
),
"buy"
,
request
));
map
.
put
(
"monthBuy"
,
roleService
.
parsePriceByLimit
(
monthBuy
.
subtract
(
monthBuyBack
),
"buy"
,
"***"
,
request
));
map
.
put
(
"monthSale"
,
roleService
.
parsePriceByLimit
(
monthSale
.
subtract
(
monthSaleBack
),
"sale"
,
request
));
map
.
put
(
"monthSale"
,
roleService
.
parsePriceByLimit
(
monthSale
.
subtract
(
monthSaleBack
),
"sale"
,
"***"
,
request
));
map
.
put
(
"monthRetailSale"
,
roleService
.
parsePriceByLimit
(
monthRetailSale
.
subtract
(
monthRetailSaleBack
),
"retail"
,
request
));
map
.
put
(
"monthRetailSale"
,
roleService
.
parsePriceByLimit
(
monthRetailSale
.
subtract
(
monthRetailSaleBack
),
"retail"
,
"***"
,
request
));
map
.
put
(
"yesterdayBuy"
,
roleService
.
parsePriceByLimit
(
yesterdayBuy
.
subtract
(
yesterdayBuyBack
),
"buy"
,
request
));
map
.
put
(
"yesterdayBuy"
,
roleService
.
parsePriceByLimit
(
yesterdayBuy
.
subtract
(
yesterdayBuyBack
),
"buy"
,
"***"
,
request
));
map
.
put
(
"yesterdaySale"
,
roleService
.
parsePriceByLimit
(
yesterdaySale
.
subtract
(
yesterdaySaleBack
),
"sale"
,
request
));
map
.
put
(
"yesterdaySale"
,
roleService
.
parsePriceByLimit
(
yesterdaySale
.
subtract
(
yesterdaySaleBack
),
"sale"
,
"***"
,
request
));
map
.
put
(
"yesterdayRetailSale"
,
roleService
.
parsePriceByLimit
(
yesterdayRetailSale
.
subtract
(
yesterdayRetailSaleBack
),
"retail"
,
request
));
map
.
put
(
"yesterdayRetailSale"
,
roleService
.
parsePriceByLimit
(
yesterdayRetailSale
.
subtract
(
yesterdayRetailSaleBack
),
"retail"
,
"***"
,
request
));
map
.
put
(
"yearBuy"
,
roleService
.
parsePriceByLimit
(
yearBuy
.
subtract
(
yearBuyBack
),
"buy"
,
request
));
map
.
put
(
"yearBuy"
,
roleService
.
parsePriceByLimit
(
yearBuy
.
subtract
(
yearBuyBack
),
"buy"
,
"***"
,
request
));
map
.
put
(
"yearSale"
,
roleService
.
parsePriceByLimit
(
yearSale
.
subtract
(
yearSaleBack
),
"sale"
,
request
));
map
.
put
(
"yearSale"
,
roleService
.
parsePriceByLimit
(
yearSale
.
subtract
(
yearSaleBack
),
"sale"
,
"***"
,
request
));
map
.
put
(
"yearRetailSale"
,
roleService
.
parsePriceByLimit
(
yearRetailSale
.
subtract
(
yearRetailSaleBack
),
"retail"
,
request
));
map
.
put
(
"yearRetailSale"
,
roleService
.
parsePriceByLimit
(
yearRetailSale
.
subtract
(
yearRetailSaleBack
),
"retail"
,
"***"
,
request
));
return
map
;
return
map
;
}
}
...
...
jshERP-boot/src/main/java/com/jsh/erp/service/role/RoleService.java
View file @
b5a2fab9
...
@@ -224,18 +224,18 @@ public class RoleService {
...
@@ -224,18 +224,18 @@ public class RoleService {
* @param type
* @param type
* @return
* @return
*/
*/
public
Object
parsePriceByLimit
(
BigDecimal
price
,
String
type
,
HttpServletRequest
request
)
throws
Exception
{
public
Object
parsePriceByLimit
(
BigDecimal
price
,
String
type
,
String
emptyInfo
,
HttpServletRequest
request
)
throws
Exception
{
Long
userId
=
userService
.
getUserId
(
request
);
Long
userId
=
userService
.
getUserId
(
request
);
String
priceLimit
=
userService
.
getRoleTypeByUserId
(
userId
).
getPriceLimit
();
String
priceLimit
=
userService
.
getRoleTypeByUserId
(
userId
).
getPriceLimit
();
if
(
StringUtil
.
isNotEmpty
(
priceLimit
))
{
if
(
StringUtil
.
isNotEmpty
(
priceLimit
))
{
if
(
"buy"
.
equals
(
type
)
&&
priceLimit
.
contains
(
"1"
))
{
if
(
"buy"
.
equals
(
type
)
&&
priceLimit
.
contains
(
"1"
))
{
return
"***"
;
return
emptyInfo
;
}
}
if
(
"retail"
.
equals
(
type
)
&&
priceLimit
.
contains
(
"2"
))
{
if
(
"retail"
.
equals
(
type
)
&&
priceLimit
.
contains
(
"2"
))
{
return
"***"
;
return
emptyInfo
;
}
}
if
(
"sale"
.
equals
(
type
)
&&
priceLimit
.
contains
(
"3"
))
{
if
(
"sale"
.
equals
(
type
)
&&
priceLimit
.
contains
(
"3"
))
{
return
"***"
;
return
emptyInfo
;
}
}
}
}
return
price
;
return
price
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment