|
@@ -22,41 +22,195 @@ class ScanController {
|
|
|
return fn ? fn(res) : res;
|
|
|
}
|
|
|
/**
|
|
|
- * 查询不在当前系统下的设备
|
|
|
- */
|
|
|
- static async getEquipInSys(params) {
|
|
|
- return await this.http.postRequest(equipquery_pre + `/sys-equip`, params);
|
|
|
+ *@description: 获取设定参数和动态参数
|
|
|
+
|
|
|
+ *@param {*} params
|
|
|
+
|
|
|
+ *@return {*}
|
|
|
+ */
|
|
|
+ static async BeatchQueryParam(params, fn) {
|
|
|
+ let data = params.data
|
|
|
+ const res = await ScanController.http.postRequest(`/rwd/iot/data/current?projectId=${params.projectId}&groupCode=${params.groupCode}&appId=${params.appId}`, data)
|
|
|
+ return fn ? fn(res) : res
|
|
|
+ }
|
|
|
+ /**
|
|
|
+
|
|
|
+ *@description: 根据条件查询项目下设备部件数量
|
|
|
+
|
|
|
+ *@param {*} params
|
|
|
+
|
|
|
+ *@return {*}
|
|
|
+ */
|
|
|
+ static async countPartsDie(params) {
|
|
|
+ const res = await ScanController.http.postRequest('/equip-component/equip-query/count', params)
|
|
|
}
|
|
|
/**
|
|
|
- * 创建资产所需(Family族id3位编码)-根据设备类型(4位编码)或部件类型(6位编码)查询,!!设备与设备族的关系
|
|
|
- */
|
|
|
+
|
|
|
+ *@description: 根据设备或部件批量创建资产
|
|
|
+
|
|
|
+ *@param {*}
|
|
|
+
|
|
|
+ *@return {*}
|
|
|
+ */
|
|
|
+ static async createPropertys(params) {
|
|
|
+ return await ScanController.http.postRequest('/equip-component/equip-query/creat-propertys', params)
|
|
|
+ }
|
|
|
+ /**
|
|
|
+
|
|
|
+ *@description: 根据id删除资产信息
|
|
|
+
|
|
|
+ *@param {*}
|
|
|
+
|
|
|
+ *@return {*}
|
|
|
+ */
|
|
|
+ static async deleteProperty(params) {
|
|
|
+ return await ScanController.http.postRequest('/datacenter/object/property/delete', params)
|
|
|
+ }
|
|
|
+ /**
|
|
|
+
|
|
|
+ *@description: 查询资产 同时关联设备信息
|
|
|
+
|
|
|
+ *@param {*}
|
|
|
+
|
|
|
+ *@return {*}
|
|
|
+ */
|
|
|
+ static async propertyLinkEq(params) {
|
|
|
+ return await ScanController.http.postRequest('/equip-component/property/property-query', params)
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ @description: 修改资产的附件功能
|
|
|
+ @param {*}
|
|
|
+ @return {*}
|
|
|
+ */
|
|
|
+ static async propertyUpdate(params) {
|
|
|
+ return await ScanController.http.postRequest('/equip-component/property/update', params)
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ *@description: 查询资产
|
|
|
+ *@param {*}
|
|
|
+ *@return {*}
|
|
|
+ */
|
|
|
+ static async queryProperty(params) {
|
|
|
+ return await ScanController.http.postRequest('/datacenter/object/property/query', params)
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ *@description: 更新资产信息
|
|
|
+ *@param {*}
|
|
|
+ *@return {*}
|
|
|
+ */
|
|
|
+ static async updateProperty(params) {
|
|
|
+ return await ScanController.http.postRequest('/datacenter/object/property/update', params)
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ *@description: 删除系统信息
|
|
|
+ *@param {*}
|
|
|
+ *@return {*}
|
|
|
+ */
|
|
|
+ static async deleteGeneralSys(params) {
|
|
|
+ return await ScanController.http.postRequest('/datacenter/object/general-system/delete', params)
|
|
|
+ }
|
|
|
+ /**
|
|
|
+
|
|
|
+ *@description: 更新系统信息
|
|
|
+ *@param {*}
|
|
|
+ *@return {*}
|
|
|
+ */
|
|
|
+ static async updateGeneralSys(params) {
|
|
|
+ return await ScanController.http.postRequest('/datacenter/object/general-system/update', params)
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ @description: 创建资产所需(Family族id3位编码)-根据设备类型(4位编码)或部件类型(6位编码)查询,!!设备与设备族的关系
|
|
|
+ @param {*}
|
|
|
+ @return {*}
|
|
|
+ */
|
|
|
static async getEquipBelongs(params) {
|
|
|
- return await this.http.postRequest(dict_pre + "/family/query", params);
|
|
|
+ return await ScanController.http.postRequest('/datacenter/dict/family/query', params)
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
- * 设备清单 - 设备关联系统 系统1-n
|
|
|
- */
|
|
|
- static async sysLinkEquip(params) {
|
|
|
- return await this.http.postRequest(
|
|
|
- datacenter_pre + "/rel/sy-in-eq/link-sy-eq",
|
|
|
- params
|
|
|
- );
|
|
|
+ @description: 查询建筑信息
|
|
|
+ @param {*}
|
|
|
+ @return {*}
|
|
|
+ */
|
|
|
+ static async buildingQuery(params) {
|
|
|
+ return await ScanController.http.postRequest('/datacenter/object/building/query', params)
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ @description: 关系-竖井所在建筑
|
|
|
+ @param {*}
|
|
|
+ @return {*}
|
|
|
+ */
|
|
|
+ static async shaftLinkBuild(params) {
|
|
|
+ return await ScanController.http.postRequest('/datacenter/rel/sh-in-bd/link-bd', params)
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ *@description: 查询系统信息 - 建筑楼层 - 系统一对多
|
|
|
+ *@param {*} params
|
|
|
+ *@return {*}
|
|
|
+ */
|
|
|
+ static async querySysLinkBuild(params, fn) {
|
|
|
+ let url = '/datacenter/object/general-system/query-new';
|
|
|
+ if (params.buildingId) {
|
|
|
+ url += `?buildingId=${params.buildingId}`
|
|
|
+ }
|
|
|
+ if (params.floorId) {
|
|
|
+ url += `&floorId=${params.floorId}`
|
|
|
+ }
|
|
|
+ const res = await ScanController.http.postRequest(url, params);
|
|
|
+ return fn ? fn(res) : res
|
|
|
+ }
|
|
|
+ static async countGeneralSys(params: any, fn: any) {
|
|
|
+ const res = await ScanController.http.postRequest('/datacenter/object/general-system/count', params)
|
|
|
+ return fn ? fn(res) : res
|
|
|
}
|
|
|
/**
|
|
|
- * 获取设定参数和动态参数
|
|
|
- */
|
|
|
- static async BeatchQueryParam(params) {
|
|
|
- return await this.http.postRequest(
|
|
|
- rwd_pre +
|
|
|
- `/iot/data/current?projectId=${params.projectId}&groupCode=${params.groupCode}&appId=${params.appId}`,
|
|
|
- params
|
|
|
- );
|
|
|
+ *@description: 获取楼层信息
|
|
|
+ *@param {*}
|
|
|
+ *@return {*}
|
|
|
+ */
|
|
|
+ static async getFloorMsgByFloorID(params?: any) {
|
|
|
+ return await ScanController.http.postRequest('/datacenter/object/floor/query', params)
|
|
|
}
|
|
|
/**
|
|
|
- * 设备清单 - 删除设备
|
|
|
- */
|
|
|
- static async deleteEquip(params) {
|
|
|
- return await this.http.postRequest(object_pre + "/equip/delete", params);
|
|
|
+ *@description: //设备清单 - 查询系统关联专业 - 查询系统信息 - 查询系统所属专业类型
|
|
|
+ *@param {*}
|
|
|
+ *@return {*}
|
|
|
+ */
|
|
|
+ static async queryLinkSys(params) {
|
|
|
+ return await ScanController.http.postRequest('/datacenter/object/general-system/query', params)
|
|
|
+ }
|
|
|
+ static async getAllProject(params, fn) {
|
|
|
+ const res = await ScanController.http.postRequest('/datacenter/object/project/query/obj', params)
|
|
|
+ return fn ? fn(res) : res
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description: 创建系统所在建筑关系,系统一对多,覆盖
|
|
|
+ * @param {*} params
|
|
|
+ * @param {*} fn
|
|
|
+ * @return {*}
|
|
|
+ */
|
|
|
+ static async sysRelateBuild(params, fn) {
|
|
|
+ const res = await ScanController.http.postRequest('/datacenter/rel/sy-in-bd/link-bd', params);
|
|
|
+ return fn ? fn(res) : res
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * @description: 创建系统所在建筑关系,系统一对多,覆盖
|
|
|
+ * @param {*} params
|
|
|
+ * @param {*} fn
|
|
|
+ * @return {*}
|
|
|
+ */
|
|
|
+ static async sysRelateFloor(params, fn) {
|
|
|
+ const res = await ScanController.http.postRequest('/datacenter/rel/sy-in-fl/link-fl', params);
|
|
|
+ return fn ? fn(res) : res
|
|
|
+ }
|
|
|
+ static async getEquipInSys(params, fn) {
|
|
|
+ const res = await ScanController.http.postRequest(`/equip-component/equip-query/sys-equip`, params)
|
|
|
+ return fn ? fn(res) : res
|
|
|
+ }
|
|
|
+ static async sysLinkEquip(params, fn) {
|
|
|
+ const res = await ScanController.http.postRequest(`/datacenter/rel/sy-in-eq/link-sy-eq`, params)
|
|
|
+ return fn ? fn(res) : res
|
|
|
}
|
|
|
/**
|
|
|
* 设备清单 - 更新设备
|
|
@@ -69,11 +223,12 @@ class ScanController {
|
|
|
* 设备清单 - 根据对象删除系统和设备的关系
|
|
|
* @param params
|
|
|
*/
|
|
|
- static async sysUnlinkEquip(params) {
|
|
|
- return await this.http.postRequest(
|
|
|
+ static async sysUnlinkEquip(params, fn) {
|
|
|
+ const res = await this.http.postRequest(
|
|
|
datacenter_pre + "/sy-in-eq/unlinks-sy-eq",
|
|
|
params
|
|
|
);
|
|
|
+ return fn ? fn(res) : res
|
|
|
}
|
|
|
static async zoneQuery() {}
|
|
|
static async TypePartsDie() {}
|
|
@@ -111,8 +266,6 @@ class ScanController {
|
|
|
static async queryUpdate(params) {
|
|
|
return await this.http.postRequest(equipquery_pre + "/update", params);
|
|
|
}
|
|
|
- static async queryProperty() {}
|
|
|
- static async querySysLinkBuild() {}
|
|
|
static async equipLinkSys() {}
|
|
|
/**
|
|
|
* 查询建筑信息+count
|
|
@@ -174,6 +327,7 @@ class ScanController {
|
|
|
params
|
|
|
);
|
|
|
}
|
|
|
- static async getAllProject(params?: any, fn?: any) {}
|
|
|
}
|
|
|
-export default ScanController;
|
|
|
+
|
|
|
+
|
|
|
+export default ScanController;
|