|
|
|
@ -21,10 +21,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="enterpriseCode" column="Enterprise_Code" />
|
|
|
|
|
<result property="siteId" column="Site_Id" />
|
|
|
|
|
<result property="siteCode" column="Site_Code" />
|
|
|
|
|
<result property="delFlag" column="del_flag" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectBaseShiftsTVo">
|
|
|
|
|
select Shift_Id, Shift_Code, Shift_Desc, Shift_Desc_Global, Shift_Desc_Extended, Shift_Start_Time, Shift_End_Time, Create_By, Create_Date, Last_Update_By, Last_Update_Date, Active, Enterprise_Id, Enterprise_Code, Site_Id, Site_Code from base_shifts_t
|
|
|
|
|
select Shift_Id, Shift_Code, Shift_Desc, Shift_Desc_Global, Shift_Desc_Extended, Shift_Start_Time, Shift_End_Time, Create_By, Create_Date, Last_Update_By, Last_Update_Date, Active, Enterprise_Id, Enterprise_Code, Site_Id, Site_Code,del_flag from base_shifts_t
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectBaseShiftsTList" parameterType="BaseShiftsT" resultMap="BaseShiftsTResult">
|
|
|
|
@ -45,12 +46,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="enterpriseCode != null and enterpriseCode != ''"> and Enterprise_Code = #{enterpriseCode}</if>
|
|
|
|
|
<if test="siteId != null and siteId != ''"> and Site_Id = #{siteId}</if>
|
|
|
|
|
<if test="siteCode != null and siteCode != ''"> and Site_Code = #{siteCode}</if>
|
|
|
|
|
and del_flag = '0'
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectBaseShiftsTByShiftId" parameterType="String" resultMap="BaseShiftsTResult">
|
|
|
|
|
<include refid="selectBaseShiftsTVo"/>
|
|
|
|
|
where Shift_Id = #{shiftId}
|
|
|
|
|
and del_flag = '0'
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertBaseShiftsT" parameterType="BaseShiftsT">
|
|
|
|
@ -115,16 +118,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
where Shift_Id = #{shiftId}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteBaseShiftsTByShiftId" parameterType="String">
|
|
|
|
|
delete from base_shifts_t where Shift_Id = #{shiftId}
|
|
|
|
|
</delete>
|
|
|
|
|
<update id="deleteBaseShiftsTByShiftId" parameterType="String">
|
|
|
|
|
update base_shifts_t
|
|
|
|
|
set del_flag = '1'
|
|
|
|
|
where Shift_Id = #{shiftId}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteBaseShiftsTByShiftIds" parameterType="String">
|
|
|
|
|
delete from base_shifts_t where Shift_Id in
|
|
|
|
|
<update id="deleteBaseShiftsTByShiftIds" parameterType="String">
|
|
|
|
|
update base_shifts_t
|
|
|
|
|
set del_flag = '1'
|
|
|
|
|
where Shift_Id in
|
|
|
|
|
<foreach item="shiftId" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{shiftId}
|
|
|
|
|
</foreach>
|
|
|
|
|
</delete>
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<!-- <select id="queryAllStartTime" parameterType="String" resultMap="BaseShiftsTResult">-->
|
|
|
|
|
<!-- select-->
|
|
|
|
@ -134,12 +141,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
select shift_desc
|
|
|
|
|
from base_shifts_t
|
|
|
|
|
where shift_desc = #{shiftDesc}
|
|
|
|
|
and del_flag = '0'
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="checkCodeUnique" parameterType="BaseShiftsT" resultType ="java.lang.String">
|
|
|
|
|
select shift_code
|
|
|
|
|
from base_shifts_t
|
|
|
|
|
where shift_code = #{shiftCode}
|
|
|
|
|
and del_flag = '0'
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|