import request from '@/config/axios' // 管道计划排期 VO export interface EquipPipeSchedulingVO { id: string // ID area: string // 区域 unitCode: string // 单位编码 unitName: string // 使用单位名称 unitAddress: string // 使用单位地址 equipCode: string equipDistrict: number | null equipDistrictName: string | null equipStreet: number | null equipStreetName: string | null countLegal: number // 内部检验 countYear: number // 外部检验 contact: string // 约检联系人 contactPhone: string // 约检联系电话 nextLegalCheckDate: string //下次内部检验日期 nextYearCheckDate: string //下次外部检验日期 legalEquipIds: string | null yearEquipIds: string | null legalScheduledCount: number // 定检已排期数 legalTotalCount: number // 定检总需排期数 yearScheduledCount: number // 年检已排期数 yearTotalCount: number // 年检总需排期数 } export interface EquipPipeSchedulingDetailVO { useUnitName: string // 使用单位 projectNo: string // 工程名称 } //编辑页列表 export interface PipePlanSchedulingEquipEditVO { id: string equipDistrict: number equipDistrictName: string equipStreet: number equipStreetName: string equipCode: number equipName: string productNo: string nextInCheckDate: string nextOutCheckDate: string nextPressureCheckDate: string areaType: string boilerModel: string contact: string contactPhone: string tonnage: string useRegisterNo: string maxContinueEvapor: string inEquipIds: string | null outEquipIds: string | null preEquipIds: string | null } // 编辑页批量排期实体 export interface EquipPipeSchedulingEquipVO { id: string unitCode: string unitName: string unitAddress: string equipAddress: string equipDistrict: number equipDistrictName: string equipStreet: number equipStreetName: string status: string equipCode: string equipName: string productNo: string nextLegalCheckDate: string[] | null nextYearCheckDate: string[] | null planLegalCheckDate: string | null planYearCheckDate: string | null } export interface PipeTaskItem { unitCode: string unitName: string unitAddress: string equipDistrict: string | null equipDistrictName: string | null equipStreet: string | null equipStreetName: string | null taskId: string checkType: string equipCount: string planDate: string type: string source: number | null } export interface PipePlanSchedulingCalendarVO { taskItems: PipeTaskItem[] planDate: string unitDistance: number | null thisDistance: number | null } export interface PipePlanSchedulingDetailVO { id: string unitCode: string unitName: string unitAddress: string planDate: number[], teamList: [] } // 锅炉计划排期 API export const EquipPipeSchedulingApi = { // 查询锅炉计划排期分页 getEquipPipeSchedulingPage: async (params: any) => { return await request.get({ url: `/pressure2/equip-pipe-scheduling/page`, params }) }, // 查询锅炉计划排期分页 getEquipPipeSchedulingPagePipe: async (params: any) => { return await request.get({ url: `/pressure2/equip-pipe-scheduling/page/pipe`, params }) }, // 获取排期计划的锅炉列表 getPlanSchedulingPipesList: async (params: any) => { return request.get({ url: '/pressure2/equip-pipe-scheduling/page/pipes', params }) }, // 计划排期分配人员和日期 planSchedulingAssign: async (data: any) => { return request.post({ url: '/pressure2/equip-pipe-scheduling/assign', data }) }, // 批量删除计划 planSchedulingBatchDelete: async (ids: string[]) => { return request.delete({ url: '/pressure2/equip-pipe-scheduling/tasks', data: { ids } }) }, // 计划日历提交确认 planSchedulingConfirm: async (data: any) => { return request.post({ url: '/pressure2/equip-pipe-scheduling/confirm', data }) }, // 计划排期日历 planSchedulingCalendar: async (params: any) => { return request.get({ url: '/pressure2/equip-pipe-scheduling/calendar', params }) }, // 排班表 planSchedulingShiftSchedule: async (params: any) => { return request.get({ url: '/pressure2/equip-pipe-scheduling/shiftSchedule', params }) }, // 排班表 setShiftSchedule: async (data: any) => { return request.put({ url: '/pressure2/equip-pipe-scheduling/setShiftSchedule', data }) }, // 更新计划排期日历 planSchedulingUpdateCalendar: async (data: any) => { return request.put({ url: '/pressure2/equip-pipe-scheduling/calendar/update', data }) }, // 计划详情 getPlanSchedulingDetail: async (id: string) => { return request.get({ url: `/pressure2/equip-pipe-scheduling/detail?id=${id}` }) }, // 计划排期设备调整 planSchedulingPipeUpdate: async (data: any) => { return request.post({ url: '/pressure2/equip-pipe-scheduling/equip/update', data }) }, //批量更新计划排期锅炉设备联系人信息 contactBatchUpdate: async (data: { ids: string[], contact: string, contactPhone: string }) => { return request.put({ url: '/pressure2/equip-pipe-scheduling/contact/batch-update', data }) }, // 查询工程单 getDetailByProject: async (params: any) => { return request.post({ url: '/pressure2/equip-pipe-scheduling/getDetailByProject', data:params }) }, // 获取管道设备明细-管道列表 getPipeEquipmentDetailListByPipeEquipmentId: async (pipeEquipmentId: string,noIds: any) => { return request.post({ url: `/pressure2/equip-pipe-scheduling/page/pipes/detail/${pipeEquipmentId}`,data:noIds }) }, // 获取管道设备明细-设备列表 getPipeDetailListByPipeEquipmentId: async (pipeEquipmentId: string,orderId : string) => { return request.post({ url: `/pressure2/equip-pipe-scheduling/page/pipes/detail/${pipeEquipmentId}/${orderId}` }) }, exportEquipPipeScheduling: async (params) => { return request.download({ url: `/pressure2/equip-pipe-scheduling/export-excel`, params }) }, // 导出排班表 exportShiftSchedule: async (params) => { return request.download({ url: `/pressure2/equip-pipe-scheduling/shiftSchedule/export-excel`, params }) }, // 复制管道排期 copyEquipPipeScheduling: async (data: any) => { return request.post({ url: `/pressure2/equip-pipe-scheduling/copy`, data }) }, }