Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
iClear-api
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
wei.zhou
2021-07-27 13:34:06 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b3535c7e032ced0fc5a402982827ac04e1bf3109
b3535c7e
1 parent
db4404c6
修改:国家取三字码
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
42 deletions
src/main/java/com/erry/iclear/dateInterface/entity/DictionaryEntries.java
src/main/java/com/erry/iclear/dateInterface/repository/DictionaryEntriesRepository.java
src/main/java/com/erry/iclear/dateInterface/service/DictionaryEntriesService.java
src/main/java/com/erry/iclear/dateInterface/entity/DictionaryEntries.java
View file @
b3535c7
...
...
@@ -33,44 +33,10 @@ public class DictionaryEntries implements Serializable {
@Column
(
name
=
"DICT_CODE"
)
private
String
dictCode
;
@Column
(
name
=
"EXT3"
)
private
String
ext3
;
@Column
(
name
=
"EXT6"
)
private
String
ext6
;
// @Column(name = "DICT_CODE")
// private String dictCode;
//
// @Column(name = "ENGLISH_NAME")
// private String englishName;
//
// @Column(name = "DESCRIPTION")
// private String description;
//
// @Column(name = "STATUS")
// private Integer status;
//
// @Column(name="DICT_ID")
// private String dictId;
//
// @Column(name = "EXT1")
// private Integer ext1;
//
// @Column(name = "EXT2")
// private String ext2;
//
// @Column(name = "EXT3")
// private String ext3;
//
// @Column(name = "EXT4")
// private BigDecimal ext4;
//
// @Column(name = "EXT5")
// private Integer ext5;
//
// @Column(name = "ORDINAL")
// private Integer ordinal;
//
// @Column(name = "EXT6")
// private String ext6;
}
...
...
src/main/java/com/erry/iclear/dateInterface/repository/DictionaryEntriesRepository.java
View file @
b3535c7
...
...
@@ -30,7 +30,7 @@ public interface DictionaryEntriesRepository extends JpaRepository<DictionaryEn
* 查找全部DictionaryEntries
* @return
*/
@Query
(
nativeQuery
=
true
,
value
=
"select ID,CODE,CHINESE_NAME,DICT_CODE,EXT6 from T_BI_DICTIONARY_ENTRIES where STATUS=1"
)
@Query
(
nativeQuery
=
true
,
value
=
"select ID,CODE,CHINESE_NAME,DICT_CODE,EXT
3,EXT
6 from T_BI_DICTIONARY_ENTRIES where STATUS=1"
)
public
List
<
DictionaryEntries
>
findAllDictionaryEntries
();
}
...
...
src/main/java/com/erry/iclear/dateInterface/service/DictionaryEntriesService.java
View file @
b3535c7
...
...
@@ -35,21 +35,27 @@ public class DictionaryEntriesService {
/**
* 初始化
AppInfo
* 初始化
字典表
*/
public
void
initDictionaryEntries
()
{
try
{
Constant
.
dictionaryEntriesCache
.
clear
();
List
<
DictionaryEntries
>
dictionaryEntriesList
=
this
.
getAllDictionaryEntries
();
for
(
DictionaryEntries
dictionaryEntries
:
dictionaryEntriesList
)
{
//成交方式
if
(
Objects
.
equals
(
dictionaryEntries
.
getDictCode
(),
"ClinchType"
)){
Constant
.
dictionaryEntriesCache
.
put
(
dictionaryEntries
.
getDictCode
()+
"_"
+
dictionaryEntries
.
getExt6
(),
dictionaryEntries
);
}
else
{
Constant
.
dictionaryEntriesCache
.
put
(
Constant
.
CLINCH_TYPE
+
dictionaryEntries
.
getExt6
(),
dictionaryEntries
);
}
//国家
else
if
(
Objects
.
equals
(
dictionaryEntries
.
getDictCode
(),
"Country"
)){
Constant
.
dictionaryEntriesCache
.
put
(
Constant
.
COUNTRY
+
dictionaryEntries
.
getExt3
(),
dictionaryEntries
);
}
else
{
Constant
.
dictionaryEntriesCache
.
put
(
dictionaryEntries
.
getCode
(),
dictionaryEntries
);
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"init
AppInfo
() error"
+
e
.
getMessage
());
log
.
error
(
"init
DictionaryEntries
() error"
+
e
.
getMessage
());
}
}
...
...
Please
register
or
login
to post a comment