|
@@ -149,25 +149,34 @@
|
|
|
|
|
|
<select id="exSelectLingyunUserPage" resultType="com.bofeng.entity.ExcelRiBaoLYBM4">
|
|
|
select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num as safetyNum, msr.report_status as reportStatus,
|
|
|
- msr.sure_num as sureNum,msr.suspected_num as suspectedNum,msr.normal_num as normalNum,msr.ms_status as msStatus,
|
|
|
+ msr.sure_num as sureNum,msr.suspected_num as suspectedNum,msr.normal_num as normalNum,msr.ms_status as msStatus,op.old_open_id as oldOpenId,
|
|
|
msr.single_num as singleNum,mss.user_name as userName,mss.grender, mss.age,mss.family_status as familyStatus,de.department_name as departmentName,
|
|
|
mss.medical,mss.temperature,mss.cough,mss.is_contact, mss.is_suspected,mss.muscle ,mss.dyspnea,mss.fatigue,mss.diarrhea,mss.single_room as singleRoom,mss.score_rezult,mss.temperature_score,mss.is_contact as isContact,mss.is_suspected as isSuspected,
|
|
|
- tr.trip_id,tr.is_trip,tr.today_local,tr.today_local_other,tr.work_local,tr.work_local_other, tr.auto_local, tr.auto_addr,ur.user_id as userId
|
|
|
+ tr.trip_id,tr.is_trip,tr.today_local,tr.today_local_other,tr.work_local,tr.work_local_other, tr.auto_local, tr.auto_addr,ur.user_id as userId,suh.house_id as houseId
|
|
|
from sys_uptown_house suh
|
|
|
- inner join sys_uptown_home suho on suho.house_id=suh.house_id
|
|
|
- INNER JOIN sys_uptown_unit suu ON suu.unit_id = suh.unit_id and suu.uptown_id=#{uptownId}
|
|
|
- left join ms_report msr on msr.house_id = suh.house_id and
|
|
|
+ left join sys_uptown_home suho on suho.house_id=suh.house_id
|
|
|
+ left JOIN sys_uptown_unit suu ON suu.unit_id = suh.unit_id
|
|
|
+ left join ms_report msr on msr.house_id = suh.house_id
|
|
|
<if test="date!=null and date!=''">
|
|
|
- msr.report_date = #{date}
|
|
|
+ and msr.report_date = #{date}
|
|
|
</if>
|
|
|
<if test="date==null or date==''">
|
|
|
- msr.report_date = curdate()
|
|
|
+ and msr.report_date = curdate()
|
|
|
</if>
|
|
|
left join ms_suspected mss on mss.report_id=msr.report_id
|
|
|
left join ms_trip tr on mss.suspected_id=trip_id
|
|
|
- INNER JOIN sys_user_role ur on ur.property_id = suho.house_id and ur.role_id = 1
|
|
|
+ left JOIN sys_user_role ur on ur.property_id = suho.house_id
|
|
|
+ left JOIN sys_user_open op on op.user_id = ur.user_id
|
|
|
left join sys_department de on de.department_id = suh.department_id
|
|
|
<where>
|
|
|
+ <if test="uptownId != null and uptownId != ''">
|
|
|
+ and suu.uptown_id=#{uptownId}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="notOnJob != null and notOnJob != ''">
|
|
|
+ and suu.uptown_id != #{notOnJob}
|
|
|
+ </if>
|
|
|
+
|
|
|
<if test="unitId!=null and uptownId!='' and unitId!= '0'.toString()">
|
|
|
and suu.unit_id=#{unitId}
|
|
|
</if>
|
|
@@ -217,7 +226,18 @@
|
|
|
<if test="isTrip == '2'.toString()">
|
|
|
and tr.is_trip = 1
|
|
|
</if>
|
|
|
+ <if test="isBand == '1'.toString()">
|
|
|
+ and (op.old_open_id is null or op.old_open_id = '')
|
|
|
+ </if>
|
|
|
+ <if test="isBand == '2'.toString()">
|
|
|
+ and op.old_open_id is not null and op.old_open_id != ''
|
|
|
+ </if>
|
|
|
+ and ur.role_id = 1
|
|
|
</where>
|
|
|
- order by suu.unit_id asc,suho.linkman
|
|
|
+
|
|
|
+ <if test="orderStr != null and orderStr != ''">
|
|
|
+ order by ${orderStr}
|
|
|
+ </if>
|
|
|
+
|
|
|
</select>
|
|
|
</mapper>
|