|
@@ -26,13 +26,14 @@
|
|
|
msr.sure_num as sureNum,msr.suspected_num as suspectedNum,msr.normal_num as normalNum,
|
|
|
msr.single_num as singleNum,mss.user_name as userName,mss.grender, mss.age,mss.family_status as familyStatus,
|
|
|
mss.medical,mss.temperature,mss.cough,mss.muscle ,mss.dyspnea,mss.fatigue,mss.diarrhea,mss.single_room as singleRoom,mss.score_rezult,
|
|
|
- tr.trip_id,tr.is_trip,tr.today_local,tr.today_local_other,tr.work_local,tr.work_local_other
|
|
|
+ tr.trip_id,tr.is_trip,tr.today_local,tr.today_local_other,tr.work_local,tr.work_local_other,ur.user_id as userId
|
|
|
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 msr.report_date = curdate()
|
|
|
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
|
|
|
<where>
|
|
|
<if test="unitId!=null and uptownId!='' and unitId!= '0'.toString()">
|
|
|
and suu.unit_id=#{unitId}
|
|
@@ -50,13 +51,14 @@
|
|
|
msr.sure_num as sureNum,msr.suspected_num as suspectedNum,msr.normal_num as normalNum,
|
|
|
msr.single_num as singleNum,mss.user_name as userName,mss.grender, mss.age,mss.family_status as familyStatus,
|
|
|
mss.medical,mss.temperature,mss.cough,mss.muscle ,mss.dyspnea,mss.fatigue,mss.diarrhea,mss.single_room as singleRoom,mss.score_rezult,
|
|
|
- tr.trip_id,tr.is_trip,tr.today_local,tr.today_local_other,tr.work_local,tr.work_local_other
|
|
|
+ tr.trip_id,tr.is_trip,tr.today_local,tr.today_local_other,tr.work_local,tr.work_local_other,ur.user_id as userId
|
|
|
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 msr.report_date = curdate()
|
|
|
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
|
|
|
<where>
|
|
|
<if test="unitId!=null and uptownId!='' and unitId!= '0'.toString()">
|
|
|
and suu.unit_id=#{unitId}
|