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
70aff204
提交
70aff204
authored
5月 26, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.质量反馈流程
2.//TODO 设备三个子菜单,坩埚下单,mes其他页面,质量反馈字段修改,mes新菜单,mes用户反馈空也展示,编辑任务担当无法修改.支数参数
上级
6f5a9186
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
487 行增加
和
51 行删除
+487
-51
FeedbackDetailBean.java
...va/com/wd/workoffice/bean/mesBean/FeedbackDetailBean.java
+9
-0
MenuBean.java
...rc/main/java/com/wd/workoffice/bean/mesBean/MenuBean.java
+213
-0
MesApiService.java
...c/main/java/com/wd/workoffice/retrofit/MesApiService.java
+24
-4
MesQualityActivity.java
...orkoffice/ui/activity/mes/quality/MesQualityActivity.java
+1
-0
MesQualityAddActivity.java
...office/ui/activity/mes/quality/MesQualityAddActivity.java
+43
-12
MesQualityClientActivity.java
...ice/ui/activity/mes/quality/MesQualityClientActivity.java
+4
-2
MesQualityDetailActivity.java
...ice/ui/activity/mes/quality/MesQualityDetailActivity.java
+77
-19
MesQualityFactoryActivity.java
...ce/ui/activity/mes/quality/MesQualityFactoryActivity.java
+5
-4
MesQualityManagerActivity.java
...ce/ui/activity/mes/quality/MesQualityManagerActivity.java
+3
-2
UserSettingActivity.java
...m/wd/workoffice/ui/activity/user/UserSettingActivity.java
+2
-0
DataKeeper.java
app/src/main/java/com/wd/workoffice/util/DataKeeper.java
+56
-0
WorkUtils.java
app/src/main/java/com/wd/workoffice/util/WorkUtils.java
+41
-0
activity_mes_quality_add.xml
app/src/main/res/layout/activity_mes_quality_add.xml
+0
-0
activity_mes_quality_detail.xml
app/src/main/res/layout/activity_mes_quality_detail.xml
+9
-8
没有找到文件。
app/src/main/java/com/wd/workoffice/bean/mesBean/FeedbackDetailBean.java
浏览文件 @
70aff204
...
@@ -161,10 +161,19 @@ public class FeedbackDetailBean {
...
@@ -161,10 +161,19 @@ public class FeedbackDetailBean {
private
String
createUserName
;
private
String
createUserName
;
private
String
updateUserId
;
private
String
updateUserId
;
private
String
updateUserName
;
private
String
updateUserName
;
private
String
procId
;
private
AttachmentVOBean
attachmentVO
;
private
AttachmentVOBean
attachmentVO
;
private
Object
defectMudIds
;
private
Object
defectMudIds
;
private
boolean
delete
;
private
boolean
delete
;
public
String
getProcId
()
{
return
procId
;
}
public
void
setProcId
(
String
procId
)
{
this
.
procId
=
procId
;
}
public
String
getId
()
{
public
String
getId
()
{
return
id
;
return
id
;
}
}
...
...
app/src/main/java/com/wd/workoffice/bean/mesBean/MenuBean.java
0 → 100644
浏览文件 @
70aff204
package
com
.
wd
.
workoffice
.
bean
.
mesBean
;
import
java.util.List
;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
MenuBean
{
/**
* text : 基础数据
* tags : [null]
* id : 04d20aa0b40811e99593fa163e1166bd
* parentId : null
* levelCode : 000001
* nodes : [{"text":"工序管理","tags":["/processManagement"],"id":"6e588cadb40811e99593fa163e1166bd","parentId":"04d20aa0b40811e99593fa163e1166bd","levelCode":"gx000001","nodes":null,"icon":null,"url":null,"description":"1","appIcon":null},{"text":"工厂日历","tags":["/factoryCalendar"],"id":"a5b730b0b40811e99593fa163e1166bd","parentId":"04d20aa0b40811e99593fa163e1166bd","levelCode":"gx000002","nodes":null,"icon":null,"url":null,"description":"1","appIcon":null},{"text":"产品系列","tags":["/productLine"],"id":"31e71628bfe811e99593fa163e1166bd","parentId":"04d20aa0b40811e99593fa163e1166bd","levelCode":"gx000003","nodes":null,"icon":null,"url":null,"description":"1","appIcon":null},{"text":"产品数据","tags":["/productData"],"id":"e67c868db40811e99593fa163e1166bd","parentId":"04d20aa0b40811e99593fa163e1166bd","levelCode":"gx000004","nodes":null,"icon":null,"url":null,"description":"1","appIcon":null},{"text":"仓库目录","tags":["/wuliuguanli/cangku"],"id":"eabd565d67ef11ea8334fa163e1166bd","parentId":"04d20aa0b40811e99593fa163e1166bd","levelCode":"gx000005","nodes":null,"icon":null,"url":null,"description":"1","appIcon":null},{"text":"物料类别","tags":["/wuliuguanli/wuliaoleibie"],"id":"06c294c667f111ea8334fa163e1166bd","parentId":"04d20aa0b40811e99593fa163e1166bd","levelCode":"gx000006","nodes":null,"icon":null,"url":null,"description":"1","appIcon":null},{"text":"货品资料","tags":["/wuliuguanli/wuliaoqingdan"],"id":"123a9a8d67f111ea8334fa163e1166bd","parentId":"04d20aa0b40811e99593fa163e1166bd","levelCode":"gx000007","nodes":null,"icon":null,"url":null,"description":"1","appIcon":null}]
* icon : iconfont iconjichushujuguanli
* url : null
* description : 0
* appIcon : null
*/
private
String
text
;
private
String
id
;
private
Object
parentId
;
private
String
levelCode
;
private
String
icon
;
private
Object
url
;
private
String
description
;
private
Object
appIcon
;
private
List
<
NodesBean
>
nodes
;
public
String
getText
()
{
return
text
;
}
public
void
setText
(
String
text
)
{
this
.
text
=
text
;
}
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
Object
getParentId
()
{
return
parentId
;
}
public
void
setParentId
(
Object
parentId
)
{
this
.
parentId
=
parentId
;
}
public
String
getLevelCode
()
{
return
levelCode
;
}
public
void
setLevelCode
(
String
levelCode
)
{
this
.
levelCode
=
levelCode
;
}
public
String
getIcon
()
{
return
icon
;
}
public
void
setIcon
(
String
icon
)
{
this
.
icon
=
icon
;
}
public
Object
getUrl
()
{
return
url
;
}
public
void
setUrl
(
Object
url
)
{
this
.
url
=
url
;
}
public
String
getDescription
()
{
return
description
;
}
public
void
setDescription
(
String
description
)
{
this
.
description
=
description
;
}
public
Object
getAppIcon
()
{
return
appIcon
;
}
public
void
setAppIcon
(
Object
appIcon
)
{
this
.
appIcon
=
appIcon
;
}
public
List
<
NodesBean
>
getNodes
()
{
return
nodes
;
}
public
void
setNodes
(
List
<
NodesBean
>
nodes
)
{
this
.
nodes
=
nodes
;
}
public
static
class
NodesBean
{
/**
* text : 工序管理
* tags : ["/processManagement"]
* id : 6e588cadb40811e99593fa163e1166bd
* parentId : 04d20aa0b40811e99593fa163e1166bd
* levelCode : gx000001
* nodes : null
* icon : null
* url : null
* description : 1
* appIcon : null
*/
private
String
text
;
private
String
id
;
private
String
parentId
;
private
String
levelCode
;
private
Object
nodes
;
private
Object
icon
;
private
Object
url
;
private
String
description
;
private
Object
appIcon
;
private
List
<
String
>
tags
;
public
String
getText
()
{
return
text
;
}
public
void
setText
(
String
text
)
{
this
.
text
=
text
;
}
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getParentId
()
{
return
parentId
;
}
public
void
setParentId
(
String
parentId
)
{
this
.
parentId
=
parentId
;
}
public
String
getLevelCode
()
{
return
levelCode
;
}
public
void
setLevelCode
(
String
levelCode
)
{
this
.
levelCode
=
levelCode
;
}
public
Object
getNodes
()
{
return
nodes
;
}
public
void
setNodes
(
Object
nodes
)
{
this
.
nodes
=
nodes
;
}
public
Object
getIcon
()
{
return
icon
;
}
public
void
setIcon
(
Object
icon
)
{
this
.
icon
=
icon
;
}
public
Object
getUrl
()
{
return
url
;
}
public
void
setUrl
(
Object
url
)
{
this
.
url
=
url
;
}
public
String
getDescription
()
{
return
description
;
}
public
void
setDescription
(
String
description
)
{
this
.
description
=
description
;
}
public
Object
getAppIcon
()
{
return
appIcon
;
}
public
void
setAppIcon
(
Object
appIcon
)
{
this
.
appIcon
=
appIcon
;
}
public
List
<
String
>
getTags
()
{
return
tags
;
}
public
void
setTags
(
List
<
String
>
tags
)
{
this
.
tags
=
tags
;
}
}
}
app/src/main/java/com/wd/workoffice/retrofit/MesApiService.java
浏览文件 @
70aff204
...
@@ -131,7 +131,7 @@ public interface MesApiService {
...
@@ -131,7 +131,7 @@ public interface MesApiService {
* @return
* @return
*/
*/
@POST
(
"/himes/api/msSceneFeedback/createByWorkOrder.json"
)
@POST
(
"/himes/api/msSceneFeedback/createByWorkOrder.json"
)
Observable
<
BaseMesBean
>
userClientList
(
@Query
(
"functionId"
)
String
functionId
,
@Body
RequestBody
requestBody
);
Observable
<
BaseMesBean
>
userClientList
(
@Query
(
"functionId"
)
String
functionId
,
@Body
RequestBody
requestBody
);
/**
/**
...
@@ -258,7 +258,6 @@ public interface MesApiService {
...
@@ -258,7 +258,6 @@ public interface MesApiService {
Observable
<
BaseMesBean
>
speedAdd
(
@Query
(
"functionId"
)
String
functionId
,
@Query
(
"option"
)
String
option
,
@Body
RequestBody
requestBody
);
Observable
<
BaseMesBean
>
speedAdd
(
@Query
(
"functionId"
)
String
functionId
,
@Query
(
"option"
)
String
option
,
@Body
RequestBody
requestBody
);
/**
/**
* otherSupplierAdd
* otherSupplierAdd
*
*
...
@@ -277,8 +276,6 @@ public interface MesApiService {
...
@@ -277,8 +276,6 @@ public interface MesApiService {
/**
/**
*
*
* @return
* @return
*/
*/
@POST
(
"/himes/api/msSceneFeedback/show/getByFeedInfo.json"
)
@POST
(
"/himes/api/msSceneFeedback/show/getByFeedInfo.json"
)
...
@@ -365,6 +362,13 @@ public interface MesApiService {
...
@@ -365,6 +362,13 @@ public interface MesApiService {
*/
*/
@GET
(
"/himes/api/feedback/show/{id}.json"
)
@GET
(
"/himes/api/feedback/show/{id}.json"
)
Observable
<
BaseMesBean
>
feedbackDetail
(
@Path
(
"id"
)
String
id
,
@Query
(
"functionId"
)
String
functionId
);
Observable
<
BaseMesBean
>
feedbackDetail
(
@Path
(
"id"
)
String
id
,
@Query
(
"functionId"
)
String
functionId
);
/**
* 质量反馈 详情
*
* @return
*/
@POST
(
"/himes/api/feedback/approved.json"
)
Observable
<
BaseMesBean
>
feedbackApproved
(
@Query
(
"functionId"
)
String
functionId
,
@Body
RequestBody
requestBody
);
/**
/**
* 质量反馈 详情
* 质量反馈 详情
...
@@ -374,6 +378,14 @@ public interface MesApiService {
...
@@ -374,6 +378,14 @@ public interface MesApiService {
@POST
(
"/himes/api/feedback/deal/update.json"
)
@POST
(
"/himes/api/feedback/deal/update.json"
)
Observable
<
BaseMesBean
>
feedbackCheck
(
@Query
(
"functionId"
)
String
functionId
,
@Body
RequestBody
requestBody
);
Observable
<
BaseMesBean
>
feedbackCheck
(
@Query
(
"functionId"
)
String
functionId
,
@Body
RequestBody
requestBody
);
/**
* 质量反馈 详情
*
* @return
*/
@POST
(
"/himes/api/main/getRoleFunction.json"
)
Observable
<
BaseMesBean
>
feedbackMenu
();
/**
/**
* 销售经理查询
* 销售经理查询
*
*
...
@@ -406,6 +418,7 @@ public interface MesApiService {
...
@@ -406,6 +418,7 @@ public interface MesApiService {
*/
*/
@POST
(
"/himes/api/defectdict/show/page.json"
)
@POST
(
"/himes/api/defectdict/show/page.json"
)
Observable
<
BaseMesBean
>
defectList
(
@Query
(
"functionId"
)
String
functionId
,
@Body
RequestBody
requestBody
);
Observable
<
BaseMesBean
>
defectList
(
@Query
(
"functionId"
)
String
functionId
,
@Body
RequestBody
requestBody
);
/**
/**
* 客户
* 客户
*
*
...
@@ -419,12 +432,19 @@ public interface MesApiService {
...
@@ -419,12 +432,19 @@ public interface MesApiService {
*/
*/
@POST
(
"/himes/api/feedback/add/save.json"
)
@POST
(
"/himes/api/feedback/add/save.json"
)
Observable
<
BaseMesBean
>
feedbackAdd
(
@Query
(
"functionId"
)
String
functionId
,
@Body
RequestBody
requestBody
);
Observable
<
BaseMesBean
>
feedbackAdd
(
@Query
(
"functionId"
)
String
functionId
,
@Body
RequestBody
requestBody
);
/**
/**
* @return
* @return
*/
*/
@POST
(
"/himes/api/feedback/update/save.json"
)
@POST
(
"/himes/api/feedback/update/save.json"
)
Observable
<
BaseMesBean
>
feedbackUpdate
(
@Query
(
"functionId"
)
String
functionId
,
@Body
RequestBody
requestBody
);
Observable
<
BaseMesBean
>
feedbackUpdate
(
@Query
(
"functionId"
)
String
functionId
,
@Body
RequestBody
requestBody
);
/**
* @return
*/
@POST
(
"/himes/api/feedback/sendActivity.json"
)
Observable
<
BaseMesBean
>
startFeedback
(
@Query
(
"functionId"
)
String
functionId
,
@Body
RequestBody
requestBody
);
/**
/**
* @return
* @return
*/
*/
...
...
app/src/main/java/com/wd/workoffice/ui/activity/mes/quality/MesQualityActivity.java
浏览文件 @
70aff204
...
@@ -74,6 +74,7 @@ public class MesQualityActivity extends WorkToolBarActivity {
...
@@ -74,6 +74,7 @@ public class MesQualityActivity extends WorkToolBarActivity {
param
=
WorkUtils
.
pageMesKey
();
param
=
WorkUtils
.
pageMesKey
();
param
.
put
(
"pageNum"
,
page
);
param
.
put
(
"pageNum"
,
page
);
getData
();
getData
();
WorkUtils
.
getMesMenu
();
}
}
private
void
getData
()
{
private
void
getData
()
{
...
...
app/src/main/java/com/wd/workoffice/ui/activity/mes/quality/MesQualityAddActivity.java
浏览文件 @
70aff204
package
com
.
wd
.
workoffice
.
ui
.
activity
.
mes
.
quality
;
package
com
.
wd
.
workoffice
.
ui
.
activity
.
mes
.
quality
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.view.Menu
;
import
android.view.Menu
;
import
android.view.MenuItem
;
import
android.view.MenuItem
;
import
android.view.View
;
import
android.view.View
;
import
android.widget.EditText
;
import
android.widget.Button
;
import
android.widget.LinearLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.RelativeLayout
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.BaseMesBean
;
import
com.wd.workoffice.app.BaseMesBean
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.event.CheckFeedbackEvent
;
import
com.wd.workoffice.bean.event.CheckFeedbackEvent
;
...
@@ -19,11 +20,7 @@ import com.wd.workoffice.bean.mesBean.BoxBean;
...
@@ -19,11 +20,7 @@ import com.wd.workoffice.bean.mesBean.BoxBean;
import
com.wd.workoffice.bean.mesBean.ChooseMachineBean
;
import
com.wd.workoffice.bean.mesBean.ChooseMachineBean
;
import
com.wd.workoffice.bean.mesBean.DefectBean
;
import
com.wd.workoffice.bean.mesBean.DefectBean
;
import
com.wd.workoffice.bean.mesBean.FeedbackBean
;
import
com.wd.workoffice.bean.mesBean.FeedbackBean
;
import
com.wd.workoffice.bean.mesBean.JobTypeBean
;
import
com.wd.workoffice.bean.mesBean.MesClientBean
;
import
com.wd.workoffice.bean.mesBean.MesClientBean
;
import
com.wd.workoffice.bean.mesBean.TakeOnBean
;
import
com.wd.workoffice.bean.mesBean.TicketBean
;
import
com.wd.workoffice.bean.workEnum.OrderType
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.ui.activity.mes.ticket.MesTicketClientActivity
;
import
com.wd.workoffice.ui.activity.mes.ticket.MesTicketClientActivity
;
...
@@ -84,6 +81,14 @@ public class MesQualityAddActivity extends WorkToolBarActivity {
...
@@ -84,6 +81,14 @@ public class MesQualityAddActivity extends WorkToolBarActivity {
RelativeLayout
rlDefect
;
RelativeLayout
rlDefect
;
@BindView
(
R
.
id
.
et_desc
)
@BindView
(
R
.
id
.
et_desc
)
TextView
etDesc
;
TextView
etDesc
;
@BindView
(
R
.
id
.
btn_add
)
Button
btnAdd
;
@BindView
(
R
.
id
.
btn_submit
)
Button
btnSubmit
;
@BindView
(
R
.
id
.
ll_bottom
)
LinearLayout
llBottom
;
@BindView
(
R
.
id
.
rl_machine
)
RelativeLayout
rlMachine
;
private
MesClientBean
.
ListBean
chooseClient
;
private
MesClientBean
.
ListBean
chooseClient
;
private
ChooseMachineBean
chooseMachine
;
private
ChooseMachineBean
chooseMachine
;
private
Map
<
String
,
Object
>
param
;
private
Map
<
String
,
Object
>
param
;
...
@@ -102,6 +107,7 @@ public class MesQualityAddActivity extends WorkToolBarActivity {
...
@@ -102,6 +107,7 @@ public class MesQualityAddActivity extends WorkToolBarActivity {
String
data
=
getIntent
().
getStringExtra
(
"data"
);
String
data
=
getIntent
().
getStringExtra
(
"data"
);
if
(!
TextUtils
.
isEmpty
(
data
))
{
if
(!
TextUtils
.
isEmpty
(
data
))
{
FeedbackBean
.
ListBean
ticketBean
=
JSON
.
parseObject
(
data
,
FeedbackBean
.
ListBean
.
class
);
FeedbackBean
.
ListBean
ticketBean
=
JSON
.
parseObject
(
data
,
FeedbackBean
.
ListBean
.
class
);
param
.
put
(
"id"
,
ticketBean
.
getId
());
chooseClient
=
new
MesClientBean
.
ListBean
();
chooseClient
=
new
MesClientBean
.
ListBean
();
chooseClient
.
setCustomerCode
(
ticketBean
.
getCustomerId
());
chooseClient
.
setCustomerCode
(
ticketBean
.
getCustomerId
());
chooseClient
.
setCustomerName
(
ticketBean
.
getCustomerName
());
chooseClient
.
setCustomerName
(
ticketBean
.
getCustomerName
());
...
@@ -161,6 +167,11 @@ public class MesQualityAddActivity extends WorkToolBarActivity {
...
@@ -161,6 +167,11 @@ public class MesQualityAddActivity extends WorkToolBarActivity {
param
.
put
(
"defectCode"
,
chooseDefect
.
getDefectCode
());
param
.
put
(
"defectCode"
,
chooseDefect
.
getDefectCode
());
param
.
put
(
"defectName"
,
chooseDefect
.
getDefectName
());
param
.
put
(
"defectName"
,
chooseDefect
.
getDefectName
());
}
}
if
(
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"data"
)))
{
btnAdd
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
btnSubmit
.
setVisibility
(
View
.
VISIBLE
);
}
}
}
...
@@ -174,9 +185,32 @@ public class MesQualityAddActivity extends WorkToolBarActivity {
...
@@ -174,9 +185,32 @@ public class MesQualityAddActivity extends WorkToolBarActivity {
}
}
@OnClick
({
R
.
id
.
rl_machine
,
R
.
id
.
rl_client
,
R
.
id
.
rl_box
,
R
.
id
.
rl_defect
})
@OnClick
({
R
.
id
.
btn_add
,
R
.
id
.
btn_submit
,
R
.
id
.
rl_machine
,
R
.
id
.
rl_client
,
R
.
id
.
rl_box
,
R
.
id
.
rl_defect
})
public
void
onViewClicked
(
View
view
)
{
public
void
onViewClicked
(
View
view
)
{
switch
(
view
.
getId
())
{
switch
(
view
.
getId
())
{
case
R
.
id
.
btn_add
:
submit
();
break
;
case
R
.
id
.
btn_submit
:
if
(
chooseClient
==
null
)
{
toast
(
"请先选择客户"
);
break
;
}
if
(
chooseMachine
==
null
)
{
toast
(
"请先选择连铸机"
);
break
;
}
if
(
chooseBox
==
null
)
{
toast
(
"请先选择箱号"
);
break
;
}
if
(
chooseDefect
==
null
)
{
toast
(
"请先选择缺陷"
);
break
;
}
// param.put("", "");
submit
();
break
;
case
R
.
id
.
rl_client
:
case
R
.
id
.
rl_client
:
startActivityForResult
(
MesTicketClientActivity
.
class
,
startActivityForResult
(
MesTicketClientActivity
.
class
,
10001
);
10001
);
...
@@ -279,7 +313,6 @@ public class MesQualityAddActivity extends WorkToolBarActivity {
...
@@ -279,7 +313,6 @@ public class MesQualityAddActivity extends WorkToolBarActivity {
toast
(
"请先选择缺陷"
);
toast
(
"请先选择缺陷"
);
break
;
break
;
}
}
// param.put("", "");
submit
();
submit
();
break
;
break
;
case
R
.
id
.
save
:
case
R
.
id
.
save
:
...
@@ -290,14 +323,12 @@ public class MesQualityAddActivity extends WorkToolBarActivity {
...
@@ -290,14 +323,12 @@ public class MesQualityAddActivity extends WorkToolBarActivity {
}
}
private
void
submit
()
{
private
void
submit
()
{
Observable
<
BaseMesBean
>
observable
;
Observable
<
BaseMesBean
>
observable
;
if
(
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"data"
)))
{
if
(
TextUtils
.
isEmpty
(
getIntent
().
getStringExtra
(
"data"
)))
{
param
.
put
(
"status"
,
"
2
"
);
param
.
put
(
"status"
,
"
1
"
);
observable
=
RtfUtils
.
getMesRtf
().
feedbackAdd
(
"1"
,
WorkUtils
.
convertMapToBody
(
param
));
observable
=
RtfUtils
.
getMesRtf
().
feedbackAdd
(
"1"
,
WorkUtils
.
convertMapToBody
(
param
));
}
else
{
}
else
{
param
.
put
(
"status"
,
"1"
);
observable
=
RtfUtils
.
getMesRtf
().
startFeedback
(
"6628708f85d111ea8334fa163e1166bd"
,
WorkUtils
.
convertMapToBody
(
param
));
observable
=
RtfUtils
.
getMesRtf
().
feedbackUpdate
(
"1"
,
WorkUtils
.
convertMapToBody
(
param
));
}
}
observable
.
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseMesBean
>()
{
observable
.
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseMesBean
>()
{
@Override
@Override
...
...
app/src/main/java/com/wd/workoffice/ui/activity/mes/quality/MesQualityClientActivity.java
浏览文件 @
70aff204
...
@@ -16,6 +16,8 @@ import com.wd.workoffice.bean.mesBean.FeedbackDetailBean;
...
@@ -16,6 +16,8 @@ import com.wd.workoffice.bean.mesBean.FeedbackDetailBean;
import
com.wd.workoffice.bean.mesBean.ManagerUserBean
;
import
com.wd.workoffice.bean.mesBean.ManagerUserBean
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.util.DataKeeper
;
import
com.wd.workoffice.util.UserKeeper
;
import
com.wd.workoffice.util.WorkUtils
;
import
com.wd.workoffice.util.WorkUtils
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.EventBus
;
...
@@ -59,7 +61,7 @@ public class MesQualityClientActivity extends WorkToolBarActivity {
...
@@ -59,7 +61,7 @@ public class MesQualityClientActivity extends WorkToolBarActivity {
param
=
WorkUtils
.
simpleParam
();
param
=
WorkUtils
.
simpleParam
();
FeedbackDetailBean
data
=
JSON
.
parseObject
(
getIntent
().
getStringExtra
(
"data"
),
FeedbackDetailBean
.
class
);
FeedbackDetailBean
data
=
JSON
.
parseObject
(
getIntent
().
getStringExtra
(
"data"
),
FeedbackDetailBean
.
class
);
param
.
put
(
"id"
,
data
.
getId
());
param
.
put
(
"id"
,
data
.
getId
());
param
.
put
(
"
status"
,
4
);
param
.
put
(
"
procId"
,
data
.
getProcId
()
);
}
}
private
void
submit
()
{
private
void
submit
()
{
...
@@ -67,7 +69,7 @@ public class MesQualityClientActivity extends WorkToolBarActivity {
...
@@ -67,7 +69,7 @@ public class MesQualityClientActivity extends WorkToolBarActivity {
param
.
put
(
"customerResponse"
,
tvClientReply
.
getText
().
toString
());
param
.
put
(
"customerResponse"
,
tvClientReply
.
getText
().
toString
());
param
.
put
(
"relatedRecord"
,
tvClientRecord
.
getText
().
toString
());
param
.
put
(
"relatedRecord"
,
tvClientRecord
.
getText
().
toString
());
RtfUtils
.
getMesRtf
().
feedbackCheck
(
"1"
,
WorkUtils
.
convertMapToBody
(
param
)).
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseMesBean
>()
{
RtfUtils
.
getMesRtf
().
startFeedback
(
DataKeeper
.
getInstance
().
getMenuId
()
,
WorkUtils
.
convertMapToBody
(
param
)).
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseMesBean
>()
{
@Override
@Override
public
void
doOnSubscribe
(
Disposable
d
)
{
public
void
doOnSubscribe
(
Disposable
d
)
{
}
}
...
...
app/src/main/java/com/wd/workoffice/ui/activity/mes/quality/MesQualityDetailActivity.java
浏览文件 @
70aff204
package
com
.
wd
.
workoffice
.
ui
.
activity
.
mes
.
quality
;
package
com
.
wd
.
workoffice
.
ui
.
activity
.
mes
.
quality
;
import
android.os.Bundle
;
import
android.view.View
;
import
android.view.View
;
import
android.widget.Button
;
import
android.widget.Button
;
import
android.widget.LinearLayout
;
import
android.widget.LinearLayout
;
...
@@ -15,12 +16,14 @@ import com.wd.workoffice.bean.mesBean.ImageBean;
...
@@ -15,12 +16,14 @@ import com.wd.workoffice.bean.mesBean.ImageBean;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.ui.adapter.ImgAdapter
;
import
com.wd.workoffice.ui.adapter.ImgAdapter
;
import
com.wd.workoffice.util.WorkUtils
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.Subscribe
;
import
org.greenrobot.eventbus.Subscribe
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
androidx.recyclerview.widget.GridLayoutManager
;
import
androidx.recyclerview.widget.GridLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
androidx.recyclerview.widget.RecyclerView
;
...
@@ -109,9 +112,12 @@ public class MesQualityDetailActivity extends WorkToolBarActivity {
...
@@ -109,9 +112,12 @@ public class MesQualityDetailActivity extends WorkToolBarActivity {
TextView
tvClientPerson
;
TextView
tvClientPerson
;
@BindView
(
R
.
id
.
ll_client
)
@BindView
(
R
.
id
.
ll_client
)
LinearLayout
llClient
;
LinearLayout
llClient
;
@BindView
(
R
.
id
.
btn_refuse
)
Button
btnRefuse
;
private
FeedbackDetailBean
detailBean
;
private
FeedbackDetailBean
detailBean
;
private
List
<
ImageBean
>
imgList
;
private
List
<
ImageBean
>
imgList
;
private
ImgAdapter
imgAdapter
;
private
ImgAdapter
imgAdapter
;
@Override
@Override
protected
void
initView
()
{
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
ButterKnife
.
bind
(
this
);
...
@@ -159,12 +165,20 @@ public class MesQualityDetailActivity extends WorkToolBarActivity {
...
@@ -159,12 +165,20 @@ public class MesQualityDetailActivity extends WorkToolBarActivity {
imgList
.
addAll
(
detailBean
.
getAttachments
());
imgList
.
addAll
(
detailBean
.
getAttachments
());
imgAdapter
.
notifyDataSetChanged
();
imgAdapter
.
notifyDataSetChanged
();
switch
(
detailBean
.
getStatus
())
{
switch
(
detailBean
.
getStatus
())
{
// case "1":
// llClient.setVisibility(View.GONE);
// llCompany.setVisibility(View.GONE);
// llManager.setVisibility(View.GONE);
// llBottom.setVisibility(View.VISIBLE);
// btnSubmit.setVisibility(View.VISIBLE);
// break;
case
"2"
:
case
"2"
:
llClient
.
setVisibility
(
View
.
GONE
);
llClient
.
setVisibility
(
View
.
GONE
);
llCompany
.
setVisibility
(
View
.
GONE
);
llCompany
.
setVisibility
(
View
.
GONE
);
llManager
.
setVisibility
(
View
.
GONE
);
llManager
.
setVisibility
(
View
.
GONE
);
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llBottom
.
setVisibility
(
View
.
VISIBLE
);
btnReviews
.
setVisibility
(
View
.
VISIBLE
);
btnReviews
.
setVisibility
(
View
.
VISIBLE
);
btnRefuse
.
setVisibility
(
View
.
VISIBLE
);
break
;
break
;
case
"3"
:
case
"3"
:
llClient
.
setVisibility
(
View
.
GONE
);
llClient
.
setVisibility
(
View
.
GONE
);
...
@@ -177,6 +191,8 @@ public class MesQualityDetailActivity extends WorkToolBarActivity {
...
@@ -177,6 +191,8 @@ public class MesQualityDetailActivity extends WorkToolBarActivity {
llCompany
.
setVisibility
(
View
.
GONE
);
llCompany
.
setVisibility
(
View
.
GONE
);
llManager
.
setVisibility
(
View
.
GONE
);
llManager
.
setVisibility
(
View
.
GONE
);
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llBottom
.
setVisibility
(
View
.
VISIBLE
);
btnReviews
.
setVisibility
(
View
.
VISIBLE
);
btnRefuse
.
setVisibility
(
View
.
GONE
);
break
;
break
;
case
"5"
:
case
"5"
:
llClient
.
setVisibility
(
View
.
GONE
);
llClient
.
setVisibility
(
View
.
GONE
);
...
@@ -242,24 +258,7 @@ public class MesQualityDetailActivity extends WorkToolBarActivity {
...
@@ -242,24 +258,7 @@ public class MesQualityDetailActivity extends WorkToolBarActivity {
}
}
@OnClick
(
R
.
id
.
btn_reviews
)
public
void
onViewClicked
()
{
switch
(
detailBean
.
getStatus
())
{
//1 待提交、2 待审批、3 已驳回、4 待质量部分析、 5 待相关部门反馈、6 待关闭、7 已关闭
case
"1"
:
startActivity
(
MesQualityManagerActivity
.
class
,
"data"
,
JSON
.
toJSONString
(
detailBean
));
break
;
case
"4"
:
startActivity
(
MesQualityFactoryActivity
.
class
,
"data"
,
JSON
.
toJSONString
(
detailBean
));
break
;
case
"5"
:
startActivity
(
MesQualityFactoryActivity
.
class
,
"data"
,
JSON
.
toJSONString
(
detailBean
));
break
;
case
"6"
:
startActivity
(
MesQualityClientActivity
.
class
,
"data"
,
JSON
.
toJSONString
(
detailBean
));
break
;
}
}
@Override
@Override
public
void
onStart
()
{
public
void
onStart
()
{
super
.
onStart
();
super
.
onStart
();
...
@@ -274,6 +273,65 @@ public class MesQualityDetailActivity extends WorkToolBarActivity {
...
@@ -274,6 +273,65 @@ public class MesQualityDetailActivity extends WorkToolBarActivity {
@Subscribe
@Subscribe
public
void
refresh
(
CheckFeedbackEvent
event
)
{
public
void
refresh
(
CheckFeedbackEvent
event
)
{
finish
();
finish
();
}
@OnClick
({
R
.
id
.
btn_refuse
,
R
.
id
.
btn_reviews
})
public
void
onViewClicked
(
View
view
)
{
switch
(
view
.
getId
())
{
case
R
.
id
.
btn_refuse
:
check
(
1
);
break
;
case
R
.
id
.
btn_reviews
:
switch
(
detailBean
.
getStatus
())
{
//1 待提交、2 待审批、3 已驳回、4 待质量部分析、 5 待相关部门反馈、6 待关闭、7 已关闭
case
"2"
:
check
(
0
);
break
;
case
"4"
:
startActivity
(
MesQualityManagerActivity
.
class
,
"data"
,
JSON
.
toJSONString
(
detailBean
));
break
;
case
"5"
:
startActivity
(
MesQualityFactoryActivity
.
class
,
"data"
,
JSON
.
toJSONString
(
detailBean
));
break
;
case
"6"
:
startActivity
(
MesQualityClientActivity
.
class
,
"data"
,
JSON
.
toJSONString
(
detailBean
));
break
;
}
break
;
}
}
private
void
check
(
int
status
)
{
// 0 同意 1 拒绝
Map
<
String
,
Object
>
param
=
WorkUtils
.
simpleParam
();
param
.
put
(
"approved"
,
status
);
param
.
put
(
"id"
,
detailBean
.
getId
());
param
.
put
(
"procId"
,
detailBean
.
getProcId
());
RtfUtils
.
getMesRtf
().
feedbackApproved
(
"1"
,
WorkUtils
.
convertMapToBody
(
param
)).
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseMesBean
>()
{
@Override
public
void
doOnSubscribe
(
Disposable
d
)
{
}
@Override
public
void
onFail
(
String
errorMsg
)
{
hideLoading
();
toast
(
errorMsg
);
}
@Override
public
void
onSuccess
(
BaseMesBean
data
)
{
hideLoading
();
if
(!
data
.
isSuccess
())
{
toast
(
data
.
getMessage
());
return
;
}
toast
(
"提交成功 "
);
detail
();
}
});
}
}
}
}
app/src/main/java/com/wd/workoffice/ui/activity/mes/quality/MesQualityFactoryActivity.java
浏览文件 @
70aff204
...
@@ -20,7 +20,9 @@ import com.wd.workoffice.bean.mesBean.MesProcessBean;
...
@@ -20,7 +20,9 @@ import com.wd.workoffice.bean.mesBean.MesProcessBean;
import
com.wd.workoffice.bean.mesBean.QuestionBean
;
import
com.wd.workoffice.bean.mesBean.QuestionBean
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.util.DataKeeper
;
import
com.wd.workoffice.util.PickTimeUtils
;
import
com.wd.workoffice.util.PickTimeUtils
;
import
com.wd.workoffice.util.UserKeeper
;
import
com.wd.workoffice.util.WorkUtils
;
import
com.wd.workoffice.util.WorkUtils
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.EventBus
;
...
@@ -43,8 +45,6 @@ import io.reactivex.disposables.Disposable;
...
@@ -43,8 +45,6 @@ import io.reactivex.disposables.Disposable;
* github: https://github.com/FlexibleXd
* github: https://github.com/FlexibleXd
**/
**/
public
class
MesQualityFactoryActivity
extends
WorkToolBarActivity
{
public
class
MesQualityFactoryActivity
extends
WorkToolBarActivity
{
@BindView
(
R
.
id
.
tv_factory_reason
)
@BindView
(
R
.
id
.
tv_factory_reason
)
EditText
tvFactoryReason
;
EditText
tvFactoryReason
;
@BindView
(
R
.
id
.
tv_factory_suggest
)
@BindView
(
R
.
id
.
tv_factory_suggest
)
...
@@ -85,7 +85,8 @@ public class MesQualityFactoryActivity extends WorkToolBarActivity {
...
@@ -85,7 +85,8 @@ public class MesQualityFactoryActivity extends WorkToolBarActivity {
param
=
WorkUtils
.
simpleParam
();
param
=
WorkUtils
.
simpleParam
();
data
=
JSON
.
parseObject
(
getIntent
().
getStringExtra
(
"data"
),
FeedbackDetailBean
.
class
);
data
=
JSON
.
parseObject
(
getIntent
().
getStringExtra
(
"data"
),
FeedbackDetailBean
.
class
);
param
.
put
(
"id"
,
data
.
getId
());
param
.
put
(
"id"
,
data
.
getId
());
param
.
put
(
"status"
,
3
);
param
.
put
(
"procId"
,
data
.
getProcId
());
// param.put("status",3);
}
}
private
void
submit
()
{
private
void
submit
()
{
...
@@ -97,7 +98,7 @@ public class MesQualityFactoryActivity extends WorkToolBarActivity {
...
@@ -97,7 +98,7 @@ public class MesQualityFactoryActivity extends WorkToolBarActivity {
param
.
put
(
"factoryAnalysis"
,
tvFactoryReason
.
getText
().
toString
());
param
.
put
(
"factoryAnalysis"
,
tvFactoryReason
.
getText
().
toString
());
param
.
put
(
"factoryImplement"
,
tvFactoryStatus
.
getText
().
toString
());
param
.
put
(
"factoryImplement"
,
tvFactoryStatus
.
getText
().
toString
());
param
.
put
(
"factoryLeaderOpinion"
,
tvFactorySuggest
.
getText
().
toString
());
param
.
put
(
"factoryLeaderOpinion"
,
tvFactorySuggest
.
getText
().
toString
());
RtfUtils
.
getMesRtf
().
feedbackCheck
(
"1"
,
WorkUtils
.
convertMapToBody
(
param
)).
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseMesBean
>()
{
RtfUtils
.
getMesRtf
().
startFeedback
(
DataKeeper
.
getInstance
().
getMenuId
()
,
WorkUtils
.
convertMapToBody
(
param
)).
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseMesBean
>()
{
@Override
@Override
public
void
doOnSubscribe
(
Disposable
d
)
{
public
void
doOnSubscribe
(
Disposable
d
)
{
}
}
...
...
app/src/main/java/com/wd/workoffice/ui/activity/mes/quality/MesQualityManagerActivity.java
浏览文件 @
70aff204
...
@@ -21,6 +21,7 @@ import com.wd.workoffice.bean.mesBean.ImageBean;
...
@@ -21,6 +21,7 @@ import com.wd.workoffice.bean.mesBean.ImageBean;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.ui.adapter.ImgAddAdapter
;
import
com.wd.workoffice.ui.adapter.ImgAddAdapter
;
import
com.wd.workoffice.util.DataKeeper
;
import
com.wd.workoffice.util.Glide4Engine
;
import
com.wd.workoffice.util.Glide4Engine
;
import
com.wd.workoffice.util.WorkUtils
;
import
com.wd.workoffice.util.WorkUtils
;
import
com.zhihu.matisse.Matisse
;
import
com.zhihu.matisse.Matisse
;
...
@@ -77,7 +78,7 @@ public class MesQualityManagerActivity extends WorkToolBarActivity {
...
@@ -77,7 +78,7 @@ public class MesQualityManagerActivity extends WorkToolBarActivity {
param
=
WorkUtils
.
simpleParam
();
param
=
WorkUtils
.
simpleParam
();
FeedbackDetailBean
data
=
JSON
.
parseObject
(
getIntent
().
getStringExtra
(
"data"
),
FeedbackDetailBean
.
class
);
FeedbackDetailBean
data
=
JSON
.
parseObject
(
getIntent
().
getStringExtra
(
"data"
),
FeedbackDetailBean
.
class
);
param
.
put
(
"id"
,
data
.
getId
());
param
.
put
(
"id"
,
data
.
getId
());
param
.
put
(
"
status"
,
2
);
param
.
put
(
"
procId"
,
data
.
getProcId
()
);
imgList
=
new
ArrayList
<>();
imgList
=
new
ArrayList
<>();
ImageBean
imageBean
=
new
ImageBean
();
ImageBean
imageBean
=
new
ImageBean
();
imageBean
.
setUri
(
null
);
imageBean
.
setUri
(
null
);
...
@@ -95,7 +96,7 @@ public class MesQualityManagerActivity extends WorkToolBarActivity {
...
@@ -95,7 +96,7 @@ public class MesQualityManagerActivity extends WorkToolBarActivity {
uploadImg
.
add
(
imgList
.
get
(
i
));
uploadImg
.
add
(
imgList
.
get
(
i
));
}
}
param
.
put
(
"attachments"
,
uploadImg
);
param
.
put
(
"attachments"
,
uploadImg
);
RtfUtils
.
getMesRtf
().
feedbackCheck
(
"1"
,
WorkUtils
.
convertMapToBody
(
param
)).
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseMesBean
>()
{
RtfUtils
.
getMesRtf
().
startFeedback
(
DataKeeper
.
getInstance
().
getMenuId
()
,
WorkUtils
.
convertMapToBody
(
param
)).
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseMesBean
>()
{
@Override
@Override
public
void
doOnSubscribe
(
Disposable
d
)
{
public
void
doOnSubscribe
(
Disposable
d
)
{
}
}
...
...
app/src/main/java/com/wd/workoffice/ui/activity/user/UserSettingActivity.java
浏览文件 @
70aff204
...
@@ -19,6 +19,7 @@ import com.wd.workoffice.retrofit.WorkObserver;
...
@@ -19,6 +19,7 @@ import com.wd.workoffice.retrofit.WorkObserver;
import
com.wd.workoffice.ui.activity.MainActivity
;
import
com.wd.workoffice.ui.activity.MainActivity
;
import
com.wd.workoffice.ui.activity.MainLoginActivity
;
import
com.wd.workoffice.ui.activity.MainLoginActivity
;
import
com.wd.workoffice.ui.activity.login.LoginActivity
;
import
com.wd.workoffice.ui.activity.login.LoginActivity
;
import
com.wd.workoffice.util.DataKeeper
;
import
com.wd.workoffice.util.UserKeeper
;
import
com.wd.workoffice.util.UserKeeper
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.EventBus
;
...
@@ -99,6 +100,7 @@ public class UserSettingActivity extends WorkToolBarActivity {
...
@@ -99,6 +100,7 @@ public class UserSettingActivity extends WorkToolBarActivity {
Intent
intent
=
new
Intent
(
UserSettingActivity
.
this
,
MainLoginActivity
.
class
);
Intent
intent
=
new
Intent
(
UserSettingActivity
.
this
,
MainLoginActivity
.
class
);
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_CLEAR_TASK
);
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_CLEAR_TASK
);
UserKeeper
.
getInstance
().
clearAll
();
UserKeeper
.
getInstance
().
clearAll
();
DataKeeper
.
getInstance
().
clearAll
();
EventBus
.
getDefault
().
post
(
new
LoginEvent
());
EventBus
.
getDefault
().
post
(
new
LoginEvent
());
startActivity
(
intent
);
startActivity
(
intent
);
// RtfUtils.getRtf().logout().compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
// RtfUtils.getRtf().logout().compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
...
...
app/src/main/java/com/wd/workoffice/util/DataKeeper.java
0 → 100644
浏览文件 @
70aff204
package
com
.
wd
.
workoffice
.
util
;
import
android.text.TextUtils
;
import
com.alibaba.fastjson.JSON
;
import
com.wd.workoffice.bean.TokenBean
;
import
com.wd.workoffice.bean.UserInfoBean
;
import
java.util.List
;
import
flexible.xd.android_base.utils.SPUtils
;
/**
* Created by Flexible on 2017/1/9 0009.
*/
public
class
DataKeeper
{
private
volatile
static
DataKeeper
keeper
;
private
SPUtils
sp
=
SPUtils
.
getInstance
(
"DataKeeper"
);
private
final
String
MES_MENU_ID
=
"MES_MENU_ID"
;
private
DataKeeper
()
{
}
public
static
DataKeeper
getInstance
()
{
if
(
keeper
==
null
)
{
synchronized
(
DataKeeper
.
class
)
{
if
(
keeper
==
null
)
{
keeper
=
new
DataKeeper
();
}
}
}
return
keeper
;
}
/**
* mes菜单id
*
* @param info
*/
public
void
keepMenuId
(
String
info
)
{
sp
.
put
(
MES_MENU_ID
,
info
);
}
public
String
getMenuId
()
{
return
sp
.
getString
(
MES_MENU_ID
);
}
public
void
clearMenuId
()
{
sp
.
put
(
MES_MENU_ID
,
false
);
}
public
void
clearAll
()
{
clearMenuId
();
}
}
app/src/main/java/com/wd/workoffice/util/WorkUtils.java
浏览文件 @
70aff204
...
@@ -16,14 +16,18 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -16,14 +16,18 @@ import com.alibaba.fastjson.JSONObject;
import
com.bumptech.glide.load.ImageHeaderParser
;
import
com.bumptech.glide.load.ImageHeaderParser
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.BaseMesBean
;
import
com.wd.workoffice.app.Config
;
import
com.wd.workoffice.app.Config
;
import
com.wd.workoffice.app.WorkApp
;
import
com.wd.workoffice.app.WorkApp
;
import
com.wd.workoffice.bean.event.CheckFeedbackEvent
;
import
com.wd.workoffice.bean.event.RefreshTokenEvent
;
import
com.wd.workoffice.bean.event.RefreshTokenEvent
;
import
com.wd.workoffice.bean.mesBean.MenuBean
;
import
com.wd.workoffice.bean.workEnum.OrderType
;
import
com.wd.workoffice.bean.workEnum.OrderType
;
import
com.wd.workoffice.bean.workEnum.PagePermissionType
;
import
com.wd.workoffice.bean.workEnum.PagePermissionType
;
import
com.wd.workoffice.bean.workEnum.PermissionType
;
import
com.wd.workoffice.bean.workEnum.PermissionType
;
import
com.wd.workoffice.retrofit.ApiService
;
import
com.wd.workoffice.retrofit.ApiService
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.ui.adapter.StarAdapter
;
import
com.wd.workoffice.ui.adapter.StarAdapter
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.EventBus
;
...
@@ -39,6 +43,8 @@ import java.util.Map;
...
@@ -39,6 +43,8 @@ import java.util.Map;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
androidx.recyclerview.widget.RecyclerView
;
import
flexible.xd.android_base.network.rtfhttp.RtfHelper
;
import
flexible.xd.android_base.network.rtfhttp.RtfHelper
;
import
flexible.xd.android_base.network.rtfhttp.Transformer
;
import
io.reactivex.disposables.Disposable
;
import
okhttp3.MediaType
;
import
okhttp3.MediaType
;
import
okhttp3.RequestBody
;
import
okhttp3.RequestBody
;
import
retrofit2.Call
;
import
retrofit2.Call
;
...
@@ -436,6 +442,41 @@ public class WorkUtils {
...
@@ -436,6 +442,41 @@ public class WorkUtils {
});
});
}
}
/**
* 刷新token
*
* @return
*/
public
static
void
getMesMenu
()
{
RtfUtils
.
getMesRtf
().
feedbackMenu
().
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseMesBean
>()
{
@Override
public
void
doOnSubscribe
(
Disposable
d
)
{
}
@Override
public
void
onFail
(
String
errorMsg
)
{
}
@Override
public
void
onSuccess
(
BaseMesBean
data
)
{
if
(!
data
.
isSuccess
())
{
return
;
}
List
<
MenuBean
>
menuList
=
JSON
.
parseArray
(
data
.
getData
().
toString
(),
MenuBean
.
class
);
for
(
MenuBean
menuBean
:
menuList
)
{
if
(
TextUtils
.
equals
(
"市场服务"
,
menuBean
.
getText
())){
for
(
MenuBean
.
NodesBean
node
:
menuBean
.
getNodes
())
{
if
(
TextUtils
.
equals
(
"质量反馈"
,
node
.
getText
())){
DataKeeper
.
getInstance
().
keepMenuId
(
node
.
getId
());
}
}
}
}
}
});
}
/**
/**
* 判断是否拥有权限
* 判断是否拥有权限
*
*
...
...
app/src/main/res/layout/activity_mes_quality_add.xml
浏览文件 @
70aff204
差异被折叠。
点击展开。
app/src/main/res/layout/activity_mes_quality_detail.xml
浏览文件 @
70aff204
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
android:layout_height=
"wrap_content"
>
...
@@ -20,8 +19,8 @@
...
@@ -20,8 +19,8 @@
android:background=
"@drawable/shape_red_circle"
android:background=
"@drawable/shape_red_circle"
android:paddingHorizontal=
"40mm"
android:paddingHorizontal=
"40mm"
android:text=
"驳回"
android:text=
"驳回"
android:
visibility=
"gon
e"
android:
textColor=
"@color/whit
e"
android:
textColor=
"@color/whit
e"
/>
android:
visibility=
"gon
e"
/>
<Button
<Button
android:id=
"@+id/btn_reviews"
android:id=
"@+id/btn_reviews"
...
@@ -32,6 +31,7 @@
...
@@ -32,6 +31,7 @@
android:paddingHorizontal=
"40mm"
android:paddingHorizontal=
"40mm"
android:text=
"通过"
android:text=
"通过"
android:textColor=
"@color/white"
/>
android:textColor=
"@color/white"
/>
</LinearLayout>
</LinearLayout>
<androidx.core.widget.NestedScrollView
xmlns:android=
"http://schemas.android.com/apk/res/android"
<androidx.core.widget.NestedScrollView
xmlns:android=
"http://schemas.android.com/apk/res/android"
...
@@ -39,7 +39,8 @@
...
@@ -39,7 +39,8 @@
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_above=
"@id/ll_bottom"
>
android:layout_above=
"@id/ll_bottom"
>
<LinearLayout
android:layout_width=
"match_parent"
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
android:background=
"@color/white"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
...
@@ -695,11 +696,11 @@
...
@@ -695,11 +696,11 @@
<View
style=
"@style/dividerX"
/>
<View
style=
"@style/dividerX"
/>
<RelativeLayout
<RelativeLayout
android:visibility=
"gone"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingHorizontal=
"20mm"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"9mm"
>
android:paddingVertical=
"9mm"
android:visibility=
"gone"
>
<TextView
<TextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
...
@@ -722,11 +723,11 @@
...
@@ -722,11 +723,11 @@
<View
style=
"@style/dividerX"
/>
<View
style=
"@style/dividerX"
/>
<RelativeLayout
<RelativeLayout
android:visibility=
"gone"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingHorizontal=
"20mm"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"9mm"
>
android:paddingVertical=
"9mm"
android:visibility=
"gone"
>
<TextView
<TextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论