Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
app-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SuperHive
back-end
app-service
Commits
0b5adbee
Commit
0b5adbee
authored
May 09, 2020
by
zhangzc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加运单搜索接口
parent
05b00e4e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
236 additions
and
3 deletions
+236
-3
TmsWaybillInterface.java
...n/java/com/esv/freight/app/feign/TmsWaybillInterface.java
+8
-0
DriverWaybillController.java
...pp/module/waybill/controller/DriverWaybillController.java
+84
-0
OwnerWaybillController.java
...app/module/waybill/controller/OwnerWaybillController.java
+82
-0
UploadEvidenceForm.java
...v/freight/app/module/waybill/form/UploadEvidenceForm.java
+3
-3
WaybillMultiQueryForm.java
...reight/app/module/waybill/form/WaybillMultiQueryForm.java
+49
-0
WaybillDetailVO.java
...om/esv/freight/app/module/waybill/vo/WaybillDetailVO.java
+10
-0
No files found.
src/main/java/com/esv/freight/app/feign/TmsWaybillInterface.java
View file @
0b5adbee
...
@@ -55,4 +55,12 @@ public interface TmsWaybillInterface {
...
@@ -55,4 +55,12 @@ public interface TmsWaybillInterface {
*/
*/
@PostMapping
(
value
=
"tms/waybill/sign"
)
@PostMapping
(
value
=
"tms/waybill/sign"
)
JSONObject
sign
(
JSONObject
bodyJson
);
JSONObject
sign
(
JSONObject
bodyJson
);
/**
* 模糊搜索
* @param bodyJson
* @return
*/
@PostMapping
(
value
=
"tms/waybill/list/multi/condition"
)
JSONObject
condition
(
JSONObject
bodyJson
);
}
}
src/main/java/com/esv/freight/app/module/waybill/controller/DriverWaybillController.java
View file @
0b5adbee
...
@@ -10,6 +10,7 @@ import com.esv.freight.app.feign.TmsOrderInterface;
...
@@ -10,6 +10,7 @@ import com.esv.freight.app.feign.TmsOrderInterface;
import
com.esv.freight.app.feign.TmsWaybillInterface
;
import
com.esv.freight.app.feign.TmsWaybillInterface
;
import
com.esv.freight.app.module.account.service.AppLoginService
;
import
com.esv.freight.app.module.account.service.AppLoginService
;
import
com.esv.freight.app.module.waybill.form.UploadEvidenceForm
;
import
com.esv.freight.app.module.waybill.form.UploadEvidenceForm
;
import
com.esv.freight.app.module.waybill.form.WaybillMultiQueryForm
;
import
com.esv.freight.app.module.waybill.form.WaybillQueryForm
;
import
com.esv.freight.app.module.waybill.form.WaybillQueryForm
;
import
com.esv.freight.app.module.waybill.vo.WaybillDetailVO
;
import
com.esv.freight.app.module.waybill.vo.WaybillDetailVO
;
import
com.esv.freight.app.module.waybill.vo.WaybillListItemVO
;
import
com.esv.freight.app.module.waybill.vo.WaybillListItemVO
;
...
@@ -179,6 +180,8 @@ public class DriverWaybillController {
...
@@ -179,6 +180,8 @@ public class DriverWaybillController {
waybillDetailVO
.
setRequiredDeliveryTime
(
data
.
getDate
(
"requiredDeliveryTime"
));
waybillDetailVO
.
setRequiredDeliveryTime
(
data
.
getDate
(
"requiredDeliveryTime"
));
waybillDetailVO
.
setRequiredReceiveTime
(
data
.
getDate
(
"requiredReceiveTime"
));
waybillDetailVO
.
setRequiredReceiveTime
(
data
.
getDate
(
"requiredReceiveTime"
));
waybillDetailVO
.
setRequiredReceiptTime
(
data
.
getDate
(
"requiredReceiptTime"
));
waybillDetailVO
.
setRequiredReceiptTime
(
data
.
getDate
(
"requiredReceiptTime"
));
waybillDetailVO
.
setDeliveryGoodsAmount
(
data
.
getBigDecimal
(
"deliveryGoodsAmount"
));
waybillDetailVO
.
setReceiveGoodsAmount
(
data
.
getBigDecimal
(
"receiveGoodsAmount"
));
return
EResponse
.
ok
(
waybillDetailVO
);
return
EResponse
.
ok
(
waybillDetailVO
);
}
}
...
@@ -261,4 +264,85 @@ public class DriverWaybillController {
...
@@ -261,4 +264,85 @@ public class DriverWaybillController {
return
EResponse
.
ok
();
return
EResponse
.
ok
();
}
}
/**
* description 运单搜索
* param waybillQueryForm
* return com.esv.freight.common.response.EResponse
* author 张志臣
* createTime 2020/05/09 15:00
**/
@PostMapping
(
"/list/multi/condition"
)
public
EResponse
condition
(
@RequestBody
(
required
=
false
)
@Validated
(
ValidatorList
.
class
)
WaybillMultiQueryForm
waybillMultiQueryForm
)
{
appLoginService
.
checkAccessToken
();
// 调用运单列表分页查询接口
JSONObject
reqJson
=
new
JSONObject
();
reqJson
.
put
(
"condition"
,
waybillMultiQueryForm
.
getCondition
());
reqJson
.
put
(
"pageNum"
,
waybillMultiQueryForm
.
getPageNum
());
reqJson
.
put
(
"pageSize"
,
waybillMultiQueryForm
.
getPageSize
());
log
.
info
(
reqJson
.
toJSONString
());
JSONObject
result
=
tmsWaybillInterface
.
condition
(
reqJson
);
log
.
info
(
result
.
toJSONString
());
if
(
result
.
getInteger
(
"code"
)
!=
200
)
{
return
EResponse
.
error
(
result
.
getInteger
(
"code"
),
result
.
getString
(
"message"
));
}
WaybillListVO
pageResultVO
=
new
WaybillListVO
();
JSONObject
data
=
result
.
getJSONObject
(
"data"
);
pageResultVO
.
setPageSize
(
data
.
getLong
(
"pageSize"
));
pageResultVO
.
setPageNum
(
data
.
getLong
(
"pageNum"
));
pageResultVO
.
setTotal
(
data
.
getLong
(
"totalSize"
));
pageResultVO
.
setRecordSize
(
data
.
getLong
(
"recordSize"
));
if
(
pageResultVO
.
getRecordSize
()
>
0
)
{
JSONArray
items
=
data
.
getJSONArray
(
"records"
);
List
<
WaybillListItemVO
>
records
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
items
.
size
();
++
i
)
{
WaybillListItemVO
vo
=
new
WaybillListItemVO
();
JSONObject
object
=
items
.
getJSONObject
(
i
);
vo
.
setId
(
object
.
getLong
(
"id"
));
vo
.
setVehicleId
(
object
.
getLong
(
"vehicleId"
));
vo
.
setVehicleLicenseNo
(
object
.
getString
(
"vehicleLicenseNo"
));
vo
.
setWaybillNo
(
object
.
getString
(
"waybillNo"
));
vo
.
setWaybillState
(
object
.
getInteger
(
"waybillState"
));
vo
.
setDeliveryStrategy
(
object
.
getInteger
(
"deliveryStrategy"
));
vo
.
setOrderId
(
object
.
getLong
(
"orderId"
));
vo
.
setOrderNo
(
object
.
getString
(
"orderNo"
));
vo
.
setGoodsOwnerId
(
object
.
getLong
(
"goodsOwnerId"
));
vo
.
setGoodsOwnerName
(
object
.
getString
(
"goodsOwnerName"
));
vo
.
setDeliveryCityCode
(
object
.
getString
(
"deliveryCityCode"
));
vo
.
setReceiveCityCode
(
object
.
getString
(
"receiveCityCode"
));
vo
.
setDriverId
(
object
.
getLong
(
"driverId"
));
vo
.
setDriverName
(
object
.
getString
(
"driverName"
));
vo
.
setDriverPhone
(
object
.
getString
(
"driverPhone"
));
vo
.
setSettlementType
(
object
.
getString
(
"settlementType"
));
vo
.
setCarrierId
(
object
.
getLong
(
"carrierId"
));
vo
.
setCarrierName
(
object
.
getString
(
"carrierName"
));
vo
.
setBusinessType
(
object
.
getInteger
(
"businessType"
));
vo
.
setGoodsType
(
object
.
getInteger
(
"goodsType"
));
vo
.
setGoodsNameCode
(
object
.
getInteger
(
"goodsNameCode"
));
vo
.
setGoodsName
(
object
.
getString
(
"goodsName"
));
vo
.
setGoodsAmount
(
object
.
getBigDecimal
(
"goodsAmount"
));
vo
.
setFreightUnitPriceOutput
(
object
.
getBigDecimal
(
"freightUnitPriceOutput"
));
vo
.
setDeliveryEvidenceId
(
object
.
getLong
(
"deliveryEvidenceId"
));
vo
.
setDeliveryTime
(
object
.
getDate
(
"deliveryTime"
));
vo
.
setDeliveryGoodsAmount
(
object
.
getBigDecimal
(
"deliveryGoodsAmount"
));
vo
.
setReceiveEvidenceId
(
object
.
getLong
(
"receiveEvidenceId"
));
vo
.
setReceiveTime
(
object
.
getDate
(
"receiveTime"
));
vo
.
setReceiveGoodsAmount
(
object
.
getBigDecimal
(
"receiveGoodsAmount"
));
vo
.
setPayVerifyState
(
object
.
getInteger
(
"payVerifyState"
));
vo
.
setGoodsUnit
(
object
.
getInteger
(
"goodsUnit"
));
vo
.
setFreightUnitPriceInput
(
object
.
getBigDecimal
(
"freightUnitPriceInput"
));
vo
.
setCreateTime
(
object
.
getDate
(
"createTime"
));
vo
.
setRequiredDeliveryTime
(
object
.
getDate
(
"requiredDeliveryTime"
));
vo
.
setRequiredReceiveTime
(
object
.
getDate
(
"requiredReceiveTime"
));
records
.
add
(
vo
);
}
pageResultVO
.
setRecord
(
records
);
}
return
EResponse
.
ok
(
pageResultVO
);
}
}
}
src/main/java/com/esv/freight/app/module/waybill/controller/OwnerWaybillController.java
View file @
0b5adbee
...
@@ -12,6 +12,7 @@ import com.esv.freight.app.feign.TmsOrderInterface;
...
@@ -12,6 +12,7 @@ import com.esv.freight.app.feign.TmsOrderInterface;
import
com.esv.freight.app.feign.TmsWaybillInterface
;
import
com.esv.freight.app.feign.TmsWaybillInterface
;
import
com.esv.freight.app.module.account.service.AppLoginService
;
import
com.esv.freight.app.module.account.service.AppLoginService
;
import
com.esv.freight.app.module.waybill.form.UploadEvidenceForm
;
import
com.esv.freight.app.module.waybill.form.UploadEvidenceForm
;
import
com.esv.freight.app.module.waybill.form.WaybillMultiQueryForm
;
import
com.esv.freight.app.module.waybill.form.WaybillQueryForm
;
import
com.esv.freight.app.module.waybill.form.WaybillQueryForm
;
import
com.esv.freight.app.module.waybill.vo.WaybillListItemVO
;
import
com.esv.freight.app.module.waybill.vo.WaybillListItemVO
;
import
com.esv.freight.app.module.waybill.vo.WaybillListVO
;
import
com.esv.freight.app.module.waybill.vo.WaybillListVO
;
...
@@ -160,4 +161,85 @@ public class OwnerWaybillController {
...
@@ -160,4 +161,85 @@ public class OwnerWaybillController {
return
EResponse
.
ok
();
return
EResponse
.
ok
();
}
}
/**
* description 运单搜索
* param waybillQueryForm
* return com.esv.freight.common.response.EResponse
* author 张志臣
* createTime 2020/05/09 15:00
**/
@PostMapping
(
"/list/multi/condition"
)
public
EResponse
condition
(
@RequestBody
(
required
=
false
)
@Validated
(
ValidatorList
.
class
)
WaybillMultiQueryForm
waybillMultiQueryForm
)
{
appLoginService
.
checkAccessToken
();
// 调用运单列表分页查询接口
JSONObject
reqJson
=
new
JSONObject
();
reqJson
.
put
(
"condition"
,
waybillMultiQueryForm
.
getCondition
());
reqJson
.
put
(
"pageNum"
,
waybillMultiQueryForm
.
getPageNum
());
reqJson
.
put
(
"pageSize"
,
waybillMultiQueryForm
.
getPageSize
());
log
.
info
(
reqJson
.
toJSONString
());
JSONObject
result
=
tmsWaybillInterface
.
condition
(
reqJson
);
log
.
info
(
result
.
toJSONString
());
if
(
result
.
getInteger
(
"code"
)
!=
200
)
{
return
EResponse
.
error
(
result
.
getInteger
(
"code"
),
result
.
getString
(
"message"
));
}
WaybillListVO
pageResultVO
=
new
WaybillListVO
();
JSONObject
data
=
result
.
getJSONObject
(
"data"
);
pageResultVO
.
setPageSize
(
data
.
getLong
(
"pageSize"
));
pageResultVO
.
setPageNum
(
data
.
getLong
(
"pageNum"
));
pageResultVO
.
setTotal
(
data
.
getLong
(
"totalSize"
));
pageResultVO
.
setRecordSize
(
data
.
getLong
(
"recordSize"
));
if
(
pageResultVO
.
getRecordSize
()
>
0
)
{
JSONArray
items
=
data
.
getJSONArray
(
"records"
);
List
<
WaybillListItemVO
>
records
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
items
.
size
();
++
i
)
{
WaybillListItemVO
vo
=
new
WaybillListItemVO
();
JSONObject
object
=
items
.
getJSONObject
(
i
);
vo
.
setId
(
object
.
getLong
(
"id"
));
vo
.
setVehicleId
(
object
.
getLong
(
"vehicleId"
));
vo
.
setVehicleLicenseNo
(
object
.
getString
(
"vehicleLicenseNo"
));
vo
.
setWaybillNo
(
object
.
getString
(
"waybillNo"
));
vo
.
setWaybillState
(
object
.
getInteger
(
"waybillState"
));
vo
.
setDeliveryStrategy
(
object
.
getInteger
(
"deliveryStrategy"
));
vo
.
setOrderId
(
object
.
getLong
(
"orderId"
));
vo
.
setOrderNo
(
object
.
getString
(
"orderNo"
));
vo
.
setGoodsOwnerId
(
object
.
getLong
(
"goodsOwnerId"
));
vo
.
setGoodsOwnerName
(
object
.
getString
(
"goodsOwnerName"
));
vo
.
setDeliveryCityCode
(
object
.
getString
(
"deliveryCityCode"
));
vo
.
setReceiveCityCode
(
object
.
getString
(
"receiveCityCode"
));
vo
.
setDriverId
(
object
.
getLong
(
"driverId"
));
vo
.
setDriverName
(
object
.
getString
(
"driverName"
));
vo
.
setDriverPhone
(
object
.
getString
(
"driverPhone"
));
vo
.
setSettlementType
(
object
.
getString
(
"settlementType"
));
vo
.
setCarrierId
(
object
.
getLong
(
"carrierId"
));
vo
.
setCarrierName
(
object
.
getString
(
"carrierName"
));
vo
.
setBusinessType
(
object
.
getInteger
(
"businessType"
));
vo
.
setGoodsType
(
object
.
getInteger
(
"goodsType"
));
vo
.
setGoodsNameCode
(
object
.
getInteger
(
"goodsNameCode"
));
vo
.
setGoodsName
(
object
.
getString
(
"goodsName"
));
vo
.
setGoodsAmount
(
object
.
getBigDecimal
(
"goodsAmount"
));
vo
.
setFreightUnitPriceOutput
(
object
.
getBigDecimal
(
"freightUnitPriceOutput"
));
vo
.
setDeliveryEvidenceId
(
object
.
getLong
(
"deliveryEvidenceId"
));
vo
.
setDeliveryTime
(
object
.
getDate
(
"deliveryTime"
));
vo
.
setDeliveryGoodsAmount
(
object
.
getBigDecimal
(
"deliveryGoodsAmount"
));
vo
.
setReceiveEvidenceId
(
object
.
getLong
(
"receiveEvidenceId"
));
vo
.
setReceiveTime
(
object
.
getDate
(
"receiveTime"
));
vo
.
setReceiveGoodsAmount
(
object
.
getBigDecimal
(
"receiveGoodsAmount"
));
vo
.
setPayVerifyState
(
object
.
getInteger
(
"payVerifyState"
));
vo
.
setGoodsUnit
(
object
.
getInteger
(
"goodsUnit"
));
vo
.
setFreightUnitPriceInput
(
object
.
getBigDecimal
(
"freightUnitPriceInput"
));
vo
.
setCreateTime
(
object
.
getDate
(
"createTime"
));
vo
.
setRequiredDeliveryTime
(
object
.
getDate
(
"requiredDeliveryTime"
));
vo
.
setRequiredReceiveTime
(
object
.
getDate
(
"requiredReceiveTime"
));
records
.
add
(
vo
);
}
pageResultVO
.
setRecord
(
records
);
}
return
EResponse
.
ok
(
pageResultVO
);
}
}
}
src/main/java/com/esv/freight/app/module/waybill/form/UploadEvidenceForm.java
View file @
0b5adbee
...
@@ -44,19 +44,19 @@ public class UploadEvidenceForm {
...
@@ -44,19 +44,19 @@ public class UploadEvidenceForm {
private
String
pictureUrl01
;
private
String
pictureUrl01
;
/**
/**
* 发货单据0
1
URL
* 发货单据0
2
URL
*/
*/
@Length
(
max
=
500
,
message
=
"参数pictureUrl01长度不合法"
,
groups
=
{
ValidatorInsert
.
class
})
@Length
(
max
=
500
,
message
=
"参数pictureUrl01长度不合法"
,
groups
=
{
ValidatorInsert
.
class
})
private
String
pictureUrl02
;
private
String
pictureUrl02
;
/**
/**
* 发货单据0
1
URL
* 发货单据0
3
URL
*/
*/
@Length
(
max
=
500
,
message
=
"参数pictureUrl01长度不合法"
,
groups
=
{
ValidatorInsert
.
class
})
@Length
(
max
=
500
,
message
=
"参数pictureUrl01长度不合法"
,
groups
=
{
ValidatorInsert
.
class
})
private
String
pictureUrl03
;
private
String
pictureUrl03
;
/**
/**
* 发货单据0
1
URL
* 发货单据0
4
URL
*/
*/
@Length
(
max
=
500
,
message
=
"参数pictureUrl01长度不合法"
,
groups
=
{
ValidatorInsert
.
class
})
@Length
(
max
=
500
,
message
=
"参数pictureUrl01长度不合法"
,
groups
=
{
ValidatorInsert
.
class
})
private
String
pictureUrl04
;
private
String
pictureUrl04
;
...
...
src/main/java/com/esv/freight/app/module/waybill/form/WaybillMultiQueryForm.java
0 → 100644
View file @
0b5adbee
package
com
.
esv
.
freight
.
app
.
module
.
waybill
.
form
;
import
com.esv.freight.app.common.validator.groups.ValidatorList
;
import
com.esv.freight.app.module.account.validator.groups.ValidatorLoginByPwd
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
org.hibernate.validator.constraints.Length
;
import
org.hibernate.validator.constraints.Range
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
/**
* @description:
* @project: freight-app-service
* @name: com.esv.freight.app.module.waybill.form.WaybillMultiQueryForm
* @author: 张志臣
* @email: zhangzhichen@esvtek.com
* @createTime: 2020/05/09 14:00
* @version:1.0
*/
@Data
public
class
WaybillMultiQueryForm
{
/**
* 运单号
*/
@Length
(
max
=
64
,
message
=
"参数condition长度不合法"
,
groups
=
{
ValidatorList
.
class
})
@NotBlank
(
message
=
"参数condition不能为空"
,
groups
=
{
ValidatorList
.
class
})
private
String
condition
;
/**
* 当前页数
*/
@NotNull
(
message
=
"参数pageNum不能为空"
,
groups
=
{
ValidatorList
.
class
})
private
Long
pageNum
;
/**
* 每页显示记录数
*/
@Range
(
min
=
1
,
max
=
1000
,
message
=
"pageSize"
,
groups
=
{
ValidatorList
.
class
})
@NotNull
(
message
=
"参数pageSize不能为空"
,
groups
=
{
ValidatorList
.
class
})
private
Long
pageSize
;
@Override
public
String
toString
()
{
return
ToStringBuilder
.
reflectionToString
(
this
,
ToStringStyle
.
JSON_STYLE
);
}
}
src/main/java/com/esv/freight/app/module/waybill/vo/WaybillDetailVO.java
View file @
0b5adbee
...
@@ -129,6 +129,16 @@ public class WaybillDetailVO {
...
@@ -129,6 +129,16 @@ public class WaybillDetailVO {
*/
*/
private
Date
requiredReceiptTime
;
private
Date
requiredReceiptTime
;
/**
* 实际发货运单量
*/
private
BigDecimal
deliveryGoodsAmount
;
/**
* 实际收货运单量
*/
private
BigDecimal
receiveGoodsAmount
;
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
ToStringBuilder
.
reflectionToString
(
this
,
ToStringStyle
.
JSON_STYLE
);
return
ToStringBuilder
.
reflectionToString
(
this
,
ToStringStyle
.
JSON_STYLE
);
...
...
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