Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
Aidea
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sa_aidea
Aidea
Commits
50664c26
Commit
50664c26
authored
Oct 22, 2020
by
谢希宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Aidea product update by Strive Date 2020-10-14
parent
1ac2b19d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
1999 additions
and
275 deletions
+1999
-275
OrderDetailsMapper.xml
...in/java/com/cftech/orderdetail/dao/OrderDetailsMapper.xml
+111
-107
OrderDetails.java
.../main/java/com/cftech/orderdetail/model/OrderDetails.java
+50
-49
pom.xml
aidea-modules/order-module/pom.xml
+7
-1
Order.java
...er-module/src/main/java/com/cftech/order/model/Order.java
+71
-70
OrderDetail.java
...ule/src/main/java/com/cftech/order/model/OrderDetail.java
+49
-46
OrderController.java
...e/src/main/java/com/cftech/order/web/OrderController.java
+1
-1
pom.xml
aidea-modules/pom.xml
+2
-0
pom.xml
aidea-modules/waybill-module-web/pom.xml
+28
-0
waybillform.html
...eb/src/main/webapp/WEB-INF/views/waybill/waybillform.html
+194
-0
waybilllist.html
...eb/src/main/webapp/WEB-INF/views/waybill/waybilllist.html
+285
-0
pom.xml
aidea-modules/waybill-module/pom.xml
+36
-0
WaybillMapper.java
...e/src/main/java/com/cftech/waybill/dao/WaybillMapper.java
+14
-0
WaybillMapper.xml
...le/src/main/java/com/cftech/waybill/dao/WaybillMapper.xml
+259
-0
Waybill.java
...odule/src/main/java/com/cftech/waybill/model/Waybill.java
+105
-0
WaybillService.java
.../main/java/com/cftech/waybill/service/WaybillService.java
+15
-0
WaybillServiceImpl.java
...a/com/cftech/waybill/service/impl/WaybillServiceImpl.java
+31
-0
CloseableHttpEntity.java
...in/java/com/cftech/waybill/utils/CloseableHttpEntity.java
+21
-0
ExpressOrderInfoUtils.java
.../java/com/cftech/waybill/utils/ExpressOrderInfoUtils.java
+215
-0
FqConstants.java
...e/src/main/java/com/cftech/waybill/utils/FqConstants.java
+37
-0
FqHttpUtils.java
...e/src/main/java/com/cftech/waybill/utils/FqHttpUtils.java
+273
-0
WaybillController.java
...c/main/java/com/cftech/waybill/web/WaybillController.java
+184
-0
common-test.properties
cftech-common-web/src/main/resources/common-test.properties
+5
-1
pom.xml
portal-web/pom.xml
+6
-0
No files found.
aidea-modules/order-detail-module/src/main/java/com/cftech/orderdetail/dao/OrderDetailsMapper.xml
View file @
50664c26
This diff is collapsed.
Click to expand it.
aidea-modules/order-detail-module/src/main/java/com/cftech/orderdetail/model/OrderDetails.java
View file @
50664c26
...
...
@@ -8,69 +8,70 @@ import java.io.Serializable;
import
java.util.Date
;
/**
* 订单管理
*
* @author Licc
* @date: 2020-10-16 11:26
*/
* 订单管理
*
* @author Licc
* @date: 2020-10-16 11:26
*/
@Data
public
class
OrderDetails
implements
Serializable
{
/* 主键id */
private
Long
id
;
/* 订单id */
@ExportConfig
(
value
=
"订单id"
,
width
=
100
,
showLevel
=
1
)
/* 主键id */
private
Long
id
;
/* 订单id */
@ExportConfig
(
value
=
"订单id"
,
width
=
100
,
showLevel
=
1
)
private
Long
orderId
;
/* 订单编码 */
@ExportConfig
(
value
=
"订单编码"
,
width
=
100
,
showLevel
=
1
)
/* 订单编码 */
@ExportConfig
(
value
=
"订单编码"
,
width
=
100
,
showLevel
=
1
)
private
String
orderCode
;
/* 商品id */
@ExportConfig
(
value
=
"商品id"
,
width
=
100
,
showLevel
=
1
)
/* 商品id */
@ExportConfig
(
value
=
"商品id"
,
width
=
100
,
showLevel
=
1
)
private
Long
drugsId
;
/* 商品数量 */
@ExportConfig
(
value
=
"商品数量"
,
width
=
100
,
showLevel
=
1
)
/* 商品名称 */
@ExportConfig
(
value
=
"商品名称"
,
width
=
100
,
showLevel
=
1
)
private
String
drugsName
;
/* 商品数量 */
@ExportConfig
(
value
=
"商品数量"
,
width
=
100
,
showLevel
=
1
)
private
Long
drugsNum
;
/* 用户所属公众号id */
@ExportConfig
(
value
=
"用户所属公众号id"
,
width
=
100
,
showLevel
=
1
)
/* 用户所属公众号id */
@ExportConfig
(
value
=
"用户所属公众号id"
,
width
=
100
,
showLevel
=
1
)
private
String
openid
;
/* 商品价格 */
@ExportConfig
(
value
=
"商品价格"
,
width
=
100
,
showLevel
=
1
)
/* 商品价格 */
@ExportConfig
(
value
=
"商品价格"
,
width
=
100
,
showLevel
=
1
)
private
Double
price
;
/* 商品总价 */
@ExportConfig
(
value
=
"商品总价"
,
width
=
100
,
showLevel
=
1
)
/* 商品总价 */
@ExportConfig
(
value
=
"商品总价"
,
width
=
100
,
showLevel
=
1
)
private
Double
amount
;
/* 商品编码 */
@ExportConfig
(
value
=
"商品编码"
,
width
=
100
,
showLevel
=
1
)
/* 商品编码 */
@ExportConfig
(
value
=
"商品编码"
,
width
=
100
,
showLevel
=
1
)
private
String
drugsCode
;
/* 商品sku(规格) */
@ExportConfig
(
value
=
"商品sku(规格)"
,
width
=
100
,
showLevel
=
1
)
/* 商品sku(规格) */
@ExportConfig
(
value
=
"商品sku(规格)"
,
width
=
100
,
showLevel
=
1
)
private
String
drugsSku
;
/* 对应erp物料号 */
@ExportConfig
(
value
=
"对应erp物料号"
,
width
=
100
,
showLevel
=
1
)
/* 对应erp物料号 */
@ExportConfig
(
value
=
"对应erp物料号"
,
width
=
100
,
showLevel
=
1
)
private
String
drugsMateriel
;
/* 所属的账号 */
private
Long
accountsId
;
/* 删除标识 */
private
boolean
delFlag
;
/* 状态 */
private
String
status
;
/* 创建时间 */
@JSONField
(
format
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
/* 更新时间 */
private
Date
updateTime
;
/* 备注 */
private
String
description
;
/* 创建人 */
private
Long
createBy
;
/* 更新人 */
private
Long
updateBy
;
/* 所属的账号 */
private
Long
accountsId
;
/* 删除标识 */
private
boolean
delFlag
;
/* 状态 */
private
String
status
;
/* 创建时间 */
@JSONField
(
format
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
/* 更新时间 */
private
Date
updateTime
;
/* 备注 */
private
String
description
;
/* 创建人 */
private
Long
createBy
;
/* 更新人 */
private
Long
updateBy
;
private
String
productName
;
public
OrderDetails
()
{
this
.
delFlag
=
false
;
this
.
status
=
"0"
;
public
OrderDetails
()
{
this
.
delFlag
=
false
;
this
.
status
=
"0"
;
}
}
\ No newline at end of file
aidea-modules/order-module/pom.xml
View file @
50664c26
...
...
@@ -11,5 +11,11 @@
<artifactId>
order-module
</artifactId>
<dependencies>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
order-detail-module
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
aidea-modules/order-module/src/main/java/com/cftech/order/model/Order.java
View file @
50664c26
...
...
@@ -11,82 +11,82 @@ import java.util.List;
import
java.util.stream.Collectors
;
/**
* 订单管理
*
* @author Licc
* @date: 2020-10-10 14:20
*/
public
class
Order
extends
OrderDetail
implements
Serializable
{
/* 主键id */
private
Long
id
;
/* 订单编码 */
@ExportConfig
(
value
=
"订单编码"
,
width
=
100
,
showLevel
=
1
)
private
String
orderCode
;
/* 咨询单id */
@ExportConfig
(
value
=
"咨询单id"
,
width
=
100
,
showLevel
=
1
)
* 订单管理
*
* @author Licc
* @date: 2020-10-10 14:20
*/
public
class
Order
extends
OrderDetail
implements
Serializable
{
/* 主键id */
private
Long
id
;
/* 订单编码 */
@ExportConfig
(
value
=
"订单编码"
,
width
=
100
,
showLevel
=
1
)
private
String
orderCode
;
/* 咨询单id */
@ExportConfig
(
value
=
"咨询单id"
,
width
=
100
,
showLevel
=
1
)
private
Long
consultId
;
/* 咨询单编码 */
@ExportConfig
(
value
=
"咨询单编码"
,
width
=
100
,
showLevel
=
1
)
/* 咨询单编码 */
@ExportConfig
(
value
=
"咨询单编码"
,
width
=
100
,
showLevel
=
1
)
private
String
number
;
/* 所属会员id */
@ExportConfig
(
value
=
"所属会员id"
,
width
=
100
,
showLevel
=
1
)
/* 所属会员id */
@ExportConfig
(
value
=
"所属会员id"
,
width
=
100
,
showLevel
=
1
)
private
Long
memberId
;
/* 客服id */
@ExportConfig
(
value
=
"客服id"
,
width
=
100
,
showLevel
=
1
)
/* 客服id */
@ExportConfig
(
value
=
"客服id"
,
width
=
100
,
showLevel
=
1
)
private
Long
serviceId
;
/* 医生id */
@ExportConfig
(
value
=
"医生id"
,
width
=
100
,
showLevel
=
1
)
/* 医生id */
@ExportConfig
(
value
=
"医生id"
,
width
=
100
,
showLevel
=
1
)
private
Long
doctorId
;
/* 用户所属公众号id */
@ExportConfig
(
value
=
"用户所属公众号id"
,
width
=
100
,
showLevel
=
1
)
/* 用户所属公众号id */
@ExportConfig
(
value
=
"用户所属公众号id"
,
width
=
100
,
showLevel
=
1
)
private
String
openid
;
/* 付款状态 0未付款 1已付款 */
@ExportConfig
(
value
=
"付款状态 0未付款 1已付款"
,
width
=
100
,
showLevel
=
1
)
/* 付款状态 0未付款 1已付款 */
@ExportConfig
(
value
=
"付款状态 0未付款 1已付款"
,
width
=
100
,
showLevel
=
1
)
private
Long
payStatus
;
/* 付款金额 */
@ExportConfig
(
value
=
"付款金额"
,
width
=
100
,
showLevel
=
1
)
private
Double
payAmount
;
/* 订单金额 */
@ExportConfig
(
value
=
"订单金额"
,
width
=
100
,
showLevel
=
1
)
/* 付款金额 */
@ExportConfig
(
value
=
"付款金额"
,
width
=
100
,
showLevel
=
1
)
private
Double
payAmount
;
/* 订单金额 */
@ExportConfig
(
value
=
"订单金额"
,
width
=
100
,
showLevel
=
1
)
private
Double
orderAmount
;
/* 商品最终金额 */
@ExportConfig
(
value
=
"商品最终金额"
,
width
=
100
,
showLevel
=
1
)
/* 商品最终金额 */
@ExportConfig
(
value
=
"商品最终金额"
,
width
=
100
,
showLevel
=
1
)
private
Double
totalAmount
;
/* 付款时间 */
@ExportConfig
(
value
=
"付款时间"
,
width
=
100
,
showLevel
=
1
)
/* 付款时间 */
@ExportConfig
(
value
=
"付款时间"
,
width
=
100
,
showLevel
=
1
)
private
Date
payTime
;
/* 交易号 支付宝/第三方平台 返回订单号 */
@ExportConfig
(
value
=
"交易号 支付宝/第三方平台 返回订单号"
,
width
=
100
,
showLevel
=
1
)
/* 交易号 支付宝/第三方平台 返回订单号 */
@ExportConfig
(
value
=
"交易号 支付宝/第三方平台 返回订单号"
,
width
=
100
,
showLevel
=
1
)
private
String
tradeNo
;
/* 卖家备注 */
@ExportConfig
(
value
=
"卖家备注"
,
width
=
100
,
showLevel
=
1
)
/* 卖家备注 */
@ExportConfig
(
value
=
"卖家备注"
,
width
=
100
,
showLevel
=
1
)
private
String
remarks
;
/* 订单取消原因 */
@ExportConfig
(
value
=
"订单取消原因"
,
width
=
100
,
showLevel
=
1
)
/* 订单取消原因 */
@ExportConfig
(
value
=
"订单取消原因"
,
width
=
100
,
showLevel
=
1
)
private
String
orderCancel
;
/* 所属的账号 */
private
Long
accountsId
;
/* 删除标识 */
private
boolean
delFlag
;
/* 状态 */
private
String
status
;
/* 创建时间 */
@JSONField
(
format
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
/* 更新时间 */
private
Date
updateTime
;
/* 备注 */
private
String
description
;
/* 创建人 */
private
Long
createBy
;
/* 更新人 */
private
Long
updateBy
;
private
Long
confirm
;
private
String
courierNumber
;
/* 所属的账号 */
private
Long
accountsId
;
/* 删除标识 */
private
boolean
delFlag
;
/* 状态 */
private
String
status
;
/* 创建时间 */
@JSONField
(
format
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
/* 更新时间 */
private
Date
updateTime
;
/* 备注 */
private
String
description
;
/* 创建人 */
private
Long
createBy
;
/* 更新人 */
private
Long
updateBy
;
private
Long
confirm
;
private
String
courierNumber
;
/* 产品编码 */
private
String
productNumber
;
...
...
@@ -98,9 +98,10 @@ private String courierNumber;
private
Long
productId
;
private
List
<
ProductVO
>
list
;
public
Order
()
{
this
.
delFlag
=
false
;
this
.
status
=
"0"
;
public
Order
()
{
this
.
delFlag
=
false
;
this
.
status
=
"0"
;
}
@Override
...
...
@@ -342,11 +343,11 @@ public Order() {
}
public
String
getProductName
()
{
if
(
list
==
null
)
{
return
null
;
}
if
(
list
==
null
)
{
return
null
;
}
List
<
String
>
collect
=
this
.
list
.
stream
().
map
(
x
->
x
.
getProductName
()).
collect
(
Collectors
.
toList
());
return
StringUtils
.
join
(
collect
,
";"
);
return
StringUtils
.
join
(
collect
,
";"
);
}
public
void
setProductName
(
String
productName
)
{
...
...
aidea-modules/order-module/src/main/java/com/cftech/order/model/OrderDetail.java
View file @
50664c26
...
...
@@ -7,66 +7,69 @@ import java.io.Serializable;
import
java.util.Date
;
/**
* 订单管理
*
* @author Licc
* @date: 2020-10-10 15:37
*/
* 订单管理
*
* @author Licc
* @date: 2020-10-10 15:37
*/
@Data
public
class
OrderDetail
implements
Serializable
{
/* 主键id */
private
Long
id
;
/* 订单id */
@ExportConfig
(
value
=
"订单id"
,
width
=
100
,
showLevel
=
1
)
/* 主键id */
private
Long
id
;
/* 订单id */
@ExportConfig
(
value
=
"订单id"
,
width
=
100
,
showLevel
=
1
)
private
Long
orderId
;
/* 订单编码 */
@ExportConfig
(
value
=
"订单编码"
,
width
=
100
,
showLevel
=
1
)
/* 订单编码 */
@ExportConfig
(
value
=
"订单编码"
,
width
=
100
,
showLevel
=
1
)
private
String
orderCode
;
/* 商品id */
@ExportConfig
(
value
=
"商品id"
,
width
=
100
,
showLevel
=
1
)
/* 商品id */
@ExportConfig
(
value
=
"商品id"
,
width
=
100
,
showLevel
=
1
)
private
Long
drugsId
;
/* 商品数量 */
@ExportConfig
(
value
=
"商品数量"
,
width
=
100
,
showLevel
=
1
)
/* 商品数量 */
@ExportConfig
(
value
=
"商品名称"
,
width
=
100
,
showLevel
=
1
)
private
String
drugsName
;
/* 商品数量 */
@ExportConfig
(
value
=
"商品数量"
,
width
=
100
,
showLevel
=
1
)
private
Long
drugsNum
;
/* 用户所属公众号id */
@ExportConfig
(
value
=
"用户所属公众号id"
,
width
=
100
,
showLevel
=
1
)
/* 用户所属公众号id */
@ExportConfig
(
value
=
"用户所属公众号id"
,
width
=
100
,
showLevel
=
1
)
private
String
openid
;
/* 商品价格 */
@ExportConfig
(
value
=
"商品价格"
,
width
=
100
,
showLevel
=
1
)
/* 商品价格 */
@ExportConfig
(
value
=
"商品价格"
,
width
=
100
,
showLevel
=
1
)
private
Double
price
;
/* 商品总价 */
@ExportConfig
(
value
=
"商品总价
"
,
width
=
100
,
showLevel
=
1
)
/* 商品总价 */
@ExportConfig
(
value
=
"商品实际价格
"
,
width
=
100
,
showLevel
=
1
)
private
Double
amount
;
/* 商品编码 */
@ExportConfig
(
value
=
"商品编码"
,
width
=
100
,
showLevel
=
1
)
/* 商品编码 */
@ExportConfig
(
value
=
"商品编码"
,
width
=
100
,
showLevel
=
1
)
private
String
drugsCode
;
/* 商品sku(规格) */
@ExportConfig
(
value
=
"商品sku(规格)"
,
width
=
100
,
showLevel
=
1
)
/* 商品sku(规格) */
@ExportConfig
(
value
=
"商品sku(规格)"
,
width
=
100
,
showLevel
=
1
)
private
String
drugsSku
;
/* 对应erp物料号 */
@ExportConfig
(
value
=
"对应erp物料号"
,
width
=
100
,
showLevel
=
1
)
/* 对应erp物料号 */
@ExportConfig
(
value
=
"对应erp物料号"
,
width
=
100
,
showLevel
=
1
)
private
String
drugsMateriel
;
/* 所属的账号 */
private
Long
accountsId
;
/* 删除标识 */
private
boolean
delFlag
;
/* 状态 */
private
String
status
;
/* 创建时间 */
private
Date
createTime
;
/* 更新时间 */
private
Date
updateTime
;
/* 备注 */
private
String
description
;
/* 创建人 */
private
Long
createBy
;
/* 更新人 */
private
Long
updateBy
;
/* 所属的账号 */
private
Long
accountsId
;
/* 删除标识 */
private
boolean
delFlag
;
/* 状态 */
private
String
status
;
/* 创建时间 */
private
Date
createTime
;
/* 更新时间 */
private
Date
updateTime
;
/* 备注 */
private
String
description
;
/* 创建人 */
private
Long
createBy
;
/* 更新人 */
private
Long
updateBy
;
public
OrderDetail
()
{
this
.
delFlag
=
false
;
this
.
status
=
"0"
;
public
OrderDetail
()
{
this
.
delFlag
=
false
;
this
.
status
=
"0"
;
}
}
\ No newline at end of file
aidea-modules/order-module/src/main/java/com/cftech/order/web/OrderController.java
View file @
50664c26
...
...
@@ -54,7 +54,7 @@ public class OrderController {
public
static
final
String
ORDER_VIEW
=
"qy:order:view"
;
public
static
final
String
ORDER_EDIT
=
"qy:order:edit"
;
public
static
final
DoubleJSONFilter
DOUBLE_JSON_FILTER
=
new
DoubleJSONFilter
();
public
static
final
DoubleJSONFilter
DOUBLE_JSON_FILTER
=
new
DoubleJSONFilter
();
@Autowired
private
OrderService
orderService
;
...
...
aidea-modules/pom.xml
View file @
50664c26
...
...
@@ -28,6 +28,8 @@
<module>
order-detail-module-web
</module>
<module>
reportform-module
</module>
<module>
reportform-module-web
</module>
<module>
waybill-module
</module>
<module>
waybill-module-web
</module>
</modules>
...
...
aidea-modules/waybill-module-web/pom.xml
0 → 100644
View file @
50664c26
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
>
<parent>
<artifactId>
aidea-modules
</artifactId>
<groupId>
com.cftech
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.cftech
</groupId>
<name>
waybill-module-web
</name>
<artifactId>
waybill-module-web
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<packaging>
war
</packaging>
<dependencies>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
waybill-module
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependencies>
<build>
<finalName>
waybill-module-web
</finalName>
</build>
</project>
aidea-modules/waybill-module-web/src/main/webapp/WEB-INF/views/waybill/waybillform.html
0 → 100644
View file @
50664c26
<!DOCTYPE html>
<!--[if IE 8]>
<html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]>
<html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html>
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<base
href=
"#springUrl('/assets/adminlte/')"
/>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<title>
工作台
</title>
<!-- Tell the browser to be responsive to screen width -->
<meta
content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
name=
"viewport"
>
<!-- Bootstrap 3.3.5 -->
<link
rel=
"stylesheet"
href=
"bootstrap/css/bootstrap.min.css"
>
<!-- Font Awesome -->
<link
rel=
"stylesheet"
href=
"plugins/font-awesome/css/font-awesome.min.css"
>
<!-- Ionicons -->
<link
rel=
"stylesheet"
href=
"plugins/ionicons/css/ionicons.min.css"
>
<!-- DataTables -->
<link
rel=
"stylesheet"
href=
"plugins/datatables/dataTables.bootstrap.css"
>
<!-- Theme style -->
<link
rel=
"stylesheet"
href=
"dist/css/AdminLTE.min.css"
>
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link
rel=
"stylesheet"
href=
"dist/css/skins/_all-skins.min.css"
>
<!-- iCheck -->
<link
rel=
"stylesheet"
href=
"plugins/iCheck/flat/blue.css"
>
<!-- Date Picker -->
<link
rel=
"stylesheet"
href=
"plugins/datepicker/datepicker3.css"
>
<!-- Daterange picker -->
<link
rel=
"stylesheet"
href=
"plugins/daterangepicker/daterangepicker-bs3.css"
>
<!-- bootstrap wysihtml5 - text editor -->
<link
rel=
"stylesheet"
href=
"plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css"
>
<!--validate css-->
<link
rel=
"stylesheet"
href=
"plugins/jquery-validation/css/validate.css"
>
<!--fileinput css-->
<link
rel=
"stylesheet"
href=
"plugins/bootstrap-fileinput/bootstrap-fileinput.css"
>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<!-- END HEAD -->
<body
class=
"hold-transition skin-blue sidebar-mini"
>
<div
class=
"wrapper"
>
<div
class=
"content-wrapper"
style=
"margin-left:0;"
>
<section
class=
"content-header"
>
<h1>
顺丰物流运单管理
<small>
顺丰物流运单
</small>
</h1>
<ol
class=
"breadcrumb"
>
<li><a
href=
"#"
><i
class=
"fa fa-dashboard"
></i>
首页
</a></li>
<li><a
class=
"active"
>
顺丰物流运单
</a></li>
</ol>
</section>
<!-- Main content -->
<section
class=
"content"
>
<div
class=
"row"
>
<div
class=
"col-xs-12"
>
<!-- general form elements disabled -->
<div
class=
"box box-primary"
>
<form
role=
"form"
id=
"myForm"
>
<input
name=
"id"
value=
"$!{data.id}"
hidden=
"true"
/>
<div
class=
"box-body"
>
</div>
<div
class=
"box-footer"
>
#if($shiro.hasPermission("qy:waybill:edit"))
<input
class=
"btn btn-primary"
id=
"save"
value=
"保存"
type=
"submit"
>
#end
<a
href=
"#springUrl('/a/waybill/list')"
class=
"btn btn-default"
>
取消
</a>
</div>
</form>
<!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div
class=
"control-sidebar-bg"
></div>
</div>
<!-- ./wrapper -->
<script
src=
"plugins/jQuery/jQuery-2.1.4.min.js"
></script>
<!-- Bootstrap 3.3.5 -->
<script
src=
"bootstrap/js/bootstrap.min.js"
></script>
<!-- DataTables -->
<script
src=
"plugins/datatables/jquery.dataTables.min.js"
></script>
<script
src=
"plugins/datatables/extensions/i18n/lanauage_ch.js"
></script>
<script
src=
"plugins/datatables/dataTables.bootstrap.min.js"
></script>
<!-- SlimScroll -->
<script
src=
"plugins/slimScroll/jquery.slimscroll.min.js"
></script>
<!-- FastClick -->
<script
src=
"plugins/fastclick/fastclick.min.js"
></script>
<!--fileinput js-->
<script
src=
"plugins/bootstrap-fileinput/bootstrap-fileinput.js"
></script>
<!-- AdminLTE App -->
<script
src=
"dist/js/app.min.js"
></script>
<script
src=
"plugins/bootstrap-maxlength/bootstrap-maxlength.min.js"
type=
"text/javascript"
></script>
<script
src=
"plugins/security/sha256.js"
type=
"text/javascript"
></script>
<script
src=
"plugins/jquery-validation/js/jquery.validate.min.js"
></script>
<script
src=
"js/jquery.form.min.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"plugins/ueditor-min-1.4.3/ueditor.config.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"plugins/ueditor-min-1.4.3/ueditor.all.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"plugins/ueditor-min-1.4.3/lang/zh-cn/zh-cn.js"
></script>
<script
src=
"common/js/cfapp.js"
></script>
<!-- END PAGE LEVEL PLUGINS -->
<script>
$
().
ready
(
function
()
{
Cfapp
.
init
();
recdTypeAdd
.
init
();
});
var
recdTypeAdd
=
function
()
{
var
initForm
=
function
()
{
var
initFormCtrl
=
function
()
{
bindEvent
();
};
var
bindEvent
=
function
()
{
$
(
"#myForm"
).
validate
({
rules
:
{},
messages
:
{},
submitHandler
:
function
(
form
)
{
$
(
"#save"
).
attr
(
"disabled"
,
true
);
$
.
getJSON
(
"#springUrl('/a/waybill/formData')"
,
$
(
"#myForm"
).
serialize
(),
function
(
returnobj
)
{
$
(
"#save"
).
attr
(
"disabled"
,
false
);
if
(
returnobj
.
errorNo
==
2
)
{
//保存成功
Cfapp
.
confirm
({
message
:
"添加成功"
,
btnoktext
:
"继续添加"
,
btncanceltext
:
"关闭"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/waybill/form')"
;
},
cancel
:
function
()
{
location
.
href
=
"#springUrl('/a/waybill/list')"
;
}
});
}
else
if
(
returnobj
.
errorNo
==
0
)
{
//修改成功
Cfapp
.
alert
({
message
:
"更新成功"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/waybill/list')"
;
}
});
}
else
{
Cfapp
.
alert
({
message
:
"创建失败"
,
btntext
:
"确定"
,
success
:
function
()
{
location
.
href
=
"#springUrl('/a/waybill/list')"
;
}
});
}
});
}
})
}
initFormCtrl
();
}
return
{
//main function to initiate the module
init
:
function
()
{
initForm
();
}
};
}();
</script>
</body>
<!-- END BODY -->
</html>
\ No newline at end of file
aidea-modules/waybill-module-web/src/main/webapp/WEB-INF/views/waybill/waybilllist.html
0 → 100644
View file @
50664c26
This diff is collapsed.
Click to expand it.
aidea-modules/waybill-module/pom.xml
0 → 100644
View file @
50664c26
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
aidea-modules
</artifactId>
<groupId>
com.cftech
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
waybill-module
</artifactId>
<dependencies>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
member-module
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
order-module
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
order-detail-module
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
shipping-address-module
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependencies>
</project>
aidea-modules/waybill-module/src/main/java/com/cftech/waybill/dao/WaybillMapper.java
0 → 100644
View file @
50664c26
package
com
.
cftech
.
waybill
.
dao
;
import
com.cftech.waybill.model.Waybill
;
import
com.cftech.core.generic.GenericDao
;
/**
* 顺丰物流运单Mapper
*
* @author Strive
* @date: 2020-10-21 15:04
*/
public
interface
WaybillMapper
extends
GenericDao
<
Waybill
>
{
}
\ No newline at end of file
aidea-modules/waybill-module/src/main/java/com/cftech/waybill/dao/WaybillMapper.xml
0 → 100644
View file @
50664c26
This diff is collapsed.
Click to expand it.
aidea-modules/waybill-module/src/main/java/com/cftech/waybill/model/Waybill.java
0 → 100644
View file @
50664c26
package
com
.
cftech
.
waybill
.
model
;
import
com.cftech.core.poi.ExportConfig
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 顺丰物流运单
*
* @author Strive
* @date: 2020-10-21 15:04
*/
@Data
public
class
Waybill
implements
Serializable
{
/* 主键id */
private
Long
id
;
/* 咨询单Id */
@ExportConfig
(
value
=
"咨询单Id"
,
width
=
100
,
showLevel
=
1
)
private
Long
consultId
;
/* 订单Id */
@ExportConfig
(
value
=
"订单Id"
,
width
=
100
,
showLevel
=
1
)
private
Long
orderId
;
/* 物流单编码 */
@ExportConfig
(
value
=
"物流单编码"
,
width
=
100
,
showLevel
=
1
)
private
String
numbetr
;
/* 会员Id */
@ExportConfig
(
value
=
"会员Id"
,
width
=
100
,
showLevel
=
1
)
private
String
memberId
;
/* 粉丝Id */
@ExportConfig
(
value
=
"粉丝Id"
,
width
=
100
,
showLevel
=
1
)
private
String
openId
;
/* 仓管员Id */
@ExportConfig
(
value
=
"仓管员Id"
,
width
=
100
,
showLevel
=
1
)
private
String
storageManage
;
/* 顺丰运单号 */
@ExportConfig
(
value
=
"顺丰运单号"
,
width
=
100
,
showLevel
=
1
)
private
String
waybillNo
;
/* 语言 */
@ExportConfig
(
value
=
"语言"
,
width
=
100
,
showLevel
=
1
)
private
String
language
;
/* 顺丰月结卡号 */
@ExportConfig
(
value
=
"顺丰月结卡号"
,
width
=
100
,
showLevel
=
1
)
private
String
monthlyCard
;
/* 快件产品类型 */
@ExportConfig
(
value
=
"快件产品类型"
,
width
=
100
,
showLevel
=
1
)
private
String
expressTypeId
;
/* 温度范围控制 1:冷藏 3:冷冻 */
@ExportConfig
(
value
=
"温度范围控制 1:冷藏 3:冷冻"
,
width
=
100
,
showLevel
=
1
)
private
String
temperatureRange
;
/* 联系人 */
@ExportConfig
(
value
=
"联系人"
,
width
=
100
,
showLevel
=
1
)
private
String
contact
;
/* 联系电话 */
@ExportConfig
(
value
=
"联系电话"
,
width
=
100
,
showLevel
=
1
)
private
String
mobile
;
/* 省份 */
@ExportConfig
(
value
=
"省份"
,
width
=
100
,
showLevel
=
1
)
private
String
province
;
/* 城市 */
@ExportConfig
(
value
=
"城市"
,
width
=
100
,
showLevel
=
1
)
private
String
city
;
/* 县/区级行政区名称 */
@ExportConfig
(
value
=
"县/区级行政区名称"
,
width
=
100
,
showLevel
=
1
)
private
String
county
;
/* 地址Id */
@ExportConfig
(
value
=
"地址Id"
,
width
=
100
,
showLevel
=
1
)
private
String
addressId
;
/* 详细地址 */
@ExportConfig
(
value
=
"详细地址"
,
width
=
100
,
showLevel
=
1
)
private
String
address
;
/* 发件时间 */
@ExportConfig
(
value
=
"发件时间"
,
width
=
100
,
showLevel
=
1
)
private
Date
sendExpressDate
;
/* 收件时间 */
@ExportConfig
(
value
=
"收件时间"
,
width
=
100
,
showLevel
=
1
)
private
Date
acceptExpressDate
;
/* 运单描述 */
@ExportConfig
(
value
=
"运单描述"
,
width
=
100
,
showLevel
=
1
)
private
String
waybillRemark
;
/* 所属的账号 */
private
Long
accountsId
;
/* 删除标识 */
private
boolean
delFlag
;
/* 状态 */
private
String
status
;
/* 创建时间 */
private
Date
createTime
;
/* 更新时间 */
private
Date
updateTime
;
/* 备注 */
private
String
description
;
/* 创建人 */
private
Long
createBy
;
/* 更新人 */
private
Long
updateBy
;
public
Waybill
()
{
this
.
delFlag
=
false
;
this
.
status
=
"0"
;
}
}
\ No newline at end of file
aidea-modules/waybill-module/src/main/java/com/cftech/waybill/service/WaybillService.java
0 → 100644
View file @
50664c26
package
com
.
cftech
.
waybill
.
service
;
import
com.cftech.waybill.model.Waybill
;
import
com.cftech.core.generic.GenericService
;
/**
* 顺丰物流运单Service
*
* @author Strive
* @date: 2020-10-21 15:04
*/
public
interface
WaybillService
extends
GenericService
<
Waybill
>
{
}
aidea-modules/waybill-module/src/main/java/com/cftech/waybill/service/impl/WaybillServiceImpl.java
0 → 100644
View file @
50664c26
package
com
.
cftech
.
waybill
.
service
.
impl
;
import
com.cftech.waybill.model.Waybill
;
import
com.cftech.waybill.dao.WaybillMapper
;
import
com.cftech.waybill.service.WaybillService
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.core.generic.GenericServiceImpl
;
import
com.cftech.core.sql.Conds
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.stereotype.Service
;
/**
* 顺丰物流运单ServiceImpl
*
* @author Strive
* @date: 2020-10-21 15:04
*/
@Service
(
"waybillService"
)
public
class
WaybillServiceImpl
extends
GenericServiceImpl
<
Waybill
>
implements
WaybillService
{
@Autowired
@Qualifier
(
"waybillMapper"
)
private
WaybillMapper
waybillMapper
;
@Override
public
GenericDao
<
Waybill
>
getGenericMapper
()
{
return
waybillMapper
;
}
}
\ No newline at end of file
aidea-modules/waybill-module/src/main/java/com/cftech/waybill/utils/CloseableHttpEntity.java
0 → 100644
View file @
50664c26
package
com
.
cftech
.
waybill
.
utils
;
import
com.alibaba.fastjson.JSONObject
;
import
lombok.Data
;
/**
* Created by 16444 on 2020/10/21.
*/
@Data
public
class
CloseableHttpEntity
{
private
int
code
;
private
JSONObject
retObj
;
public
CloseableHttpEntity
(
int
code
,
JSONObject
retObj
)
{
this
.
code
=
code
;
this
.
retObj
=
retObj
;
}
}
aidea-modules/waybill-module/src/main/java/com/cftech/waybill/utils/ExpressOrderInfoUtils.java
0 → 100644
View file @
50664c26
package
com
.
cftech
.
waybill
.
utils
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.core.util.StringUtils
;
import
com.cftech.order.model.Order
;
import
com.cftech.orderdetail.model.OrderDetails
;
import
com.cftech.waybill.model.Waybill
;
import
lombok.extern.slf4j.Slf4j
;
import
sun.misc.BASE64Encoder
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLEncoder
;
import
java.security.MessageDigest
;
import
java.security.NoSuchAlgorithmException
;
import
java.util.List
;
/**
* Created by 16444 on 2020/10/21.
*/
@Slf4j
public
class
ExpressOrderInfoUtils
{
private
static
final
String
language
=
"zh-CN"
;
private
static
final
String
countryCode
=
"CN"
;
private
static
final
String
currencyCode
=
"HKD"
;
/**
* 下订单接口参数封装
* @param order
* @param orderDetails
* @param waybillObj
* @return
*/
public
static
JSONObject
generateWaybillOrder
(
Order
order
,
List
<
OrderDetails
>
orderDetails
,
Waybill
waybillObj
)
{
//订单
JSONObject
waybill
=
new
JSONObject
();
try
{
waybill
.
put
(
"language"
,
language
);
waybill
.
put
(
"orderId"
,
order
.
getNumber
());
//快递单号
waybill
.
put
(
"cargoDesc"
,
"医疗药品"
);
//托寄物描述
waybill
.
put
(
"monthlyCard"
,
""
);
//顺丰月结卡号
waybill
.
put
(
"orderSource"
,
"WECHAT_STORE"
);
//平台编码 微信咨询平台
waybill
.
put
(
"remark"
,
waybillObj
.
getWaybillRemark
());
//订单备注
//业务需要增加
waybill
.
put
(
"isReturnQRCode"
,
"1"
);
//是否返回用来推送业务的二维码 1:返回 0:不返回
waybill
.
put
(
"specialDeliveryTypeCode"
,
"1"
);
//特殊派送类型代码 1:身份验证
waybill
.
put
(
"specialDeliveryValue"
,
"12345678"
);
//特殊派件具体表述 证件类型:证件后8位如:1:09296231(1 表示身份证,暂不支持其他证件)
waybill
.
put
(
"isReturnSignBackRoutelabel"
,
"1"
);
//是否返回签回单路由标签: 默认0, 1:返回路由标签,0:不返回
waybill
.
put
(
"isReturnRoutelabel"
,
"1"
);
//是否返回路由标签: 默认0, 1:返回路由标签, 0:不返回
waybill
.
put
(
"podModelAddress"
,
"url"
);
//签单返回范本地址
//特殊需求药品,需冷冻、冷藏
if
(
StringUtils
.
isNoneBlank
(
waybillObj
.
getExpressTypeId
()))
{
waybill
.
put
(
"expressTypeId"
,
waybillObj
.
getExpressTypeId
());
//快件产品类别Id 12医药类 冷冻 冷藏
waybill
.
put
(
"temperatureRange"
,
waybillObj
.
getTemperatureRange
());
//1:冷藏 3:冷冻
}
//托寄物信息List
JSONArray
cargoDetails
=
new
JSONArray
();
for
(
OrderDetails
orderd:
orderDetails
)
{
JSONObject
cargo
=
new
JSONObject
();
cargo
.
put
(
"name"
,
orderd
.
getDrugsName
());
//商品名称
cargo
.
put
(
"count"
,
1
);
//商品数量
cargo
.
put
(
"unit"
,
"盒"
);
//商品单位
cargo
.
put
(
"amount"
,
orderd
.
getPrice
());
//商品价格
cargo
.
put
(
"currency"
,
currencyCode
);
//币种编码
}
waybill
.
put
(
"cargoDetails"
,
cargoDetails
);
//收寄双方信息List
JSONArray
contactInfoList
=
new
JSONArray
();
//寄件方信息
JSONObject
sender
=
new
JSONObject
();
sender
.
put
(
"contactType"
,
"1"
);
sender
.
put
(
"company"
,
"康诺"
);
sender
.
put
(
"contact"
,
"小谢"
);
sender
.
put
(
"tel"
,
"15800815547"
);
sender
.
put
(
"mobile"
,
"15800815547"
);
sender
.
put
(
"country"
,
countryCode
);
sender
.
put
(
"province"
,
"上海市"
);
sender
.
put
(
"city"
,
"上海市"
);
sender
.
put
(
"county"
,
"闵行区"
);
sender
.
put
(
"address"
,
"江玮路100号"
);
contactInfoList
.
add
(
sender
);
//收件方信息
JSONObject
recipient
=
new
JSONObject
();
recipient
.
put
(
"contactType"
,
"2"
);
//recipient.put("company", "");
recipient
.
put
(
"contact"
,
waybillObj
.
getContact
());
recipient
.
put
(
"tel"
,
waybillObj
.
getMobile
());
recipient
.
put
(
"mobile"
,
waybillObj
.
getMobile
());
recipient
.
put
(
"country"
,
countryCode
);
recipient
.
put
(
"province"
,
waybillObj
.
getProvince
());
recipient
.
put
(
"city"
,
waybillObj
.
getCity
());
recipient
.
put
(
"county"
,
waybillObj
.
getCounty
());
recipient
.
put
(
"address"
,
waybillObj
.
getAddress
());
contactInfoList
.
add
(
recipient
);
waybill
.
put
(
"contactInfoList"
,
contactInfoList
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
log
.
error
(
"丰桥API {下订单接口} Request Params Error = "
+
e
.
getMessage
());
return
null
;
}
return
waybill
;
}
/**
* 订单查询接口封装
* @param searchType 查询类型:1.正向单查询,传入的orderId为正向订单号,2.退货单查询,传入的orderId为退货原始订单号
* @return
*/
public
static
JSONObject
generateOrderSel
(
Order
order
,
String
searchType
)
{
JSONObject
retObj
=
new
JSONObject
();
try
{
retObj
.
put
(
"orderId"
,
order
.
getNumber
());
retObj
.
put
(
"searchType"
,
searchType
);
retObj
.
put
(
"language"
,
language
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
log
.
error
(
"丰桥API 订单查询接口 Request Params Error = "
+
e
.
getMessage
());
return
null
;
}
return
retObj
;
}
/**
* 订单确认/取消接口
* @param order
* @param type
* @return
*/
public
JSONObject
generateOrderCancel
(
Order
order
,
Waybill
waybillObj
,
String
type
)
{
JSONObject
retObj
=
new
JSONObject
();
try
{
retObj
.
put
(
"orderId"
,
order
.
getNumber
());
retObj
.
put
(
"dealType"
,
type
);
JSONArray
waybillNoInfoList
=
new
JSONArray
();
JSONObject
waybill
=
new
JSONObject
();
waybill
.
put
(
"waybillType"
,
1
);
//母单
waybill
.
put
(
"waybillNo"
,
waybillObj
.
getWaybillNo
());
waybillNoInfoList
.
add
(
waybill
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
log
.
error
(
"丰桥API {订单查询、取消} Request Params Error = "
+
e
.
getMessage
());
return
null
;
}
return
retObj
;
}
/**
* 路由查询
* @param waybillObj
* @return
*/
public
static
JSONObject
generateRouteData
(
Waybill
waybillObj
)
{
JSONObject
retObj
=
new
JSONObject
();
try
{
retObj
.
put
(
"language"
,
0
);
//中文
retObj
.
put
(
"trackingType"
,
1
);
//1:根据顺丰运单号查询
JSONArray
waybills
=
new
JSONArray
();
waybills
.
add
(
waybillObj
.
getWaybillNo
());
retObj
.
put
(
"trackingNumber"
,
waybills
);
//顺丰运单号
retObj
.
put
(
"methodType"
,
1
);
//标准路由查询
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
log
.
error
(
"丰桥API 订单查询接口 Request Params Error = "
+
e
.
getMessage
());
}
return
retObj
;
}
/**
* 生成顺丰签名
* @return
*/
public
static
String
generateSfDigest
(
String
msgData
,
Long
timestamp
,
String
checkWord
)
{
String
msgDigest
=
null
;
try
{
StringBuffer
verifyText
=
new
StringBuffer
();
verifyText
.
append
(
msgData
);
verifyText
.
append
(
timestamp
);
verifyText
.
append
(
checkWord
);
//因业务报文中可能包含加号、空格等特殊字符,需要urlEnCode处理
String
text
=
URLEncoder
.
encode
(
verifyText
.
toString
(),
"UTF-8"
);
//进行Md5加密
MessageDigest
md5
=
MessageDigest
.
getInstance
(
"MD5"
);
md5
.
update
(
text
.
getBytes
(
"UTF-8"
));
byte
[]
md
=
md5
.
digest
();
//通过BASE64生成数字签名
msgDigest
=
new
String
(
new
BASE64Encoder
().
encode
(
md
));
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
log
.
error
(
"丰桥API 生成接口签名 md5 base64 error = "
+
e
.
getMessage
());
return
null
;
}
catch
(
NoSuchAlgorithmException
e
)
{
e
.
printStackTrace
();
log
.
error
(
"丰桥API 生成接口签名 无算法异常 md5 base64 error = "
+
e
.
getMessage
());
return
null
;
}
return
msgDigest
;
}
}
aidea-modules/waybill-module/src/main/java/com/cftech/waybill/utils/FqConstants.java
0 → 100644
View file @
50664c26
package
com
.
cftech
.
waybill
.
utils
;
/**
* Created by 16444 on 2020/10/22.
*/
public
class
FqConstants
{
/**
* 丰桥API:下订单接口URL
* url: 请求地址
* code: 接口服务代码
*/
public
static
final
String
SF_ORDER_SEND_URL
=
"https://sfapi-sbox.sf-express.com/std/service"
;
public
static
final
String
SF_ORDER_SEND_CODE
=
"EXP_RECE_CREATE_ORDER"
;
/**
* 丰桥API:订单查询接口URL
* code: 接口服务代码
*/
public
static
final
String
SF_ORDER_SEARCH_URL
=
"https://sfapi-sbox.sf-express.com/std/service"
;
public
static
final
String
SF_ORDER_SEARCH_CODE
=
"EXP_RECE_SEARCH_ORDER_RESP"
;
/**
* 丰桥API:订单确认/取消接口URL
* code: 接口服务代码
*/
public
static
final
String
SF_ORDER_CANCEL_URL
=
"https://sfapi-sbox.sf-express.com/std/service"
;
public
static
final
String
SF_ORDER_CANCEL_CODE
=
"EXP_RECE_UPDATE_ORDER"
;
/**
* 丰桥API:订单路由接口URL
* code: 接口服务代码
*/
public
static
final
String
SF_ORDER_ROUTE_URL
=
"https://sfapi-sbox.sf-express.com/std/service"
;
public
static
final
String
SF_ORDER_ROUTE_CODE
=
"EXP_RECE_SEARCH_ROUTES"
;
}
aidea-modules/waybill-module/src/main/java/com/cftech/waybill/utils/FqHttpUtils.java
0 → 100644
View file @
50664c26
This diff is collapsed.
Click to expand it.
aidea-modules/waybill-module/src/main/java/com/cftech/waybill/web/WaybillController.java
0 → 100644
View file @
50664c26
package
com
.
cftech
.
waybill
.
web
;
import
com.alibaba.fastjson.JSONObject
;
import
com.cftech.waybill.model.Waybill
;
import
com.cftech.waybill.service.WaybillService
;
import
com.cftech.core.poi.ExcelKit
;
import
com.cftech.core.scope.OrderType
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.core.util.Constants
;
import
com.cftech.sys.security.PermissionSign
;
import
com.cftech.sys.security.UserUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.List
;
/**
* 顺丰物流运单Controller
* <p>
* 权限字符串说明:
* 查看:public static final String WAYBILL_VIEW = "qy:waybill:view"
* 查看:public static final String WAYBILL_EDIT = "qy:waybill:edit"
*
* @author Strive
* @date: 2020-10-21 15:04
*/
@Slf4j
@Controller
@RequestMapping
(
"/a/waybill"
)
public
class
WaybillController
{
public
static
final
String
WAYBILL_VIEW
=
"qy:waybill:view"
;
public
static
final
String
WAYBILL_EDIT
=
"qy:waybill:edit"
;
@Autowired
private
WaybillService
waybillService
;
//列表页面
@RequiresPermissions
(
value
=
WAYBILL_VIEW
)
@RequestMapping
(
"/list"
)
public
String
list
(
HttpServletRequest
request
,
Model
model
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
model
.
addAttribute
(
"accountId"
,
accountId
);
return
"waybill/waybilllist"
;
}
//编辑页面(新增、修改)
@RequiresPermissions
(
value
=
WAYBILL_VIEW
)
@RequestMapping
(
"/form"
)
public
String
form
(
HttpServletRequest
request
,
String
id
,
Model
model
)
{
if
(!
StringUtils
.
isEmpty
(
id
))
{
Waybill
waybill
=
waybillService
.
fetchById
(
id
);
model
.
addAttribute
(
"data"
,
waybill
);
}
return
"waybill/waybillform"
;
}
//提交数据(新增、修改)
@RequiresPermissions
(
value
=
WAYBILL_EDIT
)
@RequestMapping
(
"/formData"
)
@ResponseBody
public
JSONObject
formData
(
Waybill
waybill
,
Model
model
,
HttpServletRequest
request
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
JSONObject
rtnJson
=
new
JSONObject
();
try
{
if
(
waybill
!=
null
&&
waybill
.
getId
()
!=
null
)
{
waybill
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
waybillService
.
update
(
waybill
);
rtnJson
.
put
(
"errorNo"
,
0
);
}
else
{
waybill
.
setAccountsId
(
accountsId
);
waybill
.
setDelFlag
(
false
);
waybill
.
setAccountsId
(
UserUtils
.
getmpaccounts
(
request
));
waybill
.
setCreateBy
(
UserUtils
.
getUser
().
getId
());
waybill
.
setUpdateBy
(
UserUtils
.
getUser
().
getId
());
waybillService
.
save
(
waybill
);
rtnJson
.
put
(
"errorNo"
,
2
);
}
}
catch
(
Exception
e
)
{
rtnJson
.
put
(
"errorNo"
,
1
);
}
return
rtnJson
;
}
//获取列表数据
@RequiresPermissions
(
value
=
WAYBILL_VIEW
)
@RequestMapping
(
value
=
"/listData"
)
@ResponseBody
public
JSONObject
listData
(
int
iDisplayStart
,
int
iDisplayLength
,
Waybill
waybill
,
HttpServletRequest
request
)
{
Long
accountsId
=
UserUtils
.
getmpaccounts
(
request
);
Conds
conds
=
new
Conds
();
conds
.
equal
(
"del_flag"
,
Constants
.
DEL_FLAG_0
);
conds
.
equal
(
"accounts_id"
,
accountsId
);
Sort
sort
=
new
Sort
(
"create_time"
,
OrderType
.
DESC
);
List
<
Waybill
>
list
=
waybillService
.
fetchSearchByPage
(
conds
,
sort
,
iDisplayStart
,
iDisplayLength
);
Integer
counts
=
waybillService
.
count
(
conds
);
JSONObject
rtnJson
=
new
JSONObject
();
rtnJson
.
put
(
"iTotalRecords"
,
counts
);
rtnJson
.
put
(
"iTotalDisplayRecords"
,
counts
);
rtnJson
.
put
(
"aaData"
,
list
);
return
rtnJson
;
}
//删除数据
@RequiresPermissions
(
value
=
WAYBILL_EDIT
)
@RequestMapping
(
"/delete"
)
@ResponseBody
public
JSONObject
delete
(
String
id
)
{
JSONObject
rtnJosn
=
new
JSONObject
();
try
{
waybillService
.
delete
(
id
);
rtnJosn
.
put
(
"errorNo"
,
0
);
}
catch
(
Exception
e
)
{
rtnJosn
.
put
(
"errorNo"
,
1
);
}
return
rtnJosn
;
}
@RequestMapping
(
"/exportExcel"
)
@RequiresPermissions
(
value
=
WAYBILL_VIEW
)
public
void
exportExcel
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
Sort
sort
=
new
Sort
(
"create_time"
,
OrderType
.
ASC
);
Conds
conds
=
new
Conds
();
conds
.
equal
(
"del_flag"
,
0
);
conds
.
equal
(
"accounts_id"
,
accountId
);
List
<
Waybill
>
list
=
waybillService
.
fetchSearchByPage
(
conds
,
sort
,
0
,
0
);
ExcelKit
.
$Export
(
Waybill
.
class
,
response
).
toExcel
(
list
,
"顺丰物流运单信息"
);
}
@RequestMapping
(
"/templateExcel"
)
@RequiresPermissions
(
value
=
WAYBILL_VIEW
)
public
void
templateExcel
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
ExcelKit
.
$Export
(
Waybill
.
class
,
response
).
toExcel
(
null
,
"顺丰物流运单信息"
);
}
@RequestMapping
(
"/importExcel"
)
@RequiresPermissions
(
value
=
WAYBILL_EDIT
)
public
String
importExcel
(
HttpServletRequest
request
,
MultipartFile
file
,
Model
model
)
{
Long
accountId
=
UserUtils
.
getmpaccounts
(
request
);
if
(
file
==
null
)
{
return
list
(
request
,
model
);
}
// 构造临时路径来存储上传的文件
String
uploadPath
=
System
.
getProperty
(
"java.io.tmpdir"
);
File
uploadDir
=
new
File
(
uploadPath
);
if
(!
uploadDir
.
exists
())
{
uploadDir
.
mkdir
();
}
String
fileName
=
file
.
getOriginalFilename
();
String
filePath
=
uploadPath
+
File
.
separator
+
fileName
;
File
storeFile
=
new
File
(
filePath
);
try
{
file
.
transferTo
(
storeFile
);
ExcelKit
.
$Import
().
setEmptyCellValue
(
""
).
readExcel
(
storeFile
,
rowData
->
{
if
(!
StringUtils
.
isEmpty
(
rowData
.
get
(
0
)))
{
Waybill
waybill
=
new
Waybill
();
waybill
.
setAccountsId
(
accountId
);
waybillService
.
save
(
waybill
);
}
});
}
catch
(
IOException
e
)
{
log
.
error
(
e
.
getMessage
());
}
return
list
(
request
,
model
);
}
}
cftech-common-web/src/main/resources/common-test.properties
View file @
50664c26
...
...
@@ -42,7 +42,11 @@ security.secure=false
#\uFFFD\u01F7\uFFFD\uFFFD\u01FC\uFFFD\u023A\uFFFD\uFFFD\u02B1\uFFFD\uFFFD\uFFFD\uFFFDMaster\uFFFD\uFFFD\uFFFD\u06B5\uFFFD\u04BB\uFFFD\uFFFD\uFFFD\uFFFD\u03AAtrue\uFFFD\uFFFD\uFFFD\uFFFD
quartz.isCluster
=
false
#\u987A\u4E30API\u914D\u7F6E\u53C2\u6570
#\u987A\u4E30\u5BA2\u6237\u7F16\u7801
sf.partnerID
=
XXYZ
#\u987A\u4E30\u5BA2\u6237\u6821\u9A8C\u7801
sf.checkWord
=
5Nhuavqk0JG7zTYLtPKq7JpnceuekRcH
...
...
portal-web/pom.xml
View file @
50664c26
...
...
@@ -292,6 +292,12 @@
<version>
1.0-SNAPSHOT
</version>
<type>
war
</type>
</dependency>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
waybill-module-web
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<type>
war
</type>
</dependency>
</dependencies>
<build>
<finalName>
portal-web
</finalName>
...
...
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