gongchunyi
昨天 973b5221a85660b3b1e026e119256e35e95336ea
src/main/resources/mapper/productionPlan/ProductionPlanMapper.xml
@@ -28,7 +28,6 @@
        <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"/>
@@ -68,17 +67,18 @@
        <if test="c.endDate != null">
            AND pp.end_date &lt;= DATE_FORMAT(#{c.endDate},'%Y-%m-%d')
        </if>
        ORDER BY pp.id DESC
        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
@@ -94,6 +94,10 @@
            <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,
@@ -101,7 +105,8 @@
        sku.specification,
        pp.length,
        pp.width,
        pp.height
        pp.height,
        pm.base_unit
    </select>
    <select id="selectWithMaterialByIds" resultType="com.ruoyi.productionPlan.dto.ProductionPlanDto">