73 lines
2.6 KiB
XML
73 lines
2.6 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
<mapper namespace="com.engine.organization.mapper.trigger.StaffTriggerMapper">
|
|
<update id="updateOrgStaffs">
|
|
update jcl_org_map
|
|
<set>
|
|
FPLAN = #{fPlan},
|
|
FONJOB = #{fOnJob},
|
|
</set>
|
|
where FTYPE =#{fType} and FOBJID=#{fObjId}
|
|
AND FDATEBEGIN <= #{currentDate}
|
|
AND FDATEEND >= #{currentDate}
|
|
</update>
|
|
|
|
|
|
<select id="countCompanyUsers" resultType="java.lang.Integer">
|
|
select count(1)
|
|
from hrmresource
|
|
where status <= 3
|
|
and subcompanyid1 = #{ecCompanyId}
|
|
</select>
|
|
<select id="countDepartmentUsers" resultType="java.lang.Integer">
|
|
select count(1)
|
|
from hrmresource
|
|
where status <= 3
|
|
and departmentid = #{ecDepartmentId}
|
|
</select>
|
|
|
|
<select id="countJobUsers" resultType="java.lang.Integer">
|
|
select count(1)
|
|
from hrmresource
|
|
where status <= 3
|
|
and jobtitle = #{jobTitle}
|
|
</select>
|
|
<select id="countAllusers" resultType="java.lang.Integer">
|
|
select count(1)
|
|
from hrmresource
|
|
where status <= 3
|
|
</select>
|
|
<select id="countCompanyStaffNum" resultType="java.lang.Integer">
|
|
select sum(staff_num)
|
|
from JCL_ORG_STAFF
|
|
where plan_id in (select id
|
|
from JCL_ORG_STAFFPLAN
|
|
where time_start <= #{currentDate}
|
|
and time_end >= #{currentDate}
|
|
and delete_type = 0)
|
|
and comp_id = #{companyId}
|
|
and delete_type = 0
|
|
</select>
|
|
<select id="countDepartmentStaffNum" resultType="java.lang.Integer">
|
|
select sum(staff_num)
|
|
from JCL_ORG_STAFF
|
|
where plan_id in (select id
|
|
from JCL_ORG_STAFFPLAN
|
|
where time_start <= #{currentDate}
|
|
and time_end >= #{currentDate}
|
|
and delete_type = 0)
|
|
and dept_id = #{departmentId}
|
|
and delete_type = 0
|
|
</select>
|
|
<select id="countJobStaffNum" resultType="java.lang.Integer">
|
|
select sum(staff_num)
|
|
from JCL_ORG_STAFF
|
|
where plan_id in (select id
|
|
from JCL_ORG_STAFFPLAN
|
|
where time_start <= #{currentDate}
|
|
and time_end >= #{currentDate}
|
|
and delete_type = 0)
|
|
and job_id = #{jobId}
|
|
and delete_type = 0
|
|
</select>
|
|
</mapper> |