廖井涛
2024-09-05 8b2c74fb6842e8af60f70e7df6eef8837d74be07
north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -50,20 +50,19 @@
    </resultMap>
    <resultMap id="damageDetailsTableMap" type="com.example.erp.entity.pp.DamageDetails">
    <resultMap id="damageDetailsTableMap" type="com.example.erp.dto.pp.CrossProcessBreakingDTO">
        <result column="responsible_process" property="responsibleProcess"/>
        <result column="responsible_team" property="responsibleTeam"/>
        <result column="breakage_type" property="breakageType"/>
        <result column="breakage_reason" property="breakageReason"/>
        <result column="breakage_quantity" property="breakageQuantity"/>
        <result column="area" property="area"/>
        <result column="reporting_work_id" property="reportingWork.reportingWorkId"/>
        <result column="reporting_work_time" property="reportingWork.reportingWorkTime"/>
        <result column="this_process" property="reportingWork.thisProcess"/>
        <result column="project" property="order.project"/>
        <result column="order_id" property="order.orderId"/>
        <result column="glass_child" property="orderGlassDetail.glassChild"/>
        <result column="process_id" property="reportingWork.processId"/>
        <result column="reporting_work_time" property="reportingWorkTime"/>
        <result column="this_process" property="thisProcess"/>
        <result column="project" property="project"/>
        <result column="order_id" property="orderId"/>
        <result column="glass_child" property="glassChild"/>
        <result column="process_id" property="processId"/>
        <result column="code" property="code"/>
    </resultMap>
@@ -237,6 +236,21 @@
          and dd.available = 0
          and reviewed_state != 2
          and rw.this_process != dd.responsible_process
        <if test="crossProcessBreakingDTO.code != null and crossProcessBreakingDTO.code != ''">
            and JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) regexp #{crossProcessBreakingDTO.code}
        </if>
        <if test="crossProcessBreakingDTO.processId != null and crossProcessBreakingDTO.processId != ''">
            and rw.process_id regexp #{crossProcessBreakingDTO.processId}
        </if>
        <if test="crossProcessBreakingDTO.thisProcess != null and crossProcessBreakingDTO.thisProcess != ''">
            and rw.this_process regexp #{crossProcessBreakingDTO.thisProcess}
        </if>
        <if test="crossProcessBreakingDTO.responsibleProcess != null and crossProcessBreakingDTO.responsibleProcess != ''">
            and dd.responsible_process regexp #{crossProcessBreakingDTO.responsibleProcess}
        </if>
        <if test="crossProcessBreakingDTO.responsibleTeam != null and crossProcessBreakingDTO.responsibleTeam != ''">
            and dd.responsible_team regexp #{crossProcessBreakingDTO.responsibleTeam}
        </if>
        GROUP BY dd.id
        order by dd.id desc
        limit #{offset},#{pageSize}