Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rmb-report-generator
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
report-ecosystem
rmb-report-ecosystem
rmb-report-generator
Commits
7b19e0cc
Commit
7b19e0cc
authored
May 12, 2023
by
s_guodong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
f4e56387
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
104 additions
and
16 deletions
+104
-16
Desc.java
model/com/brilliance/rmb/report/model/Desc.java
+15
-0
HEAD.java
model/com/brilliance/rmb/report/model/HEAD.java
+18
-0
Len.java
model/com/brilliance/rmb/report/model/Len.java
+17
-0
Need.java
model/com/brilliance/rmb/report/model/Need.java
+13
-0
UnSig.java
model/com/brilliance/rmb/report/model/UnSig.java
+12
-0
Xmlns.java
model/com/brilliance/rmb/report/model/Xmlns.java
+10
-0
DZXTTemplateUtil.java
...rilliance/rmb/report/generator/util/DZXTTemplateUtil.java
+1
-1
FastJsonUtil.java
...om/brilliance/rmb/report/generator/util/FastJsonUtil.java
+1
-1
ModelGenerator.java
.../brilliance/rmb/report/generator/util/ModelGenerator.java
+16
-13
StringUtil.java
.../com/brilliance/rmb/report/generator/util/StringUtil.java
+1
-1
No files found.
model/com/brilliance/rmb/report/model/Desc.java
0 → 100644
View file @
7b19e0cc
package
com
.
brilliance
.
rmb
.
report
.
model
;
import
java.lang.annotation.*
;
/**
* Created by cjh on 2019/9/5 0005.
*/
@Target
(
ElementType
.
FIELD
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Documented
public
@interface
Desc
{
String
value
()
;
String
typeName
()
default
""
;
}
model/com/brilliance/rmb/report/model/HEAD.java
0 → 100644
View file @
7b19e0cc
package
com
.
brilliance
.
rmb
.
report
.
model
;
/**
* @Description
* @Author s_guodong
* @Date 2023/5/11
*/
public
class
HEAD
{
private
String
sendBic
;
public
String
getSendBic
()
{
return
sendBic
;
}
public
void
setSendBic
(
String
sendBic
)
{
this
.
sendBic
=
sendBic
;
}
}
model/com/brilliance/rmb/report/model/Len.java
0 → 100644
View file @
7b19e0cc
package
com
.
brilliance
.
rmb
.
report
.
model
;
import
java.lang.annotation.*
;
/**
* Created by cjh on 2019/9/5 0005.
*/
@Target
(
ElementType
.
FIELD
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Documented
public
@interface
Len
{
int
size
()
default
0
;
int
min
()
default
0
;
int
max
()
default
0
;
}
model/com/brilliance/rmb/report/model/Need.java
0 → 100644
View file @
7b19e0cc
package
com
.
brilliance
.
rmb
.
report
.
model
;
import
java.lang.annotation.*
;
/**
* Created by cjh on 2019/9/5 0005.
*/
@Target
(
ElementType
.
FIELD
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Documented
public
@interface
Need
{
String
value
()
default
""
;
}
model/com/brilliance/rmb/report/model/UnSig.java
0 → 100644
View file @
7b19e0cc
package
com
.
brilliance
.
rmb
.
report
.
model
;
import
java.lang.annotation.*
;
@Documented
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Target
({
ElementType
.
TYPE
,
ElementType
.
FIELD
})
public
@interface
UnSig
{
Class
<?>[]
filter
()
default
{};
String
regex
()
default
""
;
int
[]
num
()
default
{};
//满足域序号的进行加签
}
model/com/brilliance/rmb/report/model/Xmlns.java
0 → 100644
View file @
7b19e0cc
package
com
.
brilliance
.
rmb
.
report
.
model
;
import
java.lang.annotation.*
;
@Target
(
ElementType
.
TYPE
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Documented
public
@interface
Xmlns
{
String
value
()
default
""
;
}
src/main/java/com/brilliance/r
eport/rmb
/generator/util/DZXTTemplateUtil.java
→
src/main/java/com/brilliance/r
mb/report
/generator/util/DZXTTemplateUtil.java
View file @
7b19e0cc
package
com
.
brilliance
.
r
eport
.
rmb
.
generator
.
util
;
package
com
.
brilliance
.
r
mb
.
report
.
generator
.
util
;
import
cn.hutool.core.thread.GlobalThreadPool
;
import
org.apache.velocity.app.VelocityEngine
;
...
...
src/main/java/com/brilliance/r
eport/rmb
/generator/util/FastJsonUtil.java
→
src/main/java/com/brilliance/r
mb/report
/generator/util/FastJsonUtil.java
View file @
7b19e0cc
package
com
.
brilliance
.
r
eport
.
rmb
.
generator
.
util
;
package
com
.
brilliance
.
r
mb
.
report
.
generator
.
util
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.serializer.JSONLibDataFormatSerializer
;
...
...
src/main/java/com/brilliance/r
eport/rmb
/generator/util/ModelGenerator.java
→
src/main/java/com/brilliance/r
mb/report
/generator/util/ModelGenerator.java
View file @
7b19e0cc
package
com
.
brilliance
.
r
eport
.
rmb
.
generator
.
util
;
package
com
.
brilliance
.
r
mb
.
report
.
generator
.
util
;
import
cn.hutool.poi.excel.ExcelReader
;
import
cn.hutool.poi.excel.ExcelUtil
;
...
...
@@ -16,7 +16,7 @@ import java.util.stream.Collectors;
public
class
ModelGenerator
{
public
static
final
URL
excel
=
ModelGenerator
.
class
.
getClassLoader
().
getResource
(
"msgstruct.xlsx"
);
private
static
final
String
TEMPLATENAM
=
"bean.vm"
;
private
static
final
String
MSG_PACKAGE
=
"com.brilliance.r
eport.rmb
.model"
;
private
static
final
String
MSG_PACKAGE
=
"com.brilliance.r
mb.report
.model"
;
private
static
final
String
COL_TAG
=
"tag"
;
private
static
final
String
COL_NAM
=
"nam"
;
private
static
final
String
COL_TYP
=
"typ"
;
...
...
@@ -25,14 +25,14 @@ public class ModelGenerator {
private
static
final
String
COL_OPT
=
"opt"
;
private
static
final
String
COL_KEY
=
"key"
;
private
static
final
String
COL_CLASS
=
"class"
;
private
static
final
String
DES
=
"import com.brilliance.r
eport.rmb
.model.Desc;\n"
;
private
static
final
String
LEN
=
"import com.brilliance.r
eport.rmb
.model.Len;\n"
;
private
static
final
String
UNSIG
=
"import com.brilliance.r
eport.rmb
.model.UnSig;\n"
;
private
static
final
String
DES
=
"import com.brilliance.r
mb.report
.model.Desc;\n"
;
private
static
final
String
LEN
=
"import com.brilliance.r
mb.report
.model.Len;\n"
;
private
static
final
String
UNSIG
=
"import com.brilliance.r
mb.report
.model.UnSig;\n"
;
private
static
final
String
XJTA
=
"import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;\n"
;
private
static
final
String
ACAA
=
"import com.brilliance.r
eport.rmb
.model.ActiveCurrencyAndAmount;\n"
;
private
static
final
String
NEED
=
"import com.brilliance.r
eport.rmb
.model.Need;\n"
;
private
static
final
String
ACAA
=
"import com.brilliance.r
mb.report
.model.ActiveCurrencyAndAmount;\n"
;
private
static
final
String
NEED
=
"import com.brilliance.r
mb.report
.model.Need;\n"
;
private
static
final
String
LIST
=
"import java.util.List;\n"
;
private
static
final
String
HEAD
=
"import com.brilliance.r
eport.rmb
.model.HEAD;\n"
;
private
static
final
String
HEAD
=
"import com.brilliance.r
mb.report
.model.HEAD;\n"
;
private
static
final
String
NODE_NAME
=
"obj"
;
private
static
final
String
LIST_NAME
=
"list"
;
...
...
@@ -189,11 +189,14 @@ public class ModelGenerator {
}
// 提取字段长度信息
if
(
StringUtil
.
isNotEmpty
(
len
))
{
if
(
len
.
contains
(
","
))
{
String
s
=
len
.
replaceAll
(
"\\["
,
""
)
.
replaceAll
(
"]"
,
""
)
.
replaceAll
(
"\\("
,
""
)
.
replaceAll
(
"\\)"
,
""
);
String
s
=
len
.
replaceAll
(
"\\["
,
""
)
.
replaceAll
(
"]"
,
""
)
.
replaceAll
(
"\\("
,
""
)
.
replaceAll
(
"\\)"
,
""
)
.
replaceAll
(
")"
,
""
)
.
replaceAll
(
"("
,
""
)
.
replaceAll
(
","
,
","
);
if
(
s
.
contains
(
","
))
{
String
[]
split
=
s
.
split
(
","
);
((
Set
)
field
.
get
(
"fieldannotation"
)).
add
(
"@Len(min = "
+
Integer
.
valueOf
(
split
[
0
])
+
",max ="
+
Integer
.
valueOf
(
split
[
1
])
+
" )"
);
}
else
{
...
...
src/main/java/com/brilliance/r
eport/rmb
/generator/util/StringUtil.java
→
src/main/java/com/brilliance/r
mb/report
/generator/util/StringUtil.java
View file @
7b19e0cc
package
com
.
brilliance
.
r
eport
.
rmb
.
generator
.
util
;
package
com
.
brilliance
.
r
mb
.
report
.
generator
.
util
;
import
org.bouncycastle.util.encoders.Base64
;
...
...
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