切换导航条
此项目
正在载入...
登录
wlxxpt
/
customAnalysis
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
朱兆平
5 years ago
提交
cb77c02740ab513b4f86f917847df32144a8b050
1 个父辈
92644c2d
优化多线程全部业务ok
隐藏空白字符变更
内嵌
并排对比
正在显示
15 个修改的文件
包含
21 行增加
和
24 行删除
config/application.yml
src/main/java/com/tianbo/analysis/handle/CustomXmlHandleThread.java
src/main/java/com/tianbo/analysis/model/ALLOCATEARRIVAL.java
src/main/java/com/tianbo/analysis/model/ARRIVEDMASTER.java
src/main/java/com/tianbo/analysis/model/ARRIVEDSECONDARY.java
src/main/java/com/tianbo/analysis/model/DEPARTURESLOADING.java
src/main/java/com/tianbo/analysis/model/INTERNATIONALTRANSIT.java
src/main/java/com/tianbo/analysis/model/ORIGINMANIFESTMASTER.java
src/main/java/com/tianbo/analysis/model/Originmanifestsecondary.java
src/main/java/com/tianbo/analysis/model/PREPAREMASTER.java
src/main/java/com/tianbo/analysis/model/PREPARESECONDARY.java
src/main/java/com/tianbo/analysis/model/TALLYMASTER.java
src/main/java/com/tianbo/analysis/model/TALLYSECONDARY.java
src/main/java/com/tianbo/analysis/task/TaskAnalysis.java
src/main/resources/mapping/INPORTALLOCATEMapper.xml
config/application.yml
查看文件 @
cb77c02
...
...
@@ -132,7 +132,7 @@ jwt:
#自定义配置
custom
:
#进港放行回执读取目录
receptDirectory
:
/Users/mrz/Downloads/rdp_temp/logs/回执报文样例/
receptDirectory
:
/Users/mrz/Downloads/rdp_temp/logs/回执报文样例/
20191018
#回执解析成功后的备份目录
receptBakDir
:
/Users/mrz/Downloads/rdp_temp/logs/success
#解析错误报文的备份目录
...
...
src/main/java/com/tianbo/analysis/handle/CustomXmlHandleThread.java
查看文件 @
cb77c02
...
...
@@ -247,7 +247,7 @@ public class CustomXmlHandleThread implements Runnable{
i
=
allocatearrival
.
masterAnalysisReception
();
break
;
case
"MT8205"
:
transXmlHandel
(
document
,
customReception
);
i
=
transXmlHandel
(
document
,
customReception
);
break
;
default
:
break
;
...
...
src/main/java/com/tianbo/analysis/model/ALLOCATEARRIVAL.java
查看文件 @
cb77c02
...
...
@@ -14,8 +14,6 @@ import java.util.List;
@Slf4j
public
class
ALLOCATEARRIVAL
extends
WlptBaseModel
{
private
String
id
;
private
Date
createdate
;
...
...
@@ -176,7 +174,7 @@ public class ALLOCATEARRIVAL extends WlptBaseModel{
String
autoId
=
departuresloading1
.
getId
();
//插入sendlog记录表
log
.
info
(
"即将插入回执日志运单号为:"
+
waybillno
+
"->id="
+
i
d
);
log
.
info
(
"即将插入回执日志运单号为:"
+
waybillno
+
"->id="
+
autoI
d
);
int
ii
=
sendLogService
.
insertSendlog
(
"MT3202"
,
receiptinformation
,
autoId
);
if
(
i
>
0
&&
ii
>
0
){
...
...
src/main/java/com/tianbo/analysis/model/ARRIVEDMASTER.java
查看文件 @
cb77c02
...
...
@@ -71,8 +71,7 @@ public class ARRIVEDMASTER extends WlptBaseModel {
}
public
ARRIVEDMASTER
(
CustomReception
customReception
)
{
init
();
this
.
waybillnomaster
=
customReception
.
getWayBillMaster
();
this
.
waybillnomaster
=
AWBTools
.
awbFormat
(
customReception
.
getWayBillMaster
());
String
[]
flightInfo
=
AWBTools
.
splitFlight
(
customReception
.
getFlightNo
());
this
.
setFlightno
(
flightInfo
[
1
]);
...
...
src/main/java/com/tianbo/analysis/model/ARRIVEDSECONDARY.java
查看文件 @
cb77c02
...
...
@@ -297,7 +297,7 @@ public class ARRIVEDSECONDARY extends WlptBaseModel {
}
public
ARRIVEDSECONDARY
(
CustomReception
customReception
)
{
this
.
waybillnomaster
=
customReception
.
getWayBillMaster
(
);
this
.
waybillnomaster
=
AWBTools
.
awbFormat
(
customReception
.
getWayBillMaster
()
);
//取分单号
String
[]
awbhArr
=
customReception
.
getWayBillSecond
().
split
(
"_"
);
this
.
waybillnosecondary
=
awbhArr
[
1
];
...
...
src/main/java/com/tianbo/analysis/model/DEPARTURESLOADING.java
查看文件 @
cb77c02
...
...
@@ -187,7 +187,7 @@ public class DEPARTURESLOADING extends WlptBaseModel {
}
public
DEPARTURESLOADING
(
CustomReception
customReception
)
{
init
();
this
.
waybillno
=
customReception
.
getWayBillMaster
(
);
this
.
waybillno
=
AWBTools
.
awbFormat
(
customReception
.
getWayBillMaster
()
);
this
.
flightno
=
customReception
.
getFlightNo
();
if
(!
StringUtils
.
isEmpty
(
customReception
.
getFlightDate
()))
{
this
.
setFlightdate
(
DateUtil
.
formatByyyyyMMdd
(
customReception
.
getFlightDate
()));
...
...
src/main/java/com/tianbo/analysis/model/INTERNATIONALTRANSIT.java
查看文件 @
cb77c02
...
...
@@ -222,7 +222,7 @@ public class INTERNATIONALTRANSIT extends WlptBaseModel {
this
.
originalFlightdate
=
DateUtil
.
formatByyyyyMMdd
(
customReception
.
getImportFlightDate
());
this
.
originalBillno
=
AWBTools
.
awbFormat
(
customReception
.
getImportWaybillMaster
());
//TODO:碰见分单回执再解析
this
.
originalSubNumber
=
originalSubNumber
;
this
.
originalSubNumber
=
customReception
.
getWayBillSecond
()
;
this
.
status
=
AWBTools
.
transCusRspCode
(
customReception
.
getResponseCode
());
this
.
receiption
=
customReception
.
getResponseText
();
...
...
src/main/java/com/tianbo/analysis/model/ORIGINMANIFESTMASTER.java
查看文件 @
cb77c02
...
...
@@ -457,7 +457,7 @@ public class ORIGINMANIFESTMASTER extends WlptBaseModel {
}
public
ORIGINMANIFESTMASTER
(
CustomReception
customReception
)
{
this
.
waybillnomaster
=
customReception
.
getWayBillMaster
(
);
this
.
waybillnomaster
=
AWBTools
.
awbFormat
(
customReception
.
getWayBillMaster
()
);
this
.
flightno
=
customReception
.
getFlightNo
();
this
.
receiptinformation
=
customReception
.
getResponseText
();
if
(!
StringUtils
.
isEmpty
(
customReception
.
getFlightDate
()))
{
...
...
src/main/java/com/tianbo/analysis/model/Originmanifestsecondary.java
查看文件 @
cb77c02
...
...
@@ -335,7 +335,7 @@ public class Originmanifestsecondary extends WlptBaseModel {
}
public
Originmanifestsecondary
(
CustomReception
customReception
)
{
this
.
waybillnomaster
=
customReception
.
getWayBillMaster
(
);
this
.
waybillnomaster
=
AWBTools
.
awbFormat
(
customReception
.
getWayBillMaster
()
);
this
.
waybillnosecondary
=
customReception
.
getWayBillSecond
().
split
(
"_"
)[
1
];
this
.
status
=
AWBTools
.
transCusRspCode
(
customReception
.
getResponseCode
());
this
.
receiption
=
customReception
.
getResponseText
();
...
...
src/main/java/com/tianbo/analysis/model/PREPAREMASTER.java
查看文件 @
cb77c02
...
...
@@ -403,7 +403,7 @@ public class PREPAREMASTER extends WlptBaseModel {
if
(!
StringUtils
.
isEmpty
(
customReception
.
getFlightDate
()))
{
this
.
flightdate
=
DateUtil
.
formatByyyyyMMdd
(
customReception
.
getFlightDate
());
}
this
.
waybillnomaster
=
customReception
.
getWayBillMaster
(
);
this
.
waybillnomaster
=
AWBTools
.
awbFormat
(
customReception
.
getWayBillMaster
()
);
this
.
status
=
AWBTools
.
transCusRspCode
(
customReception
.
getResponseCode
());
this
.
receiptinformation
=
customReception
.
getResponseText
();
}
...
...
src/main/java/com/tianbo/analysis/model/PREPARESECONDARY.java
查看文件 @
cb77c02
...
...
@@ -811,7 +811,7 @@ public class PREPARESECONDARY extends WlptBaseModel {
String
[]
flightInfo
=
AWBTools
.
splitFlight
(
customReception
.
getFlightNo
());
this
.
setFlightno
(
flightInfo
[
1
]);
this
.
setCarrier
(
flightInfo
[
0
]);
this
.
waybillnomaster
=
customReception
.
getWayBillMaster
(
);
this
.
waybillnomaster
=
AWBTools
.
awbFormat
(
customReception
.
getWayBillMaster
()
);
this
.
waybillnosecondary
=
customReception
.
getWayBillSecond
().
split
(
"_"
)[
1
];
if
(!
StringUtils
.
isEmpty
(
customReception
.
getFlightDate
()))
{
this
.
flightdate
=
DateUtil
.
formatByyyyyMMdd
(
customReception
.
getFlightDate
());
...
...
src/main/java/com/tianbo/analysis/model/TALLYMASTER.java
查看文件 @
cb77c02
...
...
@@ -319,7 +319,7 @@ public class TALLYMASTER extends WlptBaseModel {
}
public
TALLYMASTER
(
CustomReception
customReception
)
{
this
.
customReceptionT
=
customReception
;
this
.
waybillnomaster
=
customReception
.
getWayBillMaster
(
);
this
.
waybillnomaster
=
AWBTools
.
awbFormat
(
customReception
.
getWayBillMaster
()
);
this
.
flightno
=
customReception
.
getFlightNo
();
if
(!
StringUtils
.
isEmpty
(
customReception
.
getFlightDate
()))
{
this
.
flightdate
=
DateUtil
.
formatByyyyyMMdd
(
customReception
.
getFlightDate
());
...
...
src/main/java/com/tianbo/analysis/model/TALLYSECONDARY.java
查看文件 @
cb77c02
...
...
@@ -207,7 +207,7 @@ public class TALLYSECONDARY extends WlptBaseModel {
}
public
TALLYSECONDARY
(
CustomReception
customReception
)
{
this
.
customReceptionT
=
customReception
;
this
.
waybillnomaster
=
customReception
.
getWayBillMaster
(
);
this
.
waybillnomaster
=
AWBTools
.
awbFormat
(
customReception
.
getWayBillMaster
()
);
this
.
waybillnosecondary
=
customReception
.
getWayBillSecond
().
split
(
"_"
)[
1
];
this
.
status
=
AWBTools
.
transCusRspCode
(
customReception
.
getResponseCode
());
this
.
receiptinformation
=
customReception
.
getResponseText
();
...
...
src/main/java/com/tianbo/analysis/task/TaskAnalysis.java
查看文件 @
cb77c02
...
...
@@ -51,16 +51,16 @@ public class TaskAnalysis {
File
fileDirectory
=
new
File
(
readDir
);
List
<
File
>
files
=
FileTool
.
readDirectoryFiles
(
fileDirectory
);
//文件数量大于50个,每次只解析前50个
if
(
files
!=
null
&&
!
files
.
isEmpty
()
&&
files
.
size
()>
50
){
CountDownLatch
latch
=
new
CountDownLatch
(
50
);
log
.
trace
(
"解析任务开始{},文件数量:{}"
,
startTime
,
50
);
for
(
int
i
=
0
;
i
<
50
;
i
++){
if
(
files
!=
null
&&
!
files
.
isEmpty
()
&&
files
.
size
()>
10
){
CountDownLatch
latch
=
new
CountDownLatch
(
10
);
log
.
trace
(
"解析任务开始{},文件数量:{}"
,
startTime
,
10
);
for
(
int
i
=
0
;
i
<
10
;
i
++){
threadJbob
(
files
.
get
(
i
),
latch
,
transToCfps
,
threadPool
);
}
latch
.
await
();
}
//文件数量小于50个,全部一次解析完
if
(
files
!=
null
&&
!
files
.
isEmpty
()
&&
files
.
size
()<
5
0
){
if
(
files
!=
null
&&
!
files
.
isEmpty
()
&&
files
.
size
()<
1
0
){
CountDownLatch
latch
=
new
CountDownLatch
(
files
.
size
());
log
.
info
(
"解析任务开始{},文件数量:{}"
,
startTime
,
files
.
size
());
for
(
int
i
=
0
;
i
<
files
.
size
();
i
++){
...
...
src/main/resources/mapping/INPORTALLOCATEMapper.xml
查看文件 @
cb77c02
...
...
@@ -7,7 +7,7 @@
<result
column=
"WAYBILLNO"
property=
"waybillno"
jdbcType=
"VARCHAR"
/>
<result
column=
"CARRIER"
property=
"carrier"
jdbcType=
"VARCHAR"
/>
<result
column=
"FLIGHTNO"
property=
"flightno"
jdbcType=
"VARCHAR"
/>
<result
column=
"FLIGHTDATE"
property=
"flightdate"
jdbcType=
"
TIMESTAMP
"
/>
<result
column=
"FLIGHTDATE"
property=
"flightdate"
jdbcType=
"
DATE
"
/>
<result
column=
"CUSTOMOS"
property=
"customos"
jdbcType=
"VARCHAR"
/>
<result
column=
"TALLYPIECES"
property=
"tallypieces"
jdbcType=
"VARCHAR"
/>
<result
column=
"TALLYWEIGHT"
property=
"tallyweight"
jdbcType=
"VARCHAR"
/>
...
...
@@ -140,7 +140,7 @@
AND
FLIGHTNO = #{flightno,jdbcType=VARCHAR}
AND
FLIGHTDATE= #{flight
Date,jdbcType=TIMESTAMP
}
FLIGHTDATE= #{flight
date,jdbcType=DATE
}
AND
WAYBILLNO = #{waybillno,jdbcType=VARCHAR}
</update>
...
...
@@ -151,7 +151,7 @@
WHERE
FLIGHTNO= #{flightno,jdbcType=VARCHAR}
AND
FLIGHTDATE= #{flight
Date,jdbcType=TIMESTAMP
}
FLIGHTDATE= #{flight
date,jdbcType=DATE
}
AND
WAYBILLNO = #{waybillno,jdbcType=VARCHAR}
</select>
...
...
请
注册
或
登录
后发表评论