|
|
@@ -34,6 +34,8 @@
|
|
|
<result column="SPOT_AREA_NAME" jdbcType="VARCHAR" property="spotAreaName" />
|
|
|
<result column="ALLOWED_TARE_WEIGHT" jdbcType="VARCHAR" property="allowedTareWeight" />
|
|
|
<result column="SCAN_REQUIRE_VALID" jdbcType="VARCHAR" property="scanRequireValid" />
|
|
|
+ <result column="MOXA_IP" jdbcType="VARCHAR" property="moxaIp" />
|
|
|
+ <result column="PLC_IP" jdbcType="VARCHAR" property="plcIp" />
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
BASE_SPOT_NO, BASE_SPOT_NAME, SPOT_TYPE_NO, SPOT_TYPE_NAME, SPOT_STATE_NO, SPOT_STATE_NAME,
|
|
|
@@ -41,7 +43,7 @@
|
|
|
COUNT_NUM, USED_NUM, CONTROL_IP, VALID_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME,
|
|
|
UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, DELETE_MAN_NO, DELETE_MAN_NAME, DELETE_TIME,
|
|
|
FLAT_COMPUTER_IP, MES_SPOT_ID, SPOT_AREA_NO, SPOT_AREA_NAME, ALLOWED_TARE_WEIGHT,
|
|
|
- SCAN_REQUIRE_VALID
|
|
|
+ SCAN_REQUIRE_VALID, MOXA_IP, PLC_IP
|
|
|
</sql>
|
|
|
<sql id="columns_alias">
|
|
|
t.BASE_SPOT_NO, t.BASE_SPOT_NAME, t.SPOT_TYPE_NO, t.SPOT_TYPE_NAME, t.SPOT_STATE_NO,
|
|
|
@@ -49,7 +51,8 @@
|
|
|
t.LED_IP, t.PRINTER_IP, t.PRINTER_NAME, t.COUNT_NUM, t.USED_NUM, t.CONTROL_IP, t.VALID_FLAG,
|
|
|
t.CREATE_MAN_NO, t.CREATE_MAN_NAME, t.CREATE_TIME, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME,
|
|
|
t.UPDATE_TIME, t.DELETE_MAN_NO, t.DELETE_MAN_NAME, t.DELETE_TIME, t.FLAT_COMPUTER_IP,
|
|
|
- t.MES_SPOT_ID, t.SPOT_AREA_NO, t.SPOT_AREA_NAME, t.ALLOWED_TARE_WEIGHT, t.SCAN_REQUIRE_VALID
|
|
|
+ t.MES_SPOT_ID, t.SPOT_AREA_NO, t.SPOT_AREA_NAME, t.ALLOWED_TARE_WEIGHT, t.SCAN_REQUIRE_VALID,
|
|
|
+ t.MOXA_IP, t.PLC_IP
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
SELECT <include refid="columns" /> FROM METER_BASE_SPOT_INFO
|
|
|
@@ -155,6 +158,12 @@
|
|
|
<if test="scanRequireValid != null and scanRequireValid != ''">
|
|
|
and SCAN_REQUIRE_VALID = #{scanRequireValid}
|
|
|
</if>
|
|
|
+ <if test="moxaIp != null and moxaIp != ''">
|
|
|
+ and MOXA_IP = #{moxaIp}
|
|
|
+ </if>
|
|
|
+ <if test="plcIp != null and plcIp != ''">
|
|
|
+ and PLC_IP = #{plcIp}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
|
@@ -255,6 +264,12 @@
|
|
|
<if test="scanRequireValid != null and scanRequireValid != ''">
|
|
|
and SCAN_REQUIRE_VALID LIKE '%${scanRequireValid}%'
|
|
|
</if>
|
|
|
+ <if test="moxaIp != null and moxaIp != ''">
|
|
|
+ and MOXA_IP LIKE '%${moxaIp}%'
|
|
|
+ </if>
|
|
|
+ <if test="plcIp != null and plcIp != ''">
|
|
|
+ and PLC_IP LIKE '%${plcIp}%'
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
@@ -357,6 +372,12 @@
|
|
|
<if test="scanRequireValid != null and scanRequireValid != ''">
|
|
|
or SCAN_REQUIRE_VALID = #{scanRequireValid}
|
|
|
</if>
|
|
|
+ <if test="moxaIp != null and moxaIp != ''">
|
|
|
+ or MOXA_IP = #{moxaIp}
|
|
|
+ </if>
|
|
|
+ <if test="plcIp != null and plcIp != ''">
|
|
|
+ or PLC_IP = #{plcIp}
|
|
|
+ </if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo">
|
|
|
insert into METER_BASE_SPOT_INFO (BASE_SPOT_NO, BASE_SPOT_NAME, SPOT_TYPE_NO,
|
|
|
@@ -369,7 +390,8 @@
|
|
|
UPDATE_MAN_NAME, UPDATE_TIME, DELETE_MAN_NO,
|
|
|
DELETE_MAN_NAME, DELETE_TIME, FLAT_COMPUTER_IP,
|
|
|
MES_SPOT_ID, SPOT_AREA_NO, SPOT_AREA_NAME,
|
|
|
- ALLOWED_TARE_WEIGHT, SCAN_REQUIRE_VALID)
|
|
|
+ ALLOWED_TARE_WEIGHT, SCAN_REQUIRE_VALID, MOXA_IP,
|
|
|
+ PLC_IP)
|
|
|
values (#{baseSpotNo,jdbcType=VARCHAR}, #{baseSpotName,jdbcType=VARCHAR}, #{spotTypeNo,jdbcType=VARCHAR},
|
|
|
#{spotTypeName,jdbcType=VARCHAR}, #{spotStateNo,jdbcType=VARCHAR}, #{spotStateName,jdbcType=VARCHAR},
|
|
|
#{videoIp,jdbcType=VARCHAR}, #{videoPort,jdbcType=VARCHAR}, #{videoUserName,jdbcType=VARCHAR},
|
|
|
@@ -380,7 +402,8 @@
|
|
|
#{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{deleteManNo,jdbcType=VARCHAR},
|
|
|
#{deleteManName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP}, #{flatComputerIp,jdbcType=VARCHAR},
|
|
|
#{mesSpotId,jdbcType=VARCHAR}, #{spotAreaNo,jdbcType=VARCHAR}, #{spotAreaName,jdbcType=VARCHAR},
|
|
|
- #{allowedTareWeight,jdbcType=VARCHAR}, #{scanRequireValid,jdbcType=VARCHAR})
|
|
|
+ #{allowedTareWeight,jdbcType=VARCHAR}, #{scanRequireValid,jdbcType=VARCHAR}, #{moxaIp,jdbcType=VARCHAR},
|
|
|
+ #{plcIp,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo">
|
|
|
insert into METER_BASE_SPOT_INFO
|
|
|
@@ -481,6 +504,12 @@
|
|
|
<if test="scanRequireValid != null">
|
|
|
SCAN_REQUIRE_VALID,
|
|
|
</if>
|
|
|
+ <if test="moxaIp != null">
|
|
|
+ MOXA_IP,
|
|
|
+ </if>
|
|
|
+ <if test="plcIp != null">
|
|
|
+ PLC_IP,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="baseSpotNo != null">
|
|
|
@@ -579,6 +608,12 @@
|
|
|
<if test="scanRequireValid != null">
|
|
|
#{scanRequireValid,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="moxaIp != null">
|
|
|
+ #{moxaIp,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="plcIp != null">
|
|
|
+ #{plcIp,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo">
|
|
|
@@ -613,7 +648,9 @@
|
|
|
SPOT_AREA_NO = #{spotAreaNo,jdbcType=VARCHAR},
|
|
|
SPOT_AREA_NAME = #{spotAreaName,jdbcType=VARCHAR},
|
|
|
ALLOWED_TARE_WEIGHT = #{allowedTareWeight,jdbcType=VARCHAR},
|
|
|
- SCAN_REQUIRE_VALID = #{scanRequireValid,jdbcType=VARCHAR}
|
|
|
+ SCAN_REQUIRE_VALID = #{scanRequireValid,jdbcType=VARCHAR},
|
|
|
+ MOXA_IP = #{moxaIp,jdbcType=VARCHAR},
|
|
|
+ PLC_IP = #{plcIp,jdbcType=VARCHAR}
|
|
|
where BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo">
|
|
|
@@ -712,6 +749,12 @@
|
|
|
<if test="scanRequireValid != null">
|
|
|
SCAN_REQUIRE_VALID = #{scanRequireValid,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="moxaIp != null">
|
|
|
+ MOXA_IP = #{moxaIp,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="plcIp != null">
|
|
|
+ PLC_IP = #{plcIp,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
@@ -740,8 +783,8 @@
|
|
|
UPDATE_TIME, DELETE_MAN_NO, DELETE_MAN_NAME,
|
|
|
DELETE_TIME, FLAT_COMPUTER_IP,
|
|
|
MES_SPOT_ID, SPOT_AREA_NO, SPOT_AREA_NAME,
|
|
|
- ALLOWED_TARE_WEIGHT, SCAN_REQUIRE_VALID
|
|
|
- )
|
|
|
+ ALLOWED_TARE_WEIGHT, SCAN_REQUIRE_VALID,
|
|
|
+ MOXA_IP, PLC_IP)
|
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
|
select
|
|
|
#{item.baseSpotNo,jdbcType=VARCHAR},
|
|
|
@@ -755,8 +798,8 @@
|
|
|
#{item.updateTime,jdbcType=TIMESTAMP}, #{item.deleteManNo,jdbcType=VARCHAR}, #{item.deleteManName,jdbcType=VARCHAR},
|
|
|
#{item.deleteTime,jdbcType=TIMESTAMP}, #{item.flatComputerIp,jdbcType=VARCHAR},
|
|
|
#{item.mesSpotId,jdbcType=VARCHAR}, #{item.spotAreaNo,jdbcType=VARCHAR}, #{item.spotAreaName,jdbcType=VARCHAR},
|
|
|
- #{item.allowedTareWeight,jdbcType=VARCHAR}, #{item.scanRequireValid,jdbcType=VARCHAR}
|
|
|
- from dual
|
|
|
+ #{item.allowedTareWeight,jdbcType=VARCHAR}, #{item.scanRequireValid,jdbcType=VARCHAR},
|
|
|
+ #{item.moxaIp,jdbcType=VARCHAR}, #{item.plcIp,jdbcType=VARCHAR} from dual
|
|
|
</foreach> )
|
|
|
</insert>
|
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
|
@@ -890,6 +933,14 @@
|
|
|
<foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
|
|
|
when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.scanRequireValid,jdbcType=VARCHAR}
|
|
|
</foreach>
|
|
|
+ ,MOXA_IP=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
|
|
|
+ when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.moxaIp,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,PLC_IP=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case BASE_SPOT_NO" separator=" ">
|
|
|
+ when #{item.baseSpotNo,jdbcType=VARCHAR} then #{item.plcIp,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
where BASE_SPOT_NO in
|
|
|
<foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
#{item.baseSpotNo,jdbcType=VARCHAR}
|
|
|
@@ -1056,5 +1107,4 @@
|
|
|
select * from meter_base_spot_info
|
|
|
where spot_type_no in ('001019003','001019005')
|
|
|
</select>
|
|
|
-
|
|
|
</mapper>
|