|
@@ -49,13 +49,8 @@
|
|
|
-- left join imcs_t_tray t on a.tray_id = t.id
|
|
|
-- where biz_type = '1')
|
|
|
-- union
|
|
|
- (select b.id,b.tray_id,b.biz_type,b.specification_id,c.name,c.no,c.specification,c.brand,b.armor_pic,b.remark,b.group_id,b.sort,b.procedure_id from imcs_b_bom_procedure_tray b
|
|
|
- left join (
|
|
|
- select ms.id,ms.specification,m.name,m.brand,m.id as meterialId,m.no from imcs_m_tool_meterial_specs ms
|
|
|
- left join (select * from imcs_m_tool_meterial wehre where category = '02') m on ms.meterial_id = m.id
|
|
|
- where m.id is not null
|
|
|
- ) c on b.tray_id = c.meterialId
|
|
|
- and b.specification_id = c.id
|
|
|
+ (select b.id,b.tray_id,b.biz_type,b.specification_id,c.name,c.no,c.category,c.brand,b.armor_pic,b.remark,b.group_id,b.sort,b.procedure_id from imcs_b_bom_procedure_tray b
|
|
|
+ LEFT JOIN imcs_m_frock_clamp c on b.tray_id = c.id
|
|
|
where biz_type = '2'
|
|
|
)
|
|
|
)ts
|