Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
android
/
dayu
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
17e6dcfb
authored
Oct 19, 2020
by
mReturn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
备件收货相关功能开发
parent
de5cc93a
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
5 deletions
baseSDK/src/main/java/com/dayu/utils/CommonUtils.java
orderCenter/src/main/java/com/dayu/order/api/OrderService.java
orderCenter/src/main/java/com/dayu/order/api/protocol/data/PartReceiveData.java
orderCenter/src/main/java/com/dayu/order/presenter/orderpart/OrderPartPresenter.java
orderCenter/src/main/java/com/dayu/order/presenter/orderpart_receive/PartRecievePresenter.java
baseSDK/src/main/java/com/dayu/utils/CommonUtils.java
View file @
17e6dcfb
...
...
@@ -231,8 +231,8 @@ public class CommonUtils {
sb
.
append
(
list
.
get
(
i
));
}
}
}
resultString
=
sb
.
toString
();
}
return
resultString
;
}
...
...
orderCenter/src/main/java/com/dayu/order/api/OrderService.java
View file @
17e6dcfb
...
...
@@ -33,6 +33,7 @@ import com.dayu.order.api.protocol.bean.ServiceStationBean;
import
com.dayu.order.api.protocol.bean.SopListBean
;
import
com.dayu.order.api.protocol.companyManager
;
import
com.dayu.order.api.protocol.data.AddDialRecordData
;
import
com.dayu.order.api.protocol.data.PartReceiveData
;
import
com.dayu.order.api.protocol.data.PartSendData
;
import
com.dayu.order.api.protocol.data.ReceivePartData
;
import
com.dayu.order.api.protocol.data.SendPartData
;
...
...
@@ -522,8 +523,13 @@ public interface OrderService {
/**
* 备件收货
*/
@POST
(
Constants
.
API_7700
+
"/spSendOutGoods/confirmReceive"
)
Observable
<
BaseResponse
<
Boolean
>>
receivePart
(
@Body
PartReceiveData
data
);
/**
* 备件收货(旧版)
*/
@PUT
(
Constants
.
API_7200
+
"/ordersLogistics"
)
Observable
<
BaseResponse
<
Boolean
>>
receivePart
(
@Body
ReceivePartData
data
);
Observable
<
BaseResponse
<
Boolean
>>
receivePart
Old
(
@Body
ReceivePartData
data
);
/**
* 备件物流详情
...
...
orderCenter/src/main/java/com/dayu/order/api/protocol/data/PartReceiveData.java
0 → 100644
View file @
17e6dcfb
package
com
.
dayu
.
order
.
api
.
protocol
.
data
;
public
class
PartReceiveData
{
public
int
id
;
//备件物流ID ,
public
String
comment
;
//备注
public
String
receiverPicUrl
;
//备注
public
String
updated
;
//备注
public
PartReceiveData
()
{
}
public
PartReceiveData
(
int
id
,
String
comment
,
String
receiverPicUrl
,
String
updated
)
{
this
.
id
=
id
;
this
.
comment
=
comment
;
this
.
receiverPicUrl
=
receiverPicUrl
;
this
.
updated
=
updated
;
}
}
orderCenter/src/main/java/com/dayu/order/presenter/orderpart/OrderPartPresenter.java
View file @
17e6dcfb
...
...
@@ -85,6 +85,7 @@ public class OrderPartPresenter extends OrderPartContract.Presenter {
@Override
public
void
applyOrReturnPart
()
{
toDetail
(
true
,
null
);
// if (mType == 1) {
// Bundle bundle = new Bundle();
// bundle.putInt(Constants.ORDER_ID, mOrderId);
...
...
@@ -99,9 +100,13 @@ public class OrderPartPresenter extends OrderPartContract.Presenter {
public
void
toDetail
(
boolean
canEdit
,
OrderPartListBean
partListBean
)
{
Bundle
bundle
=
new
Bundle
();
bundle
.
putBoolean
(
Constants
.
CAN_EDIT
,
canEdit
);
bundle
.
putInt
(
Constants
.
ID
,
partListBean
.
getId
());
bundle
.
putSerializable
(
Constants
.
ORDER_DETAIL
,
mDetail
);
if
(
partListBean
==
null
){
bundle
.
putInt
(
Constants
.
ID
,
-
1
);
}
else
{
bundle
.
putInt
(
Constants
.
ID
,
partListBean
.
getId
());
bundle
.
putSerializable
(
Constants
.
PART_DETAIL
,
partListBean
);
}
if
(
mType
==
1
)
{
mView
.
startActivity
(
OrderPartReceiveActivity
.
class
,
bundle
);
}
else
if
(
mType
==
2
)
{
...
...
orderCenter/src/main/java/com/dayu/order/presenter/orderpart_receive/PartRecievePresenter.java
View file @
17e6dcfb
...
...
@@ -12,6 +12,7 @@ import com.dayu.order.api.OrderService;
import
com.dayu.order.api.protocol.OrderDetail
;
import
com.dayu.order.api.protocol.bean.OrderPardDeatilBean
;
import
com.dayu.order.api.protocol.bean.OrderPartListBean
;
import
com.dayu.order.api.protocol.data.PartReceiveData
;
import
com.dayu.order.api.protocol.data.ReceivePartData
;
import
com.dayu.order.common.PartReceiverEvent
;
import
com.dayu.utils.CommonUtils
;
...
...
@@ -90,10 +91,25 @@ public class PartRecievePresenter extends PartReceiveContract.Presenter {
}
}
//收货
private
void
receivePart
(
List
<
String
>
imgs
)
{
mView
.
showDialog
();
String
picUrl
=
CommonUtils
.
list2String
(
imgs
);
PartReceiveData
receiveData
=
new
PartReceiveData
(
partId
,
remark
.
get
(),
picUrl
,
mUser
.
getAccountName
());
Api
.
getService
(
OrderService
.
class
).
receivePart
(
receiveData
).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
baseObserver
(
success
->
{
if
(
success
)
{
ToastUtils
.
showShortToast
(
"收货成功"
);
EventBus
.
getDefault
().
post
(
new
PartReceiverEvent
());
mView
.
dumpBack
();
}
else
{
ToastUtils
.
showShortToast
(
"收货失败"
);
}
}));
}
//收货
private
void
receivePartOld
(
List
<
String
>
imgs
)
{
mView
.
showDialog
();
List
<
ReceivePartData
.
PicItem
>
pics
=
null
;
if
(
imgs
!=
null
&&
imgs
.
size
()
>
0
)
{
pics
=
new
ArrayList
<>();
...
...
@@ -104,7 +120,7 @@ public class PartRecievePresenter extends PartReceiveContract.Presenter {
}
}
ReceivePartData
receivedData
=
new
ReceivePartData
(
partId
,
remark
.
get
(),
pics
);
Api
.
getService
(
OrderService
.
class
).
receivePart
(
receivedData
).
compose
(
Api
.
applySchedulers
())
Api
.
getService
(
OrderService
.
class
).
receivePart
Old
(
receivedData
).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
baseObserver
(
success
->
{
if
(
success
)
{
ToastUtils
.
showShortToast
(
"收货成功"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment