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 13:44:20 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
546cb79da7b0fa25a34107dedc07a62809520896
546cb79d
1 parent
38b29a83
提交代码
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
9 deletions
src/main/java/com/erry/iclear/dateInterface/api/CustomsDataInterface.java
src/main/java/com/erry/iclear/dateInterface/entity/ChmConsignment.java
src/main/java/com/erry/iclear/dateInterface/service/ChmConsignmentService.java
src/test/java/com/erry/iclear/dateInterface/ChmConsignmentServiceTest.java
src/main/java/com/erry/iclear/dateInterface/api/CustomsDataInterface.java
View file @
546cb79
...
...
@@ -110,8 +110,9 @@ public class CustomsDataInterface {
//4、保存运单到iclear中
sw
.
start
(
"processChmConsignment"
);
//if(result.getSuccess()){
//TODO 等待校验逻辑完善后,由result.getSuccess() 判断
if
(
true
){
chmConsignmentService
.
processChmConsignment
(
mawb
,
timeStamp
);
chmConsignmentService
.
processChmConsignment
(
mawb
,
timeStamp
,
appId
);
}
sw
.
stop
();
...
...
src/main/java/com/erry/iclear/dateInterface/entity/ChmConsignment.java
View file @
546cb79
This diff is collapsed. Click to expand it.
src/main/java/com/erry/iclear/dateInterface/service/ChmConsignmentService.java
View file @
546cb79
...
...
@@ -39,7 +39,7 @@ public class ChmConsignmentService {
* 转换主单
* @return
*/
public
ChmConsignment
convertToChmConsignment
(
Mawb
mawb
,
Date
pushTime
){
public
ChmConsignment
convertToChmConsignment
(
Mawb
mawb
,
Date
pushTime
,
String
creator
){
ChmConsignment
result
=
new
ChmConsignment
();
try
{
//进出口标志:固定值 E
...
...
@@ -103,8 +103,8 @@ public class ChmConsignmentService {
result
.
setNetWeight
(
mawb
.
getNetWt
());
//杂费币制
DictionaryEntries
otherDictionaryEntries
=
Constant
.
dictionaryEntriesCache
.
get
(
Constant
.
CURRENCY_SYSTEM
+
mawb
.
getOtherCurr
());
result
.
set
InsuranceCost
CurrencyDic
(
otherDictionaryEntries
);
result
.
set
InsuranceCost
Currency
(
otherDictionaryEntries
.
getChineseName
());
result
.
set
Other
CurrencyDic
(
otherDictionaryEntries
);
result
.
set
Other
Currency
(
otherDictionaryEntries
.
getChineseName
());
//杂费/率
result
.
setOtherCost
(
mawb
.
getOtherRate
());
//杂费标志
...
...
@@ -136,7 +136,7 @@ public class ChmConsignmentService {
//境内收发货人名称
result
.
setOperateUnitName
(
mawb
.
getTradeName
());
//
TODO
成交方式
//成交方式
DictionaryEntries
dealModeDictionaryEntries
=
Constant
.
dictionaryEntriesCache
.
get
(
Constant
.
CLINCH_TYPE
+
mawb
.
getTransMode
());
result
.
setDealModeDic
(
dealModeDictionaryEntries
);
result
.
setDealMode
(
dealModeDictionaryEntries
.
getChineseName
());
...
...
@@ -177,7 +177,7 @@ public class ChmConsignmentService {
//推送时间作为创建时间,可以用来校验数据的有序性,如果新的推送时间小于已有的创建时间,就不更新数据
result
.
setCreateTime
(
new
Date
());
result
.
setUpdateTime
(
pushTime
);
result
.
setCreator
(
creator
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
...
...
@@ -244,11 +244,11 @@ public class ChmConsignmentService {
* @param mawb
* @param timeStamp
*/
public
void
processChmConsignment
(
Mawb
mawb
,
String
timeStamp
)
{
public
void
processChmConsignment
(
Mawb
mawb
,
String
timeStamp
,
String
creator
)
{
try
{
Date
pushTime
=
DateUtils
.
timeStampToDate
(
Long
.
valueOf
(
timeStamp
));
ChmConsignment
chmConsignment
=
this
.
convertToChmConsignment
(
mawb
,
pushTime
);
ChmConsignment
chmConsignment
=
this
.
convertToChmConsignment
(
mawb
,
pushTime
,
creator
);
List
<
ChmConsignmentDetail
>
chmConsignmentDetailList
=
new
ArrayList
<>();
mawb
.
getMawbDetailList
().
forEach
(
detail
->{
chmConsignmentDetailList
.
add
(
chmConsignmentDetailService
.
convertToChmConsignmentDetail
(
detail
,
chmConsignment
));
...
...
src/test/java/com/erry/iclear/dateInterface/ChmConsignmentServiceTest.java
View file @
546cb79
...
...
@@ -23,7 +23,7 @@ public class ChmConsignmentServiceTest extends IClearApiApplicationTests {
try
{
Mawb
mawb
=
this
.
createNewMawb
();
String
timeStamp
=
String
.
valueOf
(
new
Date
().
getTime
());
chmConsignmentService
.
processChmConsignment
(
mawb
,
timeStamp
);
chmConsignmentService
.
processChmConsignment
(
mawb
,
timeStamp
,
"CTM"
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
...
...
Please
register
or
login
to post a comment