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
38ea11d3
Commit
38ea11d3
authored
Dec 19, 2023
by
yangyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
105101d8
61071ea1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
2 deletions
+37
-2
JyjcInspectionApplicationServiceImpl.java
...iz/service/impl/JyjcInspectionApplicationServiceImpl.java
+37
-2
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/JyjcInspectionApplicationServiceImpl.java
View file @
38ea11d3
...
@@ -285,16 +285,51 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -285,16 +285,51 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
FeignClientResult
<
Page
<
JSONObject
>>
response
=
jgFeignClient
.
queryForPage
(
hashMap
);
FeignClientResult
<
Page
<
JSONObject
>>
response
=
jgFeignClient
.
queryForPage
(
hashMap
);
if
(
200
==
response
.
getStatus
()
&&
ObjectUtils
.
isNotEmpty
(
response
.
getResult
()))
{
if
(
200
==
response
.
getStatus
()
&&
ObjectUtils
.
isNotEmpty
(
response
.
getResult
()))
{
List
<
JSONObject
>
records
=
response
.
getResult
().
getRecords
();
List
<
JSONObject
>
records
=
response
.
getResult
().
getRecords
();
ArrayList
<
Map
<
String
,
Object
>>
arrayList
=
new
ArrayList
<>();
records
.
forEach
(
item
->
{
records
.
forEach
(
item
->
{
item
.
remove
(
"SEQUENCE_NBR"
);
item
.
remove
(
"SEQUENCE_NBR"
);
HashMap
<
String
,
Object
>
objectHashMap
=
new
HashMap
<>();
for
(
Map
.
Entry
<
String
,
Object
>
stringObjectEntry
:
item
.
entrySet
())
{
objectHashMap
.
put
(
convertToCamelCase
(
stringObjectEntry
.
getKey
()),
stringObjectEntry
.
getValue
());
objectHashMap
.
put
(
stringObjectEntry
.
getKey
(),
stringObjectEntry
.
getValue
());
}
arrayList
.
add
(
objectHashMap
);
});
});
List
<
JyjcInspectionApplicationEquipModel
>
equips
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
records
),
JyjcInspectionApplicationEquipModel
.
class
);
map
.
put
(
"equip"
,
arrayList
);
map
.
put
(
"equip"
,
equips
);
}
}
map
.
putAll
(
attMap
);
map
.
putAll
(
attMap
);
return
map
;
return
map
;
}
}
/**
* 将下划线大写方式命名的字符串转换为驼峰式。如果转换前的下划线大写方式命名的字符串为空,则返回空字符串
*
* @param name 转换前的下划线大写方式命名的字符串
* @return 转换后的驼峰式命名的字符串
*/
public
static
String
convertToCamelCase
(
String
name
)
{
StringBuilder
result
=
new
StringBuilder
();
// 快速检查
if
(
name
==
null
||
name
.
isEmpty
())
{
// 没必要转换
return
""
;
}
else
if
(!
name
.
contains
(
"_"
))
{
// 不含下划线,仅将首字母大写
return
name
.
substring
(
0
,
1
).
toUpperCase
()
+
name
.
substring
(
1
);
}
// 用下划线将原始字符串分割
String
[]
camels
=
name
.
split
(
"_"
);
for
(
String
camel
:
camels
)
{
// 跳过原始字符串中开头、结尾的下换线或双重下划线
if
(
camel
.
isEmpty
())
{
continue
;
}
// 首字母大写
result
.
append
(
camel
.
substring
(
0
,
1
).
toUpperCase
());
result
.
append
(
camel
.
substring
(
1
).
toLowerCase
());
}
return
result
.
toString
();
}
/**
/**
* 接收
* 接收
...
...
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