import { ApiClientFactory } from '../core/api.client.factory'; import { SpecialSchemeSearchData, SpecialSchemeAdd, SpecialEquipmentSearch, SpecialEquipmentSearchAdd, SpecialPersonnelSearch, SpecialPersonnelAdd, SafetyEducationSearch, SafetyEducationAdd, ProcessAcceptanceSearch, ProcessAcceptanceAdd, PersonnelOfMechanical } from '../model/xunFengSys.model'; export class XunFengSysService { constructor(private factory: ApiClientFactory) {} // 亮点工程添加 async loadAddBrightSpotEngineering(projectId: string, publishDate: string, type: string, classify: string, description: string, imageUrl: string): Promise { const url = `/web/projects/${projectId}/highlightProject/add`; const result = await this.factory.gssApi.post(url, { publishDate, type, classify, description, imageUrl }); return result; } // 亮点工程查询 async loadSearchBrightSpotEngineering(projectId: string, startDate: string, endDate: string, classify: string, type: string): Promise { const url = `/web/projects/${projectId}/highlightProject/search`; const result = await this.factory.gssApi.post(url, { startDate, endDate, classify, type }); return result; } // 亮点工程修改 async loadRevampBrightSpotEngineering(projectId: string, publishDate: string, type: string, classify: string, description: string, imageUrl: string, id: string): Promise { const url = `/web/projects/${projectId}/highlightProject/update`; const result = await this.factory.gssApi.put(url, { publishDate, type, classify, description, imageUrl, id }); return result; } // 亮点工程删除 async loadRemoveBrightSpotEngineering(projectId: string, id: string): Promise { const url = `/web/projects/${projectId}/highlightProject/delete/${id}`; const result = await this.factory.gssApi.delete(url, {}); return result; } // 安全-专项方案搜索 async LoadSpecialSchemeSearchData(projectId: string, startDate: string, endDate: string, field?: string): Promise { const url = `/web/projects/${projectId}/qualitys/plan`; const result = await this.factory.gssApi.get(url, { startDate, endDate, field }); return result; } // 安全-专项方案添加 async LoadSpecialSchemeAdd(projectId: string, data: SpecialSchemeAdd): Promise { const url = `/web/projects/${projectId}/qualitys/plan`; const result = await this.factory.gssApi.post(url, { ...data }); return result; } // 安全-专项方案修改 async LoadSpecialSchemeEdit(projectId: string, data: SpecialSchemeAdd): Promise { const url = `/web/projects/${projectId}/qualitys/plan`; const result = await this.factory.gssApi.put(url, { ...data }); return result; } // 安全-专项方案删除 async LoadSpecialSchemeDelete(projectId: string, id: number): Promise { const url = `/web/projects/${projectId}/qualitys/plan/${id}`; const result = await this.factory.gssApi.delete(url); return result; } // 安全-专项方案导出 LoadSpecialSchemeExport(projectId: string, startDate: string, endDate: string, field?: string) { const url = `/open/web/projects/${projectId}/qualitys/plan/export`; this.factory.gssApi.exportFile(url, { startDate, endDate, field }); } // 安全-特种设备搜索 async LoadSpecialEquipmentSearchData(projectId: string, startDate: string, endDate: string, field?: string): Promise { const url = `/web/projects/${projectId}/qualitys/device`; const result = await this.factory.gssApi.get(url, { startDate, endDate, field }); return result; } // 安全-特种设备添加 async LoadSpecialEquipmentAdd(projectId: string, data: SpecialEquipmentSearchAdd): Promise { const url = `/web/projects/${projectId}/qualitys/device`; const result = await this.factory.gssApi.post(url, { ...data }); return result; } // 安全-特种设备修改 async LoadSpecialEquipmentEdit(projectId: string, data: SpecialEquipmentSearchAdd): Promise { const url = `/web/projects/${projectId}/qualitys/device`; const result = await this.factory.gssApi.put(url, { ...data }); return result; } // 安全-特种设备删除 async LoadSpecialEquipmentDelete(projectId: string, id: number): Promise { const url = `/web/projects/${projectId}/qualitys/device/${id}`; const result = await this.factory.gssApi.delete(url); return result; } // 安全-特种设备导出 LoadSpecialEquipmentExport(projectId: string, startDate: string, endDate: string, field?: string) { const url = `/open/web/projects/${projectId}/qualitys/device/export`; this.factory.gssApi.exportFile(url, { startDate, endDate, field }); } // 安全-特种人员搜索 async LoadSpecialPersonnelSearchData(projectId: string, startDate: string, endDate: string, field?: string): Promise { const url = `/web/projects/${projectId}/qualitys/person`; const result = await this.factory.gssApi.get(url, { startDate, endDate, field }); return result; } // 安全-特种人员添加 async LoadSpecialPersonnelAdd(projectId: string, data: SpecialPersonnelAdd): Promise { const url = `/web/projects/${projectId}/qualitys/person`; const result = await this.factory.gssApi.post(url, { ...data }); return result; } // 安全-特种人员修改 async LoadSpecialPersonnelEdit(projectId: string, data: SpecialPersonnelAdd): Promise { const url = `/web/projects/${projectId}/qualitys/person`; const result = await this.factory.gssApi.put(url, { ...data }); return result; } // 安全-特种人员删除 async LoadSpecialPersonnelDelete(projectId: string, id: number): Promise { const url = `/web/projects/${projectId}/qualitys/person/${id}`; const result = await this.factory.gssApi.delete(url); return result; } // 安全-特种人员导出 LoadSpecialPersonnelExport(projectId: string, startDate: string, endDate: string, field?: string) { const url = `/open/web/projects/${projectId}/qualitys/person/export`; this.factory.gssApi.exportFile(url, { startDate, endDate, field }) } // 安全-安全教育搜索 async LoadSafetyEducationSearchData(projectId: string, startDate: string, endDate: string, field?: string, status?: string): Promise { const url = `/web/projects/${projectId}/qualitys/education`; const result = await this.factory.gssApi.get(url, { startDate, endDate, field, status }); return result; } // 安全-安全教育添加 async LoadSafetyEducationAdd(projectId: string, data: SafetyEducationAdd): Promise { const url = `/web/projects/${projectId}/qualitys/education`; const result = await this.factory.gssApi.post(url, { ...data }); return result; } // 安全-安全教育修改 async LoadSafetyEducationEdit(projectId: string, data: SafetyEducationAdd): Promise { const url = `/web/projects/${projectId}/qualitys/education`; const result = await this.factory.gssApi.put(url, { ...data }); return result; } // 安全-安全教育删除 async LoadSafetyEducationDelete(projectId: string, id: number): Promise { const url = `/web/projects/${projectId}/qualitys/education/${id}`; const result = await this.factory.gssApi.delete(url); return result; } // 安全-安全教育导出 LoadSafetyEducationExport(projectId: string, startDate: string, endDate: string, field?: string, status?: string) { const url = `/open/web/projects/${projectId}/qualitys/education/export`; this.factory.gssApi.exportFile(url, { startDate, endDate, field, status }) } // 质量-工序验收搜索 async LoadProcessAcceptanceSearchData(projectId: string, startDate: string, endDate: string): Promise { const url = `/web/projects/${projectId}/processAcceptance/search`; const result = await this.factory.gssApi.post(url, { startDate, endDate }); return result; } // 质量-工序验收添加 async LoadProcessAcceptanceAdd(projectId: string, data: ProcessAcceptanceAdd): Promise { const url = `/web/projects/${projectId}/processAcceptance/add`; const result = await this.factory.gssApi.post(url, { ...data }); return result; } // 质量-工序验收修改 async LoadProcessAcceptanceEdit(projectId: string, data: ProcessAcceptanceAdd): Promise { const url = `/web/projects/${projectId}/processAcceptance/update`; const result = await this.factory.gssApi.put(url, { ...data }); return result; } // 质量-工序验收删除 async LoadProcessAcceptanceDelete(projectId: string, id: number): Promise { const url = `/web/projects/${projectId}/processAcceptance/delete/${id}`; const result = await this.factory.gssApi.delete(url); return result; } // 质量-工序验收导出 LoadProcessAcceptanceExport(projectId: string, startDate: string, endDate: string) { const url = `/web/projects/${projectId}/processAcceptance/exportExcel`; this.factory.gssApi.exportFile(url, { startDate, endDate, }) } // 安全质量单个下载 LoadEnclosureExport(projectId: string, path: string) { const url = `/web/projects/${projectId}/attachment/download`; this.factory.gssApi.exportFile(url, { path }) } // 首件制修改 async loadRevampFirstSystem(projectId: string, projectName: string, id: number, firstEngineName: string, engineType: number, partMileage: string, fieldManager: string, technicalDirector: string, testSupervisor: string, supervisionAuditor: string, applyDate: string, completeDate: string, auditDate: string, attachment: string, remark?: string,): Promise { const url = `/web/projects/${projectId}/qualityFirstEngineer/update/${id}`; const result = await this.factory.gssApi.post(url, { projectName, firstEngineName, engineType, partMileage, fieldManager, technicalDirector, testSupervisor, supervisionAuditor, applyDate, completeDate, auditDate, remark, attachment }); return result; } // 首件制添加 async loadAddFirstSystem(projectId: string, projectName: string, firstEngineName: string, engineType: number, partMileage: string, fieldManager: string, technicalDirector: string, testSupervisor: string, supervisionAuditor: string, applyDate: string, completeDate: string, auditDate: string, attachment: string, remark?: string): Promise { const url = `/web/projects/${projectId}/qualityFirstEngineer/add`; const result = await this.factory.gssApi.post(url, { projectName, firstEngineName, engineType, partMileage, fieldManager, technicalDirector, testSupervisor, supervisionAuditor, applyDate, completeDate, auditDate, remark, attachment }); return result; } // 首件制删除 async loadRemoveFirstSystem(projectId: string, id: number): Promise { const url = `/web/projects/${projectId}/qualityFirstEngineer/delete/${id}`; const result = await this.factory.gssApi.post(url, {}); return result; } // 首件制查询 async loadSearchFirstSystem(projectId: string, startDate: string, endDate: string, engineType: number ): Promise { const url = `/web/projects/${projectId}/qualityFirstEngineer/search`; const result = await this.factory.gssApi.post(url, { startDate, endDate, engineType }); return result; } // 首件制导出 async downLoadFirstSystem(projectId: string, startDate: string, endDate: string, engineType: number): Promise { const url = `/web/projects/${projectId}/qualityFirstEngineer/exportExcel`; this.factory.gssApi.exportFile(url, { startDate, endDate, engineType }); } // 荀凤数据中心展示隐藏 async LoadXunFShouHide(projectId: string): Promise { const url = `/web/projects/${projectId}/xfMenuPermission/auth`; const result = await this.factory.gssApi.get(url); return result; } // 人员、机械增减修改 async loadEditPersonnelOfMechanical(projectId: string, id: number, data: PersonnelOfMechanical): Promise { const url = `/gss/bimbase/web/projects/${projectId}/personnelMachineryInfo/update`; const result = await this.factory.gssApi.put(url, { id, ...data }); return result; } // 人员、机械增减添加 async loadAddPersonnelOfMechanical(projectId: string, data: PersonnelOfMechanical): Promise { const url = `/gss/bimbase/web/projects/${projectId}/personnelMachineryInfo/add`; const result = await this.factory.gssApi.post(url, { ...data }); return result; } // 人员、机械增减删除 async loadRemovePersonnelOfMechanical(projectId: string, id: number): Promise { const url = `/gss/bimbase/web/projects/${projectId}/personnelMachineryInfo/delete/${id}`; const result = await this.factory.gssApi.delete(url, {}); return result; } // 人员、机械增减查询 async loadSearchPersonnelOfMechanical(projectId: string, startDate: string, endDate: string ): Promise { const url = `/gss/bimbase/web/projects/${projectId}/personnelMachineryInfo/search`; const result = await this.factory.gssApi.post(url, { startDate, endDate }); return result; } // 人员、机械增减导出 async downLoadPersonnelOfMechanical(projectId: string, startDate: string, endDate: string): Promise { const url = `/gss/bimbase/web/projects/${projectId}/personnelMachineryInfo/exportExcel`; this.factory.gssApi.exportFile(url, { startDate, endDate }); } // 人员、机械增减查询日期 async loadSearchDatePersonnelOfMechanical(projectId: string, date: string ): Promise { const url = `/gss/bimbase/web/projects/${projectId}/personnelMachineryInfo/check`; const result = await this.factory.gssApi.get(url, { date }); return result; } }