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
8b40cfa3
提交
8b40cfa3
authored
6月 11, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.订单不良率详情
2.//TODO 坩埚下单,mes其他页面,mes用户反馈空也展示,编辑任务担当无法修改
上级
c506a542
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
567 行增加
和
54 行删除
+567
-54
MesFactoryBean.java
...n/java/com/wd/workoffice/bean/mesBean/MesFactoryBean.java
+281
-0
OrderBadBean.java
...ain/java/com/wd/workoffice/bean/mesBean/OrderBadBean.java
+0
-0
MesApiService.java
...c/main/java/com/wd/workoffice/retrofit/MesApiService.java
+11
-0
WorkAccountFlowActivity.java
...koffice/ui/activity/bat/work/WorkAccountFlowActivity.java
+2
-2
WorkWarehouseStockDetailFlowActivity.java
...tivity/bat/work/WorkWarehouseStockDetailFlowActivity.java
+2
-2
WorkWarehouseStockFlowActivity.java
.../ui/activity/bat/work/WorkWarehouseStockFlowActivity.java
+2
-2
MesReportActivity.java
.../workoffice/ui/activity/mes/report/MesReportActivity.java
+119
-16
MesReportDetailActivity.java
...ffice/ui/activity/mes/report/MesReportDetailActivity.java
+46
-1
ReportBadAdapter.java
...n/java/com/wd/workoffice/ui/adapter/ReportBadAdapter.java
+6
-18
ReportBadListAdapter.java
...va/com/wd/workoffice/ui/adapter/ReportBadListAdapter.java
+50
-0
activity_mes_report.xml
app/src/main/res/layout/activity_mes_report.xml
+35
-13
activity_report_detail.xml
app/src/main/res/layout/activity_report_detail.xml
+0
-0
item_mes_report_bad.xml
app/src/main/res/layout/item_mes_report_bad.xml
+3
-0
item_mes_report_bad_list.xml
app/src/main/res/layout/item_mes_report_bad_list.xml
+10
-0
没有找到文件。
app/src/main/java/com/wd/workoffice/bean/mesBean/MesFactoryBean.java
0 → 100644
浏览文件 @
8b40cfa3
package
com
.
wd
.
workoffice
.
bean
.
mesBean
;
import
java.util.List
;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
MesFactoryBean
{
/**
* loginUserId : null
* userId : null
* userName : null
* sex : null
* email : null
* mobile : null
* name : null
* siteId : null
* siteName : null
* siteCode : null
* cardNo : null
* status : null
* joinDateTime : null
* leaveDateTime : null
* currentOrganization : null
* functionVo : null
* sysType : null
* orgs : []
* functions : []
* sites : [{"id":"4a418ee8ffa211e98334fa163e1166bd","siteName":"锆碳厂","siteCode":"ZWGT"},{"id":"1c37c889ffa211e98334fa163e1166bd","siteName":"铝碳厂","siteCode":"ZWLT"},{"id":"5cd86611ffa211e98334fa163e1166bd","siteName":"特耐厂","siteCode":"ZWTN"}]
* depts : []
* roleIds : null
* teamId : null
*/
private
Object
loginUserId
;
private
Object
userId
;
private
Object
userName
;
private
Object
sex
;
private
Object
email
;
private
Object
mobile
;
private
Object
name
;
private
Object
siteId
;
private
Object
siteName
;
private
Object
siteCode
;
private
Object
cardNo
;
private
Object
status
;
private
Object
joinDateTime
;
private
Object
leaveDateTime
;
private
Object
currentOrganization
;
private
Object
functionVo
;
private
Object
sysType
;
private
Object
roleIds
;
private
Object
teamId
;
private
List
<?>
orgs
;
private
List
<?>
functions
;
private
List
<
SitesBean
>
sites
;
private
List
<?>
depts
;
public
Object
getLoginUserId
()
{
return
loginUserId
;
}
public
void
setLoginUserId
(
Object
loginUserId
)
{
this
.
loginUserId
=
loginUserId
;
}
public
Object
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Object
userId
)
{
this
.
userId
=
userId
;
}
public
Object
getUserName
()
{
return
userName
;
}
public
void
setUserName
(
Object
userName
)
{
this
.
userName
=
userName
;
}
public
Object
getSex
()
{
return
sex
;
}
public
void
setSex
(
Object
sex
)
{
this
.
sex
=
sex
;
}
public
Object
getEmail
()
{
return
email
;
}
public
void
setEmail
(
Object
email
)
{
this
.
email
=
email
;
}
public
Object
getMobile
()
{
return
mobile
;
}
public
void
setMobile
(
Object
mobile
)
{
this
.
mobile
=
mobile
;
}
public
Object
getName
()
{
return
name
;
}
public
void
setName
(
Object
name
)
{
this
.
name
=
name
;
}
public
Object
getSiteId
()
{
return
siteId
;
}
public
void
setSiteId
(
Object
siteId
)
{
this
.
siteId
=
siteId
;
}
public
Object
getSiteName
()
{
return
siteName
;
}
public
void
setSiteName
(
Object
siteName
)
{
this
.
siteName
=
siteName
;
}
public
Object
getSiteCode
()
{
return
siteCode
;
}
public
void
setSiteCode
(
Object
siteCode
)
{
this
.
siteCode
=
siteCode
;
}
public
Object
getCardNo
()
{
return
cardNo
;
}
public
void
setCardNo
(
Object
cardNo
)
{
this
.
cardNo
=
cardNo
;
}
public
Object
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Object
status
)
{
this
.
status
=
status
;
}
public
Object
getJoinDateTime
()
{
return
joinDateTime
;
}
public
void
setJoinDateTime
(
Object
joinDateTime
)
{
this
.
joinDateTime
=
joinDateTime
;
}
public
Object
getLeaveDateTime
()
{
return
leaveDateTime
;
}
public
void
setLeaveDateTime
(
Object
leaveDateTime
)
{
this
.
leaveDateTime
=
leaveDateTime
;
}
public
Object
getCurrentOrganization
()
{
return
currentOrganization
;
}
public
void
setCurrentOrganization
(
Object
currentOrganization
)
{
this
.
currentOrganization
=
currentOrganization
;
}
public
Object
getFunctionVo
()
{
return
functionVo
;
}
public
void
setFunctionVo
(
Object
functionVo
)
{
this
.
functionVo
=
functionVo
;
}
public
Object
getSysType
()
{
return
sysType
;
}
public
void
setSysType
(
Object
sysType
)
{
this
.
sysType
=
sysType
;
}
public
Object
getRoleIds
()
{
return
roleIds
;
}
public
void
setRoleIds
(
Object
roleIds
)
{
this
.
roleIds
=
roleIds
;
}
public
Object
getTeamId
()
{
return
teamId
;
}
public
void
setTeamId
(
Object
teamId
)
{
this
.
teamId
=
teamId
;
}
public
List
<?>
getOrgs
()
{
return
orgs
;
}
public
void
setOrgs
(
List
<?>
orgs
)
{
this
.
orgs
=
orgs
;
}
public
List
<?>
getFunctions
()
{
return
functions
;
}
public
void
setFunctions
(
List
<?>
functions
)
{
this
.
functions
=
functions
;
}
public
List
<
SitesBean
>
getSites
()
{
return
sites
;
}
public
void
setSites
(
List
<
SitesBean
>
sites
)
{
this
.
sites
=
sites
;
}
public
List
<?>
getDepts
()
{
return
depts
;
}
public
void
setDepts
(
List
<?>
depts
)
{
this
.
depts
=
depts
;
}
public
static
class
SitesBean
{
/**
* id : 4a418ee8ffa211e98334fa163e1166bd
* siteName : 锆碳厂
* siteCode : ZWGT
*/
private
String
id
;
private
String
siteName
;
private
String
siteCode
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getSiteName
()
{
return
siteName
;
}
public
void
setSiteName
(
String
siteName
)
{
this
.
siteName
=
siteName
;
}
public
String
getSiteCode
()
{
return
siteCode
;
}
public
void
setSiteCode
(
String
siteCode
)
{
this
.
siteCode
=
siteCode
;
}
}
}
app/src/main/java/com/wd/workoffice/bean/mesBean/OrderBadBean.java
0 → 100644
浏览文件 @
8b40cfa3
差异被折叠。
点击展开。
app/src/main/java/com/wd/workoffice/retrofit/MesApiService.java
浏览文件 @
8b40cfa3
...
...
@@ -579,5 +579,16 @@ public interface MesApiService {
*/
@POST
(
"/himes/api/quality/show/productBy/dispatchDetail.json"
)
Observable
<
BaseMesBean
>
dispatchDetail
(
@Query
(
"functionId"
)
String
functionId
,
@Body
RequestBody
requestBody
);
/**
* @return
*/
@POST
(
"/himes/api/scrapStatistics/show/list.json"
)
Observable
<
BaseMesBean
>
scrapStatistics
(
@Query
(
"functionId"
)
String
functionId
,
@Body
RequestBody
requestBody
);
/**
* @return
*/
@POST
(
"/himes/api/site/show/removes/page.json"
)
Observable
<
BaseMesBean
>
siteShow
(
@Query
(
"functionId"
)
String
functionId
,
@Body
RequestBody
requestBody
);
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/work/WorkAccountFlowActivity.java
浏览文件 @
8b40cfa3
...
...
@@ -145,7 +145,7 @@ public class WorkAccountFlowActivity extends WorkToolBarActivity {
param
.
put
(
"current"
,
page
);
getData
();
}
}).
show
();
}
,
false
).
show
();
break
;
case
R
.
id
.
tv_end
:
PickTimeUtils
.
showPickThree
(
this
,
new
OnTimeSelectListener
()
{
...
...
@@ -158,7 +158,7 @@ public class WorkAccountFlowActivity extends WorkToolBarActivity {
param
.
put
(
"current"
,
page
);
getData
();
}
}).
show
();
}
,
false
).
show
();
break
;
}
}
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/work/WorkWarehouseStockDetailFlowActivity.java
浏览文件 @
8b40cfa3
...
...
@@ -170,7 +170,7 @@ public class WorkWarehouseStockDetailFlowActivity extends WorkToolBarActivity {
param
.
put
(
"current"
,
page
);
getData
();
}
}).
show
();
}
,
false
).
show
();
break
;
case
R
.
id
.
tv_end
:
PickTimeUtils
.
showPickThree
(
this
,
new
OnTimeSelectListener
()
{
...
...
@@ -183,7 +183,7 @@ public class WorkWarehouseStockDetailFlowActivity extends WorkToolBarActivity {
param
.
put
(
"current"
,
page
);
getData
();
}
}).
show
();
}
,
false
).
show
();
break
;
}
}
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/work/WorkWarehouseStockFlowActivity.java
浏览文件 @
8b40cfa3
...
...
@@ -201,7 +201,7 @@ public class WorkWarehouseStockFlowActivity extends WorkToolBarActivity {
param
.
put
(
"current"
,
page
);
getData
();
}
}).
show
();
}
,
false
).
show
();
break
;
case
R
.
id
.
tv_end
:
PickTimeUtils
.
showPickThree
(
this
,
new
OnTimeSelectListener
()
{
...
...
@@ -214,7 +214,7 @@ public class WorkWarehouseStockFlowActivity extends WorkToolBarActivity {
param
.
put
(
"current"
,
page
);
getData
();
}
}).
show
();
}
,
false
).
show
();
break
;
}
}
...
...
app/src/main/java/com/wd/workoffice/ui/activity/mes/report/MesReportActivity.java
浏览文件 @
8b40cfa3
package
com
.
wd
.
workoffice
.
ui
.
activity
.
mes
.
report
;
import
android.content.DialogInterface
;
import
android.graphics.Color
;
import
android.os.Bundle
;
import
android.view.MenuItem
;
...
...
@@ -10,15 +11,21 @@ import android.widget.TextView;
import
com.alibaba.fastjson.JSON
;
import
com.bigkoo.pickerview.listener.OnTimeSelectListener
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialog
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.BaseMesBean
;
import
com.wd.workoffice.app.WorkBaseActivity
;
import
com.wd.workoffice.bean.WarehoustBean
;
import
com.wd.workoffice.bean.mesBean.MesFactoryBean
;
import
com.wd.workoffice.bean.mesBean.OrderBadBean
;
import
com.wd.workoffice.bean.mesBean.ProBadBean
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.ui.adapter.ReportBadAdapter
;
import
com.wd.workoffice.ui.activity.bat.order.ProductOrderAddActivity
;
import
com.wd.workoffice.ui.adapter.ReportBadListAdapter
;
import
com.wd.workoffice.ui.adapter.ReportProBadAdapter
;
import
com.wd.workoffice.ui.adapter.ReportTopAdapter
;
import
com.wd.workoffice.util.DialogUtils
;
import
com.wd.workoffice.util.PickTimeUtils
;
import
com.wd.workoffice.util.WorkUtils
;
...
...
@@ -49,7 +56,6 @@ import io.reactivex.disposables.Disposable;
**/
public
class
MesReportActivity
extends
WorkBaseActivity
{
@BindView
(
R
.
id
.
tv_report
)
TextView
tvReport
;
@BindView
(
R
.
id
.
tv_bad
)
...
...
@@ -70,13 +76,22 @@ public class MesReportActivity extends WorkBaseActivity {
TextView
tvTime
;
@BindView
(
R
.
id
.
ll_time
)
LinearLayout
llTime
;
private
ReportBadAdapter
badAdapter
;
@BindView
(
R
.
id
.
tv_dept
)
TextView
tvDept
;
@BindView
(
R
.
id
.
tv_start
)
TextView
tvStart
;
@BindView
(
R
.
id
.
tv_end
)
TextView
tvEnd
;
private
ReportBadListAdapter
badAdapter
;
private
ReportTopAdapter
topAdapter
;
private
ReportProBadAdapter
proBadAdapter
;
private
List
<
ProBadBean
.
DataBean
>
proBadList
;
private
List
<
ProBadBean
.
DataBean
>
topList
;
private
Map
<
String
,
Object
>
param
;
private
List
<
OrderBadBean
.
ScrapStatisticsListsBean
>
badList
;
private
Map
<
String
,
Object
>
badParam
;
private
QMUIDialog
.
MenuDialogBuilder
depDialog
;
private
List
<
String
>
depNameList
=
new
ArrayList
<>();
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
...
...
@@ -90,20 +105,65 @@ public class MesReportActivity extends WorkBaseActivity {
@Override
protected
void
initData
()
{
List
<
Object
>
badList
=
new
ArrayList
<>();
badList
.
add
(
null
);
badList
.
add
(
null
);
badList
.
add
(
null
);
badList
=
new
ArrayList
<>();
topList
=
new
ArrayList
<>();
proBadList
=
new
ArrayList
<>();
badAdapter
=
new
ReportBad
Adapter
(
R
.
layout
.
item_mes_report_bad
,
badList
);
badAdapter
=
new
ReportBad
ListAdapter
(
R
.
layout
.
item_mes_report_bad_list
,
badList
);
topAdapter
=
new
ReportTopAdapter
(
R
.
layout
.
item_mes_report_top
,
topList
);
proBadAdapter
=
new
ReportProBadAdapter
(
R
.
layout
.
item_mes_report_pro_bad
,
proBadList
);
badAdapter
.
bindToRecyclerView
(
rvBad
);
topAdapter
.
bindToRecyclerView
(
rvTop
);
proBadAdapter
.
bindToRecyclerView
(
rvProBad
);
param
=
WorkUtils
.
simpleParam
();
badParam
=
WorkUtils
.
simpleParam
();
badParam
.
put
(
"beginDate"
,
TimeUtils
.
getNowString
());
badParam
.
put
(
"endDate"
,
TimeUtils
.
getNowString
());
depDialog
=
DialogUtils
.
listDialog
(
this
);
getData
();
getDepData
();
}
private
void
getDepData
()
{
RtfUtils
.
getMesRtf
().
siteShow
(
"1"
,
WorkUtils
.
convertMapToBody
(
badParam
)).
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
<
MesFactoryBean
.
SitesBean
>
getList
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
MesFactoryBean
.
class
).
getSites
();
if
(
getList
.
size
()!=
0
){
badParam
.
put
(
"siteCode"
,
getList
.
get
(
0
).
getSiteCode
());
tvDept
.
setText
(
getList
.
get
(
0
).
getSiteName
());
}
depNameList
.
clear
();
depDialog
=
DialogUtils
.
listDialog
(
MesReportActivity
.
this
);
for
(
MesFactoryBean
.
SitesBean
process
:
getList
)
{
depNameList
.
add
(
process
.
getSiteName
());
}
depDialog
.
addItems
(
depNameList
.
toArray
(
new
String
[
depNameList
.
size
()]),
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
badParam
.
put
(
"siteCode"
,
getList
.
get
(
which
).
getSiteCode
());
tvDept
.
setText
(
depNameList
.
get
(
which
));
dialog
.
dismiss
();
getOrderBad
();
}
});
}
});
}
private
void
getData
()
{
...
...
@@ -138,31 +198,74 @@ public class MesReportActivity extends WorkBaseActivity {
proBadList
.
addAll
(
getList
);
topAdapter
.
notifyDataSetChanged
();
proBadAdapter
.
notifyDataSetChanged
();
}
});
}
private
void
getOrderBad
()
{
RtfUtils
.
getMesRtf
().
scrapStatistics
(
"1"
,
WorkUtils
.
convertMapToBody
(
badParam
)).
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseMesBean
>()
{
@Override
public
void
doOnSubscribe
(
Disposable
d
)
{
}
@Override
protected
void
initEvent
()
{
badAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
@Override
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
startActivity
(
MesReportDetailActivity
.
class
);
public
void
onFail
(
String
errorMsg
)
{
hideLoading
();
toast
(
errorMsg
);
}
@Override
public
void
onSuccess
(
BaseMesBean
data
)
{
hideLoading
();
if
(!
data
.
isSuccess
())
{
toast
(
data
.
getMessage
());
return
;
}
List
<
OrderBadBean
.
ScrapStatisticsListsBean
>
getList
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
OrderBadBean
.
class
).
getScrapStatisticsLists
();
badList
.
clear
();
badList
.
addAll
(
getList
);
badAdapter
.
notifyDataSetChanged
();
}
});
}
@Override
protected
void
initEvent
()
{
}
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
activity_mes_report
;
}
@OnClick
({
R
.
id
.
ll_time
,
R
.
id
.
tv_report
,
R
.
id
.
tv_bad
})
@OnClick
({
R
.
id
.
tv_start
,
R
.
id
.
tv_end
,
R
.
id
.
ll_time
,
R
.
id
.
tv_report
,
R
.
id
.
tv_bad
})
public
void
onViewClicked
(
View
view
)
{
switch
(
view
.
getId
())
{
case
R
.
id
.
tv_start
:
PickTimeUtils
.
showPickThree
(
this
,
new
OnTimeSelectListener
()
{
@Override
public
void
onTimeSelect
(
Date
date
,
View
v
)
{
String
time
=
TimeUtils
.
date2String
(
date
,
new
SimpleDateFormat
(
"yyyy-MM-dd"
));
badParam
.
put
(
"beginDate"
,
time
);
tvStart
.
setText
(
time
);
getOrderBad
();
}
},
false
).
show
();
break
;
case
R
.
id
.
tv_end
:
PickTimeUtils
.
showPickThree
(
this
,
new
OnTimeSelectListener
()
{
@Override
public
void
onTimeSelect
(
Date
date
,
View
v
)
{
String
time
=
TimeUtils
.
date2String
(
date
,
new
SimpleDateFormat
(
"yyyy-MM-dd"
));
badParam
.
put
(
"endDate"
,
time
);
tvEnd
.
setText
(
time
);
getOrderBad
();
}
},
false
).
show
();
break
;
case
R
.
id
.
ll_time
:
PickTimeUtils
.
showPickTwo
(
this
,
new
OnTimeSelectListener
()
{
@Override
...
...
app/src/main/java/com/wd/workoffice/ui/activity/mes/report/MesReportDetailActivity.java
浏览文件 @
8b40cfa3
package
com
.
wd
.
workoffice
.
ui
.
activity
.
mes
.
report
;
import
android.os.Bundle
;
import
android.widget.TextView
;
import
com.alibaba.fastjson.JSON
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.mesBean.OrderBadBean
;
import
com.wd.workoffice.util.MathUtils
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
/**
...
...
@@ -14,6 +21,31 @@ import butterknife.ButterKnife;
public
class
MesReportDetailActivity
extends
WorkToolBarActivity
{
@BindView
(
R
.
id
.
tv_top_no
)
TextView
tvTopNo
;
@BindView
(
R
.
id
.
tv_status
)
TextView
tvStatus
;
@BindView
(
R
.
id
.
tv_pro_code
)
TextView
tvProCode
;
@BindView
(
R
.
id
.
tv_pro_name
)
TextView
tvProName
;
@BindView
(
R
.
id
.
tv_img_code
)
TextView
tvImgCode
;
@BindView
(
R
.
id
.
tv_spec
)
TextView
tvSpec
;
@BindView
(
R
.
id
.
tv_process
)
TextView
tvProcess
;
@BindView
(
R
.
id
.
tv_order_num
)
TextView
tvOrderNum
;
@BindView
(
R
.
id
.
tv_num
)
TextView
tvNum
;
@BindView
(
R
.
id
.
tv_bad
)
TextView
tvBad
;
@BindView
(
R
.
id
.
tv_chcek_price
)
TextView
tvChcekPrice
;
@BindView
(
R
.
id
.
tv_bad_price
)
TextView
tvBadPrice
;
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
...
...
@@ -21,6 +53,19 @@ public class MesReportDetailActivity extends WorkToolBarActivity {
@Override
protected
void
initData
()
{
OrderBadBean
.
ScrapStatisticsListsBean
info
=
JSON
.
parseObject
(
getIntent
().
getStringExtra
(
"info"
),
OrderBadBean
.
ScrapStatisticsListsBean
.
class
);
OrderBadBean
.
ScrapStatisticsListsBean
.
ScrapStatisticsBean
data
=
JSON
.
parseObject
(
getIntent
().
getStringExtra
(
"data"
),
OrderBadBean
.
ScrapStatisticsListsBean
.
ScrapStatisticsBean
.
class
);
tvTopNo
.
setText
(
String
.
format
(
"订单编号:%s"
,
data
.
getOrderNumber
()));
tvProCode
.
setText
(
data
.
getProductCode
());
tvProName
.
setText
(
data
.
getProductName
());
tvImgCode
.
setText
(
data
.
getDrawingNumber
());
tvSpec
.
setText
(
data
.
getSpecification
());
tvProcess
.
setText
(
data
.
getProcedureName
());
tvOrderNum
.
setText
(
data
.
getOrderCount
()+
""
);
tvNum
.
setText
(
data
.
getScrapCount
()+
""
);
tvBad
.
setText
(
MathUtils
.
converData
(
data
.
getBadRate
(),
3
));
tvBadPrice
.
setText
(
MathUtils
.
converData
(
data
.
getScrapLoss
(),
3
));
tvChcekPrice
.
setText
(
MathUtils
.
converData
(
data
.
getUnitPrice
(),
3
));
}
@Override
...
...
@@ -29,7 +74,7 @@ public class MesReportDetailActivity extends WorkToolBarActivity {
@Override
protected
int
layoutId
()
{
return
R
.
layout
.
activity_
mes_order
_detail
;
return
R
.
layout
.
activity_
report
_detail
;
}
}
app/src/main/java/com/wd/workoffice/ui/adapter/ReportBadAdapter.java
浏览文件 @
8b40cfa3
package
com
.
wd
.
workoffice
.
ui
.
adapter
;
import
android.text.Editable
;
import
android.text.TextUtils
;
import
android.text.TextWatcher
;
import
android.widget.EditText
;
import
com.alibaba.fastjson.JSON
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.bean.ProductBean
;
import
com.wd.workoffice.bean.event.ModifyCarEvent
;
import
com.wd.workoffice.bean.mesBean.OrderBadBean
;
import
com.wd.workoffice.util.MathUtils
;
import
com.wd.workoffice.widget.AddAndReduceDoubleView
;
import
org.greenrobot.eventbus.EventBus
;
import
java.util.List
;
import
flexible.xd.android_base.utils.ToastUtil
;
/**
* Created by flexible on 2018/8/13.
*/
public
class
ReportBadAdapter
extends
BaseQuickAdapter
<
ProductBean
.
Record
sBean
,
BaseViewHolder
>
{
public
class
ReportBadAdapter
extends
BaseQuickAdapter
<
OrderBadBean
.
ScrapStatisticsListsBean
.
ScrapStatistic
sBean
,
BaseViewHolder
>
{
public
ReportBadAdapter
(
int
layoutResId
,
List
data
)
{
super
(
layoutResId
,
data
);
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
ProductBean
.
RecordsBean
item
)
{
protected
void
convert
(
BaseViewHolder
helper
,
OrderBadBean
.
ScrapStatisticsListsBean
.
ScrapStatisticsBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_order_no
,
item
.
getOrderNumber
());
helper
.
setText
(
R
.
id
.
tv_pro_code
,
item
.
getProductCode
());
helper
.
setText
(
R
.
id
.
tv_bad
,
MathUtils
.
converData
(
item
.
getBadRate
(),
3
));
}
}
app/src/main/java/com/wd/workoffice/ui/adapter/ReportBadListAdapter.java
0 → 100644
浏览文件 @
8b40cfa3
package
com
.
wd
.
workoffice
.
ui
.
adapter
;
import
android.content.Intent
;
import
android.view.View
;
import
com.alibaba.fastjson.JSON
;
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.OrderBadBean
;
import
com.wd.workoffice.ui.activity.mes.report.MesReportDetailActivity
;
import
java.util.List
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.RecyclerView
;
import
static
flexible
.
xd
.
android_base
.
utils
.
ActivityUtils
.
startActivity
;
/**
* Created by flexible on 2018/8/13.
*/
public
class
ReportBadListAdapter
extends
BaseQuickAdapter
<
OrderBadBean
.
ScrapStatisticsListsBean
,
BaseViewHolder
>
{
public
ReportBadListAdapter
(
int
layoutResId
,
List
data
)
{
super
(
layoutResId
,
data
);
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
OrderBadBean
.
ScrapStatisticsListsBean
item
)
{
RecyclerView
rvData
=
helper
.
getView
(
R
.
id
.
rv_data
);
rvData
.
setLayoutManager
(
new
LinearLayoutManager
(
helper
.
getConvertView
().
getContext
(),
RecyclerView
.
VERTICAL
,
false
));
ReportBadAdapter
reportBadProAdapter
=
new
ReportBadAdapter
(
R
.
layout
.
item_mes_report_bad
,
item
.
getScrapStatistics
());
reportBadProAdapter
.
bindToRecyclerView
(
rvData
);
reportBadProAdapter
.
setOnItemClickListener
(
new
BaseQuickAdapter
.
OnItemClickListener
()
{
@Override
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
Intent
intent
=
new
Intent
(
helper
.
getConvertView
().
getContext
(),
MesReportDetailActivity
.
class
);
intent
.
putExtra
(
"info"
,
JSON
.
toJSONString
(
item
));
intent
.
putExtra
(
"data"
,
JSON
.
toJSONString
(
item
.
getScrapStatistics
().
get
(
position
)));
startActivity
(
intent
);
}
});
}
}
app/src/main/res/layout/activity_mes_report.xml
浏览文件 @
8b40cfa3
...
...
@@ -183,29 +183,51 @@
android:visibility=
"gone"
>
<LinearLayout
android:layout_width=
"
100mm
"
android:layout_width=
"
match_parent
"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"25mm"
android:background=
"@drawable/shape_mes_time"
android:gravity=
"center"
android:paddingVertical=
"4mm"
>
android:background=
"@android:color/white"
android:gravity=
"center"
>
<TextView
android:id=
"@+id/tv_dept"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:drawableRight=
"@mipmap/arrow_down"
android:gravity=
"center_vertical"
android:layout_marginHorizontal=
"15mm"
android:paddingVertical=
"13mm"
android:text=
"选择工厂"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_start"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"4mm"
android:text=
"2019年7月"
android:textColor=
"#ff637298"
android:drawableRight=
"@mipmap/arrow_down"
android:gravity=
"center_vertical"
android:paddingVertical=
"13mm"
android:text=
"开始时间"
android:textSize=
"13sp"
/>
<ImageView
android:layout_width=
"5mm"
android:layout_height=
"2mm"
android:scaleType=
"fitXY"
android:src=
"@mipmap/mes_time_down"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginHorizontal=
"20mm"
android:gravity=
"center_vertical"
android:text=
"~"
/>
<TextView
android:id=
"@+id/tv_end"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:drawableRight=
"@mipmap/arrow_down"
android:gravity=
"center_vertical"
android:paddingVertical=
"13mm"
android:text=
"结束时间"
android:textSize=
"13sp"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
...
...
app/src/main/res/layout/activity_report_detail.xml
0 → 100644
浏览文件 @
8b40cfa3
差异被折叠。
点击展开。
app/src/main/res/layout/item_mes_report_bad.xml
浏览文件 @
8b40cfa3
...
...
@@ -5,6 +5,7 @@
android:layout_marginTop=
"20mm"
>
<TextView
android:id=
"@+id/tv_order_no"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
...
...
@@ -13,6 +14,7 @@
android:textSize=
"14sp"
/>
<TextView
android:id=
"@+id/tv_pro_code"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
...
...
@@ -21,6 +23,7 @@
android:textSize=
"14sp"
/>
<TextView
android:id=
"@+id/tv_bad"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
...
...
app/src/main/res/layout/item_mes_report_bad_list.xml
0 → 100644
浏览文件 @
8b40cfa3
<?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"
>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_data"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</LinearLayout>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论