| Line 193... |
Line 193... |
| 193 |
ON x.itemId = y.itemId
|
193 |
ON x.itemId = y.itemId
|
| 194 |
JOIN catalog.item ci ON ci.id = x.itemId
|
194 |
JOIN catalog.item ci ON ci.id = x.itemId
|
| 195 |
where ci.type = 'NON_SERIALIZED' having quantity>0
|
195 |
where ci.type = 'NON_SERIALIZED' having quantity>0
|
| 196 |
</select>
|
196 |
</select>
|
| 197 |
|
197 |
|
| 198 |
<select id = "getMovementSerializedInventoryByScans" resultType = "inventoryMovement" parameterType = "map">
|
198 |
<!-- select id = "getMovementSerializedInventoryByScans" resultType = "inventoryMovement" parameterType = "map">
|
| 199 |
select itemId, brand, model_name as modelName, model_number as modelNumber, color, s.type, count(*) as quantity
|
199 |
select itemId, brand, model_name as modelName, model_number as modelNumber, color, s.type, count(*) as quantity
|
| 200 |
FROM inventoryItem i JOIN scanNew s ON i.id = s.inventoryItemId
|
200 |
FROM inventoryItem i JOIN scanNew s ON i.id = s.inventoryItemId
|
| 201 |
LEFT JOIN catalog.item c ON i.itemId = c.id
|
201 |
LEFT JOIN catalog.item c ON i.itemId = c.id
|
| 202 |
where s.scannedAt between #{startDate} and #{endDate} and c.type = 'SERIALIZED'
|
202 |
where s.scannedAt between #{startDate} and #{endDate} and c.type = 'SERIALIZED'
|
| 203 |
group by itemId, s.type
|
203 |
group by itemId, s.type
|
| Line 207... |
Line 207... |
| 207 |
select itemId, brand, model_name as modelName, model_number as modelNumber, color, s.type, count(*) as quantity
|
207 |
select itemId, brand, model_name as modelName, model_number as modelNumber, color, s.type, count(*) as quantity
|
| 208 |
FROM inventoryItem i JOIN scanNew s ON i.id = s.inventoryItemId
|
208 |
FROM inventoryItem i JOIN scanNew s ON i.id = s.inventoryItemId
|
| 209 |
LEFT JOIN catalog.item c ON i.itemId = c.id
|
209 |
LEFT JOIN catalog.item c ON i.itemId = c.id
|
| 210 |
where s.scannedAt between #{startDate} and #{endDate} and c.type = 'NON_SERIALIZED'
|
210 |
where s.scannedAt between #{startDate} and #{endDate} and c.type = 'NON_SERIALIZED'
|
| 211 |
group by itemId, s.type
|
211 |
group by itemId, s.type
|
| 212 |
</select>
|
212 |
</select-->
|
| 213 |
|
213 |
|
| 214 |
</mapper>
|
214 |
</mapper>
|