2024-03-19 21:26:12 +08:00
|
|
|
<?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" >
|
2024-03-20 13:36:22 +08:00
|
|
|
<mapper namespace="com.securitycontrol.background.mapper.TeamManageMapper">
|
2024-03-19 21:26:12 +08:00
|
|
|
<!--新增/修改 工程-->
|
|
|
|
|
<insert id="addTeam">
|
|
|
|
|
INSERT INTO tb_work_team
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="teamName != null and teamName != ''">team_name,</if>
|
|
|
|
|
<if test="teamLeader != null and teamLeader != ''">team_leader,</if>
|
|
|
|
|
<if test="bidCode != null and bidCode!=''">bid_code,</if>
|
|
|
|
|
<if test="teamLeaderPhone != null and teamLeaderPhone!=''">team_leader_phone,</if>
|
|
|
|
|
<if test="idNumber != null and idNumber!=''">id_number,</if>
|
|
|
|
|
<if test="proCode != null and proCode!=''">team_num,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="teamName != null and teamName != ''">#{teamName},</if>
|
|
|
|
|
<if test="teamLeader != null and teamLeader != ''">#{teamLeader},</if>
|
|
|
|
|
<if test="bidCode != null and bidCode!=''">#{bidCode},</if>
|
|
|
|
|
<if test="teamLeaderPhone != null and teamLeaderPhone!=''">#{teamLeaderPhone},</if>
|
|
|
|
|
<if test="idNumber != null and idNumber!=''">#{idNumber},</if>
|
|
|
|
|
<if test="teamNum != null and teamNum!=''">#{teamNum},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
<update id="updateTeam">
|
|
|
|
|
UPDATE tb_work_team
|
|
|
|
|
<set>
|
|
|
|
|
<if test="teamName != null and teamName != ''">team_name = #{teamName},</if>
|
|
|
|
|
<if test="teamLeader != null and teamLeader != ''">team_leader = #{teamLeader},</if>
|
|
|
|
|
<if test="bidCode != null and bidCode != ''">bid_code = #{bidCode},</if>
|
|
|
|
|
<if test="teamLeaderPhone != null and teamLeaderPhone != ''">team_leader_phone = #{teamLeaderPhone},</if>
|
|
|
|
|
<if test="idNumber != null and idNumber != ''">id_number = #{idNumber},</if>
|
|
|
|
|
<if test="teamNum != null and teamNum != ''">team_num = #{teamNum},</if>
|
2024-03-20 11:10:38 +08:00
|
|
|
<if test="delFalge != null and delFalge != ''">del_falge = #{delFalge},</if>
|
2024-03-19 21:26:12 +08:00
|
|
|
</set>
|
|
|
|
|
WHERE team_id= #{teamId}
|
|
|
|
|
</update>
|
|
|
|
|
<!--获取人员列表-->
|
2024-03-20 13:36:22 +08:00
|
|
|
<select id="getTeamLists" resultType="com.securitycontrol.entity.background.vo.TeamManageVo">
|
2024-03-19 21:26:12 +08:00
|
|
|
SELECT
|
|
|
|
|
team_name as teamname,
|
|
|
|
|
team_leader as teamleader,
|
|
|
|
|
team_leader_phone as teamleaderphone,
|
|
|
|
|
id_number as idnumber,
|
|
|
|
|
bid_code as bidcode,
|
|
|
|
|
team_num as teamnum
|
|
|
|
|
from
|
|
|
|
|
tb_work_team twt
|
|
|
|
|
<where>
|
|
|
|
|
<if test="keyWord !=null and keyWord!=''">
|
|
|
|
|
AND (
|
|
|
|
|
INSTR(twt.team_leader,#{keyWord}) > 0 OR
|
|
|
|
|
INSTR(twt.id_number,#{keyWord}) > 0
|
|
|
|
|
)
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|