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
6b48e616
authored
Oct 19, 2020
by
mReturn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
服务工单备件发货功能开发
parent
71bcc145
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
97 additions
and
2 deletions
orderCenter/src/main/java/com/dayu/order/api/OrderService.java
orderCenter/src/main/java/com/dayu/order/api/protocol/data/PartSendData.java
orderCenter/src/main/java/com/dayu/order/presenter/orderpart_send/PartSendPresenter.java
orderCenter/src/main/java/com/dayu/order/api/OrderService.java
View file @
6b48e616
...
...
@@ -32,6 +32,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.PartSendData
;
import
com.dayu.order.api.protocol.data.ReceivePartData
;
import
com.dayu.order.api.protocol.data.SendPartData
;
import
com.dayu.order.common.OrderConstant
;
...
...
@@ -498,8 +499,14 @@ public interface OrderService {
/**
* 工单向商家发送备件
*/
@POST
(
Constants
.
API_7700
+
"/spSendOutGoods/engineerSave"
)
Observable
<
BaseResponse
<
Boolean
>>
sendPart
(
@Body
PartSendData
data
);
/**
* 工单向商家发送备件(旧版)
*/
@POST
(
Constants
.
API_7200
+
"/ordersLogistics"
)
Observable
<
BaseResponse
<
Boolean
>>
sendPart
(
@Body
SendPartData
data
);
Observable
<
BaseResponse
<
Boolean
>>
sendPart
Old
(
@Body
SendPartData
data
);
/**
* 备件收货
...
...
orderCenter/src/main/java/com/dayu/order/api/protocol/data/PartSendData.java
0 → 100644
View file @
6b48e616
package
com
.
dayu
.
order
.
api
.
protocol
.
data
;
public
class
PartSendData
{
public
int
orderId
;
//工单ID ,
public
String
orderNum
;
//工单编号
public
int
pointToPoint
=
2
;
//发送方向 2engineer_to_sp ,
public
String
receiverAddress
;
//详细地址 ,
public
String
receiverMobile
;
//收货人手机号 ,
public
String
receiverName
;
//收货人 ,
public
String
sendPicUrl
;
//发货图片
public
String
sendAddress
;
//发货人地址 ,
public
String
sendCourierNumber
;
//发货方发货快递公司单号
public
String
sendCourierCompany
;
//发货方发货快递公司 ,
public
String
sendShipperCode
;
//发货方发货快递公司编码
public
String
sendMobile
;
//发货人手机号 ,
public
String
sendName
;
//发货人 ,
public
String
sendStoreName
;
//发货方(对于服务商/服务站,记录服务商/服务站名。对于师傅端记录师傅名称) ,
public
int
sendType
=
2
;
//2其他 ,
public
String
sparePartName
;
//备件的名称/发货清单 ,
public
int
status
=
2
;
//2已发货
public
int
sendStoreId
;
//发货库ID , (服务商 createdproviderid 服务站 sitid 大鱼 -1)
public
int
sendStoreType
;
//1总库(服务商) 2分库(服务站【自营的和授权的服务站】)
public
PartSendData
()
{
}
public
PartSendData
(
int
orderId
,
String
orderNum
,
String
receiverAddress
,
String
receiverMobile
,
String
receiverName
,
String
sendPicUrl
,
String
sendAddress
,
String
sendCourierNumber
,
String
sendCourierCompany
,
String
sendShipperCode
,
String
sendMobile
,
String
sendName
,
String
sendStoreName
,
String
sparePartName
,
int
sendStoreId
,
int
sendStoreType
)
{
this
.
orderId
=
orderId
;
this
.
orderNum
=
orderNum
;
this
.
receiverAddress
=
receiverAddress
;
this
.
receiverMobile
=
receiverMobile
;
this
.
receiverName
=
receiverName
;
this
.
sendPicUrl
=
sendPicUrl
;
this
.
sendAddress
=
sendAddress
;
this
.
sendCourierNumber
=
sendCourierNumber
;
this
.
sendCourierCompany
=
sendCourierCompany
;
this
.
sendShipperCode
=
sendShipperCode
;
this
.
sendMobile
=
sendMobile
;
this
.
sendName
=
sendName
;
this
.
sendStoreName
=
sendStoreName
;
this
.
sparePartName
=
sparePartName
;
this
.
sendStoreId
=
sendStoreId
;
this
.
sendStoreType
=
sendStoreType
;
}
}
orderCenter/src/main/java/com/dayu/order/presenter/orderpart_send/PartSendPresenter.java
View file @
6b48e616
...
...
@@ -15,8 +15,10 @@ import com.dayu.order.api.OrderService;
import
com.dayu.order.api.protocol.OrderDetail
;
import
com.dayu.order.api.protocol.ShipperCompany
;
import
com.dayu.order.api.protocol.bean.OrderPardDeatilBean
;
import
com.dayu.order.api.protocol.data.PartSendData
;
import
com.dayu.order.api.protocol.data.SendPartData
;
import
com.dayu.order.common.PartSendEvent
;
import
com.dayu.utils.CommonUtils
;
import
com.dayu.utils.ToastUtils
;
import
com.dayu.utils.UserManager
;
...
...
@@ -38,6 +40,9 @@ public class PartSendPresenter extends PartSendContract.Presenter {
private
String
mShipperCode
;
private
UserInfo
mUser
;
private
boolean
canEdit
;
private
int
sendStoreId
=
-
1
;
private
int
sendStoreType
=
-
1
;
private
String
useAddress
;
@Override
...
...
@@ -53,9 +58,13 @@ public class PartSendPresenter extends PartSendContract.Presenter {
return
;
}
if
(
mDetail
.
getSource
()
==
1
)
{
sendStoreType
=
2
;
sendStoreId
=
mDetail
.
getSiteId
();
mView
.
showDialog
();
getStationInfo
();
}
else
if
(
mDetail
.
getSource
()
==
5
||
mDetail
.
getSource
()
==
6
)
{
sendStoreType
=
1
;
sendStoreId
=
mDetail
.
getCreateProviderId
();
mView
.
showDialog
();
getProviderInfo
();
}
else
{
...
...
@@ -64,6 +73,17 @@ public class PartSendPresenter extends PartSendContract.Presenter {
contacter
.
set
(
"大鱼云服"
);
contactPhone
.
set
(
"400-0086-898"
);
}
getUserAddrData
();
}
//获取用户地址
private
void
getUserAddrData
()
{
Api
.
getService
(
APIService
.
class
).
getAddressInfo
(
Integer
.
parseInt
(
mUser
.
getAccountId
())).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
baseObserver
(
data
->
{
useAddress
=
data
.
getProvinceName
()+
" "
+
data
.
getCityName
()
+
" "
+
data
.
getDistrictName
()+
" "
+
data
.
getAddress
();
}));
}
//获取发货详情
...
...
@@ -193,6 +213,25 @@ public class PartSendPresenter extends PartSendContract.Presenter {
//发货
private
void
sendPart
(
List
<
String
>
imgs
)
{
String
picUrl
=
CommonUtils
.
list2String
(
imgs
);
mView
.
showDialog
();
PartSendData
sendData
=
new
PartSendData
(
mDetail
.
getId
(),
mDetail
.
getOrderNum
(),
address
.
get
(),
contactPhone
.
get
(),
contacter
.
get
(),
picUrl
,
useAddress
,
courierNum
.
get
(),
courierCompany
.
get
(),
mShipperCode
,
mUser
.
getMobile
(),
mUser
.
getAccountName
(),
mUser
.
getAccountName
(),
goodsListStr
.
get
(),
sendStoreId
,
sendStoreType
);
Api
.
getService
(
OrderService
.
class
).
sendPart
(
sendData
).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
baseObserver
(
success
->
{
if
(
success
)
{
ToastUtils
.
showShortToast
(
"发送成功"
);
EventBus
.
getDefault
().
post
(
new
PartSendEvent
());
mView
.
dumpBack
();
}
else
{
ToastUtils
.
showShortToast
(
"发送失败"
);
}
}));
}
//发货(旧版废弃)
private
void
sendPartOld
(
List
<
String
>
imgs
)
{
mView
.
showDialog
();
List
<
SendPartData
.
PicItem
>
pics
=
new
ArrayList
<>();
if
(
imgs
!=
null
&&
imgs
.
size
()
>
0
)
{
...
...
@@ -206,7 +245,7 @@ public class PartSendPresenter extends PartSendContract.Presenter {
address
.
get
(),
contactPhone
.
get
(),
contacter
.
get
(),
mUser
.
getSiteId
(),
goodsListStr
.
get
(),
mUser
.
getMobile
(),
mUser
.
getAccountName
(),
mShipperCode
);
sendData
.
receiveOrg
=
company
.
get
();
Api
.
getService
(
OrderService
.
class
).
sendPart
(
sendData
).
compose
(
Api
.
applySchedulers
())
Api
.
getService
(
OrderService
.
class
).
sendPart
Old
(
sendData
).
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