| | |
| | | (select cell_id, count(*) num from warehouse_history group by cell_id) a on cell_id = wc.id |
| | | where num is null |
| | | or num % 2 = 0 |
| | | and state=1 |
| | | order by id, sId, crow, ccol |
| | | </select> |
| | | |
| | | <select id="selectWarehouseListAll" resultMap="Warehouse"> |
| | | select w.id, |
| | | w.name, |
| | | ws.id sId, |
| | | ws.name sName, |
| | | ws.row, |
| | | ws.col, |
| | | wc.id cId, |
| | | wc.row crow, |
| | | wc.col ccol |
| | | from warehouse w |
| | | left join warehouse_shelf ws on w.id = ws.warehouse_id |
| | | left join warehouse_cell wc on shelf_id = ws.id |
| | | where |
| | | state=1 |
| | | order by id, sId, crow, ccol |
| | | </select> |
| | | </mapper> |