From 8ac3a87733b421c1f1cb3b691f946c05bdae02df Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Fri, 06 Jul 2018 13:54:14 +0800
Subject: [PATCH] 设备,监控点维护 完善

---
 src/app/business/services/http/device.service.ts |   29 +----------------------------
 1 files changed, 1 insertions(+), 28 deletions(-)

diff --git a/src/app/business/services/http/device.service.ts b/src/app/business/services/http/device.service.ts
index 83c70d2..31de514 100644
--- a/src/app/business/services/http/device.service.ts
+++ b/src/app/business/services/http/device.service.ts
@@ -17,34 +17,7 @@
   public getListUrl () {
     return this.urls.list;
   }
-  public getSqlParams(queryMap: {[key: string]: number|string}) {
-    const example = new ExampleService();
-    const orgId = !!queryMap.orgId ? queryMap.orgId : null;
-    const mpointId = !!queryMap.mpointId ? queryMap.mpointId : null;
-    const devMacOrName = !!queryMap.devMacOrName && !!(<string>queryMap.devMacOrName).trim() ? queryMap.devMacOrName : null;
-    let  criWithMac: Criteria = null;
-    let  criWithName: Criteria  = null;
-    if (!!devMacOrName) {
-      criWithName = example.or().andLike({name: 'name', value: '%' + devMacOrName + '%'});
-      criWithMac = example.or().andLike({name: 'mac', value: '%' + devMacOrName + '%'});
-    }
-    if (!!mpointId) {
-        if (!!devMacOrName) {
-          criWithName.andEqualTo({name: 'monitorPointId', value: mpointId});
-          criWithMac.andEqualTo({name: 'monitorPointId', value: mpointId});
-        }else {
-          example.or().andEqualTo({name: 'monitorPointId', value: mpointId});
-        }
-    } else if (!!orgId) {
-      if (!!devMacOrName) {
-        criWithName.andCondition(`monitor_point_id in (select id from monitor_point where organization_id = ${orgId})`);
-        criWithMac.andCondition(`monitor_point_id in (select id from monitor_point where organization_id = ${orgId})`);
-      }else {
-        example.or().andCondition(`monitor_point_id in (select id from monitor_point where organization_id = ${orgId})`);
-      }
-    }
-    return example.getSqlParam();
-  }
+  
   constructor(private http: _HttpClient) { }
   delete(...ids: number[]): Observable< ResultBean<any> > {
       return this.http.post(this.urls.delete, ids);

--
Gitblit v1.8.0