2024-11-10 23:48:52 +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">
|
|
|
|
<mapper namespace="com.yanzhu.jh.project.mapper.SurProjectAttendanceUnitpayMapper">
|
|
|
|
|
|
|
|
<resultMap type="SurProjectAttendanceUnitpay" id="SurProjectAttendanceUnitpayResult">
|
|
|
|
<result property="id" column="id" />
|
|
|
|
<result property="cfgId" column="cfgId" />
|
|
|
|
<result property="groupId" column="groupId" />
|
|
|
|
<result property="groupName" column="groupName" />
|
|
|
|
<result property="workTypeCode" column="workTypeCode" />
|
|
|
|
<result property="workTypeName" column="workTypeName" />
|
|
|
|
<result property="unitPay" column="unitPay" />
|
|
|
|
<result property="remark" column="remark" />
|
|
|
|
<result property="isDel" column="is_del" />
|
|
|
|
<result property="createBy" column="create_by" />
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="selectSurProjectAttendanceUnitpayVo">
|
2024-11-13 22:08:39 +08:00
|
|
|
select id, cfgId, groupId, groupName, workTypeCode, workTypeName, unitPay, remark, is_del, create_by, create_time, update_by, update_time
|
|
|
|
from sur_project_attendance_unitpay
|
2024-11-10 23:48:52 +08:00
|
|
|
</sql>
|
|
|
|
|
|
|
|
<select id="selectSurProjectAttendanceUnitpayList" parameterType="SurProjectAttendanceUnitpay" resultMap="SurProjectAttendanceUnitpayResult">
|
|
|
|
<include refid="selectSurProjectAttendanceUnitpayVo"/>
|
|
|
|
<where>
|
|
|
|
<if test="cfgId != null "> and cfgId = #{cfgId}</if>
|
|
|
|
<if test="groupId != null and groupId != ''"> and groupId = #{groupId}</if>
|
|
|
|
<if test="groupName != null and groupName != ''"> and groupName like concat('%', #{groupName}, '%')</if>
|
|
|
|
<if test="workTypeCode != null and workTypeCode != ''"> and workTypeCode = #{workTypeCode}</if>
|
|
|
|
<if test="workTypeName != null and workTypeName != ''"> and workTypeName like concat('%', #{workTypeName}, '%')</if>
|
|
|
|
<if test="unitPay != null "> and unitPay = #{unitPay}</if>
|
|
|
|
<if test="isDel != null "> and is_del = #{isDel}</if>
|
|
|
|
</where>
|
|
|
|
</select>
|
2024-11-13 22:08:39 +08:00
|
|
|
|
|
|
|
<select id="initList" parameterType="SurProjectAttendanceUnitpay" resultMap="SurProjectAttendanceUnitpayResult">
|
|
|
|
select a.cfgId,a.groupName,a.workTypeCode,a.workTypeName
|
|
|
|
from sur_project_attendance_data_${year} a
|
|
|
|
where a.cfgId=23
|
|
|
|
group by a.cfgId, a.groupName,a.workTypeCode,a.workTypeName
|
|
|
|
</select>
|
2024-11-10 23:48:52 +08:00
|
|
|
<select id="selectSurProjectAttendanceUnitpayById" parameterType="Long" resultMap="SurProjectAttendanceUnitpayResult">
|
|
|
|
<include refid="selectSurProjectAttendanceUnitpayVo"/>
|
|
|
|
where id = #{id}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<insert id="insertSurProjectAttendanceUnitpay" parameterType="SurProjectAttendanceUnitpay" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
insert into sur_project_attendance_unitpay
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="cfgId != null">cfgId,</if>
|
|
|
|
<if test="groupId != null and groupId != ''">groupId,</if>
|
|
|
|
<if test="groupName != null and groupName != ''">groupName,</if>
|
|
|
|
<if test="workTypeCode != null and workTypeCode != ''">workTypeCode,</if>
|
|
|
|
<if test="workTypeName != null and workTypeName != ''">workTypeName,</if>
|
|
|
|
<if test="unitPay != null">unitPay,</if>
|
|
|
|
<if test="remark != null and remark != ''">remark,</if>
|
|
|
|
<if test="isDel != null">is_del,</if>
|
|
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
|
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="cfgId != null">#{cfgId},</if>
|
|
|
|
<if test="groupId != null and groupId != ''">#{groupId},</if>
|
|
|
|
<if test="groupName != null and groupName != ''">#{groupName},</if>
|
|
|
|
<if test="workTypeCode != null and workTypeCode != ''">#{workTypeCode},</if>
|
|
|
|
<if test="workTypeName != null and workTypeName != ''">#{workTypeName},</if>
|
|
|
|
<if test="unitPay != null">#{unitPay},</if>
|
|
|
|
<if test="remark != null and remark != ''">#{remark},</if>
|
|
|
|
<if test="isDel != null">#{isDel},</if>
|
|
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
|
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
|
</trim>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
<update id="updateSurProjectAttendanceUnitpay" parameterType="SurProjectAttendanceUnitpay">
|
|
|
|
update sur_project_attendance_unitpay
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
<if test="cfgId != null">cfgId = #{cfgId},</if>
|
|
|
|
<if test="groupId != null and groupId != ''">groupId = #{groupId},</if>
|
|
|
|
<if test="groupName != null and groupName != ''">groupName = #{groupName},</if>
|
|
|
|
<if test="workTypeCode != null and workTypeCode != ''">workTypeCode = #{workTypeCode},</if>
|
|
|
|
<if test="workTypeName != null and workTypeName != ''">workTypeName = #{workTypeName},</if>
|
|
|
|
<if test="unitPay != null">unitPay = #{unitPay},</if>
|
|
|
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
|
|
|
<if test="isDel != null">is_del = #{isDel},</if>
|
|
|
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
</trim>
|
|
|
|
where id = #{id}
|
|
|
|
</update>
|
|
|
|
|
|
|
|
<delete id="deleteSurProjectAttendanceUnitpayById" parameterType="Long">
|
|
|
|
delete from sur_project_attendance_unitpay where id = #{id}
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
<delete id="deleteSurProjectAttendanceUnitpayByIds" parameterType="String">
|
|
|
|
delete from sur_project_attendance_unitpay where id in
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
#{id}
|
|
|
|
</foreach>
|
|
|
|
</delete>
|
|
|
|
</mapper>
|