|
|
|
@ -31,10 +31,12 @@
|
|
|
|
|
<result property="equipmentLocation" column="equipment_location" />
|
|
|
|
|
<result property="hourlyUnitPrice" column="hourly_unit_price" />
|
|
|
|
|
<result property="delFlag" column="del_flag" />
|
|
|
|
|
<result property="plcIp" column="plc_ip" />
|
|
|
|
|
<result property="plcPort" column="plc_port" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectBaseEquipmentVo">
|
|
|
|
|
select equipment_id, equipment_code, equipment_name, equipment_brand, equipment_spec, equipment_type_id, equipment_type_code, equipment_type_name, workshop_id, workshop_code, workshop_name, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, workshop_section, equipment_location, hourly_unit_price,unit_working_hours,del_flag from base_equipment
|
|
|
|
|
select equipment_id, equipment_code, equipment_name, equipment_brand, equipment_spec, equipment_type_id, equipment_type_code, equipment_type_name, workshop_id, workshop_code, workshop_name, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, workshop_section, equipment_location, hourly_unit_price,unit_working_hours,del_flag,plc_ip,plc_port from base_equipment
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectBaseEquipmentList" parameterType="BaseEquipment" resultMap="BaseEquipmentResult">
|
|
|
|
@ -59,6 +61,8 @@
|
|
|
|
|
<if test="workshopSection != null and workshopSection != ''"> and workshop_section = #{workshopSection}</if>
|
|
|
|
|
<if test="equipmentLocation != null and equipmentLocation != ''"> and equipment_location = #{equipmentLocation}</if>
|
|
|
|
|
<if test="hourlyUnitPrice != null and hourlyUnitPrice != ''"> and hourly_unit_price = #{hourlyUnitPrice}</if>
|
|
|
|
|
<if test="plcIp != null and plcIp != ''"> and plc_ip = #{plcIp}</if>
|
|
|
|
|
<if test="plcPort != null and plcPort != ''"> and plc_port = #{plcPort}</if>
|
|
|
|
|
and del_flag ='0'
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
@ -96,6 +100,8 @@
|
|
|
|
|
<if test="workshopSection != null and workshopSection != ''">workshop_section,</if>
|
|
|
|
|
<if test="equipmentLocation != null and equipmentLocation != ''">equipment_location,</if>
|
|
|
|
|
<if test="hourlyUnitPrice != null and hourlyUnitPrice != ''">hourly_unit_price,</if>
|
|
|
|
|
<if test="plcIp != null and plcIp != ''">plc_ip,</if>
|
|
|
|
|
<if test="plcPort != null and plcPort != ''">plc_port,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="equipmentCode != null and equipmentCode != ''">#{equipmentCode},</if>
|
|
|
|
@ -122,6 +128,8 @@
|
|
|
|
|
<if test="workshopSection != null and workshopSection != ''">#{workshopSection},</if>
|
|
|
|
|
<if test="equipmentLocation != null and equipmentLocation != ''">#{equipmentLocation},</if>
|
|
|
|
|
<if test="hourlyUnitPrice != null and hourlyUnitPrice != ''">#{hourlyUnitPrice},</if>
|
|
|
|
|
<if test="plcIp != null and plcIp != ''">#{plcIp},</if>
|
|
|
|
|
<if test="plcPort != null and plcPort != ''">#{plcPort},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
@ -152,6 +160,8 @@
|
|
|
|
|
<if test="workshopSection != null and workshopSection != ''">workshop_section = #{workshopSection},</if>
|
|
|
|
|
<if test="equipmentLocation != null and equipmentLocation != ''">equipment_location = #{equipmentLocation},</if>
|
|
|
|
|
<if test="hourlyUnitPrice != null and hourlyUnitPrice != ''">hourly_unit_price = #{hourlyUnitPrice},</if>
|
|
|
|
|
<if test="plcIp != null and plcIp != ''">plc_ip = #{plcIp},</if>
|
|
|
|
|
<if test="plcPort != null and plcPort != ''">plc_port = #{plcPort},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where equipment_id = #{equipmentId}
|
|
|
|
|
</update>
|
|
|
|
|