|
@@ -12,9 +12,17 @@
|
|
|
<result column="belong_company_id" property="belongCompanyId" />
|
|
|
<result column="equipment_no" property="equipmentNo" />
|
|
|
<result column="is_use" property="isUse" />
|
|
|
- <result column="agent" property="agent" />
|
|
|
<result column="hill_number" property="hillNumber" />
|
|
|
+ <result column="lng" property="lng" />
|
|
|
+ <result column="lat" property="lat" />
|
|
|
+ <result column="temperature" property="temperature" />
|
|
|
+ <result column="agent" property="agent" />
|
|
|
</resultMap>
|
|
|
+
|
|
|
+ <!-- 通用查询结果列 -->
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ id, equipment_name, start_time, end_time, use_life, belong_company_id, equipment_no, is_use, hill_number, lng, lat, temperature, agent
|
|
|
+ </sql>
|
|
|
<resultMap id="BaseResultMapVO" type="com.hssx.cloudmodel.entity.vo.MouldEquipmentVO">
|
|
|
<id column="id" property="id" />
|
|
|
<result column="equipment_name" property="equipmentName" />
|
|
@@ -31,24 +39,19 @@
|
|
|
<result column="modelName" property="modelName" />
|
|
|
</resultMap>
|
|
|
|
|
|
- <!-- 通用查询结果列 -->
|
|
|
- <sql id="Base_Column_List">
|
|
|
- id, equipment_name, start_time, end_time, use_life, belong_company_id, equipment_no, is_use, hill_number,agent
|
|
|
- </sql>
|
|
|
-
|
|
|
<select id="getListByCompanyId" resultMap="BaseResultMapVO">
|
|
|
select
|
|
|
- tbme.id id, tbme.equipment_name equipment_name, tbme.start_time start_time, tbme.end_time end_time,
|
|
|
- tbme.use_life use_life, tbme.belong_company_id belong_company_id, tbme.equipment_no equipment_no,
|
|
|
- tbme.is_use, tbme.hill_number,tbc.company_name companyName,tbme.agent
|
|
|
+ tbme.id id, tbme.equipment_name equipment_name, tbme.start_time start_time, tbme.end_time end_time,
|
|
|
+ tbme.use_life use_life, tbme.belong_company_id belong_company_id, tbme.equipment_no equipment_no,
|
|
|
+ tbme.is_use, tbme.hill_number,tbc.company_name companyName,tbme.agent
|
|
|
from
|
|
|
- tb_mould_equipment tbme
|
|
|
+ tb_mould_equipment tbme
|
|
|
left join
|
|
|
- tb_company tbc
|
|
|
+ tb_company tbc
|
|
|
on
|
|
|
- tbme.belong_company_id = tbc.id
|
|
|
+ tbme.belong_company_id = tbc.id
|
|
|
where
|
|
|
- tbme.belong_company_id = #{belongCompanyId}
|
|
|
+ tbme.belong_company_id = #{belongCompanyId}
|
|
|
and
|
|
|
tbme.id not in
|
|
|
<foreach item="item" index="index" collection="list"
|
|
@@ -59,18 +62,18 @@
|
|
|
</select>
|
|
|
<select id="getList" resultMap="BaseResultMapVO">
|
|
|
select
|
|
|
- tbme.id id, tbme.equipment_name equipment_name, tbme.start_time start_time, tbme.end_time end_time,tbme.agent,
|
|
|
- tbme.use_life use_life, tbme.belong_company_id belong_company_id, tbme.equipment_no equipment_no,
|
|
|
- tbme.is_use, tbme.hill_number,tbc.company_name companyName,tbm.model_no modelNo,tbm.model_name modelName
|
|
|
+ tbme.id id, tbme.equipment_name equipment_name, tbme.start_time start_time, tbme.end_time end_time,tbme.agent,
|
|
|
+ tbme.use_life use_life, tbme.belong_company_id belong_company_id, tbme.equipment_no equipment_no,
|
|
|
+ tbme.is_use, tbme.hill_number,tbc.company_name companyName,tbm.model_no modelNo,tbm.model_name modelName
|
|
|
from
|
|
|
- tb_mould_equipment tbme
|
|
|
+ tb_mould_equipment tbme
|
|
|
left join
|
|
|
- tb_mould tbm
|
|
|
+ tb_mould tbm
|
|
|
on tbme.id = tbm.equipment_id
|
|
|
left join
|
|
|
- tb_company tbc
|
|
|
+ tb_company tbc
|
|
|
on
|
|
|
- tbme.belong_company_id = tbc.id
|
|
|
+ tbme.belong_company_id = tbc.id
|
|
|
<where>
|
|
|
<if test="companyId != null">
|
|
|
and tbme.belong_company_id = #{companyId}
|