ATS考勤2.6考勤计算(考勤明细数据拆分表)原创
金蝶云社区-枯藤老树昏鸦
枯藤老树昏鸦
1人赞赏了该文章 52次浏览 未经作者许可,禁止转载编辑于2023年10月04日 11:26:17
封面
T_ATS_DETAILCALC_9001(考勤明细数据拆分表)
是否主键字段名字段描述数据类型长度可空缺省值备注
FID FID int

0

FSTARTTIME1 第一段上班时间 datetime



FENDTIME1 第一段下班时间 datetime



FSTARTTIME2 第二段上班时间 datetime



FENDTIME2 第二段下班时间 datetime



FSTARTTIME3 第三段上班时间 datetime



FENDTIME3 第三段下班时间 datetime



FSTARTTIME4 第四段上班时间 datetime



FENDTIME4 第四段下班时间 datetime



FSTARTTIME5 第五段上班时间 datetime



FENDTIME5 第五段下班时间 datetime



FLATEMINUTE1 第一段迟到分钟 int



FLATEMINUTE2 第二段迟到分钟 int



FLATEMINUTE3 第三段迟到分钟 int



FLATEMINUTE4 第四段迟到分钟 int



FLATEMINUTE5 第五段迟到分钟 int



FEARLYMINUTE1 第一段早退分钟 int



FEARLYMINUTE2 第二段早退分钟 int



FEARLYMINUTE3 第三段早退分钟 int



FEARLYMINUTE4 第四段早退分钟 int



FEARLYMINUTE5 第五段早退分钟 int



FABSENTMINUTE1 第一段旷工分钟 int



FABSENTMINUTE2 第二段旷工分钟 int



FABSENTMINUTE3 第三段旷工分钟 int



FABSENTMINUTE4 第四段旷工分钟 int



FABSENTMINUTE5 第五段旷工分钟 int



FLATETIMES 迟到次数 int



FLATEMINUTESUM 迟到分钟 int



FEARLYTIMES 早退次数 int



FEARLYMINUTESUM 早退分钟 int



FABSENTTIMES 旷工次数 int



FABSENTHOURSUM 旷工小时数 decimal 19,6


FSUPPLEMENTTIMES 补卡次数 int



FCHECKINTIMES 签卡次数 int



FLEAVETIMES 请假次数 int



FLEAVEHOURSUM 请假时长小时 decimal 19,6


FLEAVEDAYSUM 请假时长天 decimal 19,6


FTRIPTIMES 出差次数 int



FTRIPDAYSUM 出差时长天 decimal 19,6


FTRIPHOURSUM 出差时长小时 decimal 19,6


FOT1 调休ot1小时数 decimal 19,6


FOT2 调休ot2小时数 decimal 19,6


FOT3 调休ot3小时数 decimal 19,6


FOT4 计加班费ot1小时数 decimal 19,6


FOT5 计加班费ot2小时数 decimal 19,6


FOT6 计加班费ot3小时数 decimal 19,6


FUNCHECKINTIMES 缺卡次数 int



FFIRSTCARD 第一卡 datetime



FLASTCARD 最后一卡 datetime


备注:T_ATS_DETAILCALC_9001(考勤明细数据拆分表)


--建表脚本--

