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
5e1df948
Commit
5e1df948
authored
Apr 29, 2019
by
gechengyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify
parent
b6598e9d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
28 deletions
+29
-28
ErrorCodes.java
...va/org/sss/presentation/noui/api/response/ErrorCodes.java
+2
-0
NoUiPresentation.java
...a/org/sss/presentation/noui/context/NoUiPresentation.java
+17
-0
AbstractCommonController.java
...resentation/noui/controller/AbstractCommonController.java
+1
-1
NoUiPresentationUtil.java
.../org/sss/presentation/noui/util/NoUiPresentationUtil.java
+9
-27
CyHttpTest.java
...ava/org/sss/presentation/noui/api/servlet/CyHttpTest.java
+0
-0
No files found.
src/main/java/org/sss/presentation/noui/api/response/ErrorCodes.java
View file @
5e1df948
...
...
@@ -29,4 +29,6 @@ public class ErrorCodes {
public
static
final
String
INTERRUPTED_ERROR
=
"R9997"
;
public
static
final
String
REDIS_CONNECTION_ERROR
=
"R9998"
;
public
static
final
String
ERROR
=
"R9999"
;
public
static
final
String
BUSINESS_ERROR
=
"E0001"
;
}
src/main/java/org/sss/presentation/noui/context/NoUiPresentation.java
View file @
5e1df948
...
...
@@ -15,7 +15,9 @@ import log.Log;
import
log.LogFactory
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.sss.common.impl.AbstractNullPresentation
;
import
org.sss.common.impl.ProxyDatafield
;
import
org.sss.common.model.CodetableItem
;
import
org.sss.common.model.IAttribute
;
import
org.sss.common.model.IAttributeValue
;
...
...
@@ -31,6 +33,7 @@ import org.sss.common.model.RowOpType;
import
org.sss.common.model.ViewType
;
import
org.sss.exception.ContainerException
;
import
org.sss.presentation.noui.api.request.NoUiRequest
;
import
org.sss.presentation.noui.api.response.ErrorCodes
;
import
org.sss.presentation.noui.common.Constants
;
import
org.sss.presentation.noui.util.NoUiUtils
;
import
org.sss.util.ContainerUtils
;
...
...
@@ -67,6 +70,7 @@ public class NoUiPresentation extends AbstractNullPresentation {
// public final List<IAttribute<?>> requiredList = new
// ArrayList<IAttribute<?>>();
private
String
message
=
null
;
// 弹出的message
private
String
message_code
=
null
;
public
IPanel
popupPanel
=
null
;
public
String
transactionName
=
null
;
public
boolean
clearFlag
=
false
;
...
...
@@ -74,6 +78,10 @@ public class NoUiPresentation extends AbstractNullPresentation {
private
boolean
isChain
=
false
;
public
Boolean
logoutFlag
=
null
;
public
String
getMessageCode
()
{
return
this
.
message_code
;
}
public
String
getMessage
()
{
return
this
.
message
;
}
...
...
@@ -204,6 +212,9 @@ public class NoUiPresentation extends AbstractNullPresentation {
if
(
paramString
==
null
)
{
paramString
=
getI18nValue
(
"eibs"
,
"error.title"
);
}
if
((!
StringUtils
.
isEmpty
(
paramString
))
&&
paramString
.
equals
(
ErrorCodes
.
BUSINESS_ERROR
))
{
this
.
message_code
=
ErrorCodes
.
BUSINESS_ERROR
;
}
/*
* if (MessageType.ERROR.equals(paramMessageType)) {
* log.error(StringUtils.isEmpty(paramString) ? str1 : str1 + ":" +
...
...
@@ -425,6 +436,12 @@ public class NoUiPresentation extends AbstractNullPresentation {
@SuppressWarnings
(
"rawtypes"
)
private
final
void
setModified
(
IAttribute
paramIAttribute
,
boolean
paramBoolean
)
{
if
(
paramIAttribute
instanceof
ProxyDatafield
)
{
while
(
paramIAttribute
instanceof
ProxyDatafield
)
{
paramIAttribute
=
((
ProxyDatafield
)
paramIAttribute
).
getHost
();
}
}
modifyMap
.
put
(((
IBaseObject
)
paramIAttribute
).
getUrl
(),
paramIAttribute
);
}
...
...
src/main/java/org/sss/presentation/noui/controller/AbstractCommonController.java
View file @
5e1df948
...
...
@@ -111,7 +111,7 @@ public class AbstractCommonController {
Map
<
String
,
Object
>
afterReturnData
=
handleReturnData
(
eventType
,
context
,
noUiRequest
,
alias
);
return
ResultUtil
.
result
(
ErrorCodes
.
SUCCESS
,
NoUiPresentationUtil
.
retMsg
(
context
),
afterReturnData
,
return
ResultUtil
.
result
(
NoUiPresentationUtil
.
retCode
(
context
)
,
NoUiPresentationUtil
.
retMsg
(
context
),
afterReturnData
,
NoUiPresentationUtil
.
handleErrorReturnData
(
context
,
alias
),
NoUiPresentationUtil
.
handleCodeTableReturnData
(
context
,
alias
));
}
catch
(
Exception
e
)
{
log
.
error
(
"OnClick command error"
,
e
);
...
...
src/main/java/org/sss/presentation/noui/util/NoUiPresentationUtil.java
View file @
5e1df948
...
...
@@ -169,6 +169,11 @@ public class NoUiPresentationUtil {
return
StringUtil
.
isEmpty
(
gui
.
getMessage
())
?
ErrorCodes
.
SUCCESS_INFO
:
gui
.
getMessage
();
}
public
static
String
retCode
(
NoUiContext
context
)
{
NoUiPresentation
gui
=
(
NoUiPresentation
)
context
.
getGui
();
return
StringUtil
.
isEmpty
(
gui
.
getMessageCode
())
?
ErrorCodes
.
SUCCESS
:
gui
.
getMessageCode
();
}
public
static
Map
<
String
,
Object
>
handleEventReturnData
(
EventType
eventType
,
NoUiContext
context
,
NoUiRequest
request
,
Alias
alias
)
{
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
...
...
@@ -239,30 +244,6 @@ public class NoUiPresentationUtil {
return
null
;
}
public
static
void
main
(
String
[]
args
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy/MM/dd HH:mm:ss"
);
try
{
Date
d
=
sdf
.
parse
(
"2018/11/11 11:11:11"
);
SimpleDateFormat
sdf1
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
System
.
out
.
println
(
sdf1
.
format
(
d
));
System
.
out
.
println
(
new
BigDecimal
(
"999999999999.99"
).
toString
());
long
b
=
999999999
;
String
bb
=
b
+
""
;
System
.
out
.
println
(
String
.
valueOf
(
b
));
java
.
text
.
NumberFormat
nf
=
java
.
text
.
NumberFormat
.
getInstance
();
nf
.
setGroupingUsed
(
false
);
// 设置数的小数部分所允许的最小位数
nf
.
setMinimumFractionDigits
(
0
);
// 设置数的小数部分所允许的最大位数
nf
.
setMaximumFractionDigits
(
2
);
System
.
out
.
println
(
nf
.
format
(
999999999999.0
));
}
catch
(
ParseException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
}
public
static
Object
handIBaseObject
(
NoUiContext
context
,
Object
val
,
String
path
)
{
if
(
val
==
null
)
return
null
;
...
...
@@ -306,15 +287,16 @@ public class NoUiPresentationUtil {
public
static
Map
<
String
,
Object
>
handleCodeTableReturnData
(
NoUiContext
context
,
Alias
alias
)
{
NoUiPresentation
gui
=
(
NoUiPresentation
)
context
.
getGui
();
Map
<
String
,
Object
>
codeTableMap
=
gui
.
getCodetable
();
Map
<
String
,
Object
>
retCodeTableMap
=
new
HashMap
<>();
for
(
Map
.
Entry
<
String
,
Object
>
codeTableEntity
:
codeTableMap
.
entrySet
())
{
String
key
=
codeTableEntity
.
getKey
();
String
realKey
=
alias
.
getRevertRel
().
get
(
key
);
if
(!
StringUtils
.
isEmpty
(
realKey
))
c
odeTableMap
.
put
(
realKey
,
codeTableEntity
.
getValue
());
retC
odeTableMap
.
put
(
realKey
,
codeTableEntity
.
getValue
());
else
c
odeTableMap
.
put
(
key
,
codeTableEntity
.
getValue
());
retC
odeTableMap
.
put
(
key
,
codeTableEntity
.
getValue
());
}
return
c
odeTableMap
;
return
retC
odeTableMap
;
}
public
static
void
setSysmod
(
NoUiContext
context
,
byte
[]
oldSysmod
)
{
...
...
src/test/java/org/sss/presentation/noui/api/servlet/CyHttpTest.java
0 → 100644
View file @
5e1df948
This diff is collapsed.
Click to expand it.
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