|
@@ -89,6 +89,8 @@
|
|
|
tbp.manager mangerName,tbco.company_address area,tbmp.hill_number hillNumber,tbm.oc_cycle oc_cycle,tbp.manager_id managerId,
|
|
|
tbmp.equipment_no equipmentNo,tbm.setting_life setting_life,tbp.owner_company_name ownerCompanyName,tbm.run_times run_times,
|
|
|
tbmp.lng,tbmp.lat,tbmp.stage,(SELECT open_time FROM `mould_history_time` WHERE equipment_no=equipmentNo ORDER BY indate DESC LIMIT 1) lastopentime
|
|
|
+ ,(SELECT battery FROM `mould_history` WHERE equipmentNo = equipment_no ORDER BY indate DESC LIMIT 1) hill_number,
|
|
|
+ (SELECT temperature FROM `mould_history` WHERE equipment_no = equipmentNo ORDER BY indate DESC LIMIT 1) temperature
|
|
|
from
|
|
|
tb_mould tbm
|
|
|
left join
|
|
@@ -132,9 +134,11 @@
|
|
|
select
|
|
|
tbm.id id,tbm.model_no model_no, tbm.model_name model_name,tbm.initial_modulus initial_modulus,tbm.rfid rfid,tbp.manager_id managerId,tbm.equipment_id equipment_id,is_maintain,
|
|
|
tbmp.end_time endTime,tbm.state state,tbp.project_name projectName,tbc.company_name companyName,tbm.holes,tbm.pre_update_id,tbco.company_name produceCompany,
|
|
|
- tbp.manager mangerName,tbco.company_address area,tbmp.hill_number hillNumber,tbm.oc_cycle oc_cycle,tbm.creator_id creator_id,
|
|
|
+ tbp.manager mangerName,tbco.company_address area,tbm.oc_cycle oc_cycle,tbm.creator_id creator_id,
|
|
|
tbmp.equipment_no equipmentNo,tbm.setting_life setting_life,tbp.owner_company_name ownerCompanyName,tbm.run_times run_times,
|
|
|
- tbmp.lng,tbmp.lat,tbmp.stage,(SELECT open_time FROM `mould_history_time` WHERE equipment_no=equipmentNo ORDER BY indate DESC LIMIT 1) lastopentime
|
|
|
+ tbmp.lng,tbmp.lat,tbmp.stage,(SELECT open_time FROM `mould_history_time` WHERE equipment_no=equipmentNo ORDER BY indate DESC LIMIT 1) lastopentime,
|
|
|
+ (SELECT battery FROM `mould_history` WHERE equipmentNo = equipment_no ORDER BY indate DESC LIMIT 1) hill_number,
|
|
|
+ (SELECT temperature FROM `mould_history` WHERE equipment_no = equipmentNo ORDER BY indate DESC LIMIT 1) temperature
|
|
|
from
|
|
|
tb_mould tbm
|
|
|
left join
|
|
@@ -181,7 +185,8 @@
|
|
|
tbm.id id,tbm.model_no model_no, tbm.model_name,tbm.initial_modulus initial_modulus,tbp.manager_id managerId,tbm.produce_company_id produce_company_id,
|
|
|
tbmp.end_time endTime,tbm.state state,tbp.project_name projectName,tbco.company_name produceCompany,tbm.creator_id creator_id,tbm.holes,
|
|
|
tbp.manager mangerName,tbco.company_address area,tbm.rfid rfid,tbm.oc_cycle oc_cycle,tbc.company_name companyName,tbm.pre_update_id,
|
|
|
- tbmp.equipment_no equipmentNo,tbmp.hill_number hillNumber,tbm.setting_life setting_life,tbm.run_times run_times,tbmp.stage
|
|
|
+ tbmp.equipment_no equipmentNo,(SELECT battery FROM `mould_history` WHERE tbmp.equipment_no = equipment_no ORDER BY indate DESC LIMIT 1) hill_number,
|
|
|
+ (SELECT temperature FROM `mould_history` WHERE equipment_no = tbmp.equipment_no ORDER BY indate DESC LIMIT 1) temperature,tbm.setting_life setting_life,tbm.run_times run_times,tbmp.stage
|
|
|
from
|
|
|
tb_mould tbm
|
|
|
left join
|
|
@@ -207,7 +212,7 @@
|
|
|
select
|
|
|
tbm.id id,tbm.model_no model_no, tbm.model_name model_name,tbm.initial_modulus initial_modulus,tbm.rfid rfid,tbm.creator_id creator_id,tbm.equipment_id equipment_id,tbm.is_maintain,tbm.holes,
|
|
|
tbmp.end_time endTime,tbm.state state,tbp.project_name projectName,tbc.company_name companyName,tbm.pre_update_id,tbm.company_id,tbco.company_name produce_company_name,tbm.produce_company_id,
|
|
|
- tbp.manager mangerName,tbco.company_address area,tbmp.hill_number hillNumber,tbm.oc_cycle oc_cycle,tbp.manager_id managerId,
|
|
|
+ tbp.manager mangerName,tbco.company_address area,tbm.oc_cycle oc_cycle,tbp.manager_id managerId,
|
|
|
tbmp.equipment_no equipmentNo,tbm.setting_life setting_life,tbp.owner_company_name ownerCompanyName,tbm.run_times run_times,
|
|
|
tbmp.lng,tbmp.lat,tbmp.stage
|
|
|
from
|