You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
145 lines
4.0 KiB
145 lines
4.0 KiB
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<sqlMap namespace="MES_INTERFACE" xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
<alias>
|
|
<typeAlias alias="MES_INTERFACE" type="SiaSun.LMS.Model.MES_INTERFACE, SiaSun.LMS.Model" />
|
|
</alias>
|
|
<resultMaps>
|
|
<resultMap id="SelectResult" class="MES_INTERFACE">
|
|
<result property="ID" column="id" />
|
|
<result property="STOCK_BARCODE" column="_stock_barcode" />
|
|
<result property="GOODS_NAME" column="_goods_name" />
|
|
<result property="GOODS_CODE" column="_goods_code" />
|
|
<result property="QUANTITY" column="_quantity" />
|
|
<result property="BATCH" column="_batch" />
|
|
<result property="INOUT" column="_inout" />
|
|
<result property="SPECIFICATION" column="_specification" />
|
|
<result property="PART_NO" column="_part_no" />
|
|
<result property="SUPPLY" column="_supply" />
|
|
<result property="UNIT" column="_unit" />
|
|
<result property="UPDATE_TIME" column="_update_time" />
|
|
<result property="PRODUCT_TIME" column="_product_time" />
|
|
<result property="OUT_TIME" column="_out_time" />
|
|
<result property="MES_INFO" column="_mes_info" />
|
|
<result property="WMS_INFO" column="_wms_info" />
|
|
|
|
</resultMap>
|
|
</resultMaps>
|
|
|
|
<statements>
|
|
|
|
<select id="MES_INTERFACE_SELECT" parameterClass="int" resultMap="SelectResult">
|
|
Select
|
|
id,
|
|
stock_barcode,
|
|
goods_name,
|
|
goods_code,
|
|
quantity,
|
|
batch,
|
|
inout,
|
|
specification,
|
|
part_no,
|
|
supply,
|
|
unit,
|
|
update_time,
|
|
product_time,
|
|
out_time,
|
|
mes_info,
|
|
wms_info
|
|
From MES_INTERFACE
|
|
</select>
|
|
|
|
<select id="MES_INTERFACE_SELECT_BY_ID" parameterClass="int" extends = "MES_INTERFACE_SELECT" resultMap="SelectResult">
|
|
<dynamic prepend="WHERE">
|
|
<isParameterPresent>
|
|
id=#ID#
|
|
</isParameterPresent>
|
|
</dynamic>
|
|
</select>
|
|
<select id="MES_INTERFACE_SELECT_BY_PART_NO" parameterClass="int" extends = "MES_INTERFACE_SELECT" resultMap="SelectResult">
|
|
<dynamic prepend="WHERE">
|
|
<isParameterPresent>
|
|
part_no=#PART_NO#
|
|
</isParameterPresent>
|
|
</dynamic>
|
|
</select>
|
|
<select id="MES_INTERFACE_SELECT_BY_STOCK_BARCODE" parameterClass="int" extends = "MES_INTERFACE_SELECT" resultMap="SelectResult">
|
|
<dynamic prepend="WHERE">
|
|
<isParameterPresent>
|
|
stock_barcode=#STOCK_BARCODE#
|
|
</isParameterPresent>
|
|
</dynamic>
|
|
</select>
|
|
<insert id="MES_INTERFACE_INSERT" parameterClass="MES_INTERFACE">
|
|
Insert Into MES_INTERFACE (
|
|
stock_barcode,
|
|
goods_name,
|
|
goods_code,
|
|
quantity,
|
|
batch,
|
|
inout,
|
|
specification,
|
|
part_no,
|
|
supply,
|
|
unit,
|
|
update_time,
|
|
product_time,
|
|
out_time,
|
|
mes_info,
|
|
wms_info
|
|
)Values(
|
|
#STOCK_BARCODE#,
|
|
#GOODS_NAME#,
|
|
#GOODS_CODE#,
|
|
#QUANTITY#,
|
|
#BATCH#,
|
|
#INOUT#,
|
|
#SPECIFICATION#,
|
|
#PART_NO#,
|
|
#SUPPLY#,
|
|
#UNIT#,
|
|
#UPDATE_TIME#,
|
|
#PRODUCT_TIME#,
|
|
#OUT_TIME#,
|
|
#MES_INFO#,
|
|
#WMS_INFO#
|
|
)
|
|
<selectKey resultClass="int" type="post" property="ID">
|
|
select @@IDENTITY as value
|
|
</selectKey>
|
|
</insert>
|
|
|
|
<update id="MES_INTERFACE_UPDATE" parameterClass="MES_INTERFACE">
|
|
Update MES_INTERFACE Set
|
|
stock_barcode=#STOCK_BARCODE#,
|
|
goods_name=#GOODS_NAME#,
|
|
goods_code=#GOODS_CODE#,
|
|
quantity=#QUANTITY#,
|
|
batch=#BATCH#,
|
|
inout=#INOUT#,
|
|
specification=#SPECIFICATION#,
|
|
part_no=#PART_NO#,
|
|
supply=#SUPPLY#,
|
|
unit=#UNIT#,
|
|
update_time=#UPDATE_TIME#,
|
|
product_time=#PRODUCT_TIME#,
|
|
out_time=#OUT_TIME#,
|
|
mes_info=#MES_INFO#,
|
|
wms_info=#WMS_INFO#
|
|
<dynamic prepend="WHERE">
|
|
<isParameterPresent>
|
|
id=#ID#
|
|
</isParameterPresent>
|
|
</dynamic>
|
|
</update>
|
|
|
|
<delete id="MES_INTERFACE_DELETE" parameterClass="int">
|
|
Delete From MES_INTERFACE
|
|
<dynamic prepend="WHERE">
|
|
<isParameterPresent>
|
|
id=#ID#
|
|
</isParameterPresent>
|
|
</dynamic>
|
|
</delete>
|
|
|
|
</statements>
|
|
</sqlMap>
|