| 对比新文件 |
| | |
| | | <?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="com.ruoyi.production.mapper.ProductionBomStructureMapper"> |
| | | |
| | | <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.production.pojo.ProductionBomStructure"> |
| | | <id column="id" property="id" /> |
| | | <result column="parent_id" property="parentId" /> |
| | | <result column="production_order_id" property="productionOrderId" /> |
| | | <result column="product_model_id" property="productModelId" /> |
| | | <result column="technology_operation_id" property="technologyOperationId" /> |
| | | <result column="production_order_bom_id" property="productionOrderBomId" /> |
| | | <result column="unit_quantity" property="unitQuantity" /> |
| | | <result column="demanded_quantity" property="demandedQuantity" /> |
| | | <result column="unit" property="unit" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="dept_id" property="deptId" /> |
| | | </resultMap> |
| | | |
| | | <select id="listByBomId" resultType="com.ruoyi.production.bean.vo.ProductionBomStructureVo"> |
| | | select pbs.*, |
| | | p.product_name as productName, |
| | | pm.product_id as productId, |
| | | pm.model, |
| | | top1.name as operationName |
| | | from production_bom_structure pbs |
| | | left join product_model pm on pbs.product_model_id = pm.id |
| | | left join product p on pm.product_id = p.id |
| | | left join technology_operation top1 on pbs.technology_operation_id = top1.id |
| | | where pbs.production_order_bom_id = #{bomId} |
| | | order by pbs.id |
| | | </select> |
| | | |
| | | <select id="pickByBomId" resultType="com.ruoyi.production.bean.vo.ProductionBomStructureVo"> |
| | | SELECT |
| | | pbs.*, |
| | | p.product_name AS productName, |
| | | pm.product_id AS productId, |
| | | pm.model, |
| | | top1.NAME AS operationName |
| | | FROM |
| | | production_bom_structure pbs |
| | | LEFT JOIN product_model pm ON pbs.product_model_id = pm.id |
| | | LEFT JOIN product p ON pm.product_id = p.id |
| | | LEFT JOIN technology_operation top1 ON pbs.technology_operation_id = top1.id |
| | | WHERE |
| | | pbs.parent_id IS NOT NULL |
| | | AND pbs.production_order_bom_id = #{bomId} |
| | | ORDER BY |
| | | pbs.id |
| | | </select> |
| | | |
| | | </mapper> |