📄 frm_allimportbillinfo.~pas
字号:
FrmMain.InsStr(sqlstr,farefile.farename,',');
FrmMain.InsStr(sqlstr,farefile.paytodate,',');
FrmMain.InsStr(sqlstr,farefile.billno,',');
FrmMain.InsStr(sqlstr,farefile.invoiceno,',');
FrmMain.InsStr(sqlstr,'',',');
FrmMain.InsStr(sqlstr,farefile.opercode,',');
FrmMain.InsStr(sqlstr,farefile.fareacount,',');
FrmMain.InsStr(sqlstr,farefile.faretype,',');
FrmMain.InsStr(sqlstr,farefile.recorddate,',');
FrmMain.InsStr(sqlstr,farefile.currencytype,',');
FrmMain.InsStr(sqlstr,farefile.rate,',');
FrmMain.InsStr(sqlstr,farefile.recedeal,',');
FrmMain.InsStr(sqlstr,farefile.farefl,',');
FrmMain.InsStr(sqlstr,farefile.unitprice,',');
FrmMain.InsStr(sqlstr,farefile.opercwmark,',');
FrmMain.InsStr(sqlstr,'','');
if FrmMain.ExecSQL(SqlStr) then
else
begin
ShowMessage('主单费用数据导入插入时出错,记录导入失败,请检查!');
exit;
end;
end;
end;
{分单的一系列文件的导入}
SqlStr:='delete from Fareinfo where filecode in '+
' (select filecode from filetable where Maincode='''+Varmain+''')';
FrmMain.ExecSQL(sqlstr);
SqlStr:='delete from planegoods where filecode in '+
' (select filecode from filetable where Maincode='''+Varmain+''')';
FrmMain.ExecSQL(sqlstr);
SqlStr:='delete from truckfile where trustcode in '+
' (select filecode from filetable where Maincode='''+Varmain+''')';
FrmMain.ExecSQL(sqlstr);
SqlStr:='delete from landtrans where trustcode in '+
' (select filecode from filetable where Maincode='''+Varmain+''')';
FrmMain.ExecSQL(sqlstr);
SqlStr:='delete from filetable where maincode='''+Varmain+'''';
FrmMain.ExecSQL(sqlstr);
hawbnumber:=ztrustfile.HawbNumber;
for j:=1 to hawbnumber do
begin
context:=fileread(myfilehandle,ztrustfile,sizeof(ztrustfile));
sqlstr:='insert into FileTable(FileCode,MainCode,hawb,'+
'Fileno,Trusttype,trustsource,quotecode,djnumber,kjkm,zcdjnumber,zckjkm,'+
'Cuscode,CusCodeName,shouhuoren,consignname,AgentCode,Shipper,'+
'Consignee,Agent,'+
'CuscomPany,Reciplace,'+
'AirPort,AirPortTo,Destination,'+
'Carrier,BY1,TO1,Fdate,DFdate,Fdate1,'+
'BY2,TO2,Fdate2,By3,TO3,Fdate3,'+
'Accinfo,Handling,Curr,CHGS,'+
'PPD,COLL,OPPD,OCOLL,DVC,DVCus,'+
'AccInsurance,aic,'+
'Execdate,Dexecdate,Execplace,bussiness,'+
'befinish,keydown,Ifdiscard,ifzhidan,'+
'inout,ModiOper,operate) values(';
{FileCode}
VarHawb:=FrmMain.GetCode('H');
FrmMain.InsStr(SqlStr,varhawb,',');
{Maincode}
FrmMain.InsStr(sqlstr,varmain,',');
{hawb}
FrmMain.InsStr(sqlstr,Ztrustfile.hawb,',');
{FileNo}
FrmMain.InsStr(sqlstr,Ztrustfile.fileno,',');
{trusttype}
FrmMain.InsStr(sqlstr,Ztrustfile.trusttype,',');
{trustsource}
FrmMain.InsStr(sqlstr,Ztrustfile.trustsource,',');
{quotecode}
if Ztrustfile.jjcode='' then
FrmMain.InsStr(sqlstr,'null',',')
else
FrmMain.InsStr(sqlstr,Ztrustfile.jjcode,',');
{djnumber}
FrmMain.InsStr(sqlstr,Ztrustfile.djnumber,',');
{kjkm}
FrmMain.InsStr(sqlstr,Ztrustfile.kjkm,',');
{zcdjnumber}
FrmMain.InsStr(sqlstr,Ztrustfile.zcdjnumber,',');
{zckjkm}
FrmMain.InsStr(sqlstr,Ztrustfile.zckjkm,',');
{cuscode}
if Ztrustfile.cuscode='' then
FrmMain.InsStr(sqlstr,'null',',')
else
FrmMain.InsStr(sqlstr,Ztrustfile.cuscode,',');
{发货人名称}
FrmMain.InsStr(sqlstr,Ztrustfile.cuscodename,',');
{收货人}
FrmMain.InsStr(sqlstr,Ztrustfile.consigncode,',');
{收货人名称}
FrmMain.InsStr(sqlstr,Ztrustfile.consignname,',');
{代理商}
FrmMain.InsStr(sqlstr,Ztrustfile.agentcode,',');
{Shipper}
FrmMain.InsStr(sqlstr,Ztrustfile.shipper,',');
{Consignee}
FrmMain.InsStr(sqlstr,Ztrustfile.consignee,',');
{Agent 通知方}
FrmMain.InsStr(sqlstr,Ztrustfile.inform,',');
{cuscompany运费对象}
FrmMain.InsStr(sqlstr,'',',');
{Reciplace 收货地}
FrmMain.InsStr(sqlstr,Ztrustfile.receport,',');
{AirPort 装货港}
FrmMain.InsStr(sqlstr,Ztrustfile.loadport,',');
{AirPortTo 卸货港}
FrmMain.InsStr(sqlstr,Ztrustfile.unloadport,',');
{destination 目的地}
FrmMain.InsStr(sqlstr,Ztrustfile.dest,',');
{Carrier 航空公司}
FrmMain.InsStr(sqlstr,Ztrustfile.shipcomcode,',');
{一乘航班,经停,出运日期}
FrmMain.InsStr(sqlstr,Ztrustfile.ycvoyage,',');
FrmMain.InsStr(sqlstr,Ztrustfile.ycport,',');
FrmMain.InsStr(sqlstr,Ztrustfile.ycvoyagedate,',');
FrmMain.InsStr(sqlstr,Ztrustfile.ycvoyagedate,',');
FrmMain.InsStr(sqlstr,Ztrustfile.ycvoyagedate,',');
{二乘航班,经停,出运日期}
FrmMain.InsStr(sqlstr,Ztrustfile.ecvoyage,',');
FrmMain.InsStr(sqlstr,Ztrustfile.ecport,',');
FrmMain.InsStr(sqlstr,Ztrustfile.ecvoyagedate,',');
{三乘航班,经停,出运日期}
FrmMain.InsStr(sqlstr,Ztrustfile.scvoyage,',');
FrmMain.InsStr(sqlstr,Ztrustfile.scport,',');
FrmMain.InsStr(sqlstr,Ztrustfile.scvoyagedate,',');
{Accinfo 麦头}
FrmMain.InsStr(sqlstr,Ztrustfile.maitou,',');
{Handing}
FrmMain.InsStr(sqlstr,Ztrustfile.hi,',');
{Curr}
FrmMain.InsStr(sqlstr,Ztrustfile.currency,',');
{CHGS}
FrmMain.InsStr(sqlstr,Ztrustfile.chgs,',');
{PPD}
FrmMain.InsStr(sqlstr,Ztrustfile.ppd,',');
{COLL}
FrmMain.InsStr(sqlstr,Ztrustfile.coll,',');
{OPPD}
FrmMain.InsStr(sqlstr,Ztrustfile.oppd,',');
{OCOLL}
FrmMain.InsStr(sqlstr,Ztrustfile.ocoll,',');
{DCV}
FrmMain.InsStr(sqlstr,Ztrustfile.dvc,',');
{DVCus}
FrmMain.InsStr(sqlstr,Ztrustfile.odvc,',');
{AccInfo}
FrmMain.InsStr(sqlstr,Ztrustfile.ai,',');
{A.i.c.}
FrmMain.InsStr(sqlstr,Ztrustfile.aic,',');
{签定日期}
FrmMain.InsStr(sqlstr,Ztrustfile.billdate,',');
FrmMain.InsStr(sqlstr,Ztrustfile.billdate,',');
{签定地点}
FrmMain.InsStr(sqlstr,Ztrustfile.billplace,',');
{业务员}
FrmMain.InsStr(sqlstr,Ztrustfile.bussiness,',');
{Befinish 是否完成标记}
FrmMain.InsStr(sqlstr,Ztrustfile.finish,',');
FrmMain.InsStr(sqlstr,Ztrustfile.keydown,',');
FrmMain.InsStr(sqlstr,Ztrustfile.discard,',');
FrmMain.InsStr(sqlstr,Ztrustfile.zhidan,',');
{进出口标记 出口为1}
FrmMain.InsStr(sqlstr,0,',');
{业务员}
FrmMain.InsStr(sqlstr,Ztrustfile.ModiOper,',');
{操作人}
FrmMain.InsStr(sqlstr,Ztrustfile.opercode,'');
if FrmMain.execsql(sqlstr) then
else
begin
ShowMessage('分单数据导入插入时出错,记录导入失败,请检查!');
exit;
end;
{保存完毕以后,置于编辑状态}
{保存货物记录}
if ztrustfile.GoodsNumber>0 then
begin
for i:=1 to ztrustfile.goodsnumber do
begin
context:=fileread(myfilehandle,goodsfile,sizeof(goodsfile));
codeget:=FrmMain.GetCode('B') ;
{件数 单位 体积 等级 公式 }
{计费重量 单价 费用 货物描述 编号 编号 C.M.I 一个 }
SqlStr:='Insert into PlaneGoods(GoodsCode,FileCode,Pieces,weight,'+
'kgid,Size,rateclass,Formula,chargweight,rate,'+
'total,SpeGoods,SpeRemark,goods) Values(';
FrmMain.InsStr(SqlStr,codeget,',');
FrmMain.InsStr(SqlStr,Varhawb,',');
FrmMain.InsStr(SqlStr,goodsfile.GoodsNumber ,',');
FrmMain.InsStr(SqlStr,goodsfile.goodsweight,',');
FrmMain.InsStr(SqlStr,goodsfile.goodsunit,',');
FrmMain.InsStr(SqlStr,goodsfile.goodssize,',');
FrmMain.InsStr(SqlStr,goodsfile.goodsgrade,',');
FrmMain.InsStr(SqlStr,goodsfile.formul,',');
FrmMain.InsStr(SqlStr,goodsfile.chargeweight,',');
FrmMain.InsStr(SqlStr,goodsfile.unitprice,',');
FrmMain.InsStr(SqlStr,goodsfile.total,',');
FrmMain.InsStr(SqlStr,'',',');
FrmMain.InsStr(SqlStr,'',',');
FrmMain.InsStr(SqlStr,goodsfile.goodsdesc,'');
if FrmMain.ExecSQL(sqlstr) then
else
begin
ShowMessage('分单货物数据数据导入插入时出错,记录导入失败,请检查!');
exit;
end;
end;
end;
{进舱派车通知}
if ztrustfile.JCPCNumber>0 then
begin
context:=fileread(myfilehandle,jcpcfile,sizeof(jcpcfile));
CodeGet:=FrmMain.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(';
FrmMain.InsStr(sqlstr,CodeGet,',');
FrmMain.InsStr(sqlstr,varhawb,',');
FrmMain.InsStr(sqlstr,jcpcfile.goodshw,',');
FrmMain.InsStr(sqlstr,jcpcfile.carname,',');
FrmMain.InsStr(sqlstr,jcpcfile.carrela,',');
FrmMain.InsStr(sqlstr,jcpcfile.thdate,',');
FrmMain.InsStr(sqlstr,jcpcfile.station,',');
FrmMain.InsStr(sqlstr,jcpcfile.stationaddr,',');
FrmMain.InsStr(sqlstr,jcpcfile.stationrela,',');
FrmMain.InsStr(sqlstr,jcpcfile.stationstyle,',');
FrmMain.InsStr(sqlstr,jcpcfile.jcno,',');
FrmMain.InsStr(sqlstr,jcpcfile.jcdate,',');
FrmMain.InsStr(sqlstr,jcpcfile.jctime,',');
FrmMain.InsStr(sqlstr,jcpcfile.ccdate,',');
FrmMain.InsStr(sqlstr,jcpcfile.cctime,',');
FrmMain.InsStr(sqlstr,jcpcfile.goodsplace,',');
FrmMain.InsStr(sqlstr,jcpcfile.goodsrelastyle,',');
FrmMain.InsStr(sqlstr,jcpcfile.goodsrela,',');
FrmMain.InsStr(sqlstr,jcpcfile.recorddate,',');
FrmMain.InsStr(sqlstr,jcpcfile.ifpc,',');
FrmMain.InsStr(sqlstr,jcpcfile.ifnative,',');
FrmMain.InsStr(sqlstr,jcpcfile.remark,'');
if FrmMain.ExecSQL(sqlstr) then
else
begin
ShowMessage('分单进舱派车数据导入插入时出错,记录导入失败,请检查!');
exit;
end;
end;
{报关文件}
if ztrustfile.bgnumber>0 then
begin
for i:=1 to ztrustfile.bgnumber do
begin
context:=fileread(myfilehandle,bgfile,sizeof(bgfile));
codeget:=FrmMain.GetCode('K');
sqlstr:='insert into truckfile(kcode,trustcode,fileno,mawb,cuscode,'+
'ciqname,filename,filenameno,recedate,returndate,ciqrecedate,ciqreturndate,'+
'occurtime,PlaneOcean,operator,remark) values(';
FrmMain.InsStr(sqlstr,codeget,',');
FrmMain.InsStr(sqlstr,varhawb,',');
FrmMain.InsStr(sqlstr,bgfile.fileno,',');
FrmMain.InsStr(sqlstr,bgfile.mawb,',');
FrmMain.InsStr(sqlstr,bgfile.jyname,',');
FrmMain.InsStr(sqlstr,bgfile.bghname,',');
FrmMain.InsStr(sqlstr,bgfile.filename,',');
FrmMain.InsStr(sqlstr,bgfile.filenameno,',');
FrmMain.InsStr(sqlstr,bgfile.cusrecedate,',');
FrmMain.InsStr(sqlstr,bgfile.cusretudate,',');
FrmMain.InsStr(sqlstr,bgfile.ciqrecedate,',');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -