|
|
unit u_rp_query;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, BusinessSkinForm, bsSkinCtrls, RxLookup, wwdbdatetimepicker,
|
|
|
StdCtrls, Mask, wwdbedit, Wwdotdot, Wwdbcomb;
|
|
|
|
|
|
type
|
|
|
Tfrm_rp_query = class(TForm)
|
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
bsSkinButton10: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
Label7: TLabel;
|
|
|
wwDBComboBox17: TwwDBComboBox;
|
|
|
wwDBComboBox1: TwwDBComboBox;
|
|
|
Label4: TLabel;
|
|
|
wwDBComboBox7: TwwDBComboBox;
|
|
|
wwDBComboBox2: TwwDBComboBox;
|
|
|
Label10: TLabel;
|
|
|
wwDBComboBox18: TwwDBComboBox;
|
|
|
wwDBDateTimePicker1: TwwDBDateTimePicker;
|
|
|
Label5: TLabel;
|
|
|
wwDBComboBox6: TwwDBComboBox;
|
|
|
wwDBDateTimePicker2: TwwDBDateTimePicker;
|
|
|
Label8: TLabel;
|
|
|
wwDBComboBox19: TwwDBComboBox;
|
|
|
wwDBDateTimePicker3: TwwDBDateTimePicker;
|
|
|
Label11: TLabel;
|
|
|
wwDBComboBox11: TwwDBComboBox;
|
|
|
wwDBDateTimePicker4: TwwDBDateTimePicker;
|
|
|
Label9: TLabel;
|
|
|
wwDBComboBox21: TwwDBComboBox;
|
|
|
RxDBLookupCombo2: TRxDBLookupCombo;
|
|
|
Label22: TLabel;
|
|
|
wwDBComboBox28: TwwDBComboBox;
|
|
|
RxDBLookupCombo10: TRxDBLookupCombo;
|
|
|
RxDBLookupCombo12: TRxDBLookupCombo;
|
|
|
wwDBComboBox29: TwwDBComboBox;
|
|
|
Label23: TLabel;
|
|
|
Label14: TLabel;
|
|
|
wwDBComboBox14: TwwDBComboBox;
|
|
|
RxDBLookupCombo3: TRxDBLookupCombo;
|
|
|
Label16: TLabel;
|
|
|
wwDBComboBox25: TwwDBComboBox;
|
|
|
RxDBLookupCombo6: TRxDBLookupCombo;
|
|
|
Label15: TLabel;
|
|
|
wwDBComboBox24: TwwDBComboBox;
|
|
|
RxDBLookupCombo4: TRxDBLookupCombo;
|
|
|
Label32: TLabel;
|
|
|
wwDBComboBox38: TwwDBComboBox;
|
|
|
Edit9: TEdit;
|
|
|
Label1: TLabel;
|
|
|
wwDBComboBox3: TwwDBComboBox;
|
|
|
Edit1: TEdit;
|
|
|
RxDBLookupCombo17: TRxDBLookupCombo;
|
|
|
wwDBComboBox47: TwwDBComboBox;
|
|
|
Label42: TLabel;
|
|
|
wwDBComboBox46: TwwDBComboBox;
|
|
|
wwDBComboBox45: TwwDBComboBox;
|
|
|
Label41: TLabel;
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure bsSkinButton10Click(Sender: TObject);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure wwDBComboBox17KeyPress(Sender: TObject; var Key: Char);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_rp_query: Tfrm_rp_query;
|
|
|
rp_query_limited:string;
|
|
|
rp_query_bs:integer;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses my_sys_function, u_rp_tai_total, u_rp_rp_total, u_rp_zou_total,
|
|
|
u_rp_fen_total, u_data_share;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_rp_query.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_query.bsSkinButton10Click(Sender: TObject);
|
|
|
begin
|
|
|
wwDBComboBox1.text:='';
|
|
|
wwDBComboBox2.text:='';
|
|
|
wwDBDateTimePicker1.Clear;
|
|
|
wwDBDateTimePicker2.Clear;
|
|
|
wwDBDateTimePicker3.Clear;
|
|
|
wwDBDateTimePicker4.Clear;
|
|
|
Edit1.text:='';
|
|
|
Edit9.text:='';
|
|
|
RxDBLookupCombo2.ClearValue;
|
|
|
RxDBLookupCombo10.ClearValue;
|
|
|
RxDBLookupCombo6.ClearValue;
|
|
|
RxDBLookupCombo3.ClearValue;
|
|
|
RxDBLookupCombo12.ClearValue;
|
|
|
RxDBLookupCombo17.ClearValue;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_query.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
wwDBComboBox17.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox18.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox6.text:='С<><D0A1>';
|
|
|
wwDBComboBox11.text:='С<><D0A1>';
|
|
|
wwDBComboBox19.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox21.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox24.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox25.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox7.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox28.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox29.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox14.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox3.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox38.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox45.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
wwDBComboBox47.text:='<27><><EFBFBD><EFBFBD>';
|
|
|
frm_data_share.t_crm_client_all.requery;
|
|
|
frm_data_share.t_sys_employee.requery;
|
|
|
frm_data_share.t_sys_department.requery;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_query.bsSkinButton1Click(Sender: TObject);
|
|
|
var
|
|
|
str_seae,str_seai,str_aire,str_airi,str_total,str_all:widestring;
|
|
|
begin
|
|
|
str_seae:=query_tiaojian(1,str_seae,'ҵ<><D2B5>״̬',wwDBComboBox17.text,wwDBComboBox1.text);
|
|
|
str_seae:=query_tiaojian(1,str_seae,'<27><><EFBFBD><EFBFBD>״̬',wwDBComboBox7.text,wwDBComboBox2.text);
|
|
|
str_seae:=query_tiaojian(1,str_seae,'<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>',wwDBComboBox19.text,wwDBDateTimePicker3.text);
|
|
|
str_seae:=query_tiaojian(1,str_seae,'<27><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>',wwDBComboBox11.text,wwDBDateTimePicker4.text);
|
|
|
str_seae:=query_tiaojian(1,str_seae,'ί<>е<EFBFBD>λ',wwDBComboBox21.text,RxDBLookupCombo2.DisplayValues[1]);
|
|
|
str_seae:=query_tiaojian(1,str_seae,'<27>ͷ<EFBFBD>Ա',wwDBComboBox24.text,RxDBLookupCombo4.DisplayValue);
|
|
|
str_seae:=query_tiaojian(1,str_seae,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox14.text,RxDBLookupCombo3.DisplayValue);
|
|
|
str_seae:=query_tiaojian(1,str_seae,'<27><><EFBFBD><EFBFBD>Ա',wwDBComboBox25.text,RxDBLookupCombo6.DisplayValue);
|
|
|
str_seae:=query_tiaojian(1,str_seae,'<27><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>',wwDBComboBox28.text,RxDBLookupCombo10.DisplayValue);
|
|
|
str_seae:=query_tiaojian(1,str_seae,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox29.text,RxDBLookupCombo12.DisplayValue);
|
|
|
str_seae:=query_tiaojian(2,str_seae,'<27>ܴ<EFBFBD>',wwDBComboBox3.text,Edit1.text);
|
|
|
str_seae:=query_tiaojian(2,str_seae,'<27>ܴ<EFBFBD>',wwDBComboBox38.text,Edit9.text);
|
|
|
str_seae:=query_tiaojian(1,str_seae,'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox45.text,wwDBComboBox46.text);
|
|
|
str_seae:=query_tiaojian(1,str_seae,'<27>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox47.text,RxDBLookupCombo17.DisplayValue);
|
|
|
|
|
|
|
|
|
if rp_query_limited<>'no'then
|
|
|
begin
|
|
|
if trim(str_seae)='' then
|
|
|
begin
|
|
|
str_seai:='where '+open_data(rp_query_limited,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
str_seai:=str_seae+' and '+open_data(rp_query_limited,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
if trim(str_seae)='' then
|
|
|
begin
|
|
|
str_aire:='where '+open_data(rp_query_limited,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no');
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
str_aire:=str_seae+' and '+open_data(rp_query_limited,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no');
|
|
|
end;
|
|
|
|
|
|
if trim(str_seae)='' then
|
|
|
begin
|
|
|
str_airi:='where '+open_data(rp_query_limited,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no');
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
str_airi:=str_seae+' and '+open_data(rp_query_limited,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','no','no');
|
|
|
end;
|
|
|
|
|
|
if trim(str_seae)='' then
|
|
|
begin
|
|
|
str_all:='where '+open_data(rp_query_limited,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
str_all:=str_seae+' and '+open_data(rp_query_limited,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
if trim(str_seae)='' then
|
|
|
begin
|
|
|
str_seae:='where '+open_data(rp_query_limited,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
str_seae:=str_seae+' and '+open_data(rp_query_limited,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','<27>ͷ<EFBFBD>Ա','<27><><EFBFBD>ز<EFBFBD><D8B2><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
end;
|
|
|
|
|
|
str_seai:=query_tiaojian(1,str_seai,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox18.text,wwDBDateTimePicker1.text);
|
|
|
str_seai:=query_tiaojian(1,str_seai,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox6.text,wwDBDateTimePicker2.text);
|
|
|
|
|
|
str_aire:=query_tiaojian(1,str_aire,'һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox18.text,wwDBDateTimePicker1.text);
|
|
|
str_aire:=query_tiaojian(1,str_aire,'һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox6.text,wwDBDateTimePicker2.text);
|
|
|
|
|
|
str_airi:=query_tiaojian(1,str_airi,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox18.text,wwDBDateTimePicker1.text);
|
|
|
str_airi:=query_tiaojian(1,str_airi,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox6.text,wwDBDateTimePicker2.text);
|
|
|
|
|
|
str_all:=query_tiaojian(1,str_all,'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox18.text,wwDBDateTimePicker1.text);
|
|
|
str_all:=query_tiaojian(1,str_all,'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox6.text,wwDBDateTimePicker2.text);
|
|
|
|
|
|
str_seae:=query_tiaojian(1,str_seae,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox18.text,wwDBDateTimePicker1.text);
|
|
|
str_seae:=query_tiaojian(1,str_seae,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox6.text,wwDBDateTimePicker2.text);
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
str_seai:=query_tiaojian(1,str_seae,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox18.text,wwDBDateTimePicker1.text);
|
|
|
str_seai:=query_tiaojian(1,str_seai,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox6.text,wwDBDateTimePicker2.text);
|
|
|
|
|
|
str_aire:=query_tiaojian(1,str_seae,'һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox18.text,wwDBDateTimePicker1.text);
|
|
|
str_aire:=query_tiaojian(1,str_aire,'һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox6.text,wwDBDateTimePicker2.text);
|
|
|
|
|
|
str_airi:=query_tiaojian(1,str_seae,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox18.text,wwDBDateTimePicker1.text);
|
|
|
str_airi:=query_tiaojian(1,str_airi,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox6.text,wwDBDateTimePicker2.text);
|
|
|
|
|
|
str_all:=query_tiaojian(1,str_seae,'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox18.text,wwDBDateTimePicker1.text);
|
|
|
str_all:=query_tiaojian(1,str_all,'ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox6.text,wwDBDateTimePicker2.text);
|
|
|
|
|
|
str_seae:=query_tiaojian(1,str_seae,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox18.text,wwDBDateTimePicker1.text);
|
|
|
str_seae:=query_tiaojian(1,str_seae,'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox6.text,wwDBDateTimePicker2.text);
|
|
|
end;
|
|
|
|
|
|
|
|
|
case rp_query_bs of
|
|
|
1:
|
|
|
begin
|
|
|
str_total:='SELECT '+''''+'<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'+''''+' as ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,count(<28><><EFBFBD><EFBFBD>) as Ʊ<><C6B1>,'
|
|
|
+'sum(Ӧ<><D3A6>USD) as Ӧ<><D3A6>USD,sum(<28><><EFBFBD><EFBFBD>USD) as <20><><EFBFBD><EFBFBD>USD,'
|
|
|
+'sum(Ӧ<><D3A6>USD-<2D><><EFBFBD><EFBFBD>USD) AS δ<><CEB4>USD,sum(Ӧ<><D3A6>RMB) as Ӧ<><D3A6>RMB,'
|
|
|
+'sum(<28><><EFBFBD><EFBFBD>RMB) as <20><><EFBFBD><EFBFBD>RMB,sum(Ӧ<><D3A6>RMB-<2D><><EFBFBD><EFBFBD>RMB) AS δ<><CEB4>RMB,'
|
|
|
+'sum(<28>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>) as <20>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>,sum(<28>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>) as <20>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'sum(<28>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>-<2D>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>) AS <20>ϼ<EFBFBD>δ<EFBFBD><CEB4>,'
|
|
|
+'sum(Ӧ<><D3A6>USD) as Ӧ<><D3A6>USD,sum(<28>Ѹ<EFBFBD>USD) as <20>Ѹ<EFBFBD>USD,'
|
|
|
+'sum(Ӧ<><D3A6>USD-<2D>Ѹ<EFBFBD>USD) AS δ<><CEB4>USD,sum(Ӧ<><D3A6>RMB) as Ӧ<><D3A6>RMB,'
|
|
|
+'sum(<28>Ѹ<EFBFBD>RMB) as <20>Ѹ<EFBFBD>RMB,sum(Ӧ<><D3A6>RMB- <20>Ѹ<EFBFBD>RMB) AS δ<><CEB4>RMB,'
|
|
|
+'sum(<28>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>) as <20>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>,sum(<28>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>) as <20>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>,'
|
|
|
+'sum(<28>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>-<2D>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>) AS <20>ϼ<EFBFBD>δ<EFBFBD><CEB4>,sum(<28><><EFBFBD><EFBFBD>USD) as <20><><EFBFBD><EFBFBD>USD,'
|
|
|
+'sum(<28><><EFBFBD><EFBFBD>RMB) as <20><><EFBFBD><EFBFBD>RMB,sum(ë<><C3AB><EFBFBD><EFBFBD>) as ë<><C3AB><EFBFBD><EFBFBD>'
|
|
|
+' FROM t_op_gain where <20><><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD>'
|
|
|
+' FROM t_op_seae '+str_seae+')'
|
|
|
+' union '
|
|
|
+'SELECT '+''''+'<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>'+''''+' as ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,count(<28><><EFBFBD><EFBFBD>) as Ʊ<><C6B1>,'
|
|
|
+'sum(Ӧ<><D3A6>USD) as Ӧ<><D3A6>USD,sum(<28><><EFBFBD><EFBFBD>USD) as <20><><EFBFBD><EFBFBD>USD,'
|
|
|
+'sum(Ӧ<><D3A6>USD-<2D><><EFBFBD><EFBFBD>USD) AS δ<><CEB4>USD,sum(Ӧ<><D3A6>RMB) as Ӧ<><D3A6>RMB,'
|
|
|
+'sum(<28><><EFBFBD><EFBFBD>RMB) as <20><><EFBFBD><EFBFBD>RMB,sum(Ӧ<><D3A6>RMB-<2D><><EFBFBD><EFBFBD>RMB) AS δ<><CEB4>RMB,'
|
|
|
+'sum(<28>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>) as <20>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>,sum(<28>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>) as <20>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'sum(<28>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>-<2D>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>) AS <20>ϼ<EFBFBD>δ<EFBFBD><CEB4>,'
|
|
|
+'sum(Ӧ<><D3A6>USD) as Ӧ<><D3A6>USD,sum(<28>Ѹ<EFBFBD>USD) as <20>Ѹ<EFBFBD>USD,'
|
|
|
+'sum(Ӧ<><D3A6>USD-<2D>Ѹ<EFBFBD>USD) AS δ<><CEB4>USD,sum(Ӧ<><D3A6>RMB) as Ӧ<><D3A6>RMB,'
|
|
|
+'sum(<28>Ѹ<EFBFBD>RMB) as <20>Ѹ<EFBFBD>RMB,sum(Ӧ<><D3A6>RMB- <20>Ѹ<EFBFBD>RMB) AS δ<><CEB4>RMB,'
|
|
|
+'sum(<28>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>) as <20>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>,sum(<28>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>) as <20>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>,'
|
|
|
+'sum(<28>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>-<2D>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>) AS <20>ϼ<EFBFBD>δ<EFBFBD><CEB4>,sum(<28><><EFBFBD><EFBFBD>USD) as <20><><EFBFBD><EFBFBD>USD,'
|
|
|
+'sum(<28><><EFBFBD><EFBFBD>RMB) as <20><><EFBFBD><EFBFBD>RMB,sum(ë<><C3AB><EFBFBD><EFBFBD>) as ë<><C3AB><EFBFBD><EFBFBD>'
|
|
|
+' FROM t_op_gain where <20><><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD>'
|
|
|
+' FROM t_op_seai '+str_seai+')'
|
|
|
+' union '
|
|
|
+'SELECT '+''''+'<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'+''''+' as ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,count(<28><><EFBFBD><EFBFBD>) as Ʊ<><C6B1>,'
|
|
|
+'sum(Ӧ<><D3A6>USD) as Ӧ<><D3A6>USD,sum(<28><><EFBFBD><EFBFBD>USD) as <20><><EFBFBD><EFBFBD>USD,'
|
|
|
+'sum(Ӧ<><D3A6>USD-<2D><><EFBFBD><EFBFBD>USD) AS δ<><CEB4>USD,sum(Ӧ<><D3A6>RMB) as Ӧ<><D3A6>RMB,'
|
|
|
+'sum(<28><><EFBFBD><EFBFBD>RMB) as <20><><EFBFBD><EFBFBD>RMB,sum(Ӧ<><D3A6>RMB-<2D><><EFBFBD><EFBFBD>RMB) AS δ<><CEB4>RMB,'
|
|
|
+'sum(<28>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>) as <20>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>,sum(<28>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>) as <20>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'sum(<28>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>-<2D>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>) AS <20>ϼ<EFBFBD>δ<EFBFBD><CEB4>,'
|
|
|
+'sum(Ӧ<><D3A6>USD) as Ӧ<><D3A6>USD,sum(<28>Ѹ<EFBFBD>USD) as <20>Ѹ<EFBFBD>USD,'
|
|
|
+'sum(Ӧ<><D3A6>USD-<2D>Ѹ<EFBFBD>USD) AS δ<><CEB4>USD,sum(Ӧ<><D3A6>RMB) as Ӧ<><D3A6>RMB,'
|
|
|
+'sum(<28>Ѹ<EFBFBD>RMB) as <20>Ѹ<EFBFBD>RMB,sum(Ӧ<><D3A6>RMB- <20>Ѹ<EFBFBD>RMB) AS δ<><CEB4>RMB,'
|
|
|
+'sum(<28>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>) as <20>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>,sum(<28>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>) as <20>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>,'
|
|
|
+'sum(<28>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>-<2D>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>) AS <20>ϼ<EFBFBD>δ<EFBFBD><CEB4>,sum(<28><><EFBFBD><EFBFBD>USD) as <20><><EFBFBD><EFBFBD>USD,'
|
|
|
+'sum(<28><><EFBFBD><EFBFBD>RMB) as <20><><EFBFBD><EFBFBD>RMB,sum(ë<><C3AB><EFBFBD><EFBFBD>) as ë<><C3AB><EFBFBD><EFBFBD>'
|
|
|
+' FROM t_op_gain where <20><><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD>'
|
|
|
+' FROM t_op_aire '+str_aire+')'
|
|
|
+' union '
|
|
|
+'SELECT '+''''+'<27><><EFBFBD>˽<EFBFBD><CBBD><EFBFBD>'+''''+' as ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,count(<28><><EFBFBD><EFBFBD>) as Ʊ<><C6B1>,'
|
|
|
+'sum(Ӧ<><D3A6>USD) as Ӧ<><D3A6>USD,sum(<28><><EFBFBD><EFBFBD>USD) as <20><><EFBFBD><EFBFBD>USD,'
|
|
|
+'sum(Ӧ<><D3A6>USD-<2D><><EFBFBD><EFBFBD>USD) AS δ<><CEB4>USD,sum(Ӧ<><D3A6>RMB) as Ӧ<><D3A6>RMB,'
|
|
|
+'sum(<28><><EFBFBD><EFBFBD>RMB) as <20><><EFBFBD><EFBFBD>RMB,sum(Ӧ<><D3A6>RMB-<2D><><EFBFBD><EFBFBD>RMB) AS δ<><CEB4>RMB,'
|
|
|
+'sum(<28>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>) as <20>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>,sum(<28>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>) as <20>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>,'
|
|
|
+'sum(<28>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>-<2D>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>) AS <20>ϼ<EFBFBD>δ<EFBFBD><CEB4>,'
|
|
|
+'sum(Ӧ<><D3A6>USD) as Ӧ<><D3A6>USD,sum(<28>Ѹ<EFBFBD>USD) as <20>Ѹ<EFBFBD>USD,'
|
|
|
+'sum(Ӧ<><D3A6>USD-<2D>Ѹ<EFBFBD>USD) AS δ<><CEB4>USD,sum(Ӧ<><D3A6>RMB) as Ӧ<><D3A6>RMB,'
|
|
|
+'sum(<28>Ѹ<EFBFBD>RMB) as <20>Ѹ<EFBFBD>RMB,sum(Ӧ<><D3A6>RMB- <20>Ѹ<EFBFBD>RMB) AS δ<><CEB4>RMB,'
|
|
|
+'sum(<28>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>) as <20>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>,sum(<28>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>) as <20>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>,'
|
|
|
+'sum(<28>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>-<2D>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>) AS <20>ϼ<EFBFBD>δ<EFBFBD><CEB4>,sum(<28><><EFBFBD><EFBFBD>USD) as <20><><EFBFBD><EFBFBD>USD,'
|
|
|
+'sum(<28><><EFBFBD><EFBFBD>RMB) as <20><><EFBFBD><EFBFBD>RMB,sum(ë<><C3AB><EFBFBD><EFBFBD>) as ë<><C3AB><EFBFBD><EFBFBD>'
|
|
|
+' FROM t_op_gain where <20><><EFBFBD><EFBFBD> in (select <20><><EFBFBD><EFBFBD>'
|
|
|
+' FROM t_op_airi '+str_airi+')';
|
|
|
|
|
|
str_seae:='SELECT t_op_seae.*, t_op_gain_main.Ӧ<><D3A6>USD, t_op_gain_main.<2E><><EFBFBD><EFBFBD>USD,(t_op_gain_main.Ӧ<><D3A6>USD-t_op_gain_main.<2E><><EFBFBD><EFBFBD>USD)'
|
|
|
+' AS δ<><CEB4>USD,t_op_gain_main.Ӧ<><D3A6>RMB, t_op_gain_main.<2E><><EFBFBD><EFBFBD>RMB,(t_op_gain_main.Ӧ<><D3A6>RMB-t_op_gain_main.<2E><><EFBFBD><EFBFBD>RMB)'
|
|
|
+' AS δ<><CEB4>RMB, t_op_gain_main.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>,t_op_gain_main.<2E>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>,(t_op_gain_main.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>-t_op_gain_main.<2E>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>)'
|
|
|
+' AS <20>ϼ<EFBFBD>δ<EFBFBD><CEB4>,t_op_gain_main.Ӧ<><D3A6>USD, t_op_gain_main.<2E>Ѹ<EFBFBD>USD, (t_op_gain_main.Ӧ<><D3A6>USD-t_op_gain_main.<2E>Ѹ<EFBFBD>USD)'
|
|
|
+' AS δ<><CEB4>USD,t_op_gain_main.Ӧ<><D3A6>RMB, t_op_gain_main.<2E>Ѹ<EFBFBD>RMB,(t_op_gain_main.Ӧ<><D3A6>RMB- t_op_gain_main.<2E>Ѹ<EFBFBD>RMB)'
|
|
|
+' AS δ<><CEB4>RMB,t_op_gain_main.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>,t_op_gain_main.<2E>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>,(t_op_gain_main.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>-t_op_gain_main.<2E>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>)'
|
|
|
+' AS <20>ϼ<EFBFBD>δ<EFBFBD><CEB4>,t_op_gain_main.<2E><><EFBFBD><EFBFBD>USD, t_op_gain_main.<2E><><EFBFBD><EFBFBD>RMB, t_op_gain_main.ë<><C3AB><EFBFBD><EFBFBD>, t_op_gain_main.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
+' FROM t_op_seae left JOIN t_op_gain_main ON t_op_seae.<2E><><EFBFBD><EFBFBD> = t_op_gain_main.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_seae+' and t_op_seae.<2E><><EFBFBD><EFBFBD>=t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+default_sort(53,'t_op_seae','','desc');
|
|
|
|
|
|
str_seai:='SELECT t_op_seai.*, t_op_gain.Ӧ<><D3A6>USD, t_op_gain.<2E><><EFBFBD><EFBFBD>USD,(t_op_gain.Ӧ<><D3A6>USD-t_op_gain.<2E><><EFBFBD><EFBFBD>USD)'
|
|
|
+' AS δ<><CEB4>USD,t_op_gain.Ӧ<><D3A6>RMB, t_op_gain.<2E><><EFBFBD><EFBFBD>RMB,(t_op_gain.Ӧ<><D3A6>RMB-t_op_gain.<2E><><EFBFBD><EFBFBD>RMB)'
|
|
|
+' AS δ<><CEB4>RMB, t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>,t_op_gain.<2E>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>,(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>-t_op_gain.<2E>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>)'
|
|
|
+' AS <20>ϼ<EFBFBD>δ<EFBFBD><CEB4>,t_op_gain.Ӧ<><D3A6>USD, t_op_gain.<2E>Ѹ<EFBFBD>USD, (t_op_gain.Ӧ<><D3A6>USD-t_op_gain.<2E>Ѹ<EFBFBD>USD)'
|
|
|
+' AS δ<><CEB4>USD,t_op_gain.Ӧ<><D3A6>RMB, t_op_gain.<2E>Ѹ<EFBFBD>RMB,(t_op_gain.Ӧ<><D3A6>RMB- t_op_gain.<2E>Ѹ<EFBFBD>RMB)'
|
|
|
+' AS δ<><CEB4>RMB,t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>,t_op_gain.<2E>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>,(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>-t_op_gain.<2E>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>)'
|
|
|
+' AS <20>ϼ<EFBFBD>δ<EFBFBD><CEB4>,t_op_gain.<2E><><EFBFBD><EFBFBD>USD, t_op_gain.<2E><><EFBFBD><EFBFBD>RMB, t_op_gain.ë<><C3AB><EFBFBD><EFBFBD>, t_op_gain.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
+' FROM t_op_seai left JOIN t_op_gain ON t_op_seai.<2E><><EFBFBD><EFBFBD> = t_op_gain.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_seai+default_sort(54,'t_op_seai','','desc');
|
|
|
str_aire:='SELECT t_op_aire.*, t_op_gain.Ӧ<><D3A6>USD, t_op_gain.<2E><><EFBFBD><EFBFBD>USD,(t_op_gain.Ӧ<><D3A6>USD-t_op_gain.<2E><><EFBFBD><EFBFBD>USD)'
|
|
|
+' AS δ<><CEB4>USD,t_op_gain.Ӧ<><D3A6>RMB, t_op_gain.<2E><><EFBFBD><EFBFBD>RMB,(t_op_gain.Ӧ<><D3A6>RMB-t_op_gain.<2E><><EFBFBD><EFBFBD>RMB)'
|
|
|
+' AS δ<><CEB4>RMB, t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>,t_op_gain.<2E>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>,(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>-t_op_gain.<2E>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>)'
|
|
|
+' AS <20>ϼ<EFBFBD>δ<EFBFBD><CEB4>,t_op_gain.Ӧ<><D3A6>USD, t_op_gain.<2E>Ѹ<EFBFBD>USD, (t_op_gain.Ӧ<><D3A6>USD-t_op_gain.<2E>Ѹ<EFBFBD>USD)'
|
|
|
+' AS δ<><CEB4>USD,t_op_gain.Ӧ<><D3A6>RMB, t_op_gain.<2E>Ѹ<EFBFBD>RMB,(t_op_gain.Ӧ<><D3A6>RMB- t_op_gain.<2E>Ѹ<EFBFBD>RMB)'
|
|
|
+' AS δ<><CEB4>RMB,t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>,t_op_gain.<2E>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>,(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>-t_op_gain.<2E>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>)'
|
|
|
+' AS <20>ϼ<EFBFBD>δ<EFBFBD><CEB4>,t_op_gain.<2E><><EFBFBD><EFBFBD>USD, t_op_gain.<2E><><EFBFBD><EFBFBD>RMB, t_op_gain.ë<><C3AB><EFBFBD><EFBFBD>, t_op_gain.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
+' FROM t_op_aire left JOIN t_op_gain ON t_op_aire.<2E><><EFBFBD><EFBFBD> = t_op_gain.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_aire+default_sort(55,'t_op_aire','','desc');
|
|
|
str_airi:='SELECT t_op_airi.*, t_op_gain.Ӧ<><D3A6>USD, t_op_gain.<2E><><EFBFBD><EFBFBD>USD,(t_op_gain.Ӧ<><D3A6>USD-t_op_gain.<2E><><EFBFBD><EFBFBD>USD)'
|
|
|
+' AS δ<><CEB4>USD,t_op_gain.Ӧ<><D3A6>RMB, t_op_gain.<2E><><EFBFBD><EFBFBD>RMB,(t_op_gain.Ӧ<><D3A6>RMB-t_op_gain.<2E><><EFBFBD><EFBFBD>RMB)'
|
|
|
+' AS δ<><CEB4>RMB, t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>,t_op_gain.<2E>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>,(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>-t_op_gain.<2E>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>)'
|
|
|
+' AS <20>ϼ<EFBFBD>δ<EFBFBD><CEB4>,t_op_gain.Ӧ<><D3A6>USD, t_op_gain.<2E>Ѹ<EFBFBD>USD, (t_op_gain.Ӧ<><D3A6>USD-t_op_gain.<2E>Ѹ<EFBFBD>USD)'
|
|
|
+' AS δ<><CEB4>USD,t_op_gain.Ӧ<><D3A6>RMB, t_op_gain.<2E>Ѹ<EFBFBD>RMB,(t_op_gain.Ӧ<><D3A6>RMB- t_op_gain.<2E>Ѹ<EFBFBD>RMB)'
|
|
|
+' AS δ<><CEB4>RMB,t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>,t_op_gain.<2E>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>,(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>-t_op_gain.<2E>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>)'
|
|
|
+' AS <20>ϼ<EFBFBD>δ<EFBFBD><CEB4>,t_op_gain.<2E><><EFBFBD><EFBFBD>USD, t_op_gain.<2E><><EFBFBD><EFBFBD>RMB, t_op_gain.ë<><C3AB><EFBFBD><EFBFBD>, t_op_gain.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
+' FROM t_op_airi left JOIN t_op_gain ON t_op_airi.<2E><><EFBFBD><EFBFBD> = t_op_gain.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_airi+default_sort(56,'t_op_airi','','desc');
|
|
|
end;
|
|
|
2:
|
|
|
begin
|
|
|
str_seae:='SELECT t_op_seae.*, t_op_gain_main.Ӧ<><D3A6>USD, t_op_gain_main.<2E><><EFBFBD><EFBFBD>USD,(t_op_gain_main.Ӧ<><D3A6>USD-t_op_gain_main.<2E><><EFBFBD><EFBFBD>USD)'
|
|
|
+' AS δ<><CEB4>USD,t_op_gain_main.Ӧ<><D3A6>RMB, t_op_gain_main.<2E><><EFBFBD><EFBFBD>RMB,(t_op_gain_main.Ӧ<><D3A6>RMB-t_op_gain_main.<2E><><EFBFBD><EFBFBD>RMB)'
|
|
|
+' AS δ<><CEB4>RMB, t_op_gain_main.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>,t_op_gain_main.<2E>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>,(t_op_gain_main.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>-t_op_gain_main.<2E>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>)'
|
|
|
+' AS <20>ϼ<EFBFBD>δ<EFBFBD><CEB4>,t_op_gain_main.Ӧ<><D3A6>USD, t_op_gain_main.<2E>Ѹ<EFBFBD>USD, (t_op_gain_main.Ӧ<><D3A6>USD-t_op_gain_main.<2E>Ѹ<EFBFBD>USD)'
|
|
|
+' AS δ<><CEB4>USD,t_op_gain_main.Ӧ<><D3A6>RMB, t_op_gain_main.<2E>Ѹ<EFBFBD>RMB,(t_op_gain_main.Ӧ<><D3A6>RMB- t_op_gain_main.<2E>Ѹ<EFBFBD>RMB)'
|
|
|
+' AS δ<><CEB4>RMB,t_op_gain_main.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>,t_op_gain_main.<2E>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>,(t_op_gain_main.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>-t_op_gain_main.<2E>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>)'
|
|
|
+' AS <20>ϼ<EFBFBD>δ<EFBFBD><CEB4>,t_op_gain_main.<2E><><EFBFBD><EFBFBD>USD, t_op_gain_main.<2E><><EFBFBD><EFBFBD>RMB, t_op_gain_main.ë<><C3AB><EFBFBD><EFBFBD>, t_op_gain_main.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
+' FROM t_op_seae left JOIN t_op_gain_main ON t_op_seae.<2E><><EFBFBD><EFBFBD> = t_op_gain_main.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_seae+' and t_op_seae.<2E><><EFBFBD><EFBFBD>=t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+default_sort(53,'t_op_seae','','desc');
|
|
|
|
|
|
str_seai:='SELECT t_op_seai.*, t_op_gain.Ӧ<><D3A6>USD, t_op_gain.<2E><><EFBFBD><EFBFBD>USD,(t_op_gain.Ӧ<><D3A6>USD-t_op_gain.<2E><><EFBFBD><EFBFBD>USD)'
|
|
|
+' AS δ<><CEB4>USD,t_op_gain.Ӧ<><D3A6>RMB, t_op_gain.<2E><><EFBFBD><EFBFBD>RMB,(t_op_gain.Ӧ<><D3A6>RMB-t_op_gain.<2E><><EFBFBD><EFBFBD>RMB)'
|
|
|
+' AS δ<><CEB4>RMB, t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>,t_op_gain.<2E>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>,(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>-t_op_gain.<2E>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>)'
|
|
|
+' AS <20>ϼ<EFBFBD>δ<EFBFBD><CEB4>,t_op_gain.Ӧ<><D3A6>USD, t_op_gain.<2E>Ѹ<EFBFBD>USD, (t_op_gain.Ӧ<><D3A6>USD-t_op_gain.<2E>Ѹ<EFBFBD>USD)'
|
|
|
+' AS δ<><CEB4>USD,t_op_gain.Ӧ<><D3A6>RMB, t_op_gain.<2E>Ѹ<EFBFBD>RMB,(t_op_gain.Ӧ<><D3A6>RMB- t_op_gain.<2E>Ѹ<EFBFBD>RMB)'
|
|
|
+' AS δ<><CEB4>RMB,t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>,t_op_gain.<2E>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>,(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>-t_op_gain.<2E>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>)'
|
|
|
+' AS <20>ϼ<EFBFBD>δ<EFBFBD><CEB4>,t_op_gain.<2E><><EFBFBD><EFBFBD>USD, t_op_gain.<2E><><EFBFBD><EFBFBD>RMB, t_op_gain.ë<><C3AB><EFBFBD><EFBFBD>, t_op_gain.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
+' FROM t_op_seai left JOIN t_op_gain ON t_op_seai.<2E><><EFBFBD><EFBFBD> = t_op_gain.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_seai+default_sort(54,'t_op_seai','','desc');
|
|
|
str_aire:='SELECT t_op_aire.*, t_op_gain.Ӧ<><D3A6>USD, t_op_gain.<2E><><EFBFBD><EFBFBD>USD,(t_op_gain.Ӧ<><D3A6>USD-t_op_gain.<2E><><EFBFBD><EFBFBD>USD)'
|
|
|
+' AS δ<><CEB4>USD,t_op_gain.Ӧ<><D3A6>RMB, t_op_gain.<2E><><EFBFBD><EFBFBD>RMB,(t_op_gain.Ӧ<><D3A6>RMB-t_op_gain.<2E><><EFBFBD><EFBFBD>RMB)'
|
|
|
+' AS δ<><CEB4>RMB, t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>,t_op_gain.<2E>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>,(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>-t_op_gain.<2E>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>)'
|
|
|
+' AS <20>ϼ<EFBFBD>δ<EFBFBD><CEB4>,t_op_gain.Ӧ<><D3A6>USD, t_op_gain.<2E>Ѹ<EFBFBD>USD, (t_op_gain.Ӧ<><D3A6>USD-t_op_gain.<2E>Ѹ<EFBFBD>USD)'
|
|
|
+' AS δ<><CEB4>USD,t_op_gain.Ӧ<><D3A6>RMB, t_op_gain.<2E>Ѹ<EFBFBD>RMB,(t_op_gain.Ӧ<><D3A6>RMB- t_op_gain.<2E>Ѹ<EFBFBD>RMB)'
|
|
|
+' AS δ<><CEB4>RMB,t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>,t_op_gain.<2E>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>,(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>-t_op_gain.<2E>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>)'
|
|
|
+' AS <20>ϼ<EFBFBD>δ<EFBFBD><CEB4>,t_op_gain.<2E><><EFBFBD><EFBFBD>USD, t_op_gain.<2E><><EFBFBD><EFBFBD>RMB, t_op_gain.ë<><C3AB><EFBFBD><EFBFBD>, t_op_gain.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
+' FROM t_op_aire left JOIN t_op_gain ON t_op_aire.<2E><><EFBFBD><EFBFBD> = t_op_gain.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_aire+default_sort(55,'t_op_aire','','desc');
|
|
|
str_airi:='SELECT t_op_airi.*, t_op_gain.Ӧ<><D3A6>USD, t_op_gain.<2E><><EFBFBD><EFBFBD>USD,(t_op_gain.Ӧ<><D3A6>USD-t_op_gain.<2E><><EFBFBD><EFBFBD>USD)'
|
|
|
+' AS δ<><CEB4>USD,t_op_gain.Ӧ<><D3A6>RMB, t_op_gain.<2E><><EFBFBD><EFBFBD>RMB,(t_op_gain.Ӧ<><D3A6>RMB-t_op_gain.<2E><><EFBFBD><EFBFBD>RMB)'
|
|
|
+' AS δ<><CEB4>RMB, t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>,t_op_gain.<2E>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>,(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>-t_op_gain.<2E>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>)'
|
|
|
+' AS <20>ϼ<EFBFBD>δ<EFBFBD><CEB4>,t_op_gain.Ӧ<><D3A6>USD, t_op_gain.<2E>Ѹ<EFBFBD>USD, (t_op_gain.Ӧ<><D3A6>USD-t_op_gain.<2E>Ѹ<EFBFBD>USD)'
|
|
|
+' AS δ<><CEB4>USD,t_op_gain.Ӧ<><D3A6>RMB, t_op_gain.<2E>Ѹ<EFBFBD>RMB,(t_op_gain.Ӧ<><D3A6>RMB- t_op_gain.<2E>Ѹ<EFBFBD>RMB)'
|
|
|
+' AS δ<><CEB4>RMB,t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>,t_op_gain.<2E>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>,(t_op_gain.<2E>ϼ<EFBFBD>Ӧ<EFBFBD><D3A6>-t_op_gain.<2E>ϼ<EFBFBD><CFBC>Ѹ<EFBFBD>)'
|
|
|
+' AS <20>ϼ<EFBFBD>δ<EFBFBD><CEB4>,t_op_gain.<2E><><EFBFBD><EFBFBD>USD, t_op_gain.<2E><><EFBFBD><EFBFBD>RMB, t_op_gain.ë<><C3AB><EFBFBD><EFBFBD>, t_op_gain.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
|
|
|
+' FROM t_op_airi left JOIN t_op_gain ON t_op_airi.<2E><><EFBFBD><EFBFBD> = t_op_gain.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_airi+default_sort(56,'t_op_airi','','desc');
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
case rp_query_bs of
|
|
|
1:
|
|
|
begin
|
|
|
frm_rp_tai_total.p_query_seae.close;
|
|
|
frm_rp_tai_total.p_query_seae.Parameters.ParamByName('SQLStr').value:=str_seae;
|
|
|
frm_rp_tai_total.p_query_seae.Open;
|
|
|
frm_rp_tai_total.p_query_seai.close;
|
|
|
frm_rp_tai_total.p_query_seai.Parameters.ParamByName('SQLStr').value:=str_seai;
|
|
|
frm_rp_tai_total.p_query_seai.Open;
|
|
|
frm_rp_tai_total.p_query_aire.close;
|
|
|
frm_rp_tai_total.p_query_aire.Parameters.ParamByName('SQLStr').value:=str_aire;
|
|
|
frm_rp_tai_total.p_query_aire.Open;
|
|
|
frm_rp_tai_total.p_query_airi.close;
|
|
|
frm_rp_tai_total.p_query_airi.Parameters.ParamByName('SQLStr').value:=str_airi;
|
|
|
frm_rp_tai_total.p_query_airi.Open;
|
|
|
frm_rp_tai_total.p_query_total.close;
|
|
|
frm_rp_tai_total.p_query_total.Parameters.ParamByName('SQLStr').value:=str_total;
|
|
|
frm_rp_tai_total.p_query_total.Open;
|
|
|
end;
|
|
|
2:
|
|
|
begin
|
|
|
frm_rp_rp_total.p_seae.close;
|
|
|
frm_rp_rp_total.p_seae.Parameters.ParamByName('SQLStr').value:=str_seae;
|
|
|
frm_rp_rp_total.p_seae.Open;
|
|
|
frm_rp_rp_total.p_seai.close;
|
|
|
frm_rp_rp_total.p_seai.Parameters.ParamByName('SQLStr').value:=str_seai;
|
|
|
frm_rp_rp_total.p_seai.Open;
|
|
|
frm_rp_rp_total.p_aire.close;
|
|
|
frm_rp_rp_total.p_aire.Parameters.ParamByName('SQLStr').value:=str_aire;
|
|
|
frm_rp_rp_total.p_aire.Open;
|
|
|
frm_rp_rp_total.p_airi.close;
|
|
|
frm_rp_rp_total.p_airi.Parameters.ParamByName('SQLStr').value:=str_airi;
|
|
|
frm_rp_rp_total.p_airi.Open;
|
|
|
end;
|
|
|
3:
|
|
|
begin
|
|
|
frm_rp_zou_total.p_seae.close;
|
|
|
if frm_rp_zou_total.bsSkinCheckRadioBox2.checked then
|
|
|
begin
|
|
|
frm_rp_zou_total.p_seae.Parameters.ParamByName('SQLStr').value:=
|
|
|
'SELECT SUBSTRING(CONVERT(char(15),t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,'
|
|
|
+'SUM(dbo.t_op_gain_main.ë<><C3AB><EFBFBD><EFBFBD>) AS ë<><C3AB><EFBFBD><EFBFBD> FROM t_op_seae inner JOIN t_op_gain_main'
|
|
|
+' ON t_op_seae.<2E><><EFBFBD><EFBFBD> =t_op_gain_main.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_seae
|
|
|
+' GROUP BY SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7)'
|
|
|
+' order by SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, 111), 1, 7)';
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
frm_rp_zou_total.p_seae.Parameters.ParamByName('SQLStr').value:=
|
|
|
'SELECT SUBSTRING(CONVERT(char(15),t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>,111),1,7) AS <20>·<EFBFBD>,'
|
|
|
+'SUM(dbo.t_op_gain_main.ë<><C3AB><EFBFBD><EFBFBD>) AS ë<><C3AB><EFBFBD><EFBFBD> FROM t_op_seae inner JOIN t_op_gain_main'
|
|
|
+' ON t_op_seae.<2E><><EFBFBD><EFBFBD> =t_op_gain_main.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_seae
|
|
|
+' GROUP BY SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>,111),1,7)'
|
|
|
+' order by SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, 111), 1, 7)';
|
|
|
end;
|
|
|
frm_rp_zou_total.p_seae.Open;
|
|
|
frm_rp_zou_total.p_seai.close;
|
|
|
if frm_rp_zou_total.bsSkinCheckRadioBox2.checked then
|
|
|
begin
|
|
|
frm_rp_zou_total.p_seai.Parameters.ParamByName('SQLStr').value:=
|
|
|
'SELECT SUBSTRING(CONVERT(char(15),t_op_seai.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,'
|
|
|
+'SUM(dbo.t_op_gain.ë<><C3AB><EFBFBD><EFBFBD>) AS ë<><C3AB><EFBFBD><EFBFBD> FROM t_op_seai left JOIN t_op_gain'
|
|
|
+' ON t_op_seai.<2E><><EFBFBD><EFBFBD> =t_op_gain.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_seai
|
|
|
+' GROUP BY SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7)'
|
|
|
+' order by SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, 111), 1, 7)';
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
frm_rp_zou_total.p_seai.Parameters.ParamByName('SQLStr').value:=
|
|
|
'SELECT SUBSTRING(CONVERT(char(15),t_op_seai.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>,111),1,7) AS <20>·<EFBFBD>,'
|
|
|
+'SUM(dbo.t_op_gain.ë<><C3AB><EFBFBD><EFBFBD>) AS ë<><C3AB><EFBFBD><EFBFBD> FROM t_op_seai left JOIN t_op_gain'
|
|
|
+' ON t_op_seai.<2E><><EFBFBD><EFBFBD> =t_op_gain.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_seai
|
|
|
+' GROUP BY SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>,111),1,7)'
|
|
|
+' order by SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, 111), 1, 7)';
|
|
|
end;
|
|
|
frm_rp_zou_total.p_seai.Open;
|
|
|
frm_rp_zou_total.p_aire.close;
|
|
|
if frm_rp_zou_total.bsSkinCheckRadioBox2.checked then
|
|
|
begin
|
|
|
frm_rp_zou_total.p_aire.Parameters.ParamByName('SQLStr').value:=
|
|
|
'SELECT SUBSTRING(CONVERT(char(15),t_op_aire.һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,'
|
|
|
+'SUM(dbo.t_op_gain.ë<><C3AB><EFBFBD><EFBFBD>) AS ë<><C3AB><EFBFBD><EFBFBD> FROM t_op_aire left JOIN t_op_gain'
|
|
|
+' ON t_op_aire.<2E><><EFBFBD><EFBFBD> =t_op_gain.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_aire
|
|
|
+' GROUP BY SUBSTRING(CONVERT(char(15),һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7)'
|
|
|
+' order by SUBSTRING(CONVERT(char(15),һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, 111), 1, 7)';
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
frm_rp_zou_total.p_aire.Parameters.ParamByName('SQLStr').value:=
|
|
|
'SELECT SUBSTRING(CONVERT(char(15),t_op_aire.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>,111),1,7) AS <20>·<EFBFBD>,'
|
|
|
+'SUM(dbo.t_op_gain.ë<><C3AB><EFBFBD><EFBFBD>) AS ë<><C3AB><EFBFBD><EFBFBD> FROM t_op_aire left JOIN t_op_gain'
|
|
|
+' ON t_op_aire.<2E><><EFBFBD><EFBFBD> =t_op_gain.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_aire
|
|
|
+' GROUP BY SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>,111),1,7)'
|
|
|
+' order by SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, 111), 1, 7)';
|
|
|
end;
|
|
|
frm_rp_zou_total.p_aire.Open;
|
|
|
frm_rp_zou_total.p_airi.close;
|
|
|
if frm_rp_zou_total.bsSkinCheckRadioBox2.checked then
|
|
|
begin
|
|
|
frm_rp_zou_total.p_airi.Parameters.ParamByName('SQLStr').value:=
|
|
|
'SELECT SUBSTRING(CONVERT(char(15),t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,'
|
|
|
+'SUM(dbo.t_op_gain.ë<><C3AB><EFBFBD><EFBFBD>) AS ë<><C3AB><EFBFBD><EFBFBD> FROM t_op_airi left JOIN t_op_gain'
|
|
|
+' ON t_op_airi.<2E><><EFBFBD><EFBFBD> =t_op_gain.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_airi
|
|
|
+' GROUP BY SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7)'
|
|
|
+' order by SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, 111), 1, 7)';
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
frm_rp_zou_total.p_airi.Parameters.ParamByName('SQLStr').value:=
|
|
|
'SELECT SUBSTRING(CONVERT(char(15),t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>,111),1,7) AS <20>·<EFBFBD>,'
|
|
|
+'SUM(dbo.t_op_gain.ë<><C3AB><EFBFBD><EFBFBD>) AS ë<><C3AB><EFBFBD><EFBFBD> FROM t_op_airi left JOIN t_op_gain'
|
|
|
+' ON t_op_airi.<2E><><EFBFBD><EFBFBD> =t_op_gain.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_airi
|
|
|
+' GROUP BY SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>,111),1,7)'
|
|
|
+' order by SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, 111), 1, 7)';
|
|
|
end;
|
|
|
frm_rp_zou_total.p_airi.Open;
|
|
|
frm_rp_zou_total.p_total.close;
|
|
|
if frm_rp_zou_total.bsSkinCheckRadioBox2.checked then
|
|
|
begin
|
|
|
frm_rp_zou_total.p_total.Parameters.ParamByName('SQLStr').value:=
|
|
|
'SELECT SUBSTRING(CONVERT(char(15),v_op_no.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7) AS <20>·<EFBFBD>,'
|
|
|
+'SUM(dbo.t_op_gain.ë<><C3AB><EFBFBD><EFBFBD>) AS ë<><C3AB><EFBFBD><EFBFBD> FROM v_op_no left JOIN t_op_gain'
|
|
|
+' ON v_op_no.<2E><><EFBFBD><EFBFBD> =t_op_gain.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_all
|
|
|
+' GROUP BY SUBSTRING(CONVERT(char(15),ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7)'
|
|
|
+' order by SUBSTRING(CONVERT(char(15),ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, 111), 1, 7)';
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
frm_rp_zou_total.p_total.Parameters.ParamByName('SQLStr').value:=
|
|
|
'SELECT SUBSTRING(CONVERT(char(15),v_op_no.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>,111),1,7) AS <20>·<EFBFBD>,'
|
|
|
+'SUM(dbo.t_op_gain.ë<><C3AB><EFBFBD><EFBFBD>) AS ë<><C3AB><EFBFBD><EFBFBD> FROM v_op_no left JOIN t_op_gain'
|
|
|
+' ON v_op_no.<2E><><EFBFBD><EFBFBD> =t_op_gain.<2E><><EFBFBD><EFBFBD> '
|
|
|
+str_all
|
|
|
+' GROUP BY SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>,111),1,7)'
|
|
|
+' order by SUBSTRING(CONVERT(char(15),<2C><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, 111), 1, 7)';
|
|
|
end;
|
|
|
frm_rp_zou_total.p_total.Open;
|
|
|
end;
|
|
|
4:
|
|
|
begin
|
|
|
fen_total_str:=str_all;
|
|
|
end;
|
|
|
end;
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_rp_query.wwDBComboBox17KeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
if key=#13 then
|
|
|
begin
|
|
|
key:=#0;
|
|
|
frm_rp_query.bsSkinButton1Click(Sender);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
end.
|