186 lines
7.6 KiB
XML
186 lines
7.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.bonus.gzrn.rnbmw.talentTrade.dao.ReleaseWorkInfoDao">
|
|
<insert id="insertReleaseWorkInfo">
|
|
insert into rl_labor_release
|
|
(project,subcontract,team_category,number_people,team_number,holder_req,contact_person,contact_way,remark,release_time,is_active,is_online,release_status,release_person,user_id)
|
|
values (#{project},#{subcontract},#{teamCategory},#{numberPeople},#{teamNumber},#{holderReq},#{contactPerson},#{contactWay},#{remark},#{releaseTime},'1','1','0',#{releasePerson},#{userId})
|
|
</insert>
|
|
|
|
<update id="offlineInfoById">
|
|
update rl_labor_release
|
|
set is_online = '0'
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<update id="deleteReleaseWorkInfoById">
|
|
update rl_labor_release
|
|
set is_active = '0'
|
|
where id = #{id}
|
|
</update>
|
|
|
|
|
|
<select id="getReleaseWorkInfoList" resultType="com.bonus.gzrn.rnbmw.talentTrade.entity.ReleaseWorkInfoBean">
|
|
SELECT
|
|
rlr.id,
|
|
rlr.project,
|
|
rlr.subcontract,
|
|
rlr.number_people as numberPeople,
|
|
rlr.team_category AS teamCategory,
|
|
rlr.team_number AS teamNumber,
|
|
rlr.holder_req AS holderReq,
|
|
rlr.contact_person AS contactPerson,
|
|
rlr.contact_way AS contactWay,
|
|
rlr.remark,
|
|
rlr.release_time AS releaseTime,
|
|
rlr.release_person AS releasePerson,
|
|
IFNULL( rlr.release_status, 0) AS releaseStatus,
|
|
rlr.is_online AS isOnline,
|
|
rlr.scbrelease_person AS scbreleasePerson,
|
|
rlr.source,
|
|
rlr.audit_time AS auditTime,
|
|
rlr.is_active AS isActive,
|
|
concat(rcm.release_people ,'-',rcm.release_way) as auditor
|
|
FROM
|
|
rl_labor_release rlr
|
|
left join rl_contact_maintenance rcm on rlr.release_person= rcm.id
|
|
WHERE rlr.is_active = 1
|
|
<if test="params.project!=null and params.project!='' ">
|
|
AND rlr.project LIKE concat ('%',#{params.project},'%')
|
|
</if>
|
|
<if test="params.userId!=null and params.userId!='' ">
|
|
AND rlr.user_id = #{params.userId}
|
|
</if>
|
|
<if test="params.releaseStatus!=null and params.releaseStatus!='' ">
|
|
AND rlr.release_status = #{params.releaseStatus}
|
|
</if>
|
|
<!-- <if test="params.companyId!=null and params.companyId!='' ">-->
|
|
<!-- AND pc.ID = #{params.companyId}-->
|
|
<!-- </if>-->
|
|
LIMIT #{offset}, #{limit}
|
|
|
|
</select>
|
|
|
|
|
|
<select id="getReleaseWorkInfoCount" resultType="java.lang.Integer">
|
|
select count(*) from rl_labor_release rlr
|
|
left join rl_contact_maintenance rcm on rlr.release_person= rcm.id
|
|
where rlr.is_active = '1'
|
|
<if test="params.userId!=null and params.userId!='' ">
|
|
AND rlr.user_id = #{params.userId}
|
|
</if>
|
|
<if test="params.project!=null and params.project!='' ">
|
|
AND rlr.project LIKE concat ('%',#{params.project},'%')
|
|
</if>
|
|
<if test="params.releaseStatus!=null and params.releaseStatus!='' ">
|
|
AND rlr.release_status = #{params.releaseStatus}
|
|
</if>
|
|
</select>
|
|
|
|
<select id="getReleaseWorkInfoById" resultType="com.bonus.gzrn.rnbmw.talentTrade.entity.ReleaseWorkInfoBean">
|
|
SELECT
|
|
rlr.id,
|
|
rlr.project,
|
|
rlr.subcontract,
|
|
rlr.number_people as numberPeople,
|
|
rlr.team_category AS teamCategory,
|
|
rlr.team_number AS teamNumber,
|
|
rlr.holder_req AS holderReq,
|
|
rlr.contact_person AS contactPerson,
|
|
rlr.contact_way AS contactWay,
|
|
rlr.remark,
|
|
rlr.release_time AS releaseTime,
|
|
rlr.release_person AS releasePerson,
|
|
IFNULL( rlr.release_status, 0) AS releaseStatus,
|
|
rlr.is_online AS isOnline,
|
|
rlr.scbrelease_person AS scbreleasePerson,
|
|
rlr.source,
|
|
rlr.audit_time AS auditTime,
|
|
rlr.is_active AS isActive,
|
|
concat(rcm.release_people ,'-',rcm.release_way) as auditor
|
|
FROM
|
|
rl_labor_release rlr
|
|
left join rl_contact_maintenance rcm on rlr.release_person= rcm.id
|
|
WHERE rlr.is_active = 1 and rlr.id = #{id}
|
|
</select>
|
|
<select id="getDigitalInnovationDepartment" resultType="com.bonus.gzrn.rnbmw.talentTrade.entity.ContactBean">
|
|
select concat(su.USERNAME ,'(',rcm.release_way,')') as auditor,rcm.id,su.USERNAME as releasePeople,rcm.release_way as releaseWay
|
|
from rl_contact_maintenance rcm
|
|
left join sys_user su on su.id = rcm.release_people
|
|
where rcm.depart_ment = '公司级账户(农管中心)' and rcm.is_enable = '1' and rcm.audit_type = #{auditType} and rcm.is_active='1'
|
|
limit 1
|
|
</select>
|
|
<select id="getContactInfoCount" resultType="java.lang.Integer">
|
|
select count(*) from rl_contact_maintenance
|
|
</select>
|
|
<select id="getContactInfoList" resultType="com.bonus.gzrn.rnbmw.talentTrade.entity.ContactBean">
|
|
select
|
|
id,
|
|
depart_ment departMent,
|
|
release_people releasePeople,
|
|
release_way releaseWay,
|
|
audit_type auditType,
|
|
is_enable isEnable,
|
|
is_active isActive
|
|
from rl_contact_maintenance
|
|
where is_active = '1'
|
|
</select>
|
|
<select id="getContactInfoById" resultType="com.bonus.gzrn.rnbmw.talentTrade.entity.ContactBean">
|
|
select
|
|
id,
|
|
depart_ment departMent,
|
|
user_id as userId,
|
|
release_people releasePeople,
|
|
release_way releaseWay,
|
|
audit_type auditType,
|
|
is_enable isEnable,
|
|
is_active isActive
|
|
from rl_contact_maintenance
|
|
where id = #{id}
|
|
</select>
|
|
<select id="getContactInfoList1" resultType="com.bonus.gzrn.rnbmw.talentTrade.entity.ContactBean">
|
|
select
|
|
rcm.id,
|
|
rcm.depart_ment departMent,
|
|
su.USERNAME as releasePeople,
|
|
rcm.release_way releaseWay,
|
|
rcm.audit_type auditType,
|
|
rcm.is_enable isEnable,
|
|
rcm.is_active isActive
|
|
from rl_contact_maintenance rcm
|
|
left join sys_user su on su.id = rcm.release_people
|
|
where rcm.is_active = '1'
|
|
<if test="keyWord!=null and keyWord!='' ">
|
|
and (
|
|
rcm.depart_ment like concat ('%',#{keyWord},'%') or
|
|
rcm.release_people like concat ('%',#{keyWord},'%') or
|
|
rcm.release_way like concat ('%',#{keyWord},'%') or
|
|
rcm.audit_type like concat ('%',#{keyWord},'%')
|
|
)
|
|
</if>
|
|
</select>
|
|
<select id="getDepartment" resultType="com.bonus.gzrn.rnbmw.basic.entity.ProjectBean">
|
|
select id,depart_ment as name
|
|
from rl_contact_maintenance
|
|
</select>
|
|
<insert id="addContactInfo">
|
|
insert into rl_contact_maintenance(depart_ment,release_people,release_way,audit_type,is_enable,is_active)
|
|
values (#{departMent},#{releasePeople},#{releaseWay},#{auditType},'1','1')
|
|
</insert>
|
|
<update id="updateContactInfo" parameterType="com.bonus.gzrn.rnbmw.talentTrade.entity.ContactBean">
|
|
update rl_contact_maintenance set
|
|
depart_ment = #{departMent},
|
|
release_people = #{releasePeople},
|
|
release_way = #{releaseWay},
|
|
audit_type = #{auditType}
|
|
where id = #{id}
|
|
</update>
|
|
<update id="delContactById">
|
|
update rl_contact_maintenance set is_active = '0' where id = #{id}
|
|
</update>
|
|
<update id="updateIsEnable">
|
|
update rl_contact_maintenance set is_enable = #{isEnable} where id = #{id}
|
|
</update>
|
|
</mapper> |