8.2编制动态查询期初人数取数来源
编制动态查询期初人数, sp2 取当月开始日期1号数据 为起初数据,sp2后,取上月末为 下月期初数据,数据来源参考以下sql
SELECT adminrange.fid fid,adminrange.flongnumber, count(*) count FROM T_BD_PersonHis AS PERSON LEFT OUTER JOIN T_HR_EmpOrgRelation AS EMPPOSORGRELA ON PERSON.FhistoryRelateID = EMPPOSORGRELA.FPersonID LEFT OUTER JOIN T_HR_EmpLaborRelationHis AS EMPLABORRELA ON EMPPOSORGRELA.FlaborRelationID = EMPLABORRELA.fhistoryrelateid LEFT OUTER JOIN T_HR_BDEmployeeType AS EMPLOYEETYPE ON EMPLABORRELA.FLaborRelationStateID = EMPLOYEETYPE.FID LEFT OUTER JOIN T_ORG_AdminHis AS ADMINORGUNIT ON EMPPOSORGRELA.FAdminOrgID = ADMINORGUNIT.FhistoryRelateID LEFT OUTER JOIN T_ORG_PositionHis AS POSITION ON EMPPOSORGRELA.FPositionID = POSITION.FhistoryRelateID LEFT OUTER JOIN T_HR_PersonPositionHis AS PP ON PERSON.FhistoryRelateID = PP.FPersonID INNER JOIN T_BD_EmployeeModle AS EMPLOYEEMODLE ON EMPLOYEETYPE.FEmployeeModleID = EMPLOYEEMODLE.FID right join t_org_adminHis adminrange on ADMINORGUNIT.FLongNumber = adminrange.flongnumber and adminrange.flongnumber in ('01!0729003','01!0729005','01!0729007','01!11','01!11.04.07','01!11.07.07','01!20150803001','01!hhfdd-002','01!hhfdd-154','01!hhfdd-155') where EMPPOSORGRELA.FEFFDT <=? AND EMPPOSORGRELA.FLEFFDT >=? AND PP.FEFFDT <=? AND PP.FLEFFDT >=? AND ADMINORGUNIT.FEFFDT <=? AND ADMINORGUNIT.FLEFFDT >=? AND PERSON.FEFFDT <=? AND PERSON.FLEFFDT >=? AND EMPLABORRELA.FEFFDT <=? AND EMPLABORRELA.FLEFFDT >=? AND POSITION.FEFFDT <=? AND POSITION.FLEFFDT >=? AND EMPPOSORGRELA.FAssignType = 1 AND EMPPOSORGRELA.FIsInner = 1 AND EMPLOYEETYPE.FIsOnTheStrength = 1 AND ((ADMINORGUNIT.FLongNumber LIKE concat(adminrange.flongnumber, '!%')) OR ADMINORGUNIT.FLongNumber = adminrange.flongnumber) group by adminrange.fid,adminrange.flongnumber
8.2编制动态查询期初人数取数来源
编制动态查询期初人数, sp2 取当月开始日期1号数据 为起初数据,sp2后,取上月末为 下月期初数据,数据来源参考以下sql SELECT admi...
点击下载文档
本文2024-09-22 21:03:57发表“s-hr cloud知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-shr-117663.html
您需要登录后才可以发表评论, 登录登录 或者 注册
最新文档
热门文章