chenlu
2025-08-19 845c72fc9778eaccaa079091142e0a49b1d090be
north-glass-erp/src/main/resources/mapper/mm/FinishedOperateLog.xml
@@ -633,11 +633,12 @@
                                            operator,
                                            quantity,
                                            operate_time,
                                            status
                                            status,
                                            remarks
        )
        values (
                   #{orderDetail.deliveryDetail.deliveryId} ,#{orderDetail.deliveryDetail.orderId},#{orderDetail.deliveryDetail.orderNumber}
                   ,"出库",#{userName},#{orderDetail.deliveryDetail.quantity},now(),"未审核"
                   ,"出库",#{userName},#{orderDetail.deliveryDetail.quantity},now(),"未审核",#{boxNo}
               )
    </insert>
@@ -936,11 +937,11 @@
            ifnull(od.building_number,ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'')) as building_number,
            od.width,
            od.height,
            fol.quantity,
            sum(fol.quantity) as quantity,
            od.product_name,
            od.product_id,
            ROUND( od.width * od.height * fol.quantity / 1000000, 2 ) as area,
            ROUND( od.width * od.height * fol.quantity / 1000000, 2 )*#{thickness}*2.5 as weight
            ROUND(sum(od.width * od.height * fol.quantity / 1000000) , 2 ) as area,
            ROUND(sum(od.width * od.height * fol.quantity / 1000000) , 2 )*#{thickness}*2.5 as weight
        FROM
            ( SELECT * FROM mm.finished_operate_log aa WHERE aa.operate_type = '入库' AND aa.STATUS != '已作废' ) fol
                LEFT JOIN sd.order_detail od ON fol.order_id = od.order_id
@@ -948,8 +949,9 @@
                LEFT JOIN sd.`order` o ON o.order_id = fol.order_id
        WHERE
            o.order_id=#{orderId} and fol.remarks=#{remarks} and od.product_id=#{productId}
        group by od.order_id,od.order_number
        ORDER BY
            fol.operate_time DESC
            od.order_number
    </select>