Toggle navigation
Toggle navigation
This project
Loading...
Sign in
wei.zhou
/
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-06-22 11:37:08 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
38b29a83c7836085316ab6c07e5f1dc7d5c82ccd
38b29a83
1 parent
20dce3e7
提交代码
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
13 deletions
src/main/java/com/erry/iclear/dateInterface/common/Constant.java
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/ChmConsignmentService.java
src/main/java/com/erry/iclear/dateInterface/service/DictionaryEntriesService.java
src/test/java/com/erry/iclear/dateInterface/ChmConsignmentServiceTest.java
src/main/java/com/erry/iclear/dateInterface/common/Constant.java
View file @
38b29a8
...
...
@@ -15,18 +15,29 @@ import java.util.Map;
@Component
public
class
Constant
{
/**
* 用户密码
*/
public
static
Map
<
String
,
HashMap
<
String
,
String
>>
appIdSecurityCache
=
new
HashMap
<>();
//字典表
/**
* 字典表 code:entity
*/
public
static
Map
<
String
,
DictionaryEntries
>
dictionaryEntriesCache
=
new
HashMap
<>();
//货源地
/**
* 货源地
*/
public
static
Map
<
String
,
DomesticDestinationMapping
>
domesticDestinationMappingCache
=
new
HashMap
();
//目的港口
/**
* 目的港口
*/
public
static
Map
<
String
,
OrigplacecodeMapping
>
origplacecodeMappingCache
=
new
HashMap
<>();
//港口表
/**
* 港口表
*/
public
static
Map
<
String
,
ChmCarryPort
>
chmCarryPortCache
=
new
HashMap
<>();
public
static
String
MSG_TYPE_C
=
"C"
;
...
...
src/main/java/com/erry/iclear/dateInterface/entity/DictionaryEntries.java
View file @
38b29a8
...
...
@@ -30,6 +30,11 @@ public class DictionaryEntries implements Serializable {
@Column
(
name
=
"CHINESE_NAME"
)
private
String
chineseName
;
@Column
(
name
=
"DICT_CODE"
)
private
String
dictCode
;
@Column
(
name
=
"EXT6"
)
private
String
ext6
;
// @Column(name = "DICT_CODE")
// private String dictCode;
...
...
src/main/java/com/erry/iclear/dateInterface/repository/DictionaryEntriesRepository.java
View file @
38b29a8
...
...
@@ -30,10 +30,7 @@ public interface DictionaryEntriesRepository extends JpaRepository<DictionaryEn
* 查找全部DictionaryEntries
* @return
*/
@Query
(
nativeQuery
=
true
,
value
=
"select ID,CODE,CHINESE_NAME from T_BI_DICTIONARY_ENTRIES where STATUS=1"
)
@Query
(
nativeQuery
=
true
,
value
=
"select ID,CODE,CHINESE_NAME
,DICT_CODE,EXT6
from T_BI_DICTIONARY_ENTRIES where STATUS=1"
)
public
List
<
DictionaryEntries
>
findAllDictionaryEntries
();
}
...
...
src/main/java/com/erry/iclear/dateInterface/service/ChmConsignmentService.java
View file @
38b29a8
...
...
@@ -137,8 +137,7 @@ public class ChmConsignmentService {
//境内收发货人名称
result
.
setOperateUnitName
(
mawb
.
getTradeName
());
//TODO 成交方式
// DictionaryEntries dealModeDictionaryEntries = Constant.dictionaryEntriesCache.get(Constant.CLINCH_TYPE+mawb.getTransMode());
DictionaryEntries
dealModeDictionaryEntries
=
Constant
.
dictionaryEntriesCache
.
get
(
Constant
.
CLINCH_TYPE
+
"CIF"
);
DictionaryEntries
dealModeDictionaryEntries
=
Constant
.
dictionaryEntriesCache
.
get
(
Constant
.
CLINCH_TYPE
+
mawb
.
getTransMode
());
result
.
setDealModeDic
(
dealModeDictionaryEntries
);
result
.
setDealMode
(
dealModeDictionaryEntries
.
getChineseName
());
...
...
@@ -277,7 +276,7 @@ public class ChmConsignmentService {
//TODO 提交时需要打开
&&
pushTime
.
getTime
()>
chmConsignmentDB
.
getUpdateTime
().
getTime
()
){
//
TODO
更新数据
//更新数据
log
.
info
(
"更新主单"
+
mawb
.
getBillNo
());
...
...
src/main/java/com/erry/iclear/dateInterface/service/DictionaryEntriesService.java
View file @
38b29a8
...
...
@@ -10,6 +10,7 @@ import org.springframework.stereotype.Service;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Objects
;
/**
* @author Administrator
...
...
@@ -40,7 +41,11 @@ public class DictionaryEntriesService {
try
{
List
<
DictionaryEntries
>
dictionaryEntriesList
=
this
.
getAllDictionaryEntries
();
for
(
DictionaryEntries
dictionaryEntries
:
dictionaryEntriesList
)
{
Constant
.
dictionaryEntriesCache
.
put
(
dictionaryEntries
.
getCode
(),
dictionaryEntries
);
if
(
Objects
.
equals
(
dictionaryEntries
.
getDictCode
(),
"ClinchType"
)){
Constant
.
dictionaryEntriesCache
.
put
(
dictionaryEntries
.
getDictCode
()+
"_"
+
dictionaryEntries
.
getExt6
(),
dictionaryEntries
);
}
else
{
Constant
.
dictionaryEntriesCache
.
put
(
dictionaryEntries
.
getCode
(),
dictionaryEntries
);
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"initAppInfo() error"
+
e
.
getMessage
());
...
...
src/test/java/com/erry/iclear/dateInterface/ChmConsignmentServiceTest.java
View file @
38b29a8
...
...
@@ -103,7 +103,7 @@ public class ChmConsignmentServiceTest extends IClearApiApplicationTests {
mawb
.
setBillNo
(
"202105210784"
);
mawb
.
setContrNo
(
"NO.565733"
);
mawb
.
setCustomMaster
(
"0101"
);
mawb
.
setCutMode
(
"1
"
);
//TODO levyType_1 到底是什么code?
mawb
.
setCutMode
(
"1
01"
);
mawb
.
setDeclTrnRel
(
"0"
);
mawb
.
setDistinatePort
(
"ASM000"
);
mawb
.
setEdiId
(
"001"
);
...
...
Please
register
or
login
to post a comment