|
@@ -52,8 +52,7 @@
|
|
|
pc.name AS companyName,
|
|
|
c.overdue_date AS overdueDate,
|
|
|
c.overdue_reason AS overdueReason,
|
|
|
- c.overdue_flag AS overdueFlag,
|
|
|
- c.img_url AS imgUrl
|
|
|
+ c.overdue_flag AS overdueFlag
|
|
|
FROM capital_repair c
|
|
|
LEFT JOIN region r ON c.region_id = r.id
|
|
|
LEFT JOIN user_info ui ON r.user_id = ui.user_id
|
|
@@ -69,4 +68,37 @@
|
|
|
AND project_name LIKE concat('%',#{request.projectName,jdbcType=VARCHAR},'%')
|
|
|
</if>
|
|
|
</select>
|
|
|
+
|
|
|
+ <!-- 查询大修项目下电梯列表 -->
|
|
|
+ <select id="findLiftListByProjectId"
|
|
|
+ resultType="cn.com.ty.lift.business.library.dao.entity.model.response.LiftResponse"
|
|
|
+ parameterType="cn.com.ty.lift.business.library.dao.entity.model.request.LiftRequest">
|
|
|
+ SELECT l.id AS id,
|
|
|
+ l.lift_code AS liftCode,
|
|
|
+ l.registration_code AS registrationCode,
|
|
|
+ l.lift_type AS liftType,
|
|
|
+ l.device_position AS devicePosition,
|
|
|
+ lb.name AS liftBrand,
|
|
|
+ l.annual_inspection_date AS annualInspectionDate,
|
|
|
+ pclr.id AS companyRelevanceId,
|
|
|
+ pclr.lift_company_status AS liftStatus,
|
|
|
+ crlr.project_id AS projectId,
|
|
|
+ crlr.worker_id AS workerId,
|
|
|
+ ui.name AS workerName,
|
|
|
+ crlr.lift_locked AS liftLocked
|
|
|
+ FROM capital_repair_lift_relevance crlr
|
|
|
+ LEFT JOIN lift l ON crlr.lift_id = l.id
|
|
|
+ LEFT JOIN lift_brand lb ON l.lift_brand = lb.code
|
|
|
+ LEFT JOIN user_info ui ON crlr.worker_id = ui.user_id
|
|
|
+ LEFT JOIN platform_company_lift_relevance pclr ON crlr.lift_id = pclr.lift_id
|
|
|
+ AND crlr.mt_company_id = pclr.mt_company_id
|
|
|
+ <where>
|
|
|
+ <if test="request.mtCompanyId!=null and request.mtCompanyId > 0">
|
|
|
+ AND crlr.mt_company_id = #{request.mtCompanyId,jdbcType=BIGINT}
|
|
|
+ </if>
|
|
|
+ <if test="request.projectId!=null and request.projectId > 0">
|
|
|
+ AND crlr.project_id = #{request.projectId,jdbcType=BIGINT}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
</mapper>
|