Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
entrance_api
Project
Project
Details
Activity
Releases
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
王琮
entrance_api
Commits
3902df8f
Commit
3902df8f
authored
Dec 14, 2022
by
罗可心
😕
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
452e84e2
0e1d2008
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
25 deletions
+32
-25
JieLinkServiceImpl.java
.../integration/jieLink/service/impl/JieLinkServiceImpl.java
+22
-19
SysUser.java
src/main/java/org/rcisoft/sys/sysuser/entity/SysUser.java
+3
-1
SysUserRepositorys.xml
src/main/resources/mapper/SysUserRepositorys.xml
+5
-3
VisitPersonRepositorys.xml
src/main/resources/mapper/VisitPersonRepositorys.xml
+2
-2
No files found.
src/main/java/org/rcisoft/integration/jieLink/service/impl/JieLinkServiceImpl.java
View file @
3902df8f
...
...
@@ -97,7 +97,7 @@ public class JieLinkServiceImpl implements IJieLinkService {
try
{
ResponseEntity
<
JSONObject
>
responseEntity
=
restTemplate
.
postForEntity
(
uriAddr
.
toString
(),
httpEntity
,
JSONObject
.
class
);
if
(
HttpStatus
.
OK
.
value
()
==
responseEntity
.
getStatusCode
().
value
())
{
log
.
debug
(
"getAppKeyInfo接口返回信息:
{0}"
,
responseEntity
.
getBody
().
toJSONString
());
log
.
debug
(
"getAppKeyInfo接口返回信息:
"
+
responseEntity
.
getBody
().
toJSONString
());
JSONObject
body
=
responseEntity
.
getBody
();
if
(
StringUtils
.
equals
(
body
.
getString
(
"code"
),
"0"
)){
List
<
AppInfoDto
>
appInfoDtoList
=
JSONArray
.
parseArray
(
body
.
getJSONArray
(
"data"
).
toJSONString
(),
AppInfoDto
.
class
);
...
...
@@ -145,7 +145,7 @@ public class JieLinkServiceImpl implements IJieLinkService {
ResponseEntity
<
JSONObject
>
responseEntity
=
restTemplate
.
postForEntity
(
uriAddr
.
toString
(),
httpEntity
,
JSONObject
.
class
);
try
{
if
(
HttpStatus
.
OK
.
value
()
==
responseEntity
.
getStatusCode
().
value
())
{
log
.
debug
(
"pushAddUserData接口返回信息:
{0}"
,
responseEntity
.
getBody
().
toJSONString
());
log
.
debug
(
"pushAddUserData接口返回信息:
"
+
responseEntity
.
getBody
().
toJSONString
());
JieLinkResultDto
<
JieLinkPersonDto
>
resultData
=
JSONObject
.
toJavaObject
(
responseEntity
.
getBody
(),
JieLinkResultDto
.
class
);
if
(
StringUtils
.
equals
(
resultData
.
getCode
(),
"0"
)){
JieLinkPersonDto
persion
=
resultData
.
getData
();
...
...
@@ -206,7 +206,7 @@ public class JieLinkServiceImpl implements IJieLinkService {
ResponseEntity
<
JSONObject
>
responseEntity
=
restTemplate
.
postForEntity
(
uriAddr
.
toString
(),
httpEntity
,
JSONObject
.
class
);
try
{
if
(
HttpStatus
.
OK
.
value
()
==
responseEntity
.
getStatusCode
().
value
())
{
log
.
debug
(
"pushModifyUserData接口返回信息:
{0}"
,
responseEntity
.
getBody
().
toJSONString
());
log
.
debug
(
"pushModifyUserData接口返回信息:
"
+
responseEntity
.
getBody
().
toJSONString
());
JieLinkResultDto
<
JieLinkPersonDto
>
resultData
=
JSONObject
.
toJavaObject
(
responseEntity
.
getBody
(),
JieLinkResultDto
.
class
);
if
(
StringUtils
.
equals
(
resultData
.
getCode
(),
"0"
)){
return
true
;
...
...
@@ -287,7 +287,7 @@ public class JieLinkServiceImpl implements IJieLinkService {
try
{
if
(
HttpStatus
.
OK
.
value
()
==
responseEntity
.
getStatusCode
().
value
())
{
//后续处理逻辑
log
.
debug
(
"pushVisitorData接口返回信息:
{0}"
,
responseEntity
.
getBody
().
toJSONString
());
log
.
debug
(
"pushVisitorData接口返回信息:
"
+
responseEntity
.
getBody
().
toJSONString
());
JieLinkResultDto
<
JSONObject
>
resultData
=
JSONObject
.
toJavaObject
(
responseEntity
.
getBody
(),
JieLinkResultDto
.
class
);
if
(
StringUtils
.
equals
(
resultData
.
getCode
(),
"0"
)){
return
true
;
...
...
@@ -340,7 +340,7 @@ public class JieLinkServiceImpl implements IJieLinkService {
ResponseEntity
<
JSONObject
>
responseEntity
=
restTemplate
.
postForEntity
(
uriAddr
.
toString
(),
httpEntity
,
JSONObject
.
class
);
try
{
if
(
HttpStatus
.
OK
.
value
()
==
responseEntity
.
getStatusCode
().
value
())
{
log
.
debug
(
"cancelVisitorData接口返回信息:
{0}"
,
responseEntity
.
getBody
().
toJSONString
());
log
.
debug
(
"cancelVisitorData接口返回信息:
"
+
responseEntity
.
getBody
().
toJSONString
());
JieLinkResultDto
resultData
=
JSONObject
.
toJavaObject
(
responseEntity
.
getBody
(),
JieLinkResultDto
.
class
);
if
(
StringUtils
.
equals
(
resultData
.
getCode
(),
"0"
)){
return
true
;
...
...
@@ -490,7 +490,7 @@ public class JieLinkServiceImpl implements IJieLinkService {
ResponseEntity
<
JSONObject
>
responseEntity
=
restTemplate
.
postForEntity
(
uriAddr
.
toString
(),
httpEntity
,
JSONObject
.
class
);
try
{
if
(
HttpStatus
.
OK
.
value
()
==
responseEntity
.
getStatusCode
().
value
())
{
log
.
debug
(
"pullVisitUserQrCode接口返回信息:
{0}"
,
responseEntity
.
getBody
().
toJSONString
());
log
.
debug
(
"pullVisitUserQrCode接口返回信息:
"
+
responseEntity
.
getBody
().
toJSONString
());
JieLinkResultDto
<
JSONObject
>
resultData
=
JSONObject
.
toJavaObject
(
responseEntity
.
getBody
(),
JieLinkResultDto
.
class
);
if
(
StringUtils
.
equals
(
resultData
.
getCode
(),
"0"
)){
JSONObject
data
=
resultData
.
getData
();
...
...
@@ -643,21 +643,24 @@ public class JieLinkServiceImpl implements IJieLinkService {
ResponseEntity
<
JSONObject
>
responseEntity
=
restTemplate
.
postForEntity
(
uriAddr
.
toString
(),
httpEntity
,
JSONObject
.
class
);
try
{
if
(
HttpStatus
.
OK
.
value
()
==
responseEntity
.
getStatusCode
().
value
())
{
log
.
info
(
"syncDeviceInfo接口返回信息:
{0}"
,
responseEntity
.
getBody
().
toJSONString
());
log
.
info
(
"syncDeviceInfo接口返回信息:
"
+
responseEntity
.
getBody
().
toJSONString
());
JSONObject
body
=
responseEntity
.
getBody
();
if
(
StringUtils
.
equals
(
body
.
getString
(
"code"
),
"0"
)){
List
<
Devices
>
devicesList
=
JSONObject
.
parseArray
(
body
.
getString
(
"data"
),
Devices
.
class
);
if
(
devicesList
!=
null
&&
!
devicesList
.
isEmpty
()){
List
<
Devices
>
searchList
=
devicesService
.
findAll
(
null
);
Map
<
String
,
Devices
>
searchMap
=
new
HashMap
<>();
for
(
Devices
d:
searchList
){
searchMap
.
put
(
d
.
getDeviceGuid
(),
d
);
}
for
(
Devices
inDevice:
devicesList
){
if
(
searchMap
.
containsKey
(
inDevice
.
getDeviceGuid
())){
devicesService
.
merge
(
inDevice
);
}
else
{
devicesService
.
persist
(
inDevice
);
JSONObject
data
=
body
.
getJSONObject
(
"data"
);
if
(
data
.
containsKey
(
"devices"
)
&&
StringUtils
.
isNotBlank
(
data
.
getString
(
"devices"
))){
List
<
Devices
>
devicesList
=
JSONArray
.
parseArray
(
data
.
getJSONArray
(
"devices"
).
toJSONString
(),
Devices
.
class
);
if
(
devicesList
!=
null
&&
!
devicesList
.
isEmpty
()){
List
<
Devices
>
searchList
=
devicesService
.
findAll
(
null
);
Map
<
String
,
Devices
>
searchMap
=
new
HashMap
<>();
for
(
Devices
d:
searchList
){
searchMap
.
put
(
d
.
getDeviceGuid
(),
d
);
}
for
(
Devices
inDevice:
devicesList
){
if
(
searchMap
.
containsKey
(
inDevice
.
getDeviceGuid
())){
devicesService
.
merge
(
inDevice
);
}
else
{
devicesService
.
persist
(
inDevice
);
}
}
}
}
...
...
src/main/java/org/rcisoft/sys/sysuser/entity/SysUser.java
View file @
3902df8f
...
...
@@ -8,6 +8,7 @@ import lombok.*;
import
org.rcisoft.core.entity.CyIdIncreEntity
;
import
org.springframework.data.annotation.Transient
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -23,6 +24,7 @@ public class SysUser extends CyIdIncreEntity<SysUser> {
@Transient
private
List
<
Integer
>
deptSJ
;
@Excel
(
name
=
"所属园区"
,
orderNum
=
"22"
,
width
=
20
)
//地址中文
private
String
addressLabel
;
...
...
@@ -296,7 +298,7 @@ public class SysUser extends CyIdIncreEntity<SysUser> {
* @default
* @default
*/
@Excel
(
name
=
"所属园区"
,
orderNum
=
"22"
,
width
=
20
)
//
@Excel(name = "所属园区", orderNum = "22", width = 20)
private
String
address
;
/**
...
...
src/main/resources/mapper/SysUserRepositorys.xml
View file @
3902df8f
...
...
@@ -112,10 +112,10 @@
select *
from sys_user
where del_flag = 0
and user_type = 0
and identity = 1
and user_type = 0
and (identity = 2 or identity = 1)
<if
test=
"entity.phone !=null and entity.phone != '' "
>
and phone
= #{entity.phone}
and phone = #{entity.phone}
</if>
</select>
...
...
@@ -280,6 +280,8 @@
<if
test=
"entity.nltBzLabel != null"
>
nlt_bz_label = #{entity.nltBzLabel},
</if>
<if
test=
"entity.password != null"
>
password = #{entity.password},
</if>
<if
test=
"entity.glFlag != null"
>
gl_flag = #{entity.glFlag},
</if>
<if
test=
"entity.addressLabel != null"
>
address_label = #{entity.addressLabel} ,
</if>
<if
test=
"entity.positionLabel != null"
>
position_label = #{entity.positionLabel},
</if>
</trim>
where business_id = #{entity.businessId}
</update>
...
...
src/main/resources/mapper/VisitPersonRepositorys.xml
View file @
3902df8f
...
...
@@ -138,14 +138,14 @@
<if
test=
"entity.lastDateQueryEnd != null"
>
and date_format(su.last_date,'%Y-%m-%d')
<
= date_format(#{entity.lastDateQueryEnd},'%Y-%m-%d')
</if>
<if
test=
"entity.sort == '
1
'.toString() "
>
<!-- 排序-->
<if
test=
"entity.sort == '
3
'.toString() "
>
<!-- 排序-->
order BY su.first_date desc,su.create_date desc
</if>
<if
test=
"entity.sort == '2'.toString() "
>
<!-- 排序-->
-- order BY su.name desc
order BY F_GET_PYJM(su.name)
</if>
<if
test=
"entity.sort == '
3
'.toString() "
>
<!-- 排序-->
<if
test=
"entity.sort == '
1
'.toString() "
>
<!-- 排序-->
order BY su.last_date desc,su.create_date desc
</if>
</select>
...
...
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