| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.jeecg.modules.lsw.mapper.LswMaterialInventoryMapper"> |
| | | |
| | | <delete id="deleteByMainId" parameterType="java.lang.String"> |
| | | DELETE |
| | | FROM lsw_material_inventory |
| | | WHERE |
| | | material_id = #{mainId} </delete> |
| | | |
| | | <select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.lsw.entity.LswMaterialInventory"> |
| | | SELECT * |
| | | FROM lsw_material_inventory |
| | | WHERE |
| | | material_id = #{mainId} </select> |
| | | <select id="selectLineSideMaterialInventoryByMaterialNumber" |
| | | resultType="org.jeecg.modules.lsw.vo.LswMaterialInventoryVo"> |
| | | SELECT |
| | |
| | | t1.material_number, |
| | | t1.material_name |
| | | </select> |
| | | <select id="statisticsInventory" resultType="org.jeecg.modules.lsw.vo.MaterialInventoryStatisticsVO"> |
| | | select m1.warehouse_id, m2.warehouse_name, m1.materialQuantity |
| | | from (select warehouse_id, SUM(quantity) as materialQuantity |
| | | from lsw_material_inventory |
| | | where material_id = #{materialId} |
| | | and inventory_status = 'NORMAL' |
| | | group by warehouse_id) m1 |
| | | left join base_line_side_warehouse m2 on m1.warehouse_id = m2.id |
| | | |
| | | </select> |
| | | </mapper> |