| | |
| | | <result property="applyNo" column="apply_no"/> |
| | | <result property="customerName" column="customer_name"/> |
| | | <result property="materialCode" column="material_code"/> |
| | | <result property="productMaterialId" column="product_material_id"/> |
| | | <result property="productName" column="product_name"/> |
| | | <result property="productSpec" column="product_spec"/> |
| | | <result property="length" column="length"/> |
| | |
| | | |
| | | |
| | | <select id="listPage" resultType="com.ruoyi.productionPlan.dto.ProductionPlanDto"> |
| | | SELECT * |
| | | SELECT |
| | | pp.*, |
| | | pm.product_name, |
| | | pm.specification, |
| | | pm.material_code, |
| | | pm.base_unit |
| | | FROM production_plan pp |
| | | left join product_material pm on pp.product_material_id = pm.id |
| | | WHERE 1 = 1 |
| | | <if test="c.customerName != null and c.customerName != '' "> |
| | | AND pp.customer_name LIKE CONCAT('%',#{c.customerName},'%') |
| | | </if> |
| | | <if test="c.productName != null and c.productName != '' "> |
| | | AND pp.product_name LIKE CONCAT('%',#{c.productName},'%') |
| | | AND pm.product_name LIKE CONCAT('%',#{c.productName},'%') |
| | | </if> |
| | | <if test="c.productSpec != null and c.productSpec != '' "> |
| | | AND pp.product_spec LIKE CONCAT('%',#{c.productSpec},'%') |
| | | <if test="c.specification != null and c.specification != '' "> |
| | | AND pm.specification LIKE CONCAT('%',#{c.specification},'%') |
| | | </if> |
| | | <if test="c.materialCode != null and c.materialCode != '' "> |
| | | AND pp.material_code LIKE CONCAT('%',#{c.materialCode},'%') |
| | | AND pm.material_code LIKE CONCAT('%',#{c.materialCode},'%') |
| | | </if> |
| | | <if test="c.startDate != null"> |
| | | AND pp.start_date >= DATE_FORMAT(#{c.startDate},'%Y-%m-%d') |
| | | </if> |
| | | <if test="c.endDate != null"> |
| | | AND pp.end_date <= DATE_FORMAT(#{c.endDate},'%Y-%m-%d') |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | height |
| | | </select> |
| | | |
| | | <select id="selectWithMaterialByIds" resultType="com.ruoyi.productionPlan.dto.ProductionPlanDto"> |
| | | SELECT |
| | | pp.*, |
| | | pm.product_name, |
| | | pm.specification, |
| | | pm.material_code, |
| | | pm.base_unit |
| | | FROM production_plan pp |
| | | LEFT JOIN product_material pm ON pp.product_material_id = pm.id |
| | | WHERE pp.id IN |
| | | <foreach collection="ids" item="id" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | ORDER BY pp.id ASC |
| | | </select> |
| | | </mapper> |