create table T_ATS_DETAILCALC_9001(

FID int not null  comment 'FID'

,FSTARTTIME1 datetime default null  comment '第一段上班时间'

,FENDTIME1 datetime default null  comment '第一段下班时间'

,FSTARTTIME2 datetime default null  comment '第二段上班时间'

,FENDTIME2 datetime default null  comment '第二段下班时间'

,FSTARTTIME3 datetime default null  comment '第三段上班时间'

,FENDTIME3 datetime default null  comment '第三段下班时间'

,FSTARTTIME4 datetime default null  comment '第四段上班时间'

,FENDTIME4 datetime default null  comment '第四段下班时间'

,FSTARTTIME5 datetime default null  comment '第五段上班时间'

,FENDTIME5 datetime default null  comment '第五段下班时间'

,FLATEMINUTE1 int default null  comment '第一段迟到分钟'

,FLATEMINUTE2 int default null  comment '第二段迟到分钟'

,FLATEMINUTE3 int default null  comment '第三段迟到分钟'

,FLATEMINUTE4 int default null  comment '第四段迟到分钟'

,FLATEMINUTE5 int default null  comment '第五段迟到分钟'

,FEARLYMINUTE1 int default null  comment '第一段早退分钟'

,FEARLYMINUTE2 int default null  comment '第二段早退分钟'

,FEARLYMINUTE3 int default null  comment '第三段早退分钟'

,FEARLYMINUTE4 int default null  comment '第四段早退分钟'

,FEARLYMINUTE5 int default null  comment '第五段早退分钟'

,FABSENTMINUTE1 int default null  comment '第一段旷工分钟'

,FABSENTMINUTE2 int default null  comment '第二段旷工分钟'

,FABSENTMINUTE3 int default null  comment '第三段旷工分钟'

,FABSENTMINUTE4 int default null  comment '第四段旷工分钟'

,FABSENTMINUTE5 int default null  comment '第五段旷工分钟'

,FLATETIMES int default null  comment '迟到次数'

,FLATEMINUTESUM int default null  comment '迟到分钟'

,FEARLYTIMES int default null  comment '早退次数'

,FEARLYMINUTESUM int default null  comment '早退分钟'

,FABSENTTIMES int default null  comment '旷工次数'

,FABSENTHOURSUM decimal(19,6) default null  comment '旷工小时数'

,FSUPPLEMENTTIMES int default null  comment '补卡次数'

,FCHECKINTIMES int default null  comment '签卡次数'

,FLEAVETIMES int default null  comment '请假次数'

,FLEAVEHOURSUM decimal(19,6) default null  comment '请假时长小时'

,FLEAVEDAYSUM decimal(19,6) default null  comment '请假时长天'

,FTRIPTIMES int default null  comment '出差次数'

,FTRIPDAYSUM decimal(19,6) default null  comment '出差时长天'

,FTRIPHOURSUM decimal(19,6) default null  comment '出差时长小时'

,FOT1 decimal(19,6) default null  comment '调休ot1小时数'

,FOT2 decimal(19,6) default null  comment '调休ot2小时数'

,FOT3 decimal(19,6) default null  comment '调休ot3小时数'

,FOT4 decimal(19,6) default null  comment '计加班费ot1小时数'

,FOT5 decimal(19,6) default null  comment '计加班费ot2小时数'

,FOT6 decimal(19,6) default null  comment '计加班费ot3小时数'

,FUNCHECKINTIMES int default null  comment '缺卡次数'

,FFIRSTCARD datetime default null  comment '第一卡'

,FLASTCARD datetime default null  comment '最后一卡'

,primary key (FID)

) comment = '考勤明细数据拆分表'


--查询--

select FID as "fid",FSTARTTIME1 as "fstarttime1",FENDTIME1 as "fendtime1",FSTARTTIME2 as "fstarttime2",FENDTIME2 as "fendtime2",FSTARTTIME3 as "fstarttime3",FENDTIME3 as "fendtime3",FSTARTTIME4 as "fstarttime4",FENDTIME4 as "fendtime4",FSTARTTIME5 as "fstarttime5",FENDTIME5 as "fendtime5",FLATEMINUTE1 as "flateminute1",FLATEMINUTE2 as "flateminute2",FLATEMINUTE3 as "flateminute3",FLATEMINUTE4 as "flateminute4",FLATEMINUTE5 as "flateminute5",FEARLYMINUTE1 as "fearlyminute1",FEARLYMINUTE2 as "fearlyminute2",FEARLYMINUTE3 as "fearlyminute3",FEARLYMINUTE4 as "fearlyminute4",FEARLYMINUTE5 as "fearlyminute5",FABSENTMINUTE1 as "fabsentminute1",FABSENTMINUTE2 as "fabsentminute2",FABSENTMINUTE3 as "fabsentminute3",FABSENTMINUTE4 as "fabsentminute4",FABSENTMINUTE5 as "fabsentminute5",FLATETIMES as "flatetimes",FLATEMINUTESUM as "flateminutesum",FEARLYTIMES as "fearlytimes",FEARLYMINUTESUM as "fearlyminutesum",FABSENTTIMES as "fabsenttimes",FABSENTHOURSUM as "fabsenthoursum",FSUPPLEMENTTIMES as "fsupplementtimes",FCHECKINTIMES as "fcheckintimes",FLEAVETIMES as "fleavetimes",FLEAVEHOURSUM as "fleavehoursum",FLEAVEDAYSUM as "fleavedaysum",FTRIPTIMES as "ftriptimes",FTRIPDAYSUM as "ftripdaysum",FTRIPHOURSUM as "ftriphoursum",FOT1 as "fot1",FOT2 as "fot2",FOT3 as "fot3",FOT4 as "fot4",FOT5 as "fot5",FOT6 as "fot6",FUNCHECKINTIMES as "funcheckintimes",FFIRSTCARD as "ffirstcard",FLASTCARD as "flastcard" from T_ATS_DETAILCALC_9001


