| | |
| | | FROM lsw_material_inventory |
| | | WHERE |
| | | material_id = #{mainId} </select> |
| | | <select id="selectLineSideMaterialInventoryByMaterialNumber" |
| | | resultType="org.jeecg.modules.lsw.vo.LswMaterialInventoryVo"> |
| | | SELECT |
| | | t1.material_number materialNumber, |
| | | t1.material_name materialName, |
| | | SUM(t2.quantity) AS stockQuantity |
| | | FROM lsw_material t1 |
| | | INNER JOIN lsw_material_inventory t2 ON t1.id = t2.material_id |
| | | WHERE t1.material_number IN |
| | | <foreach collection="materialNumberList" item="item" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | AND t2.warehouse_id = #{factoryId} |
| | | AND t1.del_flag = 0 |
| | | GROUP BY |
| | | t1.material_number, |
| | | t1.material_name |
| | | </select> |
| | | </mapper> |