设备增加两个字段 IP+port

highway
A0010407 1 year ago
parent f92e75d11f
commit 905b9b426a

@ -138,6 +138,28 @@ public class BaseEquipment extends BaseEntity {
@Excel(name = "说明") @Excel(name = "说明")
private String explain; private String explain;
/** IP */
@Excel(name = "IP")
private String plcIp;
/** 端口号 */
@Excel(name = "端口号")
private String plcPort;
public void setPlcIp(String plcIp) {
this.plcIp = plcIp;
}
public String getPlcIp() {
return plcIp;
}
public void setPlcPort(String plcPort) {
this.plcPort = plcPort;
}
public String getPlcPort() {
return plcPort;
}
public void setExplain(String explain) { public void setExplain(String explain) {
this.explain = explain; this.explain = explain;
} }
@ -396,6 +418,8 @@ public class BaseEquipment extends BaseEntity {
.append("isOpen", getIsOpen()) .append("isOpen", getIsOpen())
.append("property", getProperty()) .append("property", getProperty())
.append("explain", getExplain()) .append("explain", getExplain())
.append("plcIp", getPlcIp())
.append("plcPort", getPlcPort())
.toString(); .toString();
} }
} }

@ -31,10 +31,12 @@
<result property="equipmentLocation" column="equipment_location" /> <result property="equipmentLocation" column="equipment_location" />
<result property="hourlyUnitPrice" column="hourly_unit_price" /> <result property="hourlyUnitPrice" column="hourly_unit_price" />
<result property="delFlag" column="del_flag" /> <result property="delFlag" column="del_flag" />
<result property="plcIp" column="plc_ip" />
<result property="plcPort" column="plc_port" />
</resultMap> </resultMap>
<sql id="selectBaseEquipmentVo"> <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> </sql>
<select id="selectBaseEquipmentList" parameterType="BaseEquipment" resultMap="BaseEquipmentResult"> <select id="selectBaseEquipmentList" parameterType="BaseEquipment" resultMap="BaseEquipmentResult">
@ -59,6 +61,8 @@
<if test="workshopSection != null and workshopSection != ''"> and workshop_section = #{workshopSection}</if> <if test="workshopSection != null and workshopSection != ''"> and workshop_section = #{workshopSection}</if>
<if test="equipmentLocation != null and equipmentLocation != ''"> and equipment_location = #{equipmentLocation}</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="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' and del_flag ='0'
</where> </where>
</select> </select>
@ -96,6 +100,8 @@
<if test="workshopSection != null and workshopSection != ''">workshop_section,</if> <if test="workshopSection != null and workshopSection != ''">workshop_section,</if>
<if test="equipmentLocation != null and equipmentLocation != ''">equipment_location,</if> <if test="equipmentLocation != null and equipmentLocation != ''">equipment_location,</if>
<if test="hourlyUnitPrice != null and hourlyUnitPrice != ''">hourly_unit_price,</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>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="equipmentCode != null and equipmentCode != ''">#{equipmentCode},</if> <if test="equipmentCode != null and equipmentCode != ''">#{equipmentCode},</if>
@ -122,6 +128,8 @@
<if test="workshopSection != null and workshopSection != ''">#{workshopSection},</if> <if test="workshopSection != null and workshopSection != ''">#{workshopSection},</if>
<if test="equipmentLocation != null and equipmentLocation != ''">#{equipmentLocation},</if> <if test="equipmentLocation != null and equipmentLocation != ''">#{equipmentLocation},</if>
<if test="hourlyUnitPrice != null and hourlyUnitPrice != ''">#{hourlyUnitPrice},</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> </trim>
</insert> </insert>
@ -152,6 +160,8 @@
<if test="workshopSection != null and workshopSection != ''">workshop_section = #{workshopSection},</if> <if test="workshopSection != null and workshopSection != ''">workshop_section = #{workshopSection},</if>
<if test="equipmentLocation != null and equipmentLocation != ''">equipment_location = #{equipmentLocation},</if> <if test="equipmentLocation != null and equipmentLocation != ''">equipment_location = #{equipmentLocation},</if>
<if test="hourlyUnitPrice != null and hourlyUnitPrice != ''">hourly_unit_price = #{hourlyUnitPrice},</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> </trim>
where equipment_id = #{equipmentId} where equipment_id = #{equipmentId}
</update> </update>

Loading…
Cancel
Save