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
7f135542
提交
7f135542
authored
9月 02, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.修改工作台页面数量刷新
2.修改极光别名规则
上级
422fe50b
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
58 行增加
和
18 行删除
+58
-18
WorkNumEvent.java
.../main/java/com/wd/workoffice/bean/event/WorkNumEvent.java
+14
-0
MainActivity.java
...main/java/com/wd/workoffice/ui/activity/MainActivity.java
+5
-1
WorkFragment.java
app/src/main/java/com/wd/workoffice/ui/fg/WorkFragment.java
+38
-16
WorkUtils.java
app/src/main/java/com/wd/workoffice/util/WorkUtils.java
+1
-1
没有找到文件。
app/src/main/java/com/wd/workoffice/bean/event/WorkNumEvent.java
0 → 100644
浏览文件 @
7f135542
package
com
.
wd
.
workoffice
.
bean
.
event
;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
WorkNumEvent
{
public
WorkNumEvent
()
{
}
}
app/src/main/java/com/wd/workoffice/ui/activity/MainActivity.java
浏览文件 @
7f135542
...
...
@@ -15,6 +15,7 @@ import com.wd.workoffice.R;
import
com.wd.workoffice.app.WorkBaseActivity
;
import
com.wd.workoffice.bean.event.NotifyEvent
;
import
com.wd.workoffice.bean.event.RefreshTokenEvent
;
import
com.wd.workoffice.bean.event.WorkNumEvent
;
import
com.wd.workoffice.ui.activity.bat.approval.WorkApprovalActivity
;
import
com.wd.workoffice.ui.activity.login.LoginActivity
;
import
com.wd.workoffice.ui.activity.login.MainLoginActivity
;
...
...
@@ -154,6 +155,9 @@ public class MainActivity extends WorkBaseActivity implements BottomNavigationBa
startActivity
(
LoginActivity
.
class
);
return
;
}
if
(
position
==
1
)
{
EventBus
.
getDefault
().
post
(
new
WorkNumEvent
());
}
}
if
(
position
==
2
)
{
if
(!
UserKeeper
.
getInstance
().
getMesLogin
())
{
...
...
@@ -254,7 +258,7 @@ public class MainActivity extends WorkBaseActivity implements BottomNavigationBa
public
void
login
(
LoginEvent
lg
)
{
if
(!
UserKeeper
.
getInstance
().
getMesLogin
())
{
if
(!
TextUtils
.
isEmpty
(
UserKeeper
.
getInstance
().
getLoginInfo
()))
WorkUtils
.
handleAlias
(
Integer
.
valueOf
(
UserKeeper
.
getInstance
().
getUserId
()),
1
);
WorkUtils
.
handleAlias
(
Integer
.
valueOf
(
UserKeeper
.
getInstance
().
getUserId
()),
1
);
Intent
intent
=
new
Intent
(
MainActivity
.
this
,
LoginActivity
.
class
);
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_CLEAR_TASK
);
UserKeeper
.
getInstance
().
clearAll
();
...
...
app/src/main/java/com/wd/workoffice/ui/fg/WorkFragment.java
浏览文件 @
7f135542
...
...
@@ -12,6 +12,8 @@ import com.wd.workoffice.R;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.WorkBaseFg
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.event.CheckLogisticEvent
;
import
com.wd.workoffice.bean.event.WorkNumEvent
;
import
com.wd.workoffice.bean.vo.BatLayoutVo
;
import
com.wd.workoffice.bean.workEnum.PagePermissionType
;
import
com.wd.workoffice.retrofit.RtfUtils
;
...
...
@@ -40,6 +42,9 @@ import com.wd.workoffice.ui.activity.bat.work.WorkWarehouseActivity;
import
com.wd.workoffice.ui.adapter.BatLayoutAdapter
;
import
com.wd.workoffice.util.WorkUtils
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.Subscribe
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -84,11 +89,11 @@ public class WorkFragment extends WorkBaseFg {
// "部门账户",
"仓库"
,
"部门"
,
"财务中心"
,
"设备"
,
// "流程", "报表",
"库存类别"
,
"生产计划"
};
"库存类别"
,
"生产计划"
};
List
<
BatLayoutVo
>
saleList
=
new
ArrayList
<>();
List
<
BatLayoutVo
>
productList
=
new
ArrayList
<>();
int
[]
productImg
=
new
int
[]{
R
.
mipmap
.
order_sale1
,
R
.
mipmap
.
order_sale2
,
R
.
mipmap
.
order_sale3
,
R
.
mipmap
.
order_sale4
,
R
.
mipmap
.
order_sale5
};
};
String
[]
saleName
=
new
String
[]{
"销售订单"
,
"外采购订单"
,
"供应订单"
,
"内部订单"
,
"组装订单"
};
int
[]
saleImg
=
new
int
[]{
R
.
mipmap
.
order_product1
,
R
.
mipmap
.
order_product2
,
R
.
mipmap
.
order_product3
,
R
.
mipmap
.
order_product4
,
R
.
mipmap
.
order_product5
};
...
...
@@ -256,10 +261,10 @@ public class WorkFragment extends WorkBaseFg {
startActivity
(
WorkApprovalActivity
.
class
,
"type"
,
"1"
,
"status"
,
"0"
,
WorkToolBarActivity
.
_TITLE
,
"我发起的"
);
break
;
case
R
.
id
.
ll_deal
:
startActivity
(
ApprovalDealActivity
.
class
,
WorkToolBarActivity
.
_TITLE
,
"我处理的"
);
startActivity
(
ApprovalDealActivity
.
class
,
WorkToolBarActivity
.
_TITLE
,
"我处理的"
);
break
;
case
R
.
id
.
ll_not_deal
:
startActivity
(
WorkApprovalActivity
.
class
,
"type"
,
"2"
,
"status"
,
"0"
,
WorkToolBarActivity
.
_TITLE
,
"待我审批"
);
startActivity
(
WorkApprovalActivity
.
class
,
"type"
,
"2"
,
"status"
,
"0"
,
WorkToolBarActivity
.
_TITLE
,
"待我审批"
);
break
;
}
}
...
...
@@ -283,35 +288,35 @@ public class WorkFragment extends WorkBaseFg {
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
switch
(
position
)
{
case
0
:
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
SALE_ORDER_PAGE
.
getPermission
())){
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
SALE_ORDER_PAGE
.
getPermission
()))
{
toast
(
R
.
string
.
permission
);
return
;
}
startActivity
(
SaleSaleOrderActivity
.
class
,
"identity"
,
"1"
);
break
;
case
1
:
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
PO_PURCHASE_LIST
.
getPermission
())){
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
PO_PURCHASE_LIST
.
getPermission
()))
{
toast
(
R
.
string
.
permission
);
return
;
}
startActivity
(
SaleOutOrderActivity
.
class
,
"identity"
,
"1"
);
break
;
case
2
:
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
FO_SUPPLIER_LIST
.
getPermission
())){
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
FO_SUPPLIER_LIST
.
getPermission
()))
{
toast
(
R
.
string
.
permission
);
return
;
}
startActivity
(
SaleSupplierOrderActivity
.
class
,
"identity"
,
"1"
);
break
;
case
3
:
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
IO_INSIDE_LIST
.
getPermission
())){
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
IO_INSIDE_LIST
.
getPermission
()))
{
toast
(
R
.
string
.
permission
);
return
;
}
startActivity
(
SaleInsideOrderActivity
.
class
,
"identity"
,
"1"
);
break
;
case
4
:
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
AO_PACKAGE_LIST
.
getPermission
())&&
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
AO_PACKAGE_LIST
.
getPermission
())
&&
!
WorkUtils
.
hasPermission
(
PagePermissionType
.
AO_PACKAGE_APPLY_LIST
.
getPermission
()))
{
toast
(
R
.
string
.
permission
);
return
;
...
...
@@ -319,7 +324,7 @@ public class WorkFragment extends WorkBaseFg {
startActivity
(
SaleProductOrderActivity
.
class
,
"identity"
,
"1"
);
break
;
case
5
:
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
CO_CRUCIBLE_LIST
.
getPermission
())){
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
CO_CRUCIBLE_LIST
.
getPermission
()))
{
toast
(
R
.
string
.
permission
);
return
;
}
...
...
@@ -335,35 +340,35 @@ public class WorkFragment extends WorkBaseFg {
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
switch
(
position
)
{
case
0
:
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
SALE_ORDER_PAGE
.
getPermission
())){
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
SALE_ORDER_PAGE
.
getPermission
()))
{
toast
(
R
.
string
.
permission
);
return
;
}
startActivity
(
ProductSaleOrderActivity
.
class
);
break
;
case
1
:
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
PO_PURCHASE_LIST
.
getPermission
())){
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
PO_PURCHASE_LIST
.
getPermission
()))
{
toast
(
R
.
string
.
permission
);
return
;
}
startActivity
(
ProductOutOrderActivity
.
class
);
break
;
case
2
:
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
FO_SUPPLIER_LIST
.
getPermission
())){
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
FO_SUPPLIER_LIST
.
getPermission
()))
{
toast
(
R
.
string
.
permission
);
return
;
}
startActivity
(
ProductSupplierOrderActivity
.
class
);
break
;
case
3
:
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
IO_INSIDE_LIST
.
getPermission
())){
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
IO_INSIDE_LIST
.
getPermission
()))
{
toast
(
R
.
string
.
permission
);
return
;
}
startActivity
(
ProductInsideOrderActivity
.
class
);
break
;
case
4
:
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
AO_PACKAGE_LIST
.
getPermission
())&&
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
AO_PACKAGE_LIST
.
getPermission
())
&&
!
WorkUtils
.
hasPermission
(
PagePermissionType
.
AO_PACKAGE_APPLY_LIST
.
getPermission
()))
{
toast
(
R
.
string
.
permission
);
return
;
...
...
@@ -371,7 +376,7 @@ public class WorkFragment extends WorkBaseFg {
startActivity
(
SaleProductOrderActivity
.
class
,
"identity"
,
"2"
);
break
;
case
5
:
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
CO_CRUCIBLE_LIST
.
getPermission
())){
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
CO_CRUCIBLE_LIST
.
getPermission
()))
{
toast
(
R
.
string
.
permission
);
return
;
}
...
...
@@ -389,4 +394,21 @@ public class WorkFragment extends WorkBaseFg {
super
.
onResume
();
getNum
();
}
@Override
public
void
onStart
()
{
super
.
onStart
();
EventBus
.
getDefault
().
register
(
this
);
}
@Override
public
void
onStop
()
{
super
.
onStop
();
EventBus
.
getDefault
().
unregister
(
this
);
}
@Subscribe
public
void
refresh
(
WorkNumEvent
event
)
{
getNum
();
}
}
app/src/main/java/com/wd/workoffice/util/WorkUtils.java
浏览文件 @
7f135542
...
...
@@ -901,7 +901,7 @@ public class WorkUtils {
case
2
:
// JPushInterface.setAlias(WorkApp.getAppContext(), sequence, sequence + "_" + DataKeeper.getInstance().getBatLoginType().toUpperCase());
//TODO 多账套需要修改
JPushInterface
.
setAlias
(
WorkApp
.
getAppContext
(),
sequence
,
sequence
+
"_"
+
"
gk
"
);
JPushInterface
.
setAlias
(
WorkApp
.
getAppContext
(),
sequence
,
sequence
+
"_"
+
"
GK
"
);
break
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论