|
|
unit u_op_seae_qiandan_add;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, dxExEdtr, XPMenu, Menus, dxDBTLCl, dxGrClms, dxDBCtrl, dxDBGrid,
|
|
|
dxTL, dxCntner, DB, ADODB, Mask, wwdbedit, Wwdotdot, Wwdbcomb, wwdblook,
|
|
|
RxLookup, wwdbdatetimepicker, StdCtrls, bsSkinCtrls, ExtCtrls, ComCtrls,
|
|
|
bsSkinTabs, DBCtrls, kbmMemTable,IdHTTP;
|
|
|
|
|
|
type
|
|
|
Tfrm_op_seae_qiandan_add = class(TForm)
|
|
|
Panel2: TPanel;
|
|
|
Panel3: TPanel;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
Label1: TLabel;
|
|
|
Label10: TLabel;
|
|
|
Label5: TLabel;
|
|
|
Label9: TLabel;
|
|
|
Label30: TLabel;
|
|
|
Label125: TLabel;
|
|
|
Label16: TLabel;
|
|
|
Edit2: TEdit;
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
RxDBLookupCombo2: TRxDBLookupCombo;
|
|
|
Edit7: TEdit;
|
|
|
wwDBLookupCombo49: TwwDBLookupCombo;
|
|
|
RxDBLookupCombo6: TRxDBLookupCombo;
|
|
|
t_op_seae: TADOQuery;
|
|
|
t_op_seae1: TDataSource;
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
XPMenu1: TXPMenu;
|
|
|
PopupMenu3: TPopupMenu;
|
|
|
MenuItem2: TMenuItem;
|
|
|
kbmcl: TkbmMemTable;
|
|
|
kbmclField: TStringField;
|
|
|
kbmclField2: TStringField;
|
|
|
kbmclField3: TStringField;
|
|
|
kbmclField4: TStringField;
|
|
|
kbmclField5: TIntegerField;
|
|
|
kbmclField6: TIntegerField;
|
|
|
kbmclField7: TIntegerField;
|
|
|
kbmclField8: TStringField;
|
|
|
kbmclField9: TStringField;
|
|
|
kbmclField10: TStringField;
|
|
|
kbmclField11: TStringField;
|
|
|
dxDBGrid1Column1: TdxDBGridColumn;
|
|
|
dxDBGrid1Column2: TdxDBGridColumn;
|
|
|
dxDBGrid1Column3: TdxDBGridColumn;
|
|
|
dxDBGrid1Column4: TdxDBGridColumn;
|
|
|
dxDBGrid1Column5: TdxDBGridColumn;
|
|
|
dxDBGrid1Column6: TdxDBGridColumn;
|
|
|
dxDBGrid1Column7: TdxDBGridColumn;
|
|
|
dxDBGrid1Column8: TdxDBGridColumn;
|
|
|
dxDBGrid1Column9: TdxDBGridColumn;
|
|
|
dxDBGrid1Column10: TdxDBGridColumn;
|
|
|
dxDBGrid1Column11: TdxDBGridColumn;
|
|
|
t_op_seae_ctn: TADOQuery;
|
|
|
dxDBGrid1Column12: TdxDBGridColumn;
|
|
|
kbmclStringField: TStringField;
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
procedure bsSkinButton6Click(Sender: TObject);
|
|
|
procedure MenuItem2Click(Sender: TObject);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
ctn_sum,ctn_1,ctn_2:integer;
|
|
|
ydzt,fxzt:string;
|
|
|
procedure getczwebmsg_1(mblno:string);
|
|
|
procedure analyzeListData_1(mblno:string;aList:TStringlist);
|
|
|
procedure analyzeData_1(mblno,s:string);
|
|
|
procedure getwebmsg_1(bsno,mblno,fmblno:string);
|
|
|
procedure getwebmsg_new_1(bsno,mblno,fmblno:string);
|
|
|
procedure getqqctuydfx_1(bsno,mblno,fmblno:string);//qqctu<74><75>ȡ<EFBFBD>˵ֱ<CBB5><D6B1><EFBFBD><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_op_seae_qiandan_add: Tfrm_op_seae_qiandan_add;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses my_sys_function, u_main, my_sys_chat,u_sys_progress;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.getwebmsg_1(bsno,mblno,fmblno:string);
|
|
|
var
|
|
|
aQuery,aQuery2:TAdoQuery;
|
|
|
sl,slcz:tstringlist;
|
|
|
IdHTTP1:TidHTTP;
|
|
|
i,j,k,m:integer;
|
|
|
istrue,QQCT,inmsg:boolean;
|
|
|
sldata:Array [1..10] of string[50];
|
|
|
begin
|
|
|
sl:=tstringlist.Create;
|
|
|
slcz:=tstringlist.Create;
|
|
|
aQuery:=createAdoQuery;
|
|
|
aQuery2:=createAdoQuery;
|
|
|
IdHTTP1 := TidHTTP.Create(nil);
|
|
|
|
|
|
IdHTTP1.HandleRedirects:=true;
|
|
|
QQCT:=false;
|
|
|
istrue:=false;
|
|
|
try
|
|
|
inmsg:=false;
|
|
|
sl.text:=idhttp1.get('http://www.qingdaoport.net/ywzx/qqct/dpcx/ydbg.jsp?tdh='+mblno);
|
|
|
j:=0;
|
|
|
for i:=0 to sl.Count-1 do
|
|
|
begin
|
|
|
if pos('<td height="18" colspan="12" align="left"> <b><3E><><EFBFBD><EFBFBD><EFBFBD>˵ֱ<CBB5><D6B1><EFBFBD><EFBFBD><EFBFBD>Ϣ</b></td>',sl[i])>0 then
|
|
|
j:=i;
|
|
|
if pos('<tr bgcolor="#EFF2FF">',sl[i])>0 then
|
|
|
begin
|
|
|
{
|
|
|
aQuery.close;
|
|
|
aQuery.SQL.Text:='select * from t_op_msg where <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD>˵ֱ<CBB5><D6B1><EFBFBD><EFBFBD><EFBFBD>Ϣ'' and <20><><EFBFBD><EFBFBD>='''+bsno+'''';
|
|
|
aQuery.open;
|
|
|
if aQuery.IsEmpty then inmsg:=true;
|
|
|
aQuery2.close;
|
|
|
aQuery2.SQL.Text:='select * from t_op_msg_ydbg where <20><><EFBFBD><EFBFBD>='''+bsno+'''';
|
|
|
aQuery2.open;
|
|
|
}
|
|
|
end;
|
|
|
if pos('<td height="23" align="center">',sl[i])>0 then
|
|
|
begin
|
|
|
istrue:=true;
|
|
|
j:=i;
|
|
|
end;
|
|
|
if pos('</table>',sl[i])>0 then
|
|
|
begin
|
|
|
istrue:=false;
|
|
|
end;
|
|
|
if istrue and (i=j) then
|
|
|
begin
|
|
|
sldata[1]:=twsou('<td height="23" align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+1) then begin
|
|
|
sldata[2]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+2) then begin
|
|
|
sldata[3]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+3) then begin
|
|
|
sldata[4]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+4) then begin
|
|
|
sldata[5]:=copy(sl[i],length(sl[i])-19,11);
|
|
|
end;
|
|
|
if istrue and (i=j+5) then begin
|
|
|
sldata[6]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+6) then begin
|
|
|
sldata[7]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+7) then begin
|
|
|
sldata[8]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+8) then begin
|
|
|
sldata[9]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+9) then
|
|
|
begin
|
|
|
QQCT:=true;
|
|
|
if inmsg then
|
|
|
begin
|
|
|
{
|
|
|
aQuery.close;
|
|
|
aQuery.SQL.Text:='insert into t_op_msg (<28><><EFBFBD><EFBFBD>,ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>) '
|
|
|
+'Values ('''+bsno+''',''<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'',''<27><><EFBFBD><EFBFBD><EFBFBD>˵ֱ<CBB5><D6B1><EFBFBD><EFBFBD><EFBFBD>Ϣ'','''+FormatDateTime('YYYY-MM-DD hh:mm:ss',now)+''')';
|
|
|
aQuery.ExecSQL;
|
|
|
}
|
|
|
inmsg:=false;
|
|
|
end;
|
|
|
|
|
|
sldata[10]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
|
|
|
if trim(sldata[5])<>'' then ydzt:='<27><>';
|
|
|
|
|
|
{ if not aQuery2.Locate('<27><><EFBFBD><EFBFBD>',trim(sldata[5]),[]) then
|
|
|
begin
|
|
|
|
|
|
aQuery2.Insert;
|
|
|
aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString:=bsno;
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=sldata[1];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=sldata[2];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=sldata[3];
|
|
|
aQuery2.FieldByName('<27>ֵ<EFBFBD><D6B5><EFBFBD>').AsString:=sldata[4];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=sldata[5];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').AsString:=sldata[6];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').AsString:=sldata[7];
|
|
|
aQuery2.FieldByName('<27><>ִʱ<D6B4><CAB1>').AsString:=sldata[8];
|
|
|
aQuery2.FieldByName('<27><>ִ״̬').AsString:=sldata[9];
|
|
|
aQuery2.FieldByName('<27><>ִ<EFBFBD><D6B4>Ϣ').AsString:=sldata[10];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:='QQCT';
|
|
|
aQuery2.post;
|
|
|
end;
|
|
|
}
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
istrue:=false;
|
|
|
inmsg:=false;
|
|
|
sl.text:=idhttp1.get('http://www.qingdaoport.net/ywzx/qqct/dpcx/hgfx.jsp?val='+mblno);
|
|
|
j:=0;
|
|
|
for i:=0 to sl.Count-1 do
|
|
|
begin
|
|
|
if pos('<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD><EFBFBD><EFBFBD>Ϣ',sl[i])>0 then
|
|
|
j:=i;
|
|
|
if pos('<tr bgcolor="#EFF2FF">',sl[i])>0 then
|
|
|
begin
|
|
|
{
|
|
|
aQuery.close;
|
|
|
aQuery.SQL.Text:='select * from t_op_msg where <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>=''<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD><EFBFBD><EFBFBD>Ϣ'' and <20><><EFBFBD><EFBFBD>='''+bsno+'''';
|
|
|
aQuery.open;
|
|
|
if aQuery.isempty then inmsg:=true;
|
|
|
aQuery2.close;
|
|
|
aQuery2.SQL.Text:='select * from t_op_msg_bg where <20><><EFBFBD><EFBFBD>='''+bsno+'''';
|
|
|
aQuery2.open;
|
|
|
}
|
|
|
end;
|
|
|
if pos('<td height="20" align="center">',sl[i])>0 then
|
|
|
begin
|
|
|
istrue:=true;
|
|
|
j:=i;
|
|
|
end;
|
|
|
if pos('</table>',sl[i])>0 then begin
|
|
|
istrue:=false;
|
|
|
end;
|
|
|
if istrue and (i=j) then begin
|
|
|
sldata[1]:=twsou('<td height="20" align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+1) then begin
|
|
|
sldata[2]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+2) then begin
|
|
|
sldata[3]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+3) then begin
|
|
|
sldata[4]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+4) then begin
|
|
|
sldata[5]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+5) then begin
|
|
|
sldata[6]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+6) then begin
|
|
|
sldata[7]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+7) then begin
|
|
|
sldata[8]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+8) then begin
|
|
|
sldata[9]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+9) then
|
|
|
begin
|
|
|
if inmsg then
|
|
|
begin
|
|
|
{
|
|
|
aQuery.close;
|
|
|
aQuery.SQL.Text:='insert into t_op_msg (<28><><EFBFBD><EFBFBD>,ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>) '
|
|
|
+'Values ('''+bsno+''',''<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'',''<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD><EFBFBD><EFBFBD>Ϣ'','''+FormatDateTime('YYYY-MM-DD hh:mm:ss',now)+''')';
|
|
|
aQuery.ExecSQL;
|
|
|
}
|
|
|
inmsg:=false;
|
|
|
end;
|
|
|
|
|
|
sldata[10]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
QQCT:=true;
|
|
|
|
|
|
if trim(sldata[9])<>'' then fxzt:=sldata[9];
|
|
|
{
|
|
|
if not aQuery2.Locate('<27><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>',trim(sldata[1]),[]) then
|
|
|
begin
|
|
|
aQuery2.Insert;
|
|
|
aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString:=bsno;
|
|
|
aQuery2.FieldByName('<27><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>').AsString:=sldata[1];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').AsString:=sldata[2];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD>м<EFBFBD><D0BC><EFBFBD>').Asinteger:=strtointdef(sldata[3],0);
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=sldata[4];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=sldata[5];
|
|
|
aQuery2.FieldByName('<27>ᵥ<EFBFBD><E1B5A5>').AsString:=sldata[6];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').Asfloat:=strtofloatdef(sldata[7],0);
|
|
|
aQuery2.FieldByName('ë<><C3AB>').Asfloat:=strtofloatdef(sldata[8],0);
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString:=sldata[9];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').AsString:=sldata[10];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:='QQCT';
|
|
|
aQuery2.post;
|
|
|
end;
|
|
|
}
|
|
|
end;
|
|
|
end;
|
|
|
istrue:=false;
|
|
|
inmsg:=false;
|
|
|
if not QQCT then
|
|
|
begin
|
|
|
sl.text:=idhttp1.get('http://www.qingdaoport.net/ywzx/qqctu/customs_arrschema.jsp?tdh='+mblno);
|
|
|
j:=0;
|
|
|
for i:=0 to sl.Count-1 do begin
|
|
|
if pos('<td height="18" colspan="12" align="left"> <b><3E><><EFBFBD><EFBFBD><EFBFBD>˵ֱ<CBB5><D6B1><EFBFBD><EFBFBD><EFBFBD>Ϣ</b></td>',sl[i])>0 then
|
|
|
j:=i;
|
|
|
if pos('<tr bgcolor="#EFF2FF">',sl[i])>0 then begin
|
|
|
|
|
|
aQuery.close;
|
|
|
aQuery.SQL.Text:='select * from t_op_msg where <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD>˵ֱ<CBB5><D6B1><EFBFBD><EFBFBD><EFBFBD>Ϣ'' and <20><><EFBFBD><EFBFBD>='''+bsno+'''';
|
|
|
aQuery.open;
|
|
|
if aqUery.IsEmpty then inmsg:=true;
|
|
|
aQuery2.close;
|
|
|
aQuery2.SQL.Text:='select * from t_op_msg_ydbg where <20><><EFBFBD><EFBFBD>='''+bsno+'''';
|
|
|
aQuery2.open;
|
|
|
end;
|
|
|
if pos('<td height="23" align="center">',sl[i])>0 then begin
|
|
|
istrue:=true;
|
|
|
j:=i;
|
|
|
end;
|
|
|
if pos('</table>',sl[i])>0 then begin
|
|
|
istrue:=false;
|
|
|
end;
|
|
|
if istrue and (i=j) then begin
|
|
|
sldata[1]:=twsou('<td height="23" align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+1) then begin
|
|
|
sldata[2]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+2) then begin
|
|
|
sldata[3]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+3) then begin
|
|
|
sldata[4]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+4) then begin
|
|
|
sldata[5]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
// sldata[5]:=copy(sl[i],length(sl[i])-19,11);
|
|
|
|
|
|
end;
|
|
|
if istrue and (i=j+5) then begin
|
|
|
sldata[6]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+6) then begin
|
|
|
sldata[7]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+7) then begin
|
|
|
sldata[8]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+8) then begin
|
|
|
sldata[9]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+9) then begin
|
|
|
if inmsg then begin
|
|
|
{
|
|
|
aQuery.close;
|
|
|
aQuery.SQL.Text:='insert into t_op_msg (<28><><EFBFBD><EFBFBD>,ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>) '
|
|
|
+'Values ('''+bsno+''',''<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'',''<27><><EFBFBD><EFBFBD><EFBFBD>˵ֱ<CBB5><D6B1><EFBFBD><EFBFBD><EFBFBD>Ϣ'','''+FormatDateTime('YYYY-MM-DD hh:mm:ss',now)+''')';
|
|
|
aQuery.ExecSQL;
|
|
|
}
|
|
|
inmsg:=false;
|
|
|
end;
|
|
|
sldata[10]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
|
|
|
if trim(sldata[5])<>'' then ydzt:='<27><>';
|
|
|
|
|
|
|
|
|
{
|
|
|
if not aQuery2.Locate('<27><><EFBFBD><EFBFBD>',trim(sldata[6]),[]) then begin
|
|
|
aQuery2.Insert;
|
|
|
aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString:=bsno;
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=sldata[2]; //
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=sldata[3];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=sldata[4];
|
|
|
aQuery2.FieldByName('<27>ֵ<EFBFBD><D6B5><EFBFBD>').AsString:=sldata[5];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=sldata[6];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').AsString:=sldata[7];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').AsString:=sldata[8];
|
|
|
aQuery2.FieldByName('<27><>ִʱ<D6B4><CAB1>').AsString:=sldata[9];
|
|
|
aQuery2.FieldByName('<27><>ִ״̬').AsString:=sldata[10];
|
|
|
// aQuery2.FieldByName('<27><>ִ<EFBFBD><D6B4>Ϣ').AsString:=sldata[11];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:='QQCTU';
|
|
|
aQuery2.post;
|
|
|
end;
|
|
|
}
|
|
|
end;
|
|
|
end;
|
|
|
istrue:=false;
|
|
|
inmsg:=false;
|
|
|
|
|
|
sl.text:=idhttp1.get('http://www.qingdaoport.net/ywzx/qqctu/customs_release.jsp?val='+mblno);
|
|
|
j:=0;
|
|
|
for i:=0 to sl.Count-1 do begin
|
|
|
if pos('<tr><td height="26" colspan="10" align="left"> <b><3E><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD><EFBFBD><EFBFBD>Ϣ</b></td>',sl[i])>0 then
|
|
|
j:=i;
|
|
|
if pos('<tr bgcolor="#EFF2FF">',sl[i])>0 then begin
|
|
|
{
|
|
|
aQuery.close;
|
|
|
aQuery.SQL.Text:='select * from t_op_msg where <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>=''<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD><EFBFBD><EFBFBD>Ϣ'' and <20><><EFBFBD><EFBFBD>='''+bsno+'''';
|
|
|
aQuery.open;
|
|
|
if aquery.IsEmpty then inmsg:=true;
|
|
|
aQuery2.close;
|
|
|
aQuery2.SQL.Text:='select * from t_op_msg_bg where <20><><EFBFBD><EFBFBD>='''+bsno+'''';
|
|
|
aQuery2.open;
|
|
|
}
|
|
|
end;
|
|
|
if pos('<td height="20" align="center">',sl[i])>0 then begin
|
|
|
istrue:=true;
|
|
|
j:=i;
|
|
|
end;
|
|
|
if pos('</table>',sl[i])>0 then begin
|
|
|
istrue:=false;
|
|
|
end;
|
|
|
if istrue and (i=j) then begin
|
|
|
sldata[1]:=twsou('<td height="20" align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+1) then begin
|
|
|
sldata[2]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+2) then begin
|
|
|
sldata[3]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+3) then begin
|
|
|
sldata[4]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+4) then begin
|
|
|
sldata[5]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+5) then begin
|
|
|
sldata[6]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+6) then begin
|
|
|
sldata[7]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+7) then begin
|
|
|
sldata[8]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+8) then begin
|
|
|
sldata[9]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
end;
|
|
|
if istrue and (i=j+9) then begin
|
|
|
sldata[10]:=twsou('<td align="center">','</td>',sl[i]);
|
|
|
|
|
|
if inmsg then begin
|
|
|
{
|
|
|
aQuery.close;
|
|
|
aQuery.SQL.Text:='insert into t_op_msg (<28><><EFBFBD><EFBFBD>,ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>) '
|
|
|
+'Values ('''+bsno+''',''<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'',''<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD><EFBFBD><EFBFBD>Ϣ'','''+FormatDateTime('YYYY-MM-DD hh:mm:ss',now)+''')';
|
|
|
aQuery.ExecSQL;
|
|
|
}
|
|
|
inmsg:=false;
|
|
|
end;
|
|
|
if trim(sldata[9])<>'' then fxzt:=sldata[9];
|
|
|
|
|
|
{
|
|
|
if not aQuery2.Locate('<27><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>',trim(sldata[1]),[]) then begin
|
|
|
aQuery2.Insert;
|
|
|
aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString:=bsno;
|
|
|
aQuery2.FieldByName('<27><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>').AsString:=sldata[1];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').AsString:=sldata[2];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD>м<EFBFBD><D0BC><EFBFBD>').Asinteger:=strtointdef(sldata[3],0);
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=sldata[4];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=sldata[5];
|
|
|
aQuery2.FieldByName('<27>ᵥ<EFBFBD><E1B5A5>').AsString:=sldata[6];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').Asfloat:=strtofloatdef(sldata[7],0);
|
|
|
aQuery2.FieldByName('ë<><C3AB>').Asfloat:=strtofloatdef(sldata[8],0);
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString:=sldata[9];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').AsString:=sldata[10];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:='QQCTU';
|
|
|
aQuery2.post;
|
|
|
end;
|
|
|
}
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
|
|
|
freeandnil(aQuery);
|
|
|
freeandnil(sl);
|
|
|
freeandnil(slcz);
|
|
|
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.getwebmsg_new_1(bsno,mblno,fmblno:string);
|
|
|
var
|
|
|
aQuery,aQuery2:TAdoQuery;
|
|
|
sl:tstringlist;
|
|
|
IdHTTP1:TidHTTP;
|
|
|
i,j,k,m,n:integer;
|
|
|
istrue,QQCT,inmsg:boolean;
|
|
|
sldata:Array [1..13] of string[50];
|
|
|
begin
|
|
|
sl:=tstringlist.Create;
|
|
|
aQuery:=createAdoQuery;
|
|
|
aQuery2:=createAdoQuery;
|
|
|
IdHTTP1 := TidHTTP.Create(nil);
|
|
|
|
|
|
IdHTTP1.HandleRedirects:=true;
|
|
|
QQCT:=false;
|
|
|
istrue:=false;
|
|
|
for i:=1 to 13 do
|
|
|
begin
|
|
|
sldata[i]:='';
|
|
|
end;
|
|
|
n:=0;
|
|
|
try
|
|
|
istrue:=false;
|
|
|
inmsg:=false;
|
|
|
sl.text:=idhttp1.get('http://www.qingdaoport.net/ywzx/qqct/dpcx/cargoDya.jsp?tdh='+mblno);
|
|
|
j:=0;
|
|
|
for i:=0 to sl.Count-1 do
|
|
|
begin
|
|
|
if pos('<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD><EFBFBD><EFBFBD>Ϣ',sl[i])>0 then
|
|
|
begin
|
|
|
{
|
|
|
aQuery.close;
|
|
|
aQuery.SQL.Text:='select * from t_op_msg where <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>=''<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD><EFBFBD><EFBFBD>Ϣ'' and <20><><EFBFBD><EFBFBD>='''+bsno+'''';
|
|
|
aQuery.open;
|
|
|
if aQuery.isempty then inmsg:=true;
|
|
|
|
|
|
aQuery2.close;
|
|
|
aQuery2.SQL.Text:='select * from t_op_msg_bg where <20><><EFBFBD><EFBFBD>='''+bsno+'''';
|
|
|
aQuery2.open;
|
|
|
}
|
|
|
j:=i;
|
|
|
n:=i;
|
|
|
end;
|
|
|
if (i>=n) and (n<>0) then
|
|
|
begin
|
|
|
if pos('<tr bgcolor="#EFF2FF" align="center">',sl[i])>0 then
|
|
|
begin
|
|
|
end;
|
|
|
if pos('<tr align="center">',sl[i])>0 then
|
|
|
begin
|
|
|
istrue:=true;
|
|
|
j:=i;
|
|
|
end;
|
|
|
if pos('</table>',sl[i])>0 then begin
|
|
|
istrue:=false;
|
|
|
Exit;
|
|
|
end;
|
|
|
// Memo1.Lines.Add(IntToStr(i)+'='+IntToStr(j)+' Data '+sl[i]);
|
|
|
if istrue and (i=j+1) then begin
|
|
|
sldata[1]:=twsou('<td>','</td>',sl[i]);
|
|
|
// Memo1.Lines.Add(IntToStr(i)+'='+IntToStr(j)+' Data '+sldata[1]);
|
|
|
end;
|
|
|
if istrue and (i=j+1+1) then begin
|
|
|
sldata[2]:=twsou('<td>','</td>',sl[i]);
|
|
|
// Memo1.Lines.Add(IntToStr(i)+'='+IntToStr(j)+' Data '+sldata[2]);
|
|
|
end;
|
|
|
if istrue and (i=j+2+1) then begin
|
|
|
sldata[3]:=twsou('<td>','</td>',sl[i]);
|
|
|
// Memo1.Lines.Add(IntToStr(i)+'='+IntToStr(j)+' Data '+sldata[3]);
|
|
|
end;
|
|
|
if istrue and (i=j+3+1) then begin
|
|
|
sldata[4]:=twsou('<td>','</td>',sl[i]);
|
|
|
// Memo1.Lines.Add(IntToStr(i)+'='+IntToStr(j)+' Data '+sldata[4]);
|
|
|
end;
|
|
|
if istrue and (i=j+4+1) then begin
|
|
|
sldata[5]:=twsou('<td>','</td>',sl[i]);
|
|
|
// Memo1.Lines.Add(IntToStr(i)+'='+IntToStr(j)+' Data '+sldata[5]);
|
|
|
end;
|
|
|
if istrue and (i=j+5+1) then begin
|
|
|
sldata[6]:=twsou('<td>','</td>',sl[i]);
|
|
|
// Memo1.Lines.Add(IntToStr(i)+'='+IntToStr(j)+' Data '+sldata[6]);
|
|
|
end;
|
|
|
if istrue and (i=j+6+1) then begin
|
|
|
sldata[7]:=twsou('<td','</td>',sl[i]);
|
|
|
// Memo1.Lines.Add(IntToStr(i)+'='+IntToStr(j)+' Data '+sldata[7]);
|
|
|
end;
|
|
|
if istrue and (i=j+7+1) then begin
|
|
|
sldata[8]:=twsou('<td>','</td>',sl[i]);
|
|
|
// Memo1.Lines.Add(IntToStr(i)+'='+IntToStr(j)+' Data '+sldata[8]);
|
|
|
end;
|
|
|
if istrue and (i=j+8+1) then begin
|
|
|
sldata[9]:=twsou('<td>','</td>',sl[i]);
|
|
|
// Memo1.Lines.Add(IntToStr(i)+'='+IntToStr(j)+' Data '+sldata[9]);
|
|
|
end;
|
|
|
|
|
|
if istrue and (i=j+9+1) then begin
|
|
|
sldata[10]:=twsou('<td>','</td>',sl[i]);
|
|
|
// Memo1.Lines.Add(IntToStr(i)+'='+IntToStr(j)+' Data '+sldata[10]);
|
|
|
end;
|
|
|
|
|
|
if istrue and (i=j+10+1) then begin
|
|
|
sldata[11]:=twsou('<td>','</td>',sl[i]);
|
|
|
// Memo1.Lines.Add(IntToStr(i)+'='+IntToStr(j)+' Data '+sldata[11]);
|
|
|
end;
|
|
|
|
|
|
if istrue and (i=j+11+1) then begin
|
|
|
sldata[12]:=twsou('<td>','</td>',sl[i]);
|
|
|
|
|
|
if inmsg then
|
|
|
begin
|
|
|
{
|
|
|
aQuery.close;
|
|
|
aQuery.SQL.Text:='insert into t_op_msg (<28><><EFBFBD><EFBFBD>,ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>) '
|
|
|
+'Values ('''+bsno+''',''<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'',''<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD><EFBFBD><EFBFBD>Ϣ'','''+FormatDateTime('YYYY-MM-DD hh:mm:ss',now)+''')';
|
|
|
aQuery.ExecSQL;
|
|
|
}
|
|
|
|
|
|
inmsg:=false;
|
|
|
end;
|
|
|
|
|
|
if trim(sldata[11])<>'' then fxzt:=sldata[11];
|
|
|
|
|
|
{
|
|
|
if not aQuery2.Locate('<27><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>',trim(sldata[2]),[]) then
|
|
|
begin
|
|
|
aQuery2.Insert;
|
|
|
aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString:=bsno;
|
|
|
aQuery2.FieldByName('<27><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>').AsString:=sldata[2];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').AsString:=sldata[3];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD>м<EFBFBD><D0BC><EFBFBD>').Asinteger:=strtointdef(sldata[4],0);
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=sldata[5];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=sldata[6];
|
|
|
aQuery2.FieldByName('<27>ᵥ<EFBFBD><E1B5A5>').AsString:=Copy(sldata[7],2,30);
|
|
|
// aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=sldata[8];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').Asfloat:=strtofloatdef(sldata[9],0);
|
|
|
aQuery2.FieldByName('ë<><C3AB>').Asfloat:=strtofloatdef(sldata[10],0);
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString:=sldata[11];
|
|
|
// aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=sldata[12];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').AsString:=FormatDateTime('YYYY-MM-DD',date);
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:='QQCT';
|
|
|
aQuery2.post;
|
|
|
end;
|
|
|
}
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
freeandnil(aQuery);
|
|
|
freeandnil(sl);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.getqqctuydfx_1(bsno,mblno,fmblno:string);//qqctu<74><75>ȡ<EFBFBD>˵ֱ<CBB5><D6B1><EFBFBD><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
|
|
var
|
|
|
aQuery,aQuery2:TAdoQuery;
|
|
|
sl:tstringlist;
|
|
|
IdHTTP1:TidHTTP;
|
|
|
i,j,k,m,n:integer;
|
|
|
istrue,QQCT,inmsg:boolean;
|
|
|
sldata:Array [1..13] of string[50];
|
|
|
begin
|
|
|
sl:=tstringlist.Create;
|
|
|
aQuery:=createAdoQuery;
|
|
|
aQuery2:=createAdoQuery;
|
|
|
IdHTTP1 := TidHTTP.Create(nil);
|
|
|
|
|
|
IdHTTP1.HandleRedirects:=true;
|
|
|
QQCT:=false;
|
|
|
istrue:=false;
|
|
|
for i:=1 to 13 do
|
|
|
begin
|
|
|
sldata[i]:='';
|
|
|
end;
|
|
|
n:=0;
|
|
|
try
|
|
|
istrue:=false;
|
|
|
inmsg:=false;
|
|
|
sl.text:=idhttp1.get('http://www.qingdaoport.net/ywzx/qqctu/bill_query.jsp?tdh='+mblno);
|
|
|
j:=0;
|
|
|
for i:=0 to sl.Count-1 do
|
|
|
begin
|
|
|
if pos('<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD><EFBFBD><EFBFBD>Ϣ',sl[i])>0 then
|
|
|
begin
|
|
|
{
|
|
|
aQuery.close;
|
|
|
aQuery.SQL.Text:='select * from t_op_msg where <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>=''<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD><EFBFBD><EFBFBD>Ϣ'' and <20><><EFBFBD><EFBFBD>='''+bsno+'''';
|
|
|
aQuery.open;
|
|
|
if aQuery.isempty then inmsg:=true;
|
|
|
|
|
|
aQuery2.close;
|
|
|
aQuery2.SQL.Text:='select * from t_op_msg_bg where <20><><EFBFBD><EFBFBD>='''+bsno+'''';
|
|
|
aQuery2.open;
|
|
|
}
|
|
|
j:=i;
|
|
|
n:=i;
|
|
|
end;
|
|
|
if (i>=n) and (n<>0) then
|
|
|
begin
|
|
|
if pos('<tr bgcolor="#EFF2FF" align="center">',sl[i])>0 then
|
|
|
begin
|
|
|
end;
|
|
|
if pos('<tr align="center">',sl[i])>0 then
|
|
|
begin
|
|
|
istrue:=true;
|
|
|
j:=i;
|
|
|
end;
|
|
|
if pos('</table>',sl[i])>0 then begin
|
|
|
istrue:=false;
|
|
|
Exit;
|
|
|
end;
|
|
|
// Memo1.Lines.Add(IntToStr(i)+'='+IntToStr(j)+' Data '+sl[i]);
|
|
|
if istrue and (i=j+1) then begin
|
|
|
sldata[1]:=twsou('<td>','</td>',sl[i]);
|
|
|
// Memo1.Lines.Add(IntToStr(i)+'='+IntToStr(j)+' Data '+sldata[1]);
|
|
|
end;
|
|
|
if istrue and (i=j+1+1) then begin
|
|
|
sldata[2]:=twsou('<td>','</td>',sl[i]);
|
|
|
// Memo1.Lines.Add(IntToStr(i)+'='+IntToStr(j)+' Data '+sldata[2]);
|
|
|
end;
|
|
|
if istrue and (i=j+2+1) then begin
|
|
|
sldata[3]:=twsou('<td>','</td>',sl[i]);
|
|
|
// Memo1.Lines.Add(IntToStr(i)+'='+IntToStr(j)+' Data '+sldata[3]);
|
|
|
end;
|
|
|
if istrue and (i=j+3+1) then begin
|
|
|
sldata[4]:=twsou('<td>','</td>',sl[i]);
|
|
|
// Memo1.Lines.Add(IntToStr(i)+'='+IntToStr(j)+' Data '+sldata[4]);
|
|
|
end;
|
|
|
if istrue and (i=j+4+1) then begin
|
|
|
sldata[5]:=twsou('<td>','</td>',sl[i]);
|
|
|
// Memo1.Lines.Add(IntToStr(i)+'='+IntToStr(j)+' Data '+sldata[5]);
|
|
|
end;
|
|
|
if istrue and (i=j+5+1) then begin
|
|
|
sldata[6]:=twsou('<td>','</td>',sl[i]);
|
|
|
// Memo1.Lines.Add(IntToStr(i)+'='+IntToStr(j)+' Data '+sldata[6]);
|
|
|
end;
|
|
|
if istrue and (i=j+6+1) then begin
|
|
|
sldata[7]:=twsou('<td','</td>',sl[i]);
|
|
|
// Memo1.Lines.Add(IntToStr(i)+'='+IntToStr(j)+' Data '+sldata[7]);
|
|
|
end;
|
|
|
if istrue and (i=j+7+1) then begin
|
|
|
sldata[8]:=twsou('<td>','</td>',sl[i]);
|
|
|
// Memo1.Lines.Add(IntToStr(i)+'='+IntToStr(j)+' Data '+sldata[8]);
|
|
|
end;
|
|
|
if istrue and (i=j+8+1) then begin
|
|
|
sldata[9]:=twsou('<td>','</td>',sl[i]);
|
|
|
// Memo1.Lines.Add(IntToStr(i)+'='+IntToStr(j)+' Data '+sldata[9]);
|
|
|
end;
|
|
|
|
|
|
if istrue and (i=j+9+1) then begin
|
|
|
sldata[10]:=twsou('<td>','</td>',sl[i]);
|
|
|
// Memo1.Lines.Add(IntToStr(i)+'='+IntToStr(j)+' Data '+sldata[10]);
|
|
|
end;
|
|
|
|
|
|
if istrue and (i=j+10+1) then begin
|
|
|
sldata[11]:=twsou('<td>','</td>',sl[i]);
|
|
|
// Memo1.Lines.Add(IntToStr(i)+'='+IntToStr(j)+' Data '+sldata[11]);
|
|
|
end;
|
|
|
|
|
|
if istrue and (i=j+11+1) then
|
|
|
begin
|
|
|
|
|
|
if trim(sldata[11])<>'' then fxzt:=sldata[11];
|
|
|
|
|
|
sldata[12]:=twsou('<td>','</td>',sl[i]);
|
|
|
{
|
|
|
if inmsg then
|
|
|
begin
|
|
|
aQuery.close;
|
|
|
aQuery.SQL.Text:='insert into t_op_msg (<28><><EFBFBD><EFBFBD>,ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,<2C><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>) '
|
|
|
+'Values ('''+bsno+''',''<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'',''<27><><EFBFBD>ط<EFBFBD><D8B7><EFBFBD><EFBFBD><EFBFBD>Ϣ'','''+FormatDateTime('YYYY-MM-DD hh:mm:ss',now)+''')';
|
|
|
aQuery.ExecSQL;
|
|
|
inmsg:=false;
|
|
|
end;
|
|
|
|
|
|
if not aQuery2.Locate('<27><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>',trim(sldata[2]),[]) then
|
|
|
begin
|
|
|
aQuery2.Insert;
|
|
|
aQuery2.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString:=bsno;
|
|
|
aQuery2.FieldByName('<27><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>').AsString:=sldata[2];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').AsString:=sldata[3];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD>м<EFBFBD><D0BC><EFBFBD>').Asinteger:=strtointdef(sldata[4],0);
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=sldata[5];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=sldata[6];
|
|
|
aQuery2.FieldByName('<27>ᵥ<EFBFBD><E1B5A5>').AsString:=Copy(sldata[7],2,30);
|
|
|
// aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=sldata[8];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').Asfloat:=strtofloatdef(sldata[9],0);
|
|
|
aQuery2.FieldByName('ë<><C3AB>').Asfloat:=strtofloatdef(sldata[10],0);
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>״̬').AsString:=sldata[11];
|
|
|
// aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:=sldata[12];
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').AsString:=FormatDateTime('YYYY-MM-DD',date);
|
|
|
aQuery2.FieldByName('<27><><EFBFBD><EFBFBD>').AsString:='QQCTU';
|
|
|
aQuery2.post;
|
|
|
end;
|
|
|
}
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
finally
|
|
|
freeandnil(aQuery);
|
|
|
freeandnil(sl);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.analyzeData_1(mblno,s:string);
|
|
|
var i:Integer;
|
|
|
s1:string;
|
|
|
aList,aListData:TStringlist;
|
|
|
begin
|
|
|
aList:=TStringlist.Create;
|
|
|
aListData:=TStringlist.Create;
|
|
|
aList.Clear;
|
|
|
aListData.Clear;
|
|
|
try
|
|
|
while Length(s)>0 do
|
|
|
begin
|
|
|
s1:=Copy(s,1,Pos('</td>',s)+4);
|
|
|
s:=Copy(s,Pos('</td>',s)+5,Length(s)-1);
|
|
|
aList.Add(s1);
|
|
|
end;
|
|
|
// aList.SaveToFile('c:\1.txt');
|
|
|
// ShowMessage(IntToStr(aList.Count));
|
|
|
for i:=0 to aList.Count-1 do
|
|
|
begin
|
|
|
aListData.Add(twsou('<td><font face="Verdana" color="Black" size="1">','</font></td>',aList[i]));
|
|
|
end;
|
|
|
|
|
|
if aListData.Count<=4 then Exit;
|
|
|
if Trim(aListData[5])<>'' then
|
|
|
ctn_1:=ctn_1+1;
|
|
|
if Trim(aListData[6])<>'' then
|
|
|
ctn_2:=ctn_2+1;
|
|
|
|
|
|
// ShowMessage(Trim(aListData[5])+Trim(aListData[6]));
|
|
|
finally
|
|
|
aList.Free;
|
|
|
aListData.Free;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.analyzeListData_1(mblno:string;aList:TStringlist);
|
|
|
var i,k,c:Integer;
|
|
|
begin
|
|
|
|
|
|
try
|
|
|
k:=0;
|
|
|
for i:=0 to aList.Count-1 do
|
|
|
begin
|
|
|
analyzeData_1(mblno,Trim(aList[k]));
|
|
|
k:=k+2;
|
|
|
if aList.Count>0 then
|
|
|
if k>aList.Count-2 then Exit;
|
|
|
end;
|
|
|
finally
|
|
|
// Updateopctn(mblno);
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.getczwebmsg_1(mblno:string);
|
|
|
var
|
|
|
sl,slcz:tstringlist;
|
|
|
IdHTTP1:TidHTTP;
|
|
|
i,k,m:integer;
|
|
|
begin
|
|
|
|
|
|
sl:=tstringlist.Create;
|
|
|
slcz:=tstringlist.Create;
|
|
|
IdHTTP1 := TidHTTP.Create(nil);
|
|
|
IdHTTP1.HandleRedirects:=true;
|
|
|
try
|
|
|
slcz.Clear;
|
|
|
sl.Clear;
|
|
|
sl.text:=idhttp1.get('http://www.sdsmart.cn/Query/YD_BLQueryGrid.aspx?blno='+mblno);
|
|
|
k:=0;
|
|
|
for i:=0 to sl.Count-1 do
|
|
|
begin
|
|
|
sl[i]:=Utf8ToAnsi(sl[i]);
|
|
|
if pos('<FONT color="#000000" size="2"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̬</FONT> </td></tr>',sl[i])>0 then
|
|
|
begin
|
|
|
k:=i;
|
|
|
end;
|
|
|
if (k>1) and (i>k+5) then
|
|
|
begin
|
|
|
slcz.Add(sl[i]);
|
|
|
end;
|
|
|
if (k>1) and (i>k+5) then
|
|
|
|
|
|
if pos('</table>',sl[i])>0 then
|
|
|
begin
|
|
|
if slcz.Count>0 then begin
|
|
|
analyzeListData_1(mblno,slcz);
|
|
|
end;
|
|
|
Exit;
|
|
|
end;
|
|
|
end;
|
|
|
// if slcz.Count>4 then
|
|
|
finally
|
|
|
freeandnil(sl);
|
|
|
freeandnil(slcz);
|
|
|
IdHTTP1.HandleRedirects:=False;
|
|
|
IdHTTP1.Free;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.FormClose(Sender: TObject;
|
|
|
var Action: TCloseAction);
|
|
|
begin
|
|
|
frm_op_seae_qiandan_add.Hide;
|
|
|
frm_op_seae_qiandan_add.ManualFloat(frm_op_seae_qiandan_add.BoundsRect );
|
|
|
frm_main.freeTabs('frm_op_seae_qiandan_add');
|
|
|
action:=cafree;
|
|
|
frm_op_seae_qiandan_add:=nil;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.bsSkinButton10Click(Sender: TObject);
|
|
|
var
|
|
|
str:widestring;
|
|
|
begin
|
|
|
|
|
|
str:='where ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><>ͨ<EFBFBD><CDA8>'' and <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5><>''''';
|
|
|
|
|
|
if Edit2.text<>''then
|
|
|
str:=str+' and <20><><EFBFBD>ᵥ<EFBFBD><E1B5A5> like '+''''+'%'+Edit2.text+'%'+'''';
|
|
|
if wwDBDateTimePicker1.text<>''then
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>='+''''+wwDBDateTimePicker1.text+'''';
|
|
|
if wwDBDateTimePicker2.text<>''then
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><='+''''+wwDBDateTimePicker2.text+'''';
|
|
|
if RxDBLookupCombo2.DisplayValues[1]<>''then
|
|
|
str:=str+' and ί<>е<EFBFBD>λ='+''''+RxDBLookupCombo2.DisplayValues[1]+'''';
|
|
|
if wwDBLookupCombo49.text<>''then
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD> like '+''''+'%'+wwDBLookupCombo49.text+'%'+'''';
|
|
|
if Edit7.text<>''then
|
|
|
str:=str+' and <20><><EFBFBD><EFBFBD> like '+''''+'%'+Edit7.text+'%'+'''';
|
|
|
|
|
|
if trim(str)='' then
|
|
|
begin
|
|
|
str:='where '+open_data('0001','t_op_seae.¼<><C2BC><EFBFBD><EFBFBD>',
|
|
|
't_op_seae.<2E><><EFBFBD><EFBFBD>Ա','t_op_seae.<2E>ͷ<EFBFBD>Ա','t_op_seae.<2E><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
str:=str+' and '+open_data('0001','t_op_seae.¼<><C2BC><EFBFBD><EFBFBD>',
|
|
|
't_op_seae.<2E><><EFBFBD><EFBFBD>Ա','t_op_seae.<2E>ͷ<EFBFBD>Ա','t_op_seae.<2E><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
t_op_seae.close;
|
|
|
t_op_seae.sql.clear;
|
|
|
t_op_seae.sql.add('select * from t_op_seae '+str+default_sort(53,'t_op_seae','','desc'));
|
|
|
|
|
|
t_op_seae_ctn.close;
|
|
|
t_op_seae_ctn.sql.clear;
|
|
|
t_op_seae_ctn.sql.add('select sum(<28><><EFBFBD><EFBFBD>) c from t_op_ctn where <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
|
|
|
|
|
|
|
|
|
kbmcl.EmptyTable;
|
|
|
kbmcl.Open;
|
|
|
kbmcl.DisableControls;
|
|
|
|
|
|
t_op_seae.Open;
|
|
|
|
|
|
if not ASSIGNED(frm_sys_progress) then
|
|
|
frm_sys_progress:=tfrm_sys_progress.Create(application);
|
|
|
frm_sys_progress.bsSkinGauge1.ProgressText:='<27><><EFBFBD>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱥ<C8BA><F2A1A3A1><EFBFBD>';
|
|
|
frm_sys_progress.Show;
|
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.MaxValue:=t_op_seae.RecordCount;
|
|
|
frm_sys_progress.bsSkinGauge1.MinValue:=0;
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=0;
|
|
|
try
|
|
|
|
|
|
with t_op_seae do
|
|
|
begin
|
|
|
First;
|
|
|
while not eof do
|
|
|
begin
|
|
|
kbmcl.Insert;
|
|
|
kbmcl.FieldByName('ί<><CEAF><EFBFBD><EFBFBD>').Value:=FieldByName('ί<>е<EFBFBD>λ').Value;
|
|
|
kbmcl.FieldByName('<27><><EFBFBD><EFBFBD>').Value:=FieldByName('<27><><EFBFBD><EFBFBD>').Value;
|
|
|
kbmcl.FieldByName('<27><><EFBFBD><EFBFBD>').Value:=FieldByName('<27><><EFBFBD><EFBFBD>').Value;
|
|
|
kbmcl.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value;
|
|
|
kbmcl.FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').Value:=FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').Value;
|
|
|
|
|
|
frm_sys_progress.bsSkinGauge1.ProgressText:='<27>ᵥ<EFBFBD><E1B5A5>:'+FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString;
|
|
|
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
|
|
|
|
|
|
|
|
|
|
|
|
// frm_op_seae_qiandan_add.Caption:='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD>ȱ<EFBFBD>:'+FieldByName('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').Value;
|
|
|
ctn_sum:=0;
|
|
|
ctn_1:=0;
|
|
|
ctn_2:=0;
|
|
|
|
|
|
ydzt:='<27><>';
|
|
|
fxzt:='<27><>';
|
|
|
|
|
|
getczwebmsg_1(Trim(fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString));
|
|
|
|
|
|
t_op_seae_ctn.Close;
|
|
|
t_op_seae_ctn.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=FieldByName('<27><><EFBFBD><EFBFBD>').Value;
|
|
|
t_op_seae_ctn.Open;
|
|
|
|
|
|
kbmcl.FieldByName('<27><><EFBFBD><EFBFBD>').Value:=t_op_seae_ctn.FieldByName('c').AsInteger;
|
|
|
kbmcl.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=ctn_1;
|
|
|
kbmcl.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').Value:=ctn_2;
|
|
|
|
|
|
getwebmsg('',fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString,'');
|
|
|
getwebmsg_new('',fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString,'');
|
|
|
|
|
|
getqqctuydfx('',fieldbyname('<27><><EFBFBD>ᵥ<EFBFBD><E1B5A5>').AsString,'');
|
|
|
|
|
|
|
|
|
if not FieldByName('<27>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>').IsNull then
|
|
|
kbmcl.FieldByName('<27>ص<EFBFBD>ʱ<EFBFBD><CAB1>').Value:=FormatDateTime('YYYY-MM-DD hh:mm',FieldByName('<27>ص<EFBFBD><D8B5><EFBFBD><EFBFBD><EFBFBD>').Value);
|
|
|
if not FieldByName('<27>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>').IsNull then
|
|
|
kbmcl.FieldByName('<27>ظ<EFBFBD>ʱ<EFBFBD><CAB1>').Value:=FormatDateTime('YYYY-MM-DD hh:mm',FieldByName('<27>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD>').Value);
|
|
|
|
|
|
kbmcl.FieldByName('<27>˵ֱ<CBB5><D6B1><EFBFBD>').Value:=ydzt;
|
|
|
kbmcl.FieldByName('ͨ<><CDA8>״̬').Value:=fxzt;
|
|
|
|
|
|
kbmcl.post;
|
|
|
Next;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
kbmcl.EnableControls;
|
|
|
finally
|
|
|
frm_sys_progress.Close;
|
|
|
frm_sys_progress.Free;
|
|
|
frm_sys_progress:=nil;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.bsSkinButton6Click(Sender: TObject);
|
|
|
begin
|
|
|
{
|
|
|
Edit2.text:='';
|
|
|
wwDBDateTimePicker1.text:='';
|
|
|
wwDBDateTimePicker2.text:='';
|
|
|
RxDBLookupCombo2.ClearValue;
|
|
|
wwDBLookupCombo49.text:='';
|
|
|
Edit7.text:='';
|
|
|
RxDBLookupCombo6.ClearValue;
|
|
|
}
|
|
|
Close;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_op_seae_qiandan_add.MenuItem2Click(Sender: TObject);
|
|
|
begin
|
|
|
grid_save_xls(dxDBGrid1);
|
|
|
end;
|
|
|
|
|
|
end.
|
|
|
|