guoyujie
2025-11-17 613e4e92157dd697629dbad17fd091ae37637bc7
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -543,11 +543,11 @@
                rwd.wornArea
        # (IF(rw.reviewed_state = 0, '未审核', IF(rw.reviewed_state = 1, '审核通过', '审核不通过'))) as reviewed_state
        from
            reporting_work as rw
            pp.reporting_work as rw
    left join (
    SELECT cc.reporting_work_id,cc.goup,round(sum(cc.completedArea),2)  as completedArea ,round(sum(cc.wornArea),2)  as wornArea from  (SELECT rwds.reporting_work_id, GROUP_CONCAT(distinct rwds.technology_number SEPARATOR '') as goup,
    sum(rwds.child_width*rwds.child_height*completed_quantity/1000000)as completedArea,
    sum(rwds.child_width*rwds.child_height*rwds.breakage_quantity/1000000) as wornArea  from reporting_work_detail as rwds GROUP BY rwds.reporting_work_id,order_number ) as cc GROUP BY cc.reporting_work_id)as rwd on rw.reporting_work_id=rwd.reporting_work_id
    sum(rwds.child_width*rwds.child_height*rwds.breakage_quantity/1000000) as wornArea  from pp.reporting_work_detail as rwds GROUP BY rwds.reporting_work_id,order_number ) as cc GROUP BY cc.reporting_work_id)as rwd on rw.reporting_work_id=rwd.reporting_work_id
            left join sd.`order` as o on o.order_id=rw.order_id
        where rw.reviewed_state != 2
@@ -1040,11 +1040,11 @@
        ROUND(SUM(rwd.wornArea), 2) AS wornArea,
        CEILING(count(rw.reporting_work_id)/#{pageSize}) as 'pageTotal',
        count(distinct rw.reporting_work_id) as 'total'
        FROM reporting_work AS rw
        FROM pp.reporting_work AS rw
        LEFT JOIN
        (SELECT cc.reporting_work_id,cc.goup,round(sum(cc.completedArea),2)  as completedArea ,round(sum(cc.wornArea),2)  as wornArea from  (SELECT rwds.reporting_work_id, GROUP_CONCAT(distinct rwds.technology_number SEPARATOR '') as goup,
        sum(rwds.child_width*rwds.child_height*completed_quantity/1000000)as completedArea,
        sum(rwds.child_width*rwds.child_height*rwds.breakage_quantity/1000000) as wornArea  from reporting_work_detail as rwds GROUP BY rwds.reporting_work_id,order_number ) as cc GROUP BY cc.reporting_work_id)
        sum(rwds.child_width*rwds.child_height*rwds.breakage_quantity/1000000) as wornArea  from pp.reporting_work_detail as rwds GROUP BY rwds.reporting_work_id,order_number ) as cc GROUP BY cc.reporting_work_id)
            AS rwd
                ON rw.reporting_work_id = rwd.reporting_work_id
        /*LEFT JOIN sd.order_glass_detail AS ogd ON ogd.order_id = rw.order_id
@@ -1118,10 +1118,10 @@
    <select id="mesSelectWorkBasicDeviceMp">
        SELECT bdp.id,bdp.basic_type,bdp.basic_name, bd.basic_name as basic_category FROM  sd.basic_data as bd left join  `basic_data_produce` as bdp
        on bd.id=bdp.basic_category
        where bd.basic_category="process" and bdp.basic_type="device" and bd.basic_name = #{process}
        where bd.basic_category="process" and bdp.basic_type="device"
    </select>
    <select id="mesSelectWorkBasicTeamsMp">
        select id,login_name,user_name,address from erp_user_info.`user`
        select id,login_name,user_name,address from erp_user_info.`user` where address is not null
    </select>
</mapper>