|
@@ -62,7 +62,8 @@
|
|
|
</sql>
|
|
|
|
|
|
<!-- 根据区域,项目,电梯号,电梯品牌,电梯类型,维保工查询电梯列表信息-->
|
|
|
- <select id="findByCondition" 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 id="findByCondition" 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,
|
|
@@ -76,12 +77,12 @@
|
|
|
plr.lift_locked AS liftLocked
|
|
|
FROM platform_company_lift_relevance pclr
|
|
|
LEFT JOIN lift l ON pclr.lift_id = l.id
|
|
|
- LEFT JOIN project_lift_relevance plr ON pclr.company_id = plr.company_id and pclr.lift_id = plr.lift_id
|
|
|
- LEFT JOIN project p ON pclr.company_id = p.mt_company_id and plr.project_id = p.id
|
|
|
+ LEFT JOIN project_lift_relevance plr ON pclr.mt_company_id = plr.mt_company_id and pclr.lift_id = plr.lift_id
|
|
|
+ LEFT JOIN project p ON pclr.mt_company_id = p.mt_company_id and plr.project_id = p.id
|
|
|
LEFT JOIN lift_brand lb ON l.lift_brand = lb.code
|
|
|
WHERE 1=1
|
|
|
<if test="request.companyId!=null and request.companyId!=''">
|
|
|
- AND pclr.company_id = #{request.companyId,jdbcType=BIGINT}
|
|
|
+ AND pclr.mt_company_id = #{request.companyId,jdbcType=BIGINT}
|
|
|
</if>
|
|
|
<if test="request.liftStatus != null and request.liftStatus != '' and request.liftStatus == 1">
|
|
|
AND pclr.lift_company_status != 1
|
|
@@ -101,7 +102,8 @@
|
|
|
</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.ProjectLiftRequest">
|
|
|
+ <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.ProjectLiftRequest">
|
|
|
SELECT
|
|
|
l.id AS id,
|
|
|
l.lift_code AS liftCode,
|
|
@@ -122,7 +124,7 @@
|
|
|
LEFT JOIN platform_company_lift_relevance pclr ON plr.lift_id = pclr.lift_id AND pclr.id = plr.relevance_id
|
|
|
WHERE 1=1
|
|
|
<if test="request.companyId!=null and request.companyId!=''">
|
|
|
- AND plr.company_id = #{request.companyId,jdbcType=BIGINT}
|
|
|
+ AND plr.mt_company_id = #{request.companyId,jdbcType=BIGINT}
|
|
|
</if>
|
|
|
<if test="request.projectId!=null and request.projectId!=''">
|
|
|
AND plr.project_id = #{request.projectId,jdbcType=BIGINT}
|
|
@@ -130,7 +132,8 @@
|
|
|
</select>
|
|
|
|
|
|
<!-- 选择电梯 -->
|
|
|
- <select id="chooseLiftList" resultType="cn.com.ty.lift.business.library.dao.entity.model.response.LiftResponse" parameterType="cn.com.ty.lift.business.library.dao.entity.model.request.LiftChooseRequest">
|
|
|
+ <select id="chooseLiftList" resultType="cn.com.ty.lift.business.library.dao.entity.model.response.LiftResponse"
|
|
|
+ parameterType="cn.com.ty.lift.business.library.dao.entity.model.request.LiftChooseRequest">
|
|
|
SELECT
|
|
|
l.id AS id,
|
|
|
l.lift_code AS liftCode,
|
|
@@ -150,7 +153,7 @@
|
|
|
AND pclr.lift_company_status != '1'
|
|
|
AND l.lift_status = '2'
|
|
|
<if test="request.companyId!=null and request.companyId!=''">
|
|
|
- AND plr.company_id != #{request.companyId,jdbcType=BIGINT}
|
|
|
+ AND plr.mt_company_id != #{request.companyId,jdbcType=BIGINT}
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
@@ -170,13 +173,13 @@
|
|
|
plr.relevance_id,
|
|
|
plr.worker_id,
|
|
|
ui.`name` AS worker_name,
|
|
|
- plr.company_id
|
|
|
+ plr.mt_company_id
|
|
|
FROM
|
|
|
lift li
|
|
|
LEFT JOIN project_lift_relevance plr ON li.id = plr.lift_id
|
|
|
LEFT JOIN user_info ui ON plr.worker_id = ui.user_id
|
|
|
WHERE
|
|
|
- plr.company_id = #{mtCompanyId}
|
|
|
+ plr.mt_company_id = #{mtCompanyId}
|
|
|
AND plr.project_id = #{projectId}
|
|
|
</select>
|
|
|
|