Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gdtel-gztel-school-center
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴学德
gdtel-gztel-school-center
Commits
e6acf8ea
Commit
e6acf8ea
authored
Apr 08, 2020
by
黄森林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单宽完成提交
parent
c05f92d0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
20 deletions
+26
-20
apply-net/src/main/java/com/winsun/controller/DankuanController.java
+26
-20
No files found.
apply-net/src/main/java/com/winsun/controller/DankuanController.java
View file @
e6acf8ea
...
@@ -9,10 +9,7 @@ import com.winsun.bean.*;
...
@@ -9,10 +9,7 @@ import com.winsun.bean.*;
import
com.winsun.constant.Constant
;
import
com.winsun.constant.Constant
;
import
com.winsun.constant.OrderStatus
;
import
com.winsun.constant.OrderStatus
;
import
com.winsun.mapper.*
;
import
com.winsun.mapper.*
;
import
com.winsun.utils.BeanUtil
;
import
com.winsun.utils.*
;
import
com.winsun.utils.IDCardUtil
;
import
com.winsun.utils.MD5Utils
;
import
com.winsun.utils.MyBatisPlusUpdateUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.http.HttpEntity
;
import
org.apache.http.HttpEntity
;
...
@@ -151,11 +148,7 @@ public class DankuanController {
...
@@ -151,11 +148,7 @@ public class DankuanController {
orderV
.
setOrderseq
(
orderViews
.
get
(
0
).
getOrderseq
());
orderV
.
setOrderseq
(
orderViews
.
get
(
0
).
getOrderseq
());
return
ResponseData
.
error
(
orderV
,
"当前身份证号已有订单存在!"
);
return
ResponseData
.
error
(
orderV
,
"当前身份证号已有订单存在!"
);
}
}
SimpleDateFormat
yyyyMMdd
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
String
orderSeq
=
"YRYM"
+
ProduceIdUtil
.
getId
();
Date
date
=
new
Date
();
String
format
=
yyyyMMdd
.
format
(
date
);
String
s
=
String
.
valueOf
((
int
)
((
Math
.
random
()
*
9
+
1
)
*
1000
));
String
orderSeq
=
"YRYM"
+
format
+
s
;
Product
product
=
productMapper
.
selectById
(
productId
);
Product
product
=
productMapper
.
selectById
(
productId
);
OrderView
orderView
=
new
OrderView
();
OrderView
orderView
=
new
OrderView
();
orderView
.
setOrdername
(
orderName
);
orderView
.
setOrdername
(
orderName
);
...
@@ -233,8 +226,8 @@ public class DankuanController {
...
@@ -233,8 +226,8 @@ public class DankuanController {
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyyMMddHHmmss"
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyyMMddHHmmss"
);
String
currentTimeStr
=
simpleDateFormat
.
format
(
new
Date
());
String
currentTimeStr
=
simpleDateFormat
.
format
(
new
Date
());
String
productId
=
null
;
String
productId
=
"519"
;
if
(
StringUtils
.
isBlank
(
orderView
.
getOrderseqthd
()))
{
/*
if (StringUtils.isBlank(orderView.getOrderseqthd())) {
JSONObject productJsonObject = getProductId(currentTimeStr);
JSONObject productJsonObject = getProductId(currentTimeStr);
if (productJsonObject.toString().indexOf("list") == -1) {
if (productJsonObject.toString().indexOf("list") == -1) {
return ResponseData.error("未找到产品信息,如有疑问请联系客服!");
return ResponseData.error("未找到产品信息,如有疑问请联系客服!");
...
@@ -249,14 +242,14 @@ public class DankuanController {
...
@@ -249,14 +242,14 @@ public class DankuanController {
break;
break;
}
}
}
}
}
}
*/
String
saleId
=
null
;
// 销售id
String
saleId
=
"1475"
;
// 销售id
JSONObject
saleJsonObject
=
getSaleId
(
productId
,
currentTimeStr
);
// 获取销售ID
/*
JSONObject saleJsonObject = getSaleId(productId, currentTimeStr); // 获取销售ID
log.info("----------调用智能平台的获取销售品接口返回值:" + saleJsonObject);
log.info("----------调用智能平台的获取销售品接口返回值:" + saleJsonObject);
JSONArray saleList = saleJsonObject.getJSONArray("list");
JSONArray saleList = saleJsonObject.getJSONArray("list");
JSONObject itmeJson = JSONObject.parseObject(saleList.get(0).toString());
JSONObject itmeJson = JSONObject.parseObject(saleList.get(0).toString());
saleId
=
itmeJson
.
getString
(
"saleId"
);
saleId = itmeJson.getString("saleId");
*/
JSONObject
submitOrderJsonObject
=
getOrderInfo
(
schoolMap
,
orderView
,
currentTimeStr
,
productId
,
saleId
,
orderView
.
getOrderseq
(),
""
,
"0"
,
""
);
JSONObject
submitOrderJsonObject
=
getOrderInfo
(
schoolMap
,
orderView
,
currentTimeStr
,
productId
,
saleId
,
""
,
""
,
""
,
""
);
String
orderNum
=
(
String
)
submitOrderJsonObject
.
get
(
"orderNumber"
);
String
orderNum
=
(
String
)
submitOrderJsonObject
.
get
(
"orderNumber"
);
if
(
StringUtils
.
isNotBlank
(
orderNum
))
{
if
(
StringUtils
.
isNotBlank
(
orderNum
))
{
Wrapper
<
OrderView
>
wrapper
=
new
EntityWrapper
<>();
Wrapper
<
OrderView
>
wrapper
=
new
EntityWrapper
<>();
...
@@ -276,6 +269,10 @@ public class DankuanController {
...
@@ -276,6 +269,10 @@ public class DankuanController {
return
ResponseData
.
success
(
orderView
,
"智能平台订单创建成功"
);
return
ResponseData
.
success
(
orderView
,
"智能平台订单创建成功"
);
}
}
@RequestMapping
(
value
=
"toSubmisOrderPreser"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
},
produces
=
"text/plain;charset=UTF-8"
)
@RequestMapping
(
value
=
"toSubmisOrderPreser"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
},
produces
=
"text/plain;charset=UTF-8"
)
public
void
toSubmisOrderPreser
(
HttpServletRequest
request
)
throws
Exception
{
public
void
toSubmisOrderPreser
(
HttpServletRequest
request
)
throws
Exception
{
OrderView
orderMap
=
null
;
OrderView
orderMap
=
null
;
...
@@ -387,7 +384,6 @@ public class DankuanController {
...
@@ -387,7 +384,6 @@ public class DankuanController {
return
null
;
return
null
;
}
}
/**
/**
* @author ljh
* @author ljh
* @Description:支付请求
* @Description:支付请求
...
@@ -510,7 +506,6 @@ public class DankuanController {
...
@@ -510,7 +506,6 @@ public class DankuanController {
* @version 1.0
* @version 1.0
* @exception:
* @exception:
*/
*/
private
static
JSONObject
getProductId
(
String
currentTimeStr
)
throws
Exception
{
private
static
JSONObject
getProductId
(
String
currentTimeStr
)
throws
Exception
{
List
<
NameValuePair
>
qParams
=
new
ArrayList
<
NameValuePair
>();
List
<
NameValuePair
>
qParams
=
new
ArrayList
<
NameValuePair
>();
Map
<
String
,
String
>
signMap
=
new
HashMap
<
String
,
String
>();
//待签名参数
Map
<
String
,
String
>
signMap
=
new
HashMap
<
String
,
String
>();
//待签名参数
...
@@ -805,14 +800,25 @@ public class DankuanController {
...
@@ -805,14 +800,25 @@ public class DankuanController {
}
else
{
}
else
{
paymentMap
.
put
(
"payPlatform"
,
"穗易付"
);
//支付平台,缴费方式为“穗易付”时必填
paymentMap
.
put
(
"payPlatform"
,
"穗易付"
);
//支付平台,缴费方式为“穗易付”时必填
}
}
if
(
StringUtils
.
isNotBlank
(
UPTRANSEQ
)){
paymentMap
.
put
(
"electronicPayNumber"
,
UPTRANSEQ
);
//支付流水号,缴费方式为“穗易付”时必填
paymentMap
.
put
(
"electronicPayNumber"
,
UPTRANSEQ
);
//支付流水号,缴费方式为“穗易付”时必填
}
else
{
paymentMap
.
put
(
"electronicPayNumber"
,
""
);
//支付流水号,缴费方式为“穗易付”时必填
}
if
(
StringUtils
.
isNotBlank
(
ORDERREQTRANSEQ
)){
paymentMap
.
put
(
"payOrderNumber"
,
ORDERREQTRANSEQ
);
// 穗易付订单号,若选择穗易付,此项必填
paymentMap
.
put
(
"payOrderNumber"
,
ORDERREQTRANSEQ
);
// 穗易付订单号,若选择穗易付,此项必填
}
else
{
paymentMap
.
put
(
"payOrderNumber"
,
""
);
// 穗易付订单号,若选择穗易付,此项必填
}
if
(
StringUtils
.
isNotBlank
(
ORDERAMOUNT
)){
paymentMap
.
put
(
"payAmount"
,
ORDERAMOUNT
);
//缴费金额(打款金额),缴费方式为“代理商打款”或“穗易付”时必填
}
else
{
paymentMap
.
put
(
"payAmount"
,
""
);
//缴费金额(打款金额),缴费方式为“代理商打款”或“穗易付”时必填
}
paymentMap
.
put
(
"alipayUserid"
,
""
);
//用户ID,缴费方式为“支付宝支付”时必填
paymentMap
.
put
(
"alipayUserid"
,
""
);
//用户ID,缴费方式为“支付宝支付”时必填
paymentMap
.
put
(
"alipayNumber"
,
""
);
//支付宝账号,缴费方式为“支付宝支付”时必填
paymentMap
.
put
(
"alipayNumber"
,
""
);
//支付宝账号,缴费方式为“支付宝支付”时必填
paymentMap
.
put
(
"alipayAuthNumber"
,
""
);
//授权协议号,缴费方式为“支付宝支付”时必填
paymentMap
.
put
(
"alipayAuthNumber"
,
""
);
//授权协议号,缴费方式为“支付宝支付”时必填
paymentMap
.
put
(
"payAmount"
,
ORDERAMOUNT
);
//缴费金额(打款金额),缴费方式为“代理商打款”或“穗易付”时必填
paymentList
.
add
(
paymentMap
);
paymentList
.
add
(
paymentMap
);
//产品自定义属性;暂时默认属性名称只能传“日租卡号码”
//产品自定义属性;暂时默认属性名称只能传“日租卡号码”
Map
<
String
,
String
>
propertyMap
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
propertyMap
=
new
HashMap
<
String
,
String
>();
propertyMap
.
put
(
"name"
,
"宽带速率"
);
propertyMap
.
put
(
"name"
,
"宽带速率"
);
...
...
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