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.

431 lines
14 KiB
Plaintext

11 months ago
unit u_info_kaoqin_report;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, bsSkinCtrls, ComCtrls, bsSkinTabs, StdCtrls, wwdbdatetimepicker,
RxLookup, DB, RxMemDS, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid,
ADODB, dxDBTLCl, dxGrClms;
type
Tfrm_info_kaoqin_report = class(TForm)
bsSkinPanel1: TbsSkinPanel;
bsSkinPageControl1: TbsSkinPageControl;
bsSkinTabSheet1: TbsSkinTabSheet;
bsSkinTabSheet2: TbsSkinTabSheet;
Label10: TLabel;
wwDBDateTimePicker1: TwwDBDateTimePicker;
Label5: TLabel;
wwDBDateTimePicker2: TwwDBDateTimePicker;
bsSkinButton1: TbsSkinButton;
bsSkinButton10: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
Label13: TLabel;
RxDBLookupCombo5: TRxDBLookupCombo;
t_sum: TRxMemoryData;
t_sum1: TDataSource;
dxDBGrid1: TdxDBGrid;
dxDBGrid1Column1: TdxDBGridMaskColumn;
dxDBGrid1Column2: TdxDBGridMaskColumn;
dxDBGrid1Column3: TdxDBGridMaskColumn;
dxDBGrid1Column4: TdxDBGridMaskColumn;
dxDBGrid1Column5: TdxDBGridMaskColumn;
dxDBGrid1Column6: TdxDBGridMaskColumn;
dxDBGrid1Column7: TdxDBGridMaskColumn;
dxDBGrid1Column8: TdxDBGridMaskColumn;
dxDBGrid1Column9: TdxDBGridMaskColumn;
dxDBGrid1Column10: TdxDBGridMaskColumn;
dxDBGrid1Column11: TdxDBGridMaskColumn;
dxDBGrid1Column12: TdxDBGridMaskColumn;
dxDBGrid1Column13: TdxDBGridMaskColumn;
dxDBGrid1Column14: TdxDBGridMaskColumn;
dxDBGrid1Column15: TdxDBGridMaskColumn;
dxDBGrid1Column16: TdxDBGridMaskColumn;
dxDBGrid1Column17: TdxDBGridMaskColumn;
p_detail: TADOStoredProc;
p_client1: TDataSource;
dxDBGrid2: TdxDBGrid;
dxDBGrid2Column1: TdxDBGridMaskColumn;
dxDBGrid2Column2: TdxDBGridMaskColumn;
dxDBGrid2Column3: TdxDBGridDateColumn;
dxDBGrid2Column4: TdxDBGridMaskColumn;
dxDBGrid2Column5: TdxDBGridMaskColumn;
dxDBGrid2Column6: TdxDBGridMaskColumn;
dxDBGrid2Column7: TdxDBGridMaskColumn;
procedure bsSkinButton5Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure bsSkinButton10Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_info_kaoqin_report: Tfrm_info_kaoqin_report;
implementation
uses u_main, u_data_share, my_sys_function;
{$R *.dfm}
procedure Tfrm_info_kaoqin_report.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_info_kaoqin_report.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
frm_info_kaoqin_report.Hide;
frm_info_kaoqin_report.ManualFloat(frm_info_kaoqin_report.BoundsRect );
frm_main.freeTabs('frm_info_kaoqin_report');
action:=cafree;
frm_info_kaoqin_report:=nil;
end;
procedure Tfrm_info_kaoqin_report.bsSkinButton10Click(Sender: TObject);
begin
wwDBDateTimePicker1.text:='';
wwDBDateTimePicker2.text:='';
RxDBLookupCombo5.clearvalue;
end;
procedure Tfrm_info_kaoqin_report.bsSkinButton1Click(Sender: TObject);
VAR
STR:widestring;
j,i:integer;
Year, Month, Day: word;
begin
if (wwDBDateTimePicker1.text='')or(wwDBDateTimePicker2.text='')then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>ʼ<EBBFAA><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD><DAA3><EFBFBD>');
exit;
end;
if wwDBDateTimePicker1.Date>wwDBDateTimePicker2.Date then
begin
showmessage('<27><>ʼ<EFBFBD><CABC><EFBFBD>ڲ<EFBFBD><DAB2>ܴ<EFBFBD><DCB4>ڽ<EFBFBD><DABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD><DAA3><EFBFBD>');
exit;
end;
DecodeDate(wwDBDateTimePicker1.date, Year, Month, Day);
str:='where (DATEPART(Year,<2C><><EFBFBD><EFBFBD>)*10000+DATEPART(month,<2C><><EFBFBD><EFBFBD>)*100+DATEPART(day,<2C><><EFBFBD><EFBFBD>))>='
+inttostr(Year*10000+month*100+day);
DecodeDate(wwDBDateTimePicker2.date, Year, Month, Day);
str:=str+' and (DATEPART(Year,<2C><><EFBFBD><EFBFBD>)*10000+DATEPART(month,<2C><><EFBFBD><EFBFBD>)*100+DATEPART(day,<2C><><EFBFBD><EFBFBD>))<='
+inttostr(Year*10000+month*100+day);
if RxDBLookupCombo5.DisplayValue<>''then
str:=str+' and ְԱ='+''''+RxDBLookupCombo5.DisplayValue+'''';
p_detail.close;
p_detail.Parameters.ParamByName('SQLStr').value:=
'SELECT KQ_ID,ְԱ,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD>,<2C><>Ȩ,<2C><>Ȩ<EFBFBD><C8A8>,'
+'(case <20><>Ȩ when '+''''+'<27><>'+''''+' then null else '
+'(CASE <20><><EFBFBD><EFBFBD> WHEN '+''''+'<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>'+''''+' THEN '
+'(CASE WHEN ((DATEPART(Hour, <20><><EFBFBD><EFBFBD>))'
+'* 100 + (DATEPART(minute, <20><><EFBFBD><EFBFBD>)) >'
+get_parameters_value(8,'830')
+') THEN '+''''+'<27>ٵ<EFBFBD>'+''''+' ELSE null END) '
+'ELSE '
+'(CASE <20><><EFBFBD><EFBFBD> WHEN '+''''+'<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>'+''''+' THEN (CASE WHEN ((DATEPART(Hour, <20><><EFBFBD><EFBFBD>))'
+'* 100 + (DATEPART(minute, <20><><EFBFBD><EFBFBD>)) <'
+get_parameters_value(24,'1200')
+') THEN '+''''+'<27><><EFBFBD><EFBFBD>'+''''+' ELSE null END) '
+'ELSE '
+'(CASE <20><><EFBFBD><EFBFBD> WHEN '+''''+'<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>'+''''+' THEN (CASE WHEN ((DATEPART(Hour, <20><><EFBFBD><EFBFBD>))'
+'* 100 + (DATEPART(minute, <20><><EFBFBD><EFBFBD>)) >'
+get_parameters_value(25,'1330')
+') THEN '+''''+'<27>ٵ<EFBFBD>'+''''+' ELSE null END) '
+'ELSE '
+'(CASE <20><><EFBFBD><EFBFBD> WHEN '+''''+'<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>'+''''+' THEN (CASE WHEN ((DATEPART(Hour, <20><><EFBFBD><EFBFBD>))'
+'* 100 + (DATEPART(minute, <20><><EFBFBD><EFBFBD>)) <'
+get_parameters_value(26,'1730')
+') THEN '+''''+'<27><><EFBFBD><EFBFBD>'+''''+' ELSE null END) '
+'ELSE null END)END)END)END)end) AS Υ<><CEA5>,'
+'(ltrim(str(DATEPART(Year,<2C><><EFBFBD><EFBFBD>)*10000+DATEPART(month,<2C><><EFBFBD><EFBFBD>)*100+DATEPART(day,<2C><><EFBFBD><EFBFBD>)))+<2B><><EFBFBD><EFBFBD>+ְԱ) as <20><>׼ '
+'FROM t_info_kaoqin '
+str
+' order by <20><><EFBFBD><EFBFBD>,ְԱ desc';
p_detail.open;
t_sum.close;
t_sum.open;
if p_detail.IsEmpty then
exit;
i:=Round(wwDBDateTimePicker2.date-wwDBDateTimePicker1.date);
for j:=0 to i do
begin
DecodeDate(wwDBDateTimePicker1.date+j, Year, Month, Day);
if RxDBLookupCombo5.DisplayValue=''then
begin
frm_data_share.t_sys_employee.first;
while not frm_data_share.t_sys_employee.eof do
begin
if not t_sum.Locate('ְԱ',frm_data_share.t_sys_employee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,[])then
begin
t_sum.insert;
t_sum['ְԱ']:=frm_data_share.t_sys_employee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD>ٵ<EFBFBD>']:=0;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']:=0;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']:=0;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']:=0;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']:=0;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD>ٵ<EFBFBD>']:=0;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']:=0;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']:=0;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']:=0;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']:=0;
t_sum['<27>ϼƳٵ<C6B3>']:=0;
t_sum['<27>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_sum['<27>ϼ<EFBFBD>ûǩ']:=0;
t_sum['<27>ϼ<EFBFBD><CFBC><EFBFBD>Ȩ']:=0;
t_sum.Post;
end;
if p_detail.Locate('<27><>׼',inttostr(Year*10000+month*100+day)+'<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>'+frm_data_share.t_sys_employee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,[])then
begin
if p_detail.FieldByName('<27><>Ȩ').asstring='<27><>'then
begin
t_sum.edit;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']+1;
t_sum.post;
end
else
begin
if p_detail.FieldByName('Υ<><CEA5>').asstring='<27>ٵ<EFBFBD>'then
begin
t_sum.edit;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD>ٵ<EFBFBD>']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD>ٵ<EFBFBD>']+1;
t_sum.post;
end;
end;
end
else
begin
t_sum.edit;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']+1;
t_sum.post;
end;
if p_detail.Locate('<27><>׼',inttostr(Year*10000+month*100+day)+'<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>'+frm_data_share.t_sys_employee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,[])then
begin
if p_detail.FieldByName('<27><>Ȩ').asstring='<27><>'then
begin
t_sum.edit;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']+1;
t_sum.post;
end
else
begin
if p_detail.FieldByName('Υ<><CEA5>').asstring='<27><><EFBFBD><EFBFBD>'then
begin
t_sum.edit;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+1;
t_sum.post;
end;
end;
end
else
begin
t_sum.edit;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']+1;
t_sum.post;
end;
if p_detail.Locate('<27><>׼',inttostr(Year*10000+month*100+day)+'<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>'+frm_data_share.t_sys_employee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,[])then
begin
if p_detail.FieldByName('<27><>Ȩ').asstring='<27><>'then
begin
t_sum.edit;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']+1;
t_sum.post;
end
else
begin
if p_detail.FieldByName('Υ<><CEA5>').asstring='<27>ٵ<EFBFBD>'then
begin
t_sum.edit;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD>ٵ<EFBFBD>']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD>ٵ<EFBFBD>']+1;
t_sum.post;
end;
end;
end
else
begin
t_sum.edit;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']+1;
t_sum.post;
end;
if p_detail.Locate('<27><>׼',inttostr(Year*10000+month*100+day)+'<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>'+frm_data_share.t_sys_employee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,[])then
begin
if p_detail.FieldByName('<27><>Ȩ').asstring='<27><>'then
begin
t_sum.edit;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']+1;
t_sum.post;
end
else
begin
if p_detail.FieldByName('Υ<><CEA5>').asstring='<27><><EFBFBD><EFBFBD>'then
begin
t_sum.edit;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+1;
t_sum.post;
end;
end;
end
else
begin
t_sum.edit;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']+1;
t_sum.post;
end;
frm_data_share.t_sys_employee.next;
end;
end
else
begin
if frm_data_share.t_sys_employee.Locate('<27><><EFBFBD><EFBFBD>',RxDBLookupCombo5.DisplayValue,[])then
begin
if not t_sum.Locate('ְԱ',frm_data_share.t_sys_employee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,[])then
begin
t_sum.insert;
t_sum['ְԱ']:=frm_data_share.t_sys_employee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD>ٵ<EFBFBD>']:=0;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']:=0;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']:=0;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']:=0;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']:=0;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD>ٵ<EFBFBD>']:=0;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']:=0;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']:=0;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']:=0;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']:=0;
t_sum['<27>ϼƳٵ<C6B3>']:=0;
t_sum['<27>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>']:=0;
t_sum['<27>ϼ<EFBFBD>ûǩ']:=0;
t_sum['<27>ϼ<EFBFBD><CFBC><EFBFBD>Ȩ']:=0;
t_sum.Post;
end;
if p_detail.Locate('<27><>׼',inttostr(Year*10000+month*100+day)+'<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>'+frm_data_share.t_sys_employee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,[])then
begin
if p_detail.FieldByName('<27><>Ȩ').asstring='<27><>'then
begin
t_sum.edit;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']+1;
t_sum.post;
end
else
begin
if p_detail.FieldByName('Υ<><CEA5>').asstring='<27>ٵ<EFBFBD>'then
begin
t_sum.edit;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD>ٵ<EFBFBD>']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD>ٵ<EFBFBD>']+1;
t_sum.post;
end;
end;
end
else
begin
t_sum.edit;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']+1;
t_sum.post;
end;
if p_detail.Locate('<27><>׼',inttostr(Year*10000+month*100+day)+'<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>'+frm_data_share.t_sys_employee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,[])then
begin
if p_detail.FieldByName('<27><>Ȩ').asstring='<27><>'then
begin
t_sum.edit;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']+1;
t_sum.post;
end
else
begin
if p_detail.FieldByName('Υ<><CEA5>').asstring='<27><><EFBFBD><EFBFBD>'then
begin
t_sum.edit;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+1;
t_sum.post;
end;
end;
end
else
begin
t_sum.edit;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']+1;
t_sum.post;
end;
if p_detail.Locate('<27><>׼',inttostr(Year*10000+month*100+day)+'<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>'+frm_data_share.t_sys_employee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,[])then
begin
if p_detail.FieldByName('<27><>Ȩ').asstring='<27><>'then
begin
t_sum.edit;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']+1;
t_sum.post;
end
else
begin
if p_detail.FieldByName('Υ<><CEA5>').asstring='<27>ٵ<EFBFBD>'then
begin
t_sum.edit;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD>ٵ<EFBFBD>']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD>ٵ<EFBFBD>']+1;
t_sum.post;
end;
end;
end
else
begin
t_sum.edit;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']+1;
t_sum.post;
end;
if p_detail.Locate('<27><>׼',inttostr(Year*10000+month*100+day)+'<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>'+frm_data_share.t_sys_employee.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring,[])then
begin
if p_detail.FieldByName('<27><>Ȩ').asstring='<27><>'then
begin
t_sum.edit;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']+1;
t_sum.post;
end
else
begin
if p_detail.FieldByName('Υ<><CEA5>').asstring='<27><><EFBFBD><EFBFBD>'then
begin
t_sum.edit;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+1;
t_sum.post;
end;
end;
end
else
begin
t_sum.edit;
t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']+1;
t_sum.post;
end;
end;
end;
end;
t_sum.first;
while not t_sum.eof do
begin
t_sum.edit;
t_sum['<27>ϼƳٵ<C6B3>']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD>ٵ<EFBFBD>']+t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD>ٵ<EFBFBD>'];
t_sum['<27>ϼ<EFBFBD><CFBC><EFBFBD><EFBFBD><EFBFBD>']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']+t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
t_sum['<27>ϼ<EFBFBD>ûǩ']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']+t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']+t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ']+t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ûǩ'];
t_sum['<27>ϼ<EFBFBD><CFBC><EFBFBD>Ȩ']:=t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']+t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']+t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ']+t_sum['<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9><EFBFBD><EFBFBD>Ȩ'];
t_sum.post;
t_sum.next;
end;
end;
end.