Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Q
queueForTicket_bl
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
mengmeng
queueForTicket_bl
Commits
43149cf1
Commit
43149cf1
authored
Mar 16, 2021
by
lings
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
浙里办
parent
ecbfe5ad
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
14 deletions
+21
-14
AppointmentOrderController.java
...es/appointment/controller/AppointmentOrderController.java
+16
-13
AppointmentOrderServiceImpl.java
...appointment/service/impl/AppointmentOrderServiceImpl.java
+5
-1
No files found.
hmit-api/src/main/java/io/hmit/modules/appointment/controller/AppointmentOrderController.java
View file @
43149cf1
...
@@ -59,14 +59,13 @@ public class AppointmentOrderController {
...
@@ -59,14 +59,13 @@ public class AppointmentOrderController {
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"appointmentIdCard"
,
value
=
"预约人身份证"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"flag"
,
value
=
"预约或取号,预约传Y,取号传Q"
,
paramType
=
"query"
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
"appointmentPhone"
,
value
=
"预约人电话"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
})
public
Result
<
PageData
<
AppointmentOrderDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
public
Result
<
PageData
<
AppointmentOrderDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
PageData
<
AppointmentOrderDTO
>
page
=
appointmentOrderService
.
page
(
params
);
PageData
<
AppointmentOrderDTO
>
page
=
appointmentOrderService
.
page
(
params
);
page
.
getList
().
forEach
(
l
->{
page
.
getList
().
forEach
(
l
->{
//判断已取号或者消除过号
//判断已取号或者消除过号
if
(
null
!=
l
.
getStatus
()
&&
(
2
==
l
.
getStatus
()
||
4
==
l
.
getStatus
())
){
if
(
null
!=
l
.
getStatus
()
&&
3
<=
l
.
getStatus
()
){
YynumberDTO
yynumberDTO
=
appointmentOrderService
.
findByYuNumber
(
l
.
getAppointmentNum
());
YynumberDTO
yynumberDTO
=
appointmentOrderService
.
findByYuNumber
(
l
.
getAppointmentNum
());
l
.
setYynumberDTO
(
yynumberDTO
);
l
.
setYynumberDTO
(
yynumberDTO
);
}
}
...
@@ -79,7 +78,7 @@ public class AppointmentOrderController {
...
@@ -79,7 +78,7 @@ public class AppointmentOrderController {
@ApiOperation
(
"信息,预约详情接口"
)
@ApiOperation
(
"信息,预约详情接口"
)
public
Result
<
AppointmentOrderDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
public
Result
<
AppointmentOrderDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
AppointmentOrderDTO
data
=
appointmentOrderService
.
get
(
id
);
AppointmentOrderDTO
data
=
appointmentOrderService
.
get
(
id
);
if
(
null
!=
data
.
getStatus
()
&&
(
2
==
data
.
getStatus
()
||
4
==
data
.
getStatus
()
)
)
{
if
(
null
!=
data
.
getStatus
()
&&
3
<=
data
.
getStatus
(
)
)
{
data
.
setYynumberDTO
(
appointmentOrderService
.
findByYuNumber
(
data
.
getAppointmentNum
()));
data
.
setYynumberDTO
(
appointmentOrderService
.
findByYuNumber
(
data
.
getAppointmentNum
()));
}
}
return
new
Result
<
AppointmentOrderDTO
>().
ok
(
data
);
return
new
Result
<
AppointmentOrderDTO
>().
ok
(
data
);
...
@@ -133,7 +132,7 @@ public class AppointmentOrderController {
...
@@ -133,7 +132,7 @@ public class AppointmentOrderController {
appointmentOrderEntity
.
setServiceWindow
(
String
.
join
(
","
,
dto
.
getListWin
()));
appointmentOrderEntity
.
setServiceWindow
(
String
.
join
(
","
,
dto
.
getListWin
()));
appointmentOrderEntity
.
setTicketDate
(
dto
.
getTicketDate
());
appointmentOrderEntity
.
setTicketDate
(
dto
.
getTicketDate
());
//取号机生成取号码则设置取号预约状态为:完成
//取号机生成取号码则设置取号预约状态为:完成
appointmentOrderEntity
.
setStatus
(
2
);
appointmentOrderEntity
.
setStatus
(
3
);
appointmentOrderEntity
.
setStatusName
(
"已完成"
);
appointmentOrderEntity
.
setStatusName
(
"已完成"
);
appointmentOrderService
.
updateById
(
appointmentOrderEntity
);
appointmentOrderService
.
updateById
(
appointmentOrderEntity
);
...
@@ -146,7 +145,7 @@ public class AppointmentOrderController {
...
@@ -146,7 +145,7 @@ public class AppointmentOrderController {
public
Result
cancelReservation
(
@PathVariable
(
"id"
)
Long
id
){
public
Result
cancelReservation
(
@PathVariable
(
"id"
)
Long
id
){
AppointmentOrderDTO
data
=
appointmentOrderService
.
get
(
id
);
AppointmentOrderDTO
data
=
appointmentOrderService
.
get
(
id
);
data
.
setStatus
(
3
);
data
.
setStatus
(
2
);
data
.
setServiceName
(
"已取消"
);
data
.
setServiceName
(
"已取消"
);
data
.
setUpdateDate
(
new
Date
());
data
.
setUpdateDate
(
new
Date
());
appointmentOrderService
.
update
(
data
);
appointmentOrderService
.
update
(
data
);
...
@@ -178,27 +177,31 @@ public class AppointmentOrderController {
...
@@ -178,27 +177,31 @@ public class AppointmentOrderController {
String
appointmentPhone
=
appointmentOrderDTO
.
getAppointmentPhone
();
String
appointmentPhone
=
appointmentOrderDTO
.
getAppointmentPhone
();
String
serviceId
=
appointmentOrderDTO
.
getServiceId
().
toString
();
String
serviceId
=
appointmentOrderDTO
.
getServiceId
().
toString
();
String
appointmentPerson
=
appointmentOrderDTO
.
getAppointmentPerson
();
String
appointmentPerson
=
appointmentOrderDTO
.
getAppointmentPerson
();
String
sign
=
"hjfhsdjfueytRwYSdsa%hdf^jdshfh*KGh$e"
+
serviceId
+
new
Date
().
getTime
();
String
nowtime
=
String
.
valueOf
(
new
Date
().
getTime
()/
1000
);
String
sign
=
"hjfhsdjfueytRwYSdsa%hdf^jdshfh*KGh$e"
+
serviceId
+
nowtime
;
//判断签到时间是否在预约时间前
//判断签到时间是否在预约时间前
//调用取号机取号接口,获取取号信息,并更新预约号。
//调用取号机取号接口,获取取号信息,并更新预约号。
// http://IP:8223/smartqueue/yynumber?sQueueInfoID=24&time=1613389800&sign=ee2c3fc1bdabf439f00aa90af6a0a68f&sTel=13988888888&sName=王小二&sCardID=333111123456
// http://IP:8223/smartqueue/yynumber?sQueueInfoID=24&time=1613389800&sign=ee2c3fc1bdabf439f00aa90af6a0a68f&sTel=13988888888&sName=王小二&sCardID=333111123456
String
url
=
"http://
IP
:8223/smartqueue/yynumber?"
+
String
url
=
"http://
192.168.1.97
:8223/smartqueue/yynumber?"
+
"sQueueInfoID="
+
serviceId
+
"sQueueInfoID="
+
serviceId
+
"&time="
+
n
ew
Date
().
getTime
()
+
"&time="
+
n
owtime
+
"&sign="
+
MD5
.
md5
(
sign
)+
"&sign="
+
MD5
.
md5
(
sign
)+
"&sTel="
+
appointmentPhone
+
"&sTel="
+
appointmentPhone
+
"&sName="
+
appointmentPerson
+
"&sName="
+
appointmentPerson
+
"&sCardID="
+
appointmentIdCard
;
"&sCardID="
+
appointmentIdCard
;
String
s
=
HttpRequestUtil
.
sendGetAndRetrieveContent
(
url
);
// String s = HttpRequestUtil.sendGetAndRetrieveContent(url);
String
s
=
"{\"nStatus\":0,\"sMsg\":\"\",\"sPaperNumber\":\"Z1001\",\"nWait\":1,\"nid\":4322,\"sRegTime\":\"2018-12-21 13:49:21\",\"sQueueName\":\"预约-交通违法处理\",\"listWin\":[\"B03\",\"B04\",\"B05\",\"B06\"]}\n"
+
"{\"nStatus\":0,\"sMsg\":\"成功\",\"nWait\":9,\"sCallTime\":\"\",\"sRegTime\":\"2018-12-21 13:49:21\",\"sQueueName\":\"交通违法处理\",\"listWin\":[\"B03\",\"B04\",\"B05\",\"B06\"]}\n"
;
YynumberDTO
yynumberDTO
=
JSONObject
.
parseObject
(
s
,
YynumberDTO
.
class
);
YynumberDTO
yynumberDTO
=
JSONObject
.
parseObject
(
s
,
YynumberDTO
.
class
);
//根据接口返回的结果更新预约单号
//根据接口返回的结果更新预约单号
if
(
"0"
.
equals
(
yynumberDTO
.
getNStatus
()
)){
if
(
0
==
yynumberDTO
.
getNStatus
(
)){
appointmentOrderDTO
.
setAppointmentNum
(
yynumberDTO
.
getSPaperNumber
());
appointmentOrderDTO
.
setAppointmentNum
(
yynumberDTO
.
getSPaperNumber
());
appointmentOrderDTO
.
setTicketDate
(
yynumberDTO
.
getSRegTime
());
appointmentOrderDTO
.
setTicketDate
(
yynumberDTO
.
getSRegTime
());
appointmentOrderDTO
.
setWaitNum
(
yynumberDTO
.
getNWait
());
appointmentOrderDTO
.
setWaitNum
(
yynumberDTO
.
getNWait
());
appointmentOrderDTO
.
setServiceWindow
(
yynumberDTO
.
getListWin
().
toString
(
));
appointmentOrderDTO
.
setServiceWindow
(
String
.
join
(
","
,
yynumberDTO
.
getListWin
()
));
appointmentOrderDTO
.
setStatus
(
2
);
appointmentOrderDTO
.
setStatus
(
3
);
appointmentOrderDTO
.
setStatusName
(
"签到"
);
appointmentOrderDTO
.
setStatusName
(
"签到"
);
appointmentOrderDTO
.
setUpdateDate
(
new
Date
());
appointmentOrderDTO
.
setUpdateDate
(
new
Date
());
appointmentOrderService
.
update
(
appointmentOrderDTO
);
appointmentOrderService
.
update
(
appointmentOrderDTO
);
...
...
hmit-api/src/main/java/io/hmit/modules/appointment/service/impl/AppointmentOrderServiceImpl.java
View file @
43149cf1
...
@@ -56,9 +56,13 @@ public class AppointmentOrderServiceImpl extends CrudServiceImpl<AppointmentOrde
...
@@ -56,9 +56,13 @@ public class AppointmentOrderServiceImpl extends CrudServiceImpl<AppointmentOrde
@Override
@Override
public
QueryWrapper
<
AppointmentOrderEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
public
QueryWrapper
<
AppointmentOrderEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
String
id
=
(
String
)
params
.
get
(
"id"
);
String
id
=
(
String
)
params
.
get
(
"id"
);
String
flag
=
(
String
)
params
.
get
(
"flag"
);
QueryWrapper
<
AppointmentOrderEntity
>
wrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
AppointmentOrderEntity
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
id
),
"id"
,
id
);
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
id
),
"id"
,
id
);
wrapper
.
le
(
StringUtils
.
isNotBlank
(
flag
)
&&
"Y"
.
equals
(
flag
),
"status"
,
2
);
wrapper
.
ge
(
StringUtils
.
isNotBlank
(
flag
)
&&
"Q"
.
equals
(
flag
),
"status"
,
3
);
return
wrapper
;
return
wrapper
;
}
}
...
@@ -148,7 +152,7 @@ public class AppointmentOrderServiceImpl extends CrudServiceImpl<AppointmentOrde
...
@@ -148,7 +152,7 @@ public class AppointmentOrderServiceImpl extends CrudServiceImpl<AppointmentOrde
public
YynumberDTO
findByYuNumber
(
String
sPaperNumber
)
{
public
YynumberDTO
findByYuNumber
(
String
sPaperNumber
)
{
//调用取号机接口,。
//调用取号机接口,。
// String url = "http://IP:8223/smartqueue/getpaperwait?sPaperNumber=" +sPaperNumber;
// String url = "http://IP:8223/smartqueue/getpaperwait?sPaperNumber=" +sPaperNumber;
String
url
=
"http://IP
:8223/smartqueue/getpaperwait?sPaperNumber="
+
sPaperNumber
;
// String url = "http://192.168.1.97
:8223/smartqueue/getpaperwait?sPaperNumber=" +sPaperNumber;
// String s = HttpRequestUtil.sendGetAndRetrieveContent(url);
// String s = HttpRequestUtil.sendGetAndRetrieveContent(url);
String
s
=
"{\"nStatus\":1,\"sMsg\":\"号码已被呼叫\",\"nWait\":0,\"sCallTime\":\"2021-03-08 16:27:09\",\"sRegTime\":\"2021-03-08 16:26:55\",\"sQueueName\":\"不动产档案查询\",\"listWin\":[\"38号窗口\",\"39号窗口\",\"40号窗口\",\"41号窗口\",\"42号窗口\",\"43号窗口\"]}"
;
String
s
=
"{\"nStatus\":1,\"sMsg\":\"号码已被呼叫\",\"nWait\":0,\"sCallTime\":\"2021-03-08 16:27:09\",\"sRegTime\":\"2021-03-08 16:26:55\",\"sQueueName\":\"不动产档案查询\",\"listWin\":[\"38号窗口\",\"39号窗口\",\"40号窗口\",\"41号窗口\",\"42号窗口\",\"43号窗口\"]}"
;
YynumberDTO
yynumberDTO
=
JSONObject
.
parseObject
(
s
,
YynumberDTO
.
class
);
YynumberDTO
yynumberDTO
=
JSONObject
.
parseObject
(
s
,
YynumberDTO
.
class
);
...
...
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