SnapshotInventoryHeaderMapper.xml 3.94 KB
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.huaheng.pc.inventory.snapshotInventoryHeader.mapper.SnapshotInventoryHeaderMapper">

    <resultMap type="com.huaheng.pc.inventory.snapshotInventoryHeader.domain.SnapshotInventoryHeader"
               id="snapshotInventoryHeaderResult">
        <result property="id" column="id"/>
        <result property="warehouseCode" column="warehouseCode"/>
        <result property="zoneCode" column="zoneCode"/>
        <result property="locationCode" column="locationCode"/>
        <result property="containerCode" column="containerCode"/>
        <result property="containerStatus" column="containerStatus"/>
        <result property="companyCode" column="companyCode"/>
        <result property="materialSkuQty" column="materialSkuQty"/>
        <result property="totalWeight" column="totalWeight"/>
        <result property="totalQty" column="totalQty"/>
        <result property="totalLines" column="totalLines"/>
        <result property="projectNos" column="projectNos"/>
        <result property="batchs" column="batchs"/>
        <result property="lots" column="lots"/>
        <result property="locking" column="locking"/>
        <result property="lockRemark" column="lockRemark"/>
        <result property="enable" column="enable"/>
        <result property="created" column="created"/>
        <result property="createdBy" column="createdBy"/>
        <result property="lastUpdated" column="lastUpdated"/>
        <result property="lastUpdatedBy" column="lastUpdatedBy"/>
        <result property="version" column="version"/>
        <result property="userDef1" column="userDef1"/>
        <result property="userDef2" column="userDef2"/>
        <result property="userDef3" column="userDef3"/>
    </resultMap>
    <sql id="selectsnapshotInventoryHeaderVo">
        select id,
               warehouseCode,
               zoneCode,
               locationCode,
               containerCode,
               containerStatus,
               companyCode,
               materialSkuQty,
               totalWeight,
               totalQty,
               totalLines,
               projectNos,
               batchs,
               lots,
               locking,
               lockRemark,
               enable,
               created,
               createdBy,
               lastUpdated,
               lastUpdatedBy,
               version,
               userDef1,
               userDef2,
               userDef3
        from snapshot_inventory_header
    </sql>
    <insert id="insertAll">
        INSERT INTO snapshot_inventory_header(warehouseCode, zoneCode, locationCode, containerCode, containerStatus,
                                              companyCode, materialSkuQty, totalWeight, totalQty, totalLines,
                                              projectNos, batchs, lots, locking, lockRemark, enable, createdBy,
                                              lastUpdatedBy,version,userDef1,userDef2,userDef3)
        select warehouseCode,
               zoneCode,
               locationCode,
               containerCode,
               containerStatus,
               companyCode,
               materialSkuQty,
               totalWeight,
               totalQty,
               totalLines,
               projectNos,
               batchs,
               lots,
               locking,
               lockRemark,
               enable,
               createdBy,
               lastUpdatedBy,version,userDef1,userDef2,userDef3
        from inventory_header
    </insert>
    <delete id="deleteSnapshot">
        delete from snapshot_inventory_header where id not in ( SELECT id FROM inventory_header )
    </delete>
    <select id="getAll"
            resultType="com.huaheng.pc.inventory.snapshotInventoryHeader.domain.SnapshotInventoryHeader">
        select *
        from snapshot_inventory_header
    </select>

</mapper>