SELECT u.realname username,o.pjt_id pid,d.departname pName,d1.departname pidName,o.yearmonth,
convert(o.overtime_duration/60,decimal(10,2)) overtimeDuration , o.overtime_fee overtimeFee,
CONCAT(floor(o.datum_work_duration/60),'小时',floor(o.datum_work_duration - floor(o.datum_work_duration/60)*60),'分钟') datumWorkDuration,
CONCAT(floor(o.overtime_duration/60),'小时',floor(o.overtime_duration - floor(o.overtime_duration/60)*60),'分钟') overtimeDurationStr
from t_bus_user_overtime_statistics o
LEFT JOIN t_s_depart d
ON o.pjt_id = d.ID
LEFT JOIN t_s_depart d1
ON o.dept_id = d1.ID
LEFT JOIN t_s_base_user u
ON o.user_id = u.ID
where 1=1
<#if ( overtimeEntity.yearMonthList )?? && overtimeEntity.yearMonthList ?size gt 0>
			and o.yearmonth in(
			<#list overtimeEntity.yearMonthList as item>        
			   '${item}'
			 <#if item_has_next>,</#if>
			 </#list>
			)
</#if>
<#if ( overtimeEntity.pid )??>
	and o.pjt_id =:overtimeEntity.pid
</#if>
<#if (overtimeEntity.did)??>
	and o.dept_id =:overtimeEntity.did
</#if>

