|
|
|
|
unit u_op_manifest;
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
Dialogs, StdCtrls, bsSkinCtrls, DB,ADODB, IdBaseComponent, IdComponent,
|
|
|
|
|
IdTCPConnection, IdTCPClient, IdMessageClient, IdSMTP, IdMessage,DsWebService,SoapHTTPClient
|
|
|
|
|
,InvokeRegistry, IdExplicitTLSClientServerBase, IdSMTPBase,IdAttachmentFile,
|
|
|
|
|
RxLookup;
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
Tfrm_op_manifest = class(TForm)
|
|
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
|
|
bsSkinRadioGroup1: TbsSkinRadioGroup;
|
|
|
|
|
t_op_seae1: TDataSource;
|
|
|
|
|
t_op_ctn_edi: TADOQuery;
|
|
|
|
|
strngfld_op_ctnDSDesigner2: TStringField;
|
|
|
|
|
strngfld_op_ctnDSDesigner6: TStringField;
|
|
|
|
|
strngfld_op_ctnDSDesigner7: TStringField;
|
|
|
|
|
strngfld_op_ctnDSDesigner8: TStringField;
|
|
|
|
|
intgrfld_op_ctnDSDesigner9: TIntegerField;
|
|
|
|
|
strngfld_op_ctnDSDesigner10: TStringField;
|
|
|
|
|
bcdfld_op_ctnDSDesigner11: TBCDField;
|
|
|
|
|
bcdfld_op_ctnDSDesigner12: TBCDField;
|
|
|
|
|
strngfld_op_ctnDSDesigner14: TStringField;
|
|
|
|
|
t_op_ctn_ediDSDesigner: TStringField;
|
|
|
|
|
t_op_ctn_ediPO: TStringField;
|
|
|
|
|
t_op_ctn_ediSKU: TStringField;
|
|
|
|
|
t_op_ctn_ediSKU2: TStringField;
|
|
|
|
|
t_op_ctn_ediUN: TStringField;
|
|
|
|
|
t_op_ctn_ediHTS: TStringField;
|
|
|
|
|
t_op_ctn_ediDSDesigner2: TStringField;
|
|
|
|
|
t_op_ctn_ediDSDesigner3: TBCDField;
|
|
|
|
|
intgrfld_op_ctnDSDesigner5: TIntegerField;
|
|
|
|
|
intgrfld_op_ctnTEU: TIntegerField;
|
|
|
|
|
strngfld_op_ctnDSDesigner4: TStringField;
|
|
|
|
|
strngfld_op_ctnDSDesigner3: TStringField;
|
|
|
|
|
atncfld_op_ctnctn_id: TAutoIncField;
|
|
|
|
|
strngfld_op_ctnDSDesigner: TStringField;
|
|
|
|
|
t_op_ctn_ediDSDesigner4: TStringField;
|
|
|
|
|
t_op_seae_edi: TADOQuery;
|
|
|
|
|
t_op_ctn_detail_edi: TADOQuery;
|
|
|
|
|
t_op_ctn_detail_edictn_id: TIntegerField;
|
|
|
|
|
t_op_ctn_detail_ediDSDesigner: TIntegerField;
|
|
|
|
|
t_op_ctn_detail_ediDSDesigner2: TStringField;
|
|
|
|
|
t_op_ctn_detail_ediDSDesigner3: TBCDField;
|
|
|
|
|
t_op_ctn_detail_ediDSDesigner4: TBCDField;
|
|
|
|
|
t_op_ctn_detail_ediUN: TStringField;
|
|
|
|
|
t_op_ctn_detail_ediHTS: TStringField;
|
|
|
|
|
t_op_ctn_detail_ediDSDesigner5: TBCDField;
|
|
|
|
|
SMTP1: TIdSMTP;
|
|
|
|
|
IdMsg: TIdMessage;
|
|
|
|
|
t_op_seae2: TDataSource;
|
|
|
|
|
bsSkinCheckRadioBox1: TbsSkinCheckRadioBox;
|
|
|
|
|
bsSkinGroupBox1: TbsSkinGroupBox;
|
|
|
|
|
RxDBLookupCombo1: TRxDBLookupCombo;
|
|
|
|
|
Label1: TLabel;
|
|
|
|
|
Memo1: TMemo;
|
|
|
|
|
t_op_ams1: TDataSource;
|
|
|
|
|
Button1: TButton;
|
|
|
|
|
SaveDialog1: TSaveDialog;
|
|
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
|
|
procedure Button1Click(Sender: TObject);
|
|
|
|
|
private
|
|
|
|
|
{ Private declarations }
|
|
|
|
|
mServiceSoap_Ds:DsWebServiceSoap;
|
|
|
|
|
mHttpRIO_ds:THTTPRIO;
|
|
|
|
|
|
|
|
|
|
public
|
|
|
|
|
{ Public declarations }
|
|
|
|
|
bsNo:string;
|
|
|
|
|
ifmaster:boolean;
|
|
|
|
|
procedure CreateCustom(typeid:Integer);
|
|
|
|
|
procedure CreateCustom_hbl(typeid:Integer);
|
|
|
|
|
function CreateSIEdiFile_XML:TStrings;
|
|
|
|
|
function CreateSIEdiFile_MBL:TStrings;
|
|
|
|
|
|
|
|
|
|
function GetpkgsEdi(pkgs: String): String;
|
|
|
|
|
function formatAfrstr(str:string):string;
|
|
|
|
|
function GetCtnCode(ctnkind,ctnsize:String): String;
|
|
|
|
|
procedure getwebservice_ds;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
var
|
|
|
|
|
frm_op_manifest: Tfrm_op_manifest;
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
uses u_main,u_data_share, my_sys_function;
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
function Tfrm_op_manifest.GetCtnCode(ctnkind,ctnsize:String): String;
|
|
|
|
|
var
|
|
|
|
|
aQuery:TADOQuery;
|
|
|
|
|
begin
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
|
|
ctnsize:=StringReplace(ctnsize,'''','''''',[rfReplaceAll]);
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
with aQuery do
|
|
|
|
|
begin
|
|
|
|
|
Close;SQL.Clear;
|
|
|
|
|
SQL.Add('Select <20><><EFBFBD><EFBFBD>EDI<44><49><EFBFBD><EFBFBD> EDI<44><49><EFBFBD><EFBFBD> from t_code_ctn where <20><><EFBFBD><EFBFBD>='''+ctnkind+''' and <20>ߴ<EFBFBD>='''+ctnsize+'''');
|
|
|
|
|
Open;
|
|
|
|
|
if not IsEmpty then
|
|
|
|
|
Result:=Trim(FieldByName('EDI<44><49><EFBFBD><EFBFBD>').asstring)
|
|
|
|
|
else
|
|
|
|
|
Result:='';
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
FreeAndNil(aQuery);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
function Tfrm_op_manifest.formatAfrstr(str: string): string;
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
Result:=Trim(str);
|
|
|
|
|
Result:=StringReplace(Result,'&','&',[rfReplaceAll]);
|
|
|
|
|
Result:=StringReplace(Result,'<','<',[rfReplaceAll]);
|
|
|
|
|
Result:=StringReplace(Result,'"','"',[rfReplaceAll]);
|
|
|
|
|
Result:=StringReplace(Result,'>','>',[rfReplaceAll]);
|
|
|
|
|
Result:=StringReplace(Result,'''',''',[rfReplaceAll]);
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function Tfrm_op_manifest.GetpkgsEdi(pkgs: String): String;
|
|
|
|
|
var
|
|
|
|
|
aQuery:TADOQuery;
|
|
|
|
|
begin
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
|
|
try
|
|
|
|
|
with aQuery do begin
|
|
|
|
|
Close;SQL.Clear;
|
|
|
|
|
SQL.Add('Select Edi<64><69><EFBFBD><EFBFBD> from t_code_package where <20><><EFBFBD><EFBFBD>='''+pkgs+'''');
|
|
|
|
|
Open;
|
|
|
|
|
if IsEmpty then
|
|
|
|
|
Result:=''
|
|
|
|
|
else
|
|
|
|
|
Result:=FieldByName('Edi<64><69><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
FreeAndNil(aQuery);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_manifest.CreateCustom_hbl(typeid:Integer);
|
|
|
|
|
var
|
|
|
|
|
str,strbsno:widestring;
|
|
|
|
|
i:integer;
|
|
|
|
|
id:string;
|
|
|
|
|
TempStr:TStringlist;
|
|
|
|
|
aQuery,aQuery2,aQuerycuststr,aQueryCtnDetail,aQueryShipper:TADOQuery;
|
|
|
|
|
function getcustedi(cust:string):string;
|
|
|
|
|
var
|
|
|
|
|
aQuery:TADOQuery;
|
|
|
|
|
begin
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
|
|
result:='';
|
|
|
|
|
try
|
|
|
|
|
aQuery.Close;
|
|
|
|
|
aQuery.SQL.Text:='select EDI<44><49><EFBFBD><EFBFBD> from t_crm_client where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+cust+'''';
|
|
|
|
|
aQuery.Open;
|
|
|
|
|
if not aQuery.IsEmpty then
|
|
|
|
|
result:=aQuery.fieldbyname('EDI<44><49><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
finally
|
|
|
|
|
FreeAndNil(aQuery);
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
function GetvesselEdi(avessel: String): String;
|
|
|
|
|
var
|
|
|
|
|
aQuery:TADOQuery;
|
|
|
|
|
begin
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
|
|
try
|
|
|
|
|
with aQuery do begin
|
|
|
|
|
Close;SQL.Clear;
|
|
|
|
|
SQL.Add('Select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_code_vessel where Ӣ<>Ĵ<EFBFBD><C4B4><EFBFBD>='''+avessel+'''');
|
|
|
|
|
Open;
|
|
|
|
|
if IsEmpty then
|
|
|
|
|
Result:='a'
|
|
|
|
|
else
|
|
|
|
|
Result:=FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
FreeAndNil(aQuery);
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
begin
|
|
|
|
|
if 1=1 then begin
|
|
|
|
|
if not t_op_seae_edi.active then t_op_seae_edi.Open;
|
|
|
|
|
if not t_op_ctn_detail_edi.active then t_op_ctn_detail_edi.Open;
|
|
|
|
|
try
|
|
|
|
|
try
|
|
|
|
|
TempStr:=TStringList.Create;
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
|
|
aQuery2:=CreateAdoQuery;
|
|
|
|
|
aQueryCtnDetail:=CreateAdoQuery;
|
|
|
|
|
aQueryShipper:=CreateAdoQuery;
|
|
|
|
|
aQuery.sql.Text:='select * from t_op_ctn_fendan where as_id=:as_id';
|
|
|
|
|
t_op_ctn_edi.close;
|
|
|
|
|
t_op_ctn_edi.sql.Text:='select * from t_op_ctn_edi where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>';
|
|
|
|
|
aQueryCtnDetail.sql.Text:='select * from t_op_ctn_detail where ctn_id=:ctn_id';
|
|
|
|
|
aQuerycuststr:=CreateAdoQuery;
|
|
|
|
|
aQuerycuststr.sql.text:=' select <20>绰,<2C><><EFBFBD><EFBFBD>,<2C><>,<2C><><EFBFBD><EFBFBD> from t_crm_client where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
|
|
aQueryShipper.sql.Text:='select * from t_code_edicode where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
|
|
|
|
|
|
|
id:=get_id;
|
|
|
|
|
t_op_seae_edi.Insert;
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:=id;
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae2.DataSet['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['EDI<44><49><EFBFBD><EFBFBD>']:='CN';
|
|
|
|
|
t_op_seae_edi['EDI״̬']:='δ<><CEB4><EFBFBD><EFBFBD>';
|
|
|
|
|
t_op_seae_edi['<27><>ǰ״̬']:='δ<><CEB4><EFBFBD><EFBFBD>';
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:=bsSkinRadioGroup1.Items[bsSkinRadioGroup1.ItemIndex];
|
|
|
|
|
|
|
|
|
|
{ case bsSkinRadioGroup1.ItemIndex of
|
|
|
|
|
0:t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>';
|
|
|
|
|
1:t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>';
|
|
|
|
|
2:t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>';
|
|
|
|
|
3:t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>';
|
|
|
|
|
4:t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:='Զ<><D4B6>';
|
|
|
|
|
5:t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:='<27><>Զ';
|
|
|
|
|
6:t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>';
|
|
|
|
|
7:t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>';
|
|
|
|
|
8:t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:='<27><>ͨ'
|
|
|
|
|
else t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:='';
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
t_op_seae_edi['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
|
|
t_op_seae_edi['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
|
|
|
|
|
t_op_seae_edi['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae2.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>']:=t_op_seae1.DataSet['<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>'];
|
|
|
|
|
t_op_seae_edi['<27><>վ']:=t_op_seae2.DataSet['<27><>վ'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>']:=t_op_seae1.DataSet['<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD>ѷ<EFBFBD>ʽ']:=t_op_seae2.DataSet['<27><><EFBFBD>ѷ<EFBFBD>ʽ'];
|
|
|
|
|
t_op_seae_edi['ǩ<><C7A9><EFBFBD>ص<EFBFBD>']:=t_op_seae2.DataSet['ǩ<><C7A9><EFBFBD>ص<EFBFBD>'];
|
|
|
|
|
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>']:=t_op_seae1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD>']:=getcustedi(RxDBLookupCombo1.DisplayValues[1]);
|
|
|
|
|
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD>˾']:=RxDBLookupCombo1.DisplayValues[1];
|
|
|
|
|
|
|
|
|
|
TempStr.Text:=t_op_seae1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString;
|
|
|
|
|
if TempStr.Count>=1 then
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=TempStr.Strings[0];
|
|
|
|
|
if TempStr.Count>=2 then
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1']:=TempStr.Strings[1];
|
|
|
|
|
if TempStr.Count>=3 then
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ2']:=TempStr.Strings[2];
|
|
|
|
|
if TempStr.Count>=4 then
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ3']:=TempStr.Strings[3];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
if t_op_seae1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString<>'' then begin
|
|
|
|
|
aQueryShipper.Close;
|
|
|
|
|
aQueryShipper.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').Value:=t_op_seae1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
aQueryShipper.Open;
|
|
|
|
|
if not aQueryShipper.IsEmpty then begin
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=aQueryShipper.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1').AsString:=aQueryShipper.FieldByName('<27><>ַ1').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ2').AsString:=aQueryShipper.FieldByName('<27><>ַ2').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ3').AsString:=aQueryShipper.FieldByName('<27><>ַ3').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>').AsString:=aQueryShipper.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString:=aQueryShipper.FieldByName('<27>ʱ<EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString:=aQueryShipper.FieldByName('<27><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString:=aQueryShipper.FieldByName('<27><>ϵ<EFBFBD><CFB5>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵绰').AsString:=aQueryShipper.FieldByName('<27>绰').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=aQueryShipper.FieldByName('<27><>').AsString;
|
|
|
|
|
end else begin
|
|
|
|
|
aQuerycuststr.close;
|
|
|
|
|
aQuerycuststr.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').Value:=t_op_seae1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
aQuerycuststr.Open;
|
|
|
|
|
if not aQuerycuststr.IsEmpty then begin
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>']:=aQuerycuststr.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>']:=aQuerycuststr.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD>˵绰']:=aQuerycuststr.fieldbyname('<27>绰').AsString;
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=aQuerycuststr.fieldbyname('<27><>').AsString;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
TempStr.Text:=t_op_seae1.DataSet.fieldbyname('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').AsString;
|
|
|
|
|
if TempStr.Count>=1 then
|
|
|
|
|
t_op_seae_edi['<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=TempStr.Strings[0];
|
|
|
|
|
if TempStr.Count>=2 then
|
|
|
|
|
t_op_seae_edi['<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1']:=TempStr.Strings[1];
|
|
|
|
|
if TempStr.Count>=3 then
|
|
|
|
|
t_op_seae_edi['<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ2']:=TempStr.Strings[2];
|
|
|
|
|
if TempStr.Count>=4 then
|
|
|
|
|
t_op_seae_edi['<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ3']:=TempStr.Strings[3];
|
|
|
|
|
t_op_seae_edi['<27>ջ<EFBFBD><D5BB><EFBFBD>']:=t_op_seae1.DataSet.FieldByName('<27>ջ<EFBFBD><D5BB><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi['<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>']:=t_op_seae1.DataSet['<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>'];
|
|
|
|
|
|
|
|
|
|
if t_op_seae1.DataSet.FieldByName('<27>ջ<EFBFBD><D5BB><EFBFBD>').AsString<>'' then begin
|
|
|
|
|
aQueryShipper.Close;
|
|
|
|
|
aQueryShipper.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').Value:=t_op_seae1.DataSet.FieldByName('<27>ջ<EFBFBD><D5BB><EFBFBD>').AsString;
|
|
|
|
|
aQueryShipper.Open;
|
|
|
|
|
if not aQueryShipper.IsEmpty then begin
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=aQueryShipper.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1').AsString:=aQueryShipper.FieldByName('<27><>ַ1').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ2').AsString:=aQueryShipper.FieldByName('<27><>ַ2').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ3').AsString:=aQueryShipper.FieldByName('<27><>ַ3').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB>˳<EFBFBD><CBB3><EFBFBD>').AsString:=aQueryShipper.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString:=aQueryShipper.FieldByName('<27>ʱ<EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString:=aQueryShipper.FieldByName('<27><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString:=aQueryShipper.FieldByName('<27><>ϵ<EFBFBD><CFB5>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB>˵绰').AsString:=aQueryShipper.FieldByName('<27>绰').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>').AsString:=aQueryShipper.FieldByName('<27><>').AsString;
|
|
|
|
|
end else begin
|
|
|
|
|
aQuerycuststr.close;
|
|
|
|
|
aQuerycuststr.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').Value:=t_op_seae1.DataSet.FieldByName('<27>ջ<EFBFBD><D5BB><EFBFBD>').AsString;
|
|
|
|
|
aQuerycuststr.Open;
|
|
|
|
|
if not aQuerycuststr.IsEmpty then begin
|
|
|
|
|
t_op_seae_edi['<27>ջ<EFBFBD><D5BB>˳<EFBFBD><CBB3><EFBFBD>']:=aQuerycuststr.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi['<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>']:=aQuerycuststr.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi['<27>ջ<EFBFBD><D5BB>˵绰']:=aQuerycuststr.fieldbyname('<27>绰').AsString;
|
|
|
|
|
t_op_seae_edi['<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>']:=aQuerycuststr.fieldbyname('<27><>').AsString;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
TempStr.Text:=t_op_seae1.DataSet.fieldbyname('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').AsString;
|
|
|
|
|
if TempStr.Count>=1 then
|
|
|
|
|
t_op_seae_edi['֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=TempStr.Strings[0];
|
|
|
|
|
if TempStr.Count>=2 then
|
|
|
|
|
t_op_seae_edi['֪ͨ<CDA8>˵<EFBFBD>ַ1']:=TempStr.Strings[1];
|
|
|
|
|
if TempStr.Count>=3 then
|
|
|
|
|
t_op_seae_edi['֪ͨ<CDA8>˵<EFBFBD>ַ2']:=TempStr.Strings[2];
|
|
|
|
|
if TempStr.Count>=4 then
|
|
|
|
|
t_op_seae_edi['֪ͨ<CDA8>˵<EFBFBD>ַ3']:=TempStr.Strings[3];
|
|
|
|
|
t_op_seae_edi['֪ͨ<CDA8><D6AA>']:=t_op_seae1.DataSet.FieldByName('֪ͨ<CDA8><D6AA>').AsString;
|
|
|
|
|
t_op_seae_edi['֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>']:=t_op_seae1.DataSet['֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>'];
|
|
|
|
|
if t_op_seae1.DataSet.FieldByName('֪ͨ<CDA8><D6AA>').AsString<>'' then begin
|
|
|
|
|
aQueryShipper.Close;
|
|
|
|
|
aQueryShipper.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').Value:=t_op_seae1.DataSet.FieldByName('֪ͨ<CDA8><D6AA>').AsString;
|
|
|
|
|
aQueryShipper.Open;
|
|
|
|
|
if not aQueryShipper.IsEmpty then begin
|
|
|
|
|
t_op_seae_edi.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=aQueryShipper.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ1').AsString:=aQueryShipper.FieldByName('<27><>ַ1').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ2').AsString:=aQueryShipper.FieldByName('<27><>ַ2').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ3').AsString:=aQueryShipper.FieldByName('<27><>ַ3').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('֪ͨ<CDA8>˳<EFBFBD><CBB3><EFBFBD>').AsString:=aQueryShipper.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD>ʱ<EFBFBD>').AsString:=aQueryShipper.FieldByName('<27>ʱ<EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString:=aQueryShipper.FieldByName('<27><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString:=aQueryShipper.FieldByName('<27><>ϵ<EFBFBD><CFB5>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('֪ͨ<CDA8>˵绰').AsString:=aQueryShipper.FieldByName('<27>绰').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>').AsString:=aQueryShipper.FieldByName('<27><>').AsString;
|
|
|
|
|
end else begin
|
|
|
|
|
aQuerycuststr.close;
|
|
|
|
|
aQuerycuststr.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').Value:=t_op_seae1.DataSet.FieldByName('֪ͨ<CDA8><D6AA>').AsString;
|
|
|
|
|
aQuerycuststr.Open;
|
|
|
|
|
if not aQuerycuststr.IsEmpty then begin
|
|
|
|
|
t_op_seae_edi['֪ͨ<CDA8>˳<EFBFBD><CBB3><EFBFBD>']:=aQuerycuststr.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi['֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>']:=aQuerycuststr.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi['֪ͨ<CDA8>˵绰']:=aQuerycuststr.fieldbyname('<27>绰').AsString;
|
|
|
|
|
t_op_seae_edi['֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>']:=aQuerycuststr.fieldbyname('<27><>').AsString;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:=t_op_seae2.DataSet['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD>IMO']:=GetvesselEdi(t_op_seae2.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
|
|
|
|
|
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:=t_op_seae2.DataSet['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae2.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae2.DataSet['Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
|
|
if typeid=3 then
|
|
|
|
|
begin
|
|
|
|
|
if t_op_seae1.DataSet['װ<>۴<EFBFBD><DBB4><EFBFBD>']='CNTAO' then
|
|
|
|
|
begin
|
|
|
|
|
t_op_seae_edi['װ<><D7B0><EFBFBD><EFBFBD>']:='QingQianWanGang';
|
|
|
|
|
t_op_seae_edi['װ<>۴<EFBFBD><DBB4><EFBFBD>']:='CNQWG/4258';
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
t_op_seae_edi['װ<><D7B0><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet['װ<><D7B0><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['װ<>۴<EFBFBD><DBB4><EFBFBD>']:=t_op_seae1.DataSet['װ<>۴<EFBFBD><DBB4><EFBFBD>'];
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
t_op_seae_edi['װ<><D7B0><EFBFBD><EFBFBD>']:=t_op_seae2.DataSet['װ<><D7B0><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['װ<>۴<EFBFBD><DBB4><EFBFBD>']:=t_op_seae2.DataSet['װ<>۴<EFBFBD><DBB4><EFBFBD>'];
|
|
|
|
|
end;
|
|
|
|
|
t_op_seae_edi['ж<><D0B6><EFBFBD><EFBFBD>']:=t_op_seae2.DataSet['ж<><D0B6><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae2.DataSet['ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>']:=t_op_seae2.DataSet['װ<><D7B0><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae2.DataSet['װ<>۴<EFBFBD><DBB4><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['Ŀ<>ĵ<EFBFBD>']:=t_op_seae2.DataSet['Ŀ<>ĵ<EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['Ŀ<>Ĵ<EFBFBD><C4B4><EFBFBD>']:=t_op_seae2.DataSet['Ŀ<>ĵش<C4B5><D8B4><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae2.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><>ͷ']:=t_op_seae1.DataSet['<27><>ͷ'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
|
|
// t_op_seae_edi['<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>']:=t_op_seae1.DataSet['<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><>װ']:=t_op_seae1.DataSet['<27><>װ'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>']:=t_op_seae2.DataSet['Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>']:=t_op_seae2.DataSet['Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>']:=t_op_seae2.DataSet['<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27>¶ȵ<C2B6>λ']:=t_op_seae2.DataSet['<27>¶ȵ<C2B6>λ'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>']:=t_op_seae2.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>'];
|
|
|
|
|
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>']:=t_op_seae2.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>']:=t_op_seae2.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ']:=t_op_seae2.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ'];
|
|
|
|
|
t_op_seae_edi['<27>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD>']:=t_op_seae2.DataSet['<27>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['ʪ<><CAAA>']:=t_op_seae2.DataSet['ʪ<><CAAA>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD>պ<EFBFBD><D5BA><EFBFBD>']:=t_op_seae2.DataSet['<27><><EFBFBD>յ<EFBFBD><D5B5><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF>']:='A';
|
|
|
|
|
if Pos('ƴ<><C6B4>', t_op_seae2.DataSet.FieldByName('װ<>˷<EFBFBD>ʽ').AsString)>0 then begin
|
|
|
|
|
t_op_seae_edi['װ<><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='LCL';
|
|
|
|
|
t_op_seae_edi['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ']:=0;
|
|
|
|
|
end else begin
|
|
|
|
|
t_op_seae_edi['װ<><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='FCL';
|
|
|
|
|
t_op_seae_edi['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ']:=1;
|
|
|
|
|
end;
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD>䷽ʽ']:=t_op_seae2.DataSet['<27><><EFBFBD>䷽ʽ'];
|
|
|
|
|
t_op_seae_edi['<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>']:='Master';
|
|
|
|
|
t_op_seae_edi.Post;
|
|
|
|
|
aQuery.Close;
|
|
|
|
|
aQuery.Parameters.ParamByName('as_id').Value:=t_op_seae1.DataSet.fieldbyname('as_id').AsString;
|
|
|
|
|
aQuery.Open;
|
|
|
|
|
t_op_ctn_edi.Close;
|
|
|
|
|
t_op_ctn_edi.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=id;
|
|
|
|
|
t_op_ctn_edi.Open;
|
|
|
|
|
|
|
|
|
|
if aQuery.IsEmpty then
|
|
|
|
|
begin
|
|
|
|
|
aQuery.Close;
|
|
|
|
|
aQuery.Parameters.ParamByName('as_id').Value:=t_op_seae1.DataSet.fieldbyname('as_id').AsString;
|
|
|
|
|
aQuery.Open;
|
|
|
|
|
end;
|
|
|
|
|
aQuery.First;
|
|
|
|
|
while not aQuery.Eof do
|
|
|
|
|
begin
|
|
|
|
|
t_op_ctn_edi.Insert;
|
|
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=id;
|
|
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_ctn_edi['<27>ߴ<EFBFBD>']:=aQuery['<27>ߴ<EFBFBD>'];
|
|
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=1;
|
|
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ'];
|
|
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_ctn_edi['<27><>װ']:=aQuery['<27><>װ'];
|
|
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
// t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_ctn_edi['<27><>ͷ']:=aQuery['<27><>ͷ'];
|
|
|
|
|
if frm_data_share.t_code_ctn.Locate('<27><><EFBFBD><EFBFBD>',t_op_ctn_edi.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,[]) then
|
|
|
|
|
begin
|
|
|
|
|
if frm_data_share.t_code_ctn.FieldByName('<27>ߴ<EFBFBD>').asstring='20'then
|
|
|
|
|
t_op_ctn_edi['TEU']:=1;
|
|
|
|
|
if (frm_data_share.t_code_ctn.FieldByName('<27>ߴ<EFBFBD>').asstring='40')OR
|
|
|
|
|
(frm_data_share.t_code_ctn.FieldByName('<27>ߴ<EFBFBD>').asstring='45')then
|
|
|
|
|
t_op_ctn_edi['TEU']:=2;
|
|
|
|
|
end;
|
|
|
|
|
t_op_ctn_edi.Post;
|
|
|
|
|
aQuery.Next;
|
|
|
|
|
end;
|
|
|
|
|
except
|
|
|
|
|
on e:exception do
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage(e.Message);
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
finally
|
|
|
|
|
FreeAndNil(TempStr);
|
|
|
|
|
FreeAndNil(aQuery);
|
|
|
|
|
FreeAndNil(aQuery2);
|
|
|
|
|
FreeAndNil(aQuerycuststr);
|
|
|
|
|
FreeAndNil(aQueryCtnDetail);
|
|
|
|
|
FreeAndNil(aQueryShipper);
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_manifest.CreateCustom(typeid:Integer);
|
|
|
|
|
var
|
|
|
|
|
str,strbsno:widestring;
|
|
|
|
|
i:integer;
|
|
|
|
|
id:string;
|
|
|
|
|
TempStr:TStringlist;
|
|
|
|
|
aQuery,aQuery2,aQuerycuststr,aQueryCtnDetail,aQueryShipper:TADOQuery;
|
|
|
|
|
function getcustedi(cust:string):string;
|
|
|
|
|
var
|
|
|
|
|
aQuery:TADOQuery;
|
|
|
|
|
begin
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
|
|
result:='';
|
|
|
|
|
try
|
|
|
|
|
aQuery.Close;
|
|
|
|
|
aQuery.SQL.Text:='select EDI<44><49><EFBFBD><EFBFBD> from t_crm_client where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>='''+cust+'''';
|
|
|
|
|
aQuery.Open;
|
|
|
|
|
if not aQuery.IsEmpty then
|
|
|
|
|
result:=aQuery.fieldbyname('EDI<44><49><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
finally
|
|
|
|
|
FreeAndNil(aQuery);
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
function GetvesselEdi(avessel: String): String;
|
|
|
|
|
var
|
|
|
|
|
aQuery:TADOQuery;
|
|
|
|
|
begin
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
|
|
try
|
|
|
|
|
with aQuery do begin
|
|
|
|
|
Close;SQL.Clear;
|
|
|
|
|
SQL.Add('Select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> from t_code_vessel where Ӣ<>Ĵ<EFBFBD><C4B4><EFBFBD>='''+avessel+'''');
|
|
|
|
|
Open;
|
|
|
|
|
if IsEmpty then
|
|
|
|
|
Result:='a'
|
|
|
|
|
else
|
|
|
|
|
Result:=FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
FreeAndNil(aQuery);
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
begin
|
|
|
|
|
if 1=1 then begin
|
|
|
|
|
if not t_op_seae_edi.active then t_op_seae_edi.Open;
|
|
|
|
|
if not t_op_ctn_detail_edi.active then t_op_ctn_detail_edi.Open;
|
|
|
|
|
try
|
|
|
|
|
try
|
|
|
|
|
TempStr:=TStringList.Create;
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
|
|
aQuery2:=CreateAdoQuery;
|
|
|
|
|
aQueryCtnDetail:=CreateAdoQuery;
|
|
|
|
|
aQueryShipper:=CreateAdoQuery;
|
|
|
|
|
aQuery.sql.Text:='select * from t_op_ctn where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>';
|
|
|
|
|
t_op_ctn_edi.close;
|
|
|
|
|
t_op_ctn_edi.sql.Text:='select * from t_op_ctn_edi where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>';
|
|
|
|
|
aQueryCtnDetail.sql.Text:='select * from t_op_ctn_detail where ctn_id=:ctn_id';
|
|
|
|
|
aQuerycuststr:=CreateAdoQuery;
|
|
|
|
|
aQuerycuststr.sql.text:=' select <20>绰,<2C><><EFBFBD><EFBFBD>,<2C><>,<2C><><EFBFBD><EFBFBD> from t_crm_client where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
|
|
aQueryShipper.sql.Text:='select * from t_code_edicode where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=:<3A>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
|
|
|
|
|
|
|
|
|
|
id:=get_id;
|
|
|
|
|
t_op_seae_edi.Insert;
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:=id;
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['EDI<44><49><EFBFBD><EFBFBD>']:='CN';
|
|
|
|
|
t_op_seae_edi['EDI״̬']:='δ<><CEB4><EFBFBD><EFBFBD>';
|
|
|
|
|
t_op_seae_edi['<27><>ǰ״̬']:='δ<><CEB4><EFBFBD><EFBFBD>';
|
|
|
|
|
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:=bsSkinRadioGroup1.Items[bsSkinRadioGroup1.ItemIndex];
|
|
|
|
|
{
|
|
|
|
|
case bsSkinRadioGroup1.ItemIndex of
|
|
|
|
|
0:t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>';
|
|
|
|
|
1:t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>';
|
|
|
|
|
2:t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>';
|
|
|
|
|
3:t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>';
|
|
|
|
|
4:t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:='Զ<><D4B6>';
|
|
|
|
|
5:t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:='<27><>Զ';
|
|
|
|
|
6:t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>';
|
|
|
|
|
7:t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>';
|
|
|
|
|
8:t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:='<27><>ͨ'
|
|
|
|
|
else t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:='';
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
t_op_seae_edi['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
|
|
|
|
|
t_op_seae_edi['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=now;
|
|
|
|
|
t_op_seae_edi['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet['ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>']:=t_op_seae1.DataSet['<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>'];
|
|
|
|
|
t_op_seae_edi['<27><>վ']:=t_op_seae1.DataSet['<27><>վ'];
|
|
|
|
|
// t_op_seae_edi['<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>']:=t_op_seae1.DataSet['<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD>ѷ<EFBFBD>ʽ']:=t_op_seae1.DataSet['<27><><EFBFBD>ѷ<EFBFBD>ʽ'];
|
|
|
|
|
t_op_seae_edi['ǩ<><C7A9><EFBFBD>ص<EFBFBD>']:=t_op_seae1.DataSet['ǩ<><C7A9><EFBFBD>ص<EFBFBD>'];
|
|
|
|
|
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>']:=t_op_seae1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD>']:=getcustedi(RxDBLookupCombo1.DisplayValues[1]);
|
|
|
|
|
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD>˾']:=RxDBLookupCombo1.DisplayValues[1];
|
|
|
|
|
|
|
|
|
|
TempStr.Text:=t_op_seae1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString;
|
|
|
|
|
if TempStr.Count>=1 then
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=TempStr.Strings[0];
|
|
|
|
|
if TempStr.Count>=2 then
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1']:=TempStr.Strings[1];
|
|
|
|
|
if TempStr.Count>=3 then
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ2']:=TempStr.Strings[2];
|
|
|
|
|
if TempStr.Count>=4 then
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ3']:=TempStr.Strings[3];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
if t_op_seae1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString<>'' then begin
|
|
|
|
|
aQueryShipper.Close;
|
|
|
|
|
aQueryShipper.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').Value:=t_op_seae1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
aQueryShipper.Open;
|
|
|
|
|
if not aQueryShipper.IsEmpty then begin
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=aQueryShipper.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1').AsString:=aQueryShipper.FieldByName('<27><>ַ1').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ2').AsString:=aQueryShipper.FieldByName('<27><>ַ2').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ3').AsString:=aQueryShipper.FieldByName('<27><>ַ3').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>').AsString:=aQueryShipper.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString:=aQueryShipper.FieldByName('<27>ʱ<EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString:=aQueryShipper.FieldByName('<27><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString:=aQueryShipper.FieldByName('<27><>ϵ<EFBFBD><CFB5>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵绰').AsString:=aQueryShipper.FieldByName('<27>绰').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=aQueryShipper.FieldByName('<27><>').AsString;
|
|
|
|
|
end else begin
|
|
|
|
|
aQuerycuststr.close;
|
|
|
|
|
aQuerycuststr.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').Value:=t_op_seae1.DataSet.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
aQuerycuststr.Open;
|
|
|
|
|
if not aQuerycuststr.IsEmpty then begin
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>']:=aQuerycuststr.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>']:=aQuerycuststr.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD>˵绰']:=aQuerycuststr.fieldbyname('<27>绰').AsString;
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=aQuerycuststr.fieldbyname('<27><>').AsString;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
TempStr.Text:=t_op_seae1.DataSet.fieldbyname('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').AsString;
|
|
|
|
|
if TempStr.Count>=1 then
|
|
|
|
|
t_op_seae_edi['<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=TempStr.Strings[0];
|
|
|
|
|
if TempStr.Count>=2 then
|
|
|
|
|
t_op_seae_edi['<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1']:=TempStr.Strings[1];
|
|
|
|
|
if TempStr.Count>=3 then
|
|
|
|
|
t_op_seae_edi['<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ2']:=TempStr.Strings[2];
|
|
|
|
|
if TempStr.Count>=4 then
|
|
|
|
|
t_op_seae_edi['<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ3']:=TempStr.Strings[3];
|
|
|
|
|
t_op_seae_edi['<27>ջ<EFBFBD><D5BB><EFBFBD>']:=t_op_seae1.DataSet.FieldByName('<27>ջ<EFBFBD><D5BB><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi['<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>']:=t_op_seae1.DataSet['<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>'];
|
|
|
|
|
|
|
|
|
|
if t_op_seae1.DataSet.FieldByName('<27>ջ<EFBFBD><D5BB><EFBFBD>').AsString<>'' then begin
|
|
|
|
|
aQueryShipper.Close;
|
|
|
|
|
aQueryShipper.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').Value:=t_op_seae1.DataSet.FieldByName('<27>ջ<EFBFBD><D5BB><EFBFBD>').AsString;
|
|
|
|
|
aQueryShipper.Open;
|
|
|
|
|
if not aQueryShipper.IsEmpty then begin
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=aQueryShipper.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1').AsString:=aQueryShipper.FieldByName('<27><>ַ1').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ2').AsString:=aQueryShipper.FieldByName('<27><>ַ2').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ3').AsString:=aQueryShipper.FieldByName('<27><>ַ3').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB>˳<EFBFBD><CBB3><EFBFBD>').AsString:=aQueryShipper.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString:=aQueryShipper.FieldByName('<27>ʱ<EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString:=aQueryShipper.FieldByName('<27><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString:=aQueryShipper.FieldByName('<27><>ϵ<EFBFBD><CFB5>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB>˵绰').AsString:=aQueryShipper.FieldByName('<27>绰').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>').AsString:=aQueryShipper.FieldByName('<27><>').AsString;
|
|
|
|
|
end else begin
|
|
|
|
|
aQuerycuststr.close;
|
|
|
|
|
aQuerycuststr.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').Value:=t_op_seae1.DataSet.FieldByName('<27>ջ<EFBFBD><D5BB><EFBFBD>').AsString;
|
|
|
|
|
aQuerycuststr.Open;
|
|
|
|
|
if not aQuerycuststr.IsEmpty then begin
|
|
|
|
|
t_op_seae_edi['<27>ջ<EFBFBD><D5BB>˳<EFBFBD><CBB3><EFBFBD>']:=aQuerycuststr.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi['<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>']:=aQuerycuststr.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi['<27>ջ<EFBFBD><D5BB>˵绰']:=aQuerycuststr.fieldbyname('<27>绰').AsString;
|
|
|
|
|
t_op_seae_edi['<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>']:=aQuerycuststr.fieldbyname('<27><>').AsString;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
TempStr.Text:=t_op_seae1.DataSet.fieldbyname('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').AsString;
|
|
|
|
|
if TempStr.Count>=1 then
|
|
|
|
|
t_op_seae_edi['֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=TempStr.Strings[0];
|
|
|
|
|
if TempStr.Count>=2 then
|
|
|
|
|
t_op_seae_edi['֪ͨ<CDA8>˵<EFBFBD>ַ1']:=TempStr.Strings[1];
|
|
|
|
|
if TempStr.Count>=3 then
|
|
|
|
|
t_op_seae_edi['֪ͨ<CDA8>˵<EFBFBD>ַ2']:=TempStr.Strings[2];
|
|
|
|
|
if TempStr.Count>=4 then
|
|
|
|
|
t_op_seae_edi['֪ͨ<CDA8>˵<EFBFBD>ַ3']:=TempStr.Strings[3];
|
|
|
|
|
t_op_seae_edi['֪ͨ<CDA8><D6AA>']:=t_op_seae1.DataSet.FieldByName('֪ͨ<CDA8><D6AA>').AsString;
|
|
|
|
|
t_op_seae_edi['֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>']:=t_op_seae1.DataSet['֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>'];
|
|
|
|
|
if t_op_seae1.DataSet.FieldByName('֪ͨ<CDA8><D6AA>').AsString<>'' then begin
|
|
|
|
|
aQueryShipper.Close;
|
|
|
|
|
aQueryShipper.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').Value:=t_op_seae1.DataSet.FieldByName('֪ͨ<CDA8><D6AA>').AsString;
|
|
|
|
|
aQueryShipper.Open;
|
|
|
|
|
if not aQueryShipper.IsEmpty then begin
|
|
|
|
|
t_op_seae_edi.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=aQueryShipper.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ1').AsString:=aQueryShipper.FieldByName('<27><>ַ1').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ2').AsString:=aQueryShipper.FieldByName('<27><>ַ2').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ3').AsString:=aQueryShipper.FieldByName('<27><>ַ3').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('֪ͨ<CDA8>˳<EFBFBD><CBB3><EFBFBD>').AsString:=aQueryShipper.FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD>ʱ<EFBFBD>').AsString:=aQueryShipper.FieldByName('<27>ʱ<EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString:=aQueryShipper.FieldByName('<27><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString:=aQueryShipper.FieldByName('<27><>ϵ<EFBFBD><CFB5>').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('֪ͨ<CDA8>˵绰').AsString:=aQueryShipper.FieldByName('<27>绰').AsString;
|
|
|
|
|
t_op_seae_edi.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>').AsString:=aQueryShipper.FieldByName('<27><>').AsString;
|
|
|
|
|
end else begin
|
|
|
|
|
aQuerycuststr.close;
|
|
|
|
|
aQuerycuststr.Parameters.ParamByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').Value:=t_op_seae1.DataSet.FieldByName('֪ͨ<CDA8><D6AA>').AsString;
|
|
|
|
|
aQuerycuststr.Open;
|
|
|
|
|
if not aQuerycuststr.IsEmpty then begin
|
|
|
|
|
t_op_seae_edi['֪ͨ<CDA8>˳<EFBFBD><CBB3><EFBFBD>']:=aQuerycuststr.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi['֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>']:=aQuerycuststr.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
t_op_seae_edi['֪ͨ<CDA8>˵绰']:=aQuerycuststr.fieldbyname('<27>绰').AsString;
|
|
|
|
|
t_op_seae_edi['֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>']:=aQuerycuststr.fieldbyname('<27><>').AsString;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD>IMO']:=GetvesselEdi(t_op_seae1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString);
|
|
|
|
|
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet['Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
|
|
if typeid=3 then
|
|
|
|
|
begin
|
|
|
|
|
if t_op_seae1.DataSet['װ<>۴<EFBFBD><DBB4><EFBFBD>']='CNTAO' then
|
|
|
|
|
begin
|
|
|
|
|
t_op_seae_edi['װ<><D7B0><EFBFBD><EFBFBD>']:='QingQianWanGang';
|
|
|
|
|
t_op_seae_edi['װ<>۴<EFBFBD><DBB4><EFBFBD>']:='CNQWG/4258';
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
t_op_seae_edi['װ<><D7B0><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet['װ<><D7B0><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['װ<>۴<EFBFBD><DBB4><EFBFBD>']:=t_op_seae1.DataSet['װ<>۴<EFBFBD><DBB4><EFBFBD>'];
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
t_op_seae_edi['װ<><D7B0><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet['װ<><D7B0><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['װ<>۴<EFBFBD><DBB4><EFBFBD>']:=t_op_seae1.DataSet['װ<>۴<EFBFBD><DBB4><EFBFBD>'];
|
|
|
|
|
end;
|
|
|
|
|
t_op_seae_edi['ж<><D0B6><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet['ж<><D0B6><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet['ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>']:=t_op_seae1.DataSet['װ<><D7B0><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet['װ<>۴<EFBFBD><DBB4><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['Ŀ<>ĵ<EFBFBD>']:=t_op_seae1.DataSet['Ŀ<>ĵ<EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['Ŀ<>Ĵ<EFBFBD><C4B4><EFBFBD>']:=t_op_seae1.DataSet['Ŀ<>ĵش<C4B5><D8B4><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><>ͷ']:=t_op_seae1.DataSet['<27><>ͷ'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>']:=t_op_seae1.DataSet['<27><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><>װ']:=t_op_seae1.DataSet['<27><>װ'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet['Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet['Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet['<27><><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27>¶ȵ<C2B6>λ']:=t_op_seae1.DataSet['<27>¶ȵ<C2B6>λ'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>']:=t_op_seae1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>'];
|
|
|
|
|
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>']:=t_op_seae1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>']:=t_op_seae1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ']:=t_op_seae1.DataSet['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ'];
|
|
|
|
|
t_op_seae_edi['<27>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD>']:=t_op_seae1.DataSet['<27>˷<EFBFBD>Э<EFBFBD><D0AD><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['ʪ<><CAAA>']:=t_op_seae1.DataSet['ʪ<><CAAA>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD>պ<EFBFBD><D5BA><EFBFBD>']:=t_op_seae1.DataSet['<27><><EFBFBD>յ<EFBFBD><D5B5><EFBFBD>'];
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF>']:='A';
|
|
|
|
|
if Pos('ƴ<><C6B4>', t_op_seae1.DataSet.FieldByName('װ<>˷<EFBFBD>ʽ').AsString)>0 then begin
|
|
|
|
|
t_op_seae_edi['װ<><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='LCL';
|
|
|
|
|
t_op_seae_edi['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ']:=0;
|
|
|
|
|
end else begin
|
|
|
|
|
t_op_seae_edi['װ<><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:='FCL';
|
|
|
|
|
t_op_seae_edi['<27>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ']:=1;
|
|
|
|
|
end;
|
|
|
|
|
t_op_seae_edi['<27><><EFBFBD>䷽ʽ']:=t_op_seae1.DataSet['<27><><EFBFBD>䷽ʽ'];
|
|
|
|
|
t_op_seae_edi['<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>']:='Master';
|
|
|
|
|
t_op_seae_edi.Post;
|
|
|
|
|
aQuery.Close;
|
|
|
|
|
aQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_seae1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
aQuery.Open;
|
|
|
|
|
t_op_ctn_edi.Close;
|
|
|
|
|
t_op_ctn_edi.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=id;
|
|
|
|
|
t_op_ctn_edi.Open;
|
|
|
|
|
|
|
|
|
|
if aQuery.IsEmpty then
|
|
|
|
|
begin
|
|
|
|
|
aQuery.Close;
|
|
|
|
|
aQuery.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_seae1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
aQuery.Open;
|
|
|
|
|
end;
|
|
|
|
|
aQuery.First;
|
|
|
|
|
while not aQuery.Eof do
|
|
|
|
|
begin
|
|
|
|
|
t_op_ctn_edi.Insert;
|
|
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=id;
|
|
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_ctn_edi['<27>ߴ<EFBFBD>']:=aQuery['<27>ߴ<EFBFBD>'];
|
|
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=1;
|
|
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ']:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ'];
|
|
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_ctn_edi['<27><>װ']:=aQuery['<27><>װ'];
|
|
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_ctn_edi['<27><><EFBFBD><EFBFBD>']:=aQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
|
|
t_op_ctn_edi['<27><>ͷ']:=aQuery['<27><>ͷ'];
|
|
|
|
|
if frm_data_share.t_code_ctn.Locate('<27><><EFBFBD><EFBFBD>',t_op_ctn_edi.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,[]) then
|
|
|
|
|
begin
|
|
|
|
|
if frm_data_share.t_code_ctn.FieldByName('<27>ߴ<EFBFBD>').asstring='20'then
|
|
|
|
|
t_op_ctn_edi['TEU']:=1;
|
|
|
|
|
if (frm_data_share.t_code_ctn.FieldByName('<27>ߴ<EFBFBD>').asstring='40')OR
|
|
|
|
|
(frm_data_share.t_code_ctn.FieldByName('<27>ߴ<EFBFBD>').asstring='45')then
|
|
|
|
|
t_op_ctn_edi['TEU']:=2;
|
|
|
|
|
end;
|
|
|
|
|
t_op_ctn_edi.Post;
|
|
|
|
|
aQuery.Next;
|
|
|
|
|
end;
|
|
|
|
|
except
|
|
|
|
|
on e:exception do
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage(e.Message);
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
finally
|
|
|
|
|
FreeAndNil(TempStr);
|
|
|
|
|
FreeAndNil(aQuery);
|
|
|
|
|
FreeAndNil(aQuery2);
|
|
|
|
|
FreeAndNil(aQuerycuststr);
|
|
|
|
|
FreeAndNil(aQueryCtnDetail);
|
|
|
|
|
FreeAndNil(aQueryShipper);
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function Tfrm_op_manifest.CreateSIEdiFile_MBL:TStrings;
|
|
|
|
|
var
|
|
|
|
|
str:Tstringlist;
|
|
|
|
|
Tempstr : TStrings;
|
|
|
|
|
Temprslt : string;
|
|
|
|
|
i,j,Count:integer;
|
|
|
|
|
strsql,strRmain:string;
|
|
|
|
|
rs,aQuery2:Tadoquery;
|
|
|
|
|
wide_str:widestring;
|
|
|
|
|
k:integer;
|
|
|
|
|
strType,XType,TransType:string;
|
|
|
|
|
strDatetime:string;
|
|
|
|
|
SenderCode,ReciverCode:string;
|
|
|
|
|
aAdoQuery:TAdoQuery;
|
|
|
|
|
SendOp,SendTel:string;
|
|
|
|
|
begin
|
|
|
|
|
SendOp:=employee;
|
|
|
|
|
SendTel:=frm_data_share.t_load_employee.fieldByName('<27>̶<EFBFBD><CCB6>绰').AsString;
|
|
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
|
|
SenderCode:=frm_data_share.t_sys_company.fieldByName('<27><><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
ReciverCode:='';
|
|
|
|
|
|
|
|
|
|
strType:='9';
|
|
|
|
|
|
|
|
|
|
str:=Tstringlist.Create;
|
|
|
|
|
str.Clear;
|
|
|
|
|
str.Add('00:CN2101:'+t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+':'+trim(strType)+':'+ SenderCode+':'+ReciverCode+':'+GetDatetime(datetimetostr(now),4)+':1.0'+':'+SendOp+':'+SendTel+#39);
|
|
|
|
|
//
|
|
|
|
|
Count:=0;
|
|
|
|
|
str.Add ('10'
|
|
|
|
|
+':'+t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD>IMO').asstring // 2 <20><><EFBFBD><EFBFBD>IMO<4D><4F><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+ trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString) //3<><33><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD>˾').asstring //4<><34><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+ trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring) //5<><35><EFBFBD><EFBFBD>
|
|
|
|
|
+':' //6 <20><><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD>
|
|
|
|
|
+':' //7 <20><><EFBFBD><EFBFBD>
|
|
|
|
|
+':' //8Ԥ<38>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+ GetDatetime(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,1) //9 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD><DAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ں<EFBFBD>ʱ<EFBFBD>䣩
|
|
|
|
|
+':'+t_op_seae_edi.fieldbyname('װ<>۴<EFBFBD><DBB4><EFBFBD>').asstring // 10<31><30><EFBFBD>۵ص<DBB5><D8B5><EFBFBD><EFBFBD>루<EFBFBD><EBA3A8><EFBFBD><EFBFBD><EFBFBD>뾳<EFBFBD>غ<EFBFBD><D8BA>ش<EFBFBD><D8B4>룩
|
|
|
|
|
+':'+t_op_seae_edi.fieldbyname('װ<><D7B0><EFBFBD><EFBFBD>').asstring // 11 <20><><EFBFBD>۵ص<DBB5>
|
|
|
|
|
+':' //12 <20><>һ<EFBFBD>Ҹ۴<D2B8><DBB4><EFBFBD>
|
|
|
|
|
+':' //13 <20><>һ<EFBFBD>Ҹ<EFBFBD>
|
|
|
|
|
+':' //14<31><34>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':1' //15<31><35><EFBFBD>䷽ʽ<E4B7BD><CABD><EFBFBD><EFBFBD>
|
|
|
|
|
+#39);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
str.Add('11'
|
|
|
|
|
+':'+t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD>').AsString //2 <20><><EFBFBD><EFBFBD>˾(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)<29><><EFBFBD><EFBFBD>
|
|
|
|
|
+':' //3 <20><><EFBFBD><EFBFBD>˾(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
|
|
|
|
+':'+SenderCode //4<>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ???
|
|
|
|
|
+':'+trim(t_op_seae_edi.fieldbyname('<27><>վ').asstring) //5<><35><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+trim(t_op_seae_edi.fieldbyname('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring) //6<><36><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ؾ<EFBFBD><D8BE>ڵ<EFBFBD>һ<EFBFBD><D2BB>Ŀ<EFBFBD>ĸ۴<C4B8><DBB4><EFBFBD>
|
|
|
|
|
+':'+ GetDatetime(t_op_seae_edi.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,1) //7<><37><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ؾ<EFBFBD><D8BE>ڵ<EFBFBD>һ<EFBFBD><D2BB>Ŀ<EFBFBD>ĸ۵<C4B8><DBB5><EFBFBD><EFBFBD>ں<EFBFBD>ʱ<EFBFBD><CAB1>
|
|
|
|
|
+ #39);
|
|
|
|
|
|
|
|
|
|
xtype :=t_op_seae_edi.fieldbyname('<27><><EFBFBD>ѷ<EFBFBD>ʽ').asstring;
|
|
|
|
|
|
|
|
|
|
TransType:=t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
str.add('12:' + trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').asstring) //2<><32><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>
|
|
|
|
|
+':' //3 ǰ<><C7B0><EFBFBD><EFBFBD><EFBFBD>䴬<EFBFBD><E4B4AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':' //4 ǰ<><C7B0><EFBFBD><EFBFBD><EFBFBD>䴬<EFBFBD><E4B4AC>
|
|
|
|
|
+':' //5 ǰ<><C7B0><EFBFBD><EFBFBD><EFBFBD>亽<EFBFBD><E4BABD>
|
|
|
|
|
+':'+trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring) //6 <20>ջ<EFBFBD><D5BB>ش<EFBFBD><D8B4><EFBFBD>
|
|
|
|
|
+':'+ trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>').asstring) //7<>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+ trim(t_op_seae_edi.fieldbyname('װ<>۴<EFBFBD><DBB4><EFBFBD>').asstring) //8װ<38><D7B0><EFBFBD>۴<EFBFBD><DBB4><EFBFBD>
|
|
|
|
|
+':'+ trim(t_op_seae_edi.fieldbyname('װ<><D7B0><EFBFBD><EFBFBD>').asstring) //9װ<39><D7B0><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+TransType //10<31><30><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+ XType //11<31><31><EFBFBD>ʽ<EEB7BD><CABD><EFBFBD>˷<EFBFBD>֧<EFBFBD><D6A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>룩
|
|
|
|
|
+':'+ GetDatetime(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,1) //12 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD><DAA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ں<EFBFBD>ʱ<EFBFBD>䣩
|
|
|
|
|
+':' //13<31><33><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD>
|
|
|
|
|
+':' //14ǩ<34><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':' //15<31><35><EFBFBD>֣<EFBFBD><D6A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><CDB4>룩
|
|
|
|
|
+':' //16 <20><><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').asstring) //17 <20><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>
|
|
|
|
|
+':' +trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring) //18 <20><><EFBFBD>˻<EFBFBD><CBBB><EFBFBD><EFBFBD>ܼ<EFBFBD><DCBC><EFBFBD>
|
|
|
|
|
+':'+trim(GetpkgsEdi(t_op_seae_edi.fieldbyname('<27><>װ').asstring)) //19 <20><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring) //20 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ë<EFBFBD><C3AB>
|
|
|
|
|
+':' //21 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':' //22 <20><><EFBFBD>˻<EFBFBD><CBBB><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
+':' //23 <20><>ͷ<EFBFBD><CDB7>ҵָ<D2B5><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':' //24 <20><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>
|
|
|
|
|
+':' //25 ǰһ<C7B0><D2BB><EFBFBD>ص<EFBFBD>֤<EFBFBD><D6A4>
|
|
|
|
|
+':' //26 ǰһ<C7B0><D2BB><EFBFBD>ص<EFBFBD>֤<EFBFBD><D6A4><EFBFBD>ʹ<EFBFBD><CDB4><EFBFBD>
|
|
|
|
|
+':001' //27 <20><><EFBFBD>ﺣ<EFBFBD>ش<EFBFBD><D8B4><EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD>(1~99)
|
|
|
|
|
+#39);
|
|
|
|
|
str.add('13:' + trim(t_op_seae_edi.fieldbyname('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring) //2ж<32><D0B6><EFBFBD>ش<EFBFBD><D8B4><EFBFBD> ???
|
|
|
|
|
+':'+ trim(t_op_seae_edi.fieldbyname('ж<><D0B6><EFBFBD><EFBFBD>').asstring) //3ж<33><D0B6><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+ trim(t_op_seae_edi.fieldbyname('Ŀ<>Ĵ<EFBFBD><C4B4><EFBFBD>').asstring) //4<><34><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>
|
|
|
|
|
+':'+ trim(t_op_seae_edi.fieldbyname('Ŀ<>ĵ<EFBFBD>').asstring) //5<><35><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+ ':' // 6 <20><>ת<EFBFBD>۴<EFBFBD><DBB4><EFBFBD>
|
|
|
|
|
+ ':' // 7 <20><>ת<EFBFBD><D7AA>
|
|
|
|
|
+ ':CN' // 8 <20>ᵥǩ<E1B5A5><C7A9><EFBFBD>ش<EFBFBD><D8B4>루<EFBFBD><EBA3A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵ػ<CBB5><D8BB>߹<EFBFBD><DFB9>Ҵ<EFBFBD><D2B4>룩
|
|
|
|
|
+':' // 9
|
|
|
|
|
+':' // 10
|
|
|
|
|
+':' +GetDatetime(t_op_seae_edi.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,0) // 11
|
|
|
|
|
+':' // 12
|
|
|
|
|
+':' // 13
|
|
|
|
|
+#39);
|
|
|
|
|
|
|
|
|
|
str.add('16'
|
|
|
|
|
+':'//+ Changestr(t_op_ams1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>').AsString) //2018-5-25 //2 <20><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>
|
|
|
|
|
+':'+ Changestr(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString) //3<><33><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+ Changestr(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1').AsString) //4<><34><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>ֵ<EFBFBD>,<2C><><EFBFBD>䣩
|
|
|
|
|
+':'+ Changestr(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>').AsString) //5 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':' //6 ʡ<>ݴ<EFBFBD><DDB4><EFBFBD>
|
|
|
|
|
+':'+ Changestr(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString) //7 ʡ<><CAA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+ Changestr(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString) //8 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':'//+ Changestr(t_op_ams1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString) //2018-5-25
|
|
|
|
|
+':'//+ Changestr(t_op_ams1.DataSet.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵绰').AsString) //2018-5-25
|
|
|
|
|
// +':'+ Changestr(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString) //9 <20><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>
|
|
|
|
|
// +':'+ Changestr(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵绰').AsString) //10 <20><><EFBFBD><EFBFBD><EFBFBD>˵绰
|
|
|
|
|
+':'+ Changestr(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString) //11 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>EMAIL
|
|
|
|
|
+':' ///12 <20><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>
|
|
|
|
|
+#39);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
str.add('17'
|
|
|
|
|
+':'//+ Changestr(t_op_ams1.DataSet.fieldbyname('<27>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>').AsString) //2018-5-25 //2 <20>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>
|
|
|
|
|
+':'+ Changestr(t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString) //3<>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+ Changestr(t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1').AsString) //4<>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>ֵ<EFBFBD>,<2C><><EFBFBD>䣩
|
|
|
|
|
+':'+ Changestr(t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB>˳<EFBFBD><CBB3><EFBFBD>').AsString) //5 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':' //6 ʡ<>ݴ<EFBFBD><DDB4><EFBFBD>
|
|
|
|
|
+':'+ Changestr(t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>').AsString) //7 ʡ<><CAA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+ Changestr(t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD>ʱ<EFBFBD>').AsString) //8 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':'//+ Changestr(t_op_ams1.DataSet.fieldbyname('<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString) //2018-5-25
|
|
|
|
|
+':'//+ Changestr(t_op_ams1.DataSet.fieldbyname('<27>ջ<EFBFBD><D5BB>˵绰').AsString) //2018-5-25
|
|
|
|
|
|
|
|
|
|
// +':'+ Changestr(t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString) //9 <20><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>
|
|
|
|
|
// +':'+ Changestr(t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB>˵绰').AsString) //10 <20>ջ<EFBFBD><D5BB>˵绰
|
|
|
|
|
+':'+ Changestr(t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString) //11 <20>ջ<EFBFBD><D5BB><EFBFBD>EMAIL
|
|
|
|
|
+':' ///12 <20>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4><EFBFBD>
|
|
|
|
|
+':' ///13 <20>ջ<EFBFBD><D5BB>˾<EFBFBD><CBBE><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':' ///14 <20>ջ<EFBFBD><D5BB>˾<EFBFBD><CBBE><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD>˵绰
|
|
|
|
|
+':' ///15 <20>ջ<EFBFBD><D5BB>˾<EFBFBD><CBBE><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>EMAIL
|
|
|
|
|
+':' ///16 <20>ջ<EFBFBD><D5BB>˾<EFBFBD><CBBE><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD>˴<EFBFBD><CBB4><EFBFBD>
|
|
|
|
|
+#39);
|
|
|
|
|
|
|
|
|
|
str.add('18'
|
|
|
|
|
+':'//+ Changestr(t_op_ams1.DataSet.fieldbyname('֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>').AsString) //2018-5-25 //2 ֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>
|
|
|
|
|
+':'+ Changestr(t_op_seae_edi.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString) //3֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+ Changestr(t_op_seae_edi.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ1').AsString) //4֪ͨ<CDA8>˵<EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>ֵ<EFBFBD>,<2C><><EFBFBD>䣩
|
|
|
|
|
+':'+ Changestr(t_op_seae_edi.fieldbyname('֪ͨ<CDA8>˳<EFBFBD><CBB3><EFBFBD>').AsString) //5 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':' //6 ʡ<>ݴ<EFBFBD><DDB4><EFBFBD>
|
|
|
|
|
+':'+ Changestr(t_op_seae_edi.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>').AsString) //7 ʡ<><CAA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+ Changestr(t_op_seae_edi.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD>ʱ<EFBFBD>').AsString) //8 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':'//+ Changestr(t_op_ams1.DataSet.fieldbyname('֪ͨ<CDA8>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString) //2018-5-25
|
|
|
|
|
+':'//+ Changestr(t_op_ams1.DataSet.fieldbyname('֪ͨ<CDA8>˵绰').AsString) //2018-5-25
|
|
|
|
|
//+':'+ Changestr(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˹<EFBFBD><CBB9>Ҵ<EFBFBD><D2B4><EFBFBD>').AsString) //9 <20><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>
|
|
|
|
|
//+':'+ Changestr(t_op_seae_edi.fieldbyname('֪ͨ<CDA8>˵绰').AsString) //10 ֪ͨ<CDA8>˵绰
|
|
|
|
|
+':'+ Changestr(t_op_seae_edi.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>').AsString) //11 ֪ͨ<CDA8><D6AA>EMAIL
|
|
|
|
|
+':' ///12 ֪ͨ<CDA8>˴<EFBFBD><CBB4><EFBFBD>
|
|
|
|
|
+#39);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
str.Add ('41:1' //2<><32><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':' //3<><33><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring) //4 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+trim(GetpkgsEdi(t_op_seae_edi.fieldbyname('<27><>װ').asstring)) //5 <20><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+trim(t_op_seae_edi.fieldbyname('<27><>װ').asstring) // 6 <20><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring) // 7<><37>ë<EFBFBD><C3AB>
|
|
|
|
|
+':'+trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring) // 8<><38><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring) // 9<><39><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':' // 10<31><30><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':' // 11<31><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':' // 12ԭ<32><D4AD><EFBFBD>ش<EFBFBD><D8B4><EFBFBD>
|
|
|
|
|
+#39);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
with aAdoQuery do
|
|
|
|
|
begin
|
|
|
|
|
Close;sql.Clear;
|
|
|
|
|
sql.Add('select <20><><EFBFBD><EFBFBD>');
|
|
|
|
|
sql.Add('from t_op_ctn_edi');
|
|
|
|
|
sql.Add('where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
|
|
|
|
|
Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
|
|
Open;First;
|
|
|
|
|
while not Eof do
|
|
|
|
|
begin
|
|
|
|
|
str.Add ('42'
|
|
|
|
|
+':'+trim(fieldbyname('<27><><EFBFBD><EFBFBD>').asstring) //2 <20><><EFBFBD><EFBFBD>
|
|
|
|
|
+#39);
|
|
|
|
|
Count:=Count+1;
|
|
|
|
|
Next;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if trim(t_op_seae_edi.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ').asstring)='D' then
|
|
|
|
|
begin
|
|
|
|
|
str.Add ('43:'+trim(t_op_seae_edi.fieldbyname('Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').asstring) //2Σ<32><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>
|
|
|
|
|
+':none' //3Σ<33><CEA3>Ʒҳ<C6B7><D2B3>
|
|
|
|
|
+':' +trim(t_op_seae_edi.fieldbyname('Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').asstring) //4<><34><EFBFBD>Ϲ<EFBFBD>Σ<EFBFBD><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>
|
|
|
|
|
+':none' //5Σ<35><CEA3>Ʒ<EFBFBD><C6B7>ǩ
|
|
|
|
|
+':' //6 Σ<>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':' //7 <20><><EFBFBD><EFBFBD>Σ<EFBFBD><CEA3>ƷӦ<C6B7><D3A6><EFBFBD><EFBFBD>ʩ<EFBFBD><CAA9>
|
|
|
|
|
+':' //8 ҽ<>Ƽ<EFBFBD><C6BC><EFBFBD>ָ<EFBFBD>Ϻ<EFBFBD>
|
|
|
|
|
+':' //9 Ӧ<><D3A6><EFBFBD><EFBFBD>ϵ
|
|
|
|
|
+':' //10 <20>¶ȼ<C2B6><C8BC><EFBFBD><EFBFBD><EFBFBD>λ
|
|
|
|
|
+':' //11 <20><><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>
|
|
|
|
|
+':' //12 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>
|
|
|
|
|
+':' //13 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>
|
|
|
|
|
+':' //14 Σ<><CEA3>Ʒ<EFBFBD><C6B7>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':' //15 Σ<><CEA3>Ʒ<EFBFBD><C6B7>ϵ<EFBFBD>˵绰
|
|
|
|
|
+':' //16 Σ<><CEA3>Ʒ<EFBFBD><C6B7>ϵ<EFBFBD><CFB5>EMAIL
|
|
|
|
|
+':' //17 Σ<><CEA3>Ʒ<EFBFBD><C6B7>ϵ<EFBFBD>˴<EFBFBD><CBB4><EFBFBD>
|
|
|
|
|
+#39);
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
if trim(t_op_seae_edi.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ').asstring)='R' then
|
|
|
|
|
begin
|
|
|
|
|
str.Add ('43:' //2Σ<32><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>
|
|
|
|
|
+':' //3Σ<33><CEA3>Ʒҳ<C6B7><D2B3>
|
|
|
|
|
+':' //4<><34><EFBFBD>Ϲ<EFBFBD>Σ<EFBFBD><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>
|
|
|
|
|
+':' //5Σ<35><CEA3>Ʒ<EFBFBD><C6B7>ǩ
|
|
|
|
|
+':' //6 Σ<>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':' //7 <20><><EFBFBD><EFBFBD>Σ<EFBFBD><CEA3>ƷӦ<C6B7><D3A6><EFBFBD><EFBFBD>ʩ<EFBFBD><CAA9>
|
|
|
|
|
+':' //8 ҽ<>Ƽ<EFBFBD><C6BC><EFBFBD>ָ<EFBFBD>Ϻ<EFBFBD>
|
|
|
|
|
+':' //9 Ӧ<><D3A6><EFBFBD><EFBFBD>ϵ
|
|
|
|
|
+':C' //10 <20>¶ȼ<C2B6><C8BC><EFBFBD><EFBFBD><EFBFBD>λ
|
|
|
|
|
+':'+t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>').asstring //11 <20><><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>
|
|
|
|
|
+':' //12 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>
|
|
|
|
|
+':' //13 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¶<EFBFBD>
|
|
|
|
|
+':' //14 Σ<><CEA3>Ʒ<EFBFBD><C6B7>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':' //15 Σ<><CEA3>Ʒ<EFBFBD><C6B7>ϵ<EFBFBD>˵绰
|
|
|
|
|
+':' //16 Σ<><CEA3>Ʒ<EFBFBD><C6B7>ϵ<EFBFBD><CFB5>EMAIL
|
|
|
|
|
+':' //17 Σ<><CEA3>Ʒ<EFBFBD><C6B7>ϵ<EFBFBD>˴<EFBFBD><CBB4><EFBFBD>
|
|
|
|
|
+#39);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
Temprslt:=Changestr(t_op_seae_edi.fieldbyname('<27><>ͷ').asstring);
|
|
|
|
|
|
|
|
|
|
Temprslt:=StringReplace(Temprslt,#13#10,' ',[rfReplaceAll]);
|
|
|
|
|
|
|
|
|
|
str.Add ('44:'
|
|
|
|
|
+Temprslt
|
|
|
|
|
+ #39);
|
|
|
|
|
|
|
|
|
|
Temprslt:=Changestr(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
|
|
|
|
|
|
|
|
|
|
Temprslt:=StringReplace(Temprslt,#13#10,' ',[rfReplaceAll]);
|
|
|
|
|
|
|
|
|
|
str.Add ('47:'
|
|
|
|
|
+ Temprslt+ ':'
|
|
|
|
|
+ #39);
|
|
|
|
|
|
|
|
|
|
Count:=Count+10;
|
|
|
|
|
|
|
|
|
|
strsql:='select * from t_op_ctn_edi '
|
|
|
|
|
+'WHERE <20><><EFBFBD><EFBFBD>='
|
|
|
|
|
+#39+t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+#39;
|
|
|
|
|
try
|
|
|
|
|
rs:=Tadoquery.Create(application);
|
|
|
|
|
rs.Connection := frm_main.db;
|
|
|
|
|
rs.sql.clear;
|
|
|
|
|
rs.sql.add(strsql);
|
|
|
|
|
rs.Open;
|
|
|
|
|
rs.First;
|
|
|
|
|
if not rs.IsEmpty then begin
|
|
|
|
|
rs.First;
|
|
|
|
|
while not rs.Eof do
|
|
|
|
|
begin
|
|
|
|
|
str.Add ('51:001' //2<><32><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+trim(rs.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring) //3<><33><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+trim(rs.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring) //4<><34>Ǧ<EFBFBD><C7A6><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+Trim(rs.fieldbyname('<27>ߴ<EFBFBD>').asstring+rs.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring) //5<><35>װ<EFBFBD><D7B0><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':8' //6<><36>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߿<EFBFBD><DFBF><EFBFBD><EFBFBD><EFBFBD>ʶ<EFBFBD><CAB6><EFBFBD>룩
|
|
|
|
|
+':' +trim(IntToStr(rs.fieldbyname('<27><><EFBFBD><EFBFBD>').AsInteger)) //7<><37><EFBFBD>ڻ<EFBFBD><DABB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+trim(FloatToStr(rs.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat)) //8<><38><EFBFBD>ڻ<EFBFBD><DABB><EFBFBD>
|
|
|
|
|
+':0' //9<><39>Ƥ<EFBFBD><C6A4>
|
|
|
|
|
+':'+trim(FloatToStr(rs.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat)) //10<31><30><EFBFBD>ڻ<EFBFBD><DABB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
+':'+trim(rs.fieldbyname('<27><>װ').asstring) //11
|
|
|
|
|
+':' //12
|
|
|
|
|
+':' //13
|
|
|
|
|
+':' // 14
|
|
|
|
|
+':' // 15
|
|
|
|
|
+':' // 16
|
|
|
|
|
+':2' // 17
|
|
|
|
|
+#39);
|
|
|
|
|
|
|
|
|
|
str.Add ('52'
|
|
|
|
|
+':'+trim(rs.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring) //2 <20><>־<EFBFBD><D6BE>
|
|
|
|
|
+':M' //3 <20><>־<EFBFBD><D6BE><EFBFBD><EFBFBD>
|
|
|
|
|
+':CA' //4 ʩ<>ӷ<EFBFBD>־<EFBFBD><D6BE>
|
|
|
|
|
+#39);
|
|
|
|
|
Count:=Count+1;
|
|
|
|
|
|
|
|
|
|
rs.Next;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
rs.Close;
|
|
|
|
|
rs.Destroy;
|
|
|
|
|
except
|
|
|
|
|
on e:exception do
|
|
|
|
|
begin
|
|
|
|
|
rs.Close;
|
|
|
|
|
rs.Destroy;
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
str.Add ('99:'+ inttostr(Count+2)+#39);
|
|
|
|
|
|
|
|
|
|
Result:=str;
|
|
|
|
|
close;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function Tfrm_op_manifest.CreateSIEdiFile_XML:TStrings;
|
|
|
|
|
var
|
|
|
|
|
str:Tstringlist;
|
|
|
|
|
i,j,k,l,Count:integer;
|
|
|
|
|
strsql,strRmain:string;
|
|
|
|
|
rs:Tadoquery;
|
|
|
|
|
wide_str:widestring;
|
|
|
|
|
strType,XType,TransType:string;
|
|
|
|
|
strDatetime,IMO:string;
|
|
|
|
|
SenderCode,ReciverCode:string;
|
|
|
|
|
alist,alisttemp:TStringList;
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
SenderCode:=trim(get_parameters_value(302,'')) ;
|
|
|
|
|
ReciverCode:=trim(get_parameters_value(303,'')) ;
|
|
|
|
|
|
|
|
|
|
strType:='9';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
str:=Tstringlist.Create;
|
|
|
|
|
str.Clear;
|
|
|
|
|
str.Add('<?xml version="1.0" encoding="UTF-8" standalone="no"?>');
|
|
|
|
|
// str.Add('<?xml version="1.0" encoding="utf-8" ?>');
|
|
|
|
|
|
|
|
|
|
str.Add('<Manifest xmlns="urn:Declaration:datamodel:standard:CN:MT2101:1">');
|
|
|
|
|
str.Add('<Head>');
|
|
|
|
|
//<!--<2D><><EFBFBD>ı<EFBFBD><C4B1>ţ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<MessageID>'+SenderCode+trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').asstring)+GetDatetime(datetimetostr(now),3)+IntToStr(GetTickCount)+'</MessageID>');
|
|
|
|
|
//<!--<2D><><EFBFBD>Ĺ<EFBFBD><C4B9>ܴ<EFBFBD><DCB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<FunctionCode>'+strType+'</FunctionCode>');
|
|
|
|
|
//<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><CDB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<MessageType>MT2101</MessageType>');
|
|
|
|
|
// <!--<2D><><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<SenderID>'+SenderCode+'</SenderID>');
|
|
|
|
|
//<!--<2D><><EFBFBD>ܷ<EFBFBD><DCB7><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<ReceiverID>'+ReciverCode+'</ReceiverID>');
|
|
|
|
|
//<!--<2D><><EFBFBD><EFBFBD>ʱ<EFBFBD>䣨ѭ<E4A3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31><EFBFBD><EFBFBD><EFBFBD>þ<EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD>ʽΪCCYYMMDDHHmmssfff-->
|
|
|
|
|
str.Add('<SendTime>'+GetDatetime(datetimetostr(now),4)+'</SendTime>');
|
|
|
|
|
//<!--<2D><><EFBFBD>İ汾<C4B0>ţ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<Version>1.0</Version>');
|
|
|
|
|
str.Add('</Head>');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// <!--<2D><><EFBFBD><EFBFBD><EFBFBD>壨ѭ<E5A3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<Declaration>');
|
|
|
|
|
// <!--<2D>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݶΣ<DDB6>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<RepresentativePerson>');
|
|
|
|
|
// <!--256 Representative person name <20>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<Name>'+SenderCode+'</Name>');
|
|
|
|
|
str.Add('</RepresentativePerson>');
|
|
|
|
|
// <!--<2D><><EFBFBD>乤<EFBFBD><E4B9A4><EFBFBD>뾳<EFBFBD>غ<EFBFBD><D8BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݶΣ<DDB6>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<ExitCustomsOffice>');
|
|
|
|
|
// <!--<2D><><EFBFBD>乤<EFBFBD><E4B9A4><EFBFBD>뾳<EFBFBD>غ<EFBFBD><D8BA>ش<EFBFBD><D8B4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<ID>'+trim(t_op_seae_edi.fieldbyname('װ<>۴<EFBFBD><DBB4><EFBFBD>').asstring)+'</ID>');
|
|
|
|
|
str.Add('</ExitCustomsOffice>');
|
|
|
|
|
// <!--<2D><><EFBFBD>乤<EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD>ݶΣ<DDB6>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<Agent>');
|
|
|
|
|
// <!--<2D><><EFBFBD>乤<EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<ID>'+SenderCode+'</ID>');
|
|
|
|
|
str.Add('</Agent>');
|
|
|
|
|
// <!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݶΣ<DDB6>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<Carrier>');
|
|
|
|
|
// <!--<2D><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<ID>'+t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD>').AsString+'</ID>');
|
|
|
|
|
str.Add('</Carrier>');
|
|
|
|
|
|
|
|
|
|
// <!--<2D><><EFBFBD>乤<EFBFBD><E4B9A4><EFBFBD><EFBFBD><EFBFBD>ݶΣ<DDB6>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<BorderTransportMeans>');
|
|
|
|
|
// <!--<2D><><EFBFBD>κ<EFBFBD><CEBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<JourneyID>'+trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring)+'</JourneyID>');
|
|
|
|
|
// <!--<2D><><EFBFBD>䷽ʽ<E4B7BD><CABD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<TypeCode>1</TypeCode>');
|
|
|
|
|
// <!--<2D><><EFBFBD>乤<EFBFBD>ߴ<EFBFBD><DFB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<ID>'+trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD>IMO').asstring)+'</ID>');
|
|
|
|
|
// <!--<2D><><EFBFBD>乤<EFBFBD><E4B9A4><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<Name>'+trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString)+'</Name>');
|
|
|
|
|
// <!--<2D><><EFBFBD>乤<EFBFBD>ߵִ<DFB5><D6B4>ؾ<EFBFBD><D8BE>ڵ<EFBFBD>һ<EFBFBD><D2BB>Ŀ<EFBFBD>ĸ۴<C4B8><DBB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<FirstArrivalLocationID>'+trim(t_op_seae_edi.fieldbyname('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)+'</FirstArrivalLocationID>');
|
|
|
|
|
// <!--<2D><><EFBFBD>乤<EFBFBD>ߵִ<DFB5><D6B4>ؾ<EFBFBD><D8BE>ڵ<EFBFBD>һ<EFBFBD><D2BB>Ŀ<EFBFBD>ĸ۵<C4B8><DBB5><EFBFBD><EFBFBD>ں<EFBFBD>ʱ<EFBFBD>䣨CCYYMMDDhhmmss<73><73><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<ArrivalDateTime>'+GetDatetime(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,1)+'086'+'</ArrivalDateTime>');
|
|
|
|
|
//<!--<2D><><EFBFBD>乤<EFBFBD><E4B9A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ں<EFBFBD>ʱ<EFBFBD>䣨CCYYMMDDhhmmss<73><73><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<DepartureDateTime>'+GetDatetime(t_op_seae_edi.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,1)+'086'+'</DepartureDateTime>');
|
|
|
|
|
str.Add('</BorderTransportMeans>');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//<!--<2D>ᣨ<EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݶΣ<DDB6>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1-9999<39><39>-->
|
|
|
|
|
str.Add('<Consignment>');
|
|
|
|
|
// <!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<TransportContractDocument>');
|
|
|
|
|
//<!--<2D><><EFBFBD>ᣨ<EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD>ţ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<ID>'+trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').asstring)+'</ID>');
|
|
|
|
|
|
|
|
|
|
if pos('FREIGHT PREPAID',trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD>ѷ<EFBFBD>ʽ').asstring)) >0 then
|
|
|
|
|
xtype := 'PP'
|
|
|
|
|
else if pos('FREIGHT COLLECT',trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD>ѷ<EFBFBD>ʽ').asstring)) >0 then
|
|
|
|
|
xtype := 'CC'
|
|
|
|
|
else xtype := 'PP';
|
|
|
|
|
|
|
|
|
|
if uppercase(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='CY-CY' then
|
|
|
|
|
TransType:='10'
|
|
|
|
|
else if uppercase(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='DOOR-DOOR' then
|
|
|
|
|
TransType:='27'
|
|
|
|
|
else if uppercase(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='DOOR-PIER' then
|
|
|
|
|
TransType:='28'
|
|
|
|
|
else if uppercase(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)='PIER-DOOR' then
|
|
|
|
|
TransType:='29'
|
|
|
|
|
else TransType:='10'; // PIER TO PIER
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// <!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<ConditionCode>'+TransType+'</ConditionCode>');
|
|
|
|
|
//<!--ƴ<><C6B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
{
|
|
|
|
|
str.Add('<Consolidator>');
|
|
|
|
|
// <!--ƴ<><C6B4><EFBFBD>˴<EFBFBD><CBB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1)-->
|
|
|
|
|
str.Add('<ID></ID>');
|
|
|
|
|
str.Add('</Consolidator>');
|
|
|
|
|
}
|
|
|
|
|
str.Add('</TransportContractDocument>');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// <!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
if trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').asstring)<>'' then
|
|
|
|
|
begin
|
|
|
|
|
str.Add('<AssociatedTransportDocument>');
|
|
|
|
|
//<!--<2D><><EFBFBD>ᣨ<EFBFBD>ˣ<EFBFBD><CBA3><EFBFBD><EFBFBD>ţ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<ID>'+trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').asstring)+'</ID>');
|
|
|
|
|
str.Add('</AssociatedTransportDocument>');
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
end;
|
|
|
|
|
}
|
|
|
|
|
//<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<GrossVolumeMeasure>'+trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring)+'</GrossVolumeMeasure>');
|
|
|
|
|
// <!--CurrencyTypeCode<64><65>ֵ<EFBFBD>ǽ<EFBFBD><C7BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><CDB4>룬 ValueAmount<6E><74>ֵ<EFBFBD>ǻ<EFBFBD><C7BB><EFBFBD><EFBFBD><EFBFBD>ֵ <20><>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
// str.Add('<ValueAmount CurrencyTypeCode="CNY"></ValueAmount>');
|
|
|
|
|
// <!--װ<><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<LoadingLocation>');
|
|
|
|
|
//<!--װ<><D7B0><EFBFBD>ش<EFBFBD><D8B4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<ID>'+trim(t_op_seae_edi.fieldbyname('װ<>۴<EFBFBD><DBB4><EFBFBD>').asstring)+'</ID>');
|
|
|
|
|
// <!--<2D><><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD>乤<EFBFBD><E4B9A4>ʱ<EFBFBD>䣨ѭ<E4A3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<LoadingDate>'+GetDatetime(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,1)+'086'+'</LoadingDate>');
|
|
|
|
|
str.Add('</LoadingLocation>');
|
|
|
|
|
// <!--ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<UnloadingLocation>');
|
|
|
|
|
// <!--ж<><D0B6><EFBFBD>ش<EFBFBD><D8B4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<ID>'+trim(t_op_seae_edi.fieldbyname('ж<><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring)+'</ID>');
|
|
|
|
|
// <!--<2D><><EFBFBD><EFBFBD>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(CCYYMMDD)<29><>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<ArrivalDate>'+GetDatetime(t_op_seae_edi.fieldbyname('Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring,0)+'</ArrivalDate>');
|
|
|
|
|
str.Add('</UnloadingLocation>');
|
|
|
|
|
// <!--<2D>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<GoodsReceiptPlace>');
|
|
|
|
|
// <!--<2D>ջ<EFBFBD><D5BB>ص<EFBFBD><D8B5><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<ID>'+trim(t_op_seae_edi.fieldbyname('Ŀ<>Ĵ<EFBFBD><C4B4><EFBFBD>').asstring)+'</ID>');
|
|
|
|
|
// <!--<2D>ջ<EFBFBD><D5BB>ص<EFBFBD><D8B5><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<Name>'+trim(t_op_seae_edi.fieldbyname('Ŀ<>ĵ<EFBFBD>').asstring)+'</Name>');
|
|
|
|
|
str.Add('</GoodsReceiptPlace>');
|
|
|
|
|
{
|
|
|
|
|
// <!--<2D><>ת<EFBFBD><D7AA><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<TranshipmentLocation>');
|
|
|
|
|
// <!--<2D><>ת<EFBFBD>ص<EFBFBD><D8B5><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<ID></ID>);
|
|
|
|
|
str.Add('</TranshipmentLocation>')
|
|
|
|
|
<!--<2D><>תĿ<D7AA>ĵ<EFBFBD><C4B5><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<TransitDestination>
|
|
|
|
|
<!--<2D><>תĿ<D7AA>ĵش<C4B5><D8B4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
<ID></ID>
|
|
|
|
|
</TransitDestination>
|
|
|
|
|
<!--;<><CDBE><EFBFBD><EFBFBD><EFBFBD>Ҵ<EFBFBD><D2B4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-99<39><39>-->
|
|
|
|
|
<RoutingCountryCode></RoutingCountryCode>
|
|
|
|
|
<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<GoodsConsignedPlace>
|
|
|
|
|
<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵ĵص<C4B5><D8B5><EFBFBD><EFBFBD>߹<EFBFBD><DFB9>Ҵ<EFBFBD><D2B4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
<ID></ID>
|
|
|
|
|
</GoodsConsignedPlace>
|
|
|
|
|
<!--<2D><><EFBFBD>ﺣ<EFBFBD><EFBAA3>״̬<D7B4><CCAC><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-99<39><39>-->
|
|
|
|
|
<CustomsStatusCode></CustomsStatusCode>
|
|
|
|
|
<!--<2D><><EFBFBD><EFBFBD><EFBFBD>˻<EFBFBD><CBBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ<EFBFBD><CAB6>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<TransportSplitIndicator></TransportSplitIndicator>
|
|
|
|
|
}
|
|
|
|
|
// <!--<2D>˷<EFBFBD>֧<EFBFBD><D6A7><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<FreightPayment>');
|
|
|
|
|
//<!--<2D>˷<EFBFBD>֧<EFBFBD><D6A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<MethodCode>'+xtype+'</MethodCode>');
|
|
|
|
|
str.Add('</FreightPayment>');
|
|
|
|
|
//<!--<2D><><EFBFBD><EFBFBD><EFBFBD>ܼ<EFBFBD><DCBC><EFBFBD>/<2F><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<ConsignmentPackaging>');
|
|
|
|
|
// <!--<2D><><EFBFBD><EFBFBD><EFBFBD>ܼ<EFBFBD><DCBC><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<QuantityQuantity>'+trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring)+'</QuantityQuantity>');
|
|
|
|
|
// <!--<2D><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<TypeCode>'+trim(GetpkgsEdi(t_op_seae_edi.fieldbyname('<27><>װ').asstring))+'</TypeCode>');
|
|
|
|
|
str.Add('</ConsignmentPackaging>');
|
|
|
|
|
// <!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ë<EFBFBD>أ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<TotalGrossMassMeasure>'+trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring)+'</TotalGrossMassMeasure>');
|
|
|
|
|
{
|
|
|
|
|
<!--ǰһ<C7B0><D2BB><EFBFBD>ص<EFBFBD>֤<EFBFBD><D6A4>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<PreviousCustomsDocument>
|
|
|
|
|
<!--ǰһ<C7B0><D2BB><EFBFBD>ص<EFBFBD>֤<EFBFBD>ţ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
<ID></ID>
|
|
|
|
|
<!--ǰһ<C7B0><D2BB><EFBFBD>ص<EFBFBD>֤<EFBFBD><D6A4><EFBFBD>ʹ<EFBFBD><CDB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
<TypeCode></TypeCode>
|
|
|
|
|
</PreviousCustomsDocument>
|
|
|
|
|
<!--<2D><><EFBFBD>サ<EFBFBD><EFBDBB><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<DeliveryDestination>
|
|
|
|
|
<!--<2D><><EFBFBD>サ<EFBFBD><EFBDBB>Ŀ<EFBFBD>ĵص<C4B5>ַ<EFBFBD><D6B7><EFBFBD>ֵ<EFBFBD>,<2C><><EFBFBD>䣩<EFBFBD><E4A3A9>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
<Line></Line>
|
|
|
|
|
<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<CityName></CityName>
|
|
|
|
|
<!--ʡ<>ݴ<EFBFBD><DDB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<CountrySubEntityID></CountrySubEntityID>
|
|
|
|
|
<!--ʡ<><CAA1><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<CountrySubEntityName></CountrySubEntityName>
|
|
|
|
|
<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<PostcodeID></PostcodeID>
|
|
|
|
|
<!--<2D><><EFBFBD>Ҵ<EFBFBD><D2B4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<CountryCode></CountryCode>
|
|
|
|
|
</DeliveryDestination>
|
|
|
|
|
<!--<2D><>ͷ<EFBFBD><CDB7>ҵ<EFBFBD><D2B5>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<Handling>
|
|
|
|
|
<!--<2D><>ͷ<EFBFBD><CDB7>ҵָ<D2B5><D6B8><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
<InstructionsCodeCode></InstructionsCodeCode>
|
|
|
|
|
</Handling>
|
|
|
|
|
<!--<2D>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<IntermediateCarrier>
|
|
|
|
|
<!--<2D>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˱<EFBFBD>ʶ<EFBFBD><CAB6>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<ID></ID>
|
|
|
|
|
<!--<2D>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-3<><33>-->
|
|
|
|
|
<Communication>
|
|
|
|
|
<!--ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
<ID></ID>
|
|
|
|
|
<!--ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
<TypeID></TypeID>
|
|
|
|
|
</Communication>
|
|
|
|
|
</IntermediateCarrier>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<!--<2D>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<Consignee>');
|
|
|
|
|
//<!--<2D>ջ<EFBFBD><D5BB>˴<EFBFBD><CBB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<ID>10</ID>');
|
|
|
|
|
//<!--<2D>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<Name>'+formatAfrstr(trim(t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString))+'</Name>');
|
|
|
|
|
//<!--<2D>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ<EFBFBD><D6B7>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<Address>');
|
|
|
|
|
//<!--<2D><>ϸ<EFBFBD><CFB8>ַ<EFBFBD><D6B7><EFBFBD>ֵ<EFBFBD>,<2C><><EFBFBD>䣩<EFBFBD><E4A3A9>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<Line>'+formatAfrstr(trim(t_op_seae_edi.fieldbyname('<27>ջ<EFBFBD><D5BB>˵<EFBFBD>ַ1').AsString))+'</Line>');
|
|
|
|
|
{
|
|
|
|
|
<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<CityName></CityName>
|
|
|
|
|
<!--ʡ<>ݴ<EFBFBD><DDB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<CountrySubEntityID></CountrySubEntityID>
|
|
|
|
|
<!--ʡ<><CAA1><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<CountrySubEntityName></CountrySubEntityName>
|
|
|
|
|
<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<PostcodeID></PostcodeID>
|
|
|
|
|
<!--<2D><><EFBFBD>Ҵ<EFBFBD><D2B4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<CountryCode></CountryCode>
|
|
|
|
|
}
|
|
|
|
|
str.Add('</Address>');
|
|
|
|
|
{
|
|
|
|
|
<!--<2D>м<EFBFBD><D0BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-3<><33>-->
|
|
|
|
|
<Communication>
|
|
|
|
|
<!--ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
<ID></ID>
|
|
|
|
|
<!--ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
<TypeID></TypeID>
|
|
|
|
|
</Communication>
|
|
|
|
|
<!--<2D>ջ<EFBFBD><D5BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<Contact>
|
|
|
|
|
<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<Name></Name>
|
|
|
|
|
<Communication>
|
|
|
|
|
<!--ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
<ID></ID>
|
|
|
|
|
<!--ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
<TypeID></TypeID>
|
|
|
|
|
</Communication>
|
|
|
|
|
</Contact>
|
|
|
|
|
}
|
|
|
|
|
str.Add('</Consignee>');
|
|
|
|
|
// <!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<Consignor>');
|
|
|
|
|
//<!--<2D><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<ID>11</ID>');
|
|
|
|
|
//<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<Name>'+formatAfrstr(trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString))+'</Name>');
|
|
|
|
|
//<!--<2D><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ<EFBFBD><D6B7>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<Address>');
|
|
|
|
|
//<!--<2D><>ϸ<EFBFBD><CFB8>ַ<EFBFBD><D6B7><EFBFBD>ֵ<EFBFBD>,<2C><><EFBFBD>䣩<EFBFBD><E4A3A9>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<Line>'+trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD>ַ1').AsString)+'</Line>');
|
|
|
|
|
{
|
|
|
|
|
<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<CityName></CityName>
|
|
|
|
|
<!--ʡ<>ݴ<EFBFBD><DDB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<CountrySubEntityID></CountrySubEntityID>
|
|
|
|
|
<!--ʡ<><CAA1><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<CountrySubEntityName></CountrySubEntityName>
|
|
|
|
|
<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<PostcodeID></PostcodeID>
|
|
|
|
|
<!--<2D><><EFBFBD>Ҵ<EFBFBD><D2B4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<CountryCode></CountryCode>
|
|
|
|
|
}
|
|
|
|
|
str.Add('</Address>');
|
|
|
|
|
{
|
|
|
|
|
<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-3<><33>-->
|
|
|
|
|
<Communication>
|
|
|
|
|
<!--ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
<ID></ID>
|
|
|
|
|
<!--ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
<TypeID></TypeID>
|
|
|
|
|
</Communication>
|
|
|
|
|
}
|
|
|
|
|
str.Add('</Consignor>');
|
|
|
|
|
//<!--֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<NotifyParty>');
|
|
|
|
|
//<!--֪ͨ<CDA8>˴<EFBFBD><CBB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<ID>13</ID>');
|
|
|
|
|
//<!--֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<Name>'+formatAfrstr(trim(t_op_seae_edi.fieldbyname('֪ͨ<CDA8><D6AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString))+'</Name>');
|
|
|
|
|
//<!--֪ͨ<CDA8>˵<EFBFBD>ַ<EFBFBD><D6B7>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<Address>');
|
|
|
|
|
// <!--<2D><>ϸ<EFBFBD><CFB8>ַ<EFBFBD><D6B7><EFBFBD>ֵ<EFBFBD>,<2C><><EFBFBD>䣩<EFBFBD><E4A3A9>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<Line>'+formatAfrstr(trim(t_op_seae_edi.fieldbyname('֪ͨ<CDA8>˵<EFBFBD>ַ1').AsString))+'</Line>');
|
|
|
|
|
{
|
|
|
|
|
<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<CityName></CityName>
|
|
|
|
|
<!--ʡ<>ݴ<EFBFBD><DDB4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<CountrySubEntityID></CountrySubEntityID>
|
|
|
|
|
<!--ʡ<><CAA1><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<CountrySubEntityName></CountrySubEntityName>
|
|
|
|
|
<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<PostcodeID></PostcodeID>
|
|
|
|
|
<!--<2D><><EFBFBD>Ҵ<EFBFBD><D2B4>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<CountryCode></CountryCode>
|
|
|
|
|
}
|
|
|
|
|
str.Add('</Address>');
|
|
|
|
|
{
|
|
|
|
|
<!--֪ͨ<CDA8><D6AA>ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-3<><33>-->
|
|
|
|
|
<Communication>
|
|
|
|
|
<!--ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
<ID></ID>
|
|
|
|
|
<!--ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
<TypeID></TypeID>
|
|
|
|
|
</Communication>
|
|
|
|
|
}
|
|
|
|
|
str.Add('</NotifyParty>');
|
|
|
|
|
{
|
|
|
|
|
<!--Σ<><CEA3>Ʒ<EFBFBD><C6B7>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
<UNDGContact>
|
|
|
|
|
<!--Σ<><CEA3>Ʒ<EFBFBD><C6B7>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0<EFBFBD><30>-->
|
|
|
|
|
<Name></Name>
|
|
|
|
|
<!--Σ<><CEA3>Ʒ<EFBFBD><C6B7>ϵ<EFBFBD><CFB5>ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-3<><33>-->
|
|
|
|
|
<Communication>
|
|
|
|
|
<!--ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
<ID></ID>
|
|
|
|
|
<!--ͨѶ<CDA8><D1B6>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
<TypeID></TypeID>
|
|
|
|
|
</Communication>
|
|
|
|
|
</UNDGContact>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
strsql:='select * from t_op_ctn_edi '
|
|
|
|
|
+'WHERE <20><><EFBFBD><EFBFBD>='
|
|
|
|
|
+#39+t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+#39;
|
|
|
|
|
try
|
|
|
|
|
rs:=CreateAdoQuery;
|
|
|
|
|
rs.sql.clear;
|
|
|
|
|
rs.sql.add(strsql);
|
|
|
|
|
rs.Open;
|
|
|
|
|
rs.First;
|
|
|
|
|
if not rs.IsEmpty then begin
|
|
|
|
|
rs.First;
|
|
|
|
|
while not rs.Eof do
|
|
|
|
|
begin
|
|
|
|
|
// <!--<2D><>װ<EFBFBD>䣨<EFBFBD><E4A3A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-9999<39><39>-->
|
|
|
|
|
str.Add('<TransportEquipment>');
|
|
|
|
|
// <!--<2D><>װ<EFBFBD>䣨<EFBFBD><E4A3A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1)-->
|
|
|
|
|
str.Add('<EquipmentIdentification>');
|
|
|
|
|
// <!-- <20><>װ<EFBFBD>䣨<EFBFBD><E4A3A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<ID>'+rs.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+'</ID>');
|
|
|
|
|
str.Add('</EquipmentIdentification>');
|
|
|
|
|
// <!--<2D><>װ<EFBFBD>䣨<EFBFBD><E4A3A8><EFBFBD><EFBFBD><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<CharacteristicCode>'+GetCtnCode(rs.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,rs.fieldbyname('<27>ߴ<EFBFBD>').asstring)+'</CharacteristicCode>');
|
|
|
|
|
//<!--<2D><>װ<EFBFBD>䣨<EFBFBD><E4A3A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD><D4B4><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<SupplierPartyTypeCode>2</SupplierPartyTypeCode>');
|
|
|
|
|
//<!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߿<EFBFBD><DFBF><EFBFBD><EFBFBD><EFBFBD>ʶ<EFBFBD><CAB6><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<FullnessCode>5</FullnessCode>');
|
|
|
|
|
// <!--SealID<49><44>ֵ<EFBFBD>Ƿ<EFBFBD>־<EFBFBD><D6BE><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD>,AgencyCode<64><65>ֵ<EFBFBD><D6B5>ʩ<EFBFBD>ӷ<EFBFBD>־<EFBFBD><D6BE><EFBFBD><EFBFBD><EFBFBD>ͣ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-9<><39>-->
|
|
|
|
|
str.Add('<SealID AgencyCode="CA">M/'+trim(rs.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring)+'</SealID>');
|
|
|
|
|
str.Add('</TransportEquipment>');
|
|
|
|
|
rs.Next;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
rs.Close;
|
|
|
|
|
rs.Destroy;
|
|
|
|
|
except
|
|
|
|
|
on e:exception do
|
|
|
|
|
begin
|
|
|
|
|
rs.Close;
|
|
|
|
|
rs.Destroy;
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
k:=1;
|
|
|
|
|
alist:=TStringList.Create;
|
|
|
|
|
alisttemp:=TStringList.Create;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
strsql:='select * from t_op_ctn_edi '
|
|
|
|
|
+'WHERE <20><><EFBFBD><EFBFBD>='
|
|
|
|
|
+#39+t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring+#39;
|
|
|
|
|
try
|
|
|
|
|
rs:=CreateAdoQuery;
|
|
|
|
|
rs.sql.clear;
|
|
|
|
|
rs.sql.add(strsql);
|
|
|
|
|
rs.Open;
|
|
|
|
|
rs.First;
|
|
|
|
|
if not rs.IsEmpty then begin
|
|
|
|
|
rs.First;
|
|
|
|
|
while not rs.Eof do
|
|
|
|
|
begin
|
|
|
|
|
//<!--<2D><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1-999<39><39>-->
|
|
|
|
|
str.Add('<ConsignmentItem>');
|
|
|
|
|
//<!--<2D><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<SequenceNumeric>'+inttostr(k)+'</SequenceNumeric>');
|
|
|
|
|
//<!--<2D><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>װ<EFBFBD><D7B0>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<ConsignmentItemPackaging>');
|
|
|
|
|
// <!--<2D><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<QuantityQuantity>'+trim(IntToStr(rs.fieldbyname('<27><><EFBFBD><EFBFBD>').AsInteger))+'</QuantityQuantity>');
|
|
|
|
|
// <!--<2D><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<TypeCode>'+trim(GetpkgsEdi(rs.fieldbyname('<27><>װ').asstring)) +'</TypeCode>');
|
|
|
|
|
|
|
|
|
|
alist.text:='';
|
|
|
|
|
if trim(rs.fieldbyname('<27><>ͷ').asstring)<>'' then
|
|
|
|
|
alist.text:=trim(rs.fieldbyname('<27><>ͷ').asstring)
|
|
|
|
|
else alist.text:=trim(t_op_seae_edi.fieldbyname('<27><>ͷ').asstring);
|
|
|
|
|
|
|
|
|
|
alisttemp.Clear;
|
|
|
|
|
for l:=0 to alist.Count-1 do
|
|
|
|
|
begin
|
|
|
|
|
alisttemp.Add(formatAfrstr(alist[l]));
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// <!--<2D><>ͷ<EFBFBD><CDB7>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
str.Add('<MarksNumbers>'+alisttemp.text+'</MarksNumbers>');
|
|
|
|
|
str.Add('</ConsignmentItemPackaging>');
|
|
|
|
|
|
|
|
|
|
alist.text:='';
|
|
|
|
|
if trim(rs.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring)<>'' then
|
|
|
|
|
alist.text:=trim(rs.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring)
|
|
|
|
|
else alist.text:=trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring);
|
|
|
|
|
|
|
|
|
|
alisttemp.Clear;
|
|
|
|
|
for l:=0 to alist.Count-1 do
|
|
|
|
|
begin
|
|
|
|
|
alisttemp.Add(formatAfrstr(alist[l]));
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
//<!--<2D><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<Commodity>');
|
|
|
|
|
//<!--<2D><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<CargoDescription>'+alisttemp.text+'</CargoDescription>');
|
|
|
|
|
//<!--Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD>ţ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
|
|
|
|
|
if trim(t_op_seae_edi.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ').asstring)='D' then
|
|
|
|
|
begin
|
|
|
|
|
str.Add('<UNDGCode>'+trim(t_op_seae_edi.fieldbyname('Σ<><CEA3>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD>').asstring)+'</UNDGCode>');
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
//<!--<2D><><EFBFBD><EFBFBD>˰<EFBFBD><CBB0><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
|
|
|
|
|
if trim(rs.fieldbyname('HTS<54><53>').asstring)<>'' then
|
|
|
|
|
str.Add('<TariffClassificationCode>'+rs.fieldbyname('HTS<54><53>').asstring+'</TariffClassificationCode>')
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
if trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD>䷽ʽ').asstring)<>'' then
|
|
|
|
|
str.Add('<TariffClassificationCode>'+trim(t_op_seae_edi.fieldbyname('<27><><EFBFBD>䷽ʽ').asstring)+'</TariffClassificationCode>');
|
|
|
|
|
end;
|
|
|
|
|
str.Add('</Commodity>');
|
|
|
|
|
//<!--<2D><>Ʒ<EFBFBD><EFBFBD><EEB2B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
{
|
|
|
|
|
str.Add('<AdditionalInformation>');
|
|
|
|
|
// <!--<2D><>ע<EFBFBD><D7A2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<Content></Content>');
|
|
|
|
|
str.Add('</AdditionalInformation>');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<!--<2D><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ë<EFBFBD>أ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<GoodsMeasure>');
|
|
|
|
|
// <!--<2D><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ë<EFBFBD>أ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<GrossMassMeasure>'+trim(FloatToStr(rs.fieldbyname('<27><><EFBFBD><EFBFBD>').AsFloat))+'</GrossMassMeasure>');
|
|
|
|
|
str.Add('</GoodsMeasure>');
|
|
|
|
|
// <!--<2D><>װ<EFBFBD>䣨<EFBFBD><E4A3A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-9999<39><39>-->
|
|
|
|
|
str.Add('<EquipmentIdentification>');
|
|
|
|
|
// <!--<2D><>װ<EFBFBD>䣨<EFBFBD><E4A3A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<ID>'+trim(rs.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring)+'</ID>');
|
|
|
|
|
str.Add('</EquipmentIdentification>');
|
|
|
|
|
// <!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
{
|
|
|
|
|
str.Add('<CustomsProcedure>');
|
|
|
|
|
// <!--<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<CurrentCode></CurrentCode>');
|
|
|
|
|
str.Add('</CustomsProcedure>');
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
//<!--Ψһ<CEA8><D2BB><EFBFBD>˱<EFBFBD><CBB1>ţ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-99<39><39>-->
|
|
|
|
|
str.Add('<UCR>');
|
|
|
|
|
//<!--Ψһ<CEA8><D2BB><EFBFBD>˱<EFBFBD><CBB1>ţ<EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<ID></ID>');
|
|
|
|
|
str.Add('</UCR>');
|
|
|
|
|
}
|
|
|
|
|
//<!--ԭ<><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
{
|
|
|
|
|
str.Add('<Origin>');
|
|
|
|
|
//<!--ԭ<><D4AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>루ѭ<EBA3A8><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<OriginCountryCode></OriginCountryCode>');
|
|
|
|
|
str.Add('</Origin>');
|
|
|
|
|
}
|
|
|
|
|
str.Add('</ConsignmentItem>');
|
|
|
|
|
k:=k+1;
|
|
|
|
|
rs.Next;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
rs.Close;
|
|
|
|
|
rs.Destroy;
|
|
|
|
|
alist.Free;
|
|
|
|
|
alisttemp.Free;
|
|
|
|
|
except
|
|
|
|
|
on e:exception do
|
|
|
|
|
begin
|
|
|
|
|
rs.Close;
|
|
|
|
|
rs.Destroy;
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
str.Add('</Consignment>');
|
|
|
|
|
|
|
|
|
|
//<!--<2D><>ע<EFBFBD><D7A2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0-1<><31>-->
|
|
|
|
|
{
|
|
|
|
|
str.Add('<AdditionalInformation>');
|
|
|
|
|
//<!--<2D><>ע<EFBFBD><D7A2>ѭ<EFBFBD><D1AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1<EFBFBD><31>-->
|
|
|
|
|
str.Add('<Content></Content>');
|
|
|
|
|
str.Add('</AdditionalInformation>');
|
|
|
|
|
}
|
|
|
|
|
str.Add('</Declaration>');
|
|
|
|
|
str.Add('</Manifest>');
|
|
|
|
|
Result:=str;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_manifest.getwebservice_ds;
|
|
|
|
|
begin
|
|
|
|
|
try
|
|
|
|
|
mHttpRIO_ds:=THTTPRIO.Create(nil);
|
|
|
|
|
mHttpRIO_ds.WSDLLocation:='http://122.4.79.84:8090/webservice/DsWebService.asmx?WSDL';
|
|
|
|
|
mHttpRIO_ds.URL:='http://122.4.79.84:8090/webservice/DsWebService.asmx';
|
|
|
|
|
mHttpRIO_ds.Port:='DsWebServiceSoap';
|
|
|
|
|
mHttpRIO_ds.Service:='DsWebService';
|
|
|
|
|
mHttpRIO_ds.HTTPWebNode.UseUTF8InHeader:=true;
|
|
|
|
|
mServiceSoap_Ds:=mHttpRIO_ds as DsWebServiceSoap;
|
|
|
|
|
InvRegistry.RegisterInvokeOptions(TypeInfo(DsWebServiceSoap),ioDocument );//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
|
|
|
|
|
|
|
|
|
|
{ mHttpRIO_ds:=THTTPRIO.Create(nil);
|
|
|
|
|
mHttpRIO_ds.WSDLLocation:='http://221.3.83.5:8090/webservice/DsWebService.asmx?WSDL';
|
|
|
|
|
mHttpRIO_ds.URL:='http://221.3.83.5:8090/webservice/DsWebService.asmx';
|
|
|
|
|
mHttpRIO_ds.Port:='DsWebServiceSoap';
|
|
|
|
|
mHttpRIO_ds.Service:='DsWebService';
|
|
|
|
|
mHttpRIO_ds.HTTPWebNode.UseUTF8InHeader:=true;
|
|
|
|
|
mServiceSoap_Ds:=mHttpRIO_ds as DsWebServiceSoap;
|
|
|
|
|
InvRegistry.RegisterInvokeOptions(TypeInfo(DsWebServiceSoap),ioDocument );//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
|
|
|
|
|
}
|
|
|
|
|
except
|
|
|
|
|
on E:Exception do
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage(e.Message);
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_manifest.bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
s0,remarks:widestring;
|
|
|
|
|
str_file:widestring;
|
|
|
|
|
str_memo:Tmemo;
|
|
|
|
|
Str:TStrings;
|
|
|
|
|
SenderHandphone,SenderEmail, SenderFax:string;
|
|
|
|
|
ScriptPath:String;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
if bsSkinCheckRadioBox1.Checked and (trim(Memo1.Text)<>'') then
|
|
|
|
|
begin
|
|
|
|
|
remarks:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' +#13#10+trim(Memo1.Text);
|
|
|
|
|
end
|
|
|
|
|
else if trim(Memo1.Text)<>'' then
|
|
|
|
|
begin
|
|
|
|
|
remarks:=trim(Memo1.Text);
|
|
|
|
|
end;
|
|
|
|
|
if bsSkinRadioGroup1.ItemIndex=-1 then
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage('<27><>ѡ<EFBFBD><EFBFBD>');
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
if MessageDlg('ȷʵҪ<CAB5><D2AA><EFBFBD><EFBFBD>Ԥ<EFBFBD><D4A4><EFBFBD>յ<EFBFBD><D5B5><EFBFBD> ['+bsSkinRadioGroup1.Items[bsSkinRadioGroup1.ItemIndex]+'] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',mtWarning,[mbYes,mbNo],0)=mrYes then
|
|
|
|
|
begin
|
|
|
|
|
|
|
|
|
|
if ifmaster then
|
|
|
|
|
CreateCustom(0)
|
|
|
|
|
else CreateCustom_hbl(0);
|
|
|
|
|
{
|
|
|
|
|
str:=Tstringlist.Create;
|
|
|
|
|
try
|
|
|
|
|
Str:=CreateSIEdiFile_xml;
|
|
|
|
|
s0:=Str.Text;
|
|
|
|
|
finally
|
|
|
|
|
FreeAndNil(Str)
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
getwebservice_ds;
|
|
|
|
|
|
|
|
|
|
if frm_data_share.t_sys_employee.locate('<27><><EFBFBD><EFBFBD>',employee,[]) then
|
|
|
|
|
begin
|
|
|
|
|
SenderHandphone:=frm_data_share.t_sys_employee.fieldbyname('<27>ƶ<EFBFBD><C6B6>绰').asstring;
|
|
|
|
|
SenderEmail:=frm_data_share.t_sys_employee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
|
|
SenderFax:=frm_data_share.t_sys_employee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
|
|
|
|
|
end;
|
|
|
|
|
mServiceSoap_Ds.UpdateCustomMainfast(s0,'',trim(get_parameters_value(301,'')),employee,SenderHandphone,SenderEmail,SenderFax,t_op_seae1.dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').asstring);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
str:=Tstringlist.Create;
|
|
|
|
|
try
|
|
|
|
|
Str:=CreateSIEdiFile_mbl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ScriptPath:=ExtractFilePath(ParamStr(0))+'CustomFILE\';
|
|
|
|
|
if not DirectoryExists(ScriptPath) then
|
|
|
|
|
CreateDir(ScriptPath);
|
|
|
|
|
IF ifmaster THEN
|
|
|
|
|
begin
|
|
|
|
|
str_file:=ScriptPath
|
|
|
|
|
+t_op_seae1.dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').asstring+'-'+
|
|
|
|
|
FormatDateTime('yyyy',now)
|
|
|
|
|
+FormatDateTime('mm',now)
|
|
|
|
|
+FormatDateTime('dd',now)
|
|
|
|
|
+FormatDateTime('hh',now)
|
|
|
|
|
+FormatDateTime('nn',now)+'.txt';
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
str_file:=ScriptPath
|
|
|
|
|
+t_op_seae1.dataset.fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').asstring+'-'+
|
|
|
|
|
FormatDateTime('yyyy',now)
|
|
|
|
|
+FormatDateTime('mm',now)
|
|
|
|
|
+FormatDateTime('dd',now)
|
|
|
|
|
+FormatDateTime('hh',now)
|
|
|
|
|
+FormatDateTime('nn',now)+'.txt';
|
|
|
|
|
end;
|
|
|
|
|
Str.SaveToFile(str_file);
|
|
|
|
|
finally
|
|
|
|
|
FreeAndNil(Str)
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
str_memo:=Tmemo.create(application);
|
|
|
|
|
str_memo.visible:=false;
|
|
|
|
|
str_memo.Parent:=frm_op_manifest;
|
|
|
|
|
str_memo.Lines.Add('<27><>˾<EFBFBD><CBBE><EFBFBD><EFBFBD>:'+frm_data_share.t_sys_company.fieldByName('<27><><EFBFBD><EFBFBD>').AsString);
|
|
|
|
|
str_memo.Lines.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+employee);
|
|
|
|
|
str_memo.Lines.Add('<27><><EFBFBD><EFBFBD>:'+frm_data_share.t_load_employee.fieldByName('<27><><EFBFBD><EFBFBD>').AsString);
|
|
|
|
|
str_memo.Lines.Add('<27>绰:'+frm_data_share.t_load_employee.fieldByName('<27>̶<EFBFBD><CCB6>绰').AsString);
|
|
|
|
|
str_memo.Lines.Add('<27><>ע:'+remarks);
|
|
|
|
|
|
|
|
|
|
IF ifmaster THEN
|
|
|
|
|
str_memo.Lines.Add('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>:'+t_op_seae1.DataSet['<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>'])
|
|
|
|
|
else str_memo.Lines.Add('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>:'+t_op_seae1.DataSet['<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>']+' <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5>:'+t_op_seae1.DataSet['<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>']);
|
|
|
|
|
try
|
|
|
|
|
if Trim(str_memo.lines.Text)<>'' then
|
|
|
|
|
begin
|
|
|
|
|
SMTP1.AuthType := satDefault; //(satNone, satDefault, satSASL);
|
|
|
|
|
// SMTP1.AuthenticationType := atLogin;
|
|
|
|
|
|
|
|
|
|
SMTP1.username:='admin@dongshengsoft.com';
|
|
|
|
|
SMTP1.Password :='ds!@#)(*';
|
|
|
|
|
SMTP1.Host :='smtpcom.263xmail.com';
|
|
|
|
|
SMTP1.Port :=25;
|
|
|
|
|
try
|
|
|
|
|
SMTP1.Connect;
|
|
|
|
|
except
|
|
|
|
|
on e : Exception do
|
|
|
|
|
begin
|
|
|
|
|
ShowMessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+E.Message);
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
if not SMTP1.Connected then
|
|
|
|
|
begin
|
|
|
|
|
Sleep(1000);
|
|
|
|
|
SMTP1.Connect;
|
|
|
|
|
end;
|
|
|
|
|
try
|
|
|
|
|
with IdMsg do
|
|
|
|
|
begin
|
|
|
|
|
body.Clear;
|
|
|
|
|
// ContentType:='us-ascii';
|
|
|
|
|
// CharSet:='utf-8';
|
|
|
|
|
Body.Text :=str_memo.lines.Text;
|
|
|
|
|
From.address :='admin@dongshengsoft.com';
|
|
|
|
|
Recipients.EMailAddresses :='dongshengsoft@dongshengsoft.com';
|
|
|
|
|
IF ifmaster THEN
|
|
|
|
|
Subject:='<27><><EFBFBD>뷢<EFBFBD><EBB7A2> <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5>:'+t_op_seae1.DataSet['<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>']+' <20><><EFBFBD><EFBFBD>:'+t_op_seae_edi['<27><><EFBFBD><EFBFBD>']
|
|
|
|
|
ELSE Subject:='<27><><EFBFBD>뷢<EFBFBD><EBB7A2> <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5>:'+t_op_seae1.DataSet['<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>']+' <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5>:'+t_op_seae1.DataSet['<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>']+' <20><><EFBFBD><EFBFBD>:'+t_op_seae_edi['<27><><EFBFBD><EFBFBD>'];
|
|
|
|
|
//showmessage(str_file);
|
|
|
|
|
TIdAttachmentFile.Create(MessageParts,str_file);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//TIdAttachment.Create(MessageParts,str_file);
|
|
|
|
|
end;
|
|
|
|
|
if not SMTP1.Connected then
|
|
|
|
|
begin
|
|
|
|
|
Sleep(1000);
|
|
|
|
|
SMTP1.Connect;
|
|
|
|
|
end;
|
|
|
|
|
SMTP1.Send(IdMsg);
|
|
|
|
|
MessageDlg('<27><><EFBFBD>ͳɹ<CDB3>',mtConfirmation,[mbOK],0)
|
|
|
|
|
finally
|
|
|
|
|
SMTP1.Disconnect;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
except
|
|
|
|
|
MessageDlg('<27><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD><EFBFBD>绰<EFBFBD><E7BBB0><EFBFBD><EFBFBD>ע<EFBFBD><D7A2>:0532-83863830!',mtError,[mbOK],0);
|
|
|
|
|
end;
|
|
|
|
|
str_memo.free;
|
|
|
|
|
frm_op_manifest.ModalResult:=mrOK;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_manifest.bsSkinButton2Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
frm_op_manifest.ModalResult:=mrCancel;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_manifest.Button1Click(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
Str:TStrings;
|
|
|
|
|
begin
|
|
|
|
|
str:=Tstringlist.Create;
|
|
|
|
|
try
|
|
|
|
|
Str:=CreateSIEdiFile_mbl;
|
|
|
|
|
if SaveDialog1.Execute then
|
|
|
|
|
begin
|
|
|
|
|
str.SaveToFile(SaveDialog1.FileName+'.txt');
|
|
|
|
|
showmessage('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>ɳɹ<C9B3><C9B9><EFBFBD>');
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
begin
|
|
|
|
|
showmessage('<27>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>');
|
|
|
|
|
exit;
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
FreeAndNil(Str)
|
|
|
|
|
end;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end.
|