| | |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | |
| | | <select id="selectProductModelIdByName" resultType="java.lang.String" parameterType="java.lang.Long"> |
| | | select pm.product_name |
| | | <select id="selectProductByModelId" resultType="com.ruoyi.production.dto.ProductMaterialSkuDto" |
| | | parameterType="java.lang.Long"> |
| | | select pm.product_name as productName, |
| | | pm.unit, |
| | | pms.material_code as materialCode, |
| | | pms.model |
| | | from product_material pm |
| | | left join product_material_sku pms on pms.product_id = pm.id |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectProductByProductMainId" resultType="com.ruoyi.production.dto.ProductMaterialSkuDto" |
| | | parameterType="java.lang.Long"> |
| | | select |
| | | pm.product_name as productName, |
| | | pm.unit, |
| | | pms.material_code as materialCode, |
| | | pms.model |
| | | from product_order po |
| | | left join product_order_plan pop on po.id = pop.product_order_id |
| | | left join production_plan pp on pp.id = pop.production_plan_id |
| | | left join product_material_sku pms on pms.id = pop.production_plan_id |
| | | left join product_material pm on pm.id = pms.product_id |
| | | <where> |
| | | <choose> |
| | | <when test="productOrderId != null"> |
| | | po.id = #{productOrderId} |
| | | </when> |
| | | <otherwise> |
| | | 1 = 0 |
| | | </otherwise> |
| | | </choose> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | </mapper> |