| | |
| | | |
| | | |
| | | </resultMap> |
| | | <select id="defaultfinishedGoodsInventory" resultMap="selectFinishedGoodsInventory"> |
| | | <select id="defaultfinishedGoods" resultMap="selectFinishedGoodsInventory"> |
| | | select od.order_number, |
| | | o.order_id, |
| | | o.project, |
| | |
| | | from finished_goods_inventory fgi |
| | | left join sd.order_detail od on fgi.order_number = od.order_number |
| | | inner join sd.`order` o on fgi.order_id = o.order_id |
| | | <where> |
| | | <if test="finishedGoodsInventory.orderDetail.width != null and finishedGoodsInventory.orderDetail.width != ''"> |
| | | and od.width regexp #{finishedGoodsInventory.orderDetail.width} |
| | | </if> |
| | | |
| | | </where> |
| | | order by fgi.id |
| | | |
| | | limit #{offset},#{pageSize} |
| | | ; |
| | | </select> |
| | | |
| | | |
| | | <select id="getPageTotal" > |
| | | select |
| | | CEILING(count(fgi.id)/#{pageSize}) |
| | | from finished_goods_inventory fgi |
| | | left join sd.order_detail od on fgi.order_number = od.order_number |
| | | inner join sd.`order` o on fgi.order_id = o.order_id |
| | | <where> |
| | | <if test="finishedGoodsInventory.orderDetail.width != null and finishedGoodsInventory.orderDetail.width != ''"> |
| | | and od.width regexp #{finishedGoodsInventory.orderDetail.width} |
| | | </if> |
| | | |
| | | </where> |
| | | |
| | | order by fgi.id desc |
| | | limit #{offset},#{pageSize} |
| | | ; |
| | | </select> |
| | | |
| | | </mapper> |