SnapshotInventoryHeaderMapper.xml
3.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?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>