宜昌华友原料库管理软件
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.

240 lines
7.1 KiB

<?xml version="1.0" encoding="UTF-8" ?>
<sqlMap namespace="WH_CELL" xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<alias>
<typeAlias alias="WH_CELL" type="SiaSun.LMS.Model.WH_CELL, SiaSun.LMS.Model" />
</alias>
<resultMaps>
<resultMap id="SelectResult" class="WH_CELL">
<result property="CELL_ID" column="cell_id" />
<result property="WAREHOUSE_ID" column="warehouse_id" />
<result property="AREA_ID" column="area_id" />
<result property="LOGIC_ID" column="logic_id" />
<result property="CELL_NAME" column="cell_name" />
<result property="CELL_CODE" column="cell_code" />
<result property="CELL_TYPE" column="cell_type" />
<result property="DEVICE_CODE" column="device_code" />
<result property="CELL_Z" column="cell_z" />
<result property="CELL_X" column="cell_x" />
<result property="CELL_Y" column="cell_y" />
<result property="CELL_INOUT" column="cell_inout" />
<result property="CELL_MODEL" column="cell_model" />
<result property="CELL_STATUS" column="cell_status" />
<result property="RUN_STATUS" column="run_status" />
<result property="CELL_FORK_TYPE" column="cell_fork_type" />
<result property="CELL_LOGICAL_NAME" column="cell_logical_name" />
<result property="LANE_WAY" column="lane_way" />
<result property="CELL_GROUP" column="cell_group" />
<result property="CELL_FLAG" column="cell_flag" />
<result property="SHELF_TYPE" column="shelf_type" />
<result property="SHELF_NEIGHBOUR" column="shelf_neighbour" />
<result property="CELL_STORAGE_TYPE" column="cell_storage_type" />
<result property="CELL_WIDTH" column="cell_width" />
<result property="CELL_HEIGHT" column="cell_height" />
<result property="LOCK_CELL_ID" column="lock_cell_id" />
<result property="LOCK_DEVICE_CODE" column="lock_device_code" />
<result property="BELONG_AREA" column="belong_area" />
<result property="BELONG_ZCQ_ID" column="belong_zcq_id" />
</resultMap>
</resultMaps>
<statements>
<select id="WH_CELL_SELECT" parameterClass="int" resultMap="SelectResult">
Select
cell_id,
warehouse_id,
area_id,
logic_id,
cell_name,
cell_code,
cell_type,
device_code,
cell_z,
cell_x,
cell_y,
cell_inout,
cell_model,
cell_status,
run_status,
cell_fork_type,
cell_logical_name,
lane_way,
cell_group,
cell_flag,
shelf_type,
shelf_neighbour,
cell_storage_type,
cell_width,
cell_height,
lock_cell_id,
lock_device_code,
belong_area,
belong_zcq_id
From WH_CELL
</select>
<select id="WH_CELL_SELECT_BY_ID" parameterClass="int" extends = "WH_CELL_SELECT" resultMap="SelectResult">
<dynamic prepend="WHERE">
<isParameterPresent>
cell_id=#CELL_ID#
</isParameterPresent>
</dynamic>
</select>
<select id="WH_CELL_SELECT_BY_AREA_ID_CELL_CODE" parameterClass="Hashtable" extends = "WH_CELL_SELECT" resultMap="SelectResult">
<dynamic prepend="WHERE">
<isParameterPresent>
area_id = #AREA_ID# AND cell_code=#CELL_CODE#
</isParameterPresent>
</dynamic>
</select>
<select id="WH_CELL_SELECT_BY_CELL_CODE" parameterClass="String" extends = "WH_CELL_SELECT" resultMap="SelectResult">
<dynamic prepend="WHERE">
<isParameterPresent>
cell_code=#CELL_CODE#
</isParameterPresent>
</dynamic>
</select>
<select id="WH_CELL_SELECT_BY_WAREHOUSE_ID_CELL_Z" parameterClass="Hashtable" extends = "WH_CELL_SELECT" resultMap="SelectResult">
<dynamic prepend="WHERE">
<isParameterPresent>
warehouse_id=#WAREHOUSE_ID# and cell_z=#CELL_Z# order by cell_x,cell_y
</isParameterPresent>
</dynamic>
</select>
<select id="WH_CELL_SELECT_BY_AREA_ID_CELL_Z" parameterClass="Hashtable" extends = "WH_CELL_SELECT" resultMap="SelectResult">
<dynamic prepend="WHERE">
<isParameterPresent>
area_id = #AREA_ID# AND cell_z=#CELL_Z#
</isParameterPresent>
</dynamic>
</select>
<select id="WH_CELL_SELECT_BY_ALL" parameterClass="Hashtable" extends = "WH_CELL_SELECT" resultMap="SelectResult">
<dynamic prepend="WHERE">
<isParameterPresent>
area_id=#AREA_ID#
</isParameterPresent>
</dynamic>
</select>
<insert id="WH_CELL_INSERT" parameterClass="WH_CELL">
Insert Into WH_CELL (
warehouse_id,
area_id,
logic_id,
cell_name,
cell_code,
cell_type,
device_code,
cell_z,
cell_x,
cell_y,
cell_inout,
cell_model,
cell_status,
run_status,
cell_fork_type,
cell_logical_name,
lane_way,
cell_group,
cell_flag,
shelf_type,
shelf_neighbour,
cell_storage_type,
cell_width,
cell_height,
lock_cell_id,
lock_device_code,
belong_area,
belong_zcq_id
)Values(
#WAREHOUSE_ID#,
#AREA_ID#,
#LOGIC_ID#,
#CELL_NAME#,
#CELL_CODE#,
#CELL_TYPE#,
#DEVICE_CODE#,
#CELL_Z#,
#CELL_X#,
#CELL_Y#,
#CELL_INOUT#,
#CELL_MODEL#,
#CELL_STATUS#,
#RUN_STATUS#,
#CELL_FORK_TYPE#,
#CELL_LOGICAL_NAME#,
#LANE_WAY#,
#CELL_GROUP#,
#CELL_FLAG#,
#SHELF_TYPE#,
#SHELF_NEIGHBOUR#,
#CELL_STORAGE_TYPE#,
#CELL_WIDTH#,
#CELL_HEIGHT#,
#LOCK_CELL_ID#,
#LOCK_DEVICE_CODE#,
#BELONG_AREA#,
#BELONG_ZCQ_ID#
)
<selectKey resultClass="int" type="post" property="CELL_ID">
select @@IDENTITY as value
</selectKey>
</insert>
<update id="WH_CELL_UPDATE" parameterClass="WH_CELL">
Update WH_CELL Set
warehouse_id = #WAREHOUSE_ID#,
area_id=#AREA_ID#,
logic_id=#LOGIC_ID#,
cell_name=#CELL_NAME#,
cell_code=#CELL_CODE#,
cell_type=#CELL_TYPE#,
device_code=#DEVICE_CODE#,
cell_z=#CELL_Z#,
cell_x=#CELL_X#,
cell_y=#CELL_Y#,
cell_inout=#CELL_INOUT#,
cell_model=#CELL_MODEL#,
cell_status=#CELL_STATUS#,
run_status=#RUN_STATUS#,
cell_fork_type=#CELL_FORK_TYPE#,
cell_logical_name=#CELL_LOGICAL_NAME#,
lane_way=#LANE_WAY#,
cell_group=#CELL_GROUP#,
cell_flag=#CELL_FLAG#,
shelf_type=#SHELF_TYPE#,
shelf_neighbour=#SHELF_NEIGHBOUR#,
cell_storage_type=#CELL_STORAGE_TYPE#,
cell_width=#CELL_WIDTH#,
cell_height=#CELL_HEIGHT#,
lock_cell_id=#LOCK_CELL_ID#,
lock_device_code=#LOCK_DEVICE_CODE#,
belong_area=#BELONG_AREA#,
belong_zcq_id=#BELONG_ZCQ_ID#
<dynamic prepend="WHERE">
<isParameterPresent>
cell_id=#CELL_ID#
</isParameterPresent>
</dynamic>
</update>
<delete id="WH_CELL_DELETE" parameterClass="int">
Delete From WH_CELL
<dynamic prepend="WHERE">
<isParameterPresent>
cell_id=#CELL_ID#
</isParameterPresent>
</dynamic>
</delete>
</statements>
</sqlMap>