import { ApiClientFactory } from '../core/api.client.factory'; import { BuildingChecksBybuildDetailInfo, BuildingChecksDetailInfo, BuildingChecksInfo, DevicePersonnelInfo, EnterDetailList, EnterEpidemicAreaGroup, EnterTempGroup, GateMachine, GateMachineOrgList, GateMachinePersonStatistica, GateMachinePersonTrack, IAttendanceComparativeAnalysisData, IAttendanceComparativeAnalysisDataDetails, IAttendanceRate, IAttendanceRateConfig, IConstructionTable, IEntranceThreeEducation, IEntranceThreeEducationTable, ILaborStaffPanelModal, IRateConfig, IScoreBaseItems, ISiteSpecialCraft, ITrainingEducationInfo, ITrainingEducationList, IWorkerCategory, LaborAges, laborCompany, LaborNation, LaborOverview, laborRegion, PersonnelDetailInfo, RencentDaysWorker, WorkerUnit } from '../model/labourAssess.model'; export class LabourAssessService { constructor(private factory: ApiClientFactory) { } // 获取劳务相关最小日期限制 async loadMinCreateDate(projectId: string): Promise { const result = await this.factory.entity.get( `/api/web/projects/${projectId}/laborScores/minCreateDate` ); return result; } // 获取劳务评分基础设置列表 async loadScoreBaseItems(projectId: string): Promise { const result = await this.factory.entity.get(`/api/web/projects/${projectId}/scoreBaseItems`); return result; } // 修改劳务评分基础设置列表 async postScoreBaseItems(projectId: string, scoreBaseItems: any[]): Promise { const result = await this.factory.entity.post(`/api/web/projects/${projectId}/scoreBaseItems`, scoreBaseItems); return result; } // 获取评分规则列表,包括质量、安全、生产评分规则 async loadScoreRuleItems(projectId: string): Promise { const result = await this.factory.entity.get(`/api/web/projects/${projectId}/scoreRuleItems/mapList`); return result; } // 修改评分规则列表,包括质量、安全、生产评分规则 async postScoreRuleItems(projectId: string, scoreRuleItemsData: any[]): Promise { const result = await this.factory.entity.post( `/api/web/projects/${projectId}/scoreRuleItems`, scoreRuleItemsData ); return result; } // 按月获取其他评分规则列表 async loadOtherScoreRuleItemsByMonth(projectId: string, filterObj: any): Promise { const result = await this.factory.entity.get(`/api/web/projects/${projectId}/otherScoreRuleItems`, filterObj); return result; } // 根据id获取单条其他评分规则 async loadOtherScoreRuleItemsById(projectId: string, id: number): Promise { const result = await this.factory.entity.get(`/api/web/projects/${projectId}/otherScoreRuleItems/${id}`); return result; } // TODO:新增单条其他评分规则 async addOtherScoreRuleItems(projectId: string, otherScoreRuleItems: any): Promise { const result = await this.factory.entity.post( `/api/web/projects/${projectId}/otherScoreRuleItems`, otherScoreRuleItems ); return result; } // 根据id修改单条其他评分规则 async updateOtherScoreRuleItemsById(projectId: string, id: number, otherScoreRuleItems: any): Promise { const result = await this.factory.entity.put( `/api/web/projects/${projectId}/otherScoreRuleItems/${id}`, otherScoreRuleItems ); return result; } // 根据id删除单条其他评分规则 async deleteOtherScoreRuleItemsById(projectId: string, id: number): Promise { const result = await this.factory.entity.delete(`/api/web/projects/${projectId}/otherScoreRuleItems/${id}`); return result; } // 根据项目ID获取劳务分包单位列表 async loadSubcontractorsList(projectId: string): Promise { const result = await this.factory.entity.get(`/api/web/projects/${projectId}/subcontractors`); return result; } // 根据年份,月份获取劳务评分列表 async loadLaborScoresByDate(projectId: string, filterDate: any): Promise { return await this.factory.entity.get(`/api/web/projects/${projectId}/laborScores`, filterDate); } // 根据年份,月份获取劳务评分列表 async loadLaborScoresByYear(projectId: string, month: string) { return await this.factory.entity.get(`/api/web/projects/${projectId}/laborScores/month/${month}`); } // 二级页面-质量评分列表 async loadLaborQualitysByMonth(projectId: string, subcontractorId: any, subType: string, filterDate: any) { return await this.factory.gssApi.get( `/web/projects/${projectId}/qualitys/subcontractors/${subcontractorId}/${subType}`, filterDate ); } // 二级页面-安全问题列表 async loadLaborSafetysByMonth(projectId: string, subcontractorId: any, subType: string, filterDate: any) { return await this.factory.gssApi.get( `/web/projects/${projectId}/safetys/subcontractors/${subcontractorId}/${subType}`, filterDate ); } // 二级页面按月按分包商获取周计划完成率列表 async loadLaborWeeklyPlansByMonth(projectId: string, subcontractorId: any, subType: string, filterDate: any) { return await this.factory.entity.get( `/api/web/projects/${projectId}/weeklyPlans/subcontractors/${subcontractorId}/${subType}`, filterDate ); } // 二级页面-其他问题列表 async loadLaborOtherScoreRuleItemsByMonth(projectId: string, subcontractorId: any, subType: string, filterDate: any) { return await this.factory.entity.get( `/api/web/projects/${projectId}/otherScoreRuleItems/subcontractors/${subcontractorId}/${subType}`, filterDate ); } // 获取近12个月的劳务评分列表 async loadLaborRecentMonth(projectId: string): Promise { return await this.factory.entity.get(`/api/web/projects/${projectId}/laborScores/month12`); } // 劳务分包出勤率 async loadLaborAttendanceRate(projectId: string, filterData: { days: number }): Promise { return await this.factory.gssApi.get( `/web/projects/${projectId}/laborVendors/attendance`, filterData ); } // 获取劳务分包出勤率配置 async loadLaborAttendanceRateConfig(projectId: string): Promise { return await this.factory.gssApi.get( `/web/projects/${projectId}/laborVendors/attendance/setting` ); } // 更新劳务分包出勤率配置 async updateLaborAttendanceRateConfig(projectId: string, rateForm: IRateConfig): Promise { return await this.factory.gssApi.post(`/web/projects/${projectId}/laborVendors/attendance/setting`, { ...rateForm }); } // 获取大屏下落数据集 async loadSimulationResourceUrl(projectId: string): Promise { return await this.factory.entity.get(`/api/web/projects/${projectId}/largeScreen/data`); } // 获取概况 async loadLaborOverview(projectId: string): Promise { return await this.factory.gssApi.get(`/projects/${projectId}/labor/overview`); } // 总人数按年龄分布 async loadAllPesonByAge(projectId: string): Promise { return await this.factory.gssApi.get(`/projects/${projectId}/labor/registered/age`); } // 总人数按民族分布 async loadAllPesonByNation(projectId: string): Promise { return await this.factory.gssApi.get(`/projects/${projectId}/labor/registered/nation`); } // 总人数按地域分布 async loadAllPesonByArea(projectId: string): Promise { return await this.factory.gssApi.get(`/projects/${projectId}/labor/registered/area`); } // 近七天日累计 async loadRencentDaysWorkers(projectId: string): Promise { return await this.factory.gssApi.get(`/projects/${projectId}/labor/daily/rencentDaysWorkers`); } // 参建队伍人数 async loadWorkersTeamDaily(projectId: string): Promise { return await this.factory.gssApi.get(`/projects/${projectId}/labor/team/statistics`); } // 按工种分析(现场、出勤) sort -1:升序, 0:不排序, 1:降序 async loadWorkersTypeDaily(projectId: string, sort: number): Promise { return await this.factory.gssApi.get(`/projects/${projectId}/labor/workType/statistics`, { sort }); } // 查询总包单位、专业分包、劳务分包人数 async loadCompanyClassifyGroup(projectId: string): Promise { return await this.factory.gssApi.get(`/projects/${projectId}/labor/companyClassifyGroup/byTeam`); } // 住宅分户验收统计 async loadBuildingChecksInfo(projectId: string): Promise { return await this.factory.gssApi.get( `/web/projects/${projectId}/buildingChecks/buildingAllStat` ); } // 住宅分户验收二级明细 async loadBuildingChecksDetailInfo( projectId: string, pageIndex: string, pageSize: string ): Promise { return await this.factory.gssApi.get( `/web/projects/${projectId}/buildingChecks/details?pageIndex=${pageIndex}&pageSize=${pageSize}` ); } // 住宅分户验收按楼栋统计 async loadBuildingChecksInfoBybuild(projectId: string): Promise { return await this.factory.gssApi.get( `/web/projects/${projectId}/buildingChecks/byBuildingNoStat` ); } // 按楼栋分析验收明细--二级页面 async loadBuildingChecksBybuildDetailInfo( projectId: string, buildingNo: string ): Promise { return await this.factory.gssApi.get( `/web/projects/${projectId}/buildingChecks/byBuildingNoDetails?buildingNo=${buildingNo}` ); } // 劳务-人员进场体温分布 async loadEnterTempGroup(projectId: string): Promise { return await this.factory.gssApi.get(`/web/projects/${projectId}/examExaminer/enterTempGroup`); } // 劳务-人员进场地域排查 async loadEnterEpidemicAreaGroup(projectId: string): Promise { return await this.factory.gssApi.get( `/web/projects/${projectId}/examExaminer/enterEpidemicAreaGroup` ); } // 劳务-人员进场-二级页面 async loadEnterDetailList(projectId: string, params: any): Promise { return await this.factory.gssApi.get(`/web/projects/${projectId}/examExaminer/enterDetail`, { ...params }); } // 劳务-民族地域年龄组件二级弹窗 async loadLaborClassify(projectId: string, params: any): Promise { const result = await this.factory.gssApi.get(`/web/projects/${projectId}/laborClassify/list`, { ...params }); return result; } // 劳务-总人数按年龄分布 async loadStaffStatisticsAge(projectId: string): Promise { const result = await this.factory.gssApi.get(`/production/labor/registered/age`, { projectId }); return result; } // 劳务-总人数按地域分布 async loadStaffStatisticsNation(projectId: string): Promise { const result = await this.factory.gssApi.get(`/production/labor/registered/nation`, { projectId }); return result; } // 劳务-总人数按民族分布 async loadStaffStatisticsRegion(projectId: string): Promise { const result = await this.factory.gssApi.get(`/production/labor/registered/region`, { projectId }); return result; } // 劳务-今日作业人员趋势 async loadStaffOnline(projectId: string): Promise { return await this.factory.gssApi.get(`/production/labor/overview`, { projectId }); } // 劳务-按工种分析 async loadStaffStatisticsByCategory(projectId: string, params: any): Promise { return await this.factory.gssApi.get(`/production/labor/online`, { projectId, ...params }); } // 劳务-近7天作业人员分析 async loadStaffStatisticsInRencentDay(projectId: string, params: any): Promise { return await this.factory.gssApi.get(`/production/labor/daily`, { projectId, ...params }); } async getPersonnelManagement(projectId: string): Promise { return await this.factory.gssApi.get(`/overview/overview`, { projectId }); } // 劳务管理-特殊工种分布 async getSiteSpecialCraft(projectId: string): Promise { return await this.factory.gssApi.get( `/projects/${projectId}/labor/laborSpecialWorkerTypeStatistics` ); } // 劳务管理-特殊工种分布-二级 async getSiteSpecialCraftTable(projectId: string, params: any): Promise { return await this.factory.gssApi.get(`/projects/${projectId}/labor/laborSpecialWorkerType/items`, params); } // 劳务管理-三级教育 async getEntranceThreeEducation(projectId: string): Promise { return await this.factory.gssApi.get(`/projects/${projectId}/labor/edu/statistics`); } // 劳务管理-三级教育-二级 async getEntranceThreeEducationTable(projectId: string, params: any): Promise { return await this.factory.gssApi.get( `/projects/${projectId}/labor/edu/eduWorkers`, params ); } // 执业注册证书分布 async loadLaborWorkerCertificateStatistics(projectId: string): Promise { return await this.factory.gssApi.get( `/projects/${projectId}/labor/laborWorkerCertificateStatistics` ); } // 执业注册证书分布详情 async loadLaborWorkerCertificates(projectId: string, payload: any): Promise { return await this.factory.gssApi.get(`/projects/${projectId}/labor/laborWorkerCertificates`, payload); } // 劳务管理-劳动合同签订情况 async getContractSigningSituation(projectId: string): Promise { return await this.factory.gssApi.get(`/projects/${projectId}/labor/contract/statistics`); } // 劳务管理-劳动合同签订情况-二级 async getContractSigningSituationTable(projectId: string, params: any): Promise { return await this.factory.gssApi.get( `/projects/${projectId}/labor/contract/signedWorkers`, params ); } // 劳务管理-获取培训教育执行情况 async getTrainingEducationInfo(projectId: string): Promise { return await this.factory.gssApi.get( `/projects/${projectId}/labor/edu/training/situration` ); } // 劳务管理-培训教育执行情况明细列表 async getTrainingEducationList(projectId: string, params: any): Promise { return await this.factory.gssApi.get( `/projects/${projectId}/labor/edu/training/details`, params ); } // 劳务管理-参建单位人数 async loadConstructionTable(projectId: string, params: any): Promise { return await this.factory.gssApi.get(`/projects/${projectId}/labor/laborCompanyDetail`, params); } // 劳务深化-奖惩行为分析 async getCountGroupByBehaviorType(projectId: string, params: any): Promise { return await this.factory.gssApi.get( `/projects/${projectId}/labor/rewardsAndPunishments/getCountGroupByBehaviorType`, params ); } // 劳务深化-奖惩行为分析二级弹窗 async getRewardsPunishments(projectId: string, params: any): Promise { return await this.factory.gssApi.get( `/projects/${projectId}/labor/rewardsAndPunishments/getRewardsPunishments`, params ); } // 劳务深化-人工体检统计 async getPhysicalAnalysisSum(params: any): Promise { return await this.factory.gssApi.get(`/production/labor/physical/sum`, params); } // 劳务深化-人工体检统计二级弹窗 async getPhysicalAnalysisInfo(params: any): Promise { return await this.factory.gssApi.get(`/production/labor/physical/info`, params); } // 劳务出勤分析保存缺席配置 async getLaborVendorsAbsent(projectId: string, params: any): Promise { return await this.factory.gssApi.post(`/web/projects/${projectId}/laborVendors/absent/setting`, params); } // 劳务出勤分析查询缺席配置 async getLaborVendorsAbsentSetting(projectId: string): Promise { return await this.factory.gssApi.get(`/web/projects/${projectId}/laborVendors/absent/setting`); } // 劳务出勤分析周计划列表 async getLaborbim5dAllWeeklyPlanPeriods(projectId: string): Promise { return await this.factory.gssApi.get(`/gss/bimproduct/projects/${projectId}/bim5dAllWeeklyPlanPeriods`); } // 劳务出勤分析数据列表 async getBim5dPeriodGLaborData(projectId: string, periodId: string): Promise { return await this.factory.gssApi.get( `/gss/bimproduct/projects/${projectId}/bim5dPeriodGLaborData?periodId=${periodId}` ); } // 数字工地 闸机一级弹窗 async getGateMachineTurnstileNumber(projectId: string, deviceId: string): Promise { return await this.factory.gssApi.get( `/production/labor/turnstile/number/today?projectId=${projectId}&deviceId=${deviceId}` ); } // 数字工地 闸机二级弹窗树形列表 async getGateMachineTurnstileOrgList(projectId: string, deviceId: string): Promise { return await this.factory.gssApi.get( `/production/labor/turnstile/orgList/today?projectId=${projectId}&deviceId=${deviceId}` ); } // 数字工地 闸机二级弹窗某分包商/队伍人员在该闸机下最后一次记录 async getGateMachineTurnstilePersonStatistica(params: any): Promise { return await this.factory.gssApi.get( `/production/labor/turnstile/person/statistic`, params ); } // 数字工地 工人在某闸机下今日记录 async getGateMachineTurnstilePersonTrack( projectId: string, deviceId: string, workerId: string ): Promise { return await this.factory.gssApi.get( `/production/labor/turnstile/person/track?projectId=${projectId}&deviceId=${deviceId}&workerId=${workerId}` ); } // 实时数据二级弹窗 async getLaborStaffPanelModal( projectId: string, tag: number, pageIndex: number, pageSize: number ): Promise { return await this.factory.gssApi.get(`/web/projects/${projectId}/laborClassify/mainlist`, { tag, pageIndex, pageSize }); } // 实时数据小时二级弹窗 async getHoursLaborStaffPanelModal( projectId: string, hour: number, pageIndex: number, pageSize: number ): Promise { return await this.factory.gssApi.get( `/web/projects/${projectId}/laborClassify/hoursrecordlist`, { hour, pageIndex, pageSize } ); } // 获取人员定位-人员数量 async loadPersonnelLocationNumber(projectId: string, deviceId: string): Promise { return await this.factory.entity.get( `/api/web/projects/${projectId}/attendance/onlineNum/device/${deviceId}` ); } // 根据虚拟设备id获取人员信息 async loadDevicePersonnelInfo( projectId: string, deviceId: string, pageIndex: number, pageSize: number ): Promise { return await this.factory.entity.get( `/api/web/projects/${projectId}/attendance/person/statistic/device/${deviceId}`, { pageIndex, pageSize } ); } // 根据人员id获取人员轨迹和基本信息 async loadPersonnelDetailInfo(projectId: string, laborWorkerId: string): Promise { return await this.factory.entity.get( `/api/web/projects/${projectId}/attendance/person/detail`, { laborWorkerId } ); } // 获取生产劳动力与劳务考勤对比一级 async loadAttendanceComparativeAnalysis(projectId: string, beginTime: number, endTime: number): Promise { return await this.factory.gssApi.get( `/web/projects/${projectId}/labor/getAttendanceContrastMsg`, { beginTime, endTime } ); } // 获取生产劳动力与劳务考勤对比一级详情 async loadAttendanceComparativeAnalysisDetails(projectId: string, dataTime: number): Promise { return await this.factory.gssApi.get( `/web/projects/${projectId}/labor/getAttendanceContrastDetails/dataTime/${dataTime}` ); } }