You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

579 lines
30 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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;
Label53: TLabel;
wwDBComboBox57: TwwDBComboBox;
wwDBComboBox58: TwwDBComboBox;
Label2: TLabel;
Label3: TLabel;
wwDBComboBox4: TwwDBComboBox;
wwDBDateTimePicker5: TwwDBDateTimePicker;
wwDBComboBox5: TwwDBComboBox;
wwDBDateTimePicker6: TwwDBDateTimePicker;
RxDBLookupCombo19: TRxDBLookupCombo;
Label75: 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;
wwDBComboBox38.text:='';
wwDBDateTimePicker5.Clear;
wwDBDateTimePicker6.Clear;
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>';
wwDBComboBox57.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox4.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox5.text:='С<><D0A1>';
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);
if RxDBLookupCombo19.DisplayValues[1]<>'' then
begin
if str_seae='' then
str_seae:='where ί<>е<EFBFBD>λ in (select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client where <20>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>='''+RxDBLookupCombo19.DisplayValues[1]+''') '
else
str_seae:=str_seae+' and ί<>е<EFBFBD>λ in (select <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> from t_crm_client where <20>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>='''+RxDBLookupCombo19.DisplayValues[1]+''') '
end;
if rp_query_limited<>'no'then
begin
if trim(str_seae)='' then
begin
str_seai:='where '+open_data(rp_query_limited,'t_op_seai.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','t_op_seai.<2E>ͷ<EFBFBD>Ա','no','no');
end
else
begin
str_seai:=str_seae+' and '+open_data(rp_query_limited,'t_op_seai.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','t_op_seai.<2E>ͷ<EFBFBD>Ա','no','no');
end;
if trim(str_seae)='' then
begin
str_aire:='where '+open_data(rp_query_limited,'t_op_aire.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','t_op_aire.<2E>ͷ<EFBFBD>Ա','no','no');
end
else
begin
str_aire:=str_seae+' and '+open_data(rp_query_limited,'t_op_aire.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','t_op_aire.<2E>ͷ<EFBFBD>Ա','no','no');
end;
if trim(str_seae)='' then
begin
str_airi:='where '+open_data(rp_query_limited,'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','t_op_airi.<2E>ͷ<EFBFBD>Ա','no','no');
end
else
begin
str_airi:=str_seae+' and '+open_data(rp_query_limited,'t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','t_op_airi.<2E>ͷ<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>Ա','no','no');
end
else
begin
str_all:=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_seae:='where '+open_data(rp_query_limited,'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','t_op_seae.<2E>ͷ<EFBFBD>Ա','no','no');
end
else
begin
str_seae:=str_seae+' and '+open_data(rp_query_limited,'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD>Ա','t_op_seae.<2E>ͷ<EFBFBD>Ա','no','no');
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);
str_seae:=query_tiaojian(1,str_seae,'<27>Ƿ<EFBFBD>ռ<EFBFBD><D5BC>',wwDBComboBox57.text,wwDBComboBox58.Value);
str_seae:=query_tiaojian(1,str_seae,'Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox4.text,wwDBDateTimePicker5.text);
str_seae:=query_tiaojian(1,str_seae,'Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox5.text,wwDBDateTimePicker6.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);
str_seae:=query_tiaojian(1,str_seae,'<27>Ƿ<EFBFBD>ռ<EFBFBD><D5BC>',wwDBComboBox57.text,wwDBComboBox58.Value);
str_seae:=query_tiaojian(1,str_seae,'Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox4.text,wwDBDateTimePicker5.text);
str_seae:=query_tiaojian(1,str_seae,'Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox5.text,wwDBDateTimePicker6.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>,t_crm_client_class.<2E>ͻ<EFBFBD><CDBB>ȼ<EFBFBD>,(select top 1 <20>ͻ<EFBFBD>ȫ<EFBFBD><C8AB> from t_crm_client where <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=t_op_seae.ί<>е<EFBFBD>λ) ί<>е<EFBFBD>λȫ<CEBB><C8AB>'
+' FROM t_op_seae left JOIN t_op_gain_main ON t_op_seae.<2E><><EFBFBD><EFBFBD> = t_op_gain_main.<2E><><EFBFBD><EFBFBD> '
+' left join t_crm_client_class on t_op_seae.ί<>е<EFBFBD>λ=t_crm_client_class.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and t_crm_client_class.<2E><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><=t_op_seae.Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and convert(varchar(100),t_op_seae.Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,23)<=t_crm_client_class.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and t_crm_client_class.״̬=''<27><><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>,t_crm_client_class.<2E>ͻ<EFBFBD><CDBB>ȼ<EFBFBD>'
+' FROM t_op_seai left JOIN t_op_gain ON t_op_seai.<2E><><EFBFBD><EFBFBD> = t_op_gain.<2E><><EFBFBD><EFBFBD> '
+' left join t_crm_client_class on t_op_seai.ί<>е<EFBFBD>λ=t_crm_client_class.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and t_crm_client_class.<2E><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><=t_op_seai.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and t_op_seai.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><=t_crm_client_class.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and t_crm_client_class.״̬=''<27><><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>,t_crm_client_class.<2E>ͻ<EFBFBD><CDBB>ȼ<EFBFBD>'
+' FROM t_op_aire left JOIN t_op_gain ON t_op_aire.<2E><><EFBFBD><EFBFBD> = t_op_gain.<2E><><EFBFBD><EFBFBD> '
+' left join t_crm_client_class on t_op_aire.ί<>е<EFBFBD>λ=t_crm_client_class.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and t_crm_client_class.<2E><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><=t_op_aire.һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and t_op_aire.һ<>̿<EFBFBD><CCBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><=t_crm_client_class.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and t_crm_client_class.״̬=''<27><><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>,t_crm_client_class.<2E>ͻ<EFBFBD><CDBB>ȼ<EFBFBD>'
+' FROM t_op_airi left JOIN t_op_gain ON t_op_airi.<2E><><EFBFBD><EFBFBD> = t_op_gain.<2E><><EFBFBD><EFBFBD> '
+' left join t_crm_client_class on t_op_airi.ί<>е<EFBFBD>λ=t_crm_client_class.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> and t_crm_client_class.<2E><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><=t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and t_op_airi.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><=t_crm_client_class.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> and t_crm_client_class.״̬=''<27><><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 if frm_rp_zou_total.bsSkinCheckRadioBox5.checked then
begin
frm_rp_zou_total.p_seae.Parameters.ParamByName('SQLStr').value:=
'SELECT SUBSTRING(CONVERT(char(15),t_op_seae.Ԥ<><D4A4><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),Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,111),1,7)'
+' order by SUBSTRING(CONVERT(char(15),Ԥ<><D4A4><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.