|
|
@ -64,30 +64,37 @@ |
|
|
</where> |
|
|
</where> |
|
|
</select> |
|
|
</select> |
|
|
<select id="querySchedulingList" resultType="com.xujie.sys.modules.scheduling.entity.SchedulingData"> |
|
|
<select id="querySchedulingList" resultType="com.xujie.sys.modules.scheduling.entity.SchedulingData"> |
|
|
select tpm_scheduling.*, |
|
|
|
|
|
|
|
|
select ts.*, |
|
|
tc.description as classesDescription |
|
|
tc.description as classesDescription |
|
|
from tpm_scheduling |
|
|
|
|
|
left join tpm_classes tc on tpm_scheduling.classes_code = tc.code |
|
|
|
|
|
|
|
|
from tpm_scheduling ts |
|
|
|
|
|
left join tpm_classes tc on ts.classes_code = tc.code |
|
|
<where> |
|
|
<where> |
|
|
<if test="site != null and site != ''"> |
|
|
<if test="site != null and site != ''"> |
|
|
and site = #{site} |
|
|
|
|
|
|
|
|
and ts.site = #{site} |
|
|
</if> |
|
|
</if> |
|
|
<if test="buNo != null and buNo != ''"> |
|
|
<if test="buNo != null and buNo != ''"> |
|
|
and bu_no = #{buNo} |
|
|
|
|
|
|
|
|
and ts.bu_no = #{buNo} |
|
|
</if> |
|
|
</if> |
|
|
<if test="classesCode != null and classesCode != ''"> |
|
|
<if test="classesCode != null and classesCode != ''"> |
|
|
and classes_code = #{classesCode} |
|
|
|
|
|
|
|
|
and ts.classes_code = #{classesCode} |
|
|
</if> |
|
|
</if> |
|
|
<if test="startDate != null"> |
|
|
<if test="startDate != null"> |
|
|
and date >= #{startDate} |
|
|
|
|
|
|
|
|
and ts.date >= #{startDate} |
|
|
</if> |
|
|
</if> |
|
|
<if test="endDate != null"> |
|
|
<if test="endDate != null"> |
|
|
and date <![CDATA[<=]]> #{endDate} |
|
|
|
|
|
|
|
|
and ts.date <![CDATA[<=]]> #{endDate} |
|
|
</if> |
|
|
</if> |
|
|
</where> |
|
|
</where> |
|
|
|
|
|
order by ts.date |
|
|
</select> |
|
|
</select> |
|
|
<select id="querySaveSchedulingRecord" resultType="com.xujie.sys.modules.scheduling.entity.SchedulingRecordData"> |
|
|
<select id="querySaveSchedulingRecord" resultType="com.xujie.sys.modules.scheduling.entity.SchedulingRecordData"> |
|
|
select * from tpm_scheduling_record |
|
|
|
|
|
where head_id = #{id} |
|
|
|
|
|
|
|
|
select |
|
|
|
|
|
tsr.id, |
|
|
|
|
|
tsr.head_id, |
|
|
|
|
|
tsr.admin_id, |
|
|
|
|
|
tsr.admin_name, |
|
|
|
|
|
case when tsr.isHoliday = 'Y' then '请假' else '工作' end as isHoliday |
|
|
|
|
|
from tpm_scheduling_record tsr |
|
|
|
|
|
where tsr.head_id = #{id} |
|
|
</select> |
|
|
</select> |
|
|
</mapper> |
|
|
</mapper> |