예제 #1
0
 def collector_update_instance():
     collector_update_instance_name = DeviceManageParamsValue.update_collector_name
     collector_update_instance_model = DeviceManageParamsValue.update_collector_model
     id_and_model = db.device_sql("get_product_id_and_model",
                                  DeviceManageParamsValue.collector_name)
     DeviceManageParamsValue.collector_id = id_and_model[0]
     return DeviceManageParamsValue.update_instance(
         "diancaiupdate.png", collector_update_instance_name, "1",
         collector_update_instance_model, "", "", "1", "1", id_and_model[0])
예제 #2
0
 def repeater_update_instance():
     repeater_update_name = DeviceManageParamsValue.update_repeater_name
     repeater_update_model = DeviceManageParamsValue.update_repeater_model
     id_and_model = db.device_sql("get_product_id_and_model",
                                  DeviceManageParamsValue.repeater_name)
     DeviceManageParamsValue.repeater_id = id_and_model[0]
     return DeviceManageParamsValue.update_instance(
         "zhognjiupdate.png", repeater_update_name, "1",
         repeater_update_model, "", "1", "1", "1", id_and_model[0])
예제 #3
0
 def water_meter_update_instance():
     water_update_instance_name = DeviceManageParamsValue.update_water_meter_name
     water_update_instance_model = DeviceManageParamsValue.update_water_meter_model
     id_and_model = db.device_sql("get_product_id_and_model",
                                  DeviceManageParamsValue.water_meter_name)
     DeviceManageParamsValue.water_meter_id = id_and_model[0]
     return DeviceManageParamsValue.update_instance(
         "wmhot.png", water_update_instance_name, "",
         water_update_instance_model, "", "1", "", "", id_and_model[0])
예제 #4
0
 def lock_update_instance():
     lock_update_instance_name = DeviceManageParamsValue.update_lock_name
     lock_update_instance_model = DeviceManageParamsValue.update_lock_model
     id_and_model = db.device_sql("get_product_id_and_model",
                                  DeviceManageParamsValue.lock_name)
     DeviceManageParamsValue.lock_id = id_and_model[0]
     return DeviceManageParamsValue.update_instance(
         "lockUpdate.png", lock_update_instance_name, "",
         lock_update_instance_model, "", "1", "", "", id_and_model[0])
예제 #5
0
 def smoke_detector_update_instance():
     smoke_detector_update_instance_name = DeviceManageParamsValue.update_smoke_detector_name
     smoke_detector_update_instance_model = DeviceManageParamsValue.update_smoke_detector_model
     id_and_model = db.device_sql(
         "get_product_id_and_model",
         DeviceManageParamsValue.smoke_detector_name)
     DeviceManageParamsValue.smoke_detector_id = id_and_model[0]
     return DeviceManageParamsValue.update_instance(
         "yanganUpdate.png", smoke_detector_update_instance_name, "1",
         smoke_detector_update_instance_model, "", "1", "1", "1",
         id_and_model[0])
예제 #6
0
 def electric_meter_update_instance():
     electric_update_instance_name = DeviceManageParamsValue.update_electric_name
     electric_update_instance_model = DeviceManageParamsValue.update_electric_model
     id_and_model = db.device_sql(
         "get_product_id_and_model",
         DeviceManageParamsValue.electric_meter_name)
     DeviceManageParamsValue.electric_meter_id = id_and_model[0]
     return DeviceManageParamsValue.update_instance(
         "eleupdate.png", electric_update_instance_name, "1",
         electric_update_instance_model, "0", "1", "2", "1",
         id_and_model[0])
예제 #7
0
    def center_control_update_instance():

        id_and_model = db.device_sql(
            "get_product_id_and_model",
            DeviceManageParamsValue.ceter_control_name)

        DeviceManageParamsValue.center_control_id = id_and_model[0]
        center_control_update_instance_payload = DeviceManageParamsValue.update_instance(
            "upda.png", DeviceManageParamsValue.update_center_control_name, "",
            DeviceManageParamsValue.update_center_control_model, "", "0", "",
            "", id_and_model[0])

        return center_control_update_instance_payload