| | |
| | | </set> |
| | | where product_model_id = #{ew.productModelId} and qualitity >= #{ew.qualitity} |
| | | </update> |
| | | |
| | | <select id="pagestockInventory" resultType="com.ruoyi.stock.dto.StockInventoryDto"> |
| | | select si.id, |
| | | si.qualitity, |
| | |
| | | <if test="ew.productName != null and ew.productName !=''"> |
| | | and p.product_name like concat('%',#{ew.productName},'%') |
| | | </if> |
| | | <if test="ew.productModelId != null"> |
| | | and si.product_model_id = #{ew.productModelId} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="listStockInventoryExportData" resultType="com.ruoyi.stock.execl.StockInventoryExportData"> |
| | | select si.qualitity, |
| | | pm.model, |
| | |
| | | </select> |
| | | |
| | | <select id="selectStorageProductCountByDate" resultType="int"> |
| | | SELECT COUNT(*) |
| | | FROM (SELECT create_time |
| | | SELECT SUM(total_count) |
| | | FROM (SELECT COUNT(*) as total_count |
| | | FROM stock_inventory |
| | | WHERE create_time >= #{startDate} |
| | | AND create_time <= #{endDate} |
| | | UNION ALL |
| | | SELECT create_time |
| | | FROM stock_uninventory) combined |
| | | WHERE create_time >= #{startDate} |
| | | AND create_time <= #{endDate} |
| | | SELECT COUNT(*) as total_count |
| | | FROM stock_uninventory |
| | | WHERE create_time >= #{startDate} |
| | | AND create_time <= #{endDate}) AS combined_counts |
| | | </select> |
| | | |
| | | <select id="selectDailyStockInCounts" resultType="java.util.Map"> |