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
8cdc799d
Commit
8cdc799d
authored
Jan 21, 2025
by
麻笑宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.大屏业务模块详情api返回处理
parent
a64779ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
DPSubServiceImpl.java
...t/module/statistcs/biz/service/impl/DPSubServiceImpl.java
+13
-0
azgz.json
...t-module-statistics-biz/src/main/resources/json/azgz.json
+3
-1
No files found.
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/DPSubServiceImpl.java
View file @
8cdc799d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistcs
.
biz
.
service
.
impl
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -22,6 +23,7 @@ import org.springframework.http.HttpHeaders;
import
org.springframework.http.MediaType
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.client.RestTemplate
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
...
...
@@ -130,6 +132,7 @@ public class DPSubServiceImpl {
String
renderType
=
tab
.
getString
(
"renderType"
);
Object
resultConvert
=
JsonValueUtils
.
getValueByKey
(
tab
,
"dataConfig"
,
"dataConfig.resultConvert"
);
Object
api
=
JsonValueUtils
.
getValueByKey
(
tab
,
"dataConfig"
,
"dataConfig.api"
);
JSONArray
subResultParams
=
tab
.
getJSONArray
(
"subResultParams"
);
tab
.
put
(
"param"
,
param
);
JSONObject
map
=
content
.
getJSONObject
(
tab
.
getString
(
"key"
));
...
...
@@ -143,6 +146,16 @@ public class DPSubServiceImpl {
ResponseModel
responseModel
=
this
.
getApiResult
((
JSONObject
)
api
,
!
ValidationUtil
.
isEmpty
(
resultConvert
)
?
resultConvert
.
toString
()
:
null
);
if
(!
ValidationUtil
.
isEmpty
(
responseModel
.
getResult
()))
{
apiResult
=
responseModel
.
getResult
();
if
(!
CollectionUtils
.
isEmpty
(
subResultParams
)){
for
(
Object
subParam
:
subResultParams
)
{
if
(
StrUtil
.
isNotBlank
(((
JSONObject
)
apiResult
).
getString
(
subParam
+
""
)))
{
String
[]
s1
=
((
JSONObject
)
apiResult
).
getString
(
subParam
+
""
).
split
(
"_"
);
if
(
s1
.
length
>
1
)
{
((
JSONObject
)
apiResult
).
put
(
subParam
+
""
,
s1
[
1
]);
}
}
}
}
}
else
{
apiResult
=
new
JSONObject
();
}
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/resources/json/azgz.json
View file @
8cdc799d
...
...
@@ -17,7 +17,9 @@
"responseSuccess"
:
"data.result.installationInfo"
}
}
}
},
"subResultParams"
:
[
"province"
,
"city"
,
"county"
,
"orgBranchCode"
,
"factoryUseSiteStreet"
,
"installLeaderName"
,
"useUnitCreditCode"
,
"propertyUnitName"
]
}
],
"content"
:
{
...
...
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