SnapshotInventoryDetailMapper.xml
6.14 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<?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.snapshotInventoryDetail.mapper.SnapshotInventoryDetailMapper">
<resultMap type="com.huaheng.pc.inventory.snapshotInventoryDetail.domain.SnapshotInventoryDetail"
id="snapshotInventoryDetailResult">
<result property="id" column="id"/>
<result property="inventoryHeaderId" column="inventoryHeaderId"/>
<result property="warehouseCode" column="warehouseCode"/>
<result property="zoneCode" column="zoneCode"/>
<result property="companyCode" column="companyCode"/>
<result property="locationCode" column="locationCode"/>
<result property="containerCode" column="containerCode"/>
<result property="materialName" column="materialName"/>
<result property="materialCode" column="materialCode"/>
<result property="materialSpec" column="materialSpec"/>
<result property="materialUnit" column="materialUnit"/>
<result property="qty" column="qty"/>
<result property="taskQty" column="taskQty"/>
<result property="receiptCode" column="receiptCode"/>
<result property="receiptDetailId" column="receiptDetailId"/>
<result property="inventorySts" column="inventorySts"/>
<result property="supplierCode" column="supplierCode"/>
<result property="referCode" column="referCode"/>
<result property="referDetailId" column="referDetailId"/>
<result property="batch" column="batch"/>
<result property="lot" column="lot"/>
<result property="projectNo" column="projectNo"/>
<result property="qcCheck" column="qcCheck"/>
<result property="weight" column="weight"/>
<result property="manufactureDate" column="manufactureDate"/>
<result property="expirationDate" column="expirationDate"/>
<result property="agingDate" column="agingDate"/>
<result property="attributeId" column="attributeId"/>
<result property="attribute1" column="attribute1"/>
<result property="attribute2" column="attribute2"/>
<result property="attribute3" column="attribute3"/>
<result property="lockCode" column="lockCode"/>
<result property="lastCycleCountDate" column="lastCycleCountDate"/>
<result property="created" column="created"/>
<result property="createdBy" column="createdBy"/>
<result property="lastUpdated" column="lastUpdated"/>
<result property="lastUpdatedBy" column="lastUpdatedBy"/>
<result property="userDef1" column="userDef1"/>
<result property="userDef2" column="userDef2"/>
<result property="userDef3" column="userDef3"/>
<result property="processStamp" column="processStamp"/>
<result property="level" column="level"/>
</resultMap>
<sql id="selectsnapshotInventoryDetailVo">
select id,
inventoryHeaderId,
warehouseCode,
zoneCode,
companyCode,
locationCode,
containerCode,
materialName,
materialCode,
materialSpec,
materialUnit,
qty,
taskQty,
receiptCode,
receiptDetailId,
inventorySts,
supplierCode,
referCode,
referDetailId,
batch,
lot,
projectNo,
qcCheck,
weight,
manufactureDate,
expirationDate,
agingDate,
attributeId,
attribute1,
attribute2,
attribute3,
lockCode,
lastCycleCountDate,
created,
createdBy,
lastUpdated,
lastUpdatedBy,
userDef1,
userDef2,
userDef3,
processStamp,
level
from snapshot_inventory_detail
</sql>
<insert id="insertAll">
INSERT INTO snapshot_inventory_detail(inventoryHeaderId, warehouseCode, zoneCode, companyCode, locationCode,
containerCode, materialName, materialCode, materialSpec, materialUnit,
qty, taskQty, receiptCode, receiptDetailId, inventorySts, supplierCode,
referCode, referDetailId, batch, lot, projectNo, qcCheck, weight,
manufactureDate, expirationDate, agingDate, attributeId, attribute1,
attribute2, attribute3, lockCode, lastCycleCountDate, createdBy,
lastUpdatedBy, userDef1, userDef2, userDef3, processStamp, level)
SELECT inventoryHeaderId,
warehouseCode,
zoneCode,
companyCode,
locationCode,
containerCode,
materialName,
materialCode,
materialSpec,
materialUnit,
qty,
taskQty,
receiptCode,
receiptDetailId,
inventorySts,
supplierCode,
referCode,
referDetailId,
batch,
lot,
projectNo,
qcCheck,
weight,
manufactureDate,
expirationDate,
agingDate,
attributeId,
attribute1,
attribute2,
attribute3,
lockCode,
lastCycleCountDate,
createdBy,
lastUpdatedBy,
userDef1,
userDef2,
userDef3,
processStamp,
level
FROM inventory_detail
</insert>
<delete id="deleteSnapshot">
delete from snapshot_inventory_detail where id not in ( SELECT id FROM inventory_detail )
</delete>
</mapper>