兼容PostgreSQL
parent
db990ce227
commit
e138489c34
@ -1,30 +0,0 @@
|
||||
package com.engine.organization.mapper.trigger;
|
||||
|
||||
|
||||
import com.engine.organization.entity.hrmresource.po.HrmResourcePO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import weaver.hrm.passwordprotection.domain.HrmResource;
|
||||
|
||||
import java.sql.Date;
|
||||
|
||||
|
||||
/**
|
||||
* @Author dxfeng
|
||||
* @Date 2022/8/30
|
||||
* @Version V1.0
|
||||
**/
|
||||
public interface CompTriggerMapper {
|
||||
Integer getEcCompanyIdByUuid(@Param("uuid") String uuid);
|
||||
|
||||
HrmResource getHrmResourceById(@Param("id") Integer id);
|
||||
|
||||
String getJobTitleMarkById(@Param("id") Integer id);
|
||||
|
||||
Integer sumStaffNum(@Param("fdatebegin") Date fdatebegin, @Param("compId") Integer compId);
|
||||
|
||||
int deleteMap(@Param("ftype") Integer ftype, @Param("fobjid") Integer fobjid, @Param("fdatebegin") Date fdatebegin);
|
||||
|
||||
int updateMap(@Param("ftype") Integer ftype, @Param("fobjid") Integer fobjid, @Param("fdatebegin") Date fdatebegin, @Param("fdate") Date fdate);
|
||||
|
||||
HrmResourcePO getResourceByEcId(@Param("ecId") Integer ecId);
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
<?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.CompTriggerMapper">
|
||||
<update id="updateMap">
|
||||
update jcl_org_map
|
||||
<set>
|
||||
fdateend=#{fdate},
|
||||
</set>
|
||||
where ftype=#{ftype} and fobjid=#{fobjid} and fdateend > #{fdatebegin}
|
||||
</update>
|
||||
<delete id="deleteMap">
|
||||
delete
|
||||
from jcl_org_map
|
||||
where ftype = #{ftype}
|
||||
and fobjid = #{fobjid}
|
||||
and fdatebegin = #{fdatebegin}
|
||||
</delete>
|
||||
|
||||
<select id="getEcCompanyIdByUuid" resultType="java.lang.Integer">
|
||||
select id
|
||||
from HrmSubCompany
|
||||
where uuid = #{uuid}
|
||||
</select>
|
||||
<select id="getHrmResourceById" resultType="weaver.hrm.passwordprotection.domain.HrmResource">
|
||||
select messagerurl, lastname, jobtitle
|
||||
from hrmresource
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="getJobTitleMarkById" resultType="java.lang.String">
|
||||
select jobtitlemark
|
||||
from hrmjobtitles
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="sumStaffNum" 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 <= #{fdatebegin}
|
||||
and time_end >= #{fdatebegin})
|
||||
and comp_id = #{compId}
|
||||
</select>
|
||||
<select id="getResourceByEcId" resultMap="com.engine.organization.mapper.resource.ResourceMapper.HrmResourceMap">
|
||||
select
|
||||
<include refid="com.engine.organization.mapper.resource.ResourceMapper.baseColumns"/>
|
||||
from jcl_org_hrmresource t
|
||||
inner join hrmresource a on t.uuid = a.uuid
|
||||
where t.delete_type = 0 and a.id = #{ecId}
|
||||
</select>
|
||||
</mapper>
|
@ -1,20 +0,0 @@
|
||||
package com.engine.organization.mapper.trigger;
|
||||
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.sql.Date;
|
||||
|
||||
/**
|
||||
* @Author dxfeng
|
||||
* @Date 2022/8/30
|
||||
* @Version V1.0
|
||||
**/
|
||||
public interface DepartmentTriggerMapper {
|
||||
Integer getEcDepartmentIdByUuid(@Param("uuid") String uuid);
|
||||
|
||||
Integer sumStaffNum(@Param("fdatebegin") Date fdatebegin, @Param("departmentId") Integer departmentId);
|
||||
|
||||
|
||||
Integer countHrmResource(@Param("departmentid") Integer departmentid);
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
<?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.DepartmentTriggerMapper">
|
||||
<select id="getEcDepartmentIdByUuid" resultType="java.lang.Integer">
|
||||
select id
|
||||
from HrmDepartment
|
||||
where uuid = #{uuid}
|
||||
</select>
|
||||
<select id="sumStaffNum" 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 <= #{fdatebegin}
|
||||
and time_end >= #{fdatebegin})
|
||||
and dept_id = #{departmentId}
|
||||
</select>
|
||||
<select id="countHrmResource" resultType="java.lang.Integer">
|
||||
select count(1)
|
||||
from hrmresource
|
||||
where status <= 3
|
||||
and departmentid = #{departmentid}
|
||||
</select>
|
||||
</mapper>
|
@ -1,24 +0,0 @@
|
||||
package com.engine.organization.mapper.trigger;
|
||||
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.sql.Date;
|
||||
|
||||
/**
|
||||
* @Author dxfeng
|
||||
* @Date 2022/8/30
|
||||
* @Version V1.0
|
||||
**/
|
||||
public interface GroupTriggerMapper {
|
||||
|
||||
Integer getInfoValue(@Param("id") Integer id);
|
||||
|
||||
Integer sumStaffNum(@Param("fdatebegin") Date fdatebegin);
|
||||
|
||||
Integer countHrmResource();
|
||||
|
||||
int deleteMap(@Param("fobjid") Integer fobjid, @Param("fdatebegin") Date fdatebegin);
|
||||
|
||||
int updateMap(@Param("fobjid") Integer fobjid, @Param("fdatebegin") Date fdatebegin, @Param("fdate") Date fdate);
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
<?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.GroupTriggerMapper">
|
||||
<update id="updateMap">
|
||||
update jcl_org_map
|
||||
set fdateend=#{fdate}
|
||||
where fobjid = #{fobjid}
|
||||
and fdateend > #{fdatebegin}
|
||||
</update>
|
||||
<delete id="deleteMap">
|
||||
delete
|
||||
from jcl_org_map
|
||||
where fobjid = 0
|
||||
and fdatebegin = #{fdatebegin}
|
||||
</delete>
|
||||
|
||||
<select id="getInfoValue" resultType="java.lang.Integer">
|
||||
select fvalue
|
||||
from jcl_info
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="sumStaffNum" 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 <= #{fdatebegin}
|
||||
and time_end >= #{fdatebegin})
|
||||
</select>
|
||||
<select id="countHrmResource" resultType="java.lang.Integer">
|
||||
select count(1)
|
||||
from hrmresource
|
||||
where status <= 3
|
||||
</select>
|
||||
</mapper>
|
@ -1,21 +0,0 @@
|
||||
package com.engine.organization.mapper.trigger;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import weaver.hrm.passwordprotection.domain.HrmResource;
|
||||
|
||||
import java.sql.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/09/01
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface HrmResourceTriggerMapper {
|
||||
HrmResource getHrmResource(@Param("id") Long id);
|
||||
|
||||
List<Long> getFidsByFleader(@Param("fLeader") String fLeader, @Param("currentDate") Date currentDate);
|
||||
|
||||
int updateLeaders(@Param("currentDate") Date currentDate,@Param("fLeader") String fLeader, @Param("fLeaderImg") String fLeaderImg, @Param("fLeaderName") String fLeaderName, @Param("fLeaderJobId") Integer fLeaderJobId, @Param("fLeaderJob") String fLeaderJob, @Param("fLeaderLv") String fLeaderLv, @Param("fLeaderSt") String fLeaderSt);
|
||||
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
<?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.HrmResourceTriggerMapper">
|
||||
<update id="updateLeaders">
|
||||
update jcl_org_map
|
||||
<set>
|
||||
fleaderimg = #{fLeaderImg},
|
||||
fleadername = #{fLeaderName},
|
||||
fleaderjobid = #{fLeaderJobId},
|
||||
fleaderjob = #{fLeaderJob},
|
||||
fleaderlv = #{fLeaderLv},
|
||||
fleaderst = #{fLeaderSt},
|
||||
</set>
|
||||
where fleader = #{fLeader} AND fdatebegin <= #{currentDate}
|
||||
AND fdateend >= #{currentDate}
|
||||
</update>
|
||||
|
||||
<select id="getHrmResource" resultType="weaver.hrm.passwordprotection.domain.HrmResource">
|
||||
select id, workcode, lastname, status, messagerurl, jobtitle
|
||||
from hrmresource
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="getFidsByFleader" resultType="java.lang.Long">
|
||||
SELECT fid
|
||||
FROM jcl_org_map
|
||||
WHERE FLEADER = #{fLeader}
|
||||
AND FDATEBEGIN <= #{currentDate}
|
||||
AND FDATEEND >= #{currentDate}
|
||||
</select>
|
||||
</mapper>
|
@ -1,15 +0,0 @@
|
||||
package com.engine.organization.mapper.trigger;
|
||||
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.sql.Date;
|
||||
|
||||
/**
|
||||
* @Author dxfeng
|
||||
* @Date 2022/8/30
|
||||
* @Version V1.0
|
||||
**/
|
||||
public interface JobTriggerMapper {
|
||||
Integer sumStaffNum(@Param("fdatebegin") Date fdatebegin, @Param("jobId") Integer jobId);
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
<?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.JobTriggerMapper">
|
||||
|
||||
<select id="sumStaffNum" 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 <= #{fdatebegin}
|
||||
and time_end >= #{fdatebegin})
|
||||
and job_id = #{jobId}
|
||||
</select>
|
||||
</mapper>
|
@ -1,36 +0,0 @@
|
||||
package com.engine.organization.mapper.trigger;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.sql.Date;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/09/21
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface StaffTriggerMapper {
|
||||
//Integer countCompanyUsers(@Param("ecCompanyId") String ecCompanyId);
|
||||
|
||||
//Integer countDepartmentUsers(@Param("ecDepartmentId") String ecDepartmentId);
|
||||
|
||||
//Integer countJobUsers(@Param("jobTitle") String jobTitle);
|
||||
|
||||
Integer countOnJobByJObId(@Param("jobId") String jobId);
|
||||
|
||||
//Integer countAllUsers();
|
||||
|
||||
Integer countCompanyStaffNum(@Param("currentDate") Date currentDate, @Param("companyId") String companyId);
|
||||
|
||||
Integer countDepartmentStaffNum(@Param("currentDate") Date currentDate, @Param("departmentId") String departmentId);
|
||||
|
||||
Integer countJobStaffNum(@Param("currentDate") Date currentDate, @Param("jobId") String jobId);
|
||||
|
||||
Integer updateOrgStaffs(@Param("currentDate") Date currentDate, @Param("fType") String fType, @Param("fObjId") String fObjId, @Param("fPlan") Integer fPlan, @Param("fOnJob") Integer fOnJob);
|
||||
|
||||
String getIdByObjIdAndType(@Param("currentDate") Date currentDate, @Param("fObjId") String fObjId, @Param("fType") String fType);
|
||||
|
||||
Integer sumPlanByParentId(@Param("currentDate") Date currentDate, @Param("parentId") String parentId);
|
||||
|
||||
Integer sumOnJobByParentId(@Param("currentDate") Date currentDate, @Param("parentId") String parentId);
|
||||
}
|
@ -1,103 +0,0 @@
|
||||
<?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 control_dimension = 1)
|
||||
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 control_dimension = 2)
|
||||
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 control_dimension = 3)
|
||||
and job_id = #{jobId}
|
||||
and delete_type = 0
|
||||
</select>
|
||||
<select id="getIdByObjIdAndType" resultType="java.lang.String">
|
||||
select id
|
||||
from jcl_org_map
|
||||
where fobjid = #{fObjId}
|
||||
and ftype = #{fType}
|
||||
AND FDATEBEGIN <= #{currentDate}
|
||||
AND FDATEEND >= #{currentDate}
|
||||
</select>
|
||||
<select id="sumPlanByParentId" resultType="java.lang.Integer">
|
||||
select sum(fplan)
|
||||
from jcl_org_map
|
||||
where fparentid = #{parentId}
|
||||
AND FDATEBEGIN <= #{currentDate}
|
||||
AND FDATEEND >= #{currentDate}
|
||||
</select>
|
||||
<select id="sumOnJobByParentId" resultType="java.lang.Integer">
|
||||
select sum(fonjob)
|
||||
from jcl_org_map
|
||||
where fparentid = #{parentId}
|
||||
AND FDATEBEGIN <= #{currentDate}
|
||||
AND FDATEEND >= #{currentDate}
|
||||
</select>
|
||||
<select id="countOnJobByJObId" resultType="java.lang.Integer">
|
||||
select count(1)
|
||||
from jcl_org_hrmresource a
|
||||
where a.job_title = #{jobId} and a.status < 4
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue