| | |
| | | <result property="modifierName" column="modifier_name"/> |
| | | <result property="formCreatedTime" column="form_created_time"/> |
| | | <result property="formModifiedTime" column="form_modified_time"/> |
| | | <result property="dataSyncType" column="data_sync_type"/> |
| | | <result property="dataSourceType" column="data_source_type"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | |
| | | <if test="c.specification != null and c.specification != '' "> |
| | | AND pms.specification LIKE CONCAT('%',#{c.specification},'%') |
| | | </if> |
| | | <if test="c.applyNo != null and c.applyNo != '' "> |
| | | AND pp.apply_no LIKE CONCAT('%',#{c.applyNo},'%') |
| | | </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> |
| | | ORDER BY COALESCE(pp.form_modified_time, pp.id) DESC |
| | | </select> |
| | | |
| | | <select id="selectSummaryByProductType" resultType="com.ruoyi.productionPlan.dto.ProductionPlanSummaryDto"> |
| | | SELECT |
| | | sku.material_code, |
| | | pm.material_name AS product_name, |
| | | sku.specification AS product_spec, |
| | | sku.material_code AS materialCode, |
| | | pm.material_name AS productName, |
| | | sku.specification AS specification, |
| | | pp.length, |
| | | pp.width, |
| | | pp.height, |
| | | pm.base_unit AS baseUnit, |
| | | COALESCE(SUM(pp.quantity),0) AS quantity, |
| | | COALESCE(SUM(pp.volume),0) AS volume |
| | | FROM production_plan pp |
| | |
| | | <if test="productName != null and productName != ''"> |
| | | AND pm.material_name LIKE CONCAT('%', #{productName}, '%') |
| | | </if> |
| | | |
| | | <if test="specification != null and specification != ''"> |
| | | AND sku.specification LIKE CONCAT('%', #{specification}, '%') |
| | | </if> |
| | | </where> |
| | | GROUP BY |
| | | sku.material_code, |
| | |
| | | sku.specification, |
| | | pp.length, |
| | | pp.width, |
| | | pp.height |
| | | pp.height, |
| | | pm.base_unit |
| | | </select> |
| | | |
| | | <select id="selectWithMaterialByIds" resultType="com.ruoyi.productionPlan.dto.ProductionPlanDto"> |