📄 frm_allexportbillinfo.~pas
字号:
{zcdjnumber}
thdm.InsStr(sqlstr,Ztrustfile.zcdjnumber,',');
{zckjkm}
thdm.InsStr(sqlstr,Ztrustfile.zckjkm,',');
{cuscode}
if Ztrustfile.cuscode='' then
thdm.InsStr(sqlstr,'null',',')
else
thdm.InsStr(sqlstr,Ztrustfile.cuscode,',');
{发货人名称}
thdm.InsStr(sqlstr,Ztrustfile.cuscodename,',');
{收货人}
thdm.InsStr(sqlstr,Ztrustfile.consigncode,',');
{收货人名称}
thdm.InsStr(sqlstr,Ztrustfile.consignname,',');
{代理商}
thdm.InsStr(sqlstr,Ztrustfile.agentcode,',');
{Shipper}
thdm.InsStr(sqlstr,Ztrustfile.shipper,',');
{Consignee}
thdm.InsStr(sqlstr,Ztrustfile.consignee,',');
{Agent 通知方}
thdm.InsStr(sqlstr,Ztrustfile.inform,',');
{cuscompany运费对象}
thdm.InsStr(sqlstr,'',',');
{Reciplace 收货地}
thdm.InsStr(sqlstr,Ztrustfile.receport,',');
{AirPort 装货港}
thdm.InsStr(sqlstr,Ztrustfile.loadport,',');
{AirPortTo 卸货港}
thdm.InsStr(sqlstr,Ztrustfile.unloadport,',');
{destination 目的地}
thdm.InsStr(sqlstr,Ztrustfile.dest,',');
{Carrier 航空公司}
thdm.InsStr(sqlstr,Ztrustfile.shipcomcode,',');
{一乘航班,经停,出运日期}
thdm.InsStr(sqlstr,Ztrustfile.ycvoyage,',');
thdm.InsStr(sqlstr,Ztrustfile.ycport,',');
thdm.InsStr(sqlstr,Ztrustfile.ycvoyagedate,',');
thdm.InsStr(sqlstr,Ztrustfile.ycvoyagedate,',');
thdm.InsStr(sqlstr,Ztrustfile.ycvoyagedate,',');
{二乘航班,经停,出运日期}
thdm.InsStr(sqlstr,Ztrustfile.ecvoyage,',');
thdm.InsStr(sqlstr,Ztrustfile.ecport,',');
thdm.InsStr(sqlstr,Ztrustfile.ecvoyagedate,',');
{三乘航班,经停,出运日期}
thdm.InsStr(sqlstr,Ztrustfile.scvoyage,',');
thdm.InsStr(sqlstr,Ztrustfile.scport,',');
thdm.InsStr(sqlstr,Ztrustfile.scvoyagedate,',');
{Accinfo 麦头}
thdm.InsStr(sqlstr,Ztrustfile.maitou,',');
{Handing}
thdm.InsStr(sqlstr,Ztrustfile.hi,',');
{Curr}
thdm.InsStr(sqlstr,Ztrustfile.currency,',');
{CHGS}
thdm.InsStr(sqlstr,Ztrustfile.chgs,',');
{PPD}
thdm.InsStr(sqlstr,Ztrustfile.ppd,',');
{COLL}
thdm.InsStr(sqlstr,Ztrustfile.coll,',');
{OPPD}
thdm.InsStr(sqlstr,Ztrustfile.oppd,',');
{OCOLL}
thdm.InsStr(sqlstr,Ztrustfile.ocoll,',');
{DCV}
thdm.InsStr(sqlstr,Ztrustfile.dvc,',');
{DVCus}
thdm.InsStr(sqlstr,Ztrustfile.odvc,',');
{AccInfo}
thdm.InsStr(sqlstr,Ztrustfile.ai,',');
{A.i.c.}
thdm.InsStr(sqlstr,Ztrustfile.aic,',');
{签定日期}
thdm.InsStr(sqlstr,Ztrustfile.billdate,',');
thdm.InsStr(sqlstr,Ztrustfile.billdate,',');
{签定地点}
thdm.InsStr(sqlstr,Ztrustfile.billplace,',');
{业务员}
thdm.InsStr(sqlstr,Ztrustfile.bussiness,',');
{Befinish 是否完成标记}
thdm.InsStr(sqlstr,Ztrustfile.finish,',');
thdm.InsStr(sqlstr,Ztrustfile.keydown,',');
thdm.InsStr(sqlstr,Ztrustfile.discard,',');
thdm.InsStr(sqlstr,Ztrustfile.zhidan,',');
{进出口标记 出口为1}
thdm.InsStr(sqlstr,1,',');
{操作人}
thdm.InsStr(sqlstr,Ztrustfile.ModiOper,',');
thdm.InsStr(sqlstr,Ztrustfile.FileCode,',');
{操作人}
thdm.InsStr(sqlstr,Ztrustfile.opercode,'');
if thdm.execsql(sqlstr) then
else
begin
thdm.THMsgother('分单数据导入插入时出错,记录导入失败,请检查!',mtinformation);
exit;
end;
{保存完毕以后,置于编辑状态}
{保存货物记录}
if ztrustfile.GoodsNumber>0 then
begin
for i:=1 to ztrustfile.goodsnumber do
begin
context:=fileread(myfilehandle,goodsfile,sizeof(goodsfile));
codeget:=THDM.GetCode('B') ;
{件数 单位 体积 等级 公式 }
{计费重量 单价 费用 货物描述 编号 编号 C.M.I 一个 }
SqlStr:='Insert into PlaneGoods(GoodsCode,FileCode,Pieces,weight,'+
'kgid,Size,rateclass,Formula,chargweight,rate,'+
'total,SpeGoods,SpeRemark,goods) Values(';
THDM.InsStr(SqlStr,codeget,',');
THDM.InsStr(SqlStr,Varhawb,',');
THDM.InsStr(SqlStr,goodsfile.GoodsNumber ,',');
THDM.InsStr(SqlStr,goodsfile.goodsweight,',');
THDM.InsStr(SqlStr,goodsfile.goodsunit,',');
THDM.InsStr(SqlStr,goodsfile.goodssize,',');
THDM.InsStr(SqlStr,goodsfile.goodsgrade,',');
THDM.InsStr(SqlStr,goodsfile.formul,',');
THDM.InsStr(SqlStr,goodsfile.chargeweight,',');
THDM.InsStr(SqlStr,goodsfile.unitprice,',');
THDM.InsStr(SqlStr,goodsfile.total,',');
THDM.InsStr(SqlStr,'',',');
THDM.InsStr(SqlStr,'',',');
THDM.InsStr(SqlStr,goodsfile.goodsdesc,'');
if thdm.ExecSQL(sqlstr) then
else
begin
thdm.THMsgother('分单货物数据数据导入插入时出错,记录导入失败,请检查!',mtinformation);
exit;
end;
end;
end;
{进舱派车通知}
if ztrustfile.JCPCNumber>0 then
begin
context:=fileread(myfilehandle,jcpcfile,sizeof(jcpcfile));
CodeGet:=thdm.GetCode('Q');
SqlStr:='insert into landtrans(transcode,trustcode,goodshw,'+
'carname,carrela,thdate,stationcode,'+
'stationaddr,stationrelation,stationtele,jcno,jcdate,'+
'jctime,ccdate,cctime,goodsplace,'+
'goodsrelationstyle,goodsrelation,dodate,jcpc,benative,remark) values(';
thdm.InsStr(sqlstr,CodeGet,',');
thdm.InsStr(sqlstr,varhawb,',');
thdm.InsStr(sqlstr,jcpcfile.goodshw,',');
thdm.InsStr(sqlstr,jcpcfile.carname,',');
thdm.InsStr(sqlstr,jcpcfile.carrela,',');
thdm.InsStr(sqlstr,jcpcfile.thdate,',');
thdm.InsStr(sqlstr,jcpcfile.station,',');
thdm.InsStr(sqlstr,jcpcfile.stationaddr,',');
thdm.InsStr(sqlstr,jcpcfile.stationrela,',');
thdm.InsStr(sqlstr,jcpcfile.stationstyle,',');
thdm.InsStr(sqlstr,jcpcfile.jcno,',');
thdm.InsStr(sqlstr,jcpcfile.jcdate,',');
thdm.InsStr(sqlstr,jcpcfile.jctime,',');
thdm.InsStr(sqlstr,jcpcfile.ccdate,',');
thdm.InsStr(sqlstr,jcpcfile.cctime,',');
thdm.InsStr(sqlstr,jcpcfile.goodsplace,',');
thdm.InsStr(sqlstr,jcpcfile.goodsrelastyle,',');
thdm.InsStr(sqlstr,jcpcfile.goodsrela,',');
thdm.InsStr(sqlstr,jcpcfile.recorddate,',');
thdm.InsStr(sqlstr,jcpcfile.ifpc,',');
thdm.InsStr(sqlstr,jcpcfile.ifnative,',');
thdm.InsStr(sqlstr,jcpcfile.remark,'');
if thdm.ExecSQL(sqlstr) then
else
begin
thdm.THMsgother('分单进舱派车数据导入插入时出错,记录导入失败,请检查!',mtinformation);
exit;
end;
end;
{报关文件}
if ztrustfile.bgnumber>0 then
begin
for i:=1 to ztrustfile.bgnumber do
begin
context:=fileread(myfilehandle,bgfile,sizeof(bgfile));
codeget:=thdm.GetCode('K');
sqlstr:='insert into truckfile(kcode,trustcode,fileno,mawb,cuscode,'+
'ciqname,filename,filenameno,recedate,returndate,ciqrecedate,ciqreturndate,'+
'occurtime,PlaneOcean,operator,remark) values(';
thdm.InsStr(sqlstr,codeget,',');
thdm.InsStr(sqlstr,varhawb,',');
thdm.InsStr(sqlstr,bgfile.fileno,',');
thdm.InsStr(sqlstr,bgfile.mawb,',');
thdm.InsStr(sqlstr,bgfile.jyname,',');
thdm.InsStr(sqlstr,bgfile.bghname,',');
thdm.InsStr(sqlstr,bgfile.filename,',');
thdm.InsStr(sqlstr,bgfile.filenameno,',');
thdm.InsStr(sqlstr,bgfile.cusrecedate,',');
thdm.InsStr(sqlstr,bgfile.cusretudate,',');
thdm.InsStr(sqlstr,bgfile.ciqrecedate,',');
thdm.InsStr(sqlstr,bgfile.ciqretudate,',');
thdm.InsStr(sqlstr,bgfile.recorddate,',');
thdm.InsStr(sqlstr,1,',');
thdm.InsStr(sqlstr,bgfile.opercode,',');
thdm.InsStr(sqlstr,bgfile.remark,'');
if THDM.ExecSQL(SqlStr) then
else
begin
thdm.THMsgother('分单报关文件数据导入插入时出错,记录导入失败,请检查!',mtinformation);
exit;
end;
end;
end;
{费用记录}
if ztrustfile.farenumber>0 then
begin
for i:=1 to ztrustfile.farenumber do
begin
context:=fileread(myfilehandle,farefile,sizeof(farefile));
codeget:=thdm.GetCode('F');
SqlStr:='insert into FareInfo(Fareno,Filecode,cuscode,cuscodename,'+
'Farecode,Farepaytodate,Billno,invoiceno,bxno,operator,Acount,FareType,'+
'Writedate,currencytype,currencyrate,recedeal,'+
'goodscode,unitprice,opercwmark,Remark) values (';
thdm.InsStr(sqlstr,codeget,',');
thdm.InsStr(sqlstr,varhawb,',');
thdm.InsStr(sqlstr,farefile.cuscode,',');
thdm.InsStr(sqlstr,farefile.cuscodename,',');
thdm.InsStr(sqlstr,farefile.farename,',');
thdm.InsStr(sqlstr,farefile.paytodate,',');
thdm.InsStr(sqlstr,farefile.billno,',');
thdm.InsStr(sqlstr,farefile.invoiceno,',');
thdm.InsStr(sqlstr,'',',');
thdm.InsStr(sqlstr,farefile.opercode,',');
thdm.InsStr(sqlstr,farefile.fareacount,',');
thdm.InsStr(sqlstr,farefile.faretype,',');
thdm.InsStr(sqlstr,farefile.recorddate,',');
thdm.InsStr(sqlstr,farefile.currencytype,',');
thdm.InsStr(sqlstr,farefile.rate,',');
thdm.InsStr(sqlstr,farefile.recedeal,',');
thdm.InsStr(sqlstr,farefile.farefl,',');
thdm.InsStr(sqlstr,farefile.unitprice,',');
thdm.InsStr(sqlstr,farefile.opercwmark,',');
thdm.InsStr(sqlstr,'','');
if THDM.ExecSQL(SqlStr) then
else
begin
thdm.THMsgother('分单费用数据导入插入时出错,记录导入失败,请检查!',mtinformation);
exit;
end;
end;
end;
end;
thdm.THMsgother('导入文件成功,请检查!',mtwarning);
Fileclose(myfilehandle);
except
Fileclose(myfilehandle);
thdm.THMsgother('导入文件失败,请检查!',mtwarning);
end;
end;
function TFrmAllExportBillInfo.UpdateRecord(FileName, VarCode: String): Boolean;
var
ZTrustFile:TZtrustFile;
GoodsFile:TGoods;
JCPCFile:Tjcpc;
BGFile:TBG;
FareFile:TFare;
MyFileHandle:Integer;
context:integer;
SqlStr:String;
CodeGet:String;
ValueArray:Array[0..20] of string;
ArrayCount:integer;
I,j:Integer;
HawbNumber:Integer;
VarMain:String;
VarHawb:String;
RelaCode:String;
begin
inherited;
try
MyFilehandle:=FileOpen(Filename,fmOpenRead);
if myfilehandle>0 then
else
begin
thdm.thmsgother('创建文件失败,请检查!',mtinformation);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -