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
cd8fd7d1
Commit
cd8fd7d1
authored
Jul 18, 2024
by
刘凡
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*)子表单逻辑
parent
833d6cd5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
3 deletions
+34
-3
DPSubServiceImpl.java
...s/boot/module/jyjc/biz/service/impl/DPSubServiceImpl.java
+34
-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 @
cd8fd7d1
...
@@ -103,7 +103,7 @@ public class DPSubServiceImpl {
...
@@ -103,7 +103,7 @@ public class DPSubServiceImpl {
this
.
buildSubContentData
(
map
,
i
,
yObj
,
mergedArray
,
apiResult
);
this
.
buildSubContentData
(
map
,
i
,
yObj
,
mergedArray
,
apiResult
);
}
}
}
else
if
(
"subForm"
.
equals
(
yObj
.
get
(
"componentKey"
)))
{
// 子表单
}
else
if
(
"subForm"
.
equals
(
yObj
.
get
(
"componentKey"
)))
{
// 子表单
this
.
buildSubFormData
(
map
,
i
,
yObj
,
apiResult
);
}
else
if
(
"formTable"
.
equals
(
yObj
.
get
(
"componentKey"
))){
}
else
if
(
"formTable"
.
equals
(
yObj
.
get
(
"componentKey"
))){
map
=
new
JSONObject
();
map
=
new
JSONObject
();
map
.
put
(
"columns"
,
JsonValueUtils
.
getValueByKey
(
yObj
,
"visualParams"
,
"visualParams.modelTableColumns"
));
map
.
put
(
"columns"
,
JsonValueUtils
.
getValueByKey
(
yObj
,
"visualParams"
,
"visualParams.modelTableColumns"
));
...
@@ -306,7 +306,7 @@ public class DPSubServiceImpl {
...
@@ -306,7 +306,7 @@ public class DPSubServiceImpl {
}
}
public
JSONObject
buildSubContentData
(
JSONObject
map
,
int
i
,
JSONObject
yObj
,
List
<
Object
>
mergedArray
,
JSONObject
apiResult
){
public
JSONObject
buildSubContentData
(
JSONObject
map
,
int
i
,
JSONObject
yObj
,
List
<
Object
>
mergedArray
,
JSONObject
apiResult
){
JSONArray
jsonArray
=
map
.
getJSONArray
(
"subs"
);
JSONArray
subs
=
map
.
getJSONArray
(
"subs"
);
JSONArray
children
=
yObj
.
getJSONArray
(
"children"
);
JSONArray
children
=
yObj
.
getJSONArray
(
"children"
);
List
<
Object
>
columnsArray
=
children
.
stream
().
filter
(
x
->
{
List
<
Object
>
columnsArray
=
children
.
stream
().
filter
(
x
->
{
JSONObject
xObj
=
(
JSONObject
)
x
;
JSONObject
xObj
=
(
JSONObject
)
x
;
...
@@ -352,7 +352,38 @@ public class DPSubServiceImpl {
...
@@ -352,7 +352,38 @@ public class DPSubServiceImpl {
subObj
.
put
(
"datas"
,
datas
);
subObj
.
put
(
"datas"
,
datas
);
}
}
});
});
jsonArray
.
add
(
subObj
);
subs
.
add
(
subObj
);
return
map
;
}
public
JSONObject
buildSubFormData
(
JSONObject
map
,
int
i
,
JSONObject
yObj
,
JSONObject
apiResult
){
JSONArray
subs
=
map
.
getJSONArray
(
"subs"
);
JSONArray
children
=
yObj
.
getJSONArray
(
"children"
);
JSONObject
subObj
=
new
JSONObject
();
subObj
.
put
(
"key"
,
"key"
+
i
);
subObj
.
put
(
"displayName"
,
JsonValueUtils
.
getValueByKey
(
yObj
,
"visualParams"
,
"visualParams.label"
));
subObj
.
put
(
"renderType"
,
"table"
);
List
<
Object
>
noHiddenChildren
=
children
.
stream
().
filter
(
x
->
{
JSONObject
xObj
=
(
JSONObject
)
x
;
return
!
"hidden"
.
equals
(
JsonValueUtils
.
getValueByKey
(
xObj
,
"visualParams"
,
"visualParams.behavior"
));
}).
collect
(
Collectors
.
toList
());
List
<
JSONObject
>
columns
=
noHiddenChildren
.
stream
().
map
(
x
->
{
JSONObject
xObj
=
(
JSONObject
)
x
;
JSONObject
visualParams
=
xObj
.
getJSONObject
(
"visualParams"
);
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"key"
,
xObj
.
get
(
"eid"
));
jsonObject
.
put
(
"dataIndex"
,
visualParams
.
get
(
"fieldKey"
));
jsonObject
.
put
(
"title"
,
visualParams
.
get
(
"label"
));
return
jsonObject
;
}).
collect
(
Collectors
.
toList
());
subObj
.
put
(
"columns"
,
columns
);
subObj
.
put
(
"dataList"
,
apiResult
.
get
(
JsonValueUtils
.
getValueByKey
(
yObj
,
"visualParams"
,
"visualParams.fieldKey"
)));
subs
.
add
(
subObj
);
return
map
;
return
map
;
}
}
...
...
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