| | |
| | | GROUP BY |
| | | ou.width,ou.height,material_code |
| | | </select> |
| | | |
| | | <select id="exportCrossProcessBreakingMp"> |
| | | select rw.reporting_work_id, |
| | | rw.reporting_work_time, |
| | | dd.responsible_process, |
| | | dd.responsible_team, |
| | | dd.breakage_type, |
| | | dd.breakage_reason, |
| | | ROUND((dd.breakage_quantity)) as breakage_quantity, |
| | | round(ogd.child_width * ogd.child_height * (dd.breakage_quantity) / 1000000, 2) as area, |
| | | rw.this_process, |
| | | o.project, |
| | | o.order_id, |
| | | ogd.glass_child |
| | | from damage_details as dd |
| | | left join reporting_work as rw |
| | | on rw.reporting_work_id = dd.reporting_work_id |
| | | left join sd.order as o |
| | | on rw.order_id = o.order_id |
| | | left join sd.order_glass_detail as ogd |
| | | on ogd.order_id = o.order_id and ogd.order_number = dd.order_number |
| | | and ogd.technology_number and dd.technology_number |
| | | where date(rw.reporting_work_time) >= #{dates[0]} |
| | | and date(rw.reporting_work_time) <= #{dates[1]} |
| | | and rw.this_worn_quantity > 0 |
| | | and dd.available = 0 |
| | | and reviewed_state != 2 |
| | | and rw.this_process != dd.responsible_process |
| | | GROUP BY dd.id |
| | | order by dd.id desc |
| | | </select> |
| | | </mapper> |