| | |
| | | ms.json |
| | | from mm.material_inventory mi left join mm.material_store ms on mi.material_code=ms.id |
| | | <where> |
| | | date(mi.create_time)>=#{startDate} and date(mi.create_time) <= #{endDate} and mi.available_quantity>0 |
| | | and mi.available_quantity>0 |
| | | |
| | | </where> |
| | | order by mi.id desc |
| | |
| | | from |
| | | mm.material_inventory mi |
| | | <where> |
| | | date(mi.create_time)>=#{startDate} and date(mi.create_time) <= #{endDate} and mi.available_quantity>0 |
| | | and mi.available_quantity>0 |
| | | |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | |
| | | </delete> |
| | | |
| | | <select id="getMaximum" > |
| | | select count(*) from mm.material_outbound where date(create_time)=CURDATE() |
| | | select |
| | | ifnull(SUBSTR(max(right(material_outbound_id,8)) from 7),0) |
| | | from |
| | | mm.material_outbound as a |
| | | where |
| | | date(a.create_time) = curdate() |
| | | |
| | | </select> |
| | | |
| | | <select id="getMaximums" > |
| | | select count(*) from mm.returning_warehouse where date(create_time)=CURDATE() |
| | | select |
| | | ifnull(SUBSTR(max(right(returning_id,8)) from 7),0) |
| | | from |
| | | mm.returning_warehouse as a |
| | | where |
| | | date(a.create_time) = curdate() |
| | | |
| | | </select> |
| | | |
| | | <select id="getMaterialOutboundCount" > |
| | |
| | | |
| | | </select> |
| | | |
| | | <select id="deleteMaterialInventory"> |
| | | delete from |
| | | mm.material_inventory mi |
| | | <where> |
| | | <if test="ids != null and ids != ''"> |
| | | and mi.id in |
| | | <foreach item="id" collection="ids" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | </mapper> |