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.

2382 lines
133 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_seae_query;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, dxExEdtr, DB, ADODB, BusinessSkinForm, wwdblook, dxDBCtrl,
dxDBGrid, dxTL, dxDBTLCl, dxGrClms, dxCntner, RxLookup,
wwdbdatetimepicker, StdCtrls, Mask, wwdbedit, Wwdotdot, Wwdbcomb,
bsSkinCtrls, ComCtrls, bsSkinTabs;
type
Tfrm_rp_seae_query = class(TForm)
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
bsSkinGroupBox1: TbsSkinGroupBox;
bsSkinPanel1: TbsSkinPanel;
bsSkinButton2: TbsSkinButton;
bsSkinButton4: TbsSkinButton;
bsSkinPanel2: TbsSkinPanel;
Label33: TLabel;
Label34: TLabel;
Label35: TLabel;
Label36: TLabel;
RxDBLookupCombo14: TRxDBLookupCombo;
wwDBComboBox39: TwwDBComboBox;
wwDBComboBox40: TwwDBComboBox;
query_bit: TwwDBComboBox;
query_str_int: TEdit;
query_date: TwwDBDateTimePicker;
RxDBLookupList1: TRxDBLookupList;
bsSkinGroupBox2: TbsSkinGroupBox;
bsSkinPanel3: TbsSkinPanel;
bsSkinButton3: TbsSkinButton;
bsSkinButton7: TbsSkinButton;
bsSkinButton6: TbsSkinButton;
bsSkinButton9: TbsSkinButton;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column1: TdxDBGridPickColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridPickColumn;
dxDBGrid1Column4: TdxDBGridMaskColumn;
dxDBGrid2: TdxDBGrid;
dxDBGrid2SQ_ID: TdxDBGridMaskColumn;
bsSkinTabSheet2: TbsSkinTabSheet;
bsSkinButton10: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
bsSkinButton1: TbsSkinButton;
bsBusinessSkinForm1: TbsBusinessSkinForm;
t_sys_queryfields: TADOQuery;
t_sys_queryfields1: TDataSource;
t_sys_query_detail1: TDataSource;
t_sys_query: TADOQuery;
t_sys_query1: TDataSource;
t_sys_query_detail: TADOQuery;
bsSkinGroupBox3: TbsSkinGroupBox;
Label6: TLabel;
wwDBComboBox15: TwwDBComboBox;
Edit1: TEdit;
Label3: TLabel;
wwDBComboBox4: TwwDBComboBox;
Edit4: TEdit;
Edit3: TEdit;
wwDBComboBox5: TwwDBComboBox;
Label2: TLabel;
Edit2: TEdit;
wwDBComboBox16: TwwDBComboBox;
Label1: TLabel;
Label27: TLabel;
wwDBComboBox33: TwwDBComboBox;
Edit5: TEdit;
Label29: TLabel;
wwDBComboBox34: TwwDBComboBox;
Edit6: TEdit;
wwDBComboBox2: TwwDBComboBox;
wwDBComboBox7: TwwDBComboBox;
Label4: TLabel;
wwDBComboBox17: TwwDBComboBox;
Label7: TLabel;
wwDBComboBox1: TwwDBComboBox;
Label10: TLabel;
wwDBComboBox18: TwwDBComboBox;
wwDBDateTimePicker1: TwwDBDateTimePicker;
Label5: TLabel;
wwDBComboBox6: TwwDBComboBox;
wwDBDateTimePicker2: TwwDBDateTimePicker;
wwDBDateTimePicker4: TwwDBDateTimePicker;
wwDBComboBox11: TwwDBComboBox;
Label11: TLabel;
wwDBDateTimePicker3: TwwDBDateTimePicker;
wwDBComboBox19: TwwDBComboBox;
Label8: TLabel;
Label28: TLabel;
wwDBComboBox20: TwwDBComboBox;
wwDBComboBox3: TwwDBComboBox;
Label21: TLabel;
wwDBComboBox10: TwwDBComboBox;
RxDBLookupCombo20: TRxDBLookupCombo;
RxDBLookupCombo1: TRxDBLookupCombo;
wwDBComboBox9: TwwDBComboBox;
Label12: TLabel;
RxDBLookupCombo2: TRxDBLookupCombo;
wwDBComboBox21: TwwDBComboBox;
Label9: TLabel;
Label19: TLabel;
wwDBComboBox22: TwwDBComboBox;
RxDBLookupCombo9: TRxDBLookupCombo;
wwDBComboBox8: TwwDBComboBox;
Label18: TLabel;
RxDBLookupCombo8: TRxDBLookupCombo;
RxDBLookupCombo7: TRxDBLookupCombo;
wwDBComboBox12: TwwDBComboBox;
Label17: TLabel;
Label26: TLabel;
wwDBComboBox32: TwwDBComboBox;
RxDBLookupCombo13: TRxDBLookupCombo;
Edit7: TEdit;
wwDBComboBox35: TwwDBComboBox;
Label30: TLabel;
Label32: TLabel;
wwDBComboBox38: TwwDBComboBox;
Edit9: TEdit;
RxDBLookupCombo10: TRxDBLookupCombo;
wwDBComboBox28: TwwDBComboBox;
Label22: TLabel;
Label23: TLabel;
wwDBComboBox29: TwwDBComboBox;
RxDBLookupCombo12: TRxDBLookupCombo;
RxDBLookupCombo3: TRxDBLookupCombo;
wwDBComboBox14: TwwDBComboBox;
Label14: TLabel;
RxDBLookupCombo6: TRxDBLookupCombo;
wwDBComboBox25: TwwDBComboBox;
Label16: TLabel;
Label15: TLabel;
wwDBComboBox24: TwwDBComboBox;
RxDBLookupCombo4: TRxDBLookupCombo;
wwDBLookupCombo52: TwwDBLookupCombo;
wwDBComboBox27: TwwDBComboBox;
Label124: TLabel;
Label20: TLabel;
wwDBComboBox26: TwwDBComboBox;
wwDBLookupCombo3: TwwDBLookupCombo;
Edit8: TEdit;
wwDBComboBox37: TwwDBComboBox;
Label31: TLabel;
wwDBComboBox36: TwwDBComboBox;
wwDBLookupCombo49: TwwDBLookupCombo;
Label125: TLabel;
RxDBLookupCombo11: TRxDBLookupCombo;
wwDBComboBox23: TwwDBComboBox;
Label24: TLabel;
bsSkinGroupBox4: TbsSkinGroupBox;
Label13: TLabel;
wwDBComboBox13: TwwDBComboBox;
RxDBLookupCombo5: TRxDBLookupCombo;
Label25: TLabel;
wwDBComboBox30: TwwDBComboBox;
wwDBComboBox31: TwwDBComboBox;
RxDBLookupCombo15: TRxDBLookupCombo;
Label37: TLabel;
wwDBComboBox41: TwwDBComboBox;
Label38: TLabel;
wwDBComboBox42: TwwDBComboBox;
RxDBLookupCombo16: TRxDBLookupCombo;
Label39: TLabel;
wwDBComboBox43: TwwDBComboBox;
Edit10: TEdit;
Label40: TLabel;
wwDBComboBox44: TwwDBComboBox;
Edit11: TEdit;
wwDBComboBox46: TwwDBComboBox;
Label41: TLabel;
Label42: TLabel;
wwDBComboBox45: TwwDBComboBox;
wwDBDateTimePicker5: TwwDBDateTimePicker;
Label43: TLabel;
wwDBComboBox47: TwwDBComboBox;
wwDBDateTimePicker6: TwwDBDateTimePicker;
Label44: TLabel;
wwDBComboBox48: TwwDBComboBox;
wwDBDateTimePicker7: TwwDBDateTimePicker;
Label45: TLabel;
wwDBComboBox49: TwwDBComboBox;
wwDBDateTimePicker8: TwwDBDateTimePicker;
Label46: TLabel;
wwDBComboBox50: TwwDBComboBox;
wwDBDateTimePicker9: TwwDBDateTimePicker;
Label47: TLabel;
wwDBComboBox51: TwwDBComboBox;
wwDBDateTimePicker10: TwwDBDateTimePicker;
Label48: TLabel;
Edit12: TEdit;
dxDBGrid1Column5: TdxDBGridColumn;
dxDBGrid2Column2: TdxDBGridColumn;
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
procedure RxDBLookupCombo14Change(Sender: TObject);
procedure bsSkinButton2Click(Sender: TObject);
procedure bsSkinButton4Click(Sender: TObject);
procedure RxDBLookupList1DblClick(Sender: TObject);
procedure wwDBComboBox15KeyPress(Sender: TObject; var Key: Char);
procedure t_sys_queryAfterInsert(DataSet: TDataSet);
procedure bsSkinButton6Click(Sender: TObject);
procedure bsSkinButton9Click(Sender: TObject);
procedure t_sys_query_detailBeforePost(DataSet: TDataSet);
procedure t_sys_query_detailAfterScroll(DataSet: TDataSet);
procedure do_1(str_bill:widestring);
procedure do_12(str_bill:widestring);
procedure do_2(str_bill:widestring);
procedure do_22(str_bill:widestring);
private
noaccept,nopay:boolean;
{ Private declarations }
public
{ Public declarations }
end;
var
frm_rp_seae_query: Tfrm_rp_seae_query;
rp_seae_query_num,rp_seae_query_type:integer;
rp_seae_query_str,rp_seae_query_limited:string;
implementation
uses u_main, u_data_share, my_sys_function, u_rp_no_seae_accept,
u_rp_in_seae, u_sys_progress, u_rp_in_seae_zf;
{$R *.dfm}
procedure Tfrm_rp_seae_query.do_2(str_bill:widestring);
begin
frm_rp_in_seae.p_bill.close;
frm_rp_in_seae.p_bill.Parameters.ParamByName('SQLStr').value:=
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) as Ӧ<><D3A6>USD,'
+'SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>'
+' else 0 end) as <20>ѿ<EFBFBD>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0)'
+' else 0 end) as δ<><CEB4>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as Ӧ<><D3A6>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as <20>ѿ<EFBFBD>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then 0'
+' else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0))*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+' sum(v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20>ѿ<EFBFBD><D1BF>ϼ<EFBFBD>,'
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0))*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'
+' FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+' left join v_fee_do_inv on v_fee_do_inv.CH_ID=t_ch_fee.CH_ID '
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' GROUP BY t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10,t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD> '
+default_sort_two(53,'t_op_seae','t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>','','');
frm_rp_in_seae.p_bill.open;
frm_rp_in_seae.p_client.close;
frm_rp_in_seae.p_client.Parameters.ParamByName('SQLStr').value:=
'SELECT t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) as Ӧ<><D3A6>USD,'
+'SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>'
+' else 0 end) as <20>ѿ<EFBFBD>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0)'
+' else 0 end) as δ<><CEB4>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as Ӧ<><D3A6>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as <20>ѿ<EFBFBD>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then 0'
+' else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0))*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+' sum(v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20>ѿ<EFBFBD><D1BF>ϼ<EFBFBD>,'
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0))*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>'
+' FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+' left join v_fee_do_inv on v_fee_do_inv.CH_ID=t_ch_fee.CH_ID '
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' GROUP BY t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
+' order by t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
frm_rp_in_seae.p_client.open;
frm_rp_in_seae.p_sales.close;
frm_rp_in_seae.p_sales.Parameters.ParamByName('SQLStr').value:=
'SELECT t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) as Ӧ<><D3A6>USD,'
+'SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>'
+' else 0 end) as <20>ѿ<EFBFBD>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0)'
+' else 0 end) as δ<><CEB4>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as Ӧ<><D3A6>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as <20>ѿ<EFBFBD>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then 0'
+' else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0))*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+' sum(v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20>ѿ<EFBFBD><D1BF>ϼ<EFBFBD>,'
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0))*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>'
+' FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+' left join v_fee_do_inv on v_fee_do_inv.CH_ID=t_ch_fee.CH_ID '
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' GROUP BY t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
+' order by t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
frm_rp_in_seae.p_sales.open;
frm_rp_in_seae.p_acc_monthttl.close;
frm_rp_in_seae.p_acc_monthttl.Parameters.ParamByName('SQLStr').value:=
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD>,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) as Ӧ<><D3A6>USD,'
+'SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>'
+' else 0 end) as <20>ѿ<EFBFBD>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0)'
+' else 0 end) as δ<><CEB4>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as Ӧ<><D3A6>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as <20>ѿ<EFBFBD>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then 0'
+' else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0))*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+' sum(v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20>ѿ<EFBFBD><D1BF>ϼ<EFBFBD>,'
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0))*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>'
+' FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+' left join v_fee_do_inv on v_fee_do_inv.CH_ID=t_ch_fee.CH_ID '
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' GROUP BY t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD>'
+' order by t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD>';
frm_rp_in_seae.p_acc_monthttl.open;
frm_rp_in_seae.p_in_monthttl.Parameters.ParamByName('SQLStr').value:=
'SELECT v_fee_do_inv.<2E><>Ʊ<EFBFBD>·<EFBFBD>,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) as Ӧ<><D3A6>USD,'
+'SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>'
+' else 0 end) as <20>ѿ<EFBFBD>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0)'
+' else 0 end) as δ<><CEB4>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as Ӧ<><D3A6>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as <20>ѿ<EFBFBD>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then 0'
+' else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0))*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+' sum(v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20>ѿ<EFBFBD><D1BF>ϼ<EFBFBD>,'
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0))*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>'
+' FROM v_fee_do_inv inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=v_fee_do_inv.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '
+' left join t_ch_fee on t_ch_fee.CH_ID=v_fee_do_inv.CH_ID '
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' GROUP BY v_fee_do_inv.<2E><>Ʊ<EFBFBD>·<EFBFBD>'
+' order by v_fee_do_inv.<2E><>Ʊ<EFBFBD>·<EFBFBD>';
frm_rp_in_seae.p_in_monthttl.open;
end;
procedure Tfrm_rp_seae_query.do_22(str_bill:widestring);
begin
frm_rp_in_seae_zf.p_bill.close;
frm_rp_in_seae_zf.p_bill.Parameters.ParamByName('SQLStr').value:=
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) as Ӧ<><D3A6>USD,'
+'SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>'
+' else 0 end) as <20><><EFBFBD><EFBFBD>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0)'
+' else 0 end) as δ<><CEB4>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as Ӧ<><D3A6>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as <20><><EFBFBD><EFBFBD>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then 0'
+' else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0))*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+' sum(v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20><><EFBFBD>Ϻϼ<CFBA>,'
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0))*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'
+' FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+' left join v_fee_do_inv_del on v_fee_do_inv_del.CH_ID=t_ch_fee.CH_ID '
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' GROUP BY t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10,t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD> '
+default_sort_two(53,'t_op_seae','t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>','','');
frm_rp_in_seae_zf.p_bill.open;
frm_rp_in_seae_zf.p_client.close;
frm_rp_in_seae_zf.p_client.Parameters.ParamByName('SQLStr').value:=
'SELECT t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) as Ӧ<><D3A6>USD,'
+'SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>'
+' else 0 end) as <20><><EFBFBD><EFBFBD>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0)'
+' else 0 end) as δ<><CEB4>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as Ӧ<><D3A6>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as <20><><EFBFBD><EFBFBD>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then 0'
+' else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0))*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+' sum(v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20><><EFBFBD>Ϻϼ<CFBA>,'
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0))*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>'
+' FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+' left join v_fee_do_inv_del on v_fee_do_inv_del.CH_ID=t_ch_fee.CH_ID '
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' GROUP BY t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>'
+' order by t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
frm_rp_in_seae_zf.p_client.open;
frm_rp_in_seae_zf.p_sales.close;
frm_rp_in_seae_zf.p_sales.Parameters.ParamByName('SQLStr').value:=
'SELECT t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) as Ӧ<><D3A6>USD,'
+'SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>'
+' else 0 end) as <20><><EFBFBD><EFBFBD>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0)'
+' else 0 end) as δ<><CEB4>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as Ӧ<><D3A6>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as <20><><EFBFBD><EFBFBD>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then 0'
+' else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0))*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+' sum(v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20><><EFBFBD>Ϻϼ<CFBA>,'
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0))*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>'
+' FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+' left join v_fee_do_inv_del on v_fee_do_inv_del.CH_ID=t_ch_fee.CH_ID '
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' GROUP BY t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
+' order by t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
frm_rp_in_seae_zf.p_sales.open;
frm_rp_in_seae_zf.p_acc_monthttl.close;
frm_rp_in_seae_zf.p_acc_monthttl.Parameters.ParamByName('SQLStr').value:=
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD>,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) as Ӧ<><D3A6>USD,'
+'SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>'
+' else 0 end) as <20><><EFBFBD><EFBFBD>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0)'
+' else 0 end) as δ<><CEB4>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as Ӧ<><D3A6>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as <20><><EFBFBD><EFBFBD>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then 0'
+' else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0))*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+' sum(v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20><><EFBFBD>Ϻϼ<CFBA>,'
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0))*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>'
+' FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+' left join v_fee_do_inv_del on v_fee_do_inv_del.CH_ID=t_ch_fee.CH_ID '
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' GROUP BY t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD>'
+' order by t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD>';
frm_rp_in_seae_zf.p_acc_monthttl.open;
frm_rp_in_seae_zf.p_in_monthttl.Parameters.ParamByName('SQLStr').value:=
'SELECT v_fee_do_inv_del.<2E><>Ʊ<EFBFBD>·<EFBFBD>,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) as Ӧ<><D3A6>USD,'
+'SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>'
+' else 0 end) as <20><><EFBFBD><EFBFBD>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0)'
+' else 0 end) as δ<><CEB4>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as Ӧ<><D3A6>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as <20><><EFBFBD><EFBFBD>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then 0'
+' else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0))*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+' sum(v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20><><EFBFBD>Ϻϼ<CFBA>,'
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-isnull(v_fee_do_inv_del.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>,0))*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>'
+' FROM v_fee_do_inv_del inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=v_fee_do_inv_del.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '
+' left join t_ch_fee on t_ch_fee.CH_ID=v_fee_do_inv_del.CH_ID '
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' GROUP BY v_fee_do_inv_del.<2E><>Ʊ<EFBFBD>·<EFBFBD>'
+' order by v_fee_do_inv_del.<2E><>Ʊ<EFBFBD>·<EFBFBD>';
frm_rp_in_seae_zf.p_in_monthttl.open;
end;
procedure Tfrm_rp_seae_query.do_1(str_bill:widestring);
var
sqltext,constr:widestring;
DBQueryThread1,DBQueryThread2,DBQueryThread3,DBQueryThread4,DBQueryThread5,DBQueryThread6,DBQueryThread7:TDBQueryThread;
W: DWord;
H: THandle;
begin
{
try
if not ASSIGNED(frm_sys_progress) then
frm_sys_progress:=tfrm_sys_progress.Create(application);
frm_sys_progress.Show;
frm_sys_progress.bsSkinGauge1.MaxValue:=7;
frm_sys_progress.bsSkinGauge1.MinValue:=0;
frm_sys_progress.bsSkinGauge1.Value:=0;
frm_sys_progress.Update;
}
frm_rp_no_seae.p_accept_bill.close;
frm_rp_no_seae.p_accept_bill.Parameters.ParamByName('SQLStr').value:=
// sqltext:=
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD>,CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' THEN t_ch_fee.<2E><>ע ELSE t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> END <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD>,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) as Ӧ<><D3A6>USD,'
+'SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
+' else 0 end) as <20><><EFBFBD><EFBFBD>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
+' else 0 end) as δ<><CEB4>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as Ӧ<><D3A6>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as <20><><EFBFBD><EFBFBD>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then 0'
+' else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<>պϼ<D5BA>,'
+' sum(t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20><><EFBFBD>պϼ<D5BA>,'
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<>պϼ<D5BA>,'
+' MAX(t_ch_fee.<2E><><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD>, '
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD><EFBFBD><ECB5A5>,'
+'case when round(case when t_op_seae.<2E><><EFBFBD><EFBFBD> / 1000 > t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD> / 1000 '
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end, 4) > 1 then round(case when t_op_seae.<2E><><EFBFBD><EFBFBD> / 1000 > t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD> / 1000 '
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end, 4) '
+'else 1 end as <20>ƷѶ<C6B7>,'
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>,'
+'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>,t_crm_client.<2E>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>,t_crm_client.<2E><><EFBFBD>̱<EFBFBD><CCB1><EFBFBD>'
+' FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+' left join t_op_gain on t_op_gain.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+' left join t_crm_client on (t_crm_client.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> OR t_crm_client.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>) and ISNULL(t_crm_client.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,'''')<>'''' '
+' left join t_crm_client_class on t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><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_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' GROUP BY t_ch_fee.<2E><><EFBFBD><EFBFBD>, CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' THEN t_ch_fee.<2E><>ע ELSE t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> END,t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD>,'
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10,t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD><EFBFBD><ECB5A5>,'
+'case when round(case when t_op_seae.<2E><><EFBFBD><EFBFBD> / 1000 > t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD> / 1000 '
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end, 4) > 1 then round(case when t_op_seae.<2E><><EFBFBD><EFBFBD> / 1000 > t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD> / 1000 '
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end, 4) '
+'else 1 end,'
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>, '
+'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>,t_crm_client.<2E>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>,t_crm_client.<2E><><EFBFBD>̱<EFBFBD><CCB1><EFBFBD>'
+' order by t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5> ';
constr:=connect_string('main.ini');
frm_rp_no_seae.p_accept_bill.ConnectionString:=constr;
frm_rp_no_seae.p_accept_bill.Open;
// frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
// constr:=connect_string('main.ini');
// frm_rp_no_seae.p_accept_bill.ConnectionString:=constr;
// DBQueryThread1:=TDBQueryThread.Create(frm_rp_no_seae.p_accept_bill,sqltext,frm_rp_no_seae.p_accept_bill1);
frm_rp_no_seae.p_accept_fee.close;
frm_rp_no_seae.p_accept_fee.Parameters.ParamByName('SQLStr').value:=
// sqltext:=
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD>,CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' THEN t_ch_fee.<2E><>ע ELSE t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> END <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>, t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee.<2E>ұ<EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD> as Ӧ<>ս<EFBFBD><D5BD><EFBFBD>,'
+'t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> as <20><><EFBFBD>ս<EFBFBD><D5BD><EFBFBD>,(t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) as δ<>ս<EFBFBD><D5BD><EFBFBD>,'
+'t_ch_fee.<2E><>׼ as <20><>׼,t_ch_fee.<2E><><EFBFBD><EFBFBD> as <20><><EFBFBD><EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD> as <20><><EFBFBD><EFBFBD>,t_ch_fee.<2E><>ע as <20><><EFBFBD>ñ<EFBFBD>ע,'
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10,t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD><EFBFBD><ECB5A5>,'
+'case when round(case when t_op_seae.<2E><><EFBFBD><EFBFBD> / 1000 > t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD> / 1000 '
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end, 4) > 1 then round(case when t_op_seae.<2E><><EFBFBD><EFBFBD> / 1000 > t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD> / 1000 '
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end, 4) '
+'else 1 end as <20>ƷѶ<C6B7>,'
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD> FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' order by t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5> OPTION (FORCE ORDER)';
frm_rp_no_seae.p_accept_fee.ConnectionString:=constr;
frm_rp_no_seae.p_accept_fee.Open;
// frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
// DBQueryThread2:=TDBQueryThread.Create(frm_rp_no_seae.p_accept_fee,sqltext,frm_rp_no_seae.p_accept_fee1);
frm_rp_no_seae.p_pay_bill.close;
frm_rp_no_seae.p_pay_bill.Parameters.ParamByName('SQLStr').value:=
// sqltext:=
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD>,CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' THEN t_ch_fee.<2E><>ע ELSE t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> END <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD>,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) as Ӧ<><D3A6>USD,'
+'SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
+' else 0 end) as <20>Ѹ<EFBFBD>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
+' else 0 end) as δ<><CEB4>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as Ӧ<><D3A6>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as <20>Ѹ<EFBFBD>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then 0'
+' else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+' sum(t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
+' MAX(t_ch_fee.<2E><><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD>, '
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10,t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD><EFBFBD><ECB5A5>,'
+'case when round(case when t_op_seae.<2E><><EFBFBD><EFBFBD> / 1000 > t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD> / 1000 '
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end, 4) > 1 then round(case when t_op_seae.<2E><><EFBFBD><EFBFBD> / 1000 > t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD> / 1000 '
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end, 4) '
+'else 1 end as <20>ƷѶ<C6B7>,'
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>,'
+'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.<2E>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>,t_crm_client.<2E><><EFBFBD>̱<EFBFBD><CCB1><EFBFBD>'
+' FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> left join t_op_gain on t_op_gain.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+' left join t_crm_client on (t_crm_client.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> OR t_crm_client.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>) and ISNULL(t_crm_client.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,'''')<>'''' '
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' GROUP BY t_ch_fee.<2E><><EFBFBD><EFBFBD>, CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' THEN t_ch_fee.<2E><>ע ELSE t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> END,t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD>,'
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD><EFBFBD><ECB5A5>,'
+'case when round(case when t_op_seae.<2E><><EFBFBD><EFBFBD> / 1000 > t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD> / 1000 '
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end, 4) > 1 then round(case when t_op_seae.<2E><><EFBFBD><EFBFBD> / 1000 > t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD> / 1000 '
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end, 4) '
+'else 1 end,'
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>, '
+'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.<2E>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>,t_crm_client.<2E><><EFBFBD>̱<EFBFBD><CCB1><EFBFBD> '
+' order by t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5> ';
frm_rp_no_seae.p_pay_bill.ConnectionString:=constr;
frm_rp_no_seae.p_pay_bill.Open;
// frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
// DBQueryThread3:=TDBQueryThread.Create(frm_rp_no_seae.p_pay_bill,sqltext,frm_rp_no_seae.p_pay_bill1);
frm_rp_no_seae.p_pay_fee.close;
frm_rp_no_seae.p_pay_fee.Parameters.ParamByName('SQLStr').value:=
// sqltext:=
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD>, CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' THEN t_ch_fee.<2E><>ע ELSE t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> END <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>, t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee.<2E>ұ<EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD> as Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> as <20>Ѹ<EFBFBD><D1B8><EFBFBD><EFBFBD><EFBFBD>,(t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_ch_fee.<2E><>׼ as <20><>׼,t_ch_fee.<2E><><EFBFBD><EFBFBD> as <20><><EFBFBD><EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD> as <20><><EFBFBD><EFBFBD>,t_ch_fee.<2E><>ע as <20><><EFBFBD>ñ<EFBFBD>ע,'
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD><EFBFBD><ECB5A5>,'
+'case when round(case when t_op_seae.<2E><><EFBFBD><EFBFBD> / 1000 > t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD> / 1000 '
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end, 4) > 1 then round(case when t_op_seae.<2E><><EFBFBD><EFBFBD> / 1000 > t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD> / 1000 '
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end, 4) '
+'else 1 end as <20>ƷѶ<C6B7>,'
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD> FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' order by t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5> OPTION (FORCE ORDER)';
frm_rp_no_seae.p_pay_fee.ConnectionString:=constr;
frm_rp_no_seae.p_pay_fee.Open;
// frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
// DBQueryThread4:=TDBQueryThread.Create(frm_rp_no_seae.p_pay_fee,sqltext,frm_rp_no_seae.p_pay_fee1);
frm_rp_no_seae.p_total_client.close;
frm_rp_no_seae.p_total_client.Parameters.ParamByName('SQLStr').value:=
// sqltext:=
'SELECT CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' THEN t_ch_fee.<2E><>ע ELSE t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> END <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20>Ѹ<EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20>Ѹ<EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*<2A><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'
+' FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+str_bill+' GROUP BY CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' THEN t_ch_fee.<2E><>ע ELSE t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> END order by CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' THEN t_ch_fee.<2E><>ע ELSE t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> END';
frm_rp_no_seae.p_total_client.ConnectionString:=constr;
frm_rp_no_seae.p_total_client.Open;
// frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
// DBQueryThread5:=TDBQueryThread.Create(frm_rp_no_seae.p_total_client,sqltext,frm_rp_no_seae.p_total_client1);
frm_rp_no_seae.p_total_sales.close;
frm_rp_no_seae.p_total_sales.Parameters.ParamByName('SQLStr').value:=
// sqltext:=
'SELECT t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20>Ѹ<EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20>Ѹ<EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*<2A><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'
+' FROM t_ch_fee,t_op_seae '
+str_bill+' and t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> GROUP BY t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> order by t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> OPTION (FORCE ORDER)';
frm_rp_no_seae.p_total_sales.ConnectionString:=constr;
frm_rp_no_seae.p_total_sales.Open;
// frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
// DBQueryThread6:=TDBQueryThread.Create(frm_rp_no_seae.p_total_sales,sqltext,frm_rp_no_seae.p_total_sales1);
frm_rp_no_seae.p_total.close;
frm_rp_no_seae.p_total.Parameters.ParamByName('SQLStr').value:=
// sqltext:=
'SELECT '+''''+'<27>ϼ<EFBFBD>'+''''+' as ˳<><CBB3>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20>Ѹ<EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20>Ѹ<EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*<2A><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'
+' FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+str_bill;
frm_rp_no_seae.p_total.ConnectionString:=constr;
frm_rp_no_seae.p_total.Open;
// DBQueryThread7:=TDBQueryThread.Create(frm_rp_no_seae.p_total,sqltext,frm_rp_no_seae.p_total1);
{
repeat
H:=DBQueryThread1.handle;
W := MsgWaitForMultipleObjects(1, H, False, INFINITE, QS_ALLINPUT);
Application.ProcessMessages;
until (W = WAIT_OBJECT_0) or (W = WAIT_FAILED);
}
{
frm_sys_progress.bsSkinGauge1.Value:=frm_sys_progress.bsSkinGauge1.Value+1;
finally
freeAndNil(frm_sys_progress);
end;
}
end;
{
procedure Tfrm_rp_seae_query.do_1(str_bill:widestring);
var
sl:TStringList;
begin
sl:=TStringList.Create;
frm_rp_no_seae.p_accept_bill.close;
frm_rp_no_seae.p_accept_bill.Parameters.ParamByName('SQLStr').value:=
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) as Ӧ<><D3A6>USD,'
+'SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
+' else 0 end) as <20><><EFBFBD><EFBFBD>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
+' else 0 end) as δ<><CEB4>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as Ӧ<><D3A6>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as <20><><EFBFBD><EFBFBD>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then 0'
+' else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<>պϼ<D5BA>,'
+' sum(t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20><><EFBFBD>պϼ<D5BA>,'
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<>պϼ<D5BA>,'
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD><EFBFBD><ECB5A5>,'
+'(case when round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 '
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
+'round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 else '
+'t_op_seae.<2E><><EFBFBD><EFBFBD> end),4) else '
+'1 end) as <20>ƷѶ<C6B7>,'
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>,'
+'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_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+' left join t_op_gain on t_op_gain.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' GROUP BY t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10,t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD><EFBFBD><ECB5A5>,'
+'(case when round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 '
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
+'round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 else '
+'t_op_seae.<2E><><EFBFBD><EFBFBD> end),4) else '
+'1 end),'
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>, '
+'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>'
+' order by t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5> ';
// +default_sort_two(53,'t_op_seae','t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>','','');
sl.Add(frm_rp_no_seae.p_accept_bill.Parameters.ParamByName('SQLStr').value);
frm_rp_no_seae.p_accept_bill.Open;
frm_rp_no_seae.p_accept_fee.close;
frm_rp_no_seae.p_accept_fee.Parameters.ParamByName('SQLStr').value:=
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>, t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee.<2E>ұ<EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD> as Ӧ<>ս<EFBFBD><D5BD><EFBFBD>,'
+'t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> as <20><><EFBFBD>ս<EFBFBD><D5BD><EFBFBD>,(t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) as δ<>ս<EFBFBD><D5BD><EFBFBD>,'
+'t_ch_fee.<2E><>׼ as <20><>׼,t_ch_fee.<2E><><EFBFBD><EFBFBD> as <20><><EFBFBD><EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD> as <20><><EFBFBD><EFBFBD>,t_ch_fee.<2E><>ע as <20><><EFBFBD>ñ<EFBFBD>ע,'
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10,t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD><EFBFBD><ECB5A5>,'
+'(case when round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 '
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
+'round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 else '
+'t_op_seae.<2E><><EFBFBD><EFBFBD> end),4) else '
+'1 end) as <20>ƷѶ<C6B7>,'
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD> FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' order by t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5> ';
// +default_sort_two(53,'t_op_seae','t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>','','');
frm_rp_no_seae.p_accept_fee.Open;
sl.Add(frm_rp_no_seae.p_accept_fee.Parameters.ParamByName('SQLStr').value);
frm_rp_no_seae.p_pay_bill.close;
frm_rp_no_seae.p_pay_bill.Parameters.ParamByName('SQLStr').value:=
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) as Ӧ<><D3A6>USD,'
+'SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
+' else 0 end) as <20>Ѹ<EFBFBD>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'
+' else 0 end) as δ<><CEB4>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as Ӧ<><D3A6>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as <20>Ѹ<EFBFBD>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then 0'
+' else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+' sum(t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10,t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD><EFBFBD><ECB5A5>,'
+'(case when round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 '
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
+'round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 else '
+'t_op_seae.<2E><><EFBFBD><EFBFBD> end),4) else '
+'1 end) as <20>ƷѶ<C6B7>,'
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>,'
+'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_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> left join t_op_gain on t_op_gain.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' GROUP BY t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD><EFBFBD><ECB5A5>,'
+'(case when round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 '
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
+'round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 else '
+'t_op_seae.<2E><><EFBFBD><EFBFBD> end),4) else '
+'1 end),'
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>, '
+'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>'
// +default_sort_two(53,'t_op_seae','t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>','','');
+' order by t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5> ';
frm_rp_no_seae.p_pay_bill.Open;
sl.Add(frm_rp_no_seae.p_pay_bill.Parameters.ParamByName('SQLStr').value);
frm_rp_no_seae.p_pay_fee.close;
frm_rp_no_seae.p_pay_fee.Parameters.ParamByName('SQLStr').value:=
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD>, t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>, t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee.<2E>ұ<EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD> as Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> as <20>Ѹ<EFBFBD><D1B8><EFBFBD><EFBFBD><EFBFBD>,(t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_ch_fee.<2E><>׼ as <20><>׼,t_ch_fee.<2E><><EFBFBD><EFBFBD> as <20><><EFBFBD><EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD> as <20><><EFBFBD><EFBFBD>,t_ch_fee.<2E><>ע as <20><><EFBFBD>ñ<EFBFBD>ע,'
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD><EFBFBD><ECB5A5>,'
+'(case when round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 '
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
+'round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 else '
+'t_op_seae.<2E><><EFBFBD><EFBFBD> end),4) else '
+'1 end) as <20>ƷѶ<C6B7>,'
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD> FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' order by t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5> ';
// +default_sort_two(53,'t_op_seae','t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>','','');
frm_rp_no_seae.p_pay_fee.Open;
sl.Add(frm_rp_no_seae.p_pay_fee.Parameters.ParamByName('SQLStr').value);
frm_rp_no_seae.p_total_client.close;
frm_rp_no_seae.p_total_client.Parameters.ParamByName('SQLStr').value:=
'SELECT t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20>Ѹ<EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20>Ѹ<EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*<2A><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'
+' FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+str_bill+' GROUP BY t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> order by t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>';
frm_rp_no_seae.p_total_client.Open;
sl.Add(frm_rp_no_seae.p_total_client.Parameters.ParamByName('SQLStr').value);
frm_rp_no_seae.p_total_sales.close;
frm_rp_no_seae.p_total_sales.Parameters.ParamByName('SQLStr').value:=
'SELECT t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20>Ѹ<EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20>Ѹ<EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*<2A><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'
+' FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+str_bill+' GROUP BY t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> order by t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
frm_rp_no_seae.p_total_sales.Open;
sl.Add(frm_rp_no_seae.p_total_sales.Parameters.ParamByName('SQLStr').value);
frm_rp_no_seae.p_total.close;
frm_rp_no_seae.p_total.Parameters.ParamByName('SQLStr').value:=
'SELECT '+''''+'<27>ϼ<EFBFBD>'+''''+' as ˳<><CBB3>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20>Ѹ<EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20>Ѹ<EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)*<2A><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'
+' FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+str_bill;
frm_rp_no_seae.p_total.Open;
sl.Add(frm_rp_no_seae.p_total.Parameters.ParamByName('SQLStr').value);
sl.SaveToFile('d:\1.txt');
freeandnil(sl);
end;
}
procedure Tfrm_rp_seae_query.do_12(str_bill:widestring);
var
sqltext,constr:widestring;
DBQueryThread1,DBQueryThread2,DBQueryThread3,DBQueryThread4,DBQueryThread5,DBQueryThread6,DBQueryThread7:TDBQueryThread;
W: DWord;
H: THandle;
begin
frm_rp_no_seae.p_accept_bill.close;
frm_rp_no_seae.p_accept_bill.Parameters.ParamByName('SQLStr').value:=
// sqltext:=
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD>, CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' THEN t_ch_fee.<2E><>ע ELSE t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> END <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) as Ӧ<><D3A6>USD,'
+'SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then (CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end)'
+' else 0 end) as <20><><EFBFBD><EFBFBD>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end)'
+' else 0 end) as δ<><CEB4>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as Ӧ<><D3A6>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else (CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as <20><><EFBFBD><EFBFBD>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then 0'
+' else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<>պϼ<D5BA>,'
+' sum((CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end)*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20><><EFBFBD>պϼ<D5BA>,'
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<>պϼ<D5BA>,'
+' MAX(t_ch_fee.<2E><><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD>, '
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD><EFBFBD><ECB5A5>,'
+'(case when round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 '
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
+'round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 else '
+'t_op_seae.<2E><><EFBFBD><EFBFBD> end),4) else '
+'1 end) as <20>ƷѶ<C6B7>,'
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>, '
+'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>,t_crm_client.<2E>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>,t_crm_client.<2E><><EFBFBD>̱<EFBFBD><CCB1><EFBFBD>'
+' FROM t_ch_fee left join t_op_gain on t_op_gain.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+' left join t_crm_client on (t_crm_client.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> OR t_crm_client.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>=t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>) and ISNULL(t_crm_client.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,'''')<>'''' '
+' left join t_crm_client_class on t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><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_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' GROUP BY t_ch_fee.<2E><><EFBFBD><EFBFBD>, CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' THEN t_ch_fee.<2E><>ע ELSE t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> END,'
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10,t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD><EFBFBD><ECB5A5>,'
+'(case when round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 '
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
+'round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 else '
+'t_op_seae.<2E><><EFBFBD><EFBFBD> end),4) else '
+'1 end),'
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>, '
+'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>,t_crm_client.<2E>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>,t_crm_client.<2E><><EFBFBD>̱<EFBFBD><CCB1><EFBFBD>'
+' order by t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5> ';
constr:=connect_string('main.ini');
frm_rp_no_seae.p_accept_bill.ConnectionString:=constr;
frm_rp_no_seae.p_accept_bill.Open;
// DBQueryThread1:=TDBQueryThread.Create(frm_rp_no_seae.p_accept_bill,sqltext,frm_rp_no_seae.p_accept_bill1);
frm_rp_no_seae.p_accept_fee.close;
frm_rp_no_seae.p_accept_fee.Parameters.ParamByName('SQLStr').value:=
// sqltext:=
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD>,CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' THEN t_ch_fee.<2E><>ע ELSE t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> END <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>, t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee.<2E>ұ<EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD> as Ӧ<>ս<EFBFBD><D5BD><EFBFBD>,'
+'(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end) as <20><><EFBFBD>ս<EFBFBD><D5BD><EFBFBD>,(t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end)) as δ<>ս<EFBFBD><D5BD><EFBFBD>,'
+'t_ch_fee.<2E><>׼ as <20><>׼,t_ch_fee.<2E><><EFBFBD><EFBFBD> as <20><><EFBFBD><EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD> as <20><><EFBFBD><EFBFBD>,t_ch_fee.<2E><>ע as <20><><EFBFBD>ñ<EFBFBD>ע,'
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10,t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD><EFBFBD><ECB5A5>,'
+'(case when round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 '
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
+'round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 else '
+'t_op_seae.<2E><><EFBFBD><EFBFBD> end),4) else '
+'1 end) as <20>ƷѶ<C6B7>,'
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD> FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' order by t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5> ';
frm_rp_no_seae.p_accept_fee.ConnectionString:=constr;
frm_rp_no_seae.p_accept_fee.Open;
// DBQueryThread2:=TDBQueryThread.Create(frm_rp_no_seae.p_accept_fee,sqltext,frm_rp_no_seae.p_accept_fee1);
frm_rp_no_seae.p_pay_bill.close;
frm_rp_no_seae.p_pay_bill.Parameters.ParamByName('SQLStr').value:=
// sqltext:=
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD>,CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' THEN t_ch_fee.<2E><>ע ELSE t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> END <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) as Ӧ<><D3A6>USD,'
+'SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then (CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end)'
+' else 0 end) as <20>Ѹ<EFBFBD>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end)'
+' else 0 end) as δ<><CEB4>USD,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as Ӧ<><D3A6>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD>'
+' when '+''''+'USD'+''''+' then 0 else (CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end)*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as <20>Ѹ<EFBFBD>RMB,SUM(case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''+' then 0'
+' else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*t_ch_fee.<2E><><EFBFBD><EFBFBD>'
+' end) as δ<><CEB4>RMB,sum(t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+' sum((CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end)*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
+' sum((t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*t_ch_fee.<2E><><EFBFBD><EFBFBD>) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
+' MAX(t_ch_fee.<2E><><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD>, '
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,t_op_seae.Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10,t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD><EFBFBD><ECB5A5>,'
+'(case when round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 '
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
+'round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 else '
+'t_op_seae.<2E><><EFBFBD><EFBFBD> end),4) else '
+'1 end) as <20>ƷѶ<C6B7>,'
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>,'
+'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_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> left join t_op_gain on t_op_gain.<2E><><EFBFBD><EFBFBD>=t_op_seae.<2E><><EFBFBD><EFBFBD> '
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' GROUP BY t_ch_fee.<2E><><EFBFBD><EFBFBD>, CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' THEN t_ch_fee.<2E><>ע ELSE t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> END,'
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD><EFBFBD><ECB5A5>,'
+'(case when round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 '
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
+'round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 else '
+'t_op_seae.<2E><><EFBFBD><EFBFBD> end),4) else '
+'1 end),'
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>, '
+'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>'
+' order by t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5> ';
frm_rp_no_seae.p_pay_bill.ConnectionString:=constr;
frm_rp_no_seae.p_pay_bill.Open;
// DBQueryThread3:=TDBQueryThread.Create(frm_rp_no_seae.p_pay_bill,sqltext,frm_rp_no_seae.p_pay_bill1);
frm_rp_no_seae.p_pay_fee.close;
frm_rp_no_seae.p_pay_fee.Parameters.ParamByName('SQLStr').value:=
// sqltext:=
'SELECT t_ch_fee.<2E><><EFBFBD><EFBFBD>, CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' THEN t_ch_fee.<2E><>ע ELSE t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> END <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>, t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_ch_fee.<2E>ұ<EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD> as Ӧ<><D3A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end) as <20>Ѹ<EFBFBD><D1B8><EFBFBD><EFBFBD><EFBFBD>,(t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end)) as δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_ch_fee.<2E><>׼ as <20><>׼,t_ch_fee.<2E><><EFBFBD><EFBFBD> as <20><><EFBFBD><EFBFBD>,t_ch_fee.<2E><><EFBFBD><EFBFBD> as <20><><EFBFBD><EFBFBD>,t_ch_fee.<2E><>ע as <20><><EFBFBD>ñ<EFBFBD>ע,'
+'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ܴ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>, t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>, t_op_seae.װ<>˷<EFBFBD>ʽ,'
+'t_op_seae.ί<>е<EFBFBD>λ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>վ,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>, t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><>װ, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>1, t_op_seae.<2E><><EFBFBD><EFBFBD>2, t_op_seae.<2E><><EFBFBD><EFBFBD>3,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>4, t_op_seae.<2E><><EFBFBD><EFBFBD>5, t_op_seae.<2E><><EFBFBD><EFBFBD>6,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>7, t_op_seae.<2E><><EFBFBD><EFBFBD>8, t_op_seae.<2E><><EFBFBD><EFBFBD>9,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>10, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><>TEU, t_op_seae.<2E><>װ<EFBFBD><D7B0>, t_op_seae.<2E><><EFBFBD><EFBFBD>Ա,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E>ͷ<EFBFBD>Ա, t_op_seae.<2E><><EFBFBD><EFBFBD>,'
+'t_op_seae.<2E><><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾, t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>,t_op_seae.<2E><><EFBFBD><EFBFBD><ECB5A5>,'
+'(case when round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 '
+'else t_op_seae.<2E><><EFBFBD><EFBFBD> end),4)>1 then '
+'round((case when t_op_seae.<2E><><EFBFBD><EFBFBD>/1000>t_op_seae.<2E><><EFBFBD><EFBFBD> then t_op_seae.<2E><><EFBFBD><EFBFBD>/1000 else '
+'t_op_seae.<2E><><EFBFBD><EFBFBD> end),4) else '
+'1 end) as <20>ƷѶ<C6B7>,'
+'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD> FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+str_bill+' and t_ch_fee.<2E><><EFBFBD><EFBFBD>='+''''+'<27><>'+''''
+' order by t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD>, t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5> ';
frm_rp_no_seae.p_pay_fee.ConnectionString:=constr;
frm_rp_no_seae.p_pay_fee.Open;
// DBQueryThread4:=TDBQueryThread.Create(frm_rp_no_seae.p_pay_fee,sqltext,frm_rp_no_seae.p_pay_fee1);
frm_rp_no_seae.p_total_client.close;
frm_rp_no_seae.p_total_client.Parameters.ParamByName('SQLStr').value:=
// sqltext:=
'SELECT CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' THEN t_ch_fee.<2E><>ע ELSE t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> END <20>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>,t_crm_client_class.<2E>ͻ<EFBFBD><CDBB>ȼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then (CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end) else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end) else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then (CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end) else 0 end) ELSE 0 END) as <20>Ѹ<EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end) else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20>Ѹ<EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end) else 0 end) ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end) else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*<2A><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'
+' FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+' left join t_crm_client_class on t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><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_bill+' GROUP BY CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' THEN t_ch_fee.<2E><>ע ELSE t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> END,t_crm_client_class.<2E>ͻ<EFBFBD><CDBB>ȼ<EFBFBD> order by CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'' THEN t_ch_fee.<2E><>ע ELSE t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD> END';
frm_rp_no_seae.p_total_client.ConnectionString:=constr;
frm_rp_no_seae.p_total_client.Open;
// DBQueryThread5:=TDBQueryThread.Create(frm_rp_no_seae.p_total_client,sqltext,frm_rp_no_seae.p_total_client1);
frm_rp_no_seae.p_total_sales.close;
frm_rp_no_seae.p_total_sales.Parameters.ParamByName('SQLStr').value:=
// sqltext:=
'SELECT t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then (CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end) else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end) else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then (CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end) else 0 end) ELSE 0 END) as <20>Ѹ<EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end) else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20>Ѹ<EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end) else 0 end) ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end) else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*<2A><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'
+' FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+str_bill+' GROUP BY t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> order by t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
frm_rp_no_seae.p_total_sales.ConnectionString:=constr;
frm_rp_no_seae.p_total_sales.Open;
// DBQueryThread6:=TDBQueryThread.Create(frm_rp_no_seae.p_total_sales,sqltext,frm_rp_no_seae.p_total_sales1);
frm_rp_no_seae.p_total.close;
frm_rp_no_seae.p_total.Parameters.ParamByName('SQLStr').value:=
// sqltext:=
'SELECT '+''''+'<27>ϼ<EFBFBD>'+''''+' as ˳<><CBB3>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then (CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end) else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end) else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end)*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<>պϼ<D5BA>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD> else 0 end) ELSE 0 END) as Ӧ<><D3A6>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then (CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end) else 0 end) ELSE 0 END) as <20>Ѹ<EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end) else 0 end) ELSE 0 END) as δ<><CEB4>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as Ӧ<><D3A6>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end)*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20>Ѹ<EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as δ<><CEB4>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as Ӧ<><D3A6><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as <20>Ѹ<EFBFBD><D1B8>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END) as δ<><CEB4><EFBFBD>ϼ<EFBFBD>,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end) else 0 end) ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end) else 0 end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>USD,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (case t_ch_fee.<2E>ұ<EFBFBD> when '+''''+'USD'+''''
+' then 0 else (t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*t_ch_fee.<2E><><EFBFBD><EFBFBD> end) ELSE 0 END) as <20><><EFBFBD><EFBFBD>RMB,'
+'SUM(CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*t_ch_fee.<2E><><EFBFBD><EFBFBD> ELSE 0 END'
+'-CASE t_ch_fee.<2E><><EFBFBD><EFBFBD> WHEN '+''''+'<27><>'+''''
+' THEN (t_ch_fee.<2E><><EFBFBD><EFBFBD>-(CASE WHEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> THEN t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ELSE t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD> end))*<2A><><EFBFBD><EFBFBD> ELSE 0 END) as <20><><EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD>'
+' FROM t_ch_fee inner join t_op_seae on t_op_seae.<2E><><EFBFBD><EFBFBD>=t_ch_fee.<2E><><EFBFBD><EFBFBD> '
+str_bill;
frm_rp_no_seae.p_total.ConnectionString:=constr;
frm_rp_no_seae.p_total.Open;
// DBQueryThread7:=TDBQueryThread.Create(frm_rp_no_seae.p_total,sqltext,frm_rp_no_seae.p_total1);
{
repeat
H:=DBQueryThread1.handle;
W := MsgWaitForMultipleObjects(1, H, False, INFINITE, QS_ALLINPUT);
Application.ProcessMessages;
until (W = WAIT_OBJECT_0) or (W = WAIT_FAILED);
}
end;
procedure Tfrm_rp_seae_query.bsSkinButton10Click(Sender: TObject);
begin
Edit1.text:='';
Edit2.text:='';
Edit3.text:='';
Edit4.text:='';
Edit5.text:='';
Edit6.text:='';
Edit12.text:='';
wwDBComboBox1.text:='';
wwDBComboBox2.text:='';
wwDBDateTimePicker1.Clear;
wwDBDateTimePicker2.Clear;
wwDBDateTimePicker3.Clear;
wwDBDateTimePicker4.Clear;
wwDBDateTimePicker5.Clear;
wwDBDateTimePicker6.Clear;
wwDBComboBox3.text:='';
RxDBLookupCombo20.ClearValue;
RxDBLookupCombo2.ClearValue;
RxDBLookupCombo1.ClearValue;
RxDBLookupCombo9.ClearValue;
RxDBLookupCombo8.ClearValue;
RxDBLookupCombo11.ClearValue;
RxDBLookupCombo7.ClearValue;
wwDBLookupCombo3.text:='';
wwDBLookupCombo52.text:='';
RxDBLookupCombo4.ClearValue;
RxDBLookupCombo3.ClearValue;
RxDBLookupCombo6.ClearValue;
RxDBLookupCombo5.ClearValue;
RxDBLookupCombo10.ClearValue;
RxDBLookupCombo12.ClearValue;
wwDBComboBox31.text:='';
RxDBLookupCombo13.ClearValue;
wwDBComboBox31.text:='';
RxDBLookupCombo16.ClearValue;
RxDBLookupCombo15.ClearValue;
end;
procedure Tfrm_rp_seae_query.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_rp_seae_query.FormShow(Sender: TObject);
begin
wwDBComboBox15.text:='ģ<><C4A3>';
wwDBComboBox16.text:='ģ<><C4A3>';
wwDBComboBox33.text:='ģ<><C4A3>';
wwDBComboBox34.text:='ģ<><C4A3>';
wwDBComboBox4.text:='ģ<><C4A3>';
wwDBComboBox5.text:='ģ<><C4A3>';
wwDBComboBox35.text:='ģ<><C4A3>';
wwDBComboBox36.text:='ģ<><C4A3>';
wwDBComboBox37.text:='ģ<><C4A3>';
wwDBComboBox43.text:='ģ<><C4A3>';
wwDBComboBox44.text:='ģ<><C4A3>';
wwDBComboBox17.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox7.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox18.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox6.text:='С<><D0A1>';
wwDBComboBox11.text:='С<><D0A1>';
wwDBComboBox19.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox10.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox20.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox21.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox22.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox23.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox24.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox25.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox26.text:='ģ<><C4A3>';
wwDBComboBox27.text:='ģ<><C4A3>';
wwDBComboBox9.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox8.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox12.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox13.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox14.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox28.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox29.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox30.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox32.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox38.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox13.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox41.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox30.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox42.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox45.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox47.text:='С<><D0A1>';
wwDBComboBox48.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox49.text:='С<><D0A1>';
// wwDBComboBox45.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox50.text:='<27><><EFBFBD><EFBFBD>';
wwDBComboBox51.text:='С<><D0A1>';
frm_data_share.t_code_state.Filtered:=false;
frm_data_share.t_code_state.Filter:='ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>='+''''+'<27><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>'+'''';
frm_data_share.t_code_state.Filtered:=true;
frm_data_share.t_code_fee.Filtered:=false;
frm_data_share.t_code_fee.Filter:='<27><><EFBFBD><EFBFBD>=1';
frm_data_share.t_code_fee.Filtered:=true;
frm_data_share.t_code_state.first;
while not frm_data_share.t_code_state.eof do
begin
wwDBComboBox1.Items.Add(frm_data_share.t_code_state.fieldbyname('ҵ<><D2B5>״̬').asstring);
frm_data_share.t_code_state.next;
end;
wwDBComboBox1.Items.Add('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
t_sys_queryfields.open;
t_sys_query.Parameters.ParamByName('<27><>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>').Value:=rp_seae_query_str;
t_sys_query.Parameters.ParamByName('¼<><C2BC><EFBFBD><EFBFBD>').Value:=employee;
t_sys_query.open;
t_sys_query_detail.open;
wwDBComboBox39.ItemIndex:=0;
end;
procedure Tfrm_rp_seae_query.bsSkinButton1Click(Sender: TObject);
var
str_bill,str_in:widestring;
begin
str_bill:='';
if bsSkinTabSheet2.Showing then
begin
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox15.text,Edit1.text);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.ί<>б<EFBFBD><D0B1><EFBFBD>',wwDBComboBox4.text,Edit4.text);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>',wwDBComboBox16.text,Edit2.text);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.<2E><><EFBFBD><EFBFBD><E1B5A5>',wwDBComboBox5.text,Edit3.text);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.<2E><><EFBFBD>ص<EFBFBD><D8B5><EFBFBD>',wwDBComboBox43.text,Edit10.text);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.<2E><><EFBFBD><EFBFBD><ECB5A5>',wwDBComboBox44.text,Edit11.text);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.<2E><>Ʊ<EFBFBD><C6B1>',wwDBComboBox33.text,Edit5.text);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox34.text,Edit6.text);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.ҵ<><D2B5>״̬',wwDBComboBox17.text,wwDBComboBox1.text);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.<2E><><EFBFBD><EFBFBD>״̬',wwDBComboBox7.text,wwDBComboBox2.text);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox18.text,wwDBDateTimePicker1.text);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox6.text,wwDBDateTimePicker2.text);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>',wwDBComboBox19.text,wwDBDateTimePicker3.text);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD>ڼ<EFBFBD>',wwDBComboBox11.text,wwDBDateTimePicker4.text);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.װ<>˷<EFBFBD>ʽ',wwDBComboBox20.text,wwDBComboBox3.text);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.<2E><><EFBFBD><EFBFBD>',wwDBComboBox10.text,RxDBLookupCombo20.DisplayValues[1]);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.ί<>е<EFBFBD>λ',wwDBComboBox21.text,RxDBLookupCombo2.DisplayValues[1]);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.<2E><><EFBFBD><EFBFBD>˾',wwDBComboBox9.text,RxDBLookupCombo1.DisplayValues[1]);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox22.text,RxDBLookupCombo9.DisplayValues[1]);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾',wwDBComboBox8.text,RxDBLookupCombo8.DisplayValues[1]);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.<2E><><EFBFBD>˳<EFBFBD><CBB3><EFBFBD>',wwDBComboBox23.text,RxDBLookupCombo11.DisplayValues[1]);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.<2E><>վ',wwDBComboBox12.text,RxDBLookupCombo7.DisplayValues[1]);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.װ<><D7B0><EFBFBD><EFBFBD>',wwDBComboBox26.text,wwDBLookupCombo3.text);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.ж<><D0B6><EFBFBD><EFBFBD>',wwDBComboBox27.text,wwDBLookupCombo52.text);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.<2E>ͷ<EFBFBD>Ա',wwDBComboBox24.text,RxDBLookupCombo4.DisplayValue);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox14.text,RxDBLookupCombo3.DisplayValue);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.<2E><><EFBFBD><EFBFBD>Ա',wwDBComboBox25.text,RxDBLookupCombo6.DisplayValue);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox32.text,RxDBLookupCombo13.DisplayValues[1]);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.<2E><><EFBFBD>۲<EFBFBD><DBB2><EFBFBD>',wwDBComboBox28.text,RxDBLookupCombo10.DisplayValue);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox29.text,RxDBLookupCombo12.DisplayValue);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.<2E><><EFBFBD><EFBFBD>',wwDBComboBox36.text,wwDBLookupCombo49.text);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.<2E><><EFBFBD><EFBFBD>',wwDBComboBox35.text,Edit7.text);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.<2E><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD>',wwDBComboBox37.text,Edit8.text);
str_bill:=query_tiaojian(2,str_bill,'t_op_seae.<2E>ܴ<EFBFBD>',wwDBComboBox38.text,Edit9.text);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox45.text,wwDBDateTimePicker5.text);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.Ԥ<><D4A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox47.text,wwDBDateTimePicker6.text);
str_bill:=query_tiaojian(1,str_bill,'t_op_seae.ί<>е<EFBFBD>λ','ģ<><C4A3>',Edit12.Text);
str_bill:=query_tiaojian(1,str_bill,'t_ch_fee.<2E>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox13.text,RxDBLookupCombo5.DisplayValues[1]);
str_bill:=query_tiaojian(1,str_bill,'t_ch_fee.<2E>ұ<EFBFBD>',wwDBComboBox41.text,RxDBLookupCombo15.DisplayValues[0]);
str_bill:=query_tiaojian(1,str_bill,'t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',wwDBComboBox42.text,RxDBLookupCombo16.DisplayValues[1]);
str_bill:=query_tiaojian(1,str_bill,'t_ch_fee.<2E><><EFBFBD><EFBFBD>',wwDBComboBox30.text,wwDBComboBox31.text);
str_bill:=query_tiaojian(1,str_bill,'t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD>',wwDBComboBox45.text,wwDBDateTimePicker7.text);
str_bill:=query_tiaojian(1,str_bill,'t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD>',wwDBComboBox47.text,wwDBDateTimePicker8.text);
if (rp_seae_query_num=2) then begin
str_bill:=query_tiaojian(1,str_bill,'v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>',wwDBComboBox50.text,wwDBDateTimePicker9.text);
str_bill:=query_tiaojian(1,str_bill,'v_fee_do_inv.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>',wwDBComboBox51.text,wwDBDateTimePicker10.text);
end;
{
if (str_in<>'') then begin
if trim(str_bill)='' then
begin
str_bill:='where EXISTS (select 1 from t_ch_invoice left join t_ch_fee_do on (t_ch_fee_do.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=t_ch_invoice.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) WHERE t_ch_fee_do.CH_ID=t_ch_fee.CH_ID AND ' + StringReplace(str_in,'where','',[]) + ' ) ';
end
else
begin
str_bill:=' AND EXISTS (select 1 from t_ch_invoice left join t_ch_fee_do on (t_ch_fee_do.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=t_ch_invoice.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) WHERE t_ch_fee_do.CH_ID=t_ch_fee.CH_ID AND ' + StringReplace(str_in,'where','',[]) + ' ) ';
end;
end;
}
end
else
begin
if query_wanneng_error(t_sys_query_detail)then
begin
showmessage('<27><><EFBFBD>򡯵<EFBFBD><F2A1AFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>2<EFBFBD><32><EFBFBD><EFBFBD><EFBFBD>ϣ<EFBFBD><CFA3><EFBFBD>');
exit;
end;
str_bill:=query_wanneng(t_sys_query_detail);
end;
if rp_seae_query_limited<>'no'then
begin
if trim(str_bill)='' then
begin
str_bill:='where '+open_data(rp_seae_query_limited,'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','t_op_seae.<2E><><EFBFBD><EFBFBD>Ա','t_op_seae.<2E>ͷ<EFBFBD>Ա','no','no');
end
else
begin
str_bill:=str_bill+' and '+open_data(rp_seae_query_limited,'t_op_seae.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','t_op_seae.<2E><><EFBFBD><EFBFBD>Ա','t_op_seae.<2E>ͷ<EFBFBD>Ա','no','no');
end;
end;
case rp_seae_query_type of
1:
begin
if wwDBComboBox46.Text='' then begin
if str_bill='' then
str_bill:='where (t_ch_fee.<2E><><EFBFBD><EFBFBD> < t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> OR t_ch_fee.<2E><><EFBFBD><EFBFBD> > t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) and (t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <> ''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'') '
else
str_bill:=str_bill+' and (t_ch_fee.<2E><><EFBFBD><EFBFBD> < t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> OR t_ch_fee.<2E><><EFBFBD><EFBFBD> > t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) and (t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <> ''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'') ';
end else begin
if str_bill='' then
str_bill:='where ((t_ch_fee.<2E><><EFBFBD><EFBFBD><>t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) or (t_ch_fee.<2E><><EFBFBD><EFBFBD><>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>)) and (t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <> ''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'') '
else
str_bill:=str_bill+' and (t_ch_fee.<2E><><EFBFBD><EFBFBD><>t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> or t_ch_fee.<2E><><EFBFBD><EFBFBD><>t_ch_fee.<2E><>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>) and (t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <> ''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'') ';
end;
end;
2:
begin
if str_bill='' then
str_bill:='where (t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><0 or t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>0) and (t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <> ''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'') '
else
str_bill:=str_bill+' and (t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><0 or t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>>0) and (t_ch_fee.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <> ''<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'') ';
end;
22:
begin
if str_bill='' then
str_bill:='where v_fee_do_inv_del.CH_ID IS NOT NULL '
else
str_bill:=str_bill+' and v_fee_do_inv_del.CH_ID IS NOT NULL ';
end;
end;
case rp_seae_query_num of
1:
begin
if wwDBComboBox46.Text='' then begin
frm_rp_seae_query.do_1(str_bill);
end else begin
frm_rp_seae_query.do_12(str_bill);
end;
end;
2:
begin
frm_rp_seae_query.do_2(str_bill);
end;
22:
begin
frm_rp_seae_query.do_22(str_bill);
end;
end;
close;
end;
procedure Tfrm_rp_seae_query.RxDBLookupCombo14Change(Sender: TObject);
begin
query_str_int.text:='';
query_bit.text:='';
query_date.text:='';
if t_sys_queryfields.Locate('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>',RxDBLookupCombo14.DisplayValue,[])then
begin
wwDBComboBox40.ItemIndex:=-1;
wwDBComboBox40.Items.Clear;
if (t_sys_queryfields.FieldByName('<27><><EFBFBD><EFBFBD>').asstring='varchar') then
begin
query_str_int.Visible:=true;
query_bit.Visible:=false;
query_date.Visible:=false;
wwDBComboBox40.Items.Add('<27><><EFBFBD><EFBFBD>');
wwDBComboBox40.Items.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
wwDBComboBox40.Items.Add('ģ<><C4A3>');
wwDBComboBox40.Items.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
wwDBComboBox40.ItemIndex:=2;
end;
if (t_sys_queryfields.FieldByName('<27><><EFBFBD><EFBFBD>').asstring='int') then
begin
query_str_int.Visible:=true;
query_bit.Visible:=false;
query_date.Visible:=false;
wwDBComboBox40.Items.Add('<27><><EFBFBD><EFBFBD>');
wwDBComboBox40.Items.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
wwDBComboBox40.Items.Add('<27><><EFBFBD><EFBFBD>');
wwDBComboBox40.Items.Add('С<><D0A1>');
wwDBComboBox40.ItemIndex:=0;
end;
if (t_sys_queryfields.FieldByName('<27><><EFBFBD><EFBFBD>').asstring='bit') then
begin
query_str_int.Visible:=false;
query_bit.Visible:=true;
query_date.Visible:=false;
wwDBComboBox40.Items.Add('<27><><EFBFBD><EFBFBD>');
wwDBComboBox40.Items.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
wwDBComboBox40.ItemIndex:=0;
end;
if (t_sys_queryfields.FieldByName('<27><><EFBFBD><EFBFBD>').asstring='date') then
begin
query_str_int.Visible:=false;
query_bit.Visible:=false;
query_date.Visible:=true;
wwDBComboBox40.Items.Add('<27><><EFBFBD><EFBFBD>');
wwDBComboBox40.Items.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
wwDBComboBox40.Items.Add('<27><><EFBFBD><EFBFBD>');
wwDBComboBox40.Items.Add('С<><D0A1>');
wwDBComboBox40.ItemIndex:=0;
end;
end
else
begin
query_str_int.Visible:=false;
query_bit.Visible:=false;
query_date.Visible:=false;
end;
end;
procedure Tfrm_rp_seae_query.bsSkinButton2Click(Sender: TObject);
begin
if RxDBLookupCombo14.DisplayValue='' then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD><C6A3><EFBFBD>');
exit;
end;
if wwDBComboBox39.ItemIndex=-1 then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>');
exit;
end;
if wwDBComboBox40.ItemIndex=-1 then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD>ͣ<EFBFBD><CDA3><EFBFBD>');
exit;
end;
if query_str_int.Visible then
begin
if query_str_int.text='' then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>');
exit;
end;
if (t_sys_queryfields.FieldByName('<27><><EFBFBD><EFBFBD>').asstring='int') then
begin
try
strtoint(query_str_int.text);
except
showmessage('<27><><EFBFBD><EFBFBD>ֵֻ<D6B5><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD><D6A3><EFBFBD>');
exit;
end;
end;
end;
if query_bit.Visible then
begin
if query_bit.ItemIndex=-1 then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>');
exit;
end;
end;
if query_date.Visible then
begin
if query_date.text='' then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>');
exit;
end;
end;
if t_sys_query.IsEmpty then
begin
t_sys_query.Insert;
t_sys_query.post;
end;
t_sys_query_detail.Append;
t_sys_query_detail['<27><>']:=t_sys_queryfields['<27><>'];
t_sys_query_detail['<27>ֶ<EFBFBD><D6B6><EFBFBD>']:=t_sys_queryfields['<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>'];
if query_str_int.Visible then
begin
t_sys_query_detail['<27><><EFBFBD><EFBFBD>ֵ']:=query_str_int.text;
end;
if query_bit.Visible then
begin
t_sys_query_detail['<27><><EFBFBD><EFBFBD>ֵ']:=query_bit.text;
end;
if query_date.Visible then
begin
t_sys_query_detail['<27><><EFBFBD><EFBFBD>ֵ']:=query_date.text;
end;
t_sys_query_detail['<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>']:=t_sys_queryfields['<27><><EFBFBD><EFBFBD>'];
t_sys_query_detail['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ']:=wwDBComboBox39.text;
t_sys_query_detail['<27><>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>']:=wwDBComboBox40.text;
t_sys_query_detail.post;
end;
procedure Tfrm_rp_seae_query.bsSkinButton4Click(Sender: TObject);
begin
if not t_sys_query_detail.IsEmpty then
t_sys_query_detail.Delete;
end;
procedure Tfrm_rp_seae_query.RxDBLookupList1DblClick(Sender: TObject);
begin
RxDBLookupCombo14.DisplayValue:=RxDBLookupList1.DisplayValue;
end;
procedure Tfrm_rp_seae_query.wwDBComboBox15KeyPress(Sender: TObject;
var Key: Char);
begin
if key=#13 then
begin
key:=#0;
frm_rp_seae_query.bsSkinButton1Click(Sender);
end;
end;
procedure Tfrm_rp_seae_query.t_sys_queryAfterInsert(DataSet: TDataSet);
begin
t_sys_query['<27><>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>']:=rp_seae_query_str;
t_sys_query['¼<><C2BC><EFBFBD><EFBFBD>']:=employee;
t_sys_query['¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=date;
end;
procedure Tfrm_rp_seae_query.bsSkinButton6Click(Sender: TObject);
begin
t_sys_query.Insert;
t_sys_query.post;
end;
procedure Tfrm_rp_seae_query.bsSkinButton9Click(Sender: TObject);
begin
while not t_sys_query_detail.eof do
begin
t_sys_query_detail.Delete;
end;
if not t_sys_query.Eof then
t_sys_query.delete;
end;
procedure Tfrm_rp_seae_query.t_sys_query_detailBeforePost(
DataSet: TDataSet);
begin
if t_sys_query_detail.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring='int' then
begin
try
strtoint(t_sys_query_detail.fieldbyname('<27><><EFBFBD><EFBFBD>ֵ').asstring);
except
showmessage('<27><><EFBFBD><EFBFBD>ֵֻ<D6B5><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֣<EFBFBD><D6A3><EFBFBD>');
abort;
end;
end;
if t_sys_query_detail.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring='date' then
begin
try
strtodate(t_sys_query_detail.fieldbyname('<27><><EFBFBD><EFBFBD>ֵ').asstring);
except
showmessage('<27><><EFBFBD><EFBFBD>ֵֻ<D6B5><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD><DAA3><EFBFBD>');
abort;
end;
end;
if t_sys_query_detail.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring='bit' then
begin
if (t_sys_query_detail.fieldbyname('<27><><EFBFBD><EFBFBD>ֵ').asstring<>'<27><>')
and(t_sys_query_detail.fieldbyname('<27><><EFBFBD><EFBFBD>ֵ').asstring<>'<27><>')then
begin
showmessage('<27><><EFBFBD><EFBFBD>ֵֻ<D6B5><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\<5C>񣡣<EFBFBD>');
abort;
end;
end;
if (t_sys_query_detail.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ').asstring<>'<27><>')
and(t_sys_query_detail.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ').asstring<>'<27><>')then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵֻ<CFB5><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\<5C>򣡣<EFBFBD>');
abort;
end;
if (dxDBGrid1Column3.Items.IndexOf(t_sys_query_detail.fieldbyname('<27><>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>').asstring)=-1)
and (t_sys_query_detail.state<>dsinsert) then
begin
showmessage('<27><>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'+dxDBGrid1Column3.Items.text+'<27><><EFBFBD><EFBFBD>');
abort;
end;
end;
procedure Tfrm_rp_seae_query.t_sys_query_detailAfterScroll(
DataSet: TDataSet);
begin
if (t_sys_query_detail.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring='varchar') then
begin
dxDBGrid1Column3.Items.Clear;
dxDBGrid1Column3.Items.Add('<27><><EFBFBD><EFBFBD>');
dxDBGrid1Column3.Items.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
dxDBGrid1Column3.Items.Add('ģ<><C4A3>');
end;
if (t_sys_query_detail.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring='int') then
begin
dxDBGrid1Column3.Items.Clear;
dxDBGrid1Column3.Items.Add('<27><><EFBFBD><EFBFBD>');
dxDBGrid1Column3.Items.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
dxDBGrid1Column3.Items.Add('<27><><EFBFBD><EFBFBD>');
dxDBGrid1Column3.Items.Add('С<><D0A1>');
end;
if (t_sys_query_detail.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring='bit') then
begin
dxDBGrid1Column3.Items.Clear;
dxDBGrid1Column3.Items.Add('<27><><EFBFBD><EFBFBD>');
dxDBGrid1Column3.Items.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
end;
if (t_sys_query_detail.fieldbyname('<27>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>').asstring='date') then
begin
dxDBGrid1Column3.Items.Clear;
dxDBGrid1Column3.Items.Add('<27><><EFBFBD><EFBFBD>');
dxDBGrid1Column3.Items.Add('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
dxDBGrid1Column3.Items.Add('<27><><EFBFBD><EFBFBD>');
dxDBGrid1Column3.Items.Add('С<><D0A1>');
end;
end;
end.