|
|
@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
</sql> |
|
|
|
|
|
|
|
<select id="selectDcShiftsList" parameterType="DcShifts" resultMap="DcShiftsResult"> |
|
|
|
select shifts.id, |
|
|
|
select DISTINCT shifts.id, |
|
|
|
shifts.station,organization.organization_name, |
|
|
|
shifts.date, shifts.start_time, shifts.end_time, |
|
|
|
shifts.remark, shifts.create_time, shifts.update_time from dc_shifts as shifts |
|
|
@ -38,6 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
left join sys_post as post on employees.post_id=post.post_id |
|
|
|
left join dc_organization as organization on organization.id=shifts.station |
|
|
|
<where> |
|
|
|
<if test="station != null "> and shifts.station = #{station}</if> |
|
|
|
<if test="employeesId != null "> and shifts.employees_id = #{employeesId}</if> |
|
|
|
<if test="date != null "> and shifts.date = #{date}</if> |
|
|
|
<if test="name != null and name != ''"> and CONCAT(employees.name,employees.contact_number) like concat('%', #{name}, '%')</if> |
|
|
@ -50,9 +51,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<include refid="selectDcShiftsVo"/> |
|
|
|
where shifts.id = #{id} |
|
|
|
</select> |
|
|
|
<select id="selectDcShiftsByEmployeesId" parameterType="Long" resultMap="DcShiftsResult"> |
|
|
|
<include refid="selectDcShiftsVo"/> |
|
|
|
where shifts.employees_id = #{id} |
|
|
|
<select id="selectDcShiftsByStationId" resultMap="DcShiftsResult"> |
|
|
|
select DISTINCT shifts.scheduling,shifts.employees_id,shifts.station,shifts.id,employees.contact_number, |
|
|
|
organization.organization_name ,employees.name from dc_shifts as shifts |
|
|
|
left join dc_employees as employees on shifts.employees_id=employees.id |
|
|
|
left join dc_organization as organization on organization.id=shifts.station |
|
|
|
where shifts.station = #{station} |
|
|
|
and shifts.date =#{date} |
|
|
|
</select> |
|
|
|
<select id="contactNumber" resultType="java.util.HashMap"> |
|
|
|
select id from dc_employees where contact_number=#{contactNumber} |
|
|
@ -90,10 +95,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
|
|
|
|
</select> |
|
|
|
<select id="selectStationDate" resultType="com.zc.business.domain.DcShiftsList"> |
|
|
|
select shifts.scheduling,shifts.employees_id,shifts.station,shifts.id,employees.contact_number, |
|
|
|
organization.organization_name ,employees.name from dc_shifts as shifts |
|
|
|
left join dc_employees as employees on shifts.employees_id=employees.id |
|
|
|
left join dc_organization as organization on organization.id=shifts.station |
|
|
|
select DISTINCT shifts.scheduling,shifts.employees_id,shifts.station,shifts.id,employees.contact_number, |
|
|
|
organization.organization_name ,employees.name from dc_shifts as shifts |
|
|
|
left join dc_employees as employees on shifts.employees_id=employees.id |
|
|
|
left join dc_organization as organization on organization.id=shifts.station |
|
|
|
where shifts.date=#{date} and station=#{station} |
|
|
|
<if test="name != null and name != ''"> and CONCAT(employees.name,employees.contact_number) like concat('%', #{name}, '%')</if> |
|
|
|
</select> |
|
|
|