补签卡的流程怎么获取补签当天的日期类型?
【适用版本】
通用
【概述】
问题:单笔补签卡在工作流或者补签当天的日期类型
方案:设置工作流脚本处理,参考如下:
//输入变量:billId 补签卡单据id personid 职员id
//输出变量:ft 日期类型 当ft为0的时候说明是工作日
java . sql . Connection con1 = com . kingdee . bos . framework . ejb . EJBFactory . getConnection ( __bosContext ) ;
java . sql . Statement st = con1 . createStatement ( ) ;
java . sql . ResultSet rs = null ;
tsql="select sum(ft)ft from (select distinct a.FAttendDate,case when b.FDayType is null then d.FDayType else b.FDayType end as FT"
+" from T_HR_ATS_FillSignCardEntry a"
+" left join T_HR_ATS_ScheduleShift b on a.FPersonID=b.fproposerid and a.FAttendDate=b.FATTENDDATE and a.FPERSONID ='"+ personid+"'"
+" left join (select c.FPROPOSERID,e.FDate,e.FDayType from t_hr_ats_attendancefile c right join T_HR_ATS_WorkCalendaritem e on c.FcalendarID=e.FCalendarGroupID )d on a.FAttendDate=d.FDate and a.FPersonID=d.FPROPOSERID and a.FPERSONID ='"+ personid+"'"
+" where a.fbillid ='"+billId+"' )X";
rs = st . executeQuery ( tsql ) ;
if ( rs . next ) {
ft= rs . getDouble ( "ft" ) ;
}
com . kingdee . util . db . SQLUtils . cleanup ( st , con1 ) ;
com . kingdee . util . db . SQLUtils . cleanup ( con1 ) ;
补签卡的流程怎么获取补签当天的日期类型?
本文2024-09-22 21:54:44发表“s-hr cloud知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-shr-123145.html