--查询(中文字段)--

select FID as "FID",FSTARTTIME1 as "第一段上班时间",FENDTIME1 as "第一段下班时间",FSTARTTIME2 as "第二段上班时间",FENDTIME2 as "第二段下班时间",FSTARTTIME3 as "第三段上班时间",FENDTIME3 as "第三段下班时间",FSTARTTIME4 as "第四段上班时间",FENDTIME4 as "第四段下班时间",FSTARTTIME5 as "第五段上班时间",FENDTIME5 as "第五段下班时间",FLATEMINUTE1 as "第一段迟到分钟",FLATEMINUTE2 as "第二段迟到分钟",FLATEMINUTE3 as "第三段迟到分钟",FLATEMINUTE4 as "第四段迟到分钟",FLATEMINUTE5 as "第五段迟到分钟",FEARLYMINUTE1 as "第一段早退分钟",FEARLYMINUTE2 as "第二段早退分钟",FEARLYMINUTE3 as "第三段早退分钟",FEARLYMINUTE4 as "第四段早退分钟",FEARLYMINUTE5 as "第五段早退分钟",FABSENTMINUTE1 as "第一段旷工分钟",FABSENTMINUTE2 as "第二段旷工分钟",FABSENTMINUTE3 as "第三段旷工分钟",FABSENTMINUTE4 as "第四段旷工分钟",FABSENTMINUTE5 as "第五段旷工分钟",FLATETIMES as "迟到次数",FLATEMINUTESUM as "迟到分钟",FEARLYTIMES as "早退次数",FEARLYMINUTESUM as "早退分钟",FABSENTTIMES as "旷工次数",FABSENTHOURSUM as "旷工小时数",FSUPPLEMENTTIMES as "补卡次数",FCHECKINTIMES as "签卡次数",FLEAVETIMES as "请假次数",FLEAVEHOURSUM as "请假时长小时",FLEAVEDAYSUM as "请假时长天",FTRIPTIMES as "出差次数",FTRIPDAYSUM as "出差时长天",FTRIPHOURSUM as "出差时长小时",FOT1 as "调休ot1小时数",FOT2 as "调休ot2小时数",FOT3 as "调休ot3小时数",FOT4 as "计加班费ot1小时数",FOT5 as "计加班费ot2小时数",FOT6 as "计加班费ot3小时数",FUNCHECKINTIMES as "缺卡次数",FFIRSTCARD as "第一卡",FLASTCARD as "最后一卡" from T_ATS_DETAILCALC_9001


--INSERT脚本--

insert into T_ATS_DETAILCALC_9001(FID,FSTARTTIME1,FENDTIME1,FSTARTTIME2,FENDTIME2,FSTARTTIME3,FENDTIME3,FSTARTTIME4,FENDTIME4,FSTARTTIME5,FENDTIME5,FLATEMINUTE1,FLATEMINUTE2,FLATEMINUTE3,FLATEMINUTE4,FLATEMINUTE5,FEARLYMINUTE1,FEARLYMINUTE2,FEARLYMINUTE3,FEARLYMINUTE4,FEARLYMINUTE5,FABSENTMINUTE1,FABSENTMINUTE2,FABSENTMINUTE3,FABSENTMINUTE4,FABSENTMINUTE5,FLATETIMES,FLATEMINUTESUM,FEARLYTIMES,FEARLYMINUTESUM,FABSENTTIMES,FABSENTHOURSUM,FSUPPLEMENTTIMES,FCHECKINTIMES,FLEAVETIMES,FLEAVEHOURSUM,FLEAVEDAYSUM,FTRIPTIMES,FTRIPDAYSUM,FTRIPHOURSUM,FOT1,FOT2,FOT3,FOT4,FOT5,FOT6,FUNCHECKINTIMES,FFIRSTCARD,FLASTCARD) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)


