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.
127 lines
3.9 KiB
127 lines
3.9 KiB
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<sqlMap namespace="RECORD_MAIN" xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
<alias>
|
|
<typeAlias alias="RECORD_MAIN" type="SiaSun.LMS.Model.RECORD_MAIN, SiaSun.LMS.Model" />
|
|
</alias>
|
|
<resultMaps>
|
|
<resultMap id="SelectResult" class="RECORD_MAIN">
|
|
<result property="RECORD_ID" column="record_id" />
|
|
<result property="PLAN_CODE" column="plan_code" />
|
|
<result property="PLAN_TYPE_CODE" column="plan_type_code" />
|
|
<result property="MANAGE_TYPE_CODE" column="manage_type_code" />
|
|
<result property="STOCK_BARCODE" column="stock_barcode" />
|
|
<result property="START_POSITION" column="start_position" />
|
|
<result property="END_POSITION" column="end_position" />
|
|
<result property="RECORD_OPERATOR" column="record_operator" />
|
|
<result property="MANAGE_BEGIN_TIME" column="manage_begin_time" />
|
|
<result property="MANAGE_END_TIME" column="manage_end_time" />
|
|
<result property="MANAGE_CONFIRM_TIME" column="manage_confirm_time" />
|
|
<result property="RECORD_REMARK" column="record_remark" />
|
|
<result property="MANAGE_STATUS" column="MANAGE_STATUS" />
|
|
</resultMap>
|
|
</resultMaps>
|
|
|
|
<statements>
|
|
|
|
<select id="RECORD_MAIN_SELECT" parameterClass="int" resultMap="SelectResult">
|
|
Select
|
|
record_id,
|
|
plan_code,
|
|
plan_type_code,
|
|
manage_type_code,
|
|
stock_barcode,
|
|
start_position,
|
|
end_position,
|
|
record_operator,
|
|
manage_begin_time,
|
|
manage_end_time,
|
|
manage_confirm_time,
|
|
record_remark,
|
|
MANAGE_STATUS
|
|
From RECORD_MAIN
|
|
</select>
|
|
|
|
<select id="RECORD_MAIN_SELECT_BY_ID" parameterClass="int" extends = "RECORD_MAIN_SELECT" resultMap="SelectResult">
|
|
|
|
<dynamic prepend="WHERE">
|
|
<isParameterPresent>
|
|
record_id=#RECORD_ID#
|
|
</isParameterPresent>
|
|
</dynamic>
|
|
</select>
|
|
|
|
|
|
<select id="RECORD_MAIN_SELECT_BY_PLAN_CODE" parameterClass="int" extends = "RECORD_MAIN_SELECT" resultMap="SelectResult">
|
|
<dynamic prepend="WHERE">
|
|
<isParameterPresent>
|
|
plan_code=#PLAN_CODE#
|
|
</isParameterPresent>
|
|
</dynamic>
|
|
</select>
|
|
|
|
|
|
<insert id="RECORD_MAIN_INSERT" parameterClass="RECORD_MAIN">
|
|
Insert Into RECORD_MAIN (
|
|
plan_code,
|
|
plan_type_code,
|
|
manage_type_code,
|
|
stock_barcode,
|
|
start_position,
|
|
end_position,
|
|
record_operator,
|
|
manage_begin_time,
|
|
manage_end_time,
|
|
manage_confirm_time,
|
|
record_remark,
|
|
MANAGE_STATUS
|
|
)Values(
|
|
#PLAN_CODE#,
|
|
#PLAN_TYPE_CODE#,
|
|
#MANAGE_TYPE_CODE#,
|
|
#STOCK_BARCODE#,
|
|
#START_POSITION#,
|
|
#END_POSITION#,
|
|
#RECORD_OPERATOR#,
|
|
#MANAGE_BEGIN_TIME#,
|
|
#MANAGE_END_TIME#,
|
|
#MANAGE_CONFIRM_TIME#,
|
|
#RECORD_REMARK#,
|
|
#MANAGE_STATUS#
|
|
)
|
|
<selectKey resultClass="int" type="post" property="RECORD_ID">
|
|
select @@IDENTITY as value
|
|
</selectKey>
|
|
</insert>
|
|
|
|
<update id="RECORD_MAIN_UPDATE" parameterClass="RECORD_MAIN">
|
|
Update RECORD_MAIN Set
|
|
plan_code=#PLAN_CODE#,
|
|
plan_type_code=#PLAN_TYPE_CODE#,
|
|
manage_type_code=#MANAGE_TYPE_CODE#,
|
|
stock_barcode=#STOCK_BARCODE#,
|
|
start_position=#START_POSITON#,
|
|
end_position=#END_POSITION#,
|
|
record_operator=#RECORD_OPERATOR#,
|
|
manage_begin_time=#MANAGE_BEGIN_TIME#,
|
|
manage_end_time=#MANAGE_END_TIME#,
|
|
manage_confirm_time=#MANAGE_CONFIRM_TIME#,
|
|
record_remark=#RECORD_REMARK#,
|
|
MANAGE_STATUS=#MANAGE_STATUS#
|
|
<dynamic prepend="WHERE">
|
|
<isParameterPresent>
|
|
record_id=#RECORD_ID#
|
|
</isParameterPresent>
|
|
</dynamic>
|
|
</update>
|
|
|
|
<delete id="RECORD_MAIN_DELETE" parameterClass="int">
|
|
Delete From RECORD_MAIN
|
|
<dynamic prepend="WHERE">
|
|
<isParameterPresent>
|
|
record_id=#RECORD_ID#
|
|
</isParameterPresent>
|
|
</dynamic>
|
|
</delete>
|
|
|
|
</statements>
|
|
</sqlMap>
|