|
@@ -32,7 +32,7 @@
|
|
|
|
|
|
<select id="exSelectLingyunUser" 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.muscle ,mss.dyspnea,mss.fatigue,mss.diarrhea,mss.single_room as singleRoom,mss.score_rezult,mss.is_contact,mss.is_suspected,
|
|
|
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
|
|
@@ -48,7 +48,8 @@
|
|
|
</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
|
|
|
+ INNER 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="unitId!=null and uptownId!='' and unitId!= '0'.toString()">
|
|
@@ -100,6 +101,13 @@
|
|
|
<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
|
|
|
</select>
|