--UPDATE脚本--

update T_ATS_DETAILCALC_9001 set FID=?,FSTARTTIME1=?,FENDTIME1=?,FSTARTTIME2=?,FENDTIME2=?,FSTARTTIME3=?,FENDTIME3=?,FSTARTTIME4=?,FENDTIME4=?,FSTARTTIME5=?,FENDTIME5=?,FLATEMINUTE1=?,FLATEMINUTE2=?,FLATEMINUTE3=?,FLATEMINUTE4=?,FLATEMINUTE5=?,FEARLYMINUTE1=?,FEARLYMINUTE2=?,FEARLYMINUTE3=?,FEARLYMINUTE4=?,FEARLYMINUTE5=?,FABSENTMINUTE1=?,FABSENTMINUTE2=?,FABSENTMINUTE3=?,FABSENTMINUTE4=?,FABSENTMINUTE5=?,FLATETIMES=?,FLATEMINUTESUM=?,FEARLYTIMES=?,FEARLYMINUTESUM=?,FABSENTTIMES=?,FABSENTHOURSUM=?,FSUPPLEMENTTIMES=?,FCHECKINTIMES=?,FLEAVETIMES=?,FLEAVEHOURSUM=?,FLEAVEDAYSUM=?,FTRIPTIMES=?,FTRIPDAYSUM=?,FTRIPHOURSUM=?,FOT1=?,FOT2=?,FOT3=?,FOT4=?,FOT5=?,FOT6=?,FUNCHECKINTIMES=?,FFIRSTCARD=?,FLASTCARD=? where FID=?


--delete脚本--

delete from T_ATS_DETAILCALC_9001 where FID=?


--给字段加备注--

alter table T_ATS_DETAILCALC_9001 comment '考勤明细数据拆分表';

alter table T_ATS_DETAILCALC_9001 modify column FID int not null  comment 'FID';

alter table T_ATS_DETAILCALC_9001 modify column FSTARTTIME1 datetime default null  comment '第一段上班时间';

alter table T_ATS_DETAILCALC_9001 modify column FENDTIME1 datetime default null  comment '第一段下班时间';

alter table T_ATS_DETAILCALC_9001 modify column FSTARTTIME2 datetime default null  comment '第二段上班时间';

alter table T_ATS_DETAILCALC_9001 modify column FENDTIME2 datetime default null  comment '第二段下班时间';

alter table T_ATS_DETAILCALC_9001 modify column FSTARTTIME3 datetime default null  comment '第三段上班时间';

alter table T_ATS_DETAILCALC_9001 modify column FENDTIME3 datetime default null  comment '第三段下班时间';

alter table T_ATS_DETAILCALC_9001 modify column FSTARTTIME4 datetime default null  comment '第四段上班时间';

alter table T_ATS_DETAILCALC_9001 modify column FENDTIME4 datetime default null  comment '第四段下班时间';

alter table T_ATS_DETAILCALC_9001 modify column FSTARTTIME5 datetime default null  comment '第五段上班时间';

alter table T_ATS_DETAILCALC_9001 modify column FENDTIME5 datetime default null  comment '第五段下班时间';

alter table T_ATS_DETAILCALC_9001 modify column FLATEMINUTE1 int default null  comment '第一段迟到分钟';

alter table T_ATS_DETAILCALC_9001 modify column FLATEMINUTE2 int default null  comment '第二段迟到分钟';

alter table T_ATS_DETAILCALC_9001 modify column FLATEMINUTE3 int default null  comment '第三段迟到分钟';

alter table T_ATS_DETAILCALC_9001 modify column FLATEMINUTE4 int default null  comment '第四段迟到分钟';

alter table T_ATS_DETAILCALC_9001 modify column FLATEMINUTE5 int default null  comment '第五段迟到分钟';

