index.ts 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. import request from '@/config/axios'
  2. // 管道计划排期 VO
  3. export interface EquipPipeSchedulingVO {
  4. id: string // ID
  5. area: string // 区域
  6. unitCode: string // 单位编码
  7. unitName: string // 使用单位名称
  8. unitAddress: string // 使用单位地址
  9. equipCode: string
  10. equipDistrict: number | null
  11. equipDistrictName: string | null
  12. equipStreet: number | null
  13. equipStreetName: string | null
  14. countLegal: number // 内部检验
  15. countYear: number // 外部检验
  16. contact: string // 约检联系人
  17. contactPhone: string // 约检联系电话
  18. nextLegalCheckDate: string //下次内部检验日期
  19. nextYearCheckDate: string //下次外部检验日期
  20. legalEquipIds: string | null
  21. yearEquipIds: string | null
  22. legalScheduledCount: number // 定检已排期数
  23. legalTotalCount: number // 定检总需排期数
  24. yearScheduledCount: number // 年检已排期数
  25. yearTotalCount: number // 年检总需排期数
  26. }
  27. export interface EquipPipeSchedulingDetailVO {
  28. useUnitName: string // 使用单位
  29. projectNo: string // 工程名称
  30. }
  31. //编辑页列表
  32. export interface PipePlanSchedulingEquipEditVO {
  33. id: string
  34. equipDistrict: number
  35. equipDistrictName: string
  36. equipStreet: number
  37. equipStreetName: string
  38. equipCode: number
  39. equipName: string
  40. productNo: string
  41. nextInCheckDate: string
  42. nextOutCheckDate: string
  43. nextPressureCheckDate: string
  44. areaType: string
  45. boilerModel: string
  46. contact: string
  47. contactPhone: string
  48. tonnage: string
  49. useRegisterNo: string
  50. maxContinueEvapor: string
  51. inEquipIds: string | null
  52. outEquipIds: string | null
  53. preEquipIds: string | null
  54. }
  55. // 编辑页批量排期实体
  56. export interface EquipPipeSchedulingEquipVO {
  57. id: string
  58. unitCode: string
  59. unitName: string
  60. unitAddress: string
  61. equipAddress: string
  62. equipDistrict: number
  63. equipDistrictName: string
  64. equipStreet: number
  65. equipStreetName: string
  66. status: string
  67. equipCode: string
  68. equipName: string
  69. productNo: string
  70. nextLegalCheckDate: string[] | null
  71. nextYearCheckDate: string[] | null
  72. planLegalCheckDate: string | null
  73. planYearCheckDate: string | null
  74. }
  75. export interface PipeTaskItem {
  76. unitCode: string
  77. unitName: string
  78. unitAddress: string
  79. equipDistrict: string | null
  80. equipDistrictName: string | null
  81. equipStreet: string | null
  82. equipStreetName: string | null
  83. taskId: string
  84. checkType: string
  85. equipCount: string
  86. planDate: string
  87. type: string
  88. source: number | null
  89. }
  90. export interface PipePlanSchedulingCalendarVO {
  91. taskItems: PipeTaskItem[]
  92. planDate: string
  93. unitDistance: number | null
  94. thisDistance: number | null
  95. }
  96. export interface PipePlanSchedulingDetailVO {
  97. id: string
  98. unitCode: string
  99. unitName: string
  100. unitAddress: string
  101. planDate: number[],
  102. teamList: []
  103. }
  104. // 锅炉计划排期 API
  105. export const EquipPipeSchedulingApi = {
  106. // 查询锅炉计划排期分页
  107. getEquipPipeSchedulingPage: async (params: any) => {
  108. return await request.get({ url: `/pressure2/equip-pipe-scheduling/page`, params })
  109. },
  110. // 查询锅炉计划排期分页
  111. getEquipPipeSchedulingPagePipe: async (params: any) => {
  112. return await request.get({ url: `/pressure2/equip-pipe-scheduling/page/pipe`, params })
  113. },
  114. // 获取排期计划的锅炉列表
  115. getPlanSchedulingPipesList: async (params: any) => {
  116. return request.get({ url: '/pressure2/equip-pipe-scheduling/page/pipes', params })
  117. },
  118. // 计划排期分配人员和日期
  119. planSchedulingAssign: async (data: any) => {
  120. return request.post({ url: '/pressure2/equip-pipe-scheduling/assign', data })
  121. },
  122. // 批量删除计划
  123. planSchedulingBatchDelete: async (ids: string[]) => {
  124. return request.delete({ url: '/pressure2/equip-pipe-scheduling/tasks', data: { ids } })
  125. },
  126. // 计划日历提交确认
  127. planSchedulingConfirm: async (data: any) => {
  128. return request.post({ url: '/pressure2/equip-pipe-scheduling/confirm', data })
  129. },
  130. // 计划排期日历
  131. planSchedulingCalendar: async (params: any) => {
  132. return request.get({ url: '/pressure2/equip-pipe-scheduling/calendar', params })
  133. },
  134. // 排班表
  135. planSchedulingShiftSchedule: async (params: any) => {
  136. return request.get({ url: '/pressure2/equip-pipe-scheduling/shiftSchedule', params })
  137. },
  138. // 排班表
  139. setShiftSchedule: async (data: any) => {
  140. return request.put({ url: '/pressure2/equip-pipe-scheduling/setShiftSchedule', data })
  141. },
  142. // 更新计划排期日历
  143. planSchedulingUpdateCalendar: async (data: any) => {
  144. return request.put({ url: '/pressure2/equip-pipe-scheduling/calendar/update', data })
  145. },
  146. // 计划详情
  147. getPlanSchedulingDetail: async (id: string) => {
  148. return request.get({ url: `/pressure2/equip-pipe-scheduling/detail?id=${id}` })
  149. },
  150. // 计划排期设备调整
  151. planSchedulingPipeUpdate: async (data: any) => {
  152. return request.post({ url: '/pressure2/equip-pipe-scheduling/equip/update', data })
  153. },
  154. //批量更新计划排期锅炉设备联系人信息
  155. contactBatchUpdate: async (data: { ids: string[], contact: string, contactPhone: string }) => {
  156. return request.put({ url: '/pressure2/equip-pipe-scheduling/contact/batch-update', data })
  157. },
  158. // 查询工程单
  159. getDetailByProject: async (params: any) => {
  160. return request.post({ url: '/pressure2/equip-pipe-scheduling/getDetailByProject', data:params })
  161. },
  162. // 获取管道设备明细-管道列表
  163. getPipeEquipmentDetailListByPipeEquipmentId: async (pipeEquipmentId: string,noIds: any) => {
  164. return request.post({ url: `/pressure2/equip-pipe-scheduling/page/pipes/detail/${pipeEquipmentId}`,data:noIds })
  165. },
  166. // 获取管道设备明细-设备列表
  167. getPipeDetailListByPipeEquipmentId: async (pipeEquipmentId: string,orderId : string) => {
  168. return request.post({ url: `/pressure2/equip-pipe-scheduling/page/pipes/detail/${pipeEquipmentId}/${orderId}` })
  169. },
  170. exportEquipPipeScheduling: async (params) => {
  171. return request.download({ url: `/pressure2/equip-pipe-scheduling/export-excel`, params })
  172. },
  173. // 导出排班表
  174. exportShiftSchedule: async (params) => {
  175. return request.download({ url: `/pressure2/equip-pipe-scheduling/shiftSchedule/export-excel`, params })
  176. },
  177. // 复制管道排期
  178. copyEquipPipeScheduling: async (data: any) => {
  179. return request.post({ url: `/pressure2/equip-pipe-scheduling/copy`, data })
  180. },
  181. }