|
|
|
@ -126,9 +126,9 @@ class DeviceClassificationDeleteHandler(APIHandler):
|
|
|
|
|
cur = conn.execute(
|
|
|
|
|
text(
|
|
|
|
|
"""
|
|
|
|
|
select d.id from enterprise_device d, device_classification c
|
|
|
|
|
where d.classification=c.suid and c.id=:id and c.del=0
|
|
|
|
|
"""
|
|
|
|
|
select d.id from enterprise_device d, device_classification c
|
|
|
|
|
where d.classification=c.suid and c.id=:id and c.del=0
|
|
|
|
|
"""
|
|
|
|
|
),
|
|
|
|
|
{"id": did},
|
|
|
|
|
)
|
|
|
|
@ -326,7 +326,7 @@ class DeviceListHandler(APIHandler):
|
|
|
|
|
def post(self):
|
|
|
|
|
node_id = self.get_int_argument("node_id")
|
|
|
|
|
pageNo = self.get_int_argument("pageNo", 1)
|
|
|
|
|
pageSize = self.get_int_argument("pageSize", 20)
|
|
|
|
|
pageSize = self.get_int_argument("pageSize", consts.PAGE_SIZE)
|
|
|
|
|
if not node_id:
|
|
|
|
|
raise errors.HTTPAPIError(errors.ERROR_BAD_REQUEST, "企业节点不能为空")
|
|
|
|
|
db_device = DB_Device.EnterpriseDeviceRepository()
|
|
|
|
@ -425,7 +425,7 @@ class DeviceBasemodelListHandler(APIHandler):
|
|
|
|
|
errors.ERROR_BAD_REQUEST, "企业节点或设备不能为空"
|
|
|
|
|
)
|
|
|
|
|
pageNo = self.get_int_argument("pageNo", 1)
|
|
|
|
|
pageSize = self.get_int_argument("pageSize", 10)
|
|
|
|
|
pageSize = self.get_int_argument("pageSize", consts.PAGE_SIZE)
|
|
|
|
|
db_busi_model = DB_BusiModelNodeDevice.EnterpriseBusiModelNodeDeviceRepository()
|
|
|
|
|
busi_models, count = db_busi_model.get_busi_model_by_device(device_id=device_id, pagination=True,
|
|
|
|
|
page_no=pageNo,
|
|
|
|
@ -583,7 +583,7 @@ class StatusListHandler(APIHandler):
|
|
|
|
|
classification = self.get_escaped_argument("classification", "")
|
|
|
|
|
status = self.get_int_argument("status", 1000)
|
|
|
|
|
pageNo = self.get_int_argument("pageNo", 1)
|
|
|
|
|
pageSize = self.get_int_argument("pageSize", 20)
|
|
|
|
|
pageSize = self.get_int_argument("pageSize", consts.PAGE_SIZE)
|
|
|
|
|
|
|
|
|
|
if not entity_id:
|
|
|
|
|
raise errors.HTTPAPIError(errors.ERROR_BAD_REQUEST, "企业节点不能为空")
|
|
|
|
@ -743,7 +743,7 @@ class StatusLogHandler(APIHandler):
|
|
|
|
|
def post(self):
|
|
|
|
|
entity_id = self.get_int_argument("entity_id")
|
|
|
|
|
pageNo = self.get_int_argument("pageNo", 1)
|
|
|
|
|
pageSize = self.get_int_argument("pageSize", 10)
|
|
|
|
|
pageSize = self.get_int_argument("pageSize", consts.PAGE_SIZE)
|
|
|
|
|
|
|
|
|
|
db_device = DB_Device.EnterpriseDeviceRepository()
|
|
|
|
|
res = db_device.list_entity_devices(entity_id=entity_id, pageno=pageNo, pagesize=pageSize)
|
|
|
|
|