| | |
| | | <result column="stockArea" property="stockArea"/> |
| | | <result column="product_name" property="productName"/> |
| | | <result column="bend_radius" property="bendRadius"/> |
| | | <result column="glassNumber" property="glassNumber"/> |
| | | </resultMap> |
| | | |
| | | <!-- 流程卡进度--> |
| | |
| | | ifnull(f.inventory, 0) as inventory, |
| | | round(ifnull(f.inventory, 0) * a.area, 2) as inventoryArea, |
| | | ifnull(dd.quantity, 0) as shippedQuantity, |
| | | JSON_UNQUOTE(JSON_EXTRACT(a.other_columns, '$.S01')) AS glassNumber |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(a.other_columns, '$.S01')),'') AS glassNumber |
| | | from flow_card as c |
| | | left join |
| | | sd.order_detail as a |
| | |
| | | <if test="crossProcessBreakingDTO.glassChild != null and crossProcessBreakingDTO.glassChild != ''"> |
| | | and ogd.glass_child regexp #{crossProcessBreakingDTO.glassChild} |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.breakageType != null and crossProcessBreakingDTO.breakageType != ''"> |
| | | and dd.breakage_type regexp #{crossProcessBreakingDTO.breakageType} |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.project != null and crossProcessBreakingDTO.project != ''"> |
| | | and o.project regexp #{crossProcessBreakingDTO.project} |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.orderId != null and crossProcessBreakingDTO.orderId != ''"> |
| | | and o.order_id regexp #{crossProcessBreakingDTO.orderId} |
| | | </if> |
| | | GROUP BY dd.id |
| | | order by dd.id desc |
| | | limit #{offset},#{pageSize} |
| | |
| | | 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> |
| | | <if test="crossProcessBreakingDTO.glassChild != null and crossProcessBreakingDTO.glassChild != ''"> |
| | | and ogd.glass_child regexp #{crossProcessBreakingDTO.glassChild} |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.breakageType != null and crossProcessBreakingDTO.breakageType != ''"> |
| | | and dd.breakage_type regexp #{crossProcessBreakingDTO.breakageType} |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.project != null and crossProcessBreakingDTO.project != ''"> |
| | | and o.project regexp #{crossProcessBreakingDTO.project} |
| | | </if> |
| | | <if test="crossProcessBreakingDTO.orderId != null and crossProcessBreakingDTO.orderId != ''"> |
| | | and o.order_id regexp #{crossProcessBreakingDTO.orderId} |
| | | </if> |
| | | order by dd.id desc |
| | | </select> |
| | | |
| | |
| | | (odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count - |
| | | odpd.broken_num) / 1000000, 2) as stockArea, |
| | | od.product_name, |
| | | od.bend_radius |
| | | od.bend_radius, |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') AS glassNumber |
| | | |
| | | from sd.order_detail AS od |
| | | LEFT JOIN sd.order_glass_detail AS ogd |
| | |
| | | </if> |
| | | <if test="workInProgressDTO.technologyNumber != null and workInProgressDTO.technologyNumber != ''"> |
| | | and ogd.technology_number regexp #{workInProgressDTO.technologyNumber} |
| | | </if> |
| | | <if test="workInProgressDTO.glassNumber != null and workInProgressDTO.glassNumber != ''"> |
| | | and ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') regexp #{workInProgressDTO.glassNumber} |
| | | </if> |
| | | group by fc.process_id, fc.order_number, fc.technology_number |
| | | order by fc.process_id, fc.order_number, fc.technology_number |
| | |
| | | ogd.glass_child, |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | od.quantity, |
| | | fc.quantity, |
| | | ROUND(ogd.child_width * ogd.child_height / 1000000, 2) as childArea, |
| | | ROUND(ogd.child_width * ogd.child_height * od.quantity / 1000000, 2) as actualArea, |
| | | ROUND(ogd.child_width * ogd.child_height * fc.quantity / 1000000, 2) as actualArea, |
| | | odpd.reporting_work_num as completeNum, |
| | | ROUND(ogd.child_width * ogd.child_height * odpd.reporting_work_num / 1000000, |
| | | 2) as completeArea, |
| | | od.quantity - odpd.reporting_work_num as incompleteNum, |
| | | ROUND(ogd.child_width * ogd.child_height * (od.quantity - odpd.reporting_work_num) / 1000000, |
| | | fc.quantity - odpd.reporting_work_num as incompleteNum, |
| | | ROUND(ogd.child_width * ogd.child_height * (fc.quantity - odpd.reporting_work_num) / 1000000, |
| | | 2) as incompleteArea, |
| | | od.product_name |
| | | |
| | |
| | | and o.create_time between #{selectTime1} and #{selectTime2} |
| | | and position(#{orderId} in od.order_id) |
| | | and position(#{inputProject} in o.project) |
| | | and od.quantity > odpd.reporting_work_num |
| | | and fc.quantity - odpd.reporting_work_num>0 |
| | | |
| | | group by fc.process_id, fc.order_number, fc.technology_number |
| | | order by fc.process_id, fc.order_number, fc.technology_number |
| | |
| | | round( ogd.child_width * ogd.child_height * dd.breakage_quantity / 1000000, 2 ) as area, |
| | | IFNULL(dd.responsible_personnel,'') as personnel, |
| | | ogd.glass_child, |
| | | JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) AS glassNumber |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'') AS glassNumber |
| | | FROM |
| | | sd.ORDER AS o |
| | | LEFT JOIN sd.order_glass_detail AS ogd ON ogd.order_id = o.order_id |
| | |
| | | round(ifnull(f.inventory, 0) * a.area, 2) as inventoryArea, |
| | | ifnull(dd.quantity, 0) as shippedQuantity, |
| | | ifnull(dd.area, 0) as area, |
| | | JSON_UNQUOTE(JSON_EXTRACT(a.other_columns, '$.S01')) AS glassNumber |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(a.other_columns, '$.S01')),'') AS glassNumber |
| | | |
| | | from flow_card as c |
| | | left join |
| | |
| | | and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count - |
| | | odpd.broken_num != 0 |
| | | and odpd.process = #{process} |
| | | and date(o.create_time) >= #{date[0]} |
| | | and date(o.create_time) <= #{date[1]} |
| | | and position(ifnull(#{inputVal}, '') in od.order_id) |
| | | and position(ifnull(#{project}, '') in o.project) |
| | | |
| | |
| | | left join sd.order_glass_detail as ogd on ogd.order_id=fc.order_id and ogd.order_number=fc.order_number and ogd.technology_number=fc.technology_number |
| | | left join sd.order_detail as od on od.order_id=ogd.order_id and od.order_number=ogd.order_number |
| | | left join sd.`order` as o on o.order_id=od.order_id |
| | | left join sd.product_detail as pd on pd.prod_id = od.product_id and pd.glass_sort = fc.technology_number and detail_type = "glass" |
| | | where o.create_order>0 and rw.reviewed_state>=0 and rw.reporting_work_time between #{selectTime1} and #{selectTime2} |
| | | where o.create_order>0 and rw.reviewed_state>=0 and rwd.completed_quantity>0 and rw.reporting_work_time between #{selectTime1} and #{selectTime2} |
| | | and position(#{selectProcesses} in rw.this_process) |
| | | <if test="teamOutputDTO.thisProcess != null and teamOutputDTO.thisProcess != ''"> |
| | | and rw.this_process regexp #{teamOutputDTO.thisProcess} |
| | |
| | | </if> |
| | | |
| | | GROUP BY |
| | | rw.order_id, |
| | | rw.reporting_work_id, |
| | | rw.process_id, |
| | | rw.this_process, |
| | | rw.teams_groups_name, |
| | | rw.process_id, |
| | | rwd.order_number |
| | | ORDER BY |
| | | rw.this_process, |
| | | rw.process_id, |
| | | fc.order_number, |
| | | rwd.order_number, |
| | | rw.reporting_work_time, |
| | | rw.teams_groups_name |
| | | limit #{offset},#{pageSize}; |
| | |
| | | MAX( ogd.child_width ) as width, |
| | | MAX( ogd.child_height ) as height, |
| | | od.edging_type, |
| | | opd.reporting_work_num as completed_quantity, |
| | | ROUND(MAX( ogd.child_width )*MAX( ogd.child_height )*opd.reporting_work_num/1000000,2) as area, |
| | | rwd.completed_quantity as completed_quantity, |
| | | ROUND(MAX( ogd.child_width )*MAX( ogd.child_height )*rwd.completed_quantity/1000000,2) as area, |
| | | od.product_name, |
| | | JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) AS code |
| | | FROM |
| | | sd.`order` as o left join sd.order_detail as od on od.order_id=o.order_id |
| | | left join sd.order_glass_detail as ogd on ogd.order_id=od.order_id and ogd.order_number=od.order_number |
| | | left join flow_card as fc on fc.order_id=ogd.order_id and fc.order_number=ogd.order_number and fc.technology_number=ogd.technology_number |
| | | left join reporting_work as rw on rw.order_id=od.order_id and rw.process_id=fc.process_id |
| | | left join sd.order_process_detail as opd on opd.order_id = o.order_id AND opd.process_id = rw.process_id |
| | | AND opd.order_number = fc.order_number AND opd.technology_number = fc.technology_number and opd.process=rw.this_process |
| | | left join sd.product_detail as pd on pd.prod_id = od.product_id and pd.glass_sort = fc.technology_number and detail_type = "glass" |
| | | where opd.reporting_work_num > 0 and rw.reviewed_state=1 |
| | | and date(rw.reporting_work_time) >= #{date[0]} |
| | | reporting_work as rw left join reporting_work_detail as rwd on rwd.reporting_work_id=rw.reporting_work_id |
| | | left join flow_card as fc on fc.order_id=rw.order_id and fc.process_id=rw.process_id and fc.order_number=rwd.order_number and fc.technology_number=rwd.technology_number |
| | | left join sd.order_glass_detail as ogd on ogd.order_id=fc.order_id and ogd.order_number=fc.order_number and ogd.technology_number=fc.technology_number |
| | | left join sd.order_detail as od on od.order_id=ogd.order_id and od.order_number=ogd.order_number |
| | | left join sd.`order` as o on o.order_id=od.order_id |
| | | where o.create_order>0 and rw.reviewed_state>=0 and rwd.completed_quantity>0 |
| | | and date(rw.reporting_work_time) >= #{date[0]} |
| | | and date(rw.reporting_work_time) <= #{date[1]} |
| | | and position(#{process} in rw.this_process) |
| | | GROUP BY |
| | | rw.reporting_work_id, |
| | | rw.process_id, |
| | | rw.this_process, |
| | | rw.teams_groups_name, |
| | | rw.process_id, |
| | | fc.order_number |
| | | rwd.order_number |
| | | ORDER BY |
| | | rw.this_process, |
| | | rw.process_id, |
| | | fc.order_number, |
| | | rwd.order_number, |
| | | rw.reporting_work_time, |
| | | rw.teams_groups_name |
| | | </select> |
| | |
| | | MAX( ogd.child_width ) as width, |
| | | MAX( ogd.child_height ) as height, |
| | | od.edging_type, |
| | | opd.reporting_work_num as completed_quantity, |
| | | ROUND(MAX( ogd.child_width )*MAX( ogd.child_height )*opd.reporting_work_num/1000000,2) as area, |
| | | rwd.completed_quantity as completed_quantity, |
| | | ROUND(MAX( ogd.child_width )*MAX( ogd.child_height )*rwd.completed_quantity/1000000,2) as area, |
| | | od.product_name, |
| | | JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S01' )) AS code |
| | | FROM |
| | | sd.`order` as o left join sd.order_detail as od on od.order_id=o.order_id |
| | | left join sd.order_glass_detail as ogd on ogd.order_id=od.order_id and ogd.order_number=od.order_number |
| | | left join flow_card as fc on fc.order_id=ogd.order_id and fc.order_number=ogd.order_number and fc.technology_number=ogd.technology_number |
| | | left join reporting_work as rw on rw.order_id=od.order_id and rw.process_id=fc.process_id |
| | | left join sd.order_process_detail as opd on opd.order_id = o.order_id AND opd.process_id = rw.process_id |
| | | AND opd.order_number = fc.order_number AND opd.technology_number = fc.technology_number and opd.process=rw.this_process |
| | | left join sd.product_detail as pd on pd.prod_id = od.product_id and pd.glass_sort = fc.technology_number and detail_type = "glass" |
| | | where opd.reporting_work_num > 0 and rw.reviewed_state=1 and rw.reporting_work_time between #{selectTime1} and #{selectTime2} |
| | | reporting_work as rw left join reporting_work_detail as rwd on rwd.reporting_work_id=rw.reporting_work_id |
| | | left join flow_card as fc on fc.order_id=rw.order_id and fc.process_id=rw.process_id and fc.order_number=rwd.order_number and fc.technology_number=rwd.technology_number |
| | | left join sd.order_glass_detail as ogd on ogd.order_id=fc.order_id and ogd.order_number=fc.order_number and ogd.technology_number=fc.technology_number |
| | | left join sd.order_detail as od on od.order_id=ogd.order_id and od.order_number=ogd.order_number |
| | | left join sd.`order` as o on o.order_id=od.order_id |
| | | where o.create_order>0 and rw.reviewed_state>=0 and rwd.completed_quantity>0 and rw.reporting_work_time between #{selectTime1} and #{selectTime2} |
| | | and position(#{selectProcesses} in rw.this_process) |
| | | <if test="teamOutputDTO.thisProcess != null and teamOutputDTO.thisProcess != ''"> |
| | | and rw.this_process regexp #{teamOutputDTO.thisProcess} |
| | |
| | | <if test="teamOutputDTO.edgingType != null and teamOutputDTO.edgingType != ''"> |
| | | and od.edging_type regexp #{teamOutputDTO.edgingType} |
| | | </if> |
| | | |
| | | GROUP BY |
| | | rw.reporting_work_id, |
| | | rw.process_id, |
| | | rw.this_process, |
| | | rw.teams_groups_name, |
| | | rw.process_id, |
| | | fc.order_number |
| | | rwd.order_number |
| | | ORDER BY |
| | | rw.this_process, |
| | | rw.process_id, |
| | | fc.order_number, |
| | | rwd.order_number, |
| | | rw.reporting_work_time, |
| | | rw.teams_groups_name |
| | | ) as page_toal |