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
876917f2
提交
876917f2
authored
8月 23, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.质量工单列表-详情工单
2.TODO 单独菜单
上级
3c1c355d
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
616 行增加
和
73 行删除
+616
-73
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+8
-1
OpmreportErrorBean.java
...va/com/wd/workoffice/bean/mesBean/OpmreportErrorBean.java
+0
-0
WokrOrderBean.java
...in/java/com/wd/workoffice/bean/mesBean/WokrOrderBean.java
+63
-63
MesApiService.java
...c/main/java/com/wd/workoffice/retrofit/MesApiService.java
+7
-0
QualityWorkActivity.java
.../workoffice/ui/activity/mes/work/QualityWorkActivity.java
+4
-9
QualityWorkFragment.java
.../workoffice/ui/activity/mes/work/QualityWorkFragment.java
+250
-0
WorkOrderDetailActivity.java
...koffice/ui/activity/mes/work/WorkOrderDetailActivity.java
+79
-0
WorkOrderErrorAdapter.java
...a/com/wd/workoffice/ui/adapter/WorkOrderErrorAdapter.java
+34
-0
fg_work_order_detail.xml
app/src/main/res/layout/fg_work_order_detail.xml
+0
-0
item_work_order_error.xml
app/src/main/res/layout/item_work_order_error.xml
+171
-0
没有找到文件。
app/src/main/AndroidManifest.xml
浏览文件 @
876917f2
...
...
@@ -2474,7 +2474,14 @@
android:screenOrientation=
"portrait"
android:theme=
"@style/Work.Base"
android:windowSoftInputMode=
"adjustPan"
/>
<activity
android:name=
".ui.activity.mes.work.WorkOrderDetailActivity"
android:configChanges=
"orientation|screenSize|keyboardHidden"
android:label=
"设备工单详情"
android:launchMode=
"singleTop"
android:screenOrientation=
"portrait"
android:theme=
"@style/Work.Base"
android:windowSoftInputMode=
"adjustPan"
/>
<provider
android:name=
"androidx.core.content.FileProvider"
...
...
app/src/main/java/com/wd/workoffice/bean/mesBean/OpmreportErrorBean.java
0 → 100644
浏览文件 @
876917f2
差异被折叠。
点击展开。
app/src/main/java/com/wd/workoffice/bean/mesBean/WokrOrderBean.java
浏览文件 @
876917f2
...
...
@@ -80,46 +80,46 @@ public class WokrOrderBean extends BaseMesPageBean {
private
String
woCode
;
private
String
description
;
private
String
locationId
;
private
Object
assetId
;
private
Object
parentId
;
private
Object
failureCodeId
;
private
Object
questionId
;
private
String
assetId
;
private
String
parentId
;
private
String
failureCodeId
;
private
String
questionId
;
private
int
workType
;
private
int
woType
;
private
int
status
;
private
String
siteId
;
private
boolean
shutDown
;
private
Object
shutdownTime
;
private
Object
recoveryTime
;
private
String
shutdownTime
;
private
String
recoveryTime
;
private
boolean
grant
;
private
boolean
materiel
;
private
String
detailedInformation
;
private
Object
schedStart
;
private
Object
schedFinish
;
private
Object
actStart
;
private
Object
actFinish
;
private
Object
pmCode
;
private
Object
standardOperation
;
private
long
schedStart
;
private
long
schedFinish
;
private
long
actStart
;
private
long
actFinish
;
private
String
pmCode
;
private
String
standardOperation
;
private
boolean
delete
;
private
String
createBy
;
private
String
changeBy
;
private
Object
failureCode
;
private
Object
failureName
;
private
Object
questionCode
;
private
Object
questionName
;
private
Object
parentCode
;
private
Object
parentName
;
private
String
failureCode
;
private
String
failureName
;
private
String
questionCode
;
private
String
questionName
;
private
String
parentCode
;
private
String
parentName
;
private
String
locationCode
;
private
String
locationName
;
private
Object
assetCode
;
private
Object
assetName
;
private
String
assetCode
;
private
String
assetName
;
private
String
siteCode
;
private
String
siteName
;
private
String
linkedNumberId
;
private
String
linkedNumber
;
private
String
createName
;
private
String
procId
;
private
Object
approved
;
private
String
approved
;
public
String
getId
()
{
return
id
;
...
...
@@ -169,35 +169,35 @@ public class WokrOrderBean extends BaseMesPageBean {
this
.
locationId
=
locationId
;
}
public
Object
getAssetId
()
{
public
String
getAssetId
()
{
return
assetId
;
}
public
void
setAssetId
(
Object
assetId
)
{
public
void
setAssetId
(
String
assetId
)
{
this
.
assetId
=
assetId
;
}
public
Object
getParentId
()
{
public
String
getParentId
()
{
return
parentId
;
}
public
void
setParentId
(
Object
parentId
)
{
public
void
setParentId
(
String
parentId
)
{
this
.
parentId
=
parentId
;
}
public
Object
getFailureCodeId
()
{
public
String
getFailureCodeId
()
{
return
failureCodeId
;
}
public
void
setFailureCodeId
(
Object
failureCodeId
)
{
public
void
setFailureCodeId
(
String
failureCodeId
)
{
this
.
failureCodeId
=
failureCodeId
;
}
public
Object
getQuestionId
()
{
public
String
getQuestionId
()
{
return
questionId
;
}
public
void
setQuestionId
(
Object
questionId
)
{
public
void
setQuestionId
(
String
questionId
)
{
this
.
questionId
=
questionId
;
}
...
...
@@ -241,19 +241,19 @@ public class WokrOrderBean extends BaseMesPageBean {
this
.
shutDown
=
shutDown
;
}
public
Object
getShutdownTime
()
{
public
String
getShutdownTime
()
{
return
shutdownTime
;
}
public
void
setShutdownTime
(
Object
shutdownTime
)
{
public
void
setShutdownTime
(
String
shutdownTime
)
{
this
.
shutdownTime
=
shutdownTime
;
}
public
Object
getRecoveryTime
()
{
public
String
getRecoveryTime
()
{
return
recoveryTime
;
}
public
void
setRecoveryTime
(
Object
recoveryTime
)
{
public
void
setRecoveryTime
(
String
recoveryTime
)
{
this
.
recoveryTime
=
recoveryTime
;
}
...
...
@@ -281,51 +281,51 @@ public class WokrOrderBean extends BaseMesPageBean {
this
.
detailedInformation
=
detailedInformation
;
}
public
Object
getSchedStart
()
{
public
long
getSchedStart
()
{
return
schedStart
;
}
public
void
setSchedStart
(
Object
schedStart
)
{
public
void
setSchedStart
(
long
schedStart
)
{
this
.
schedStart
=
schedStart
;
}
public
Object
getSchedFinish
()
{
public
long
getSchedFinish
()
{
return
schedFinish
;
}
public
void
setSchedFinish
(
Object
schedFinish
)
{
public
void
setSchedFinish
(
long
schedFinish
)
{
this
.
schedFinish
=
schedFinish
;
}
public
Object
getActStart
()
{
public
Long
getActStart
()
{
return
actStart
;
}
public
void
setActStart
(
Object
actStart
)
{
public
void
setActStart
(
Long
actStart
)
{
this
.
actStart
=
actStart
;
}
public
Object
getActFinish
()
{
public
long
getActFinish
()
{
return
actFinish
;
}
public
void
setActFinish
(
Object
actFinish
)
{
public
void
setActFinish
(
long
actFinish
)
{
this
.
actFinish
=
actFinish
;
}
public
Object
getPmCode
()
{
public
String
getPmCode
()
{
return
pmCode
;
}
public
void
setPmCode
(
Object
pmCode
)
{
public
void
setPmCode
(
String
pmCode
)
{
this
.
pmCode
=
pmCode
;
}
public
Object
getStandardOperation
()
{
public
String
getStandardOperation
()
{
return
standardOperation
;
}
public
void
setStandardOperation
(
Object
standardOperation
)
{
public
void
setStandardOperation
(
String
standardOperation
)
{
this
.
standardOperation
=
standardOperation
;
}
...
...
@@ -353,51 +353,51 @@ public class WokrOrderBean extends BaseMesPageBean {
this
.
changeBy
=
changeBy
;
}
public
Object
getFailureCode
()
{
public
String
getFailureCode
()
{
return
failureCode
;
}
public
void
setFailureCode
(
Object
failureCode
)
{
public
void
setFailureCode
(
String
failureCode
)
{
this
.
failureCode
=
failureCode
;
}
public
Object
getFailureName
()
{
public
String
getFailureName
()
{
return
failureName
;
}
public
void
setFailureName
(
Object
failureName
)
{
public
void
setFailureName
(
String
failureName
)
{
this
.
failureName
=
failureName
;
}
public
Object
getQuestionCode
()
{
public
String
getQuestionCode
()
{
return
questionCode
;
}
public
void
setQuestionCode
(
Object
questionCode
)
{
public
void
setQuestionCode
(
String
questionCode
)
{
this
.
questionCode
=
questionCode
;
}
public
Object
getQuestionName
()
{
public
String
getQuestionName
()
{
return
questionName
;
}
public
void
setQuestionName
(
Object
questionName
)
{
public
void
setQuestionName
(
String
questionName
)
{
this
.
questionName
=
questionName
;
}
public
Object
getParentCode
()
{
public
String
getParentCode
()
{
return
parentCode
;
}
public
void
setParentCode
(
Object
parentCode
)
{
public
void
setParentCode
(
String
parentCode
)
{
this
.
parentCode
=
parentCode
;
}
public
Object
getParentName
()
{
public
String
getParentName
()
{
return
parentName
;
}
public
void
setParentName
(
Object
parentName
)
{
public
void
setParentName
(
String
parentName
)
{
this
.
parentName
=
parentName
;
}
...
...
@@ -417,19 +417,19 @@ public class WokrOrderBean extends BaseMesPageBean {
this
.
locationName
=
locationName
;
}
public
Object
getAssetCode
()
{
public
String
getAssetCode
()
{
return
assetCode
;
}
public
void
setAssetCode
(
Object
assetCode
)
{
public
void
setAssetCode
(
String
assetCode
)
{
this
.
assetCode
=
assetCode
;
}
public
Object
getAssetName
()
{
public
String
getAssetName
()
{
return
assetName
;
}
public
void
setAssetName
(
Object
assetName
)
{
public
void
setAssetName
(
String
assetName
)
{
this
.
assetName
=
assetName
;
}
...
...
@@ -481,11 +481,11 @@ public class WokrOrderBean extends BaseMesPageBean {
this
.
procId
=
procId
;
}
public
Object
getApproved
()
{
public
String
getApproved
()
{
return
approved
;
}
public
void
setApproved
(
Object
approved
)
{
public
void
setApproved
(
String
approved
)
{
this
.
approved
=
approved
;
}
}
...
...
app/src/main/java/com/wd/workoffice/retrofit/MesApiService.java
浏览文件 @
876917f2
...
...
@@ -693,6 +693,13 @@ public interface MesApiService {
@POST
(
"/himes/api/quality/show/productBy/productMud.json"
)
Observable
<
BaseMesBean
>
productMudDetail
(
@Query
(
"functionId"
)
String
functionId
,
@Body
RequestBody
requestBody
);
/**
* 质量工单-工单-设备未消缺的隐患或故障
*
* @return
*/
@POST
(
"/himes/api/opmreporterror/show/listWo.json"
)
Observable
<
BaseMesBean
>
opmreportError
(
@Query
(
"functionId"
)
String
functionId
,
@Body
RequestBody
requestBody
);
...
...
app/src/main/java/com/wd/workoffice/ui/activity/mes/work/QualityWorkActivity.java
浏览文件 @
876917f2
...
...
@@ -10,6 +10,7 @@ import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.BaseMesBean
;
import
com.wd.workoffice.app.WorkBaseActivity
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.mesBean.QualityTraceabilityBean
;
import
com.wd.workoffice.bean.mesBean.WokrOrderBean
;
import
com.wd.workoffice.retrofit.RtfUtils
;
...
...
@@ -36,7 +37,7 @@ import io.reactivex.disposables.Disposable;
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
QualityWorkActivity
extends
Work
Base
Activity
{
public
class
QualityWorkActivity
extends
Work
ToolBar
Activity
{
@BindView
(
R
.
id
.
rv_data
)
RecyclerView
rvData
;
...
...
@@ -123,8 +124,8 @@ public class QualityWorkActivity extends WorkBaseActivity {
dataAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
@Override
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
startActivity
(
QualityTraceability
DetailActivity
.
class
,
"info"
,
JSON
.
toJSONString
(
dataList
.
get
(
position
)));
startActivity
(
WorkOrder
DetailActivity
.
class
,
"info"
,
JSON
.
toJSONString
(
dataList
.
get
(
position
))
,
"status"
,
dataList
.
get
(
position
).
getStatus
()+
""
);
}
});
}
...
...
@@ -136,10 +137,4 @@ public class QualityWorkActivity extends WorkBaseActivity {
}
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
// TODO: add setContentView(...) invocation
ButterKnife
.
bind
(
this
);
}
}
app/src/main/java/com/wd/workoffice/ui/activity/mes/work/QualityWorkFragment.java
0 → 100644
浏览文件 @
876917f2
package
com
.
wd
.
workoffice
.
ui
.
activity
.
mes
.
work
;
import
android.os.Bundle
;
import
android.widget.LinearLayout
;
import
android.widget.TextView
;
import
com.alibaba.fastjson.JSON
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.BaseMesBean
;
import
com.wd.workoffice.app.WorkBaseFg
;
import
com.wd.workoffice.bean.mesBean.OpmreportErrorBean
;
import
com.wd.workoffice.bean.mesBean.WokrOrderBean
;
import
com.wd.workoffice.bean.workEnum.WorkOrder
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.ui.adapter.WorkOrderErrorAdapter
;
import
com.wd.workoffice.util.WorkUtils
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
androidx.annotation.Nullable
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
flexible.xd.android_base.network.rtfhttp.Transformer
;
import
flexible.xd.android_base.utils.TimeUtils
;
import
io.reactivex.disposables.Disposable
;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
QualityWorkFragment
extends
WorkBaseFg
{
@BindView
(
R
.
id
.
tv_refuse
)
TextView
tvRefuse
;
@BindView
(
R
.
id
.
tv_agree
)
TextView
tvAgree
;
@BindView
(
R
.
id
.
ll_bottom
)
LinearLayout
llBottom
;
@BindView
(
R
.
id
.
tv_no
)
TextView
tvNo
;
@BindView
(
R
.
id
.
tv_name
)
TextView
tvName
;
@BindView
(
R
.
id
.
tv_parent
)
TextView
tvParent
;
@BindView
(
R
.
id
.
tv_type
)
TextView
tvType
;
@BindView
(
R
.
id
.
tv_status
)
TextView
tvStatus
;
@BindView
(
R
.
id
.
tv_location
)
TextView
tvLocation
;
@BindView
(
R
.
id
.
tv_position
)
TextView
tvPosition
;
@BindView
(
R
.
id
.
tv_fault
)
TextView
tvFault
;
@BindView
(
R
.
id
.
tv_problem_code
)
TextView
tvProblemCode
;
@BindView
(
R
.
id
.
tv_work_type
)
TextView
tvWorkType
;
@BindView
(
R
.
id
.
tv_link_no
)
TextView
tvLinkNo
;
@BindView
(
R
.
id
.
tv_create_by
)
TextView
tvCreateBy
;
@BindView
(
R
.
id
.
tv_create_time
)
TextView
tvCreateTime
;
@BindView
(
R
.
id
.
tv_off
)
TextView
tvOff
;
@BindView
(
R
.
id
.
tv_grant
)
TextView
tvGrant
;
@BindView
(
R
.
id
.
tv_detail_info
)
TextView
tvDetailInfo
;
@BindView
(
R
.
id
.
tv_off_time
)
TextView
tvOffTime
;
@BindView
(
R
.
id
.
tv_on_time
)
TextView
tvOnTime
;
@BindView
(
R
.
id
.
tv_plan_star_time
)
TextView
tvPlanStarTime
;
@BindView
(
R
.
id
.
tv_plan_end_time
)
TextView
tvPlanEndTime
;
@BindView
(
R
.
id
.
tv_true_star_time
)
TextView
tvTrueStarTime
;
@BindView
(
R
.
id
.
tv_true_end_time
)
TextView
tvTrueEndTime
;
@BindView
(
R
.
id
.
rv_data
)
RecyclerView
rvData
;
@BindView
(
R
.
id
.
tv_position_code
)
TextView
tvPositionCode
;
@BindView
(
R
.
id
.
tv_machine_code
)
TextView
tvMachineCode
;
@BindView
(
R
.
id
.
tv_machine_name
)
TextView
tvMachineName
;
private
Map
<
String
,
Object
>
param
;
private
List
<
OpmreportErrorBean
.
ListBean
>
dataList
;
private
WorkOrderErrorAdapter
dataAdapter
;
private
WokrOrderBean
.
ListBean
info
;
private
int
page
=
1
;
private
Map
<
String
,
Object
>
paramMap
;
@Override
public
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
Bundle
arguments
=
getArguments
();
if
(
arguments
!=
null
)
{
info
=
JSON
.
parseObject
(
arguments
.
getString
(
"info"
),
WokrOrderBean
.
ListBean
.
class
);
}
}
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
,
getContentView
());
rvData
.
setLayoutManager
(
new
LinearLayoutManager
(
getActivity
(),
RecyclerView
.
VERTICAL
,
false
));
}
@Override
protected
void
initData
()
{
tvNo
.
setText
(
info
.
getWoCode
());
tvName
.
setText
(
info
.
getDescription
());
tvParent
.
setText
(
info
.
getParentName
());
tvType
.
setText
(
"计划工单"
);
tvStatus
.
setText
(
WorkOrder
.
getNameByCode
(
info
.
getStatus
()));
tvLocation
.
setText
(
info
.
getSiteName
());
tvPosition
.
setText
(
info
.
getLocationName
());
tvPositionCode
.
setText
(
info
.
getLocationCode
());
tvMachineCode
.
setText
(
info
.
getAssetName
());
tvMachineName
.
setText
(
info
.
getAssetCode
());
tvFault
.
setText
(
info
.
getFailureName
());
tvProblemCode
.
setText
(
info
.
getQuestionCode
());
tvWorkType
.
setText
(
getWorkType
(
info
.
getWorkType
()));
// 1 2 4 5
tvLinkNo
.
setText
(
info
.
getLinkedNumber
());
tvCreateBy
.
setText
(
info
.
getCreateName
());
tvCreateTime
.
setText
(
TimeUtils
.
millis2String
(
info
.
getCreateDateTime
(),
new
SimpleDateFormat
(
"yyyy-MM-dd"
)));
tvOff
.
setText
(
info
.
isShutDown
()?
"是"
:
"否"
);
tvGrant
.
setText
(
info
.
isMateriel
()?
"是"
:
"否"
);
tvDetailInfo
.
setText
(
info
.
getDetailedInformation
());
tvOffTime
.
setText
(
info
.
getShutdownTime
());
tvOnTime
.
setText
(
info
.
getRecoveryTime
());
tvPlanStarTime
.
setText
(
info
.
getSchedStart
()
==
0L
?
""
:
TimeUtils
.
millis2String
(
info
.
getSchedStart
(),
new
SimpleDateFormat
(
"yyyy-MM-dd"
)));
tvPlanEndTime
.
setText
(
info
.
getSchedFinish
()
==
0L
?
""
:
TimeUtils
.
millis2String
(
info
.
getSchedFinish
(),
new
SimpleDateFormat
(
"yyyy-MM-dd"
))
);
tvTrueStarTime
.
setText
(
info
.
getActStart
()
==
0L
?
""
:
TimeUtils
.
millis2String
(
info
.
getActStart
(),
new
SimpleDateFormat
(
"yyyy-MM-dd"
)));
tvTrueEndTime
.
setText
(
info
.
getActFinish
()
==
0L
?
""
:
TimeUtils
.
millis2String
(
info
.
getActFinish
(),
new
SimpleDateFormat
(
"yyyy-MM-dd"
)));
dataList
=
new
ArrayList
<>();
dataAdapter
=
new
WorkOrderErrorAdapter
(
R
.
layout
.
item_work_order_error
,
dataList
);
dataAdapter
.
bindToRecyclerView
(
rvData
);
param
=
WorkUtils
.
pageMesKey
();
param
.
put
(
"pageNum"
,
1
);
paramMap
=
WorkUtils
.
simpleParam
();
param
.
put
(
"paramMap"
,
paramMap
);
paramMap
.
put
(
"assetId"
,
info
.
getAssetId
());
getData
();
}
/**
* 获取工作类型
*
* @param workType
* @return
*/
private
String
getWorkType
(
int
workType
)
{
String
name
=
""
;
switch
(
workType
)
{
case
1
:
name
=
"检修"
;
break
;
case
2
:
name
=
"点检"
;
break
;
case
4
:
name
=
"故障"
;
break
;
case
5
:
name
=
"项目"
;
break
;
}
return
name
;
}
private
void
getData
()
{
RtfUtils
.
getMesRtf
().
opmreportError
(
"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
;
}
List
<
OpmreportErrorBean
.
ListBean
>
getList
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
OpmreportErrorBean
.
class
).
getList
();
if
(
page
==
1
)
{
dataList
.
clear
();
dataList
.
addAll
(
getList
);
dataAdapter
.
notifyDataSetChanged
();
dataAdapter
.
loadMoreComplete
();
}
else
{
dataAdapter
.
loadMoreComplete
();
dataList
.
addAll
(
getList
);
dataAdapter
.
notifyDataSetChanged
();
}
if
(
getList
.
size
()
==
0
)
{
dataAdapter
.
loadMoreEnd
(
true
);
}
else
{
page
++;
}
}
});
}
@Override
protected
void
initEvent
()
{
dataAdapter
.
setOnLoadMoreListener
(()
->
{
param
.
put
(
"pageNum"
,
page
);
getData
();
},
rvData
);
}
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
fg_work_order_detail
;
}
}
app/src/main/java/com/wd/workoffice/ui/activity/mes/work/WorkOrderDetailActivity.java
0 → 100644
浏览文件 @
876917f2
package
com
.
wd
.
workoffice
.
ui
.
activity
.
mes
.
work
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
com.google.android.material.tabs.TabLayout
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.ui.adapter.VpDataAdapter
;
import
com.wd.workoffice.ui.fg.MesOrderFragment
;
import
java.util.ArrayList
;
import
java.util.List
;
import
androidx.fragment.app.Fragment
;
import
androidx.fragment.app.FragmentManager
;
import
androidx.viewpager.widget.ViewPager
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
/**
* 质量工单详情
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
WorkOrderDetailActivity
extends
WorkToolBarActivity
{
@BindView
(
R
.
id
.
tl_tab
)
TabLayout
tlTab
;
@BindView
(
R
.
id
.
vp_data
)
ViewPager
vpData
;
private
List
<
String
>
tab
=
new
ArrayList
<>();
// {
// "工单", "计划", "实际情况" ,"故障报告"};
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
tlTab
.
setupWithViewPager
(
vpData
);
tlTab
.
setTabMode
(
TabLayout
.
MODE_FIXED
);
}
@Override
protected
void
initData
()
{
String
status
=
getIntent
().
getStringExtra
(
"status"
);
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
"info"
,
getIntent
().
getStringExtra
(
"info"
));
FragmentManager
sfm
=
getSupportFragmentManager
();
List
<
Fragment
>
data
=
new
ArrayList
<>();
QualityWorkFragment
qualityWorkFragment
=
new
QualityWorkFragment
();
tab
.
add
(
"工单"
);
// tab.add("计划");
// if (TextUtils.equals(status, "3") || TextUtils.equals(status, "4")) {
// tab.add("实际情况");
// }
// tab.add("故障报告");
qualityWorkFragment
.
setArguments
(
bundle
);
data
.
add
(
qualityWorkFragment
);
// data.add(qualityWorkFragment);
// data.add(qualityWorkFragment);
// data.add(qualityWorkFragment);
VpDataAdapter
vpFgAdapter
=
new
VpDataAdapter
(
sfm
,
data
);
vpData
.
setAdapter
(
vpFgAdapter
);
for
(
int
i
=
0
;
i
<
tab
.
size
();
i
++)
{
tlTab
.
getTabAt
(
i
).
setText
(
tab
.
get
(
i
));
}
}
@Override
protected
void
initEvent
()
{
}
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
activity_order
;
}
}
app/src/main/java/com/wd/workoffice/ui/adapter/WorkOrderErrorAdapter.java
0 → 100644
浏览文件 @
876917f2
package
com
.
wd
.
workoffice
.
ui
.
adapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.bean.mesBean.DispatchBean
;
import
com.wd.workoffice.bean.mesBean.OpmreportErrorBean
;
import
java.util.List
;
import
flexible.xd.android_base.utils.TimeUtils
;
/**
* Created by flexible on 2018/8/13.
*/
public
class
WorkOrderErrorAdapter
extends
BaseQuickAdapter
<
OpmreportErrorBean
.
ListBean
,
BaseViewHolder
>
{
public
WorkOrderErrorAdapter
(
int
layoutResId
,
List
data
)
{
super
(
layoutResId
,
data
);
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
OpmreportErrorBean
.
ListBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_no
,
String
.
format
(
"编码:%s"
,
item
.
getReportCode
()));
helper
.
setText
(
R
.
id
.
tv_level
,
item
.
getCulevel
()+
""
);
helper
.
setText
(
R
.
id
.
tv_people
,
item
.
getDataFromName
());
helper
.
setText
(
R
.
id
.
tv_desc
,
item
.
getDescription
());
helper
.
setText
(
R
.
id
.
tv_time
,
item
.
getFindDateTime
());
}
}
app/src/main/res/layout/fg_work_order_detail.xml
0 → 100644
浏览文件 @
876917f2
差异被折叠。
点击展开。
app/src/main/res/layout/item_work_order_error.xml
0 → 100644
浏览文件 @
876917f2
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:layout_margin=
"8mm"
android:background=
"@color/white"
android:orientation=
"vertical"
android:paddingHorizontal=
"20mm"
android:paddingTop=
"10mm"
android:paddingBottom=
"10mm"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"5mm"
>
<TextView
android:id=
"@+id/tv_no"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"所属工序:"
android:textSize=
"16sp"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/tv_status"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:textColor=
"#0841F0"
android:textSize=
"14sp"
/>
</RelativeLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"14mm"
android:background=
"#FCFCFD"
android:orientation=
"vertical"
android:paddingVertical=
"10mm"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingHorizontal=
"10mm"
android:visibility=
"gone"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"工序名称"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingHorizontal=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"描述"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_desc"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:paddingHorizontal=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"级别"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_level"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:paddingHorizontal=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"提报人"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_people"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10mm"
android:paddingHorizontal=
"10mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:text=
"提报日期"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"13sp"
/>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论