切换导航条
此项目
正在载入...
登录
朱兆平
/
wlpt-cfps-analysis
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
朱兆平
4 years ago
提交
3d07275458ed3c99dc5f89a2e3f0e9c990b95d47
1 个父辈
43010247
分单FHL国际转运状态识别并入库,取消分单海关状态跟随主单
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
66 行增加
和
60 行删除
CustomsCargoSystem.ExchangeDataStorageService/MainService.cs
CustomsCargoSystem.ExchangeDataStorageService/MainService.cs
查看文件 @
3d07275
...
...
@@ -179,92 +179,92 @@ namespace CustomsCargoSystem.ExchangeDataStorageService
public
void
StartServiceThread_IMF
(
object
obj
)
{
try
{
string
connectionString
=
ConnectionString
;
while
(
IsThreadNeedRun
)
{
string
text
=
""
;
string
[]
files
=
Directory
.
GetFiles
(
IMFMsgPath
,
"*.txt"
);
for
(
int
i
=
0
;
i
<
files
.
Length
;
i
++)
try
{
if
(!
CheckFileCanRead
(
files
[
i
]))
string
text
=
""
;
string
[]
files
=
Directory
.
GetFiles
(
IMFMsgPath
,
"*.txt"
);
for
(
int
i
=
0
;
i
<
files
.
Length
;
i
++)
{
continue
;
}
text
=
File
.
ReadAllText
(
files
[
i
]);
if
(
string
.
IsNullOrWhiteSpace
(
text
))
{
if
(
File
.
Exists
(
files
[
i
]))
if
(!
CheckFileCanRead
(
files
[
i
]))
{
File
.
Delete
(
files
[
i
])
;
continue
;
}
continue
;
}
Log
.
WriteMessage
(
"999All"
,
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmss"
),
text
);
if
(!
text
.
Contains
(
"<META>"
))
{
if
(
File
.
Exists
(
files
[
i
]))
text
=
File
.
ReadAllText
(
files
[
i
]);
if
(
string
.
IsNullOrWhiteSpace
(
text
))
{
File
.
Delete
(
files
[
i
]);
if
(
File
.
Exists
(
files
[
i
]))
{
File
.
Delete
(
files
[
i
]);
}
continue
;
}
}
else
{
try
Log
.
WriteMessage
(
"999All"
,
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmss"
),
text
);
if
(!
text
.
Contains
(
"<META>"
))
{
XmlDocument
xmlDocument
=
new
XmlDocument
();
xmlDocument
.
LoadXml
(
File
.
ReadAllText
(
files
[
i
]));
if
(
text
.
Contains
(
"<STYP>IFWB</STYP>"
)
&&
text
.
Contains
(
"FWB/"
))
if
(
File
.
Exists
(
files
[
i
]))
{
Log
.
WriteMessage
(
"1fwboriginal"
,
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmssfff"
),
text
);
XmlNode
xmlNode
=
xmlDocument
.
SelectSingleNode
(
"/MSG/FWB"
);
if
(
xmlNode
!=
null
)
{
ProcessXmlDocumentFWB
(
xmlNode
.
InnerText
);
}
File
.
Delete
(
files
[
i
]);
}
else
if
(
text
.
Contains
(
"<STYP>FFM</STYP>"
)
&&
text
.
Contains
(
"FFM/"
)
&&
text
.
Contains
(
"CGO"
))
}
else
{
try
{
Log
.
WriteMessage
(
"2ffmoriginal"
,
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmssfff"
),
text
);
XmlNode
xmlNode
=
xmlDocument
.
SelectSingleNode
(
"/MSG/FFM"
);
if
(
xmlNode
!=
null
)
XmlDocument
xmlDocument
=
new
XmlDocument
();
xmlDocument
.
LoadXml
(
File
.
ReadAllText
(
files
[
i
]));
if
(
text
.
Contains
(
"<STYP>IFWB</STYP>"
)
&&
text
.
Contains
(
"FWB/"
))
{
BookingFFMINFO
(
xmlNode
.
InnerText
);
Log
.
WriteMessage
(
"1fwboriginal"
,
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmssfff"
),
text
);
XmlNode
xmlNode
=
xmlDocument
.
SelectSingleNode
(
"/MSG/FWB"
);
if
(
xmlNode
!=
null
)
{
ProcessXmlDocumentFWB
(
xmlNode
.
InnerText
);
}
}
}
else
if
(
text
.
Contains
(
"<STYP>IFHL</STYP>"
)
&&
text
.
Contains
(
"FHL/"
))
{
Log
.
WriteMessage
(
"3fhloriginal"
,
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmssfff"
),
text
);
XmlNode
xmlNode
=
xmlDocument
.
SelectSingleNode
(
"/MSG/FHL"
);
if
(
xmlNode
!=
null
)
else
if
(
text
.
Contains
(
"<STYP>FFM</STYP>"
)
&&
text
.
Contains
(
"FFM/"
)
&&
text
.
Contains
(
"CGO"
))
{
Log
.
WriteMessage
(
"2ffmoriginal"
,
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmssfff"
),
text
);
XmlNode
xmlNode
=
xmlDocument
.
SelectSingleNode
(
"/MSG/FFM"
);
if
(
xmlNode
!=
null
)
{
BookingFFMINFO
(
xmlNode
.
InnerText
);
}
}
else
if
(
text
.
Contains
(
"<STYP>IFHL</STYP>"
)
&&
text
.
Contains
(
"FHL/"
))
{
Log
.
WriteMessage
(
"3fhloriginal"
,
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmssfff"
),
text
);
XmlNode
xmlNode
=
xmlDocument
.
SelectSingleNode
(
"/MSG/FHL"
);
if
(
xmlNode
!=
null
)
{
ProcessXmlDocumentFHL
(
xmlNode
.
InnerText
);
}
}
else
if
(
text
.
Contains
(
"<TYPE>DFME</TYPE>"
)
&&
(
text
.
Contains
(
"<STYP>UFOH</STYP>"
)
||
text
.
Contains
(
"<STYP>EFOH</STYP>"
)
||
text
.
Contains
(
"<STYP>UDEP</STYP>"
)
||
text
.
Contains
(
"<STYP>EDEP</STYP>"
)
||
text
.
Contains
(
"<STYP>URCF</STYP>"
)
||
text
.
Contains
(
"<STYP>ERCF</STYP>"
)
||
text
.
Contains
(
"<STYP>PFFM</STYP>"
)))
{
ProcessXmlDocument
FHL
(
xmlNode
.
InnerTex
t
);
ProcessXmlDocument
_New
(
xmlDocumen
t
);
}
}
else
if
(
text
.
Contains
(
"<TYPE>DFME</TYPE>"
)
&&
(
text
.
Contains
(
"<STYP>UFOH</STYP>"
)
||
text
.
Contains
(
"<STYP>EFOH</STYP>"
)
||
text
.
Contains
(
"<STYP>UDEP</STYP>"
)
||
text
.
Contains
(
"<STYP>EDEP</STYP>"
)
||
text
.
Contains
(
"<STYP>URCF</STYP>"
)
||
text
.
Contains
(
"<STYP>ERCF</STYP>"
)
||
text
.
Contains
(
"<STYP>PFFM</STYP>"
))
)
catch
(
Exception
ex
)
{
ProcessXmlDocument_New
(
xmlDocument
);
Log
.
WriteLog
(
"9systemlog"
,
ex
.
ToString
()
);
}
}
catch
(
Exception
ex
)
{
Log
.
WriteLog
(
"9systemlog"
,
ex
.
ToString
());
}
finally
{
if
(
File
.
Exists
(
files
[
i
]))
finally
{
File
.
Delete
(
files
[
i
]);
if
(
File
.
Exists
(
files
[
i
]))
{
File
.
Delete
(
files
[
i
]);
}
}
}
}
}
catch
(
IOException
e
){
Log
.
WriteLog
(
"9systemlog"
,
e
.
ToString
()+
"IOerror"
);
}
Thread
.
Sleep
(
500
);
}
}
catch
(
IOException
e
){
Log
.
WriteLog
(
"9systemlog"
,
e
.
ToString
());
}
}
protected
override
void
OnStop
()
...
...
@@ -1162,6 +1162,11 @@ namespace CustomsCargoSystem.ExchangeDataStorageService
{
text8
=
text10
;
}
//分单国际转运判定
string
org_domint
=
""
,
des_domint
=
""
;
CustomsCargoSystem
.
Data
.
OriginManifestMaster
.
get_t_flt_fsl_domint
(
connectionString
,
originatingstation_bill
,
destinationstation_bill
,
out
org_domint
,
out
des_domint
);
//国际转运
if
(
org_domint
==
des_domint
&&
des_domint
==
"1"
)
{
cUSTOMSSTATUS
=
"002"
;
}
IEnumerable
<
CustomsCargoSystem
.
Model
.
OriginManifestMaster
>
originManifestMasterFromWayBillNoMaster
=
CustomsCargoSystem
.
Data
.
OriginManifestMaster
.
GetOriginManifestMasterFromWayBillNoMaster
(
connectionString
,
wayBillNoMaster
);
if
(
originManifestMasterFromWayBillNoMaster
.
Count
()
>
0
)
{
...
...
@@ -1170,7 +1175,8 @@ namespace CustomsCargoSystem.ExchangeDataStorageService
{
IEnumerable
<
CustomsCargoSystem
.
Model
.
OriginManifestSecondary
>
originManifestSecondaryTureOrFalse
=
CustomsCargoSystem
.
Data
.
OriginManifestMaster
.
GetOriginManifestSecondaryTureOrFalse
(
connectionString
,
wayBillNoMaster
,
wayBillNoSecondary
);
string
customsCode
=
originManifestMaster
.
CustomsCode
;
cUSTOMSSTATUS
=
originManifestMaster
.
CustomsStatus
;
//取消分单海关状态跟着主单走
//cUSTOMSSTATUS = originManifestMaster.CustomsStatus;
CustomsCargoSystem
.
Model
.
OriginManifestSecondary
originManifestSecondary
=
new
CustomsCargoSystem
.
Model
.
OriginManifestSecondary
();
originManifestSecondary
.
AutoID
=
Guid
.
NewGuid
().
ToString
();
originManifestSecondary
.
WayBillNoMaster
=
wayBillNoMaster
;
...
...
请
注册
或
登录
后发表评论