廖井涛
2025-10-15 ce06fcc3113dc45647910deef0e4adeaa97bfa3f
north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -64,6 +64,7 @@
        <result column="glass_child" property="glassChild"/>
        <result column="process_id" property="processId"/>
        <result column="code" property="code"/>
        <result column="responsible_personnel" property="responsiblePersonnel"/>
    </resultMap>
@@ -261,6 +262,7 @@
               dd.responsible_team,
               dd.breakage_type,
               dd.breakage_reason,
               dd.responsible_personnel,
               ROUND((dd.breakage_quantity))                                                   as breakage_quantity,
               round(ogd.child_width * ogd.child_height * (dd.breakage_quantity) / 1000000, 2) as area,
               rw.this_process,
@@ -310,6 +312,9 @@
        <if test="crossProcessBreakingDTO.orderId != null and crossProcessBreakingDTO.orderId != ''">
            and o.order_id regexp #{crossProcessBreakingDTO.orderId}
        </if>
        <if test="crossProcessBreakingDTO.responsiblePersonnel != null and crossProcessBreakingDTO.responsiblePersonnel != ''">
            and dd.responsible_personnel regexp #{crossProcessBreakingDTO.responsiblePersonnel}
        </if>
        GROUP BY dd.id
        order by dd.id desc
        limit #{offset},#{pageSize}
@@ -358,6 +363,9 @@
        </if>
        <if test="crossProcessBreakingDTO.orderId != null and crossProcessBreakingDTO.orderId != ''">
            and o.order_id regexp #{crossProcessBreakingDTO.orderId}
        </if>
        <if test="crossProcessBreakingDTO.responsiblePersonnel != null and crossProcessBreakingDTO.responsiblePersonnel != ''">
            and dd.responsible_personnel regexp #{crossProcessBreakingDTO.responsiblePersonnel}
        </if>
        order by dd.id desc
    </select>
@@ -3268,7 +3276,7 @@
        SUM(completeArea) as completeArea,
        SUM(incompleteNum) as incompleteNum,
        SUM(incompleteArea) as incompleteArea,
        hz.product_name
        hz.glass_child
        from (
        select DATE(o.create_time)                                                  as create_time,
        DATE(o.delivery_date)                                                as delivery_date,
@@ -3317,23 +3325,10 @@
          and position(#{inputProject} in o.project)
        and GREATEST(fc.quantity - odpd.reporting_work_num, 0)>0
        and fc.quantity-ifnull(fc.termination_quantity,0)>0
        <choose>
            <when test="laminating != null and laminating == 'stepC'">
                GROUP BY fc.process_id, fc.order_number, ogd.`group`
            </when>
            <when test="laminating != null and laminating == 'stepD'">
                GROUP BY fc.process_id, fc.order_number
            </when>
            <when test="laminating != null and laminating == 'stepB'">
                GROUP BY fc.process_id, fc.order_number
            </when>
            <otherwise>
                GROUP BY fc.process_id, fc.order_number, fc.technology_number
            </otherwise>
        </choose>
        GROUP BY fc.process_id, fc.order_number, fc.technology_number
        order by fc.process_id, fc.order_number, fc.technology_number
        ) as hz
        GROUP BY hz.project,hz.batch,product_name
        GROUP BY hz.project,hz.batch,glass_child
    </select>