Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nouiWithSpringMVC
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
gechengyang
nouiWithSpringMVC
Commits
5a63f002
Commit
5a63f002
authored
Jun 10, 2020
by
cjh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新mapping配置文件映射关系
parent
b0231d77
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
14 deletions
+49
-14
Alias.java
src/main/java/org/sss/presentation/noui/api/model/Alias.java
+20
-2
Constants.java
...main/java/org/sss/presentation/noui/common/Constants.java
+3
-0
NoUiPresentationUtil.java
.../org/sss/presentation/noui/util/NoUiPresentationUtil.java
+18
-9
noUiMapping_dbcact_lst.properties
src/main/resources/noUiMapping_dbcact_lst.properties
+2
-0
noUiMapping_req_dbcact.properties
src/main/resources/noUiMapping_req_dbcact.properties
+2
-3
noUiMapping_resp_dbcact.properties
src/main/resources/noUiMapping_resp_dbcact.properties
+4
-0
No files found.
src/main/java/org/sss/presentation/noui/api/model/Alias.java
View file @
5a63f002
...
@@ -23,23 +23,41 @@ public class Alias {
...
@@ -23,23 +23,41 @@ public class Alias {
private
Map
<
String
,
String
>
rel
;
private
Map
<
String
,
String
>
rel
;
private
Map
<
String
,
String
>
revertRel
=
new
HashMap
<>();
private
Map
<
String
,
String
>
revertRel
=
new
HashMap
<>();
private
Map
<
String
,
String
>
lstRel
;
private
Map
<
String
,
String
>
revertLstRel
=
new
HashMap
<>();
@SuppressWarnings
(
"unchecked"
)
@SuppressWarnings
(
"unchecked"
)
public
Alias
(
String
mappingUrl
)
{
public
Alias
(
String
mappingUrl
,
String
flag
)
{
String
[]
mappingArgs
=
mappingUrl
.
split
(
"/"
);
String
[]
mappingArgs
=
mappingUrl
.
split
(
"/"
);
this
.
trnName
=
mappingArgs
[
mappingArgs
.
length
-
2
];
this
.
trnName
=
mappingArgs
[
mappingArgs
.
length
-
2
];
this
.
aliasActionUrl
=
mappingArgs
[
mappingArgs
.
length
-
1
];
this
.
aliasActionUrl
=
mappingArgs
[
mappingArgs
.
length
-
1
];
try
{
try
{
this
.
rel
=
new
HashMap
<
String
,
String
>((
Map
)
PropertyUtil
.
load
(
PRE
+
trnName
+
".properties"
));
this
.
rel
=
new
HashMap
<
String
,
String
>((
Map
)
PropertyUtil
.
load
(
PRE
+
flag
+
"_"
+
trnName
+
".properties"
));
for
(
String
key
:
this
.
rel
.
keySet
())
{
for
(
String
key
:
this
.
rel
.
keySet
())
{
this
.
revertRel
.
put
(
this
.
rel
.
get
(
key
),
key
);
this
.
revertRel
.
put
(
this
.
rel
.
get
(
key
),
key
);
}
}
//添加lst字段映射
this
.
lstRel
=
new
HashMap
<
String
,
String
>((
Map
)
PropertyUtil
.
load
(
PRE
+
trnName
+
"_lst.properties"
));
for
(
String
key
:
this
.
lstRel
.
keySet
())
{
this
.
revertLstRel
.
put
(
this
.
lstRel
.
get
(
key
),
key
);
}
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
public
String
getLstRelPath
(
String
alias
){
return
this
.
lstRel
.
get
(
alias
);
}
public
String
getRevertLstRelPath
(
String
alias
){
return
this
.
revertLstRel
.
get
(
alias
);
}
public
String
getRelPath
(
String
alias
)
{
public
String
getRelPath
(
String
alias
)
{
return
this
.
rel
.
get
(
alias
);
return
this
.
rel
.
get
(
alias
);
}
}
...
...
src/main/java/org/sss/presentation/noui/common/Constants.java
View file @
5a63f002
...
@@ -21,4 +21,7 @@ public class Constants {
...
@@ -21,4 +21,7 @@ public class Constants {
public
final
static
String
RESULT
=
"result"
;
public
final
static
String
RESULT
=
"result"
;
public
final
static
String
FILE_IN
=
"fileIn"
;
public
final
static
String
FILE_IN
=
"fileIn"
;
public
final
static
String
FILE_OUT
=
"fileOut"
;
public
final
static
String
FILE_OUT
=
"fileOut"
;
public
final
static
String
REQ
=
"req"
;
public
final
static
String
RESP
=
"resp"
;
}
}
src/main/java/org/sss/presentation/noui/util/NoUiPresentationUtil.java
View file @
5a63f002
...
@@ -60,8 +60,13 @@ public class NoUiPresentationUtil {
...
@@ -60,8 +60,13 @@ public class NoUiPresentationUtil {
List
<
Map
<
String
,
Object
>>
valueList
=
(
List
<
Map
<
String
,
Object
>>)
value
;
List
<
Map
<
String
,
Object
>>
valueList
=
(
List
<
Map
<
String
,
Object
>>)
value
;
for
(
Map
<
String
,
Object
>
m
:
valueList
)
{
for
(
Map
<
String
,
Object
>
m
:
valueList
)
{
IModule
module
=
moduleList
.
add
();
IModule
module
=
moduleList
.
add
();
for
(
Map
.
Entry
<
String
,
Object
>
entry
:
m
.
entrySet
())
for
(
Map
.
Entry
<
String
,
Object
>
entry
:
m
.
entrySet
()){
handleDatafield
(
context
,
(
IDatafield
<
Object
>)
module
.
get
(
entry
.
getKey
()),
entry
.
getValue
());
if
(
alias
.
getLstRelPath
(
entry
.
getKey
())==
null
){
handleDatafield
(
context
,
(
IDatafield
<
Object
>)
module
.
get
(
entry
.
getKey
()),
entry
.
getValue
());
}
else
{
handleDatafield
(
context
,
(
IDatafield
<
Object
>)
module
.
get
(
alias
.
getLstRelPath
(
entry
.
getKey
())),
entry
.
getValue
());
}
}
}
}
}
}
}
}
...
@@ -175,7 +180,7 @@ public class NoUiPresentationUtil {
...
@@ -175,7 +180,7 @@ public class NoUiPresentationUtil {
}
}
String
realPath
=
alias
.
getRelPath
(
aliasKey
);
String
realPath
=
alias
.
getRelPath
(
aliasKey
);
IBaseObject
baseObject
=
context
.
getSession
().
getBaseObject
(
context
.
getRoot
(),
realPath
);
IBaseObject
baseObject
=
context
.
getSession
().
getBaseObject
(
context
.
getRoot
(),
realPath
);
data
.
put
(
aliasKey
,
handIBaseObject
(
context
,
baseObject
,
realPath
));
data
.
put
(
aliasKey
,
handIBaseObject
(
context
,
baseObject
,
realPath
,
alias
));
}
}
return
data
;
return
data
;
}
}
...
@@ -188,7 +193,7 @@ public class NoUiPresentationUtil {
...
@@ -188,7 +193,7 @@ public class NoUiPresentationUtil {
String
aliasPath
=
aliasEntry
.
getValue
();
String
aliasPath
=
aliasEntry
.
getValue
();
if
(
aliasPath
.
startsWith
(
modifyEntry
.
getKey
()))
{
if
(
aliasPath
.
startsWith
(
modifyEntry
.
getKey
()))
{
Object
val
=
modifyEntry
.
getValue
();
Object
val
=
modifyEntry
.
getValue
();
data
.
put
(
aliasKey
,
handIBaseObject
(
context
,
val
,
aliasEntry
.
getValue
()));
data
.
put
(
aliasKey
,
handIBaseObject
(
context
,
val
,
aliasEntry
.
getValue
()
,
alias
));
}
}
}
}
...
@@ -234,7 +239,7 @@ public class NoUiPresentationUtil {
...
@@ -234,7 +239,7 @@ public class NoUiPresentationUtil {
return
null
;
return
null
;
}
}
public
static
Object
handIBaseObject
(
IContext
context
,
Object
val
,
String
path
)
{
public
static
Object
handIBaseObject
(
IContext
context
,
Object
val
,
String
path
,
Alias
alias
)
{
if
(
val
==
null
)
if
(
val
==
null
)
return
null
;
return
null
;
if
(
val
instanceof
IModuleList
<?>)
{
if
(
val
instanceof
IModuleList
<?>)
{
...
@@ -245,14 +250,18 @@ public class NoUiPresentationUtil {
...
@@ -245,14 +250,18 @@ public class NoUiPresentationUtil {
IModule
module
=
moduleList
.
get
(
index
);
IModule
module
=
moduleList
.
get
(
index
);
Collection
<
IDatafield
>
datafields
=
module
.
getDatafields
();
Collection
<
IDatafield
>
datafields
=
module
.
getDatafields
();
for
(
IDatafield
<
Object
>
datafield
:
datafields
)
{
for
(
IDatafield
<
Object
>
datafield
:
datafields
)
{
map
.
put
(
datafield
.
getName
(),
handle
(
datafield
.
getValue
(),
datafield
));
if
(
alias
.
getRevertLstRelPath
(
datafield
.
getName
())==
null
){
map
.
put
(
datafield
.
getName
(),
handle
(
datafield
.
getValue
(),
datafield
));
}
else
{
map
.
put
(
alias
.
getRevertLstRelPath
(
datafield
.
getName
()),
handle
(
datafield
.
getValue
(),
datafield
));
}
}
}
list
.
add
(
map
);
list
.
add
(
map
);
}
}
return
list
;
return
list
;
}
else
if
(
val
instanceof
IModule
)
{
}
else
if
(
val
instanceof
IModule
)
{
val
=
context
.
getSession
().
getBaseObject
(
context
.
getRoot
(),
path
);
val
=
context
.
getSession
().
getBaseObject
(
context
.
getRoot
(),
path
);
return
handIBaseObject
(
context
,
val
,
path
);
return
handIBaseObject
(
context
,
val
,
path
,
alias
);
}
else
if
(
val
instanceof
IDatafield
)
{
}
else
if
(
val
instanceof
IDatafield
)
{
IDatafield
datafield
=
(
IDatafield
)
val
;
IDatafield
datafield
=
(
IDatafield
)
val
;
return
handle
(
datafield
.
getValue
(),
datafield
);
return
handle
(
datafield
.
getValue
(),
datafield
);
...
@@ -263,14 +272,14 @@ public class NoUiPresentationUtil {
...
@@ -263,14 +272,14 @@ public class NoUiPresentationUtil {
public
static
Map
<
String
,
Object
>
getWholeAliasData
(
IContext
context
,
String
mappingUrl
)
public
static
Map
<
String
,
Object
>
getWholeAliasData
(
IContext
context
,
String
mappingUrl
)
{
{
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
Alias
alias
=
new
Alias
(
mappingUrl
);
Alias
alias
=
new
Alias
(
mappingUrl
,
Constants
.
RESP
);
for
(
String
aliasKey
:
alias
.
getRel
().
keySet
())
{
for
(
String
aliasKey
:
alias
.
getRel
().
keySet
())
{
if
(
aliasKey
.
startsWith
(
Constants
.
MAPPING_PRE
))
{
if
(
aliasKey
.
startsWith
(
Constants
.
MAPPING_PRE
))
{
continue
;
continue
;
}
}
String
realPath
=
alias
.
getRelPath
(
aliasKey
);
String
realPath
=
alias
.
getRelPath
(
aliasKey
);
IBaseObject
baseObject
=
context
.
getSession
().
getBaseObject
(
context
.
getRoot
(),
realPath
);
IBaseObject
baseObject
=
context
.
getSession
().
getBaseObject
(
context
.
getRoot
(),
realPath
);
data
.
put
(
aliasKey
,
NoUiPresentationUtil
.
handIBaseObject
(
context
,
baseObject
,
realPath
));
data
.
put
(
aliasKey
,
NoUiPresentationUtil
.
handIBaseObject
(
context
,
baseObject
,
realPath
,
alias
));
}
}
return
data
;
return
data
;
}
}
...
...
src/main/resources/noUiMapping_dbcact_lst.properties
0 → 100644
View file @
5a63f002
opnb_chnam
=
opnbchnam
\ No newline at end of file
src/main/resources/noUiMapping_dbcact.properties
→
src/main/resources/noUiMapping_
req_
dbcact.properties
View file @
5a63f002
_select
=
actp
\\
select
_select
=
actp
\\
select
cur
=
actp
\\
cur
cur
=
actp
\\
cur
actlst
=
\\
actp
\\
actlst
\ No newline at end of file
\ No newline at end of file
src/main/resources/noUiMapping_resp_dbcact.properties
0 → 100644
View file @
5a63f002
actlst
=
\\
actp
\\
actlst
midratmmmmmmmmmmm
=
\\
actgrp
\\
currat
\\
midrat
cur
=
\\
actgrp
\\
currat
\\
cur
\ No newline at end of file
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