alter table T_ATS_DETAILCALC_9001 modify column FEARLYMINUTE1 int default null  comment '第一段早退分钟';

alter table T_ATS_DETAILCALC_9001 modify column FEARLYMINUTE2 int default null  comment '第二段早退分钟';

alter table T_ATS_DETAILCALC_9001 modify column FEARLYMINUTE3 int default null  comment '第三段早退分钟';

alter table T_ATS_DETAILCALC_9001 modify column FEARLYMINUTE4 int default null  comment '第四段早退分钟';

alter table T_ATS_DETAILCALC_9001 modify column FEARLYMINUTE5 int default null  comment '第五段早退分钟';

alter table T_ATS_DETAILCALC_9001 modify column FABSENTMINUTE1 int default null  comment '第一段旷工分钟';

alter table T_ATS_DETAILCALC_9001 modify column FABSENTMINUTE2 int default null  comment '第二段旷工分钟';

alter table T_ATS_DETAILCALC_9001 modify column FABSENTMINUTE3 int default null  comment '第三段旷工分钟';

alter table T_ATS_DETAILCALC_9001 modify column FABSENTMINUTE4 int default null  comment '第四段旷工分钟';

alter table T_ATS_DETAILCALC_9001 modify column FABSENTMINUTE5 int default null  comment '第五段旷工分钟';

alter table T_ATS_DETAILCALC_9001 modify column FLATETIMES int default null  comment '迟到次数';

alter table T_ATS_DETAILCALC_9001 modify column FLATEMINUTESUM int default null  comment '迟到分钟';

alter table T_ATS_DETAILCALC_9001 modify column FEARLYTIMES int default null  comment '早退次数';

alter table T_ATS_DETAILCALC_9001 modify column FEARLYMINUTESUM int default null  comment '早退分钟';

alter table T_ATS_DETAILCALC_9001 modify column FABSENTTIMES int default null  comment '旷工次数';

alter table T_ATS_DETAILCALC_9001 modify column FABSENTHOURSUM decimal(19,6) default null  comment '旷工小时数';

alter table T_ATS_DETAILCALC_9001 modify column FSUPPLEMENTTIMES int default null  comment '补卡次数';

alter table T_ATS_DETAILCALC_9001 modify column FCHECKINTIMES int default null  comment '签卡次数';

alter table T_ATS_DETAILCALC_9001 modify column FLEAVETIMES int default null  comment '请假次数';

alter table T_ATS_DETAILCALC_9001 modify column FLEAVEHOURSUM decimal(19,6) default null  comment '请假时长小时';

alter table T_ATS_DETAILCALC_9001 modify column FLEAVEDAYSUM decimal(19,6) default null  comment '请假时长天';

alter table T_ATS_DETAILCALC_9001 modify column FTRIPTIMES int default null  comment '出差次数';

alter table T_ATS_DETAILCALC_9001 modify column FTRIPDAYSUM decimal(19,6) default null  comment '出差时长天';

alter table T_ATS_DETAILCALC_9001 modify column FTRIPHOURSUM decimal(19,6) default null  comment '出差时长小时';

alter table T_ATS_DETAILCALC_9001 modify column FOT1 decimal(19,6) default null  comment '调休ot1小时数';

alter table T_ATS_DETAILCALC_9001 modify column FOT2 decimal(19,6) default null  comment '调休ot2小时数';

alter table T_ATS_DETAILCALC_9001 modify column FOT3 decimal(19,6) default null  comment '调休ot3小时数';

alter table T_ATS_DETAILCALC_9001 modify column FOT4 decimal(19,6) default null  comment '计加班费ot1小时数';

alter table T_ATS_DETAILCALC_9001 modify column FOT5 decimal(19,6) default null  comment '计加班费ot2小时数';

alter table T_ATS_DETAILCALC_9001 modify column FOT6 decimal(19,6) default null  comment '计加班费ot3小时数';

alter table T_ATS_DETAILCALC_9001 modify column FUNCHECKINTIMES int default null  comment '缺卡次数';

alter table T_ATS_DETAILCALC_9001 modify column FFIRSTCARD datetime default null  comment '第一卡';

alter table T_ATS_DETAILCALC_9001 modify column FLASTCARD datetime default null  comment '最后一卡';


上传图片


赞 1