|
@@ -1,206 +1,208 @@
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
|
-<mapper namespace="cn.com.ty.lift.business.library.dao.mapper.LiftMapper" >
|
|
|
- <resultMap id="BaseResultMap" type="cn.com.ty.lift.business.library.dao.entity.Lift" >
|
|
|
- <id column="id" property="id" jdbcType="BIGINT" />
|
|
|
- <result column="registration_code" property="registrationCode" jdbcType="VARCHAR" />
|
|
|
- <result column="category" property="category" jdbcType="INTEGER" />
|
|
|
- <result column="lift_type" property="liftType" jdbcType="INTEGER" />
|
|
|
- <result column="lift_code" property="liftCode" jdbcType="CHAR" />
|
|
|
- <result column="manufacture_date" property="manufactureDate" jdbcType="DATE" />
|
|
|
- <result column="factory_code" property="factoryCode" jdbcType="VARCHAR" />
|
|
|
- <result column="device_usage" property="deviceUsage" jdbcType="INTEGER" />
|
|
|
- <result column="lift_brand" property="liftBrand" jdbcType="VARCHAR" />
|
|
|
- <result column="install_company" property="installCompany" jdbcType="VARCHAR" />
|
|
|
- <result column="lift_model" property="liftModel" jdbcType="VARCHAR" />
|
|
|
- <result column="pulley_diameter" property="pulleyDiameter" jdbcType="DECIMAL" />
|
|
|
- <result column="rope_num" property="ropeNum" jdbcType="INTEGER" />
|
|
|
- <result column="lock_model" property="lockModel" jdbcType="VARCHAR" />
|
|
|
- <result column="rated_load" property="ratedLoad" jdbcType="INTEGER" />
|
|
|
- <result column="promote_height" property="promoteHeight" jdbcType="DECIMAL" />
|
|
|
- <result column="step_width" property="stepWidth" jdbcType="DECIMAL" />
|
|
|
- <result column="sidewalk_length" property="sidewalkLength" jdbcType="DECIMAL" />
|
|
|
- <result column="tilt_angle" property="tiltAngle" jdbcType="DECIMAL" />
|
|
|
- <result column="motor_power" property="motorPower" jdbcType="DECIMAL" />
|
|
|
- <result column="rated_speed" property="ratedSpeed" jdbcType="DECIMAL" />
|
|
|
- <result column="layer_station_door" property="layerStationDoor" jdbcType="VARCHAR" />
|
|
|
- <result column="clamp_type" property="clampType" jdbcType="INTEGER" />
|
|
|
- <result column="reform_company" property="reformCompany" jdbcType="VARCHAR" />
|
|
|
- <result column="device_position" property="devicePosition" jdbcType="VARCHAR" />
|
|
|
- <result column="coordinate" property="coordinate" jdbcType="VARCHAR" />
|
|
|
- <result column="remarks" property="remarks" jdbcType="VARCHAR" />
|
|
|
- <result column="creator_id" property="creatorId" jdbcType="BIGINT" />
|
|
|
- <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
|
|
|
- <result column="steel_belt" property="steelBelt" jdbcType="INTEGER" />
|
|
|
- <result column="cylinder_type" property="cylinderType" jdbcType="VARCHAR" />
|
|
|
- <result column="cylinder_num" property="cylinderNum" jdbcType="INTEGER" />
|
|
|
- <result column="top_type" property="topType" jdbcType="INTEGER" />
|
|
|
- <result column="control_type" property="controlType" jdbcType="VARCHAR" />
|
|
|
- <result column="mpa" property="mpa" jdbcType="INTEGER" />
|
|
|
- <result column="factory" property="factory" jdbcType="VARCHAR" />
|
|
|
- <result column="custom_number" property="customNumber" jdbcType="VARCHAR" />
|
|
|
- <result column="use_company_code" property="useCompanyCode" jdbcType="VARCHAR" />
|
|
|
- <result column="device_position_code" property="devicePositionCode" jdbcType="CHAR" />
|
|
|
- <result column="agency" property="agency" jdbcType="VARCHAR" />
|
|
|
- <result column="reform_date" property="reformDate" jdbcType="TIMESTAMP" />
|
|
|
- <result column="install_date" property="installDate" jdbcType="TIMESTAMP" />
|
|
|
- <result column="inner_floor" property="innerFloor" jdbcType="INTEGER" />
|
|
|
- <result column="annual_inspection_date" property="annualInspectionDate" jdbcType="DATE" />
|
|
|
- <result column="area_code" property="areaCode" jdbcType="CHAR" />
|
|
|
- <result column="device_id" property="deviceId" jdbcType="VARCHAR" />
|
|
|
- <result column="device_type" property="deviceType" jdbcType="TINYINT" />
|
|
|
- </resultMap>
|
|
|
+<mapper namespace="cn.com.ty.lift.business.library.dao.mapper.LiftMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="cn.com.ty.lift.business.library.dao.entity.Lift">
|
|
|
+ <id column="id" property="id" jdbcType="BIGINT"/>
|
|
|
+ <result column="registration_code" property="registrationCode" jdbcType="VARCHAR"/>
|
|
|
+ <result column="category" property="category" jdbcType="INTEGER"/>
|
|
|
+ <result column="lift_type" property="liftType" jdbcType="INTEGER"/>
|
|
|
+ <result column="lift_code" property="liftCode" jdbcType="CHAR"/>
|
|
|
+ <result column="manufacture_date" property="manufactureDate" jdbcType="DATE"/>
|
|
|
+ <result column="factory_code" property="factoryCode" jdbcType="VARCHAR"/>
|
|
|
+ <result column="device_usage" property="deviceUsage" jdbcType="INTEGER"/>
|
|
|
+ <result column="lift_brand" property="liftBrand" jdbcType="VARCHAR"/>
|
|
|
+ <result column="install_company" property="installCompany" jdbcType="VARCHAR"/>
|
|
|
+ <result column="lift_model" property="liftModel" jdbcType="VARCHAR"/>
|
|
|
+ <result column="pulley_diameter" property="pulleyDiameter" jdbcType="DECIMAL"/>
|
|
|
+ <result column="rope_num" property="ropeNum" jdbcType="INTEGER"/>
|
|
|
+ <result column="lock_model" property="lockModel" jdbcType="VARCHAR"/>
|
|
|
+ <result column="rated_load" property="ratedLoad" jdbcType="INTEGER"/>
|
|
|
+ <result column="promote_height" property="promoteHeight" jdbcType="DECIMAL"/>
|
|
|
+ <result column="step_width" property="stepWidth" jdbcType="DECIMAL"/>
|
|
|
+ <result column="sidewalk_length" property="sidewalkLength" jdbcType="DECIMAL"/>
|
|
|
+ <result column="tilt_angle" property="tiltAngle" jdbcType="DECIMAL"/>
|
|
|
+ <result column="motor_power" property="motorPower" jdbcType="DECIMAL"/>
|
|
|
+ <result column="rated_speed" property="ratedSpeed" jdbcType="DECIMAL"/>
|
|
|
+ <result column="layer_station_door" property="layerStationDoor" jdbcType="VARCHAR"/>
|
|
|
+ <result column="clamp_type" property="clampType" jdbcType="INTEGER"/>
|
|
|
+ <result column="reform_company" property="reformCompany" jdbcType="VARCHAR"/>
|
|
|
+ <result column="device_position" property="devicePosition" jdbcType="VARCHAR"/>
|
|
|
+ <result column="coordinate" property="coordinate" jdbcType="VARCHAR"/>
|
|
|
+ <result column="remarks" property="remarks" jdbcType="VARCHAR"/>
|
|
|
+ <result column="creator_id" property="creatorId" jdbcType="BIGINT"/>
|
|
|
+ <result column="create_date" property="createDate" jdbcType="TIMESTAMP"/>
|
|
|
+ <result column="steel_belt" property="steelBelt" jdbcType="INTEGER"/>
|
|
|
+ <result column="cylinder_type" property="cylinderType" jdbcType="VARCHAR"/>
|
|
|
+ <result column="cylinder_num" property="cylinderNum" jdbcType="INTEGER"/>
|
|
|
+ <result column="top_type" property="topType" jdbcType="INTEGER"/>
|
|
|
+ <result column="control_type" property="controlType" jdbcType="VARCHAR"/>
|
|
|
+ <result column="mpa" property="mpa" jdbcType="INTEGER"/>
|
|
|
+ <result column="factory" property="factory" jdbcType="VARCHAR"/>
|
|
|
+ <result column="custom_number" property="customNumber" jdbcType="VARCHAR"/>
|
|
|
+ <result column="use_company_code" property="useCompanyCode" jdbcType="VARCHAR"/>
|
|
|
+ <result column="device_position_code" property="devicePositionCode" jdbcType="CHAR"/>
|
|
|
+ <result column="agency" property="agency" jdbcType="VARCHAR"/>
|
|
|
+ <result column="reform_date" property="reformDate" jdbcType="TIMESTAMP"/>
|
|
|
+ <result column="install_date" property="installDate" jdbcType="TIMESTAMP"/>
|
|
|
+ <result column="inner_floor" property="innerFloor" jdbcType="INTEGER"/>
|
|
|
+ <result column="annual_inspection_date" property="annualInspectionDate" jdbcType="DATE"/>
|
|
|
+ <result column="area_code" property="areaCode" jdbcType="CHAR"/>
|
|
|
+ <result column="device_id" property="deviceId" jdbcType="VARCHAR"/>
|
|
|
+ <result column="device_type" property="deviceType" jdbcType="TINYINT"/>
|
|
|
+ </resultMap>
|
|
|
|
|
|
- <sql id="Base_Column_List" >
|
|
|
- id, registration_code, category, lift_type, lift_code, manufacture_date, factory_code,
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ id, registration_code, category, lift_type, lift_code, manufacture_date, factory_code,
|
|
|
device_usage, lift_brand, install_company, lift_model, pulley_diameter, rope_num,
|
|
|
lock_model, rated_load, promote_height, step_width, sidewalk_length, tilt_angle,
|
|
|
motor_power, rated_speed, layer_station_door, clamp_type, reform_company, device_position,
|
|
|
coordinate, remarks, creator_id, create_date, steel_belt, cylinder_type, cylinder_num,
|
|
|
top_type, control_type, mpa, factory, custom_number, use_company_code, device_position_code,
|
|
|
agency, reform_date, install_date, inner_floor, annual_inspection_date, area_code, device_id, device_type
|
|
|
- </sql>
|
|
|
+ </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,
|
|
|
- l.registration_code AS registrationCode,
|
|
|
- l.lift_type AS liftType,
|
|
|
- l.device_position AS devicePosition,
|
|
|
- lb.name AS liftBrand,
|
|
|
- pclr.lift_company_status AS liftStatus,
|
|
|
- plr.first_time AS firstMaintenanceTime,
|
|
|
- p.project_name AS projectName,
|
|
|
- plr.lift_locked AS liftLocked
|
|
|
+ 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,
|
|
|
+ pclr.lift_company_status AS liftStatus,
|
|
|
+ plr.first_time AS firstMaintenanceTime,
|
|
|
+ p.project_name AS projectName,
|
|
|
+ p.id AS projectId,
|
|
|
+ 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.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 plr.delete_flag = '0'
|
|
|
+ WHERE plr.delete_flag = '0'
|
|
|
<if test="request.mtCompanyId!=null and request.mtCompanyId!=''">
|
|
|
- AND pclr.mt_company_id = #{request.mtCompanyId,jdbcType=BIGINT}
|
|
|
+ AND pclr.mt_company_id = #{request.mtCompanyId,jdbcType=BIGINT}
|
|
|
+ </if>
|
|
|
+ <if test="request.liftStatus != null and request.liftStatus != '' and request.liftStatus == 1">
|
|
|
+ AND pclr.lift_company_status != 1
|
|
|
+ </if>
|
|
|
+ <if test="request.liftStatus != null and request.liftStatus != '' and request.liftStatus == 0">
|
|
|
+ AND pclr.lift_company_status = 1
|
|
|
+ </if>
|
|
|
+ <if test="request.liftType!=null and request.liftType!=''">
|
|
|
+ AND l.lift_type = #{request.liftType,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
- <if test="request.liftStatus != null and request.liftStatus != '' and request.liftStatus == 1">
|
|
|
- AND pclr.lift_company_status != 1
|
|
|
- </if>
|
|
|
- <if test="request.liftStatus != null and request.liftStatus != '' and request.liftStatus == 0">
|
|
|
- AND pclr.lift_company_status = 1
|
|
|
- </if>
|
|
|
- <if test="request.liftType!=null and request.liftType!=''">
|
|
|
- AND l.lift_type = #{request.liftType,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
<if test="request.liftBrand!=null and request.liftBrand!=''">
|
|
|
- AND lb.code = #{request.liftBrand,jdbcType=VARCHAR}
|
|
|
+ AND lb.code = #{request.liftBrand,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="request.registrationCode!=null and request.registrationCode!=''">
|
|
|
+ AND l.registration_code LIKE #{request.registrationCode,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
- <if test="request.registrationCode!=null and request.registrationCode!=''">
|
|
|
- AND l.registration_code LIKE #{request.registrationCode,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- </select>
|
|
|
+ </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,
|
|
|
- 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,
|
|
|
- plr.id AS projectRelevanceId,
|
|
|
- plr.project_id AS projectId,
|
|
|
- plr.worker_id AS workerId,
|
|
|
- plr.lift_locked AS liftLocked,
|
|
|
- ui.name AS workerName
|
|
|
+ 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,
|
|
|
+ plr.id AS projectRelevanceId,
|
|
|
+ plr.project_id AS projectId,
|
|
|
+ plr.worker_id AS workerId,
|
|
|
+ plr.lift_locked AS liftLocked,
|
|
|
+ ui.name AS workerName
|
|
|
FROM project_lift_relevance plr
|
|
|
- LEFT JOIN lift l ON plr.lift_id = l.id
|
|
|
- LEFT JOIN lift_brand lb ON l.lift_brand = lb.code
|
|
|
- LEFT JOIN user_info ui ON plr.worker_id = ui.user_id
|
|
|
- LEFT JOIN platform_company_lift_relevance pclr ON plr.lift_id = pclr.lift_id AND pclr.id = plr.relevance_id
|
|
|
+ LEFT JOIN lift l ON plr.lift_id = l.id
|
|
|
+ LEFT JOIN lift_brand lb ON l.lift_brand = lb.code
|
|
|
+ LEFT JOIN user_info ui ON plr.worker_id = ui.user_id
|
|
|
+ LEFT JOIN platform_company_lift_relevance pclr ON plr.lift_id = pclr.lift_id AND pclr.id = plr.relevance_id
|
|
|
WHERE plr.delete_flag = '0'
|
|
|
- <if test="request.mtCompanyId!=null and request.mtCompanyId!=''">
|
|
|
- AND plr.mt_company_id = #{request.mtCompanyId,jdbcType=BIGINT}
|
|
|
- </if>
|
|
|
+ <if test="request.mtCompanyId!=null and request.mtCompanyId!=''">
|
|
|
+ AND plr.mt_company_id = #{request.mtCompanyId,jdbcType=BIGINT}
|
|
|
+ </if>
|
|
|
<if test="request.projectId!=null and request.projectId!=''">
|
|
|
AND plr.project_id = #{request.projectId,jdbcType=BIGINT}
|
|
|
</if>
|
|
|
</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
|
|
|
- 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.lift_company_status AS liftStatus,
|
|
|
- pclr.id AS companyRelevanceId,
|
|
|
- ui.name AS workerName,
|
|
|
- plr.worker_id AS workerId
|
|
|
- FROM platform_company_lift_relevance pclr
|
|
|
- LEFT JOIN lift l ON pclr.lift_id = l.id
|
|
|
- LEFT JOIN lift_brand lb ON l.lift_brand = lb.code
|
|
|
- LEFT JOIN project_lift_relevance plr ON pclr.lift_id = plr.lift_id
|
|
|
- AND pclr.id = plr.relevance_id
|
|
|
- LEFT JOIN user_info ui ON plr.worker_id = ui.user_id
|
|
|
- WHERE pclr.lift_company_status != '1'
|
|
|
- AND plr.delete_flag = '0'
|
|
|
- <if test="request.mtCompanyId!=null and request.mtCompanyId!=''">
|
|
|
- AND pclr.mt_company_id = #{request.mtCompanyId,jdbcType=BIGINT}
|
|
|
- </if>
|
|
|
- </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
|
|
|
+ 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.lift_company_status AS liftStatus,
|
|
|
+ pclr.id AS companyRelevanceId,
|
|
|
+ ui.name AS workerName,
|
|
|
+ plr.worker_id AS workerId
|
|
|
+ FROM platform_company_lift_relevance pclr
|
|
|
+ LEFT JOIN lift l ON pclr.lift_id = l.id
|
|
|
+ LEFT JOIN lift_brand lb ON l.lift_brand = lb.code
|
|
|
+ LEFT JOIN project_lift_relevance plr ON pclr.lift_id = plr.lift_id
|
|
|
+ AND pclr.id = plr.relevance_id
|
|
|
+ LEFT JOIN user_info ui ON plr.worker_id = ui.user_id
|
|
|
+ WHERE pclr.lift_company_status != '1'
|
|
|
+ AND plr.delete_flag = '0'
|
|
|
+ <if test="request.mtCompanyId!=null and request.mtCompanyId!=''">
|
|
|
+ AND pclr.mt_company_id = #{request.mtCompanyId,jdbcType=BIGINT}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
|
|
|
- <!--根据公司和项目查询电梯 -->
|
|
|
- <select id="listByCompanyAndProject" resultType="cn.com.ty.lift.business.library.dao.entity.model.LiftProjectModel">
|
|
|
- SELECT
|
|
|
- plr.id,
|
|
|
- plr.project_id,
|
|
|
- plr.lift_id,
|
|
|
- li.registration_code,
|
|
|
- plr.relevance_id,
|
|
|
- plr.worker_id,
|
|
|
- ui.`name` AS worker_name,
|
|
|
- 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.mt_company_id = #{mtCompanyId}
|
|
|
- AND plr.project_id = #{projectId}
|
|
|
- </select>
|
|
|
+ <!--根据公司和项目查询电梯 -->
|
|
|
+ <select id="listByCompanyAndProject" resultType="cn.com.ty.lift.business.library.dao.entity.model.LiftProjectModel">
|
|
|
+ SELECT plr.id,
|
|
|
+ plr.project_id,
|
|
|
+ plr.lift_id,
|
|
|
+ li.registration_code,
|
|
|
+ plr.relevance_id,
|
|
|
+ plr.worker_id,
|
|
|
+ ui.`name` AS worker_name,
|
|
|
+ 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.mt_company_id = #{mtCompanyId}
|
|
|
+ AND plr.project_id = #{projectId}
|
|
|
+ </select>
|
|
|
|
|
|
- <select id="queryById" resultType="cn.com.ty.lift.business.library.dao.entity.model.response.LiftExtendResponse" parameterType="java.lang.Long">
|
|
|
- SELECT l.*,
|
|
|
- ui.name as workerName
|
|
|
- FROM lift l
|
|
|
- LEFT JOIN project_lift_relevance plr ON l.id = plr.lift_id
|
|
|
- LEFT JOIN user_info ui ON plr.worker_id = ui.user_id
|
|
|
- WHERE l.id = #{id,jdbcType=BIGINT}
|
|
|
- </select>
|
|
|
+ <select id="queryById" resultType="cn.com.ty.lift.business.library.dao.entity.model.response.LiftExtendResponse"
|
|
|
+ parameterType="java.lang.Long">
|
|
|
+ SELECT l.*,
|
|
|
+ ui.name as workerName
|
|
|
+ FROM lift l
|
|
|
+ LEFT JOIN project_lift_relevance plr ON l.id = plr.lift_id
|
|
|
+ LEFT JOIN user_info ui ON plr.worker_id = ui.user_id
|
|
|
+ WHERE l.id = #{id,jdbcType=BIGINT}
|
|
|
+ and plr.project_id = #{projectId};
|
|
|
+ </select>
|
|
|
|
|
|
- <select id="queryLiftListByIdList" parameterType="java.util.List" resultType="cn.com.ty.lift.business.maintenance.dao.entity.model.response.LiftPrintResponse">
|
|
|
- SELECT l.id AS liftId,
|
|
|
- plr.project_id AS projectId,
|
|
|
- plr.mt_company_id AS mtCompanyId,
|
|
|
- l.registration_code AS registrationCode,
|
|
|
- l.device_position AS devicePosition
|
|
|
- FROM lift l
|
|
|
- LEFT JOIN project_lift_relevance plr ON l.id = plr.lift_id
|
|
|
- WHERE l.id IN
|
|
|
- <foreach collection="list" item="id" index="index" open="(" close=")" separator=",">
|
|
|
- #{id}
|
|
|
- </foreach>
|
|
|
- </select>
|
|
|
+ <select id="queryLiftListByIdList" parameterType="java.util.List"
|
|
|
+ resultType="cn.com.ty.lift.business.maintenance.dao.entity.model.response.LiftPrintResponse">
|
|
|
+ SELECT l.id AS liftId,
|
|
|
+ plr.project_id AS projectId,
|
|
|
+ plr.mt_company_id AS mtCompanyId,
|
|
|
+ l.registration_code AS registrationCode,
|
|
|
+ l.device_position AS devicePosition
|
|
|
+ FROM lift l
|
|
|
+ LEFT JOIN project_lift_relevance plr ON l.id = plr.lift_id
|
|
|
+ WHERE l.id IN
|
|
|
+ <foreach collection="list" item="id" index="index" open="(" close=")" separator=",">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </select>
|
|
|
</mapper>
|