Skip to content
项目
Groups
代码片段
帮助
正在加载...
Sign in / Register
Toggle navigation
W
workoffice
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图表
统计图
Create a new issue
作业
提交
议题看板
Open sidebar
冷广德
workoffice
Commits
9dd956b8
提交
9dd956b8
authored
7月 04, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.下单权限添加
上级
5eb57e94
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
149 行增加
和
39 行删除
+149
-39
UserInfoBean.java
app/src/main/java/com/wd/workoffice/bean/UserInfoBean.java
+49
-39
OrderDeptPermission.java
.../com/wd/workoffice/bean/workEnum/OrderDeptPermission.java
+37
-0
MainListFragment.java
...c/main/java/com/wd/workoffice/ui/fg/MainListFragment.java
+26
-0
UserKeeper.java
app/src/main/java/com/wd/workoffice/util/UserKeeper.java
+16
-0
WorkUtils.java
app/src/main/java/com/wd/workoffice/util/WorkUtils.java
+21
-0
没有找到文件。
app/src/main/java/com/wd/workoffice/bean/UserInfoBean.java
浏览文件 @
9dd956b8
...
...
@@ -10,34 +10,24 @@ import java.util.List;
public
class
UserInfoBean
{
/**
* code : 0
* message : null
* data : {"createdBy":null,"createdByName":null,"createdTime":"2019-07-29 10:13:51","updatedBy":675,"updatedByName":null,"updatedTime":"2020-03-03 10:04:52","id":111,"userName":"fengfan","nickName":"冯帆","identifier":null,"phone":"15020055118","email":"1232@qq.com","type":"2","status":"1","erpId":"111","roles":[{"createdBy":1,"createdByName":null,"createdTime":"2019-08-27 14:17:33","updatedBy":111,"updatedByName":null,"updatedTime":"2019-11-22 10:39:44","id":3,"code":"SUPER_ADMIN","name":"超级管理员","level":0,"status":"1","dataScope":7,"customizeDataScope":"2,101,1","dataScopeName":"全系统","noticeIds":null,"createdUser":null}],"permissionList":["order:po:invoice-apply:audit","common","order:purchase-order:apply","finance:dept-ar-ap-part-flow:page:list","order:fo:receipt-invoice-apply:apply:save","app:order:io:enter-store-apply:page:list","finance:money-back-apply:page:list","order:purchase-order:details","app:order:so:enter-store-apply:page:list","app:finance:dept-ar-ap-part-detail:details","base:product:page:list","app:base:stock-type:list","order:po:use-apply:apply:save","order:fo:receipt-invoice-apply:audit","app:base:transit-part-manage:page:list","finance:money-pay-apply:apply","order:ao:use-apply:apply:save","order:so:enter-store-apply:apply:save","base:customer-branch-factory:page:list","order:fo:enter-store-apply:apply:save","market:inspection:page:list","app:order:sale-order:page:list","order:io:enter-store-apply:audit","base:product:shelf","order:supplier-order:start","order:return-apply-flow:list","app:order:po:enter-store-apply:page:list","order:po:return-apply:edit","finance:money-back-apply:exam","order:po:receipt-invoice-apply:page:list","order:po:receipt-invoice-apply:audit","order:ao:invoice-apply:audit","order:co:invoice-apply:page:list","app:order:fo:enter-store-apply:page:list","order:so:invoice-apply:audit","order:purchase-order:audit","order:po:advance-finish-apply:page:list","order:co:out-store-apply:page:list","order:package-order:details","finance:dept-account-balance:page:list","base:product:transit:log","order:so:advance-finish-apply:apply:save","order:po:receipt-invoice-apply:apply:save","base:transit-part-manage:details","order:po:invoice-apply:apply:save","order:po:out-store-apply:page:list","order:po:advance-finish-apply:audit","order:fo:quality-inspection:audit","base:product:price:update","order:so:out-store-apply:page:list","finance:logistics-apply:page:list","order:ao:invoice-apply:page:list","order:io:enter-store-apply:apply:save","order:crucible-order:audit","stockQuantity:order:page:list","order:co:out-store-apply:apply:save","order:so:advance-finish-apply:audit","finance:finance-tax:page:list","finance:money-pay-apply:page:list","order:ao:use-apply:page:list","base:finance-type:page:list","order:so:out-store-apply:apply:audit","app:sys:dept:details","order:po:out-store-apply:apply:save","app:base:transit-part-manage:update","order:po:return-apply:apply:save","finance:finance-tax:page:add","stock:stock:page:list","stockQuantity:page:list","finance:money-back-apply:apply","order:so:enter-store-apply:audit","order:inside-order:start","order:so:out-store-apply:apply:save","order:ao:package-apply:apply:save","stockQuantityDetailFlow:page:list","equipment:equipment:page:list","app:order:co:enter-store-apply:page:list","order:so:return-apply:apply:save","order:ao:invoice-apply:apply:save","order:sale:return-apply:edit:dept-admin","order:suppplier-order:details","finance:finance-dept-flow:page:list","order:so:advance-finish-apply:page:list","order:po:advance-finish-apply:apply:save","order:po:enter-stock-type:update","order:po:invoice-apply:page:list","finance:money-pay-apply:exam","order:ao:use-apply:audit","finance:finance-tax:page:detail","order:sale-order:details","order:so:invoice-apply:page:list","order:sale:return-apply:edit:business-department","order:sale:return-apply:edit:group","app:order:ao:package-order:page:list","market:dispatch:receive","order:supplier-order:audit","order:po:enter-store-apply:audit","order:co:invoice-apply:audit","order:so:use-apply:audit","order:inside-product-list:page:list","app:order:supplier-order:page:list","app:finance:dept-account-balance:details","order:so:use-apply:page:list","order:co:invoice-apply:apply:save","finance:finance-tax:page:update","order:inside-order:details","app:finance:dept-account-balance:balance:update-shelf","order:po:return-apply:page:list","base:sub-process:list","order:po:use-apply:audit","order:co:enter-store-apply:apply:save","order:co:out-store-apply:apply:audit","order:fo:quality-inspection:page:list","order:fo:enter-store-apply:audit","order:supplier-order:apply","market:inspection:save","app:order:crucible-order:page:list","order:fo:receipt-invoice-apply:page:list","finance:logistics-apply:save","finance:logistics-flow:page:list","app:order:ao:package-apply:page:list","order:sale-order:apply","order:co:enter-store-apply:audit","equipment:spare-part:page:list","finance:dept-account-balance:balance:update","order:sale-order:audit","stockQuantityFlow:page:list","order:crucible-order:start","order:po:out-store-apply:apply:audit","market:dispatch:page:list","finance:logistics:page:list","order:crucible-order:apply","order:po:enter-store-apply:apply:save","app:order:purchase-order:page:list","finance:logistics-apply:update","order:po:use-apply:page:list","order:so:invoice-apply:apply:save","app:finance:finance-dept-flow:shelf:page:list","order:purchase-order:start","order:ao:package-apply:audit","order:inside-order:audit","sys:dept:ruler:update","market:dispatch:save","app:order:inside-order:page:list","order:so:return-apply:page:list","order:so:use-apply:apply:save","order:inside-order:apply","order:crucible-order:details","order:sale-order:start","order:sale:return-apply:edit:finance-dept","stockQuantityDetail:page:list"],"ofDept":{"createdBy":1,"createdByName":null,"createdTime":"2019-09-02 10:53:47","updatedBy":1,"updatedByName":null,"updatedTime":"2020-01-06 08:54:41","id":120,"parentId":"CO001","status":"1","type":2,"typeString":null,"outdeptLedger":"{\"gk\":\"\",\"gt\":\"\"}","permission":null,"permissionString":null,"tag":null,"code":"0701","name":"销售一公司","level":2,"erpId":"GK26","children":null,"deptRulers":null,"deptRulerList":null,"deptUserList":null,"targetUserOfRuler":"1","deptRulerTotal":null,"gk":null,"gt":null},"access":"SUPER_ADMIN","ofDeptRuler":"1","roleNames":null,"deptName":null,"roleId":null,"deptId":null}
* httpStatus : 0
* path : null
* ext : null
*/
/**
* createdBy : null
* createdBy : 1
* createdByName : null
* createdTime : 2019-07-29 10:13:51
* updatedBy : 675
* createdTime : 2020-06-09 11:11:16
* updatedBy : 1
* updatedByName : null
* updatedTime : 2020-03-03 10:04:5
2
* id : 111
* userName : fengfan
* nickName : 冯帆
* updatedTime : 2020-06-11 09:06:4
2
* id : 137
* userName : zhouy
* nickName : 周毅
* identifier : null
* phone : 15020055118
* email : 1232
@qq.com
* phone : 15092119606
* email : 111
@qq.com
* type : 2
* status : 1
* erpId : 11
1
* roles : [{"createdBy":1,"createdByName":null,"createdTime":"2019-08-27 14:17:33","updatedBy":111,"updatedByName":null,"updatedTime":"2019-11-22 10:39:44","id":3,"code":"SUPER_ADMIN","name":"超级管理员","level":0,"status":"1","dataScope":7
,"customizeDataScope":"2,101,1","dataScopeName":"全系统","noticeIds":null,"createdUser":null}]
* permissionList : ["order:po:invoice-apply:audit","common","order:purchase-order:apply","finance:dept-ar-ap-part-flow:page:list","order:fo:receipt-invoice-apply:apply:save","app:order:io:enter-store-apply:page:list","finance:money-back-apply:page:list","order:purchase-order:details","app:order:so:enter-store-apply:page:list","app:finance:dept-ar-ap-part-detail:details","base:product:page:list","app:base:stock-type:list","order:po:use-apply:apply:save","order:fo:receipt-invoice-apply:audit","app:base:transit-part-manage:page:list","finance:money-pay-apply:apply","order:ao:use-apply:apply:save","order:so:enter-store-apply:apply:save","base:customer-branch-factory:page:list","order:fo:enter-store-apply:apply:save","market:inspection:page:list","app:order:sale-order:page:list","order:io:enter-store-apply:audit","base:product:shelf","order:supplier-order:start","order:return-apply-flow:list","app:order:po:enter-store-apply:page:list","order:po:return-apply:edit","finance:money-back-apply:exam","order:po:receipt-invoice-apply:page:list","order:po:receipt-invoice-apply:audit","order:ao:invoice-apply:audit","order:co:invoice-apply:page:list","app:order:fo:enter-store-apply:page:list","order:so:invoice-apply:audit","order:purchase-order:audit","order:po:advance-finish-apply:page:list","order:co:out-store-apply:page:list","order:package-order:details","finance:dept-account-balance:page:list","base:product:transit:log","order:so:advance-finish-apply:apply:save","order:po:receipt-invoice-apply:apply:save","base:transit-part-manage:details","order:po:invoice-apply:apply:save","order:po:out-store-apply:page:list","order:po:advance-finish-apply:audit","order:fo:quality-inspection:audit","base:product:price:update","order:so:out-store-apply:page:list","finance:logistics-apply:page:list","order:ao:invoice-apply:page:list","order:io:enter-store-apply:apply:save","order:crucible-order:audit","stockQuantity:order:page:list","order:co:out-store-apply:apply:save","order:so:advance-finish-apply:audit","finance:finance-tax:page:list","finance:money-pay-apply:page:list","order:ao:use-apply:page:list","base:finance-type:page:list","order:so:out-store-apply:apply:audit","app:sys:dept:details","order:po:out-store-apply:apply:save","app:base:transit-part-manage:update","order:po:return-apply:apply:save","finance:finance-tax:page:add","stock:stock:page:list","stockQuantity:page:list","finance:money-back-apply:apply","order:so:enter-store-apply:audit","order:inside-order:start","order:so:out-store-apply:apply:save","order:ao:package-apply:apply:save","stockQuantityDetailFlow:page:list","equipment:equipment:page:list","app:order:co:enter-store-apply:page:list","order:so:return-apply:apply:save","order:ao:invoice-apply:apply:save","order:sale:return-apply:edit:dept-admin","order:suppplier-order:details","finance:finance-dept-flow:page:list","order:so:advance-finish-apply:page:list","order:po:advance-finish-apply:apply:save","order:po:enter-stock-type:update","order:po:invoice-apply:page:list","finance:money-pay-apply:exam","order:ao:use-apply:audit","finance:finance-tax:page:detail","order:sale-order:details","order:so:invoice-apply:page:list","order:sale:return-apply:edit:business-department","order:sale:return-apply:edit:group","app:order:ao:package-order:page:list","market:dispatch:receive","order:supplier-order:audit","order:po:enter-store-apply:audit","order:co:invoice-apply:audit","order:so:use-apply:audit","order:inside-product-list:page:list","app:order:supplier-order:page:list","app:finance:dept-account-balance:details","order:so:use-apply:page:list","order:co:invoice-apply:apply:save","finance:finance-tax:page:update","order:inside-order:details","app:finance:dept-account-balance:balance:update-shelf","order:po:return-apply:page:list","base:sub-process:list","order:po:use-apply:audit","order:co:enter-store-apply:apply:save","order:co:out-store-apply:apply:audit","order:fo:quality-inspection:page:list","order:fo:enter-store-apply:audit","order:supplier-order:apply","market:inspection:save","app:order:crucible-order:page:list","order:fo:receipt-invoice-apply:page:list","finance:logistics-apply:save","finance:logistics-flow:page:list","app:order:ao:package-apply:page:list","order:sale-order:apply","order:co:enter-store-apply:audit","equipment:spare-part:page:list","finance:dept-account-balance:balance:update","order:sale-order:audit","stockQuantityFlow:page:list","order:crucible-order:start","order:po:out-store-apply:apply:audit","market:dispatch:page:list","finance:logistics:page:list","order:crucible-order:apply","order:po:enter-store-apply:apply:save","app:order:purchase-order:page:list","finance:logistics-apply:update","order:po:use-apply:page:list","order:so:invoice-apply:apply:save","app:finance:finance-dept-flow:shelf:page:list","order:purchase-order:start","order:ao:package-apply:audit","order:inside-order:audit","sys:dept:ruler:update","market:dispatch:save","app:order:inside-order:page:list","order:so:return-apply:page:list","order:so:use-apply:apply:save","order:inside-order:apply","order:crucible-order:details","order:sale-order:start","order:sale:return-apply:edit:finance-dept","stockQuantityDetail
:page:list"]
* ofDept : {"createdBy":1,"createdByName":null,"createdTime":"2019-09-02 10:53:47","updatedBy":1,"updatedByName":null,"updatedTime":"2020-01-06 08:54:41","id":120,"parentId":"CO001","status":"1","type":2,"typeString":null,"outdeptLedger":"{\"gk\":\"\",\"gt\":\"\"}","permission":null,"permissionString":null,"tag":null,"code":"0701","name":"销售一公司","level":2,"erpId":"GK26","children":null,"deptRulers":null,"deptRulerList":null,"deptUserList":null,"targetUserOfRuler":"1","deptRulerTotal":null,"gk":null,"gt":null
}
* erpId : EM181000
1
* roles : [{"createdBy":1,"createdByName":null,"createdTime":"2019-08-27 14:17:33","updatedBy":111,"updatedByName":null,"updatedTime":"2019-11-22 10:39:44","id":3,"code":"SUPER_ADMIN","name":"超级管理员","level":0,"status":"1","dataScope":7,"displayNo":null
,"customizeDataScope":"2,101,1","dataScopeName":"全系统","noticeIds":null,"createdUser":null}]
* permissionList : ["order:so:invoice-apply:apply:save","finance:money-back-apply:exam","order:ao:invoice-apply:audit","common","equipment:equipmentPurchase:update","order:return-apply-flow:list","base:product:price:update","order:po:return-apply:page:list","order:sale:return-apply:edit:dept-admin","order:package-order:details","app:base:transit-part-manage:update","order:po:enter-store-apply:apply:save","order:so:out-store-apply:apply:audit","app:order:co:enter-store-apply:page:list","app:finance:dept-account-balance:exchange:details","equipment:equipmentRepair:page:list","order:fo:quality-inspection:page:list","base:transit-part-manage:details","app:finance:dept-account-balance:details","finance:dept-account-balance:balance:update","order:po:use-apply:apply:save","finance:money-pay-apply:exam","order:po:use-apply:page:list","order:ao:package-apply:apply:save","order:sale-order:apply","equipment:spare-part:page:list","order:purchase-order:details","order:so:use-apply:audit","order:po:receipt-invoice-apply:page:list","order:po:receipt-invoice-apply:audit","app:base:transit-part-manage:page:list","order:sale:return-apply:edit:business-department","app:finance:dept-account-balance:balance:update-shelf","order:po:enter-stock-type:update","base:product:shelf","equipment:equipmetnRepair:add","order:po:invoice-apply:audit","order:ao:use-apply:apply:save","app:order:ao:package-order:page:list","order:requisitions:fo","order:suppplier-order:details","equipment:equipment:page:list","order:so:advance-finish-apply:page:list","finance:finance-tax:page:update","finance:finance-tax:page:detail","finance:money-pay-apply:apply","order:co:enter-store-apply:audit","app:order:po:enter-store-apply:page:list","app:order:so:enter-store-apply:page:list","equipment:equipmentRepair:finish","market:inspection:page:list","finance:logistics-flow:page:list","order:so:advance-finish-apply:apply:save","base:product:transit:log","finance:finance-dept-flow:page:list","app:order:purchase-order:page:list","finance:money-pay-apply:page:list","order:fo:enter-store-apply:apply:save","order:co:out-store-apply:page:list","stockQuantityDetail:page:list","app:finance:dept-account-balance:co:details","order:po:out-store-apply:page:list","order:po:advance-finish-apply:apply:save","equipment:equipmentPurchase:finish","order:purchase-order:audit","app:base:stock-type:list","order:po:advance-finish-apply:page:list","order:po:invoice-apply:page:list","equipment:equipmentPurchase:add","order:ao:use-apply:page:list","order:fo:enter-store-apply:audit","order:inside-order:audit","order:supplier-order:audit","stockQuantityFlow:page:list","finance:logistics:page:list","market:dispatch:save","order:crucible-order:details","order:supplier-order:apply","order:ao:package-apply:audit","finance:logistics-apply:page:list","finance:money-back-apply:apply","order:fo:receipt-invoice-apply:page:list","order:fo:receipt-invoice-apply:audit","order:so:enter-store-apply:audit","base:customer-branch-factory:page:list","app:order:inside-order:page:list","sys:dept:ruler:update","order:inside-order:details","base:product:page:list","order:so:out-store-apply:apply:save","order:co:invoice-apply:apply:save","finance:finance-tax:page:list","order:so:return-apply:apply:save","finance:dept-account-balance:page:list","app:order:sale-order:page:list","base:sub-process:list","order:fo:quality-inspection:audit","order:requisitions:page:list","order:purchase-order:apply","order:po:use-apply:audit","market:dispatch:page:list","order:crucible-order:start","base:finance-type:page:list","order:so:use-apply:page:list","order:po:invoice-apply:apply:save","stock:stock:page:list","stockQuantity:order:page:list","stockQuantity:page:list","finance:money-back-apply:page:list","app:order:fo:enter-store-apply:page:list","app:order:io:enter-store-apply:page:list","order:supplier-order:start","equipment:equipmentPurchase:apply","order:sale-order:details","equipment:equipmentPurchase:page:list","finance:dept-ar-ap-part-flow:page:list","app:finance:dept-ar-ap-part-detail:details","order:po:return-apply:apply:save","order:so:out-store-apply:page:list","app:order:ao:package-apply:page:list","order:po:out-store-apply:apply:audit","order:co:invoice-apply:page:list","order:so:enter-store-apply:apply:save","order:so:invoice-apply:audit","app:finance:dept-account-balance:tax:details","app:order:crucible-order:page:list","equipment:equipmentRepair:update","order:purchase-order:start","stockQuantityDetailFlow:page:list","order:io:enter-store-apply:apply:save","order:sale-order:audit","order:co:out-store-apply:apply:save","order:co:enter-store-apply:apply:save","order:so:use-apply:apply:save","order:po:advance-finish-apply:audit","equipment:equipmentRepairItem:list","order:ao:invoice-apply:page:list","order:po:receipt-invoice-apply:apply:save","finance:logistics-apply:save","order:inside-order:start","order:co:out-store-apply:apply:audit","market:dispatch:receive","order:co:invoice-apply:audit","order:po:return-apply:edit","order:crucible-order:apply","order:sale-order:start","order:ao:invoice-apply:apply:save","order:ao:use-apply:audit","order:sale:return-apply:edit:group","order:fo:receipt-invoice-apply:apply:save","app:finance:finance-dept-flow:shelf:page:list","order:crucible-order:audit","order:inside-order:apply","app:sys:dept:details","finance:finance-tax:page:add","finance:logistics-apply:update","equipment:equipmentRepair:apply","finance:finance-tax:dept:list","order:po:out-store-apply:apply:save","order:so:invoice-apply:page:list","order:po:enter-store-apply:audit","market:inspection:save","order:inside-product-list:page:list","order:so:advance-finish-apply:audit","order:sale:return-apply:edit:finance-dept","order:io:enter-store-apply:audit","app:order:supplier-order:page:list","order:so:return-apply
:page:list"]
* ofDept : {"createdBy":1,"createdByName":null,"createdTime":"2020-06-09 11:03:38","updatedBy":113,"updatedByName":null,"updatedTime":"2020-06-15 17:21:53","id":379,"parentId":"GK","status":"1","type":2,"typeString":null,"outdeptLedger":"{\"gk\":\"\",\"gt\":\"\"}","permission":null,"permissionString":null,"tag":null,"code":"GK27","name":"销售二公司(GK)","level":0,"erpId":"GK27","children":null,"deptRulers":null,"deptRulerList":null,"deptUserList":null,"targetUserOfRuler":"1","deptRulerTotal":null,"gk":null,"gt":null,"deptPermission":["INSIDE_SELL","ES_BUY"]
}
* access : SUPER_ADMIN
* ofDeptRuler : 1
* roleNames : null
...
...
@@ -46,7 +36,7 @@ public class UserInfoBean {
* deptId : null
*/
private
Objec
t
createdBy
;
private
in
t
createdBy
;
private
Object
createdByName
;
private
String
createdTime
;
private
int
updatedBy
;
...
...
@@ -63,19 +53,19 @@ public class UserInfoBean {
private
String
erpId
;
private
OfDeptBean
ofDept
;
private
String
access
;
private
String
ofDeptRuler
;
//1管理员
private
String
ofDeptRuler
;
private
Object
roleNames
;
private
String
deptName
;
private
Object
deptName
;
private
Object
roleId
;
private
Object
deptId
;
private
List
<
RolesBean
>
roles
;
private
List
<
String
>
permissionList
;
public
Objec
t
getCreatedBy
()
{
public
in
t
getCreatedBy
()
{
return
createdBy
;
}
public
void
setCreatedBy
(
Objec
t
createdBy
)
{
public
void
setCreatedBy
(
in
t
createdBy
)
{
this
.
createdBy
=
createdBy
;
}
...
...
@@ -223,11 +213,11 @@ public class UserInfoBean {
this
.
roleNames
=
roleNames
;
}
public
String
getDeptName
()
{
public
Object
getDeptName
()
{
return
deptName
;
}
public
void
setDeptName
(
String
deptName
)
{
public
void
setDeptName
(
Object
deptName
)
{
this
.
deptName
=
deptName
;
}
...
...
@@ -267,12 +257,12 @@ public class UserInfoBean {
/**
* createdBy : 1
* createdByName : null
* createdTime : 2019-09-02 10:53:47
* updatedBy : 1
* createdTime : 2020-06-09 11:03:38
* updatedBy : 113
* updatedByName : null
* updatedTime : 2020-01-06 08:54:41
* id : 120
* parentId : CO001
* updatedTime : 2020-06-15 17:21:53
* id : 379
* parentId : GK
* status : 1
* type : 2
* typeString : null
...
...
@@ -280,10 +270,10 @@ public class UserInfoBean {
* permission : null
* permissionString : null
* tag : null
* code : 0701
* name : 销售一公司
* level : 2
* erpId : GK26
* code : GK27
* name : 销售二公司(GK)
* level : 0
* erpId : GK27
* children : null
* deptRulers : null
* deptRulerList : null
...
...
@@ -292,6 +282,7 @@ public class UserInfoBean {
* deptRulerTotal : null
* gk : null
* gt : null
* deptPermission : ["INSIDE_SELL","ES_BUY"]
*/
private
int
createdBy
;
...
...
@@ -321,6 +312,7 @@ public class UserInfoBean {
private
Object
deptRulerTotal
;
private
Object
gk
;
private
Object
gt
;
private
List
<
String
>
deptPermission
;
public
int
getCreatedBy
()
{
return
createdBy
;
...
...
@@ -537,6 +529,14 @@ public class UserInfoBean {
public
void
setGt
(
Object
gt
)
{
this
.
gt
=
gt
;
}
public
List
<
String
>
getDeptPermission
()
{
return
deptPermission
;
}
public
void
setDeptPermission
(
List
<
String
>
deptPermission
)
{
this
.
deptPermission
=
deptPermission
;
}
}
public
static
class
RolesBean
{
...
...
@@ -553,6 +553,7 @@ public class UserInfoBean {
* level : 0
* status : 1
* dataScope : 7
* displayNo : null
* customizeDataScope : 2,101,1
* dataScopeName : 全系统
* noticeIds : null
...
...
@@ -571,6 +572,7 @@ public class UserInfoBean {
private
int
level
;
private
String
status
;
private
int
dataScope
;
private
Object
displayNo
;
private
String
customizeDataScope
;
private
String
dataScopeName
;
private
Object
noticeIds
;
...
...
@@ -672,6 +674,14 @@ public class UserInfoBean {
this
.
dataScope
=
dataScope
;
}
public
Object
getDisplayNo
()
{
return
displayNo
;
}
public
void
setDisplayNo
(
Object
displayNo
)
{
this
.
displayNo
=
displayNo
;
}
public
String
getCustomizeDataScope
()
{
return
customizeDataScope
;
}
...
...
app/src/main/java/com/wd/workoffice/bean/workEnum/OrderDeptPermission.java
0 → 100644
浏览文件 @
9dd956b8
package
com
.
wd
.
workoffice
.
bean
.
workEnum
;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
enum
OrderDeptPermission
{
SALE
(
"销售下单"
,
"ES_BUY"
),
OUT_BUY
(
"外采购下单"
,
"PURCHASE_BUY"
),
SUPPLIER
(
"供应下单"
,
"SUPPLY_BUY"
),
CRUCIBLE
(
"坩埚下单"
,
"CRUCIBLE_BUY"
),
IN
(
"内部交易下单"
,
"INSIDE_BUY"
),
REPAIR_BUY
(
"维修下单"
,
"REPAIR_BUY"
),
FISCAL_TAX_BUY
(
"交税下单"
,
"FISCAL_TAX_BUY"
),
LOAN_BUY
(
"贷款下单"
,
"LOAN_BUY"
);
private
String
name
;
private
String
code
;
OrderDeptPermission
(
String
name
,
String
code
)
{
this
.
name
=
name
;
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
}
app/src/main/java/com/wd/workoffice/ui/fg/MainListFragment.java
浏览文件 @
9dd956b8
...
...
@@ -13,6 +13,8 @@ import com.wd.workoffice.app.WorkBaseFg;
import
com.wd.workoffice.bean.DepBean
;
import
com.wd.workoffice.bean.OrderBean
;
import
com.wd.workoffice.bean.event.CheckOrderEvent
;
import
com.wd.workoffice.bean.workEnum.OrderDeptPermission
;
import
com.wd.workoffice.bean.workEnum.PagePermissionType
;
import
com.wd.workoffice.bean.workEnum.PermissionType
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
...
...
@@ -140,19 +142,43 @@ public class MainListFragment extends WorkBaseFg {
switch
(
type
)
{
case
"1"
:
permission
=
PermissionType
.
ES_SELL
.
getCode
();
if
(!
WorkUtils
.
hasOrderDeptPermission
(
OrderDeptPermission
.
SALE
.
getCode
())
||
!
WorkUtils
.
hasPermission
(
PagePermissionType
.
SALE_ORDER_START
.
getPermission
()))
{
toast
(
R
.
string
.
permission
);
return
;
}
break
;
case
"2"
:
if
(!
WorkUtils
.
hasOrderDeptPermission
(
OrderDeptPermission
.
OUT_BUY
.
getCode
())
||!
WorkUtils
.
hasPermission
(
PagePermissionType
.
PO_PURCHASE_START
.
getPermission
()))
{
toast
(
R
.
string
.
permission
);
return
;
}
permission
=
PermissionType
.
PURCHASE_SELL
.
getCode
();
break
;
case
"3"
:
if
(!
WorkUtils
.
hasOrderDeptPermission
(
OrderDeptPermission
.
SUPPLIER
.
getCode
())
||!
WorkUtils
.
hasPermission
(
PagePermissionType
.
FO_SUPPLIER_START
.
getPermission
()))
{
toast
(
R
.
string
.
permission
);
return
;
}
permission
=
PermissionType
.
SUPPLY_SELL
.
getCode
();
break
;
case
"4"
:
if
(!
WorkUtils
.
hasOrderDeptPermission
(
OrderDeptPermission
.
FISCAL_TAX_BUY
.
getCode
())
||!
WorkUtils
.
hasPermission
(
PagePermissionType
.
FINANCE_TAX
.
getPermission
()))
{
toast
(
R
.
string
.
permission
);
return
;
}
break
;
case
"5"
:
if
(!
WorkUtils
.
hasOrderDeptPermission
(
OrderDeptPermission
.
CRUCIBLE
.
getCode
())
||!
WorkUtils
.
hasPermission
(
PagePermissionType
.
CO_CRUCIBLE_START
.
getPermission
()))
{
toast
(
R
.
string
.
permission
);
return
;
}
permission
=
PermissionType
.
CRUCIBLE_SELL
.
getCode
();
break
;
case
"6"
:
if
(!
WorkUtils
.
hasOrderDeptPermission
(
OrderDeptPermission
.
IN
.
getCode
())
||!
WorkUtils
.
hasPermission
(
PagePermissionType
.
IO_INSIDE_START
.
getPermission
()))
{
toast
(
R
.
string
.
permission
);
return
;
}
permission
=
PermissionType
.
INSIDE_SELL
.
getCode
();
break
;
}
...
...
app/src/main/java/com/wd/workoffice/util/UserKeeper.java
浏览文件 @
9dd956b8
...
...
@@ -248,6 +248,22 @@ public class UserKeeper {
return
infoBean
.
getPermissionList
();
}
/**
* 获取部门下单权限
*
* @return
*/
public
List
<
String
>
getOrderDeptPermission
()
{
if
(
TextUtils
.
isEmpty
(
sp
.
getString
(
USER_INFO
)))
{
return
null
;
}
UserInfoBean
infoBean
=
JSON
.
parseObject
(
sp
.
getString
(
USER_INFO
),
UserInfoBean
.
class
);
if
(
infoBean
==
null
||
infoBean
.
getOfDept
()
==
null
)
{
return
null
;
}
return
infoBean
.
getOfDept
().
getDeptPermission
();
}
public
String
getUserErpId
()
{
if
(
TextUtils
.
isEmpty
(
sp
.
getString
(
USER_INFO
)))
{
return
""
;
...
...
app/src/main/java/com/wd/workoffice/util/WorkUtils.java
浏览文件 @
9dd956b8
...
...
@@ -614,6 +614,7 @@ public class WorkUtils {
return
hasPermission
;
}
public
static
void
addPermissionRule
(
View
view
)
{
List
<
View
>
list
=
getAllChildViews
(
view
);
for
(
View
child
:
list
)
{
...
...
@@ -639,6 +640,26 @@ public class WorkUtils {
return
allChildren
;
}
/**
* 判断是否拥有权限
*
* @return
*/
public
static
boolean
hasOrderDeptPermission
(
String
permission
)
{
List
<
String
>
userPermission
=
UserKeeper
.
getInstance
().
getOrderDeptPermission
();
if
(
userPermission
==
null
)
{
return
true
;
}
boolean
hasPermission
=
false
;
for
(
String
s
:
userPermission
)
{
if
(
TextUtils
.
equals
(
permission
,
s
))
{
hasPermission
=
true
;
break
;
}
}
return
hasPermission
;
}
/**
* 是否是图片
*
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论