limit #{pageNum} , #{pageSize}
where
mp.mt_company_id = #{mtCompanyId}
and
mp.status 1
where
er.mt_company_id = #{mtCompanyId}
and
er.status 2
and
er.status 3
where
cr.mt_company_id = #{mtCompanyId}
and
cr.project_status 4
where
ai.mt_company_id = #{mtCompanyId}
and
ai.status = 1
and p.region_id in (
select id from region r
where true
and find_in_set(#{clerkId}, r.clerk)
and r.user_id = #{regionChargeId}
)
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
project_lift_relevance plr
on
l.id = plr.lift_id
left join
project p
on
plr.project_id = p.id
left join
user_info ui
on
mp.worker_id = ui.user_id
order by plan_date
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
order by er.assign_time
select
p.id as capitalRepairId,
p.project_name as projectName,
p.project_address as projectAddress,
p.start_date as startDate,
p.end_date as endDate,
p.push_flag as pushFlag
from
capital_repair p
order by p.create_date
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
left join
lift l
on
er.lift_id = l.id
left join
project p
on
er.project_id = p.id
select
count(1)
from
maintenance_plan mp
left join
lift l
on
mp.lift_id = l.id
left join
project_lift_relevance plr
on
l.id = plr.lift_id
left join
project p
on
plr.project_id = p.id
select
count(1)
from
capital_repair p
select
count(1)
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