import { ApiClientFactory } from '../core/api.client.factory'; import { IMonitorStaffingFilter, IMonitorStaffingForm, IMonitorStaffingTable, ITemperatureRecordFilter, ITemperatureRecordTable, TemperatureDstributionModel, ITemperatureRecordTableItem, ITemperatureUnusualPersonnelChange, ITemperatureUnusualPersonnelChangeFilter, ITemperatureUnusualPersonnelDist, SingleReportModel, DailyNumByDateModel, ExamDailyRefreshModel } from '../model/plague.model'; export class PlagueService { constructor(private factory: ApiClientFactory) { } // 查询受检人员信息 async loadMonitorStaffingTable( projectId: string, queryParams: IMonitorStaffingFilter ): Promise { const result = await this.factory.gssApi.get( `/web/projects/${projectId}/examExaminer/getExamExaminers`, queryParams ); return result; } // 受检人员信息上移或者下移 async updateMonitorStaffingTableRecordOrder( projectId: string, data: { id: number; moveUp: boolean } ): Promise { const result = await this.factory.gssApi.get(`/web/projects/${projectId}/examExaminer/moveOrder`, data); return result; } // 删除受检人员信息 async deleteMonitorStaffingTableRecord(projectId: string, id: number): Promise { const result = await this.factory.gssApi.delete( `/web/projects/${projectId}/examExaminer/delExamExaminer`, { id } ); return result; } // 保存/修改受检人员信息-手动输入填报 async saveMonitorStaffingRecord(projectId: string, formData: IMonitorStaffingForm): Promise { const result = await this.factory.gssApi.post( `web/projects/${projectId}/examExaminer/saveExamExaminer`, formData ); return result; } // 受检人员填报标准模板下载 exportMonitorStaffingTemplate(projectId: string) { this.factory.gssApi.exportFile(`/open/web/projects/${projectId}/examExaminer/getTemplate`); } // 受检人员填报excel上传 getUploadMonitorStaffingRequestData(projectId: string) { const result = this.factory.gssApi.getAllRequestData( `/web/projects/${projectId}/examExaminer/saveExamExaminers` ); return result; } // 查询测温记录 async loadTemperatureRecordTable( projectId: string, queryParams: ITemperatureRecordFilter ): Promise { const result = await this.factory.gssApi.get( `/web/projects/${projectId}/examDailyItem/person/page`, queryParams ); return result; } // 人员体温分布情况(最新日报) async loadTemperatureDstribution(projectId: string, type: string): Promise { const result = await this.factory.gssApi.get( `/web/projects/${projectId}/examDailyItem/allDistribution?type=${type}` ); return result; } // 人员体温分布情况二级弹窗 (最新日报) async loadThermometricAnalysisModalData( projectId: string, examDailyId: string, params: { teamOrDepartment?: string; workTypeOrPosition?: string; nation?: string; age?: string; personStatus?: number; isComplete?: number; isNeedCheckDays?: number; } ): Promise { const result = await this.factory.gssApi.get( `/web/projects/${projectId}/examDailyItem`, { examDailyId, ...params } ); return result; } // 文件导出 // exportCuringRoomMonitorData(projectId: string, queryParams: any) { // this.factory.entity.exportFile( // `/api/open/web/projects/${projectId}/curingRoom/dataCenter/excelRecords`, // queryParams // ); // } // 获取测温日报 // 获取测温日报列表(分页) async fetchTemperatureDetectionLogList(projectId: string, pageIndex: number, pageSize: number): Promise { const result = await this.factory.gssApi.get( `/web/projects/${projectId}/examDaily/page?pageIndex=${pageIndex}&pageSize=${pageSize}` ); return result; } // 日报模板导出 temperatureDetectionExportTemplate(projectId: string) { this.factory.gssApi.exportFile(`/web/projects/${projectId}/examDailyItem/template`); } // 日报明细导出 TemperatureDetectionLogExportExcel(projectId: string, starDate: string, endDate: string) { this.factory.gssApi.exportFile(`/web/projects/${projectId}/examDailyItem/exportExcel`, { starDate, endDate }); } // 添加测温日报 async addTemperatureDetectionLogexamDaily(projectId: string, createBy: string, checkTime: number) { const result = await this.factory.gssApi.post(`/web/projects/${projectId}/examDaily`, { createBy, checkTime }); return result; } // excel日报导入 inputTemperatureDetectionLogExcel(projectId: string, examDailyId: string) { const result = this.factory.gssApi.getAllRequestData( `/web/projects/${projectId}/examDailyItem/importExcel/${examDailyId}` ); return result; } // 获取测温日报明细列表(分页) async fetchTemperatureDetectiondetailList(projectId: string, getData: any) { const result = await this.factory.gssApi.get(`/web/projects/${projectId}/examDailyItem/page`, { ...getData }); return result; } // 删除日报 async deleteTemperatureDetectionlogList(projectId: string, id: any) { const result = await this.factory.gssApi.delete(`/web/projects/${projectId}/examDaily/${id}`); return result; } // 删除日报明细 async deleteTemperatureDetectionlogListItem(projectId: string, id: any) { const result = await this.factory.gssApi.delete(`/web/projects/${projectId}/examDailyItem/${id}`); return result; } // 批量更新日报明细 async batchUpdateTemperatureDetectionlogList(projectId: string, examDailyId: any, postData: any) { const result = await this.factory.gssApi.post( `/web/projects/${projectId}/examDailyItem/batchUpdate/${examDailyId}`, postData ); return result; } // 体温异常人数变化 async loadTemperatureUnusualPersonnelChange( projectId: string, queryParams?: ITemperatureUnusualPersonnelChangeFilter ): Promise { queryParams = queryParams || {}; const result = await this.factory.gssApi.get( `/web/projects/${projectId}/examDaily/highTempList`, queryParams ); return result; } // 体温异常人员分布 - 一级 async loadTemperatureUnusualPersonnelDist(projectId: string, type: string) { const result = await this.factory.gssApi.get( `/web/projects/${projectId}/examDailyItem/anomalousDistribution?type=${type}` ); return result; } // 最新的测温报告信息 async loadLastExaDaily(projectId: string): Promise { const result = await this.factory.gssApi.get( `/web/projects/${projectId}/examDaily/lastExaDaily` ); return result; } // 根据时间查询项目人员测温情况统计 async loadDailyNumByDate(projectId: string, date: string): Promise { const result = await this.factory.gssApi.get( `/web/projects/${projectId}/examDaily/dailyNumByDate?date=${date}` ); return result; } // 刷新测温列表 async loadExamDailyRefresh(projectId: string, examExaminerId: string) { const result = await this.factory.gssApi.get( `/web/projects/${projectId}/examDailyItem/refresh?examExaminerId=${examExaminerId}` ); return result; } }