import { OrgInfo } from "../model/org-info.model"; import { OrgInfoSearchParam } from "../search/org-info-search-param.model"; import { OrgInfoDto2 } from "../DTO/org-info-dto2.model"; import { HostConfig } from '../config/host.config'; import { Injectable } from '@angular/core'; import { HttpHandler } from './http-handler.service'; import { Page } from '../response/page.type'; @Injectable({ providedIn: 'root', }) export class OrgInfoService { static PATH = '/orgInfo'; constructor(private httpHandler: HttpHandler) {} createOrgInfo(orgInfo: OrgInfo, header?: any): Promise { return this.httpHandler.post(`${HostConfig.DEV_HOST}${OrgInfoService.PATH}/create` ,orgInfo, header); } updateOrgInfo(orgInfo: OrgInfo, header?: any): Promise { return this.httpHandler.post(`${HostConfig.DEV_HOST}${OrgInfoService.PATH}/update` ,orgInfo, header); } findOrgInfoById(id: number, header?: any): Promise { return this.httpHandler.get(`${HostConfig.DEV_HOST}${OrgInfoService.PATH}/findById/${id}`, header); } search(orgInfoSearchParam: OrgInfoSearchParam,page: number,size: number, header?: any): Promise> { return this.httpHandler.post>(`${HostConfig.DEV_HOST}${OrgInfoService.PATH}/search?page=${page}&size=${size}` ,orgInfoSearchParam, header); } searchForNotifyRule(orgInfoSearchParam: OrgInfoSearchParam,page: number,size: number, header?: any): Promise> { return this.httpHandler.post>(`${HostConfig.DEV_HOST}${OrgInfoService.PATH}/searchForNotifyRule?page=${page}&size=${size}` ,orgInfoSearchParam, header); } searchOrgAndContactForNotifyRule(orgInfoSearchParam: OrgInfoSearchParam,page: number,size: number, header?: any): Promise> { return this.httpHandler.post>(`${HostConfig.DEV_HOST}${OrgInfoService.PATH}/searchOrgAndContactForNotifyRule?page=${page}&size=${size}` ,orgInfoSearchParam, header); } }