Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gjjs-bd-common
Overview
Overview
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
s_guodong
gjjs-bd-common
Commits
9263beb0
Commit
9263beb0
authored
Aug 23, 2023
by
s_guodong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
动态面板
parent
34123856
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
195 additions
and
14 deletions
+195
-14
AbstractCommonResource.java
...om/ceb/gjjs/mda/resource/base/AbstractCommonResource.java
+0
-8
RequestBaseVo.java
.../main/java/com/ceb/gjjs/mda/special/vo/RequestBaseVo.java
+0
-4
SnapshotServiceImpl.java
...lliance/mda/runtime/mda/snapshot/SnapshotServiceImpl.java
+120
-0
PackDivBo.java
...rilliance/mda/runtime/mda/snapshot/bo/pack/PackDivBo.java
+2
-1
PackWindowBo.java
...liance/mda/runtime/mda/snapshot/bo/pack/PackWindowBo.java
+44
-0
DivBo.java
.../brilliance/mda/runtime/mda/snapshot/bo/unpack/DivBo.java
+3
-0
DocumentBo.java
...liance/mda/runtime/mda/snapshot/bo/unpack/DocumentBo.java
+3
-0
IncludeBo.java
...lliance/mda/runtime/mda/snapshot/bo/unpack/IncludeBo.java
+23
-0
BaseVO.java
.../main/java/com/brilliance/mda/runtime/request/BaseVO.java
+0
-1
No files found.
gjjs-bd-business/src/main/java/com/ceb/gjjs/mda/resource/base/AbstractCommonResource.java
View file @
9263beb0
...
...
@@ -245,14 +245,6 @@ public abstract class AbstractCommonResource<V extends BaseVO> {
if
(
cifno
.
length
()
>
10
)
{
return
"客户号cifno不能超过10"
;
}
String
id
=
requestBaseVo
.
getId
();
if
(
StringUtils
.
isBlank
(
id
))
{
return
"业务主键id不能为空"
;
}
baseVO
.
setId
(
id
);
if
(
id
.
length
()
>
8
)
{
return
"业务主键id不能超过8"
;
}
String
userid
=
requestBaseVo
.
getUserid
();
if
(
StringUtils
.
isBlank
(
userid
))
{
return
"用户userid不能为空"
;
...
...
gjjs-bd-business/src/main/java/com/ceb/gjjs/mda/special/vo/RequestBaseVo.java
View file @
9263beb0
...
...
@@ -18,10 +18,6 @@ import java.io.Serializable;
@Data
public
class
RequestBaseVo
implements
Serializable
{
@Length
(
max
=
8
,
message
=
"长度最大8"
)
@Need
private
String
id
;
@Length
(
max
=
10
,
message
=
"长度最大10"
)
@Need
private
String
cifno
;
...
...
gjjs-bd-runtime/src/main/java/com/brilliance/mda/runtime/mda/snapshot/SnapshotServiceImpl.java
View file @
9263beb0
package
com
.
brilliance
.
mda
.
runtime
.
mda
.
snapshot
;
import
com.brilliance.mda.runtime.mda.IModule
;
import
com.brilliance.mda.runtime.mda.IPanel
;
import
com.brilliance.mda.runtime.mda.impl.ModuleList
;
import
com.brilliance.mda.runtime.mda.snapshot.bo.ValueVo
;
import
com.brilliance.mda.runtime.mda.snapshot.bo.pack.*
;
...
...
@@ -74,6 +75,7 @@ public class SnapshotServiceImpl implements SnapshotService {
List
<
TextboxBo
>
xdecimalboxList
;
List
<
CheckboxBo
>
checkboxList
;
List
<
ListboxBo
>
listboxList
;
List
<
IncludeBo
>
includeBoList
;
BorderlayoutBo
borderlayoutBo
=
documentBo
.
getBorderlayoutBo
();
if
(
borderlayoutBo
!=
null
)
{
CenterBo
centerBo
=
borderlayoutBo
.
getCenterBo
();
...
...
@@ -85,6 +87,7 @@ public class SnapshotServiceImpl implements SnapshotService {
xdecimalboxList
=
divBo
.
getXdecimalboxList
();
checkboxList
=
divBo
.
getCheckboxList
();
listboxList
=
divBo
.
getListboxBoList
();
includeBoList
=
divBo
.
getIncludeBoList
();
}
else
{
textboxList
=
documentBo
.
getTextboxList
();
labelList
=
documentBo
.
getLabelList
();
...
...
@@ -93,6 +96,7 @@ public class SnapshotServiceImpl implements SnapshotService {
xdecimalboxList
=
documentBo
.
getXdecimalboxList
();
checkboxList
=
documentBo
.
getCheckboxList
();
listboxList
=
documentBo
.
getListboxBoList
();
includeBoList
=
documentBo
.
getIncludeBoList
();
}
PackDivBo
packDivBo
=
new
PackDivBo
();
...
...
@@ -117,6 +121,9 @@ public class SnapshotServiceImpl implements SnapshotService {
// listboxList
packDivBo
.
setListboxBoList
(
handleListboxList
(
listboxList
,
parent
));
// includeList
packDivBo
.
setWindowBoList
(
handleIncludeList
(
includeBoList
,
parent
));
// 组成xml需要的实体
PackBorderlayoutBo
packBorderlayoutBo
=
new
PackBorderlayoutBo
();
PackCenterBo
packCenterBo
=
new
PackCenterBo
();
...
...
@@ -501,6 +508,119 @@ public class SnapshotServiceImpl implements SnapshotService {
/**
* 处理include标签
*
* @param includeBoList
* @param parent
* @return
*/
private
List
<
PackWindowBo
>
handleIncludeList
(
List
<
IncludeBo
>
includeBoList
,
IModule
parent
)
{
List
<
PackWindowBo
>
list
=
new
ArrayList
<>();
if
(
includeBoList
==
null
)
{
return
list
;
}
for
(
IncludeBo
includeBo
:
includeBoList
)
{
List
<
CustomAttributes
>
customAttributes
=
includeBo
.
getCustomAttributes
();
CustomAttributes
attributeValue
=
getAttributeValue
(
customAttributes
);
String
fieldUrl
=
attributeValue
.
getFieldUrl
();
// 通过路径获取面板 解析面板
DocumentBo
documentBo
=
unpackSubTemplate
(
fieldUrl
,
parent
);
// 打包
PackWindowBo
data
=
packSubTemplate
(
documentBo
,
parent
);
data
.
setStyle
(
includeBo
.
getStyle
());
list
.
add
(
data
);
}
return
list
;
}
/**
* 打包子面板
*
* @param documentBo
* @param parent
* @return
*/
private
PackWindowBo
packSubTemplate
(
DocumentBo
documentBo
,
IModule
parent
)
{
List
<
TextboxBo
>
textboxList
;
List
<
LabelBo
>
labelList
;
List
<
TextboxBo
>
xcomboboxList
;
List
<
TextboxBo
>
xdateboxList
;
List
<
TextboxBo
>
xdecimalboxList
;
List
<
CheckboxBo
>
checkboxList
;
List
<
ListboxBo
>
listboxList
;
List
<
IncludeBo
>
includeBoList
;
BorderlayoutBo
borderlayoutBo
=
documentBo
.
getBorderlayoutBo
();
if
(
borderlayoutBo
!=
null
)
{
CenterBo
centerBo
=
borderlayoutBo
.
getCenterBo
();
DivBo
divBo
=
centerBo
.
getDivBo
();
textboxList
=
divBo
.
getTextboxList
();
labelList
=
divBo
.
getLabelList
();
xcomboboxList
=
divBo
.
getXcomboboxList
();
xdateboxList
=
divBo
.
getXdateboxList
();
xdecimalboxList
=
divBo
.
getXdecimalboxList
();
checkboxList
=
divBo
.
getCheckboxList
();
listboxList
=
divBo
.
getListboxBoList
();
includeBoList
=
divBo
.
getIncludeBoList
();
}
else
{
textboxList
=
documentBo
.
getTextboxList
();
labelList
=
documentBo
.
getLabelList
();
xcomboboxList
=
documentBo
.
getXcomboboxList
();
xdateboxList
=
documentBo
.
getXdateboxList
();
xdecimalboxList
=
documentBo
.
getXdecimalboxList
();
checkboxList
=
documentBo
.
getCheckboxList
();
listboxList
=
documentBo
.
getListboxBoList
();
includeBoList
=
documentBo
.
getIncludeBoList
();
}
PackWindowBo
packWindowBo
=
new
PackWindowBo
();
// textbox
packWindowBo
.
setTextboxBoList
(
handleTextbox
(
textboxList
));
// labelList
packWindowBo
.
setLabelBoList
(
handleLabelList
(
labelList
));
// xComboboxList
packWindowBo
.
setComboboxBoList
(
handlexComboboxList
(
xcomboboxList
));
// xdateboxList
packWindowBo
.
setDateboxBoList
(
handleXdateboxList
(
xdateboxList
));
// xdecimalboxList
packWindowBo
.
setDecimalboxBoList
(
handleXdecimalboxList
(
xdecimalboxList
));
// checkboxList
packWindowBo
.
setCheckboxBoList
(
handleCheckboxList
(
checkboxList
));
// listboxList
packWindowBo
.
setListboxBoList
(
handleListboxList
(
listboxList
,
parent
));
// includeList
packWindowBo
.
setWindowBoList
(
handleIncludeList
(
includeBoList
,
parent
));
return
packWindowBo
;
}
/**
* 解析子面板
*
* @param fieldUrl
* @param parent
* @return
*/
private
DocumentBo
unpackSubTemplate
(
String
fieldUrl
,
IModule
parent
)
{
Set
<
ValueVo
>
set
=
new
HashSet
<>();
set
.
add
(
new
ValueVo
(
fieldUrl
));
Map
<
String
,
Object
>
valueMap
=
getValueMap
(
set
,
parent
);
if
(
valueMap
.
get
(
fieldUrl
)
instanceof
IPanel
)
{
IPanel
panel
=
(
IPanel
)
valueMap
.
get
(
fieldUrl
);
return
unpackTemplate
(
panel
.
getPath
());
}
log
.
warn
(
"找不到子面板:{}"
,
parent
.
getName
()
+
"."
+
fieldUrl
);
return
new
DocumentBo
();
}
/**
* 获取列表中的值
*
* @param fieldUrl
...
...
gjjs-bd-runtime/src/main/java/com/brilliance/mda/runtime/mda/snapshot/bo/pack/PackDivBo.java
View file @
9263beb0
...
...
@@ -39,5 +39,6 @@ public class PackDivBo {
@XmlElement
(
name
=
"listbox"
)
private
List
<
PackListboxBo
>
listboxBoList
;
@XmlElement
(
name
=
"window"
)
private
List
<
PackWindowBo
>
windowBoList
;
}
gjjs-bd-runtime/src/main/java/com/brilliance/mda/runtime/mda/snapshot/bo/pack/PackWindowBo.java
0 → 100644
View file @
9263beb0
package
com
.
brilliance
.
mda
.
runtime
.
mda
.
snapshot
.
bo
.
pack
;
import
lombok.Data
;
import
javax.xml.bind.annotation.*
;
import
java.util.List
;
/**
* @Description
* @Author s_guodong
* @Date 2023/8/16
*/
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
@XmlRootElement
(
name
=
"window"
)
@Data
public
class
PackWindowBo
{
@XmlAttribute
(
name
=
"style"
)
private
String
style
;
@XmlElement
(
name
=
"label"
)
private
List
<
PackLabelBo
>
labelBoList
;
@XmlElement
(
name
=
"textbox"
)
private
List
<
PackTextboxBo
>
textboxBoList
;
@XmlElement
(
name
=
"decimalbox"
)
private
List
<
PackDecimalboxBo
>
decimalboxBoList
;
@XmlElement
(
name
=
"combobox"
)
private
List
<
PackComboboxBo
>
comboboxBoList
;
@XmlElement
(
name
=
"datebox"
)
private
List
<
PackDateboxBo
>
dateboxBoList
;
@XmlElement
(
name
=
"checkbox"
)
private
List
<
PackCheckboxBo
>
checkboxBoList
;
@XmlElement
(
name
=
"listbox"
)
private
List
<
PackListboxBo
>
listboxBoList
;
@XmlElement
(
name
=
"window"
)
private
List
<
PackWindowBo
>
windowBoList
;
}
gjjs-bd-runtime/src/main/java/com/brilliance/mda/runtime/mda/snapshot/bo/unpack/DivBo.java
View file @
9263beb0
...
...
@@ -39,4 +39,7 @@ public class DivBo {
@XmlElement
(
name
=
"listbox"
)
private
List
<
ListboxBo
>
listboxBoList
;
@XmlElement
(
name
=
"include"
)
private
List
<
IncludeBo
>
includeBoList
;
}
gjjs-bd-runtime/src/main/java/com/brilliance/mda/runtime/mda/snapshot/bo/unpack/DocumentBo.java
View file @
9263beb0
...
...
@@ -39,6 +39,9 @@ public class DocumentBo {
@XmlElement
(
name
=
"listbox"
)
private
List
<
ListboxBo
>
listboxBoList
;
@XmlElement
(
name
=
"include"
)
private
List
<
IncludeBo
>
includeBoList
;
@XmlElement
(
name
=
"borderlayout"
)
private
BorderlayoutBo
borderlayoutBo
;
}
gjjs-bd-runtime/src/main/java/com/brilliance/mda/runtime/mda/snapshot/bo/unpack/IncludeBo.java
0 → 100644
View file @
9263beb0
package
com
.
brilliance
.
mda
.
runtime
.
mda
.
snapshot
.
bo
.
unpack
;
import
lombok.Data
;
import
javax.xml.bind.annotation.*
;
import
java.util.List
;
/**
* @Description
* @Author s_guodong
* @Date 2023/8/16
*/
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
@XmlRootElement
(
name
=
"include"
)
@Data
public
class
IncludeBo
{
@XmlElement
(
name
=
"custom-attributes"
)
private
List
<
CustomAttributes
>
customAttributes
;
@XmlAttribute
(
name
=
"style"
)
private
String
style
;
}
gjjs-bd-runtime/src/main/java/com/brilliance/mda/runtime/request/BaseVO.java
View file @
9263beb0
...
...
@@ -10,7 +10,6 @@ public class BaseVO {
protected
String
src
;
protected
String
transid
;
protected
String
userid
;
protected
String
id
;
protected
String
cifno
;
protected
String
pageId
;
public
Long
total
;
...
...
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