limit #{pageNum} , #{pageSize}
where
mp.mt_company_id = #{mtCompanyId}
where
er.mt_company_id = #{mtCompanyId}
where
cr.mt_company_id = #{mtCompanyId}
where
ai.mt_company_id = #{mtCompanyId}
select
mp.id as mtPlanId,
mp.lift_id as liftId,
mp.plan_date as planDate,
l.registration_code as registrationCode,
l.use_company_code as userCompanyCode,
l.lift_type as liftType,
ui.name as workerName
from
maintenance_plan mp
left join
lift l
on
mp.lift_id = l.id
left join
user_info ui
on
mp.worker_id = ui.user_id
select
er.id as emergencyId,
er.lift_id as liftId,
er.caller_name as callerName,
er.fault_reason as faultReason,
er.is_critical as isCritical,
er.is_trapped as isTrapped,
l.registration_code as registrationCode,
l.coordinate as coordinate,
p.project_name as projectName,
p.project_code as projectCode,
ui.name as workerName
from
emergency_repair er
left join
lift l
on
er.lift_id = l.id
left join
project p
on
er.project_id = p.id
left join
user_info ui
on
er.worker_id = ui.user_id
select
cr.id as capitalRepairId,
cr.project_name as projectName,
cr.project_address as projectAddress,
cr.start_date as startDate,
cr.end_date as endDate,
cr.push_flag as pushFlag
from
capital_repair cr
select
ai.id as annualInspectionId,
ai.lift_id as liftId,
ai.plan_date as planDate,
p.project_name as projectName,
p.project_code as projectCode,
l.registration_code as registerationCode,
l.use_company_code as useCompanyCode,
l.lift_type as liftType,
ui.name as workerName
from
annual_inspection ai
left join
lift l
on
ai.lift_id = l.id
left join
project_lift_relevance plr
on
plr.lift_id = l.id
left join
project p
on
plr.project_id = p.id
left join
user_info ui
on
ui.user_id = plr.worker_id
select
mca.id as applyId,
mca.mt_company_id as mtCompanyId,
mca.attestation_name as companyName,
mca.contacts_name as contractsName,
mca.contacts_tel as contractsTel,
mca.remarks as remarks,
mca.create_time as createTime
from
mt_company_attestation mca
where
mca.is_certificated = #{isCertificated}
select
ua.id as userApplyId,
ui.avatar_url as avatarUrl,
ui.name as userName,
u.type as userType,
u.mobile as mobile,
u.type as type,
u.create_date as applyDate
from
user_application ua
left join
user_info ui
on
ua.user_id = ui.user_id
left join
user_account u
on
ua.user_id = u.user_id
where
ua.mt_company_id = #{mtCompanyId}
and
ua.status = ${status}
select
count(1)
from
emergency_repair er
select
count(1)
from
maintenance_plan mp
select
count(1)
from
capital_repair cr
select
count(1)
from
annual_inspection ai