|
|
@ -49,13 +49,17 @@ import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
public class IotMachineEventGeneratorJob { |
|
|
public class IotMachineEventGeneratorJob { |
|
|
|
|
|
|
|
|
private final static String SQL = "select qm.id as machine_id, qei.mac as machine_iot_mac, qm.status\n" + |
|
|
|
|
|
|
|
|
/*private final static String SQL = "select qm.id as machine_id, qei.mac as machine_iot_mac, qm.status\n" + |
|
|
"from (select id, status from qn_machine where is_delete = 0) qm\n" + |
|
|
"from (select id, status from qn_machine where is_delete = 0) qm\n" + |
|
|
" left join (select machine_id, equipment_information_id\n" + |
|
|
" left join (select machine_id, equipment_information_id\n" + |
|
|
" from qn_machine_binding_cloud_box\n" + |
|
|
" from qn_machine_binding_cloud_box\n" + |
|
|
" where is_delete = 0) qmbcb ON qm.id = qmbcb.machine_id\n" + |
|
|
" where is_delete = 0) qmbcb ON qm.id = qmbcb.machine_id\n" + |
|
|
" left join (select id, mac from qn_equipment_information where is_delete = 0) qei\n" + |
|
|
" left join (select id, mac from qn_equipment_information where is_delete = 0) qei\n" + |
|
|
" on qei.id = qmbcb.equipment_information_id"; |
|
|
|
|
|
|
|
|
" on qei.id = qmbcb.equipment_information_id";*/ |
|
|
|
|
|
|
|
|
|
|
|
private final static String SQL = "select machine_id, iot_mac as machine_iot_mac, status\n" + |
|
|
|
|
|
"from qn_machine_realtime_state\n" + |
|
|
|
|
|
"where is_delete = 0"; |
|
|
|
|
|
|
|
|
public static void main(String[] args) throws Exception { |
|
|
public static void main(String[] args) throws Exception { |
|
|
|
|
|
|
|
|
|