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
b6930e3c
Commit
b6930e3c
authored
Mar 18, 2021
by
mengmeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lings' into 'master'
浙里办20210318浙里办登陆 See merge request
!4
parents
32bf4407
7af47f3f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
15 deletions
+24
-15
AppointmentOrderController.java
...es/appointment/controller/AppointmentOrderController.java
+18
-14
AppointmentOrderServiceImpl.java
...appointment/service/impl/AppointmentOrderServiceImpl.java
+6
-1
No files found.
hmit-api/src/main/java/io/hmit/modules/appointment/controller/AppointmentOrderController.java
View file @
b6930e3c
...
...
@@ -59,14 +59,14 @@ public class AppointmentOrderController {
@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
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"appointmentIdCard"
,
value
=
"预约人身份证"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"appointmentPhone"
,
value
=
"预约人电话"
,
paramType
=
"query"
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
"flag"
,
value
=
"预约或取号,预约传Y,取号传Q"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
public
Result
<
PageData
<
AppointmentOrderDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
public
Result
<
PageData
<
AppointmentOrderDTO
>>
page
(
@LoginUser
UserEntity
user
,
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
params
.
put
(
"userdId"
,
user
.
getId
());
PageData
<
AppointmentOrderDTO
>
page
=
appointmentOrderService
.
page
(
params
);
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
());
l
.
setYynumberDTO
(
yynumberDTO
);
}
...
...
@@ -79,7 +79,7 @@ public class AppointmentOrderController {
@ApiOperation
(
"信息,预约详情接口"
)
public
Result
<
AppointmentOrderDTO
>
get
(
@PathVariable
(
"id"
)
Long
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
()));
}
return
new
Result
<
AppointmentOrderDTO
>().
ok
(
data
);
...
...
@@ -133,7 +133,7 @@ public class AppointmentOrderController {
appointmentOrderEntity
.
setServiceWindow
(
String
.
join
(
","
,
dto
.
getListWin
()));
appointmentOrderEntity
.
setTicketDate
(
dto
.
getTicketDate
());
//取号机生成取号码则设置取号预约状态为:完成
appointmentOrderEntity
.
setStatus
(
2
);
appointmentOrderEntity
.
setStatus
(
3
);
appointmentOrderEntity
.
setStatusName
(
"已完成"
);
appointmentOrderService
.
updateById
(
appointmentOrderEntity
);
...
...
@@ -146,7 +146,7 @@ public class AppointmentOrderController {
public
Result
cancelReservation
(
@PathVariable
(
"id"
)
Long
id
){
AppointmentOrderDTO
data
=
appointmentOrderService
.
get
(
id
);
data
.
setStatus
(
3
);
data
.
setStatus
(
2
);
data
.
setServiceName
(
"已取消"
);
data
.
setUpdateDate
(
new
Date
());
appointmentOrderService
.
update
(
data
);
...
...
@@ -178,27 +178,31 @@ public class AppointmentOrderController {
String
appointmentPhone
=
appointmentOrderDTO
.
getAppointmentPhone
();
String
serviceId
=
appointmentOrderDTO
.
getServiceId
().
toString
();
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
String
url
=
"http://
IP
:8223/smartqueue/yynumber?"
+
String
url
=
"http://
192.168.1.97
:8223/smartqueue/yynumber?"
+
"sQueueInfoID="
+
serviceId
+
"&time="
+
n
ew
Date
().
getTime
()
+
"&time="
+
n
owtime
+
"&sign="
+
MD5
.
md5
(
sign
)+
"&sTel="
+
appointmentPhone
+
"&sName="
+
appointmentPerson
+
"&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
);
//根据接口返回的结果更新预约单号
if
(
"0"
.
equals
(
yynumberDTO
.
getNStatus
()
)){
if
(
0
==
yynumberDTO
.
getNStatus
(
)){
appointmentOrderDTO
.
setAppointmentNum
(
yynumberDTO
.
getSPaperNumber
());
appointmentOrderDTO
.
setTicketDate
(
yynumberDTO
.
getSRegTime
());
appointmentOrderDTO
.
setWaitNum
(
yynumberDTO
.
getNWait
());
appointmentOrderDTO
.
setServiceWindow
(
yynumberDTO
.
getListWin
().
toString
(
));
appointmentOrderDTO
.
setStatus
(
2
);
appointmentOrderDTO
.
setServiceWindow
(
String
.
join
(
","
,
yynumberDTO
.
getListWin
()
));
appointmentOrderDTO
.
setStatus
(
3
);
appointmentOrderDTO
.
setStatusName
(
"签到"
);
appointmentOrderDTO
.
setUpdateDate
(
new
Date
());
appointmentOrderService
.
update
(
appointmentOrderDTO
);
...
...
hmit-api/src/main/java/io/hmit/modules/appointment/service/impl/AppointmentOrderServiceImpl.java
View file @
b6930e3c
...
...
@@ -56,9 +56,14 @@ public class AppointmentOrderServiceImpl extends CrudServiceImpl<AppointmentOrde
@Override
public
QueryWrapper
<
AppointmentOrderEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
String
id
=
(
String
)
params
.
get
(
"id"
);
String
userId
=
(
String
)
params
.
get
(
"userId"
);
String
flag
=
(
String
)
params
.
get
(
"flag"
);
QueryWrapper
<
AppointmentOrderEntity
>
wrapper
=
new
QueryWrapper
<>();
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
;
}
...
...
@@ -148,7 +153,7 @@ public class AppointmentOrderServiceImpl extends CrudServiceImpl<AppointmentOrde
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://192.168.1.97
:8223/smartqueue/getpaperwait?sPaperNumber=" +sPaperNumber;
// 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号窗口\"]}"
;
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