|  |  |  | 
|---|
|  |  |  | list: environment.SERVER_BASH_URL + '/monitor-point/page-list', | 
|---|
|  |  |  | save: environment.SERVER_BASH_URL + '/monitor-point/add-or-modify', | 
|---|
|  |  |  | delete: environment.SERVER_BASH_URL + '/monitor-point/delete-by-ids', | 
|---|
|  |  |  | getOne:environment.SERVER_BASH_URL + '/monitor-point/get-by-id' | 
|---|
|  |  |  | getOne: environment.SERVER_BASH_URL + '/monitor-point/get-by-id' | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | constructor(private http: _HttpClient) { } | 
|---|
|  |  |  | public getPagingList(page: PageBean, queryText: string): Observable<PageBean> { | 
|---|
|  |  |  | 
|---|
|  |  |  | example.or().andLike({name: 'name', value: '%' + queryText + '%'}); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | let orderByClause = ''; | 
|---|
|  |  |  | if ( page.getOrderByClause != null && page.getOrderByClause instanceof Function) { | 
|---|
|  |  |  | orderByClause = page.getOrderByClause(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (!!page) { | 
|---|
|  |  |  | if ( page.getOrderByClause != null && page.getOrderByClause instanceof Function) { | 
|---|
|  |  |  | orderByClause = page.getOrderByClause(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | page =  {pageIndex: 0, pageSize: 20}; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | const param: PageBean = {pageSize: page.pageSize, pageIndex: page.pageIndex, | 
|---|
|  |  |  | queryParams: example.getSqlParam(), orderByClause: orderByClause}; | 
|---|
|  |  |  | return this.http.get(this.urls.list, param); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | public getPageByExample(page: PageBean, example: ExampleService): Observable<PageBean> { | 
|---|
|  |  |  | let orderByClause = ''; | 
|---|
|  |  |  | const _queryParams = !!example ? example.getSqlParam() : ''; | 
|---|
|  |  |  | if (!!page) { | 
|---|
|  |  |  | if ( page.getOrderByClause != null && page.getOrderByClause instanceof Function) { | 
|---|
|  |  |  | orderByClause = page.getOrderByClause(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | page =  {pageIndex: 0, pageSize: 20}; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | const param: PageBean = {pageSize: page.pageSize, pageIndex: page.pageIndex, | 
|---|
|  |  |  | queryParams: _queryParams, orderByClause: orderByClause}; | 
|---|
|  |  |  | return this.http.get(this.urls.list, param); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | public save(data: any): Observable<any> { | 
|---|
|  |  |  | return this.http.post(this.urls.save, data); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | public delete(...ids: number[]): Observable<any> { | 
|---|
|  |  |  | return this.http.post(this.urls.delete, ids); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | public getEntity(id:number):Observable<ResultBean<MonitorPoint>>{ | 
|---|
|  |  |  | return this.http.get(this.urls.getOne,{id:id}); | 
|---|
|  |  |  | public getEntity(id: number): Observable<ResultBean<MonitorPoint>> { | 
|---|
|  |  |  | return this.http.get(this.urls.getOne, {id: id}); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|