Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
1e7d8b78
Commit
1e7d8b78
authored
Jul 19, 2024
by
邢磊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*)修改二维码逻辑
parent
5cf3a0e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
DPSubServiceImpl.java
...s/boot/module/jyjc/biz/service/impl/DPSubServiceImpl.java
+18
-3
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/DPSubServiceImpl.java
View file @
1e7d8b78
...
...
@@ -20,6 +20,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.client.RestTemplate
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.DateUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -262,12 +263,26 @@ public class DPSubServiceImpl {
public
JSONObject
buildContentData
(
JSONObject
map
,
List
<
Object
>
mergedArray
,
JSONObject
apiResult
){
JSONArray
datas
=
new
JSONArray
();
// 二维码
//
处理
二维码
mergedArray
.
stream
().
filter
(
x
->
"QRCode"
.
equals
(
JsonValueUtils
.
getValueByKey
(
x
,
"componentKey"
,
null
))).
findFirst
().
ifPresent
(
x
->
{
JSONObject
qrcode
=
map
.
getJSONObject
(
"qrcode"
);
qrcode
.
put
(
"text"
,
apiResult
.
get
(
"problemTime"
));
String
problemTime
=
apiResult
.
getString
(
"problemTime"
);
String
problemStatus
=
apiResult
.
getString
(
"problemStatus"
);
if
(!
ValidationUtil
.
isEmpty
(
problemTime
)){
try
{
qrcode
.
put
(
"text"
,
DateUtil
.
formatDate
(
DateUtil
.
smartFormat
(
problemTime
),
"yyyy-MM-dd"
));
qrcode
.
put
(
"subtext"
,
DateUtil
.
formatDate
(
DateUtil
.
smartFormat
(
problemTime
),
"HH:mm:ss"
));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
if
(
"正常"
.
equals
(
problemStatus
)){
problemStatus
=
"green"
;
}
else
if
(
"异常"
.
equals
(
problemStatus
)){
problemStatus
=
"red"
;
}
qrcode
.
put
(
"value"
,
!
ValidationUtil
.
isEmpty
(
apiResult
.
get
(
"useCode"
))
?
apiResult
.
get
(
"useCode"
)
:
apiResult
.
get
(
"USE_ORG_CODE"
));
qrcode
.
put
(
"status"
,
apiResult
.
get
(
"problemStatus"
)
);
qrcode
.
put
(
"status"
,
problemStatus
);
});
mergedArray
=
mergedArray
.
stream
().
filter
(
x
->
!
"QRCode"
.
equals
(
JsonValueUtils
.
getValueByKey
(
x
,
"visualParams"
,
"visualParams.componentKey"
))).
collect
(
Collectors
.
toList
());
...
...
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