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.
173 lines
5.8 KiB
173 lines
5.8 KiB
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<sqlMap namespace="IO_CONTROL" xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
<alias>
|
|
<typeAlias alias="IO_CONTROL" type="SSWMS.Common.IO_CONTROL, SSWMS.Common" />
|
|
</alias>
|
|
<resultMaps>
|
|
<resultMap id="SelectResult" class="IO_CONTROL">
|
|
<result property="CONTROL_ID" column="CONTROL_ID" />
|
|
<result property="RELATIVE_CONTROL_ID" column="RELATIVE_CONTROL_ID" />
|
|
<result property="MANAGE_ID" column="MANAGE_ID" />
|
|
<result property="STOCK_BARCODE" column="STOCK_BARCODE" />
|
|
<result property="PRE_CONTROL_STATUS" column="PRE_CONTROL_STATUS" />
|
|
<result property="CONTROL_TASK_TYPE" column="CONTROL_TASK_TYPE" />
|
|
<result property="CONTROL_TASK_LEVEL" column="CONTROL_TASK_LEVEL" />
|
|
<result property="START_WAREHOUSE_CODE" column="START_WAREHOUSE_CODE" />
|
|
<result property="END_WAREHOUSE_CODE" column="END_WAREHOUSE_CODE" />
|
|
<result property="START_DEVICE_CODE" column="START_DEVICE_CODE" />
|
|
<result property="END_DEVICE_CODE" column="END_DEVICE_CODE" />
|
|
<result property="CONTROL_STATUS" column="CONTROL_STATUS" />
|
|
<result property="ERROR_TEXT" column="ERROR_TEXT" />
|
|
<result property="CONTROL_BEGIN_TIME" column="CONTROL_BEGIN_TIME" />
|
|
<result property="CONTROL_END_TIME" column="CONTROL_END_TIME" />
|
|
<result property="CONTROL_REMARK" column="CONTROL_REMARK" />
|
|
<result property="STOCK_SIZE" column="STOCK_SIZE" />
|
|
<result property="STOCK_HEIGHT" column="STOCK_HEIGHT" />
|
|
<result property="PLAN_CODE" column="PLAN_CODE" />
|
|
</resultMap>
|
|
</resultMaps>
|
|
<statements>
|
|
<select id="IO_CONTROL_SELECT" parameterClass="int" resultMap="SelectResult">
|
|
select
|
|
CONTROL_ID,
|
|
RELATIVE_CONTROL_ID,
|
|
MANAGE_ID,
|
|
STOCK_BARCODE,
|
|
PRE_CONTROL_STATUS,
|
|
CONTROL_TASK_TYPE,
|
|
CONTROL_TASK_LEVEL,
|
|
START_WAREHOUSE_CODE,
|
|
END_WAREHOUSE_CODE,
|
|
START_DEVICE_CODE,
|
|
END_DEVICE_CODE,
|
|
CONTROL_STATUS,
|
|
ERROR_TEXT,
|
|
CONTROL_BEGIN_TIME,
|
|
CONTROL_END_TIME,
|
|
CONTROL_REMARK,
|
|
STOCK_SIZE,
|
|
STOCK_HEIGHT,
|
|
PLAN_CODE
|
|
from IO_CONTROL
|
|
</select>
|
|
<select id="IO_CONTROL_SELECT_BY_ID" parameterClass="int"
|
|
extends="IO_CONTROL_SELECT" resultMap="SelectResult">
|
|
where CONTROL_ID=#CONTROL_ID#
|
|
</select>
|
|
<select id="IO_CONTROL_SELECT_BY_STATUS" parameterClass="int"
|
|
extends="IO_CONTROL_SELECT" resultMap="SelectResult">
|
|
where CONTROL_STATUS<>PRE_CONTROL_STATUS and CONTROL_STATUS>=#CONTROL_STATUS# order by CONTROL_ID
|
|
</select>
|
|
<select id="IO_CONTROL_SELECT_BY_MANAGE_ID" parameterClass="int"
|
|
extends="IO_CONTROL_SELECT" resultMap="SelectResult">
|
|
where MANAGE_ID=#MANAGE_ID#
|
|
</select>
|
|
<select id="IO_CONTROL_SELECT_BY_DEVICE_CODE" parameterClass="Hashtable"
|
|
extends="IO_CONTROL_SELECT" resultMap="SelectResult">
|
|
where START_DEVICE_CODE=#START_DEVICE_CODE# and END_DEVICE_CODE=#END_DEVICE_CODE#
|
|
</select>
|
|
<insert id="IO_CONTROL_INSERT_SQLSERVER" parameterClass="IO_CONTROL">
|
|
insert into IO_CONTROL (
|
|
RELATIVE_CONTROL_ID,
|
|
MANAGE_ID,
|
|
STOCK_BARCODE,
|
|
PRE_CONTROL_STATUS,
|
|
CONTROL_TASK_TYPE,
|
|
CONTROL_TASK_LEVEL,
|
|
START_WAREHOUSE_CODE,
|
|
END_WAREHOUSE_CODE,
|
|
START_DEVICE_CODE,
|
|
END_DEVICE_CODE,
|
|
CONTROL_STATUS,
|
|
ERROR_TEXT,
|
|
CONTROL_BEGIN_TIME,
|
|
CONTROL_END_TIME,
|
|
CONTROL_REMARK,
|
|
STOCK_SIZE,
|
|
STOCK_HEIGHT,
|
|
PLAN_CODE
|
|
)values(
|
|
#RELATIVE_CONTROL_ID#,
|
|
#MANAGE_ID#,
|
|
#STOCK_BARCODE#,
|
|
#PRE_CONTROL_STATUS#,
|
|
#CONTROL_TASK_TYPE#,
|
|
#CONTROL_TASK_LEVEL#,
|
|
#START_WAREHOUSE_CODE#,
|
|
#END_WAREHOUSE_CODE#,
|
|
#START_DEVICE_CODE#,
|
|
#END_DEVICE_CODE#,
|
|
#CONTROL_STATUS#,
|
|
#ERROR_TEXT#,
|
|
#CONTROL_BEGIN_TIME#,
|
|
#CONTROL_END_TIME#,
|
|
#CONTROL_REMARK#,
|
|
#STOCK_SIZE#,
|
|
#STOCK_HEIGHT#,
|
|
#PLAN_CODE#
|
|
)
|
|
<selectKey resultClass="int" type="post" property="CONTROL_ID">
|
|
select @@IDENTITY as value
|
|
</selectKey>
|
|
</insert>
|
|
<insert id="IO_CONTROL_INSERT_ORACLE" parameterClass="IO_CONTROL">
|
|
insert into IO_CONTROL (
|
|
CONTROL_ID,
|
|
RELATIVE_CONTROL_ID,
|
|
MANAGE_ID,
|
|
STOCK_BARCODE,
|
|
PRE_CONTROL_STATUS,
|
|
CONTROL_TASK_TYPE,
|
|
CONTROL_TASK_LEVEL,
|
|
START_WAREHOUSE_CODE,
|
|
END_WAREHOUSE_CODE,
|
|
START_DEVICE_CODE,
|
|
END_DEVICE_CODE,
|
|
CONTROL_STATUS,
|
|
ERROR_TEXT,
|
|
CONTROL_BEGIN_TIME,
|
|
CONTROL_END_TIME,
|
|
CONTROL_REMARK,
|
|
STOCK_SIZE,
|
|
STOCK_HEIGHT,
|
|
PLAN_CODE
|
|
)values(
|
|
#CONTROL_ID#,
|
|
#RELATIVE_CONTROL_ID#,
|
|
#MANAGE_ID#,
|
|
#STOCK_BARCODE#,
|
|
#PRE_CONTROL_STATUS#,
|
|
#CONTROL_TASK_TYPE#,
|
|
#CONTROL_TASK_LEVEL#,
|
|
#START_WAREHOUSE_CODE#,
|
|
#END_WAREHOUSE_CODE#,
|
|
#START_DEVICE_CODE#,
|
|
#END_DEVICE_CODE#,
|
|
#CONTROL_STATUS#,
|
|
#ERROR_TEXT#,
|
|
#CONTROL_BEGIN_TIME#,
|
|
#CONTROL_END_TIME#,
|
|
#CONTROL_REMARK#,
|
|
#STOCK_SIZE#,
|
|
#STOCK_HEIGHT#,
|
|
#PLAN_CODE#
|
|
)
|
|
<selectKey resultClass="int" type="pre" property="CONTROL_ID">
|
|
select IO_CONTROL_SEQ.nextval as value from DUAL
|
|
</selectKey>
|
|
</insert>
|
|
<update id="IO_CONTROL_UPDATE" parameterClass="IO_CONTROL">
|
|
update IO_CONTROL set
|
|
PRE_CONTROL_STATUS=#PRE_CONTROL_STATUS#
|
|
where CONTROL_ID=#CONTROL_ID#
|
|
</update>
|
|
<delete id="IO_CONTROL_DELETE" parameterClass="int">
|
|
delete from IO_CONTROL
|
|
where CONTROL_ID=#CONTROL_ID#
|
|
</delete>
|
|
<delete id="IO_CONTROL_DELETE_BY_MANAGE_ID" parameterClass="int">
|
|
delete from IO_CONTROL
|
|
where MANAGE_ID=#MANAGE_ID#
|
|
</delete>
|
|
</statements>
|
|
</sqlMap>
|