diff --git a/.changeset/common-corners-walk.md b/.changeset/common-corners-walk.md new file mode 100644 index 0000000..67a5bac --- /dev/null +++ b/.changeset/common-corners-walk.md @@ -0,0 +1,5 @@ +--- +'openapi-ts-request': minor +--- + +feat: Added customRenderTemplateData hook functionality #512 diff --git a/README-en_US.md b/README-en_US.md index 78ce1df..faa7545 100644 --- a/README-en_US.md +++ b/README-en_US.md @@ -265,6 +265,7 @@ openapi -i ./spec.json -o ./apis | customType | ({
schemaObject: SchemaObject \| ReferenceObject,
namespace: string,
originGetType:(schemaObject: SchemaObject \| ReferenceObject, namespace: string, schemas?: ComponentsObject['schemas']) => string,
schemas?: ComponentsObject['schemas'],
}) => string | custom type
_returning a non-string will use the default method to get the type_ | | customFileNames | (
operationObject: OperationObject,
apiPath: string,
apiMethod: string,
) => string[] | custom generate request client controller file name, can return multiple: generate multiple files.
_if the return value is empty, the default getFileNames is used_ | | customTemplates | {
[TypescriptFileType.serviceController]?: (item: T, context: U) => string;
} | custom template, details see source code | +| customRenderTemplateData | {
[TypescriptFileType]?: (list: any[], context: {fileName: string, params: Record}) => any[]
} | custom list parameter processing during file generation, provides fine-grained control for different file types | ## Apifox-Config diff --git a/README.md b/README.md index 12271bb..acad2fd 100644 --- a/README.md +++ b/README.md @@ -267,6 +267,7 @@ openapi --i ./spec.json --o ./apis | customType | ({
schemaObject: SchemaObject \| ReferenceObject,
namespace: string,
originGetType:(schemaObject: SchemaObject \| ReferenceObject, namespace: string, schemas?: ComponentsObject['schemas']) => string,
schemas?: ComponentsObject['schemas'],
}) => string | 自定义类型
_返回非字符串将使用默认方法获取type_ | | customFileNames | (
operationObject: OperationObject,
apiPath: string,
apiMethod: string,
) => string[] | 自定义生成的请求客户端文件名称,可以返回多个文件名称的数组(表示生成多个文件).
_返回为空,则使用默认的方法获取_ | | customTemplates | {
[TypescriptFileType.serviceController]?: (item: T, context: U) => string;
} | 自定义模板,详情请看源码 | +| customRenderTemplateData | {
[TypescriptFileType]?: (list: any[], context: {fileName: string, params: Record}) => any[]
} | 自定义文件生成时的 list 参数处理,支持对不同文件类型进行精细化控制 | ## Apifox-Config diff --git a/src/generator/serviceGenarator.ts b/src/generator/serviceGenarator.ts index 8336558..8862205 100644 --- a/src/generator/serviceGenarator.ts +++ b/src/generator/serviceGenarator.ts @@ -101,7 +101,6 @@ import { // resolveFunctionName, resolveRefs, resolveTypeName, - // stripDot, } from './util'; export default class ServiceGenerator { @@ -865,6 +864,101 @@ export default class ServiceGenerator { ): boolean { try { const template = this.getTemplate(type); + + // 应用 customRenderTemplateData hook (如果存在) + let processedParams = { ...params }; + const customListHooks = this.config.hook?.customRenderTemplateData; + + if (customListHooks && params.list) { + try { + const context = { + fileName, + params: processedParams, + }; + + let processedList = params.list; + + // 根据不同的文件类型调用相应的 hook 函数 + switch (type) { + case TypescriptFileType.serviceController: + if (customListHooks.serviceController) { + processedList = customListHooks.serviceController( + params.list as APIDataType[], + context + ); + } + break; + case TypescriptFileType.reactQuery: + if (customListHooks.reactQuery) { + processedList = customListHooks.reactQuery( + params.list as APIDataType[], + context + ); + } + break; + case TypescriptFileType.interface: + if (customListHooks.interface) { + processedList = customListHooks.interface( + params.list as ITypeItem[], + context + ); + } + break; + case TypescriptFileType.displayEnumLabel: + if (customListHooks.displayEnumLabel) { + processedList = customListHooks.displayEnumLabel( + params.list as ITypeItem[], + context + ); + } + break; + case TypescriptFileType.displayTypeLabel: + if (customListHooks.displayTypeLabel) { + processedList = customListHooks.displayTypeLabel( + params.list as ITypeItem[], + context + ); + } + break; + case TypescriptFileType.schema: + if (customListHooks.schema) { + processedList = customListHooks.schema( + params.list as ISchemaItem[], + context + ); + } + break; + case TypescriptFileType.serviceIndex: + if (customListHooks.serviceIndex) { + processedList = customListHooks.serviceIndex( + params.list as ControllerType[], + context + ); + } + break; + } + + if (processedList !== params.list) { + processedParams = { + ...processedParams, + list: processedList, + }; + this.log( + `customRenderTemplateData hook applied for ${type}: ${fileName}` + ); + } + } catch (error) { + console.error( + `[GenSDK] customRenderTemplateData hook error for ${type}:`, + error + ); + this.log( + `customRenderTemplateData hook failed for ${type}, using original list` + ); + // 发生错误时使用原始参数继续执行 + } + } + // 设置输出不转义 const env = nunjucks.configure({ autoescape: false, @@ -874,7 +968,7 @@ export default class ServiceGenerator { const destPath = join(this.config.serversPath, fileName); const destCode = nunjucks.renderString(template, { disableTypeCheck: false, - ...params, + ...processedParams, }); let mergerProps: MergeOption = {} as MergeOption; diff --git a/src/index.ts b/src/index.ts index f202783..4bf0229 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,7 +4,12 @@ import { PriorityRule, ReactQueryMode } from './config'; import type { TypescriptFileType } from './generator/config'; import { mockGenerator } from './generator/mockGenarator'; import ServiceGenerator from './generator/serviceGenarator'; -import type { APIDataType, ITypeItem } from './generator/type'; +import type { + APIDataType, + ControllerType, + ISchemaItem, + ITypeItem, +} from './generator/type'; import type { ComponentsObject, IPriorityRule, @@ -265,6 +270,82 @@ export type GenerateServiceProps = { config: U ) => ITypeItem[]; }; + /** + * 自定义 genFileFromTemplate 的 list 参数 hook + * 可以在模板渲染前对 list 参数进行自定义处理 + */ + customRenderTemplateData?: { + /** + * 自定义 serviceController 文件的 list 参数 + */ + [TypescriptFileType.serviceController]?: ( + list: APIDataType[], + context: { + fileName: string; + params: Record; + } + ) => APIDataType[]; + /** + * 自定义 interface 文件的 list 参数 + */ + [TypescriptFileType.interface]?: ( + list: ITypeItem[], + context: { + fileName: string; + params: Record; + } + ) => ITypeItem[]; + /** + * 自定义 displayEnumLabel 文件的 list 参数 + */ + [TypescriptFileType.displayEnumLabel]?: ( + list: ITypeItem[], + context: { + fileName: string; + params: Record; + } + ) => ITypeItem[]; + /** + * 自定义 displayTypeLabel 文件的 list 参数 + */ + [TypescriptFileType.displayTypeLabel]?: ( + list: ITypeItem[], + context: { + fileName: string; + params: Record; + } + ) => ITypeItem[]; + /** + * 自定义 schema 文件的 list 参数 + */ + [TypescriptFileType.schema]?: ( + list: ISchemaItem[], + context: { + fileName: string; + params: Record; + } + ) => ISchemaItem[]; + /** + * 自定义 serviceIndex 文件的 list 参数 + */ + [TypescriptFileType.serviceIndex]?: ( + list: ControllerType[], + context: { + fileName: string; + params: Record; + } + ) => ControllerType[]; + /** + * 自定义 reactQuery 文件的 list 参数 + */ + [TypescriptFileType.reactQuery]?: ( + list: APIDataType[], + context: { + fileName: string; + params: Record; + } + ) => APIDataType[]; + }; }; }; diff --git "a/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 DisplayEnumLabel hook - \350\277\207\346\273\244\346\236\232\344\270\276\347\261\273\345\236\213.snap" "b/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 DisplayEnumLabel hook - \350\277\207\346\273\244\346\236\232\344\270\276\347\261\273\345\236\213.snap" new file mode 100644 index 0000000..db2ae1e --- /dev/null +++ "b/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 DisplayEnumLabel hook - \350\277\207\346\273\244\346\236\232\344\270\276\347\261\273\345\236\213.snap" @@ -0,0 +1,1267 @@ +/* eslint-disable */ +// @ts-ignore +import * as API from './types'; + +export function displayAddDeviceMachine(field: keyof API.AddDeviceMachine) { + return { + lineId: 'lineId', + lineName: 'lineName', + machineCode: 'machineCode', + machineName: 'machineName', + manageUserId: 'manageUserId', + manageUserName: 'manageUserName', + lightSn: 'lightSn', + signalId: 'signalId', + serialNo: 'serialNo', + location: 'location', + imgList: 'imgList', + deviceMachineId: '更新才有', + }[field]; +} + +export function displayAndonClose(field: keyof API.AndonClose) { + return { + andonRecordId: 'andonRecordId', + disposeDesc: 'disposeDesc', + disposeImgUrls: 'disposeImgUrls', + }[field]; +} + +export function displayAndonRecordNode(field: keyof API.AndonRecordNode) { + return { + id: 'id', + andonRecordId: 'andonRecordId', + nodeDesc: '节点描述', + nodeRemark: '节点备注', + nodeType: + '1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销', + nodeTypeName: 'nodeTypeName', + nodeUserId: 'nodeUserId', + nodeUserName: 'nodeUserName', + createdUserId: 'createdUserId', + createdTime: 'createdTime', + modifyiedUserId: 'modifyiedUserId', + modifyiedTime: 'modifyiedTime', + }[field]; +} + +export function displayAndonRecordQuery(field: keyof API.AndonRecordQuery) { + return { + queryDeptId: 'queryDeptId', + myRelatedFlag: '与我有关, 处理人或者报告人是我或者接收人是我', + queryDisposeStatus: '处理状态 1 查询未处理的 2 查询已处理的', + queryTimeType: '1 60天内 2 今天 3 本月 5 日期范围查询 默认1', + factoryId: 'factoryId', + startTime: 'startTime', + endTime: 'endTime', + size: 'size', + current: 'current', + }[field]; +} + +export function displayAndonRecordVO(field: keyof API.AndonRecordVO) { + return { + id: 'ID', + factoryId: '工厂id', + factoryName: 'factoryName', + deptId: 'deptId', + deptName: 'deptName', + workshopId: '车间id', + workshopName: 'workshopName', + lineId: '产线d', + lineName: 'lineName', + machineId: '设备ID', + signalId: '灯ID', + calendarDetailId: '日历排班ID', + calendarId: 'calendarId', + calendarDate: 'calendarDate', + shiftDetailName: 'shiftDetailName', + machineName: 'machineName', + machineCode: 'machineCode', + configId: '事件配置ID', + configName: 'configName', + eventName: 'eventName', + reportUserId: '报告人ID', + reportUserName: 'reportUserName', + reportTime: '开始时间', + reportComments: '报告备注', + reportDate: '报告日期', + priority: '优先级', + notifyUseridStrs: '通知人ID列表', + receiveUserId: '接收人', + receiveUserName: 'receiveUserName', + receiveTime: '接收时间', + receiveDurationTime: '接收用时', + disposeDurationTime: 'disposeDurationTime', + disposeUserId: '处理人ID', + disposeUserName: 'disposeUserName', + disposeDesc: '处理方式', + disposeTime: '处理时间', + totalDurationTime: '持续时间,单位秒', + sourceType: '来源,1 移动端,2 安灯盒按钮, 3 异常事件', + state: '状态,1 已上报,2 已接收,3 已处理, 9 已撤销', + eventAnalysis: '原因分析', + createdUserId: '创建人', + createdTime: '创建时间', + modifyiedUserId: '最后更新人', + modifyiedTime: '最后更新时间', + datetimeStamp: '时间戳', + oeeDetailId: 'oee明细ID', + workCenterName: 'workCenterName', + workCenterCode: 'workCenterCode', + disposeUserNames: 'disposeUserNames', + disposeUserIds: 'disposeUserIds', + totalDurationTimeSt: 'totalDurationTimeSt', + receiveDurationTimeSt: 'receiveDurationTimeSt', + disposeDurationTimeSt: 'disposeDurationTimeSt', + statusText: + '表状态,1 已上报,2 已接收,3 已处理, 9 已撤销转换状态 已申请 已响应 已关闭 已撤销', + disposeUserList: 'disposeUserList', + recordNodeList: 'recordNodeList', + showColor: 'showColor', + workCenterId: 'workCenterId', + shiftShowColor: 'shiftShowColor', + shiftStartTime: 'shiftStartTime', + shiftEndTime: 'shiftEndTime', + reportImgList: 'reportImgList', + disposeImgList: 'disposeImgList', + reportImgUrls: 'reportImgUrls', + disposeImgUrls: 'disposeImgUrls', + shiftName: 'shiftName', + completedUserId: 'completedUserId', + completedUserName: 'completedUserName', + }[field]; +} + +export function displayAndonReq(field: keyof API.AndonReq) { + return { + configId: 'configId', + configName: 'configName', + imgList: 'imgList', + reportComments: 'reportComments', + selectHandlerUserIds: '处理用户', + workCenterId: 'workCenterId', + reqUserId: 'reqUserId', + sourceType: '来源', + processDispatchId: '工序派工id', + }[field]; +} + +export function displayApiResult(field: keyof API.ApiResult) { + return { + code: '状态码', + message: '提示', + data: '数据', + success: '是否成功', + }[field]; +} + +export function displayApiResultAndonRecordVO( + field: keyof API.ApiResultAndonRecordVO +) { + return { + code: '状态码', + message: '提示', + data: '

安灯_记录

', + success: '是否成功', + }[field]; +} + +export function displayApiResultMyPageAndonRecordVO( + field: keyof API.ApiResultMyPageAndonRecordVO +) { + return { + code: '状态码', + message: '提示', + data: '数据', + success: '是否成功', + }[field]; +} + +export function displayApiResultString(field: keyof API.ApiResultString) { + return { + code: '状态码', + message: '提示', + data: '数据', + success: '是否成功', + }[field]; +} + +export function displayGetDeviceListUsingPostParams( + field: keyof API.GetDeviceListUsingPostParams +) { + return { + id: 'ID', + factoryId: '工厂ID', + deptId: 'deptId', + workshopId: '车间ID', + lineId: '产线ID', + categoryId: '分类ID', + signalId: '灯ID', + lightSn: 'lightSn', + machineCode: '设备编号', + machineName: '设备名称', + pinyin: '拼音码', + wubi: '五笔码', + imgUrlStrs: '医院图片', + manageUserId: '管理员ID', + trademark: '品牌', + model: '型号', + serialNo: '序列号', + supplier: '供应商', + activationDate: '启用日期', + checkDate: '验收日期', + productionDate: '出厂日期', + pulseInterval: '脉冲间隔', + standardUseRate: '标准利用率', + location: '放置地点', + state: '状态,1启用,2 停用', + remark: '备注', + deleteFlag: '删除标记', + createdUserId: '创建人', + createdTime: '创建时间', + modifyiedUserId: '最后更新人', + modifyiedTime: '最后更新时间', + datetimeStamp: '时间戳', + searchKey: 'searchKey', + oeeState: '0 关机,1 运行,2 等待,3 异常', + oeeTime: 'oeeTime', + stateRecordId: 'stateRecordId', + stateStartTime: 'stateStartTime', + }[field]; +} + +export function displayGetUserWorkshopWorkcenterUsingPostParams( + field: keyof API.GetUserWorkshopWorkcenterUsingPostParams +) { + return { + selectDeptId: 'selectDeptId', + }[field]; +} + +export function displayJSONObject(field: keyof API.JSONObject) { + return { + key: 'key', + }[field]; +} + +export function displayMyPageAndonRecordVO( + field: keyof API.MyPageAndonRecordVO +) { + return { + records: 'records', + total: 'total', + size: 'size', + current: 'current', + orders: 'orders', + optimizeCountSql: 'optimizeCountSql', + searchCount: 'searchCount', + optimizeJoinOfCountSql: 'optimizeJoinOfCountSql', + maxLimit: 'maxLimit', + countId: 'countId', + startTime: 'startTime', + startTimeStr: 'startTimeStr', + endTime: 'endTime', + endTimeStr: 'endTimeStr', + hasNextPage: 'hasNextPage', + }[field]; +} + +export function displayOrderItem(field: keyof API.OrderItem) { + return { + column: 'column', + asc: 'asc', + }[field]; +} + +export function displayPlatformUser(field: keyof API.PlatformUser) { + return { + id: '用户ID', + teamId: '团队id', + factoryId: '工厂id', + deptId: 'deptId', + workshopId: '所属车间id', + lineId: '所属产线d', + userName: '用户姓名', + email: '邮箱', + jobTitle: '职称', + jobNo: '用户工号', + accountNo: '用户账号', + password: '用户密码', + idNumber: '身份证号', + dateOfBirth: '出生日期', + telephone: '联系电话', + headImageUrl: '头像url', + userType: '用户类型,1 平台,2 团队,3 工厂', + adminFlag: '管理员标识,1 管理员,0 非管理员', + state: '状态(1:在用 2:停用)', + deleteFlag: '是否删除(0:否 1:是)', + passwordModifyiedTime: '修改密码时间', + createdUserId: '创建人', + createdTime: '创建时间', + modifyiedUserId: '最后更新人', + modifyiedTime: '最后更新时间', + datetimeStamp: '时间戳', + genderCode: '1男 2女 9 未知', + publicOpenId: 'publicOpenId', + currentFactoryId: 'currentFactoryId', + remark: '备注', + }[field]; +} + +export function displayReportAbnormalEventDTO( + field: keyof API.ReportAbnormalEventDTO +) { + return { + abnormalRecordId: '异常记录id', + eventId: '事件id', + processDispatchId: '工序派工id', + }[field]; +} +/* eslint-disable */ +// @ts-ignore +export * from './types'; +export * from './displayTypeLabel'; + +export * from './web'; +/* eslint-disable */ +// @ts-ignore + +export type AddAndonRecordNodeDescUsingPostResponses = { + 200: ApiResult; +}; + +export type AddDeviceMachine = { + lineId: number; + lineName?: string; + machineCode: string; + machineName: string; + manageUserId?: number; + manageUserName?: string; + lightSn: string; + signalId?: number; + serialNo?: string; + location?: string; + imgList?: string[]; + /** 更新才有 */ + deviceMachineId?: number; +}; + +export type AddDeviceMachineUsingPostResponses = { + 200: ApiResult; +}; + +export type AndonClose = { + andonRecordId: number; + disposeDesc?: string; + disposeImgUrls?: string[]; +}; + +export type AndonRecordNode = { + id?: number; + andonRecordId?: number; + /** 节点描述 */ + nodeDesc?: string; + /** 节点备注 */ + nodeRemark?: string; + /** 1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销 */ + nodeType?: string; + nodeTypeName?: string; + nodeUserId?: number; + nodeUserName?: string; + createdUserId?: number; + createdTime?: string; + modifyiedUserId?: number; + modifyiedTime?: string; +}; + +export type AndonRecordQuery = { + queryDeptId?: number; + /** 与我有关, 处理人或者报告人是我或者接收人是我 */ + myRelatedFlag?: string; + /** 处理状态 1 查询未处理的 2 查询已处理的 */ + queryDisposeStatus?: string; + /** 1 60天内 2 今天 3 本月 5 日期范围查询 默认1 */ + queryTimeType?: string; + factoryId?: number; + startTime?: string; + endTime?: string; + size?: number; + current?: number; +}; + +export type AndonRecordVO = { + /** ID */ + id?: number; + /** 工厂id */ + factoryId?: number; + factoryName?: string; + deptId?: number; + deptName?: string; + /** 车间id */ + workshopId?: number; + workshopName?: string; + /** 产线d */ + lineId?: number; + lineName?: string; + /** 设备ID */ + machineId?: number; + /** 灯ID */ + signalId?: number; + /** 日历排班ID */ + calendarDetailId?: number; + calendarId?: number; + calendarDate?: string; + shiftDetailName?: string; + machineName?: string; + machineCode?: string; + /** 事件配置ID */ + configId?: number; + configName?: string; + eventName?: string; + /** 报告人ID */ + reportUserId?: number; + reportUserName?: string; + /** 开始时间 */ + reportTime?: string; + /** 报告备注 */ + reportComments?: string; + /** 报告日期 */ + reportDate?: string; + /** 优先级 */ + priority?: string; + /** 通知人ID列表 */ + notifyUseridStrs?: string; + /** 接收人 */ + receiveUserId?: number; + receiveUserName?: string; + /** 接收时间 */ + receiveTime?: string; + /** 接收用时 */ + receiveDurationTime?: number; + disposeDurationTime?: number; + /** 处理人ID */ + disposeUserId?: number; + disposeUserName?: string; + /** 处理方式 */ + disposeDesc?: string; + /** 处理时间 */ + disposeTime?: string; + /** 持续时间,单位秒 */ + totalDurationTime?: number; + /** 来源,1 移动端,2 安灯盒按钮, 3 异常事件 */ + sourceType?: string; + /** 状态,1 已上报,2 已接收,3 已处理, 9 已撤销 */ + state?: string; + /** 原因分析 */ + eventAnalysis?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + /** oee明细ID */ + oeeDetailId?: number; + workCenterName?: string; + workCenterCode?: string; + disposeUserNames?: string; + disposeUserIds?: string; + totalDurationTimeSt?: string; + receiveDurationTimeSt?: string; + disposeDurationTimeSt?: string; + /** 表状态,1 已上报,2 已接收,3 已处理, 9 已撤销转换状态 已申请 已响应 已关闭 已撤销 */ + statusText?: string; + disposeUserList?: PlatformUser[]; + recordNodeList?: AndonRecordNode[]; + showColor?: string; + workCenterId?: number; + shiftShowColor?: string; + shiftStartTime?: string; + shiftEndTime?: string; + reportImgList?: string[]; + disposeImgList?: string[]; + reportImgUrls?: string; + disposeImgUrls?: string; + shiftName?: string; + completedUserId?: number; + completedUserName?: string; +}; + +export type AndonReq = { + configId: number; + configName: string; + imgList?: string[]; + reportComments?: string; + /** 处理用户 */ + selectHandlerUserIds: number[]; + workCenterId: number; + reqUserId?: number; + /** 来源 */ + sourceType?: string; + /** 工序派工id */ + processDispatchId?: number; +}; + +export type AndonReqUsingPostResponses = { + 200: ApiResult; +}; + +export type ApiResult = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: Record; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultAndonRecordVO = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /**

安灯_记录

*/ + data?: AndonRecordVO; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultMyPageAndonRecordVO = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: MyPageAndonRecordVO; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultString = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: string; + /** 是否成功 */ + success?: boolean; +}; + +export type CancelRemarkStatusUsingPostResponses = { + 200: ApiResult; +}; + +export type ChangeAndonEventTypeUsingPostResponses = { + 200: ApiResult; +}; + +export type ChangeDisposeAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type CloseAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAAndonReqCfgUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAbnormalEventCfgListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAbnormalRecordUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAllUserUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAllWorkshopLineUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAndonRecordInfoUsingPostResponses = { + 200: ApiResultAndonRecordVO; +}; + +export type GetAndonRecordListUsingPostResponses = { + 200: ApiResultMyPageAndonRecordVO; +}; + +export type GetCurrentShiftUsingPostResponses = { + 200: ApiResultString; +}; + +export type GetDeviceListUsingPostBody = string; + +export type GetDeviceListUsingPostParams = { + /** ID */ + id?: number; + /** 工厂ID */ + factoryId?: number; + deptId?: number; + /** 车间ID */ + workshopId?: number; + /** 产线ID */ + lineId?: number; + /** 分类ID */ + categoryId?: number; + /** 灯ID */ + signalId?: number; + lightSn?: string; + /** 设备编号 */ + machineCode?: string; + /** 设备名称 */ + machineName?: string; + /** 拼音码 */ + pinyin?: string; + /** 五笔码 */ + wubi?: string; + /** 医院图片 */ + imgUrlStrs?: string; + /** 管理员ID */ + manageUserId?: number; + /** 品牌 */ + trademark?: string; + /** 型号 */ + model?: string; + /** 序列号 */ + serialNo?: string; + /** 供应商 */ + supplier?: string; + /** 启用日期 */ + activationDate?: string; + /** 验收日期 */ + checkDate?: string; + /** 出厂日期 */ + productionDate?: string; + /** 脉冲间隔 */ + pulseInterval?: number; + /** 标准利用率 */ + standardUseRate?: string; + /** 放置地点 */ + location?: string; + /** 状态,1启用,2 停用 */ + state?: string; + /** 备注 */ + remark?: string; + /** 删除标记 */ + deleteFlag?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + searchKey?: string; + /** 0 关机,1 运行,2 等待,3 异常 */ + oeeState?: string; + oeeTime?: string; + stateRecordId?: number; + stateStartTime?: string; +}; + +export type GetDeviceListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetEsopListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetUserWorkshopWorkcenterUsingPostParams = { + selectDeptId?: number; +}; + +export type GetUserWorkshopWorkcenterUsingPostResponses = { + 200: ApiResult; +}; + +export type GetWorkCenterUsingPostResponses = { + 200: ApiResult; +}; + +export type JSONObject = { + key?: Record; +}; + +export type MyPageAndonRecordVO = { + records?: AndonRecordVO[]; + total?: number; + size?: number; + current?: number; + orders?: OrderItem[]; + optimizeCountSql?: boolean; + searchCount?: boolean; + optimizeJoinOfCountSql?: boolean; + maxLimit?: number; + countId?: string; + startTime?: string; + startTimeStr?: string; + endTime?: string; + endTimeStr?: string; + hasNextPage?: boolean; +}; + +export type OrderItem = { + column?: string; + asc?: boolean; +}; + +export type PlatformUser = { + /** 用户ID */ + id?: number; + /** 团队id */ + teamId?: number; + /** 工厂id */ + factoryId?: number; + deptId?: number; + /** 所属车间id */ + workshopId?: number; + /** 所属产线d */ + lineId?: number; + /** 用户姓名 */ + userName?: string; + /** 邮箱 */ + email?: string; + /** 职称 */ + jobTitle?: string; + /** 用户工号 */ + jobNo?: string; + /** 用户账号 */ + accountNo?: string; + /** 用户密码 */ + password?: string; + /** 身份证号 */ + idNumber?: string; + /** 出生日期 */ + dateOfBirth?: string; + /** 联系电话 */ + telephone?: string; + /** 头像url */ + headImageUrl?: string; + /** 用户类型,1 平台,2 团队,3 工厂 */ + userType?: string; + /** 管理员标识,1 管理员,0 非管理员 */ + adminFlag?: string; + /** 状态(1:在用 2:停用) */ + state?: string; + /** 是否删除(0:否 1:是) */ + deleteFlag?: string; + /** 修改密码时间 */ + passwordModifyiedTime?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + /** 1男 2女 9 未知 */ + genderCode?: string; + publicOpenId?: string; + currentFactoryId?: number; + /** 备注 */ + remark?: string; +}; + +export type ReceiveAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type RemarkStatusUsingPostResponses = { + 200: ApiResult; +}; + +export type ReportAbnormalEventDTO = { + /** 异常记录id */ + abnormalRecordId: number; + /** 事件id */ + eventId?: number; + /** 工序派工id */ + processDispatchId?: number; +}; + +export type ReportAbnormalEventUsingPostResponses = { + 200: ApiResult; +}; + +export type UpdateDeviceMachineUsingPostResponses = { + 200: ApiResult; +}; +/* eslint-disable */ +// @ts-ignore +import request from 'axios'; + +import * as API from './types'; + +/** addAndonRecordNodeDesc POST /api/web/workcenter-operate/add-andon-record-node-desc */ +export function addAndonRecordNodeDescUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/add-andon-record-node-desc', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** addDeviceMachine POST /api/web/workcenter-operate/add-device-machine */ +export function addDeviceMachineUsingPost({ + body, + options, +}: { + body: API.AddDeviceMachine; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/add-device-machine', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 安灯请求 POST /api/web/workcenter-operate/andon-req */ +export function andonReqUsingPost({ + body, + options, +}: { + body: API.AndonReq; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/andon-req', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** cancelRemarkStatus POST /api/web/workcenter-operate/cancel-remark-status */ +export function cancelRemarkStatusUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/cancel-remark-status', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 改变安灯事件类型 POST /api/web/workcenter-operate/change-andon-event-type */ +export function changeAndonEventTypeUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/change-andon-event-type', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 改变安灯处理人 POST /api/web/workcenter-operate/change-dispose-andon */ +export function changeDisposeAndonUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/change-dispose-andon', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 关闭安灯 POST /api/web/workcenter-operate/close-andon */ +export function closeAndonUsingPost({ + body, + options, +}: { + body: API.AndonClose; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/close-andon', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** getAndonReqCfg POST /api/web/workcenter-operate/get-aAndon-req-cfg */ +export function getAAndonReqCfgUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-aAndon-req-cfg', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 获取异常事件配置 POST /api/web/workcenter-operate/get-abnormal-event-cfg-list */ +export function getAbnormalEventCfgListUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-abnormal-event-cfg-list', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAbnormalRecord POST /api/web/workcenter-operate/get-abnormal-record */ +export function getAbnormalRecordUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-abnormal-record', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAllUser POST /api/web/workcenter-operate/get-all-user */ +export function getAllUserUsingPost({ + options, +}: { + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-all-user', { + method: 'POST', + ...(options || {}), + }); +} + +/** getAllWorkshopAndLineList POST /api/web/workcenter-operate/get-all-workshop-line */ +export function getAllWorkshopLineUsingPost({ + options, +}: { + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-all-workshop-line', + { + method: 'POST', + ...(options || {}), + } + ); +} + +/** 获取安灯记录详情 POST /api/web/workcenter-operate/get-andon-record-info */ +export function getAndonRecordInfoUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-andon-record-info', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAndonRecordList POST /api/web/workcenter-operate/get-andon-record-list */ +export function getAndonRecordListUsingPost({ + body, + options, +}: { + body: API.AndonRecordQuery; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-andon-record-list', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getCurrentShift POST /api/web/workcenter-operate/get-current-shift */ +export function getCurrentShiftUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-current-shift', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getDeviceList POST /api/web/workcenter-operate/get-device-list */ +export function getDeviceListUsingPost({ + params, + body, + options, +}: { + // 叠加生成的Param类型 (非body参数openapi默认没有生成对象) + params: API.GetDeviceListUsingPostParams; + body: API.GetDeviceListUsingPostBody; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-device-list', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + params: { + ...params, + }, + data: body, + ...(options || {}), + }); +} + +/** getEsopList POST /api/web/workcenter-operate/get-esop-list */ +export function getEsopListUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-esop-list', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** 获取车间产线结构 POST /api/web/workcenter-operate/get-user-workshop-workcenter */ +export function getUserWorkshopWorkcenterUsingPost({ + params, + options, +}: { + // 叠加生成的Param类型 (非body参数openapi默认没有生成对象) + params: API.GetUserWorkshopWorkcenterUsingPostParams; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-user-workshop-workcenter', + { + method: 'POST', + params: { + ...params, + }, + ...(options || {}), + } + ); +} + +/** getWorkCenter POST /api/web/workcenter-operate/get-work-center */ +export function getWorkCenterUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-work-center', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** receiveAndon POST /api/web/workcenter-operate/receive-andon */ +export function receiveAndonUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/receive-andon', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** remarkStatus POST /api/web/workcenter-operate/remark-status */ +export function remarkStatusUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/remark-status', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** 报告异常事件 POST /api/web/workcenter-operate/report-abnormal-event */ +export function reportAbnormalEventUsingPost({ + body, + options, +}: { + body: API.ReportAbnormalEventDTO; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/report-abnormal-event', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** updateDeviceMachine POST /api/web/workcenter-operate/update-device-machine */ +export function updateDeviceMachineUsingPost({ + body, + options, +}: { + body: API.AddDeviceMachine; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/update-device-machine', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} diff --git "a/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 DisplayTypeLabel hook - \344\277\256\346\224\271\347\261\273\345\236\213\346\240\207\347\255\276.snap" "b/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 DisplayTypeLabel hook - \344\277\256\346\224\271\347\261\273\345\236\213\346\240\207\347\255\276.snap" new file mode 100644 index 0000000..c7ffd32 --- /dev/null +++ "b/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 DisplayTypeLabel hook - \344\277\256\346\224\271\347\261\273\345\236\213\346\240\207\347\255\276.snap" @@ -0,0 +1,1275 @@ +/* eslint-disable */ +// @ts-ignore +import * as API from './types'; + +export function displayLabelAddDeviceMachine( + field: keyof API.LabelAddDeviceMachine +) { + return { + lineId: 'lineId', + lineName: 'lineName', + machineCode: 'machineCode', + machineName: 'machineName', + manageUserId: 'manageUserId', + manageUserName: 'manageUserName', + lightSn: 'lightSn', + signalId: 'signalId', + serialNo: 'serialNo', + location: 'location', + imgList: 'imgList', + deviceMachineId: '更新才有', + }[field]; +} + +export function displayLabelAndonClose(field: keyof API.LabelAndonClose) { + return { + andonRecordId: 'andonRecordId', + disposeDesc: 'disposeDesc', + disposeImgUrls: 'disposeImgUrls', + }[field]; +} + +export function displayLabelAndonRecordNode( + field: keyof API.LabelAndonRecordNode +) { + return { + id: 'id', + andonRecordId: 'andonRecordId', + nodeDesc: '节点描述', + nodeRemark: '节点备注', + nodeType: + '1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销', + nodeTypeName: 'nodeTypeName', + nodeUserId: 'nodeUserId', + nodeUserName: 'nodeUserName', + createdUserId: 'createdUserId', + createdTime: 'createdTime', + modifyiedUserId: 'modifyiedUserId', + modifyiedTime: 'modifyiedTime', + }[field]; +} + +export function displayLabelAndonRecordQuery( + field: keyof API.LabelAndonRecordQuery +) { + return { + queryDeptId: 'queryDeptId', + myRelatedFlag: '与我有关, 处理人或者报告人是我或者接收人是我', + queryDisposeStatus: '处理状态 1 查询未处理的 2 查询已处理的', + queryTimeType: '1 60天内 2 今天 3 本月 5 日期范围查询 默认1', + factoryId: 'factoryId', + startTime: 'startTime', + endTime: 'endTime', + size: 'size', + current: 'current', + }[field]; +} + +export function displayLabelAndonRecordVO(field: keyof API.LabelAndonRecordVO) { + return { + id: 'ID', + factoryId: '工厂id', + factoryName: 'factoryName', + deptId: 'deptId', + deptName: 'deptName', + workshopId: '车间id', + workshopName: 'workshopName', + lineId: '产线d', + lineName: 'lineName', + machineId: '设备ID', + signalId: '灯ID', + calendarDetailId: '日历排班ID', + calendarId: 'calendarId', + calendarDate: 'calendarDate', + shiftDetailName: 'shiftDetailName', + machineName: 'machineName', + machineCode: 'machineCode', + configId: '事件配置ID', + configName: 'configName', + eventName: 'eventName', + reportUserId: '报告人ID', + reportUserName: 'reportUserName', + reportTime: '开始时间', + reportComments: '报告备注', + reportDate: '报告日期', + priority: '优先级', + notifyUseridStrs: '通知人ID列表', + receiveUserId: '接收人', + receiveUserName: 'receiveUserName', + receiveTime: '接收时间', + receiveDurationTime: '接收用时', + disposeDurationTime: 'disposeDurationTime', + disposeUserId: '处理人ID', + disposeUserName: 'disposeUserName', + disposeDesc: '处理方式', + disposeTime: '处理时间', + totalDurationTime: '持续时间,单位秒', + sourceType: '来源,1 移动端,2 安灯盒按钮, 3 异常事件', + state: '状态,1 已上报,2 已接收,3 已处理, 9 已撤销', + eventAnalysis: '原因分析', + createdUserId: '创建人', + createdTime: '创建时间', + modifyiedUserId: '最后更新人', + modifyiedTime: '最后更新时间', + datetimeStamp: '时间戳', + oeeDetailId: 'oee明细ID', + workCenterName: 'workCenterName', + workCenterCode: 'workCenterCode', + disposeUserNames: 'disposeUserNames', + disposeUserIds: 'disposeUserIds', + totalDurationTimeSt: 'totalDurationTimeSt', + receiveDurationTimeSt: 'receiveDurationTimeSt', + disposeDurationTimeSt: 'disposeDurationTimeSt', + statusText: + '表状态,1 已上报,2 已接收,3 已处理, 9 已撤销转换状态 已申请 已响应 已关闭 已撤销', + disposeUserList: 'disposeUserList', + recordNodeList: 'recordNodeList', + showColor: 'showColor', + workCenterId: 'workCenterId', + shiftShowColor: 'shiftShowColor', + shiftStartTime: 'shiftStartTime', + shiftEndTime: 'shiftEndTime', + reportImgList: 'reportImgList', + disposeImgList: 'disposeImgList', + reportImgUrls: 'reportImgUrls', + disposeImgUrls: 'disposeImgUrls', + shiftName: 'shiftName', + completedUserId: 'completedUserId', + completedUserName: 'completedUserName', + }[field]; +} + +export function displayLabelAndonReq(field: keyof API.LabelAndonReq) { + return { + configId: 'configId', + configName: 'configName', + imgList: 'imgList', + reportComments: 'reportComments', + selectHandlerUserIds: '处理用户', + workCenterId: 'workCenterId', + reqUserId: 'reqUserId', + sourceType: '来源', + processDispatchId: '工序派工id', + }[field]; +} + +export function displayLabelApiResult(field: keyof API.LabelApiResult) { + return { + code: '状态码', + message: '提示', + data: '数据', + success: '是否成功', + }[field]; +} + +export function displayLabelApiResultAndonRecordVO( + field: keyof API.LabelApiResultAndonRecordVO +) { + return { + code: '状态码', + message: '提示', + data: '

安灯_记录

', + success: '是否成功', + }[field]; +} + +export function displayLabelApiResultMyPageAndonRecordVO( + field: keyof API.LabelApiResultMyPageAndonRecordVO +) { + return { + code: '状态码', + message: '提示', + data: '数据', + success: '是否成功', + }[field]; +} + +export function displayLabelApiResultString( + field: keyof API.LabelApiResultString +) { + return { + code: '状态码', + message: '提示', + data: '数据', + success: '是否成功', + }[field]; +} + +export function displayLabelGetDeviceListUsingPostParams( + field: keyof API.LabelGetDeviceListUsingPostParams +) { + return { + id: 'ID', + factoryId: '工厂ID', + deptId: 'deptId', + workshopId: '车间ID', + lineId: '产线ID', + categoryId: '分类ID', + signalId: '灯ID', + lightSn: 'lightSn', + machineCode: '设备编号', + machineName: '设备名称', + pinyin: '拼音码', + wubi: '五笔码', + imgUrlStrs: '医院图片', + manageUserId: '管理员ID', + trademark: '品牌', + model: '型号', + serialNo: '序列号', + supplier: '供应商', + activationDate: '启用日期', + checkDate: '验收日期', + productionDate: '出厂日期', + pulseInterval: '脉冲间隔', + standardUseRate: '标准利用率', + location: '放置地点', + state: '状态,1启用,2 停用', + remark: '备注', + deleteFlag: '删除标记', + createdUserId: '创建人', + createdTime: '创建时间', + modifyiedUserId: '最后更新人', + modifyiedTime: '最后更新时间', + datetimeStamp: '时间戳', + searchKey: 'searchKey', + oeeState: '0 关机,1 运行,2 等待,3 异常', + oeeTime: 'oeeTime', + stateRecordId: 'stateRecordId', + stateStartTime: 'stateStartTime', + }[field]; +} + +export function displayLabelGetUserWorkshopWorkcenterUsingPostParams( + field: keyof API.LabelGetUserWorkshopWorkcenterUsingPostParams +) { + return { + selectDeptId: 'selectDeptId', + }[field]; +} + +export function displayLabelJSONObject(field: keyof API.LabelJSONObject) { + return { + key: 'key', + }[field]; +} + +export function displayLabelMyPageAndonRecordVO( + field: keyof API.LabelMyPageAndonRecordVO +) { + return { + records: 'records', + total: 'total', + size: 'size', + current: 'current', + orders: 'orders', + optimizeCountSql: 'optimizeCountSql', + searchCount: 'searchCount', + optimizeJoinOfCountSql: 'optimizeJoinOfCountSql', + maxLimit: 'maxLimit', + countId: 'countId', + startTime: 'startTime', + startTimeStr: 'startTimeStr', + endTime: 'endTime', + endTimeStr: 'endTimeStr', + hasNextPage: 'hasNextPage', + }[field]; +} + +export function displayLabelOrderItem(field: keyof API.LabelOrderItem) { + return { + column: 'column', + asc: 'asc', + }[field]; +} + +export function displayLabelPlatformUser(field: keyof API.LabelPlatformUser) { + return { + id: '用户ID', + teamId: '团队id', + factoryId: '工厂id', + deptId: 'deptId', + workshopId: '所属车间id', + lineId: '所属产线d', + userName: '用户姓名', + email: '邮箱', + jobTitle: '职称', + jobNo: '用户工号', + accountNo: '用户账号', + password: '用户密码', + idNumber: '身份证号', + dateOfBirth: '出生日期', + telephone: '联系电话', + headImageUrl: '头像url', + userType: '用户类型,1 平台,2 团队,3 工厂', + adminFlag: '管理员标识,1 管理员,0 非管理员', + state: '状态(1:在用 2:停用)', + deleteFlag: '是否删除(0:否 1:是)', + passwordModifyiedTime: '修改密码时间', + createdUserId: '创建人', + createdTime: '创建时间', + modifyiedUserId: '最后更新人', + modifyiedTime: '最后更新时间', + datetimeStamp: '时间戳', + genderCode: '1男 2女 9 未知', + publicOpenId: 'publicOpenId', + currentFactoryId: 'currentFactoryId', + remark: '备注', + }[field]; +} + +export function displayLabelReportAbnormalEventDTO( + field: keyof API.LabelReportAbnormalEventDTO +) { + return { + abnormalRecordId: '异常记录id', + eventId: '事件id', + processDispatchId: '工序派工id', + }[field]; +} +/* eslint-disable */ +// @ts-ignore +export * from './types'; +export * from './displayTypeLabel'; + +export * from './web'; +/* eslint-disable */ +// @ts-ignore + +export type AddAndonRecordNodeDescUsingPostResponses = { + 200: ApiResult; +}; + +export type AddDeviceMachine = { + lineId: number; + lineName?: string; + machineCode: string; + machineName: string; + manageUserId?: number; + manageUserName?: string; + lightSn: string; + signalId?: number; + serialNo?: string; + location?: string; + imgList?: string[]; + /** 更新才有 */ + deviceMachineId?: number; +}; + +export type AddDeviceMachineUsingPostResponses = { + 200: ApiResult; +}; + +export type AndonClose = { + andonRecordId: number; + disposeDesc?: string; + disposeImgUrls?: string[]; +}; + +export type AndonRecordNode = { + id?: number; + andonRecordId?: number; + /** 节点描述 */ + nodeDesc?: string; + /** 节点备注 */ + nodeRemark?: string; + /** 1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销 */ + nodeType?: string; + nodeTypeName?: string; + nodeUserId?: number; + nodeUserName?: string; + createdUserId?: number; + createdTime?: string; + modifyiedUserId?: number; + modifyiedTime?: string; +}; + +export type AndonRecordQuery = { + queryDeptId?: number; + /** 与我有关, 处理人或者报告人是我或者接收人是我 */ + myRelatedFlag?: string; + /** 处理状态 1 查询未处理的 2 查询已处理的 */ + queryDisposeStatus?: string; + /** 1 60天内 2 今天 3 本月 5 日期范围查询 默认1 */ + queryTimeType?: string; + factoryId?: number; + startTime?: string; + endTime?: string; + size?: number; + current?: number; +}; + +export type AndonRecordVO = { + /** ID */ + id?: number; + /** 工厂id */ + factoryId?: number; + factoryName?: string; + deptId?: number; + deptName?: string; + /** 车间id */ + workshopId?: number; + workshopName?: string; + /** 产线d */ + lineId?: number; + lineName?: string; + /** 设备ID */ + machineId?: number; + /** 灯ID */ + signalId?: number; + /** 日历排班ID */ + calendarDetailId?: number; + calendarId?: number; + calendarDate?: string; + shiftDetailName?: string; + machineName?: string; + machineCode?: string; + /** 事件配置ID */ + configId?: number; + configName?: string; + eventName?: string; + /** 报告人ID */ + reportUserId?: number; + reportUserName?: string; + /** 开始时间 */ + reportTime?: string; + /** 报告备注 */ + reportComments?: string; + /** 报告日期 */ + reportDate?: string; + /** 优先级 */ + priority?: string; + /** 通知人ID列表 */ + notifyUseridStrs?: string; + /** 接收人 */ + receiveUserId?: number; + receiveUserName?: string; + /** 接收时间 */ + receiveTime?: string; + /** 接收用时 */ + receiveDurationTime?: number; + disposeDurationTime?: number; + /** 处理人ID */ + disposeUserId?: number; + disposeUserName?: string; + /** 处理方式 */ + disposeDesc?: string; + /** 处理时间 */ + disposeTime?: string; + /** 持续时间,单位秒 */ + totalDurationTime?: number; + /** 来源,1 移动端,2 安灯盒按钮, 3 异常事件 */ + sourceType?: string; + /** 状态,1 已上报,2 已接收,3 已处理, 9 已撤销 */ + state?: string; + /** 原因分析 */ + eventAnalysis?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + /** oee明细ID */ + oeeDetailId?: number; + workCenterName?: string; + workCenterCode?: string; + disposeUserNames?: string; + disposeUserIds?: string; + totalDurationTimeSt?: string; + receiveDurationTimeSt?: string; + disposeDurationTimeSt?: string; + /** 表状态,1 已上报,2 已接收,3 已处理, 9 已撤销转换状态 已申请 已响应 已关闭 已撤销 */ + statusText?: string; + disposeUserList?: PlatformUser[]; + recordNodeList?: AndonRecordNode[]; + showColor?: string; + workCenterId?: number; + shiftShowColor?: string; + shiftStartTime?: string; + shiftEndTime?: string; + reportImgList?: string[]; + disposeImgList?: string[]; + reportImgUrls?: string; + disposeImgUrls?: string; + shiftName?: string; + completedUserId?: number; + completedUserName?: string; +}; + +export type AndonReq = { + configId: number; + configName: string; + imgList?: string[]; + reportComments?: string; + /** 处理用户 */ + selectHandlerUserIds: number[]; + workCenterId: number; + reqUserId?: number; + /** 来源 */ + sourceType?: string; + /** 工序派工id */ + processDispatchId?: number; +}; + +export type AndonReqUsingPostResponses = { + 200: ApiResult; +}; + +export type ApiResult = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: Record; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultAndonRecordVO = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /**

安灯_记录

*/ + data?: AndonRecordVO; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultMyPageAndonRecordVO = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: MyPageAndonRecordVO; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultString = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: string; + /** 是否成功 */ + success?: boolean; +}; + +export type CancelRemarkStatusUsingPostResponses = { + 200: ApiResult; +}; + +export type ChangeAndonEventTypeUsingPostResponses = { + 200: ApiResult; +}; + +export type ChangeDisposeAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type CloseAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAAndonReqCfgUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAbnormalEventCfgListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAbnormalRecordUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAllUserUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAllWorkshopLineUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAndonRecordInfoUsingPostResponses = { + 200: ApiResultAndonRecordVO; +}; + +export type GetAndonRecordListUsingPostResponses = { + 200: ApiResultMyPageAndonRecordVO; +}; + +export type GetCurrentShiftUsingPostResponses = { + 200: ApiResultString; +}; + +export type GetDeviceListUsingPostBody = string; + +export type GetDeviceListUsingPostParams = { + /** ID */ + id?: number; + /** 工厂ID */ + factoryId?: number; + deptId?: number; + /** 车间ID */ + workshopId?: number; + /** 产线ID */ + lineId?: number; + /** 分类ID */ + categoryId?: number; + /** 灯ID */ + signalId?: number; + lightSn?: string; + /** 设备编号 */ + machineCode?: string; + /** 设备名称 */ + machineName?: string; + /** 拼音码 */ + pinyin?: string; + /** 五笔码 */ + wubi?: string; + /** 医院图片 */ + imgUrlStrs?: string; + /** 管理员ID */ + manageUserId?: number; + /** 品牌 */ + trademark?: string; + /** 型号 */ + model?: string; + /** 序列号 */ + serialNo?: string; + /** 供应商 */ + supplier?: string; + /** 启用日期 */ + activationDate?: string; + /** 验收日期 */ + checkDate?: string; + /** 出厂日期 */ + productionDate?: string; + /** 脉冲间隔 */ + pulseInterval?: number; + /** 标准利用率 */ + standardUseRate?: string; + /** 放置地点 */ + location?: string; + /** 状态,1启用,2 停用 */ + state?: string; + /** 备注 */ + remark?: string; + /** 删除标记 */ + deleteFlag?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + searchKey?: string; + /** 0 关机,1 运行,2 等待,3 异常 */ + oeeState?: string; + oeeTime?: string; + stateRecordId?: number; + stateStartTime?: string; +}; + +export type GetDeviceListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetEsopListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetUserWorkshopWorkcenterUsingPostParams = { + selectDeptId?: number; +}; + +export type GetUserWorkshopWorkcenterUsingPostResponses = { + 200: ApiResult; +}; + +export type GetWorkCenterUsingPostResponses = { + 200: ApiResult; +}; + +export type JSONObject = { + key?: Record; +}; + +export type MyPageAndonRecordVO = { + records?: AndonRecordVO[]; + total?: number; + size?: number; + current?: number; + orders?: OrderItem[]; + optimizeCountSql?: boolean; + searchCount?: boolean; + optimizeJoinOfCountSql?: boolean; + maxLimit?: number; + countId?: string; + startTime?: string; + startTimeStr?: string; + endTime?: string; + endTimeStr?: string; + hasNextPage?: boolean; +}; + +export type OrderItem = { + column?: string; + asc?: boolean; +}; + +export type PlatformUser = { + /** 用户ID */ + id?: number; + /** 团队id */ + teamId?: number; + /** 工厂id */ + factoryId?: number; + deptId?: number; + /** 所属车间id */ + workshopId?: number; + /** 所属产线d */ + lineId?: number; + /** 用户姓名 */ + userName?: string; + /** 邮箱 */ + email?: string; + /** 职称 */ + jobTitle?: string; + /** 用户工号 */ + jobNo?: string; + /** 用户账号 */ + accountNo?: string; + /** 用户密码 */ + password?: string; + /** 身份证号 */ + idNumber?: string; + /** 出生日期 */ + dateOfBirth?: string; + /** 联系电话 */ + telephone?: string; + /** 头像url */ + headImageUrl?: string; + /** 用户类型,1 平台,2 团队,3 工厂 */ + userType?: string; + /** 管理员标识,1 管理员,0 非管理员 */ + adminFlag?: string; + /** 状态(1:在用 2:停用) */ + state?: string; + /** 是否删除(0:否 1:是) */ + deleteFlag?: string; + /** 修改密码时间 */ + passwordModifyiedTime?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + /** 1男 2女 9 未知 */ + genderCode?: string; + publicOpenId?: string; + currentFactoryId?: number; + /** 备注 */ + remark?: string; +}; + +export type ReceiveAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type RemarkStatusUsingPostResponses = { + 200: ApiResult; +}; + +export type ReportAbnormalEventDTO = { + /** 异常记录id */ + abnormalRecordId: number; + /** 事件id */ + eventId?: number; + /** 工序派工id */ + processDispatchId?: number; +}; + +export type ReportAbnormalEventUsingPostResponses = { + 200: ApiResult; +}; + +export type UpdateDeviceMachineUsingPostResponses = { + 200: ApiResult; +}; +/* eslint-disable */ +// @ts-ignore +import request from 'axios'; + +import * as API from './types'; + +/** addAndonRecordNodeDesc POST /api/web/workcenter-operate/add-andon-record-node-desc */ +export function addAndonRecordNodeDescUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/add-andon-record-node-desc', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** addDeviceMachine POST /api/web/workcenter-operate/add-device-machine */ +export function addDeviceMachineUsingPost({ + body, + options, +}: { + body: API.AddDeviceMachine; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/add-device-machine', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 安灯请求 POST /api/web/workcenter-operate/andon-req */ +export function andonReqUsingPost({ + body, + options, +}: { + body: API.AndonReq; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/andon-req', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** cancelRemarkStatus POST /api/web/workcenter-operate/cancel-remark-status */ +export function cancelRemarkStatusUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/cancel-remark-status', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 改变安灯事件类型 POST /api/web/workcenter-operate/change-andon-event-type */ +export function changeAndonEventTypeUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/change-andon-event-type', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 改变安灯处理人 POST /api/web/workcenter-operate/change-dispose-andon */ +export function changeDisposeAndonUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/change-dispose-andon', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 关闭安灯 POST /api/web/workcenter-operate/close-andon */ +export function closeAndonUsingPost({ + body, + options, +}: { + body: API.AndonClose; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/close-andon', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** getAndonReqCfg POST /api/web/workcenter-operate/get-aAndon-req-cfg */ +export function getAAndonReqCfgUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-aAndon-req-cfg', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 获取异常事件配置 POST /api/web/workcenter-operate/get-abnormal-event-cfg-list */ +export function getAbnormalEventCfgListUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-abnormal-event-cfg-list', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAbnormalRecord POST /api/web/workcenter-operate/get-abnormal-record */ +export function getAbnormalRecordUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-abnormal-record', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAllUser POST /api/web/workcenter-operate/get-all-user */ +export function getAllUserUsingPost({ + options, +}: { + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-all-user', { + method: 'POST', + ...(options || {}), + }); +} + +/** getAllWorkshopAndLineList POST /api/web/workcenter-operate/get-all-workshop-line */ +export function getAllWorkshopLineUsingPost({ + options, +}: { + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-all-workshop-line', + { + method: 'POST', + ...(options || {}), + } + ); +} + +/** 获取安灯记录详情 POST /api/web/workcenter-operate/get-andon-record-info */ +export function getAndonRecordInfoUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-andon-record-info', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAndonRecordList POST /api/web/workcenter-operate/get-andon-record-list */ +export function getAndonRecordListUsingPost({ + body, + options, +}: { + body: API.AndonRecordQuery; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-andon-record-list', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getCurrentShift POST /api/web/workcenter-operate/get-current-shift */ +export function getCurrentShiftUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-current-shift', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getDeviceList POST /api/web/workcenter-operate/get-device-list */ +export function getDeviceListUsingPost({ + params, + body, + options, +}: { + // 叠加生成的Param类型 (非body参数openapi默认没有生成对象) + params: API.GetDeviceListUsingPostParams; + body: API.GetDeviceListUsingPostBody; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-device-list', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + params: { + ...params, + }, + data: body, + ...(options || {}), + }); +} + +/** getEsopList POST /api/web/workcenter-operate/get-esop-list */ +export function getEsopListUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-esop-list', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** 获取车间产线结构 POST /api/web/workcenter-operate/get-user-workshop-workcenter */ +export function getUserWorkshopWorkcenterUsingPost({ + params, + options, +}: { + // 叠加生成的Param类型 (非body参数openapi默认没有生成对象) + params: API.GetUserWorkshopWorkcenterUsingPostParams; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-user-workshop-workcenter', + { + method: 'POST', + params: { + ...params, + }, + ...(options || {}), + } + ); +} + +/** getWorkCenter POST /api/web/workcenter-operate/get-work-center */ +export function getWorkCenterUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-work-center', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** receiveAndon POST /api/web/workcenter-operate/receive-andon */ +export function receiveAndonUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/receive-andon', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** remarkStatus POST /api/web/workcenter-operate/remark-status */ +export function remarkStatusUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/remark-status', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** 报告异常事件 POST /api/web/workcenter-operate/report-abnormal-event */ +export function reportAbnormalEventUsingPost({ + body, + options, +}: { + body: API.ReportAbnormalEventDTO; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/report-abnormal-event', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** updateDeviceMachine POST /api/web/workcenter-operate/update-device-machine */ +export function updateDeviceMachineUsingPost({ + body, + options, +}: { + body: API.AddDeviceMachine; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/update-device-machine', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} diff --git "a/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 Interface hook - \344\277\256\346\224\271JSONObject.snap" "b/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 Interface hook - \344\277\256\346\224\271JSONObject.snap" new file mode 100644 index 0000000..29bbf99 --- /dev/null +++ "b/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 Interface hook - \344\277\256\346\224\271JSONObject.snap" @@ -0,0 +1,944 @@ +/* eslint-disable */ +// @ts-ignore +export * from './types'; + +export * from './web'; +/* eslint-disable */ +// @ts-ignore + +export type AddAndonRecordNodeDescUsingPostResponses = { + 200: ApiResult; +}; + +export type AddDeviceMachine = { + lineId: number; + lineName?: string; + machineCode: string; + machineName: string; + manageUserId?: number; + manageUserName?: string; + lightSn: string; + signalId?: number; + serialNo?: string; + location?: string; + imgList?: string[]; + /** 更新才有 */ + deviceMachineId?: number; +}; + +export type AddDeviceMachineUsingPostResponses = { + 200: ApiResult; +}; + +export type AndonClose = { + andonRecordId: number; + disposeDesc?: string; + disposeImgUrls?: string[]; +}; + +export type AndonRecordNode = { + id?: number; + andonRecordId?: number; + /** 节点描述 */ + nodeDesc?: string; + /** 节点备注 */ + nodeRemark?: string; + /** 1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销 */ + nodeType?: string; + nodeTypeName?: string; + nodeUserId?: number; + nodeUserName?: string; + createdUserId?: number; + createdTime?: string; + modifyiedUserId?: number; + modifyiedTime?: string; +}; + +export type AndonRecordQuery = { + queryDeptId?: number; + /** 与我有关, 处理人或者报告人是我或者接收人是我 */ + myRelatedFlag?: string; + /** 处理状态 1 查询未处理的 2 查询已处理的 */ + queryDisposeStatus?: string; + /** 1 60天内 2 今天 3 本月 5 日期范围查询 默认1 */ + queryTimeType?: string; + factoryId?: number; + startTime?: string; + endTime?: string; + size?: number; + current?: number; +}; + +export type AndonRecordVO = { + /** ID */ + id?: number; + /** 工厂id */ + factoryId?: number; + factoryName?: string; + deptId?: number; + deptName?: string; + /** 车间id */ + workshopId?: number; + workshopName?: string; + /** 产线d */ + lineId?: number; + lineName?: string; + /** 设备ID */ + machineId?: number; + /** 灯ID */ + signalId?: number; + /** 日历排班ID */ + calendarDetailId?: number; + calendarId?: number; + calendarDate?: string; + shiftDetailName?: string; + machineName?: string; + machineCode?: string; + /** 事件配置ID */ + configId?: number; + configName?: string; + eventName?: string; + /** 报告人ID */ + reportUserId?: number; + reportUserName?: string; + /** 开始时间 */ + reportTime?: string; + /** 报告备注 */ + reportComments?: string; + /** 报告日期 */ + reportDate?: string; + /** 优先级 */ + priority?: string; + /** 通知人ID列表 */ + notifyUseridStrs?: string; + /** 接收人 */ + receiveUserId?: number; + receiveUserName?: string; + /** 接收时间 */ + receiveTime?: string; + /** 接收用时 */ + receiveDurationTime?: number; + disposeDurationTime?: number; + /** 处理人ID */ + disposeUserId?: number; + disposeUserName?: string; + /** 处理方式 */ + disposeDesc?: string; + /** 处理时间 */ + disposeTime?: string; + /** 持续时间,单位秒 */ + totalDurationTime?: number; + /** 来源,1 移动端,2 安灯盒按钮, 3 异常事件 */ + sourceType?: string; + /** 状态,1 已上报,2 已接收,3 已处理, 9 已撤销 */ + state?: string; + /** 原因分析 */ + eventAnalysis?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + /** oee明细ID */ + oeeDetailId?: number; + workCenterName?: string; + workCenterCode?: string; + disposeUserNames?: string; + disposeUserIds?: string; + totalDurationTimeSt?: string; + receiveDurationTimeSt?: string; + disposeDurationTimeSt?: string; + /** 表状态,1 已上报,2 已接收,3 已处理, 9 已撤销转换状态 已申请 已响应 已关闭 已撤销 */ + statusText?: string; + disposeUserList?: PlatformUser[]; + recordNodeList?: AndonRecordNode[]; + showColor?: string; + workCenterId?: number; + shiftShowColor?: string; + shiftStartTime?: string; + shiftEndTime?: string; + reportImgList?: string[]; + disposeImgList?: string[]; + reportImgUrls?: string; + disposeImgUrls?: string; + shiftName?: string; + completedUserId?: number; + completedUserName?: string; +}; + +export type AndonReq = { + configId: number; + configName: string; + imgList?: string[]; + reportComments?: string; + /** 处理用户 */ + selectHandlerUserIds: number[]; + workCenterId: number; + reqUserId?: number; + /** 来源 */ + sourceType?: string; + /** 工序派工id */ + processDispatchId?: number; +}; + +export type AndonReqUsingPostResponses = { + 200: ApiResult; +}; + +export type ApiResult = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: Record; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultAndonRecordVO = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /**

安灯_记录

*/ + data?: AndonRecordVO; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultMyPageAndonRecordVO = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: MyPageAndonRecordVO; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultString = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: string; + /** 是否成功 */ + success?: boolean; +}; + +export type CancelRemarkStatusUsingPostResponses = { + 200: ApiResult; +}; + +export type ChangeAndonEventTypeUsingPostResponses = { + 200: ApiResult; +}; + +export type ChangeDisposeAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type CloseAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAAndonReqCfgUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAbnormalEventCfgListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAbnormalRecordUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAllUserUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAllWorkshopLineUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAndonRecordInfoUsingPostResponses = { + 200: ApiResultAndonRecordVO; +}; + +export type GetAndonRecordListUsingPostResponses = { + 200: ApiResultMyPageAndonRecordVO; +}; + +export type GetCurrentShiftUsingPostResponses = { + 200: ApiResultString; +}; + +export type GetDeviceListUsingPostBody = string; + +export type GetDeviceListUsingPostParams = { + /** ID */ + id?: number; + /** 工厂ID */ + factoryId?: number; + deptId?: number; + /** 车间ID */ + workshopId?: number; + /** 产线ID */ + lineId?: number; + /** 分类ID */ + categoryId?: number; + /** 灯ID */ + signalId?: number; + lightSn?: string; + /** 设备编号 */ + machineCode?: string; + /** 设备名称 */ + machineName?: string; + /** 拼音码 */ + pinyin?: string; + /** 五笔码 */ + wubi?: string; + /** 医院图片 */ + imgUrlStrs?: string; + /** 管理员ID */ + manageUserId?: number; + /** 品牌 */ + trademark?: string; + /** 型号 */ + model?: string; + /** 序列号 */ + serialNo?: string; + /** 供应商 */ + supplier?: string; + /** 启用日期 */ + activationDate?: string; + /** 验收日期 */ + checkDate?: string; + /** 出厂日期 */ + productionDate?: string; + /** 脉冲间隔 */ + pulseInterval?: number; + /** 标准利用率 */ + standardUseRate?: string; + /** 放置地点 */ + location?: string; + /** 状态,1启用,2 停用 */ + state?: string; + /** 备注 */ + remark?: string; + /** 删除标记 */ + deleteFlag?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + searchKey?: string; + /** 0 关机,1 运行,2 等待,3 异常 */ + oeeState?: string; + oeeTime?: string; + stateRecordId?: number; + stateStartTime?: string; +}; + +export type GetDeviceListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetEsopListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetUserWorkshopWorkcenterUsingPostParams = { + selectDeptId?: number; +}; + +export type GetUserWorkshopWorkcenterUsingPostResponses = { + 200: ApiResult; +}; + +export type GetWorkCenterUsingPostResponses = { + 200: ApiResult; +}; + +export type JSONObject = Record; + +export type MyPageAndonRecordVO = { + records?: AndonRecordVO[]; + total?: number; + size?: number; + current?: number; + orders?: OrderItem[]; + optimizeCountSql?: boolean; + searchCount?: boolean; + optimizeJoinOfCountSql?: boolean; + maxLimit?: number; + countId?: string; + startTime?: string; + startTimeStr?: string; + endTime?: string; + endTimeStr?: string; + hasNextPage?: boolean; +}; + +export type OrderItem = { + column?: string; + asc?: boolean; +}; + +export type PlatformUser = { + /** 用户ID */ + id?: number; + /** 团队id */ + teamId?: number; + /** 工厂id */ + factoryId?: number; + deptId?: number; + /** 所属车间id */ + workshopId?: number; + /** 所属产线d */ + lineId?: number; + /** 用户姓名 */ + userName?: string; + /** 邮箱 */ + email?: string; + /** 职称 */ + jobTitle?: string; + /** 用户工号 */ + jobNo?: string; + /** 用户账号 */ + accountNo?: string; + /** 用户密码 */ + password?: string; + /** 身份证号 */ + idNumber?: string; + /** 出生日期 */ + dateOfBirth?: string; + /** 联系电话 */ + telephone?: string; + /** 头像url */ + headImageUrl?: string; + /** 用户类型,1 平台,2 团队,3 工厂 */ + userType?: string; + /** 管理员标识,1 管理员,0 非管理员 */ + adminFlag?: string; + /** 状态(1:在用 2:停用) */ + state?: string; + /** 是否删除(0:否 1:是) */ + deleteFlag?: string; + /** 修改密码时间 */ + passwordModifyiedTime?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + /** 1男 2女 9 未知 */ + genderCode?: string; + publicOpenId?: string; + currentFactoryId?: number; + /** 备注 */ + remark?: string; +}; + +export type ReceiveAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type RemarkStatusUsingPostResponses = { + 200: ApiResult; +}; + +export type ReportAbnormalEventDTO = { + /** 异常记录id */ + abnormalRecordId: number; + /** 事件id */ + eventId?: number; + /** 工序派工id */ + processDispatchId?: number; +}; + +export type ReportAbnormalEventUsingPostResponses = { + 200: ApiResult; +}; + +export type UpdateDeviceMachineUsingPostResponses = { + 200: ApiResult; +}; +/* eslint-disable */ +// @ts-ignore +import request from 'axios'; + +import * as API from './types'; + +/** addAndonRecordNodeDesc POST /api/web/workcenter-operate/add-andon-record-node-desc */ +export function addAndonRecordNodeDescUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/add-andon-record-node-desc', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** addDeviceMachine POST /api/web/workcenter-operate/add-device-machine */ +export function addDeviceMachineUsingPost({ + body, + options, +}: { + body: API.AddDeviceMachine; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/add-device-machine', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 安灯请求 POST /api/web/workcenter-operate/andon-req */ +export function andonReqUsingPost({ + body, + options, +}: { + body: API.AndonReq; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/andon-req', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** cancelRemarkStatus POST /api/web/workcenter-operate/cancel-remark-status */ +export function cancelRemarkStatusUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/cancel-remark-status', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 改变安灯事件类型 POST /api/web/workcenter-operate/change-andon-event-type */ +export function changeAndonEventTypeUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/change-andon-event-type', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 改变安灯处理人 POST /api/web/workcenter-operate/change-dispose-andon */ +export function changeDisposeAndonUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/change-dispose-andon', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 关闭安灯 POST /api/web/workcenter-operate/close-andon */ +export function closeAndonUsingPost({ + body, + options, +}: { + body: API.AndonClose; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/close-andon', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** getAndonReqCfg POST /api/web/workcenter-operate/get-aAndon-req-cfg */ +export function getAAndonReqCfgUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-aAndon-req-cfg', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 获取异常事件配置 POST /api/web/workcenter-operate/get-abnormal-event-cfg-list */ +export function getAbnormalEventCfgListUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-abnormal-event-cfg-list', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAbnormalRecord POST /api/web/workcenter-operate/get-abnormal-record */ +export function getAbnormalRecordUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-abnormal-record', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAllUser POST /api/web/workcenter-operate/get-all-user */ +export function getAllUserUsingPost({ + options, +}: { + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-all-user', { + method: 'POST', + ...(options || {}), + }); +} + +/** getAllWorkshopAndLineList POST /api/web/workcenter-operate/get-all-workshop-line */ +export function getAllWorkshopLineUsingPost({ + options, +}: { + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-all-workshop-line', + { + method: 'POST', + ...(options || {}), + } + ); +} + +/** 获取安灯记录详情 POST /api/web/workcenter-operate/get-andon-record-info */ +export function getAndonRecordInfoUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-andon-record-info', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAndonRecordList POST /api/web/workcenter-operate/get-andon-record-list */ +export function getAndonRecordListUsingPost({ + body, + options, +}: { + body: API.AndonRecordQuery; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-andon-record-list', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getCurrentShift POST /api/web/workcenter-operate/get-current-shift */ +export function getCurrentShiftUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-current-shift', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getDeviceList POST /api/web/workcenter-operate/get-device-list */ +export function getDeviceListUsingPost({ + params, + body, + options, +}: { + // 叠加生成的Param类型 (非body参数openapi默认没有生成对象) + params: API.GetDeviceListUsingPostParams; + body: API.GetDeviceListUsingPostBody; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-device-list', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + params: { + ...params, + }, + data: body, + ...(options || {}), + }); +} + +/** getEsopList POST /api/web/workcenter-operate/get-esop-list */ +export function getEsopListUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-esop-list', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** 获取车间产线结构 POST /api/web/workcenter-operate/get-user-workshop-workcenter */ +export function getUserWorkshopWorkcenterUsingPost({ + params, + options, +}: { + // 叠加生成的Param类型 (非body参数openapi默认没有生成对象) + params: API.GetUserWorkshopWorkcenterUsingPostParams; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-user-workshop-workcenter', + { + method: 'POST', + params: { + ...params, + }, + ...(options || {}), + } + ); +} + +/** getWorkCenter POST /api/web/workcenter-operate/get-work-center */ +export function getWorkCenterUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-work-center', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** receiveAndon POST /api/web/workcenter-operate/receive-andon */ +export function receiveAndonUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/receive-andon', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** remarkStatus POST /api/web/workcenter-operate/remark-status */ +export function remarkStatusUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/remark-status', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** 报告异常事件 POST /api/web/workcenter-operate/report-abnormal-event */ +export function reportAbnormalEventUsingPost({ + body, + options, +}: { + body: API.ReportAbnormalEventDTO; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/report-abnormal-event', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** updateDeviceMachine POST /api/web/workcenter-operate/update-device-machine */ +export function updateDeviceMachineUsingPost({ + body, + options, +}: { + body: API.AddDeviceMachine; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/update-device-machine', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} diff --git "a/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 Interface hook - \344\277\256\346\224\271\347\261\273\345\236\213\345\220\215\347\247\260\345\222\214\345\261\236\346\200\247.snap" "b/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 Interface hook - \344\277\256\346\224\271\347\261\273\345\236\213\345\220\215\347\247\260\345\222\214\345\261\236\346\200\247.snap" new file mode 100644 index 0000000..011c780 --- /dev/null +++ "b/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 Interface hook - \344\277\256\346\224\271\347\261\273\345\236\213\345\220\215\347\247\260\345\222\214\345\261\236\346\200\247.snap" @@ -0,0 +1,946 @@ +/* eslint-disable */ +// @ts-ignore +export * from './types'; + +export * from './web'; +/* eslint-disable */ +// @ts-ignore + +export type CustomAddAndonRecordNodeDescUsingPostResponses = { + 200: ApiResult; +}; + +export type CustomAddDeviceMachine = { + lineId: number; + lineName?: string; + machineCode: string; + machineName: string; + manageUserId?: number; + manageUserName?: string; + lightSn: string; + signalId?: number; + serialNo?: string; + location?: string; + imgList?: string[]; + /** 更新才有 */ + deviceMachineId?: number; +}; + +export type CustomAddDeviceMachineUsingPostResponses = { + 200: ApiResult; +}; + +export type CustomAndonClose = { + andonRecordId: number; + disposeDesc?: string; + disposeImgUrls?: string[]; +}; + +export type CustomAndonRecordNode = { + id?: number; + andonRecordId?: number; + /** 节点描述 */ + nodeDesc?: string; + /** 节点备注 */ + nodeRemark?: string; + /** 1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销 */ + nodeType?: string; + nodeTypeName?: string; + nodeUserId?: number; + nodeUserName?: string; + createdUserId?: number; + createdTime?: string; + modifyiedUserId?: number; + modifyiedTime?: string; +}; + +export type CustomAndonRecordQuery = { + queryDeptId?: number; + /** 与我有关, 处理人或者报告人是我或者接收人是我 */ + myRelatedFlag?: string; + /** 处理状态 1 查询未处理的 2 查询已处理的 */ + queryDisposeStatus?: string; + /** 1 60天内 2 今天 3 本月 5 日期范围查询 默认1 */ + queryTimeType?: string; + factoryId?: number; + startTime?: string; + endTime?: string; + size?: number; + current?: number; +}; + +export type CustomAndonRecordVO = { + /** ID */ + id?: number; + /** 工厂id */ + factoryId?: number; + factoryName?: string; + deptId?: number; + deptName?: string; + /** 车间id */ + workshopId?: number; + workshopName?: string; + /** 产线d */ + lineId?: number; + lineName?: string; + /** 设备ID */ + machineId?: number; + /** 灯ID */ + signalId?: number; + /** 日历排班ID */ + calendarDetailId?: number; + calendarId?: number; + calendarDate?: string; + shiftDetailName?: string; + machineName?: string; + machineCode?: string; + /** 事件配置ID */ + configId?: number; + configName?: string; + eventName?: string; + /** 报告人ID */ + reportUserId?: number; + reportUserName?: string; + /** 开始时间 */ + reportTime?: string; + /** 报告备注 */ + reportComments?: string; + /** 报告日期 */ + reportDate?: string; + /** 优先级 */ + priority?: string; + /** 通知人ID列表 */ + notifyUseridStrs?: string; + /** 接收人 */ + receiveUserId?: number; + receiveUserName?: string; + /** 接收时间 */ + receiveTime?: string; + /** 接收用时 */ + receiveDurationTime?: number; + disposeDurationTime?: number; + /** 处理人ID */ + disposeUserId?: number; + disposeUserName?: string; + /** 处理方式 */ + disposeDesc?: string; + /** 处理时间 */ + disposeTime?: string; + /** 持续时间,单位秒 */ + totalDurationTime?: number; + /** 来源,1 移动端,2 安灯盒按钮, 3 异常事件 */ + sourceType?: string; + /** 状态,1 已上报,2 已接收,3 已处理, 9 已撤销 */ + state?: string; + /** 原因分析 */ + eventAnalysis?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + /** oee明细ID */ + oeeDetailId?: number; + workCenterName?: string; + workCenterCode?: string; + disposeUserNames?: string; + disposeUserIds?: string; + totalDurationTimeSt?: string; + receiveDurationTimeSt?: string; + disposeDurationTimeSt?: string; + /** 表状态,1 已上报,2 已接收,3 已处理, 9 已撤销转换状态 已申请 已响应 已关闭 已撤销 */ + statusText?: string; + disposeUserList?: PlatformUser[]; + recordNodeList?: AndonRecordNode[]; + showColor?: string; + workCenterId?: number; + shiftShowColor?: string; + shiftStartTime?: string; + shiftEndTime?: string; + reportImgList?: string[]; + disposeImgList?: string[]; + reportImgUrls?: string; + disposeImgUrls?: string; + shiftName?: string; + completedUserId?: number; + completedUserName?: string; +}; + +export type CustomAndonReq = { + configId: number; + configName: string; + imgList?: string[]; + reportComments?: string; + /** 处理用户 */ + selectHandlerUserIds: number[]; + workCenterId: number; + reqUserId?: number; + /** 来源 */ + sourceType?: string; + /** 工序派工id */ + processDispatchId?: number; +}; + +export type CustomAndonReqUsingPostResponses = { + 200: ApiResult; +}; + +export type CustomApiResult = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: Record; + /** 是否成功 */ + success?: boolean; +}; + +export type CustomApiResultAndonRecordVO = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /**

安灯_记录

*/ + data?: AndonRecordVO; + /** 是否成功 */ + success?: boolean; +}; + +export type CustomApiResultMyPageAndonRecordVO = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: MyPageAndonRecordVO; + /** 是否成功 */ + success?: boolean; +}; + +export type CustomApiResultString = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: string; + /** 是否成功 */ + success?: boolean; +}; + +export type CustomCancelRemarkStatusUsingPostResponses = { + 200: ApiResult; +}; + +export type CustomChangeAndonEventTypeUsingPostResponses = { + 200: ApiResult; +}; + +export type CustomChangeDisposeAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type CustomCloseAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type CustomGetAAndonReqCfgUsingPostResponses = { + 200: ApiResult; +}; + +export type CustomGetAbnormalEventCfgListUsingPostResponses = { + 200: ApiResult; +}; + +export type CustomGetAbnormalRecordUsingPostResponses = { + 200: ApiResult; +}; + +export type CustomGetAllUserUsingPostResponses = { + 200: ApiResult; +}; + +export type CustomGetAllWorkshopLineUsingPostResponses = { + 200: ApiResult; +}; + +export type CustomGetAndonRecordInfoUsingPostResponses = { + 200: ApiResultAndonRecordVO; +}; + +export type CustomGetAndonRecordListUsingPostResponses = { + 200: ApiResultMyPageAndonRecordVO; +}; + +export type CustomGetCurrentShiftUsingPostResponses = { + 200: ApiResultString; +}; + +export type CustomGetDeviceListUsingPostBody = string; + +export type CustomGetDeviceListUsingPostParams = { + /** ID */ + id?: number; + /** 工厂ID */ + factoryId?: number; + deptId?: number; + /** 车间ID */ + workshopId?: number; + /** 产线ID */ + lineId?: number; + /** 分类ID */ + categoryId?: number; + /** 灯ID */ + signalId?: number; + lightSn?: string; + /** 设备编号 */ + machineCode?: string; + /** 设备名称 */ + machineName?: string; + /** 拼音码 */ + pinyin?: string; + /** 五笔码 */ + wubi?: string; + /** 医院图片 */ + imgUrlStrs?: string; + /** 管理员ID */ + manageUserId?: number; + /** 品牌 */ + trademark?: string; + /** 型号 */ + model?: string; + /** 序列号 */ + serialNo?: string; + /** 供应商 */ + supplier?: string; + /** 启用日期 */ + activationDate?: string; + /** 验收日期 */ + checkDate?: string; + /** 出厂日期 */ + productionDate?: string; + /** 脉冲间隔 */ + pulseInterval?: number; + /** 标准利用率 */ + standardUseRate?: string; + /** 放置地点 */ + location?: string; + /** 状态,1启用,2 停用 */ + state?: string; + /** 备注 */ + remark?: string; + /** 删除标记 */ + deleteFlag?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + searchKey?: string; + /** 0 关机,1 运行,2 等待,3 异常 */ + oeeState?: string; + oeeTime?: string; + stateRecordId?: number; + stateStartTime?: string; +}; + +export type CustomGetDeviceListUsingPostResponses = { + 200: ApiResult; +}; + +export type CustomGetEsopListUsingPostResponses = { + 200: ApiResult; +}; + +export type CustomGetUserWorkshopWorkcenterUsingPostParams = { + selectDeptId?: number; +}; + +export type CustomGetUserWorkshopWorkcenterUsingPostResponses = { + 200: ApiResult; +}; + +export type CustomGetWorkCenterUsingPostResponses = { + 200: ApiResult; +}; + +export type CustomJSONObject = { + key?: Record; +}; + +export type CustomMyPageAndonRecordVO = { + records?: AndonRecordVO[]; + total?: number; + size?: number; + current?: number; + orders?: OrderItem[]; + optimizeCountSql?: boolean; + searchCount?: boolean; + optimizeJoinOfCountSql?: boolean; + maxLimit?: number; + countId?: string; + startTime?: string; + startTimeStr?: string; + endTime?: string; + endTimeStr?: string; + hasNextPage?: boolean; +}; + +export type CustomOrderItem = { + column?: string; + asc?: boolean; +}; + +export type CustomPlatformUser = { + /** 用户ID */ + id?: number; + /** 团队id */ + teamId?: number; + /** 工厂id */ + factoryId?: number; + deptId?: number; + /** 所属车间id */ + workshopId?: number; + /** 所属产线d */ + lineId?: number; + /** 用户姓名 */ + userName?: string; + /** 邮箱 */ + email?: string; + /** 职称 */ + jobTitle?: string; + /** 用户工号 */ + jobNo?: string; + /** 用户账号 */ + accountNo?: string; + /** 用户密码 */ + password?: string; + /** 身份证号 */ + idNumber?: string; + /** 出生日期 */ + dateOfBirth?: string; + /** 联系电话 */ + telephone?: string; + /** 头像url */ + headImageUrl?: string; + /** 用户类型,1 平台,2 团队,3 工厂 */ + userType?: string; + /** 管理员标识,1 管理员,0 非管理员 */ + adminFlag?: string; + /** 状态(1:在用 2:停用) */ + state?: string; + /** 是否删除(0:否 1:是) */ + deleteFlag?: string; + /** 修改密码时间 */ + passwordModifyiedTime?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + /** 1男 2女 9 未知 */ + genderCode?: string; + publicOpenId?: string; + currentFactoryId?: number; + /** 备注 */ + remark?: string; +}; + +export type CustomReceiveAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type CustomRemarkStatusUsingPostResponses = { + 200: ApiResult; +}; + +export type CustomReportAbnormalEventDTO = { + /** 异常记录id */ + abnormalRecordId: number; + /** 事件id */ + eventId?: number; + /** 工序派工id */ + processDispatchId?: number; +}; + +export type CustomReportAbnormalEventUsingPostResponses = { + 200: ApiResult; +}; + +export type CustomUpdateDeviceMachineUsingPostResponses = { + 200: ApiResult; +}; +/* eslint-disable */ +// @ts-ignore +import request from 'axios'; + +import * as API from './types'; + +/** addAndonRecordNodeDesc POST /api/web/workcenter-operate/add-andon-record-node-desc */ +export function addAndonRecordNodeDescUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/add-andon-record-node-desc', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** addDeviceMachine POST /api/web/workcenter-operate/add-device-machine */ +export function addDeviceMachineUsingPost({ + body, + options, +}: { + body: API.AddDeviceMachine; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/add-device-machine', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 安灯请求 POST /api/web/workcenter-operate/andon-req */ +export function andonReqUsingPost({ + body, + options, +}: { + body: API.AndonReq; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/andon-req', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** cancelRemarkStatus POST /api/web/workcenter-operate/cancel-remark-status */ +export function cancelRemarkStatusUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/cancel-remark-status', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 改变安灯事件类型 POST /api/web/workcenter-operate/change-andon-event-type */ +export function changeAndonEventTypeUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/change-andon-event-type', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 改变安灯处理人 POST /api/web/workcenter-operate/change-dispose-andon */ +export function changeDisposeAndonUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/change-dispose-andon', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 关闭安灯 POST /api/web/workcenter-operate/close-andon */ +export function closeAndonUsingPost({ + body, + options, +}: { + body: API.AndonClose; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/close-andon', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** getAndonReqCfg POST /api/web/workcenter-operate/get-aAndon-req-cfg */ +export function getAAndonReqCfgUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-aAndon-req-cfg', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 获取异常事件配置 POST /api/web/workcenter-operate/get-abnormal-event-cfg-list */ +export function getAbnormalEventCfgListUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-abnormal-event-cfg-list', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAbnormalRecord POST /api/web/workcenter-operate/get-abnormal-record */ +export function getAbnormalRecordUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-abnormal-record', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAllUser POST /api/web/workcenter-operate/get-all-user */ +export function getAllUserUsingPost({ + options, +}: { + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-all-user', { + method: 'POST', + ...(options || {}), + }); +} + +/** getAllWorkshopAndLineList POST /api/web/workcenter-operate/get-all-workshop-line */ +export function getAllWorkshopLineUsingPost({ + options, +}: { + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-all-workshop-line', + { + method: 'POST', + ...(options || {}), + } + ); +} + +/** 获取安灯记录详情 POST /api/web/workcenter-operate/get-andon-record-info */ +export function getAndonRecordInfoUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-andon-record-info', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAndonRecordList POST /api/web/workcenter-operate/get-andon-record-list */ +export function getAndonRecordListUsingPost({ + body, + options, +}: { + body: API.AndonRecordQuery; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-andon-record-list', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getCurrentShift POST /api/web/workcenter-operate/get-current-shift */ +export function getCurrentShiftUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-current-shift', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getDeviceList POST /api/web/workcenter-operate/get-device-list */ +export function getDeviceListUsingPost({ + params, + body, + options, +}: { + // 叠加生成的Param类型 (非body参数openapi默认没有生成对象) + params: API.GetDeviceListUsingPostParams; + body: API.GetDeviceListUsingPostBody; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-device-list', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + params: { + ...params, + }, + data: body, + ...(options || {}), + }); +} + +/** getEsopList POST /api/web/workcenter-operate/get-esop-list */ +export function getEsopListUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-esop-list', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** 获取车间产线结构 POST /api/web/workcenter-operate/get-user-workshop-workcenter */ +export function getUserWorkshopWorkcenterUsingPost({ + params, + options, +}: { + // 叠加生成的Param类型 (非body参数openapi默认没有生成对象) + params: API.GetUserWorkshopWorkcenterUsingPostParams; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-user-workshop-workcenter', + { + method: 'POST', + params: { + ...params, + }, + ...(options || {}), + } + ); +} + +/** getWorkCenter POST /api/web/workcenter-operate/get-work-center */ +export function getWorkCenterUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-work-center', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** receiveAndon POST /api/web/workcenter-operate/receive-andon */ +export function receiveAndonUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/receive-andon', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** remarkStatus POST /api/web/workcenter-operate/remark-status */ +export function remarkStatusUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/remark-status', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** 报告异常事件 POST /api/web/workcenter-operate/report-abnormal-event */ +export function reportAbnormalEventUsingPost({ + body, + options, +}: { + body: API.ReportAbnormalEventDTO; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/report-abnormal-event', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** updateDeviceMachine POST /api/web/workcenter-operate/update-device-machine */ +export function updateDeviceMachineUsingPost({ + body, + options, +}: { + body: API.AddDeviceMachine; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/update-device-machine', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} diff --git "a/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 ReactQuery hook - \350\277\207\346\273\244 GET \346\226\271\346\263\225.snap" "b/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 ReactQuery hook - \350\277\207\346\273\244 GET \346\226\271\346\263\225.snap" new file mode 100644 index 0000000..842cfaf --- /dev/null +++ "b/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 ReactQuery hook - \350\277\207\346\273\244 GET \346\226\271\346\263\225.snap" @@ -0,0 +1,955 @@ +/* eslint-disable */ +// @ts-ignore +export * from './types'; + +export * from './web'; +export * from './web.reactquery'; +/* eslint-disable */ +// @ts-ignore + +export type AddAndonRecordNodeDescUsingPostResponses = { + 200: ApiResult; +}; + +export type AddDeviceMachine = { + lineId: number; + lineName?: string; + machineCode: string; + machineName: string; + manageUserId?: number; + manageUserName?: string; + lightSn: string; + signalId?: number; + serialNo?: string; + location?: string; + imgList?: string[]; + /** 更新才有 */ + deviceMachineId?: number; +}; + +export type AddDeviceMachineUsingPostResponses = { + 200: ApiResult; +}; + +export type AndonClose = { + andonRecordId: number; + disposeDesc?: string; + disposeImgUrls?: string[]; +}; + +export type AndonRecordNode = { + id?: number; + andonRecordId?: number; + /** 节点描述 */ + nodeDesc?: string; + /** 节点备注 */ + nodeRemark?: string; + /** 1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销 */ + nodeType?: string; + nodeTypeName?: string; + nodeUserId?: number; + nodeUserName?: string; + createdUserId?: number; + createdTime?: string; + modifyiedUserId?: number; + modifyiedTime?: string; +}; + +export type AndonRecordQuery = { + queryDeptId?: number; + /** 与我有关, 处理人或者报告人是我或者接收人是我 */ + myRelatedFlag?: string; + /** 处理状态 1 查询未处理的 2 查询已处理的 */ + queryDisposeStatus?: string; + /** 1 60天内 2 今天 3 本月 5 日期范围查询 默认1 */ + queryTimeType?: string; + factoryId?: number; + startTime?: string; + endTime?: string; + size?: number; + current?: number; +}; + +export type AndonRecordVO = { + /** ID */ + id?: number; + /** 工厂id */ + factoryId?: number; + factoryName?: string; + deptId?: number; + deptName?: string; + /** 车间id */ + workshopId?: number; + workshopName?: string; + /** 产线d */ + lineId?: number; + lineName?: string; + /** 设备ID */ + machineId?: number; + /** 灯ID */ + signalId?: number; + /** 日历排班ID */ + calendarDetailId?: number; + calendarId?: number; + calendarDate?: string; + shiftDetailName?: string; + machineName?: string; + machineCode?: string; + /** 事件配置ID */ + configId?: number; + configName?: string; + eventName?: string; + /** 报告人ID */ + reportUserId?: number; + reportUserName?: string; + /** 开始时间 */ + reportTime?: string; + /** 报告备注 */ + reportComments?: string; + /** 报告日期 */ + reportDate?: string; + /** 优先级 */ + priority?: string; + /** 通知人ID列表 */ + notifyUseridStrs?: string; + /** 接收人 */ + receiveUserId?: number; + receiveUserName?: string; + /** 接收时间 */ + receiveTime?: string; + /** 接收用时 */ + receiveDurationTime?: number; + disposeDurationTime?: number; + /** 处理人ID */ + disposeUserId?: number; + disposeUserName?: string; + /** 处理方式 */ + disposeDesc?: string; + /** 处理时间 */ + disposeTime?: string; + /** 持续时间,单位秒 */ + totalDurationTime?: number; + /** 来源,1 移动端,2 安灯盒按钮, 3 异常事件 */ + sourceType?: string; + /** 状态,1 已上报,2 已接收,3 已处理, 9 已撤销 */ + state?: string; + /** 原因分析 */ + eventAnalysis?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + /** oee明细ID */ + oeeDetailId?: number; + workCenterName?: string; + workCenterCode?: string; + disposeUserNames?: string; + disposeUserIds?: string; + totalDurationTimeSt?: string; + receiveDurationTimeSt?: string; + disposeDurationTimeSt?: string; + /** 表状态,1 已上报,2 已接收,3 已处理, 9 已撤销转换状态 已申请 已响应 已关闭 已撤销 */ + statusText?: string; + disposeUserList?: PlatformUser[]; + recordNodeList?: AndonRecordNode[]; + showColor?: string; + workCenterId?: number; + shiftShowColor?: string; + shiftStartTime?: string; + shiftEndTime?: string; + reportImgList?: string[]; + disposeImgList?: string[]; + reportImgUrls?: string; + disposeImgUrls?: string; + shiftName?: string; + completedUserId?: number; + completedUserName?: string; +}; + +export type AndonReq = { + configId: number; + configName: string; + imgList?: string[]; + reportComments?: string; + /** 处理用户 */ + selectHandlerUserIds: number[]; + workCenterId: number; + reqUserId?: number; + /** 来源 */ + sourceType?: string; + /** 工序派工id */ + processDispatchId?: number; +}; + +export type AndonReqUsingPostResponses = { + 200: ApiResult; +}; + +export type ApiResult = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: Record; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultAndonRecordVO = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /**

安灯_记录

*/ + data?: AndonRecordVO; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultMyPageAndonRecordVO = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: MyPageAndonRecordVO; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultString = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: string; + /** 是否成功 */ + success?: boolean; +}; + +export type CancelRemarkStatusUsingPostResponses = { + 200: ApiResult; +}; + +export type ChangeAndonEventTypeUsingPostResponses = { + 200: ApiResult; +}; + +export type ChangeDisposeAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type CloseAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAAndonReqCfgUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAbnormalEventCfgListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAbnormalRecordUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAllUserUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAllWorkshopLineUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAndonRecordInfoUsingPostResponses = { + 200: ApiResultAndonRecordVO; +}; + +export type GetAndonRecordListUsingPostResponses = { + 200: ApiResultMyPageAndonRecordVO; +}; + +export type GetCurrentShiftUsingPostResponses = { + 200: ApiResultString; +}; + +export type GetDeviceListUsingPostBody = string; + +export type GetDeviceListUsingPostParams = { + /** ID */ + id?: number; + /** 工厂ID */ + factoryId?: number; + deptId?: number; + /** 车间ID */ + workshopId?: number; + /** 产线ID */ + lineId?: number; + /** 分类ID */ + categoryId?: number; + /** 灯ID */ + signalId?: number; + lightSn?: string; + /** 设备编号 */ + machineCode?: string; + /** 设备名称 */ + machineName?: string; + /** 拼音码 */ + pinyin?: string; + /** 五笔码 */ + wubi?: string; + /** 医院图片 */ + imgUrlStrs?: string; + /** 管理员ID */ + manageUserId?: number; + /** 品牌 */ + trademark?: string; + /** 型号 */ + model?: string; + /** 序列号 */ + serialNo?: string; + /** 供应商 */ + supplier?: string; + /** 启用日期 */ + activationDate?: string; + /** 验收日期 */ + checkDate?: string; + /** 出厂日期 */ + productionDate?: string; + /** 脉冲间隔 */ + pulseInterval?: number; + /** 标准利用率 */ + standardUseRate?: string; + /** 放置地点 */ + location?: string; + /** 状态,1启用,2 停用 */ + state?: string; + /** 备注 */ + remark?: string; + /** 删除标记 */ + deleteFlag?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + searchKey?: string; + /** 0 关机,1 运行,2 等待,3 异常 */ + oeeState?: string; + oeeTime?: string; + stateRecordId?: number; + stateStartTime?: string; +}; + +export type GetDeviceListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetEsopListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetUserWorkshopWorkcenterUsingPostParams = { + selectDeptId?: number; +}; + +export type GetUserWorkshopWorkcenterUsingPostResponses = { + 200: ApiResult; +}; + +export type GetWorkCenterUsingPostResponses = { + 200: ApiResult; +}; + +export type JSONObject = { + key?: Record; +}; + +export type MyPageAndonRecordVO = { + records?: AndonRecordVO[]; + total?: number; + size?: number; + current?: number; + orders?: OrderItem[]; + optimizeCountSql?: boolean; + searchCount?: boolean; + optimizeJoinOfCountSql?: boolean; + maxLimit?: number; + countId?: string; + startTime?: string; + startTimeStr?: string; + endTime?: string; + endTimeStr?: string; + hasNextPage?: boolean; +}; + +export type OrderItem = { + column?: string; + asc?: boolean; +}; + +export type PlatformUser = { + /** 用户ID */ + id?: number; + /** 团队id */ + teamId?: number; + /** 工厂id */ + factoryId?: number; + deptId?: number; + /** 所属车间id */ + workshopId?: number; + /** 所属产线d */ + lineId?: number; + /** 用户姓名 */ + userName?: string; + /** 邮箱 */ + email?: string; + /** 职称 */ + jobTitle?: string; + /** 用户工号 */ + jobNo?: string; + /** 用户账号 */ + accountNo?: string; + /** 用户密码 */ + password?: string; + /** 身份证号 */ + idNumber?: string; + /** 出生日期 */ + dateOfBirth?: string; + /** 联系电话 */ + telephone?: string; + /** 头像url */ + headImageUrl?: string; + /** 用户类型,1 平台,2 团队,3 工厂 */ + userType?: string; + /** 管理员标识,1 管理员,0 非管理员 */ + adminFlag?: string; + /** 状态(1:在用 2:停用) */ + state?: string; + /** 是否删除(0:否 1:是) */ + deleteFlag?: string; + /** 修改密码时间 */ + passwordModifyiedTime?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + /** 1男 2女 9 未知 */ + genderCode?: string; + publicOpenId?: string; + currentFactoryId?: number; + /** 备注 */ + remark?: string; +}; + +export type ReceiveAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type RemarkStatusUsingPostResponses = { + 200: ApiResult; +}; + +export type ReportAbnormalEventDTO = { + /** 异常记录id */ + abnormalRecordId: number; + /** 事件id */ + eventId?: number; + /** 工序派工id */ + processDispatchId?: number; +}; + +export type ReportAbnormalEventUsingPostResponses = { + 200: ApiResult; +}; + +export type UpdateDeviceMachineUsingPostResponses = { + 200: ApiResult; +}; +/* eslint-disable */ +// @ts-ignore +import { queryOptions, useMutation } from '@tanstack/react-query'; +import type { DefaultError } from '@tanstack/react-query'; +import request from 'axios'; + +import * as apis from './web'; +import * as API from './types'; +/* eslint-disable */ +// @ts-ignore +import request from 'axios'; + +import * as API from './types'; + +/** addAndonRecordNodeDesc POST /api/web/workcenter-operate/add-andon-record-node-desc */ +export function addAndonRecordNodeDescUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/add-andon-record-node-desc', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** addDeviceMachine POST /api/web/workcenter-operate/add-device-machine */ +export function addDeviceMachineUsingPost({ + body, + options, +}: { + body: API.AddDeviceMachine; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/add-device-machine', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 安灯请求 POST /api/web/workcenter-operate/andon-req */ +export function andonReqUsingPost({ + body, + options, +}: { + body: API.AndonReq; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/andon-req', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** cancelRemarkStatus POST /api/web/workcenter-operate/cancel-remark-status */ +export function cancelRemarkStatusUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/cancel-remark-status', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 改变安灯事件类型 POST /api/web/workcenter-operate/change-andon-event-type */ +export function changeAndonEventTypeUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/change-andon-event-type', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 改变安灯处理人 POST /api/web/workcenter-operate/change-dispose-andon */ +export function changeDisposeAndonUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/change-dispose-andon', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 关闭安灯 POST /api/web/workcenter-operate/close-andon */ +export function closeAndonUsingPost({ + body, + options, +}: { + body: API.AndonClose; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/close-andon', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** getAndonReqCfg POST /api/web/workcenter-operate/get-aAndon-req-cfg */ +export function getAAndonReqCfgUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-aAndon-req-cfg', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 获取异常事件配置 POST /api/web/workcenter-operate/get-abnormal-event-cfg-list */ +export function getAbnormalEventCfgListUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-abnormal-event-cfg-list', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAbnormalRecord POST /api/web/workcenter-operate/get-abnormal-record */ +export function getAbnormalRecordUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-abnormal-record', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAllUser POST /api/web/workcenter-operate/get-all-user */ +export function getAllUserUsingPost({ + options, +}: { + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-all-user', { + method: 'POST', + ...(options || {}), + }); +} + +/** getAllWorkshopAndLineList POST /api/web/workcenter-operate/get-all-workshop-line */ +export function getAllWorkshopLineUsingPost({ + options, +}: { + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-all-workshop-line', + { + method: 'POST', + ...(options || {}), + } + ); +} + +/** 获取安灯记录详情 POST /api/web/workcenter-operate/get-andon-record-info */ +export function getAndonRecordInfoUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-andon-record-info', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAndonRecordList POST /api/web/workcenter-operate/get-andon-record-list */ +export function getAndonRecordListUsingPost({ + body, + options, +}: { + body: API.AndonRecordQuery; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-andon-record-list', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getCurrentShift POST /api/web/workcenter-operate/get-current-shift */ +export function getCurrentShiftUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-current-shift', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getDeviceList POST /api/web/workcenter-operate/get-device-list */ +export function getDeviceListUsingPost({ + params, + body, + options, +}: { + // 叠加生成的Param类型 (非body参数openapi默认没有生成对象) + params: API.GetDeviceListUsingPostParams; + body: API.GetDeviceListUsingPostBody; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-device-list', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + params: { + ...params, + }, + data: body, + ...(options || {}), + }); +} + +/** getEsopList POST /api/web/workcenter-operate/get-esop-list */ +export function getEsopListUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-esop-list', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** 获取车间产线结构 POST /api/web/workcenter-operate/get-user-workshop-workcenter */ +export function getUserWorkshopWorkcenterUsingPost({ + params, + options, +}: { + // 叠加生成的Param类型 (非body参数openapi默认没有生成对象) + params: API.GetUserWorkshopWorkcenterUsingPostParams; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-user-workshop-workcenter', + { + method: 'POST', + params: { + ...params, + }, + ...(options || {}), + } + ); +} + +/** getWorkCenter POST /api/web/workcenter-operate/get-work-center */ +export function getWorkCenterUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-work-center', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** receiveAndon POST /api/web/workcenter-operate/receive-andon */ +export function receiveAndonUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/receive-andon', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** remarkStatus POST /api/web/workcenter-operate/remark-status */ +export function remarkStatusUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/remark-status', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** 报告异常事件 POST /api/web/workcenter-operate/report-abnormal-event */ +export function reportAbnormalEventUsingPost({ + body, + options, +}: { + body: API.ReportAbnormalEventDTO; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/report-abnormal-event', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** updateDeviceMachine POST /api/web/workcenter-operate/update-device-machine */ +export function updateDeviceMachineUsingPost({ + body, + options, +}: { + body: API.AddDeviceMachine; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/update-device-machine', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} diff --git "a/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 Schema hook - \344\277\256\346\224\271 JSON Schema \347\261\273\345\236\213\345\220\215.snap" "b/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 Schema hook - \344\277\256\346\224\271 JSON Schema \347\261\273\345\236\213\345\220\215.snap" new file mode 100644 index 0000000..790f06a --- /dev/null +++ "b/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 Schema hook - \344\277\256\346\224\271 JSON Schema \347\261\273\345\236\213\345\220\215.snap" @@ -0,0 +1,2326 @@ +/* eslint-disable */ +// @ts-ignore +export * from './types'; +export * from './schema'; + +export * from './web'; +export const $customorderItem = { + type: 'object', + properties: { + column: { type: 'string', description: '' }, + asc: { type: 'boolean', description: '' }, + }, + isAllowed: true, +}; + +export const $customandonRecordNode = { + type: 'object', + properties: { + id: { type: 'integer', description: '', format: 'int64' }, + andonRecordId: { type: 'integer', description: '', format: 'int64' }, + nodeDesc: { type: 'string', description: '节点描述' }, + nodeRemark: { type: 'string', description: '节点备注' }, + nodeType: { + type: 'string', + description: + '1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销', + }, + nodeTypeName: { type: 'string', description: '' }, + nodeUserId: { type: 'integer', description: '', format: 'int64' }, + nodeUserName: { type: 'string', description: '' }, + createdUserId: { type: 'integer', description: '', format: 'int64' }, + createdTime: { type: 'string', description: '' }, + modifyiedUserId: { type: 'integer', description: '', format: 'int64' }, + modifyiedTime: { type: 'string', description: '' }, + }, + isAllowed: true, +}; + +export const $customplatformUser = { + type: 'object', + properties: { + id: { type: 'integer', description: '用户ID', format: 'int64' }, + teamId: { type: 'integer', description: '团队id', format: 'int64' }, + factoryId: { type: 'integer', description: '工厂id', format: 'int64' }, + deptId: { type: 'integer', description: '', format: 'int64' }, + workshopId: { type: 'integer', description: '所属车间id', format: 'int64' }, + lineId: { type: 'integer', description: '所属产线d', format: 'int64' }, + userName: { type: 'string', description: '用户姓名' }, + email: { type: 'string', description: '邮箱' }, + jobTitle: { type: 'string', description: '职称' }, + jobNo: { type: 'string', description: '用户工号' }, + accountNo: { type: 'string', description: '用户账号' }, + password: { type: 'string', description: '用户密码' }, + idNumber: { type: 'string', description: '身份证号' }, + dateOfBirth: { type: 'string', description: '出生日期' }, + telephone: { type: 'string', description: '联系电话' }, + headImageUrl: { type: 'string', description: '头像url' }, + userType: { + type: 'string', + description: '用户类型,1 平台,2 团队,3 工厂', + }, + adminFlag: { + type: 'string', + description: '管理员标识,1 管理员,0 非管理员', + }, + state: { type: 'string', description: '状态(1:在用 2:停用)' }, + deleteFlag: { type: 'string', description: '是否删除(0:否 1:是)' }, + passwordModifyiedTime: { type: 'string', description: '修改密码时间' }, + createdUserId: { type: 'integer', description: '创建人', format: 'int64' }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '最后更新时间' }, + datetimeStamp: { type: 'string', description: '时间戳' }, + genderCode: { type: 'string', description: '1男 2女 9 未知' }, + publicOpenId: { type: 'string', description: '' }, + currentFactoryId: { type: 'integer', description: '', format: 'int64' }, + remark: { type: 'string', description: '备注' }, + }, + isAllowed: true, +}; + +export const $customandonRecordVO = { + type: 'object', + properties: { + id: { type: 'integer', description: 'ID', format: 'int64' }, + factoryId: { type: 'integer', description: '工厂id', format: 'int64' }, + factoryName: { type: 'string', description: '' }, + deptId: { type: 'integer', description: '', format: 'int64' }, + deptName: { type: 'string', description: '' }, + workshopId: { type: 'integer', description: '车间id', format: 'int64' }, + workshopName: { type: 'string', description: '' }, + lineId: { type: 'integer', description: '产线d', format: 'int64' }, + lineName: { type: 'string', description: '' }, + machineId: { type: 'integer', description: '设备ID', format: 'int64' }, + signalId: { type: 'integer', description: '灯ID', format: 'int64' }, + calendarDetailId: { + type: 'integer', + description: '日历排班ID', + format: 'int64', + }, + calendarId: { type: 'integer', description: '', format: 'int64' }, + calendarDate: { type: 'string', description: '' }, + shiftDetailName: { type: 'string', description: '' }, + machineName: { type: 'string', description: '' }, + machineCode: { type: 'string', description: '' }, + configId: { type: 'integer', description: '事件配置ID', format: 'int64' }, + configName: { type: 'string', description: '' }, + eventName: { type: 'string', description: '' }, + reportUserId: { type: 'integer', description: '报告人ID', format: 'int64' }, + reportUserName: { type: 'string', description: '' }, + reportTime: { type: 'string', description: '开始时间' }, + reportComments: { type: 'string', description: '报告备注' }, + reportDate: { type: 'string', description: '报告日期' }, + priority: { type: 'string', description: '优先级' }, + notifyUseridStrs: { type: 'string', description: '通知人ID列表' }, + receiveUserId: { type: 'integer', description: '接收人', format: 'int64' }, + receiveUserName: { type: 'string', description: '' }, + receiveTime: { type: 'string', description: '接收时间' }, + receiveDurationTime: { + type: 'integer', + description: '接收用时', + format: 'int64', + }, + disposeDurationTime: { type: 'integer', description: '', format: 'int64' }, + disposeUserId: { + type: 'integer', + description: '处理人ID', + format: 'int64', + }, + disposeUserName: { type: 'string', description: '' }, + disposeDesc: { type: 'string', description: '处理方式' }, + disposeTime: { type: 'string', description: '处理时间' }, + totalDurationTime: { + type: 'integer', + description: '持续时间,单位秒', + format: 'int64', + }, + sourceType: { + type: 'string', + description: '来源,1 移动端,2 安灯盒按钮, 3 异常事件', + }, + state: { + type: 'string', + description: '状态,1 已上报,2 已接收,3 已处理, 9 已撤销', + }, + eventAnalysis: { type: 'string', description: '原因分析' }, + createdUserId: { type: 'integer', description: '创建人', format: 'int64' }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '最后更新时间' }, + datetimeStamp: { type: 'string', description: '时间戳' }, + oeeDetailId: { type: 'integer', description: 'oee明细ID', format: 'int64' }, + workCenterName: { type: 'string', description: '' }, + workCenterCode: { type: 'string', description: '' }, + disposeUserNames: { type: 'string', description: '' }, + disposeUserIds: { type: 'string', description: '' }, + totalDurationTimeSt: { type: 'string', description: '' }, + receiveDurationTimeSt: { type: 'string', description: '' }, + disposeDurationTimeSt: { type: 'string', description: '' }, + statusText: { + type: 'string', + description: + '表状态,1 已上报,2 已接收,3 已处理, 9 已撤销\n转换状态 已申请 已响应 已关闭 已撤销', + }, + disposeUserList: { + type: 'array', + items: { + description: '

平台_用户

', + type: 'object', + properties: { + id: { type: 'integer', description: '用户ID', format: 'int64' }, + teamId: { type: 'integer', description: '团队id', format: 'int64' }, + factoryId: { + type: 'integer', + description: '工厂id', + format: 'int64', + }, + deptId: { type: 'integer', description: '', format: 'int64' }, + workshopId: { + type: 'integer', + description: '所属车间id', + format: 'int64', + }, + lineId: { + type: 'integer', + description: '所属产线d', + format: 'int64', + }, + userName: { type: 'string', description: '用户姓名' }, + email: { type: 'string', description: '邮箱' }, + jobTitle: { type: 'string', description: '职称' }, + jobNo: { type: 'string', description: '用户工号' }, + accountNo: { type: 'string', description: '用户账号' }, + password: { type: 'string', description: '用户密码' }, + idNumber: { type: 'string', description: '身份证号' }, + dateOfBirth: { type: 'string', description: '出生日期' }, + telephone: { type: 'string', description: '联系电话' }, + headImageUrl: { type: 'string', description: '头像url' }, + userType: { + type: 'string', + description: '用户类型,1 平台,2 团队,3 工厂', + }, + adminFlag: { + type: 'string', + description: '管理员标识,1 管理员,0 非管理员', + }, + state: { type: 'string', description: '状态(1:在用 2:停用)' }, + deleteFlag: { type: 'string', description: '是否删除(0:否 1:是)' }, + passwordModifyiedTime: { + type: 'string', + description: '修改密码时间', + }, + createdUserId: { + type: 'integer', + description: '创建人', + format: 'int64', + }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '最后更新时间' }, + datetimeStamp: { type: 'string', description: '时间戳' }, + genderCode: { type: 'string', description: '1男 2女 9 未知' }, + publicOpenId: { type: 'string', description: '' }, + currentFactoryId: { + type: 'integer', + description: '', + format: 'int64', + }, + remark: { type: 'string', description: '备注' }, + }, + isAllowed: true, + 'x-id': 'PlatformUser', + }, + description: '', + }, + recordNodeList: { + type: 'array', + items: { + description: '

安灯记录-节点

', + type: 'object', + properties: { + id: { type: 'integer', description: '', format: 'int64' }, + andonRecordId: { type: 'integer', description: '', format: 'int64' }, + nodeDesc: { type: 'string', description: '节点描述' }, + nodeRemark: { type: 'string', description: '节点备注' }, + nodeType: { + type: 'string', + description: + '1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销', + }, + nodeTypeName: { type: 'string', description: '' }, + nodeUserId: { type: 'integer', description: '', format: 'int64' }, + nodeUserName: { type: 'string', description: '' }, + createdUserId: { type: 'integer', description: '', format: 'int64' }, + createdTime: { type: 'string', description: '' }, + modifyiedUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '' }, + }, + isAllowed: true, + 'x-id': 'AndonRecordNode', + }, + description: '', + }, + showColor: { type: 'string', description: '' }, + workCenterId: { type: 'integer', description: '', format: 'int64' }, + shiftShowColor: { type: 'string', description: '' }, + shiftStartTime: { type: 'string', description: '' }, + shiftEndTime: { type: 'string', description: '' }, + reportImgList: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + disposeImgList: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + reportImgUrls: { type: 'string', description: '' }, + disposeImgUrls: { type: 'string', description: '' }, + shiftName: { type: 'string', description: '' }, + completedUserId: { type: 'integer', description: '', format: 'int64' }, + completedUserName: { type: 'string', description: '' }, + }, + isAllowed: true, +}; + +export const $custommyPageAndonRecordVO = { + type: 'object', + properties: { + records: { + type: 'array', + items: { + description: '

安灯_记录

', + type: 'object', + properties: { + id: { type: 'integer', description: 'ID', format: 'int64' }, + factoryId: { + type: 'integer', + description: '工厂id', + format: 'int64', + }, + factoryName: { type: 'string', description: '' }, + deptId: { type: 'integer', description: '', format: 'int64' }, + deptName: { type: 'string', description: '' }, + workshopId: { + type: 'integer', + description: '车间id', + format: 'int64', + }, + workshopName: { type: 'string', description: '' }, + lineId: { type: 'integer', description: '产线d', format: 'int64' }, + lineName: { type: 'string', description: '' }, + machineId: { + type: 'integer', + description: '设备ID', + format: 'int64', + }, + signalId: { type: 'integer', description: '灯ID', format: 'int64' }, + calendarDetailId: { + type: 'integer', + description: '日历排班ID', + format: 'int64', + }, + calendarId: { type: 'integer', description: '', format: 'int64' }, + calendarDate: { type: 'string', description: '' }, + shiftDetailName: { type: 'string', description: '' }, + machineName: { type: 'string', description: '' }, + machineCode: { type: 'string', description: '' }, + configId: { + type: 'integer', + description: '事件配置ID', + format: 'int64', + }, + configName: { type: 'string', description: '' }, + eventName: { type: 'string', description: '' }, + reportUserId: { + type: 'integer', + description: '报告人ID', + format: 'int64', + }, + reportUserName: { type: 'string', description: '' }, + reportTime: { type: 'string', description: '开始时间' }, + reportComments: { type: 'string', description: '报告备注' }, + reportDate: { type: 'string', description: '报告日期' }, + priority: { type: 'string', description: '优先级' }, + notifyUseridStrs: { type: 'string', description: '通知人ID列表' }, + receiveUserId: { + type: 'integer', + description: '接收人', + format: 'int64', + }, + receiveUserName: { type: 'string', description: '' }, + receiveTime: { type: 'string', description: '接收时间' }, + receiveDurationTime: { + type: 'integer', + description: '接收用时', + format: 'int64', + }, + disposeDurationTime: { + type: 'integer', + description: '', + format: 'int64', + }, + disposeUserId: { + type: 'integer', + description: '处理人ID', + format: 'int64', + }, + disposeUserName: { type: 'string', description: '' }, + disposeDesc: { type: 'string', description: '处理方式' }, + disposeTime: { type: 'string', description: '处理时间' }, + totalDurationTime: { + type: 'integer', + description: '持续时间,单位秒', + format: 'int64', + }, + sourceType: { + type: 'string', + description: '来源,1 移动端,2 安灯盒按钮, 3 异常事件', + }, + state: { + type: 'string', + description: '状态,1 已上报,2 已接收,3 已处理, 9 已撤销', + }, + eventAnalysis: { type: 'string', description: '原因分析' }, + createdUserId: { + type: 'integer', + description: '创建人', + format: 'int64', + }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '最后更新时间' }, + datetimeStamp: { type: 'string', description: '时间戳' }, + oeeDetailId: { + type: 'integer', + description: 'oee明细ID', + format: 'int64', + }, + workCenterName: { type: 'string', description: '' }, + workCenterCode: { type: 'string', description: '' }, + disposeUserNames: { type: 'string', description: '' }, + disposeUserIds: { type: 'string', description: '' }, + totalDurationTimeSt: { type: 'string', description: '' }, + receiveDurationTimeSt: { type: 'string', description: '' }, + disposeDurationTimeSt: { type: 'string', description: '' }, + statusText: { + type: 'string', + description: + '表状态,1 已上报,2 已接收,3 已处理, 9 已撤销\n转换状态 已申请 已响应 已关闭 已撤销', + }, + disposeUserList: { + type: 'array', + items: { + description: '

平台_用户

', + type: 'object', + properties: { + id: { type: 'integer', description: '用户ID', format: 'int64' }, + teamId: { + type: 'integer', + description: '团队id', + format: 'int64', + }, + factoryId: { + type: 'integer', + description: '工厂id', + format: 'int64', + }, + deptId: { type: 'integer', description: '', format: 'int64' }, + workshopId: { + type: 'integer', + description: '所属车间id', + format: 'int64', + }, + lineId: { + type: 'integer', + description: '所属产线d', + format: 'int64', + }, + userName: { type: 'string', description: '用户姓名' }, + email: { type: 'string', description: '邮箱' }, + jobTitle: { type: 'string', description: '职称' }, + jobNo: { type: 'string', description: '用户工号' }, + accountNo: { type: 'string', description: '用户账号' }, + password: { type: 'string', description: '用户密码' }, + idNumber: { type: 'string', description: '身份证号' }, + dateOfBirth: { type: 'string', description: '出生日期' }, + telephone: { type: 'string', description: '联系电话' }, + headImageUrl: { type: 'string', description: '头像url' }, + userType: { + type: 'string', + description: '用户类型,1 平台,2 团队,3 工厂', + }, + adminFlag: { + type: 'string', + description: '管理员标识,1 管理员,0 非管理员', + }, + state: { type: 'string', description: '状态(1:在用 2:停用)' }, + deleteFlag: { + type: 'string', + description: '是否删除(0:否 1:是)', + }, + passwordModifyiedTime: { + type: 'string', + description: '修改密码时间', + }, + createdUserId: { + type: 'integer', + description: '创建人', + format: 'int64', + }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '最后更新时间' }, + datetimeStamp: { type: 'string', description: '时间戳' }, + genderCode: { type: 'string', description: '1男 2女 9 未知' }, + publicOpenId: { type: 'string', description: '' }, + currentFactoryId: { + type: 'integer', + description: '', + format: 'int64', + }, + remark: { type: 'string', description: '备注' }, + }, + isAllowed: true, + 'x-id': 'PlatformUser', + }, + description: '', + }, + recordNodeList: { + type: 'array', + items: { + description: '

安灯记录-节点

', + type: 'object', + properties: { + id: { type: 'integer', description: '', format: 'int64' }, + andonRecordId: { + type: 'integer', + description: '', + format: 'int64', + }, + nodeDesc: { type: 'string', description: '节点描述' }, + nodeRemark: { type: 'string', description: '节点备注' }, + nodeType: { + type: 'string', + description: + '1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销', + }, + nodeTypeName: { type: 'string', description: '' }, + nodeUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + nodeUserName: { type: 'string', description: '' }, + createdUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + createdTime: { type: 'string', description: '' }, + modifyiedUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '' }, + }, + isAllowed: true, + 'x-id': 'AndonRecordNode', + }, + description: '', + }, + showColor: { type: 'string', description: '' }, + workCenterId: { type: 'integer', description: '', format: 'int64' }, + shiftShowColor: { type: 'string', description: '' }, + shiftStartTime: { type: 'string', description: '' }, + shiftEndTime: { type: 'string', description: '' }, + reportImgList: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + disposeImgList: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + reportImgUrls: { type: 'string', description: '' }, + disposeImgUrls: { type: 'string', description: '' }, + shiftName: { type: 'string', description: '' }, + completedUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + completedUserName: { type: 'string', description: '' }, + }, + isAllowed: true, + 'x-id': 'AndonRecordVO', + }, + description: '', + }, + total: { type: 'integer', description: '', format: 'int64' }, + size: { type: 'integer', description: '', format: 'int64' }, + current: { type: 'integer', description: '', format: 'int64' }, + orders: { + type: 'array', + items: { + description: 'com.baomidou.mybatisplus.core.metadata.OrderItem', + type: 'object', + properties: { + column: { type: 'string', description: '' }, + asc: { type: 'boolean', description: '' }, + }, + isAllowed: true, + 'x-id': 'OrderItem', + }, + description: '', + }, + optimizeCountSql: { type: 'boolean', description: '' }, + searchCount: { type: 'boolean', description: '' }, + optimizeJoinOfCountSql: { type: 'boolean', description: '' }, + maxLimit: { type: 'integer', description: '', format: 'int64' }, + countId: { type: 'string', description: '' }, + startTime: { type: 'string', description: '' }, + startTimeStr: { type: 'string', description: '' }, + endTime: { type: 'string', description: '' }, + endTimeStr: { type: 'string', description: '' }, + hasNextPage: { type: 'boolean', description: '', default: false }, + }, + isAllowed: true, +}; + +export const $customapiResult = { + type: 'object', + properties: { + code: { type: 'string', description: '状态码' }, + message: { type: 'string', description: '提示' }, + data: { description: '数据', type: 'object', properties: {} }, + success: { type: 'boolean', description: '是否成功' }, + }, + isAllowed: true, +}; + +export const $customapiResultString = { + type: 'object', + properties: { + code: { type: 'string', description: '状态码' }, + message: { type: 'string', description: '提示' }, + data: { type: 'string', description: '数据' }, + success: { type: 'boolean', description: '是否成功' }, + }, + isAllowed: true, +}; + +export const $customreportAbnormalEventDTO = { + type: 'object', + properties: { + abnormalRecordId: { + type: 'integer', + description: '异常记录id', + format: 'int64', + }, + eventId: { type: 'integer', description: '事件id', format: 'int64' }, + processDispatchId: { + type: 'integer', + description: '工序派工id', + format: 'int64', + }, + }, + required: ['abnormalRecordId'], + isAllowed: true, +}; + +export const $customaddDeviceMachine = { + type: 'object', + properties: { + lineId: { type: 'integer', description: '', format: 'int64' }, + lineName: { type: 'string', description: '' }, + machineCode: { type: 'string', description: '' }, + machineName: { type: 'string', description: '' }, + manageUserId: { type: 'integer', description: '', format: 'int64' }, + manageUserName: { type: 'string', description: '' }, + lightSn: { type: 'string', description: '' }, + signalId: { type: 'integer', description: '', format: 'int64' }, + serialNo: { type: 'string', description: '' }, + location: { type: 'string', description: '' }, + imgList: { + type: 'array', + items: { type: 'string' }, + description: '', + default: 'new ArrayList<>()', + }, + deviceMachineId: { + type: 'integer', + description: '更新才有', + format: 'int64', + }, + }, + required: ['lineId', 'machineCode', 'machineName', 'lightSn'], + isAllowed: true, +}; + +export const $customapiResultAndonRecordVO = { + type: 'object', + properties: { + code: { type: 'string', description: '状态码' }, + message: { type: 'string', description: '提示' }, + data: { + description: '

安灯_记录

', + type: 'object', + properties: { + id: { type: 'integer', description: 'ID', format: 'int64' }, + factoryId: { type: 'integer', description: '工厂id', format: 'int64' }, + factoryName: { type: 'string', description: '' }, + deptId: { type: 'integer', description: '', format: 'int64' }, + deptName: { type: 'string', description: '' }, + workshopId: { type: 'integer', description: '车间id', format: 'int64' }, + workshopName: { type: 'string', description: '' }, + lineId: { type: 'integer', description: '产线d', format: 'int64' }, + lineName: { type: 'string', description: '' }, + machineId: { type: 'integer', description: '设备ID', format: 'int64' }, + signalId: { type: 'integer', description: '灯ID', format: 'int64' }, + calendarDetailId: { + type: 'integer', + description: '日历排班ID', + format: 'int64', + }, + calendarId: { type: 'integer', description: '', format: 'int64' }, + calendarDate: { type: 'string', description: '' }, + shiftDetailName: { type: 'string', description: '' }, + machineName: { type: 'string', description: '' }, + machineCode: { type: 'string', description: '' }, + configId: { + type: 'integer', + description: '事件配置ID', + format: 'int64', + }, + configName: { type: 'string', description: '' }, + eventName: { type: 'string', description: '' }, + reportUserId: { + type: 'integer', + description: '报告人ID', + format: 'int64', + }, + reportUserName: { type: 'string', description: '' }, + reportTime: { type: 'string', description: '开始时间' }, + reportComments: { type: 'string', description: '报告备注' }, + reportDate: { type: 'string', description: '报告日期' }, + priority: { type: 'string', description: '优先级' }, + notifyUseridStrs: { type: 'string', description: '通知人ID列表' }, + receiveUserId: { + type: 'integer', + description: '接收人', + format: 'int64', + }, + receiveUserName: { type: 'string', description: '' }, + receiveTime: { type: 'string', description: '接收时间' }, + receiveDurationTime: { + type: 'integer', + description: '接收用时', + format: 'int64', + }, + disposeDurationTime: { + type: 'integer', + description: '', + format: 'int64', + }, + disposeUserId: { + type: 'integer', + description: '处理人ID', + format: 'int64', + }, + disposeUserName: { type: 'string', description: '' }, + disposeDesc: { type: 'string', description: '处理方式' }, + disposeTime: { type: 'string', description: '处理时间' }, + totalDurationTime: { + type: 'integer', + description: '持续时间,单位秒', + format: 'int64', + }, + sourceType: { + type: 'string', + description: '来源,1 移动端,2 安灯盒按钮, 3 异常事件', + }, + state: { + type: 'string', + description: '状态,1 已上报,2 已接收,3 已处理, 9 已撤销', + }, + eventAnalysis: { type: 'string', description: '原因分析' }, + createdUserId: { + type: 'integer', + description: '创建人', + format: 'int64', + }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '最后更新时间' }, + datetimeStamp: { type: 'string', description: '时间戳' }, + oeeDetailId: { + type: 'integer', + description: 'oee明细ID', + format: 'int64', + }, + workCenterName: { type: 'string', description: '' }, + workCenterCode: { type: 'string', description: '' }, + disposeUserNames: { type: 'string', description: '' }, + disposeUserIds: { type: 'string', description: '' }, + totalDurationTimeSt: { type: 'string', description: '' }, + receiveDurationTimeSt: { type: 'string', description: '' }, + disposeDurationTimeSt: { type: 'string', description: '' }, + statusText: { + type: 'string', + description: + '表状态,1 已上报,2 已接收,3 已处理, 9 已撤销\n转换状态 已申请 已响应 已关闭 已撤销', + }, + disposeUserList: { + type: 'array', + items: { + description: '

平台_用户

', + type: 'object', + properties: { + id: { type: 'integer', description: '用户ID', format: 'int64' }, + teamId: { + type: 'integer', + description: '团队id', + format: 'int64', + }, + factoryId: { + type: 'integer', + description: '工厂id', + format: 'int64', + }, + deptId: { type: 'integer', description: '', format: 'int64' }, + workshopId: { + type: 'integer', + description: '所属车间id', + format: 'int64', + }, + lineId: { + type: 'integer', + description: '所属产线d', + format: 'int64', + }, + userName: { type: 'string', description: '用户姓名' }, + email: { type: 'string', description: '邮箱' }, + jobTitle: { type: 'string', description: '职称' }, + jobNo: { type: 'string', description: '用户工号' }, + accountNo: { type: 'string', description: '用户账号' }, + password: { type: 'string', description: '用户密码' }, + idNumber: { type: 'string', description: '身份证号' }, + dateOfBirth: { type: 'string', description: '出生日期' }, + telephone: { type: 'string', description: '联系电话' }, + headImageUrl: { type: 'string', description: '头像url' }, + userType: { + type: 'string', + description: '用户类型,1 平台,2 团队,3 工厂', + }, + adminFlag: { + type: 'string', + description: '管理员标识,1 管理员,0 非管理员', + }, + state: { type: 'string', description: '状态(1:在用 2:停用)' }, + deleteFlag: { + type: 'string', + description: '是否删除(0:否 1:是)', + }, + passwordModifyiedTime: { + type: 'string', + description: '修改密码时间', + }, + createdUserId: { + type: 'integer', + description: '创建人', + format: 'int64', + }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '最后更新时间' }, + datetimeStamp: { type: 'string', description: '时间戳' }, + genderCode: { type: 'string', description: '1男 2女 9 未知' }, + publicOpenId: { type: 'string', description: '' }, + currentFactoryId: { + type: 'integer', + description: '', + format: 'int64', + }, + remark: { type: 'string', description: '备注' }, + }, + isAllowed: true, + 'x-id': 'PlatformUser', + }, + description: '', + }, + recordNodeList: { + type: 'array', + items: { + description: '

安灯记录-节点

', + type: 'object', + properties: { + id: { type: 'integer', description: '', format: 'int64' }, + andonRecordId: { + type: 'integer', + description: '', + format: 'int64', + }, + nodeDesc: { type: 'string', description: '节点描述' }, + nodeRemark: { type: 'string', description: '节点备注' }, + nodeType: { + type: 'string', + description: + '1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销', + }, + nodeTypeName: { type: 'string', description: '' }, + nodeUserId: { type: 'integer', description: '', format: 'int64' }, + nodeUserName: { type: 'string', description: '' }, + createdUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + createdTime: { type: 'string', description: '' }, + modifyiedUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '' }, + }, + isAllowed: true, + 'x-id': 'AndonRecordNode', + }, + description: '', + }, + showColor: { type: 'string', description: '' }, + workCenterId: { type: 'integer', description: '', format: 'int64' }, + shiftShowColor: { type: 'string', description: '' }, + shiftStartTime: { type: 'string', description: '' }, + shiftEndTime: { type: 'string', description: '' }, + reportImgList: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + disposeImgList: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + reportImgUrls: { type: 'string', description: '' }, + disposeImgUrls: { type: 'string', description: '' }, + shiftName: { type: 'string', description: '' }, + completedUserId: { type: 'integer', description: '', format: 'int64' }, + completedUserName: { type: 'string', description: '' }, + }, + isAllowed: true, + 'x-id': 'AndonRecordVO', + }, + success: { type: 'boolean', description: '是否成功' }, + }, + isAllowed: true, +}; + +export const $customandonClose = { + type: 'object', + properties: { + andonRecordId: { type: 'integer', description: '', format: 'int64' }, + disposeDesc: { type: 'string', description: '' }, + disposeImgUrls: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + }, + required: ['andonRecordId'], + isAllowed: true, +}; + +export const $customapiResultMyPageAndonRecordVO = { + type: 'object', + properties: { + code: { type: 'string', description: '状态码' }, + message: { type: 'string', description: '提示' }, + data: { + description: '数据', + type: 'object', + properties: { + records: { + type: 'array', + items: { + description: '

安灯_记录

', + type: 'object', + properties: { + id: { type: 'integer', description: 'ID', format: 'int64' }, + factoryId: { + type: 'integer', + description: '工厂id', + format: 'int64', + }, + factoryName: { type: 'string', description: '' }, + deptId: { type: 'integer', description: '', format: 'int64' }, + deptName: { type: 'string', description: '' }, + workshopId: { + type: 'integer', + description: '车间id', + format: 'int64', + }, + workshopName: { type: 'string', description: '' }, + lineId: { + type: 'integer', + description: '产线d', + format: 'int64', + }, + lineName: { type: 'string', description: '' }, + machineId: { + type: 'integer', + description: '设备ID', + format: 'int64', + }, + signalId: { + type: 'integer', + description: '灯ID', + format: 'int64', + }, + calendarDetailId: { + type: 'integer', + description: '日历排班ID', + format: 'int64', + }, + calendarId: { type: 'integer', description: '', format: 'int64' }, + calendarDate: { type: 'string', description: '' }, + shiftDetailName: { type: 'string', description: '' }, + machineName: { type: 'string', description: '' }, + machineCode: { type: 'string', description: '' }, + configId: { + type: 'integer', + description: '事件配置ID', + format: 'int64', + }, + configName: { type: 'string', description: '' }, + eventName: { type: 'string', description: '' }, + reportUserId: { + type: 'integer', + description: '报告人ID', + format: 'int64', + }, + reportUserName: { type: 'string', description: '' }, + reportTime: { type: 'string', description: '开始时间' }, + reportComments: { type: 'string', description: '报告备注' }, + reportDate: { type: 'string', description: '报告日期' }, + priority: { type: 'string', description: '优先级' }, + notifyUseridStrs: { type: 'string', description: '通知人ID列表' }, + receiveUserId: { + type: 'integer', + description: '接收人', + format: 'int64', + }, + receiveUserName: { type: 'string', description: '' }, + receiveTime: { type: 'string', description: '接收时间' }, + receiveDurationTime: { + type: 'integer', + description: '接收用时', + format: 'int64', + }, + disposeDurationTime: { + type: 'integer', + description: '', + format: 'int64', + }, + disposeUserId: { + type: 'integer', + description: '处理人ID', + format: 'int64', + }, + disposeUserName: { type: 'string', description: '' }, + disposeDesc: { type: 'string', description: '处理方式' }, + disposeTime: { type: 'string', description: '处理时间' }, + totalDurationTime: { + type: 'integer', + description: '持续时间,单位秒', + format: 'int64', + }, + sourceType: { + type: 'string', + description: '来源,1 移动端,2 安灯盒按钮, 3 异常事件', + }, + state: { + type: 'string', + description: '状态,1 已上报,2 已接收,3 已处理, 9 已撤销', + }, + eventAnalysis: { type: 'string', description: '原因分析' }, + createdUserId: { + type: 'integer', + description: '创建人', + format: 'int64', + }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '最后更新时间' }, + datetimeStamp: { type: 'string', description: '时间戳' }, + oeeDetailId: { + type: 'integer', + description: 'oee明细ID', + format: 'int64', + }, + workCenterName: { type: 'string', description: '' }, + workCenterCode: { type: 'string', description: '' }, + disposeUserNames: { type: 'string', description: '' }, + disposeUserIds: { type: 'string', description: '' }, + totalDurationTimeSt: { type: 'string', description: '' }, + receiveDurationTimeSt: { type: 'string', description: '' }, + disposeDurationTimeSt: { type: 'string', description: '' }, + statusText: { + type: 'string', + description: + '表状态,1 已上报,2 已接收,3 已处理, 9 已撤销\n转换状态 已申请 已响应 已关闭 已撤销', + }, + disposeUserList: { + type: 'array', + items: { + description: '

平台_用户

', + type: 'object', + properties: { + id: { + type: 'integer', + description: '用户ID', + format: 'int64', + }, + teamId: { + type: 'integer', + description: '团队id', + format: 'int64', + }, + factoryId: { + type: 'integer', + description: '工厂id', + format: 'int64', + }, + deptId: { + type: 'integer', + description: '', + format: 'int64', + }, + workshopId: { + type: 'integer', + description: '所属车间id', + format: 'int64', + }, + lineId: { + type: 'integer', + description: '所属产线d', + format: 'int64', + }, + userName: { type: 'string', description: '用户姓名' }, + email: { type: 'string', description: '邮箱' }, + jobTitle: { type: 'string', description: '职称' }, + jobNo: { type: 'string', description: '用户工号' }, + accountNo: { type: 'string', description: '用户账号' }, + password: { type: 'string', description: '用户密码' }, + idNumber: { type: 'string', description: '身份证号' }, + dateOfBirth: { type: 'string', description: '出生日期' }, + telephone: { type: 'string', description: '联系电话' }, + headImageUrl: { type: 'string', description: '头像url' }, + userType: { + type: 'string', + description: '用户类型,1 平台,2 团队,3 工厂', + }, + adminFlag: { + type: 'string', + description: '管理员标识,1 管理员,0 非管理员', + }, + state: { + type: 'string', + description: '状态(1:在用 2:停用)', + }, + deleteFlag: { + type: 'string', + description: '是否删除(0:否 1:是)', + }, + passwordModifyiedTime: { + type: 'string', + description: '修改密码时间', + }, + createdUserId: { + type: 'integer', + description: '创建人', + format: 'int64', + }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { + type: 'string', + description: '最后更新时间', + }, + datetimeStamp: { type: 'string', description: '时间戳' }, + genderCode: { + type: 'string', + description: '1男 2女 9 未知', + }, + publicOpenId: { type: 'string', description: '' }, + currentFactoryId: { + type: 'integer', + description: '', + format: 'int64', + }, + remark: { type: 'string', description: '备注' }, + }, + isAllowed: true, + 'x-id': 'PlatformUser', + }, + description: '', + }, + recordNodeList: { + type: 'array', + items: { + description: '

安灯记录-节点

', + type: 'object', + properties: { + id: { type: 'integer', description: '', format: 'int64' }, + andonRecordId: { + type: 'integer', + description: '', + format: 'int64', + }, + nodeDesc: { type: 'string', description: '节点描述' }, + nodeRemark: { type: 'string', description: '节点备注' }, + nodeType: { + type: 'string', + description: + '1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销', + }, + nodeTypeName: { type: 'string', description: '' }, + nodeUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + nodeUserName: { type: 'string', description: '' }, + createdUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + createdTime: { type: 'string', description: '' }, + modifyiedUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '' }, + }, + isAllowed: true, + 'x-id': 'AndonRecordNode', + }, + description: '', + }, + showColor: { type: 'string', description: '' }, + workCenterId: { + type: 'integer', + description: '', + format: 'int64', + }, + shiftShowColor: { type: 'string', description: '' }, + shiftStartTime: { type: 'string', description: '' }, + shiftEndTime: { type: 'string', description: '' }, + reportImgList: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + disposeImgList: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + reportImgUrls: { type: 'string', description: '' }, + disposeImgUrls: { type: 'string', description: '' }, + shiftName: { type: 'string', description: '' }, + completedUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + completedUserName: { type: 'string', description: '' }, + }, + isAllowed: true, + 'x-id': 'AndonRecordVO', + }, + description: '', + }, + total: { type: 'integer', description: '', format: 'int64' }, + size: { type: 'integer', description: '', format: 'int64' }, + current: { type: 'integer', description: '', format: 'int64' }, + orders: { + type: 'array', + items: { + description: 'com.baomidou.mybatisplus.core.metadata.OrderItem', + type: 'object', + properties: { + column: { type: 'string', description: '' }, + asc: { type: 'boolean', description: '' }, + }, + isAllowed: true, + 'x-id': 'OrderItem', + }, + description: '', + }, + optimizeCountSql: { type: 'boolean', description: '' }, + searchCount: { type: 'boolean', description: '' }, + optimizeJoinOfCountSql: { type: 'boolean', description: '' }, + maxLimit: { type: 'integer', description: '', format: 'int64' }, + countId: { type: 'string', description: '' }, + startTime: { type: 'string', description: '' }, + startTimeStr: { type: 'string', description: '' }, + endTime: { type: 'string', description: '' }, + endTimeStr: { type: 'string', description: '' }, + hasNextPage: { type: 'boolean', description: '', default: false }, + }, + isAllowed: true, + 'x-id': 'MyPageAndonRecordVO', + }, + success: { type: 'boolean', description: '是否成功' }, + }, + isAllowed: true, +}; + +export const $customandonRecordQuery = { + type: 'object', + properties: { + queryDeptId: { type: 'integer', description: '', format: 'int64' }, + myRelatedFlag: { + type: 'string', + description: '与我有关, 处理人或者报告人是我或者接收人是我', + default: '0', + }, + queryDisposeStatus: { + type: 'string', + description: '处理状态 1 查询未处理的 2 查询已处理的', + }, + queryTimeType: { + type: 'string', + description: '1 60天内 2 今天 3 本月 5 日期范围查询 默认1', + default: '1', + }, + factoryId: { type: 'integer', description: '', format: 'int64' }, + startTime: { type: 'string', description: '' }, + endTime: { type: 'string', description: '' }, + size: { type: 'integer', description: '', format: 'int64', default: 30 }, + current: { type: 'integer', description: '', format: 'int64', default: 1 }, + }, + isAllowed: true, +}; + +export const $customandonReq = { + type: 'object', + properties: { + configId: { type: 'integer', description: '', format: 'int64' }, + configName: { type: 'string', description: '' }, + imgList: { type: 'array', items: { type: 'string' }, description: '' }, + reportComments: { type: 'string', description: '' }, + selectHandlerUserIds: { + type: 'array', + items: { type: 'integer' }, + description: '处理用户', + }, + workCenterId: { type: 'integer', description: '', format: 'int64' }, + reqUserId: { type: 'integer', description: '', format: 'int64' }, + sourceType: { type: 'string', description: '来源' }, + processDispatchId: { + type: 'integer', + description: '工序派工id', + format: 'int64', + }, + }, + required: ['configId', 'configName', 'selectHandlerUserIds', 'workCenterId'], + isAllowed: true, +}; + +export const $customjSONObject = { + type: 'object', + properties: { key: { type: 'object', properties: {} } }, + isAllowed: true, +}; +/* eslint-disable */ +// @ts-ignore + +export type AddAndonRecordNodeDescUsingPostResponses = { + 200: ApiResult; +}; + +export type AddDeviceMachine = { + lineId: number; + lineName?: string; + machineCode: string; + machineName: string; + manageUserId?: number; + manageUserName?: string; + lightSn: string; + signalId?: number; + serialNo?: string; + location?: string; + imgList?: string[]; + /** 更新才有 */ + deviceMachineId?: number; +}; + +export type AddDeviceMachineUsingPostResponses = { + 200: ApiResult; +}; + +export type AndonClose = { + andonRecordId: number; + disposeDesc?: string; + disposeImgUrls?: string[]; +}; + +export type AndonRecordNode = { + id?: number; + andonRecordId?: number; + /** 节点描述 */ + nodeDesc?: string; + /** 节点备注 */ + nodeRemark?: string; + /** 1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销 */ + nodeType?: string; + nodeTypeName?: string; + nodeUserId?: number; + nodeUserName?: string; + createdUserId?: number; + createdTime?: string; + modifyiedUserId?: number; + modifyiedTime?: string; +}; + +export type AndonRecordQuery = { + queryDeptId?: number; + /** 与我有关, 处理人或者报告人是我或者接收人是我 */ + myRelatedFlag?: string; + /** 处理状态 1 查询未处理的 2 查询已处理的 */ + queryDisposeStatus?: string; + /** 1 60天内 2 今天 3 本月 5 日期范围查询 默认1 */ + queryTimeType?: string; + factoryId?: number; + startTime?: string; + endTime?: string; + size?: number; + current?: number; +}; + +export type AndonRecordVO = { + /** ID */ + id?: number; + /** 工厂id */ + factoryId?: number; + factoryName?: string; + deptId?: number; + deptName?: string; + /** 车间id */ + workshopId?: number; + workshopName?: string; + /** 产线d */ + lineId?: number; + lineName?: string; + /** 设备ID */ + machineId?: number; + /** 灯ID */ + signalId?: number; + /** 日历排班ID */ + calendarDetailId?: number; + calendarId?: number; + calendarDate?: string; + shiftDetailName?: string; + machineName?: string; + machineCode?: string; + /** 事件配置ID */ + configId?: number; + configName?: string; + eventName?: string; + /** 报告人ID */ + reportUserId?: number; + reportUserName?: string; + /** 开始时间 */ + reportTime?: string; + /** 报告备注 */ + reportComments?: string; + /** 报告日期 */ + reportDate?: string; + /** 优先级 */ + priority?: string; + /** 通知人ID列表 */ + notifyUseridStrs?: string; + /** 接收人 */ + receiveUserId?: number; + receiveUserName?: string; + /** 接收时间 */ + receiveTime?: string; + /** 接收用时 */ + receiveDurationTime?: number; + disposeDurationTime?: number; + /** 处理人ID */ + disposeUserId?: number; + disposeUserName?: string; + /** 处理方式 */ + disposeDesc?: string; + /** 处理时间 */ + disposeTime?: string; + /** 持续时间,单位秒 */ + totalDurationTime?: number; + /** 来源,1 移动端,2 安灯盒按钮, 3 异常事件 */ + sourceType?: string; + /** 状态,1 已上报,2 已接收,3 已处理, 9 已撤销 */ + state?: string; + /** 原因分析 */ + eventAnalysis?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + /** oee明细ID */ + oeeDetailId?: number; + workCenterName?: string; + workCenterCode?: string; + disposeUserNames?: string; + disposeUserIds?: string; + totalDurationTimeSt?: string; + receiveDurationTimeSt?: string; + disposeDurationTimeSt?: string; + /** 表状态,1 已上报,2 已接收,3 已处理, 9 已撤销转换状态 已申请 已响应 已关闭 已撤销 */ + statusText?: string; + disposeUserList?: PlatformUser[]; + recordNodeList?: AndonRecordNode[]; + showColor?: string; + workCenterId?: number; + shiftShowColor?: string; + shiftStartTime?: string; + shiftEndTime?: string; + reportImgList?: string[]; + disposeImgList?: string[]; + reportImgUrls?: string; + disposeImgUrls?: string; + shiftName?: string; + completedUserId?: number; + completedUserName?: string; +}; + +export type AndonReq = { + configId: number; + configName: string; + imgList?: string[]; + reportComments?: string; + /** 处理用户 */ + selectHandlerUserIds: number[]; + workCenterId: number; + reqUserId?: number; + /** 来源 */ + sourceType?: string; + /** 工序派工id */ + processDispatchId?: number; +}; + +export type AndonReqUsingPostResponses = { + 200: ApiResult; +}; + +export type ApiResult = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: Record; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultAndonRecordVO = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /**

安灯_记录

*/ + data?: AndonRecordVO; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultMyPageAndonRecordVO = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: MyPageAndonRecordVO; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultString = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: string; + /** 是否成功 */ + success?: boolean; +}; + +export type CancelRemarkStatusUsingPostResponses = { + 200: ApiResult; +}; + +export type ChangeAndonEventTypeUsingPostResponses = { + 200: ApiResult; +}; + +export type ChangeDisposeAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type CloseAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAAndonReqCfgUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAbnormalEventCfgListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAbnormalRecordUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAllUserUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAllWorkshopLineUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAndonRecordInfoUsingPostResponses = { + 200: ApiResultAndonRecordVO; +}; + +export type GetAndonRecordListUsingPostResponses = { + 200: ApiResultMyPageAndonRecordVO; +}; + +export type GetCurrentShiftUsingPostResponses = { + 200: ApiResultString; +}; + +export type GetDeviceListUsingPostBody = string; + +export type GetDeviceListUsingPostParams = { + /** ID */ + id?: number; + /** 工厂ID */ + factoryId?: number; + deptId?: number; + /** 车间ID */ + workshopId?: number; + /** 产线ID */ + lineId?: number; + /** 分类ID */ + categoryId?: number; + /** 灯ID */ + signalId?: number; + lightSn?: string; + /** 设备编号 */ + machineCode?: string; + /** 设备名称 */ + machineName?: string; + /** 拼音码 */ + pinyin?: string; + /** 五笔码 */ + wubi?: string; + /** 医院图片 */ + imgUrlStrs?: string; + /** 管理员ID */ + manageUserId?: number; + /** 品牌 */ + trademark?: string; + /** 型号 */ + model?: string; + /** 序列号 */ + serialNo?: string; + /** 供应商 */ + supplier?: string; + /** 启用日期 */ + activationDate?: string; + /** 验收日期 */ + checkDate?: string; + /** 出厂日期 */ + productionDate?: string; + /** 脉冲间隔 */ + pulseInterval?: number; + /** 标准利用率 */ + standardUseRate?: string; + /** 放置地点 */ + location?: string; + /** 状态,1启用,2 停用 */ + state?: string; + /** 备注 */ + remark?: string; + /** 删除标记 */ + deleteFlag?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + searchKey?: string; + /** 0 关机,1 运行,2 等待,3 异常 */ + oeeState?: string; + oeeTime?: string; + stateRecordId?: number; + stateStartTime?: string; +}; + +export type GetDeviceListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetEsopListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetUserWorkshopWorkcenterUsingPostParams = { + selectDeptId?: number; +}; + +export type GetUserWorkshopWorkcenterUsingPostResponses = { + 200: ApiResult; +}; + +export type GetWorkCenterUsingPostResponses = { + 200: ApiResult; +}; + +export type JSONObject = { + key?: Record; +}; + +export type MyPageAndonRecordVO = { + records?: AndonRecordVO[]; + total?: number; + size?: number; + current?: number; + orders?: OrderItem[]; + optimizeCountSql?: boolean; + searchCount?: boolean; + optimizeJoinOfCountSql?: boolean; + maxLimit?: number; + countId?: string; + startTime?: string; + startTimeStr?: string; + endTime?: string; + endTimeStr?: string; + hasNextPage?: boolean; +}; + +export type OrderItem = { + column?: string; + asc?: boolean; +}; + +export type PlatformUser = { + /** 用户ID */ + id?: number; + /** 团队id */ + teamId?: number; + /** 工厂id */ + factoryId?: number; + deptId?: number; + /** 所属车间id */ + workshopId?: number; + /** 所属产线d */ + lineId?: number; + /** 用户姓名 */ + userName?: string; + /** 邮箱 */ + email?: string; + /** 职称 */ + jobTitle?: string; + /** 用户工号 */ + jobNo?: string; + /** 用户账号 */ + accountNo?: string; + /** 用户密码 */ + password?: string; + /** 身份证号 */ + idNumber?: string; + /** 出生日期 */ + dateOfBirth?: string; + /** 联系电话 */ + telephone?: string; + /** 头像url */ + headImageUrl?: string; + /** 用户类型,1 平台,2 团队,3 工厂 */ + userType?: string; + /** 管理员标识,1 管理员,0 非管理员 */ + adminFlag?: string; + /** 状态(1:在用 2:停用) */ + state?: string; + /** 是否删除(0:否 1:是) */ + deleteFlag?: string; + /** 修改密码时间 */ + passwordModifyiedTime?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + /** 1男 2女 9 未知 */ + genderCode?: string; + publicOpenId?: string; + currentFactoryId?: number; + /** 备注 */ + remark?: string; +}; + +export type ReceiveAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type RemarkStatusUsingPostResponses = { + 200: ApiResult; +}; + +export type ReportAbnormalEventDTO = { + /** 异常记录id */ + abnormalRecordId: number; + /** 事件id */ + eventId?: number; + /** 工序派工id */ + processDispatchId?: number; +}; + +export type ReportAbnormalEventUsingPostResponses = { + 200: ApiResult; +}; + +export type UpdateDeviceMachineUsingPostResponses = { + 200: ApiResult; +}; +/* eslint-disable */ +// @ts-ignore +import request from 'axios'; + +import * as API from './types'; + +/** addAndonRecordNodeDesc POST /api/web/workcenter-operate/add-andon-record-node-desc */ +export function addAndonRecordNodeDescUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/add-andon-record-node-desc', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** addDeviceMachine POST /api/web/workcenter-operate/add-device-machine */ +export function addDeviceMachineUsingPost({ + body, + options, +}: { + body: API.AddDeviceMachine; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/add-device-machine', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 安灯请求 POST /api/web/workcenter-operate/andon-req */ +export function andonReqUsingPost({ + body, + options, +}: { + body: API.AndonReq; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/andon-req', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** cancelRemarkStatus POST /api/web/workcenter-operate/cancel-remark-status */ +export function cancelRemarkStatusUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/cancel-remark-status', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 改变安灯事件类型 POST /api/web/workcenter-operate/change-andon-event-type */ +export function changeAndonEventTypeUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/change-andon-event-type', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 改变安灯处理人 POST /api/web/workcenter-operate/change-dispose-andon */ +export function changeDisposeAndonUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/change-dispose-andon', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 关闭安灯 POST /api/web/workcenter-operate/close-andon */ +export function closeAndonUsingPost({ + body, + options, +}: { + body: API.AndonClose; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/close-andon', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** getAndonReqCfg POST /api/web/workcenter-operate/get-aAndon-req-cfg */ +export function getAAndonReqCfgUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-aAndon-req-cfg', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 获取异常事件配置 POST /api/web/workcenter-operate/get-abnormal-event-cfg-list */ +export function getAbnormalEventCfgListUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-abnormal-event-cfg-list', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAbnormalRecord POST /api/web/workcenter-operate/get-abnormal-record */ +export function getAbnormalRecordUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-abnormal-record', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAllUser POST /api/web/workcenter-operate/get-all-user */ +export function getAllUserUsingPost({ + options, +}: { + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-all-user', { + method: 'POST', + ...(options || {}), + }); +} + +/** getAllWorkshopAndLineList POST /api/web/workcenter-operate/get-all-workshop-line */ +export function getAllWorkshopLineUsingPost({ + options, +}: { + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-all-workshop-line', + { + method: 'POST', + ...(options || {}), + } + ); +} + +/** 获取安灯记录详情 POST /api/web/workcenter-operate/get-andon-record-info */ +export function getAndonRecordInfoUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-andon-record-info', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAndonRecordList POST /api/web/workcenter-operate/get-andon-record-list */ +export function getAndonRecordListUsingPost({ + body, + options, +}: { + body: API.AndonRecordQuery; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-andon-record-list', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getCurrentShift POST /api/web/workcenter-operate/get-current-shift */ +export function getCurrentShiftUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-current-shift', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getDeviceList POST /api/web/workcenter-operate/get-device-list */ +export function getDeviceListUsingPost({ + params, + body, + options, +}: { + // 叠加生成的Param类型 (非body参数openapi默认没有生成对象) + params: API.GetDeviceListUsingPostParams; + body: API.GetDeviceListUsingPostBody; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-device-list', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + params: { + ...params, + }, + data: body, + ...(options || {}), + }); +} + +/** getEsopList POST /api/web/workcenter-operate/get-esop-list */ +export function getEsopListUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-esop-list', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** 获取车间产线结构 POST /api/web/workcenter-operate/get-user-workshop-workcenter */ +export function getUserWorkshopWorkcenterUsingPost({ + params, + options, +}: { + // 叠加生成的Param类型 (非body参数openapi默认没有生成对象) + params: API.GetUserWorkshopWorkcenterUsingPostParams; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-user-workshop-workcenter', + { + method: 'POST', + params: { + ...params, + }, + ...(options || {}), + } + ); +} + +/** getWorkCenter POST /api/web/workcenter-operate/get-work-center */ +export function getWorkCenterUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-work-center', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** receiveAndon POST /api/web/workcenter-operate/receive-andon */ +export function receiveAndonUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/receive-andon', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** remarkStatus POST /api/web/workcenter-operate/remark-status */ +export function remarkStatusUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/remark-status', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** 报告异常事件 POST /api/web/workcenter-operate/report-abnormal-event */ +export function reportAbnormalEventUsingPost({ + body, + options, +}: { + body: API.ReportAbnormalEventDTO; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/report-abnormal-event', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** updateDeviceMachine POST /api/web/workcenter-operate/update-device-machine */ +export function updateDeviceMachineUsingPost({ + body, + options, +}: { + body: API.AddDeviceMachine; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/update-device-machine', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} diff --git "a/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 ServiceController hook - \350\277\207\346\273\244\345\222\214\344\277\256\346\224\271 API \345\210\227\350\241\250.snap" "b/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 ServiceController hook - \350\277\207\346\273\244\345\222\214\344\277\256\346\224\271 API \345\210\227\350\241\250.snap" new file mode 100644 index 0000000..92429e3 --- /dev/null +++ "b/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 ServiceController hook - \350\277\207\346\273\244\345\222\214\344\277\256\346\224\271 API \345\210\227\350\241\250.snap" @@ -0,0 +1,946 @@ +/* eslint-disable */ +// @ts-ignore +export * from './types'; + +export * from './web'; +/* eslint-disable */ +// @ts-ignore + +export type AddAndonRecordNodeDescUsingPostResponses = { + 200: ApiResult; +}; + +export type AddDeviceMachine = { + lineId: number; + lineName?: string; + machineCode: string; + machineName: string; + manageUserId?: number; + manageUserName?: string; + lightSn: string; + signalId?: number; + serialNo?: string; + location?: string; + imgList?: string[]; + /** 更新才有 */ + deviceMachineId?: number; +}; + +export type AddDeviceMachineUsingPostResponses = { + 200: ApiResult; +}; + +export type AndonClose = { + andonRecordId: number; + disposeDesc?: string; + disposeImgUrls?: string[]; +}; + +export type AndonRecordNode = { + id?: number; + andonRecordId?: number; + /** 节点描述 */ + nodeDesc?: string; + /** 节点备注 */ + nodeRemark?: string; + /** 1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销 */ + nodeType?: string; + nodeTypeName?: string; + nodeUserId?: number; + nodeUserName?: string; + createdUserId?: number; + createdTime?: string; + modifyiedUserId?: number; + modifyiedTime?: string; +}; + +export type AndonRecordQuery = { + queryDeptId?: number; + /** 与我有关, 处理人或者报告人是我或者接收人是我 */ + myRelatedFlag?: string; + /** 处理状态 1 查询未处理的 2 查询已处理的 */ + queryDisposeStatus?: string; + /** 1 60天内 2 今天 3 本月 5 日期范围查询 默认1 */ + queryTimeType?: string; + factoryId?: number; + startTime?: string; + endTime?: string; + size?: number; + current?: number; +}; + +export type AndonRecordVO = { + /** ID */ + id?: number; + /** 工厂id */ + factoryId?: number; + factoryName?: string; + deptId?: number; + deptName?: string; + /** 车间id */ + workshopId?: number; + workshopName?: string; + /** 产线d */ + lineId?: number; + lineName?: string; + /** 设备ID */ + machineId?: number; + /** 灯ID */ + signalId?: number; + /** 日历排班ID */ + calendarDetailId?: number; + calendarId?: number; + calendarDate?: string; + shiftDetailName?: string; + machineName?: string; + machineCode?: string; + /** 事件配置ID */ + configId?: number; + configName?: string; + eventName?: string; + /** 报告人ID */ + reportUserId?: number; + reportUserName?: string; + /** 开始时间 */ + reportTime?: string; + /** 报告备注 */ + reportComments?: string; + /** 报告日期 */ + reportDate?: string; + /** 优先级 */ + priority?: string; + /** 通知人ID列表 */ + notifyUseridStrs?: string; + /** 接收人 */ + receiveUserId?: number; + receiveUserName?: string; + /** 接收时间 */ + receiveTime?: string; + /** 接收用时 */ + receiveDurationTime?: number; + disposeDurationTime?: number; + /** 处理人ID */ + disposeUserId?: number; + disposeUserName?: string; + /** 处理方式 */ + disposeDesc?: string; + /** 处理时间 */ + disposeTime?: string; + /** 持续时间,单位秒 */ + totalDurationTime?: number; + /** 来源,1 移动端,2 安灯盒按钮, 3 异常事件 */ + sourceType?: string; + /** 状态,1 已上报,2 已接收,3 已处理, 9 已撤销 */ + state?: string; + /** 原因分析 */ + eventAnalysis?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + /** oee明细ID */ + oeeDetailId?: number; + workCenterName?: string; + workCenterCode?: string; + disposeUserNames?: string; + disposeUserIds?: string; + totalDurationTimeSt?: string; + receiveDurationTimeSt?: string; + disposeDurationTimeSt?: string; + /** 表状态,1 已上报,2 已接收,3 已处理, 9 已撤销转换状态 已申请 已响应 已关闭 已撤销 */ + statusText?: string; + disposeUserList?: PlatformUser[]; + recordNodeList?: AndonRecordNode[]; + showColor?: string; + workCenterId?: number; + shiftShowColor?: string; + shiftStartTime?: string; + shiftEndTime?: string; + reportImgList?: string[]; + disposeImgList?: string[]; + reportImgUrls?: string; + disposeImgUrls?: string; + shiftName?: string; + completedUserId?: number; + completedUserName?: string; +}; + +export type AndonReq = { + configId: number; + configName: string; + imgList?: string[]; + reportComments?: string; + /** 处理用户 */ + selectHandlerUserIds: number[]; + workCenterId: number; + reqUserId?: number; + /** 来源 */ + sourceType?: string; + /** 工序派工id */ + processDispatchId?: number; +}; + +export type AndonReqUsingPostResponses = { + 200: ApiResult; +}; + +export type ApiResult = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: Record; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultAndonRecordVO = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /**

安灯_记录

*/ + data?: AndonRecordVO; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultMyPageAndonRecordVO = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: MyPageAndonRecordVO; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultString = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: string; + /** 是否成功 */ + success?: boolean; +}; + +export type CancelRemarkStatusUsingPostResponses = { + 200: ApiResult; +}; + +export type ChangeAndonEventTypeUsingPostResponses = { + 200: ApiResult; +}; + +export type ChangeDisposeAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type CloseAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAAndonReqCfgUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAbnormalEventCfgListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAbnormalRecordUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAllUserUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAllWorkshopLineUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAndonRecordInfoUsingPostResponses = { + 200: ApiResultAndonRecordVO; +}; + +export type GetAndonRecordListUsingPostResponses = { + 200: ApiResultMyPageAndonRecordVO; +}; + +export type GetCurrentShiftUsingPostResponses = { + 200: ApiResultString; +}; + +export type GetDeviceListUsingPostBody = string; + +export type GetDeviceListUsingPostParams = { + /** ID */ + id?: number; + /** 工厂ID */ + factoryId?: number; + deptId?: number; + /** 车间ID */ + workshopId?: number; + /** 产线ID */ + lineId?: number; + /** 分类ID */ + categoryId?: number; + /** 灯ID */ + signalId?: number; + lightSn?: string; + /** 设备编号 */ + machineCode?: string; + /** 设备名称 */ + machineName?: string; + /** 拼音码 */ + pinyin?: string; + /** 五笔码 */ + wubi?: string; + /** 医院图片 */ + imgUrlStrs?: string; + /** 管理员ID */ + manageUserId?: number; + /** 品牌 */ + trademark?: string; + /** 型号 */ + model?: string; + /** 序列号 */ + serialNo?: string; + /** 供应商 */ + supplier?: string; + /** 启用日期 */ + activationDate?: string; + /** 验收日期 */ + checkDate?: string; + /** 出厂日期 */ + productionDate?: string; + /** 脉冲间隔 */ + pulseInterval?: number; + /** 标准利用率 */ + standardUseRate?: string; + /** 放置地点 */ + location?: string; + /** 状态,1启用,2 停用 */ + state?: string; + /** 备注 */ + remark?: string; + /** 删除标记 */ + deleteFlag?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + searchKey?: string; + /** 0 关机,1 运行,2 等待,3 异常 */ + oeeState?: string; + oeeTime?: string; + stateRecordId?: number; + stateStartTime?: string; +}; + +export type GetDeviceListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetEsopListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetUserWorkshopWorkcenterUsingPostParams = { + selectDeptId?: number; +}; + +export type GetUserWorkshopWorkcenterUsingPostResponses = { + 200: ApiResult; +}; + +export type GetWorkCenterUsingPostResponses = { + 200: ApiResult; +}; + +export type JSONObject = { + key?: Record; +}; + +export type MyPageAndonRecordVO = { + records?: AndonRecordVO[]; + total?: number; + size?: number; + current?: number; + orders?: OrderItem[]; + optimizeCountSql?: boolean; + searchCount?: boolean; + optimizeJoinOfCountSql?: boolean; + maxLimit?: number; + countId?: string; + startTime?: string; + startTimeStr?: string; + endTime?: string; + endTimeStr?: string; + hasNextPage?: boolean; +}; + +export type OrderItem = { + column?: string; + asc?: boolean; +}; + +export type PlatformUser = { + /** 用户ID */ + id?: number; + /** 团队id */ + teamId?: number; + /** 工厂id */ + factoryId?: number; + deptId?: number; + /** 所属车间id */ + workshopId?: number; + /** 所属产线d */ + lineId?: number; + /** 用户姓名 */ + userName?: string; + /** 邮箱 */ + email?: string; + /** 职称 */ + jobTitle?: string; + /** 用户工号 */ + jobNo?: string; + /** 用户账号 */ + accountNo?: string; + /** 用户密码 */ + password?: string; + /** 身份证号 */ + idNumber?: string; + /** 出生日期 */ + dateOfBirth?: string; + /** 联系电话 */ + telephone?: string; + /** 头像url */ + headImageUrl?: string; + /** 用户类型,1 平台,2 团队,3 工厂 */ + userType?: string; + /** 管理员标识,1 管理员,0 非管理员 */ + adminFlag?: string; + /** 状态(1:在用 2:停用) */ + state?: string; + /** 是否删除(0:否 1:是) */ + deleteFlag?: string; + /** 修改密码时间 */ + passwordModifyiedTime?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + /** 1男 2女 9 未知 */ + genderCode?: string; + publicOpenId?: string; + currentFactoryId?: number; + /** 备注 */ + remark?: string; +}; + +export type ReceiveAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type RemarkStatusUsingPostResponses = { + 200: ApiResult; +}; + +export type ReportAbnormalEventDTO = { + /** 异常记录id */ + abnormalRecordId: number; + /** 事件id */ + eventId?: number; + /** 工序派工id */ + processDispatchId?: number; +}; + +export type ReportAbnormalEventUsingPostResponses = { + 200: ApiResult; +}; + +export type UpdateDeviceMachineUsingPostResponses = { + 200: ApiResult; +}; +/* eslint-disable */ +// @ts-ignore +import request from 'axios'; + +import * as API from './types'; + +/** addAndonRecordNodeDesc POST /api/web/workcenter-operate/add-andon-record-node-desc */ +export function addAndonRecordNodeDescUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/add-andon-record-node-desc', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** addDeviceMachine POST /api/web/workcenter-operate/add-device-machine */ +export function addDeviceMachineUsingPost({ + body, + options, +}: { + body: API.AddDeviceMachine; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/add-device-machine', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 安灯请求 POST /api/web/workcenter-operate/andon-req */ +export function andonReqUsingPost({ + body, + options, +}: { + body: API.AndonReq; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/andon-req', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** cancelRemarkStatus POST /api/web/workcenter-operate/cancel-remark-status */ +export function cancelRemarkStatusUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/cancel-remark-status', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 改变安灯事件类型 POST /api/web/workcenter-operate/change-andon-event-type */ +export function changeAndonEventTypeUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/change-andon-event-type', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 改变安灯处理人 POST /api/web/workcenter-operate/change-dispose-andon */ +export function changeDisposeAndonUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/change-dispose-andon', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 关闭安灯 POST /api/web/workcenter-operate/close-andon */ +export function closeAndonUsingPost({ + body, + options, +}: { + body: API.AndonClose; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/close-andon', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** getAndonReqCfg POST /api/web/workcenter-operate/get-aAndon-req-cfg */ +export function getAAndonReqCfgUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-aAndon-req-cfg', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 获取异常事件配置 POST /api/web/workcenter-operate/get-abnormal-event-cfg-list */ +export function getAbnormalEventCfgListUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-abnormal-event-cfg-list', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAbnormalRecord POST /api/web/workcenter-operate/get-abnormal-record */ +export function getAbnormalRecordUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-abnormal-record', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAllUser POST /api/web/workcenter-operate/get-all-user */ +export function getAllUserUsingPost({ + options, +}: { + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-all-user', { + method: 'POST', + ...(options || {}), + }); +} + +/** getAllWorkshopAndLineList POST /api/web/workcenter-operate/get-all-workshop-line */ +export function getAllWorkshopLineUsingPost({ + options, +}: { + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-all-workshop-line', + { + method: 'POST', + ...(options || {}), + } + ); +} + +/** 获取安灯记录详情 POST /api/web/workcenter-operate/get-andon-record-info */ +export function getAndonRecordInfoUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-andon-record-info', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAndonRecordList POST /api/web/workcenter-operate/get-andon-record-list */ +export function getAndonRecordListUsingPost({ + body, + options, +}: { + body: API.AndonRecordQuery; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-andon-record-list', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getCurrentShift POST /api/web/workcenter-operate/get-current-shift */ +export function getCurrentShiftUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-current-shift', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getDeviceList POST /api/web/workcenter-operate/get-device-list */ +export function getDeviceListUsingPost({ + params, + body, + options, +}: { + // 叠加生成的Param类型 (非body参数openapi默认没有生成对象) + params: API.GetDeviceListUsingPostParams; + body: API.GetDeviceListUsingPostBody; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-device-list', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + params: { + ...params, + }, + data: body, + ...(options || {}), + }); +} + +/** getEsopList POST /api/web/workcenter-operate/get-esop-list */ +export function getEsopListUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-esop-list', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** 获取车间产线结构 POST /api/web/workcenter-operate/get-user-workshop-workcenter */ +export function getUserWorkshopWorkcenterUsingPost({ + params, + options, +}: { + // 叠加生成的Param类型 (非body参数openapi默认没有生成对象) + params: API.GetUserWorkshopWorkcenterUsingPostParams; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-user-workshop-workcenter', + { + method: 'POST', + params: { + ...params, + }, + ...(options || {}), + } + ); +} + +/** getWorkCenter POST /api/web/workcenter-operate/get-work-center */ +export function getWorkCenterUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-work-center', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** receiveAndon POST /api/web/workcenter-operate/receive-andon */ +export function receiveAndonUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/receive-andon', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** remarkStatus POST /api/web/workcenter-operate/remark-status */ +export function remarkStatusUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/remark-status', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** 报告异常事件 POST /api/web/workcenter-operate/report-abnormal-event */ +export function reportAbnormalEventUsingPost({ + body, + options, +}: { + body: API.ReportAbnormalEventDTO; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/report-abnormal-event', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** updateDeviceMachine POST /api/web/workcenter-operate/update-device-machine */ +export function updateDeviceMachineUsingPost({ + body, + options, +}: { + body: API.AddDeviceMachine; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/update-device-machine', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} diff --git "a/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 ServiceIndex hook - \346\216\222\345\272\217\346\216\247\345\210\266\345\231\250\345\210\227\350\241\250.snap" "b/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 ServiceIndex hook - \346\216\222\345\272\217\346\216\247\345\210\266\345\231\250\345\210\227\350\241\250.snap" new file mode 100644 index 0000000..92429e3 --- /dev/null +++ "b/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 ServiceIndex hook - \346\216\222\345\272\217\346\216\247\345\210\266\345\231\250\345\210\227\350\241\250.snap" @@ -0,0 +1,946 @@ +/* eslint-disable */ +// @ts-ignore +export * from './types'; + +export * from './web'; +/* eslint-disable */ +// @ts-ignore + +export type AddAndonRecordNodeDescUsingPostResponses = { + 200: ApiResult; +}; + +export type AddDeviceMachine = { + lineId: number; + lineName?: string; + machineCode: string; + machineName: string; + manageUserId?: number; + manageUserName?: string; + lightSn: string; + signalId?: number; + serialNo?: string; + location?: string; + imgList?: string[]; + /** 更新才有 */ + deviceMachineId?: number; +}; + +export type AddDeviceMachineUsingPostResponses = { + 200: ApiResult; +}; + +export type AndonClose = { + andonRecordId: number; + disposeDesc?: string; + disposeImgUrls?: string[]; +}; + +export type AndonRecordNode = { + id?: number; + andonRecordId?: number; + /** 节点描述 */ + nodeDesc?: string; + /** 节点备注 */ + nodeRemark?: string; + /** 1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销 */ + nodeType?: string; + nodeTypeName?: string; + nodeUserId?: number; + nodeUserName?: string; + createdUserId?: number; + createdTime?: string; + modifyiedUserId?: number; + modifyiedTime?: string; +}; + +export type AndonRecordQuery = { + queryDeptId?: number; + /** 与我有关, 处理人或者报告人是我或者接收人是我 */ + myRelatedFlag?: string; + /** 处理状态 1 查询未处理的 2 查询已处理的 */ + queryDisposeStatus?: string; + /** 1 60天内 2 今天 3 本月 5 日期范围查询 默认1 */ + queryTimeType?: string; + factoryId?: number; + startTime?: string; + endTime?: string; + size?: number; + current?: number; +}; + +export type AndonRecordVO = { + /** ID */ + id?: number; + /** 工厂id */ + factoryId?: number; + factoryName?: string; + deptId?: number; + deptName?: string; + /** 车间id */ + workshopId?: number; + workshopName?: string; + /** 产线d */ + lineId?: number; + lineName?: string; + /** 设备ID */ + machineId?: number; + /** 灯ID */ + signalId?: number; + /** 日历排班ID */ + calendarDetailId?: number; + calendarId?: number; + calendarDate?: string; + shiftDetailName?: string; + machineName?: string; + machineCode?: string; + /** 事件配置ID */ + configId?: number; + configName?: string; + eventName?: string; + /** 报告人ID */ + reportUserId?: number; + reportUserName?: string; + /** 开始时间 */ + reportTime?: string; + /** 报告备注 */ + reportComments?: string; + /** 报告日期 */ + reportDate?: string; + /** 优先级 */ + priority?: string; + /** 通知人ID列表 */ + notifyUseridStrs?: string; + /** 接收人 */ + receiveUserId?: number; + receiveUserName?: string; + /** 接收时间 */ + receiveTime?: string; + /** 接收用时 */ + receiveDurationTime?: number; + disposeDurationTime?: number; + /** 处理人ID */ + disposeUserId?: number; + disposeUserName?: string; + /** 处理方式 */ + disposeDesc?: string; + /** 处理时间 */ + disposeTime?: string; + /** 持续时间,单位秒 */ + totalDurationTime?: number; + /** 来源,1 移动端,2 安灯盒按钮, 3 异常事件 */ + sourceType?: string; + /** 状态,1 已上报,2 已接收,3 已处理, 9 已撤销 */ + state?: string; + /** 原因分析 */ + eventAnalysis?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + /** oee明细ID */ + oeeDetailId?: number; + workCenterName?: string; + workCenterCode?: string; + disposeUserNames?: string; + disposeUserIds?: string; + totalDurationTimeSt?: string; + receiveDurationTimeSt?: string; + disposeDurationTimeSt?: string; + /** 表状态,1 已上报,2 已接收,3 已处理, 9 已撤销转换状态 已申请 已响应 已关闭 已撤销 */ + statusText?: string; + disposeUserList?: PlatformUser[]; + recordNodeList?: AndonRecordNode[]; + showColor?: string; + workCenterId?: number; + shiftShowColor?: string; + shiftStartTime?: string; + shiftEndTime?: string; + reportImgList?: string[]; + disposeImgList?: string[]; + reportImgUrls?: string; + disposeImgUrls?: string; + shiftName?: string; + completedUserId?: number; + completedUserName?: string; +}; + +export type AndonReq = { + configId: number; + configName: string; + imgList?: string[]; + reportComments?: string; + /** 处理用户 */ + selectHandlerUserIds: number[]; + workCenterId: number; + reqUserId?: number; + /** 来源 */ + sourceType?: string; + /** 工序派工id */ + processDispatchId?: number; +}; + +export type AndonReqUsingPostResponses = { + 200: ApiResult; +}; + +export type ApiResult = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: Record; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultAndonRecordVO = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /**

安灯_记录

*/ + data?: AndonRecordVO; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultMyPageAndonRecordVO = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: MyPageAndonRecordVO; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultString = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: string; + /** 是否成功 */ + success?: boolean; +}; + +export type CancelRemarkStatusUsingPostResponses = { + 200: ApiResult; +}; + +export type ChangeAndonEventTypeUsingPostResponses = { + 200: ApiResult; +}; + +export type ChangeDisposeAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type CloseAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAAndonReqCfgUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAbnormalEventCfgListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAbnormalRecordUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAllUserUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAllWorkshopLineUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAndonRecordInfoUsingPostResponses = { + 200: ApiResultAndonRecordVO; +}; + +export type GetAndonRecordListUsingPostResponses = { + 200: ApiResultMyPageAndonRecordVO; +}; + +export type GetCurrentShiftUsingPostResponses = { + 200: ApiResultString; +}; + +export type GetDeviceListUsingPostBody = string; + +export type GetDeviceListUsingPostParams = { + /** ID */ + id?: number; + /** 工厂ID */ + factoryId?: number; + deptId?: number; + /** 车间ID */ + workshopId?: number; + /** 产线ID */ + lineId?: number; + /** 分类ID */ + categoryId?: number; + /** 灯ID */ + signalId?: number; + lightSn?: string; + /** 设备编号 */ + machineCode?: string; + /** 设备名称 */ + machineName?: string; + /** 拼音码 */ + pinyin?: string; + /** 五笔码 */ + wubi?: string; + /** 医院图片 */ + imgUrlStrs?: string; + /** 管理员ID */ + manageUserId?: number; + /** 品牌 */ + trademark?: string; + /** 型号 */ + model?: string; + /** 序列号 */ + serialNo?: string; + /** 供应商 */ + supplier?: string; + /** 启用日期 */ + activationDate?: string; + /** 验收日期 */ + checkDate?: string; + /** 出厂日期 */ + productionDate?: string; + /** 脉冲间隔 */ + pulseInterval?: number; + /** 标准利用率 */ + standardUseRate?: string; + /** 放置地点 */ + location?: string; + /** 状态,1启用,2 停用 */ + state?: string; + /** 备注 */ + remark?: string; + /** 删除标记 */ + deleteFlag?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + searchKey?: string; + /** 0 关机,1 运行,2 等待,3 异常 */ + oeeState?: string; + oeeTime?: string; + stateRecordId?: number; + stateStartTime?: string; +}; + +export type GetDeviceListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetEsopListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetUserWorkshopWorkcenterUsingPostParams = { + selectDeptId?: number; +}; + +export type GetUserWorkshopWorkcenterUsingPostResponses = { + 200: ApiResult; +}; + +export type GetWorkCenterUsingPostResponses = { + 200: ApiResult; +}; + +export type JSONObject = { + key?: Record; +}; + +export type MyPageAndonRecordVO = { + records?: AndonRecordVO[]; + total?: number; + size?: number; + current?: number; + orders?: OrderItem[]; + optimizeCountSql?: boolean; + searchCount?: boolean; + optimizeJoinOfCountSql?: boolean; + maxLimit?: number; + countId?: string; + startTime?: string; + startTimeStr?: string; + endTime?: string; + endTimeStr?: string; + hasNextPage?: boolean; +}; + +export type OrderItem = { + column?: string; + asc?: boolean; +}; + +export type PlatformUser = { + /** 用户ID */ + id?: number; + /** 团队id */ + teamId?: number; + /** 工厂id */ + factoryId?: number; + deptId?: number; + /** 所属车间id */ + workshopId?: number; + /** 所属产线d */ + lineId?: number; + /** 用户姓名 */ + userName?: string; + /** 邮箱 */ + email?: string; + /** 职称 */ + jobTitle?: string; + /** 用户工号 */ + jobNo?: string; + /** 用户账号 */ + accountNo?: string; + /** 用户密码 */ + password?: string; + /** 身份证号 */ + idNumber?: string; + /** 出生日期 */ + dateOfBirth?: string; + /** 联系电话 */ + telephone?: string; + /** 头像url */ + headImageUrl?: string; + /** 用户类型,1 平台,2 团队,3 工厂 */ + userType?: string; + /** 管理员标识,1 管理员,0 非管理员 */ + adminFlag?: string; + /** 状态(1:在用 2:停用) */ + state?: string; + /** 是否删除(0:否 1:是) */ + deleteFlag?: string; + /** 修改密码时间 */ + passwordModifyiedTime?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + /** 1男 2女 9 未知 */ + genderCode?: string; + publicOpenId?: string; + currentFactoryId?: number; + /** 备注 */ + remark?: string; +}; + +export type ReceiveAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type RemarkStatusUsingPostResponses = { + 200: ApiResult; +}; + +export type ReportAbnormalEventDTO = { + /** 异常记录id */ + abnormalRecordId: number; + /** 事件id */ + eventId?: number; + /** 工序派工id */ + processDispatchId?: number; +}; + +export type ReportAbnormalEventUsingPostResponses = { + 200: ApiResult; +}; + +export type UpdateDeviceMachineUsingPostResponses = { + 200: ApiResult; +}; +/* eslint-disable */ +// @ts-ignore +import request from 'axios'; + +import * as API from './types'; + +/** addAndonRecordNodeDesc POST /api/web/workcenter-operate/add-andon-record-node-desc */ +export function addAndonRecordNodeDescUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/add-andon-record-node-desc', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** addDeviceMachine POST /api/web/workcenter-operate/add-device-machine */ +export function addDeviceMachineUsingPost({ + body, + options, +}: { + body: API.AddDeviceMachine; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/add-device-machine', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 安灯请求 POST /api/web/workcenter-operate/andon-req */ +export function andonReqUsingPost({ + body, + options, +}: { + body: API.AndonReq; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/andon-req', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** cancelRemarkStatus POST /api/web/workcenter-operate/cancel-remark-status */ +export function cancelRemarkStatusUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/cancel-remark-status', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 改变安灯事件类型 POST /api/web/workcenter-operate/change-andon-event-type */ +export function changeAndonEventTypeUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/change-andon-event-type', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 改变安灯处理人 POST /api/web/workcenter-operate/change-dispose-andon */ +export function changeDisposeAndonUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/change-dispose-andon', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 关闭安灯 POST /api/web/workcenter-operate/close-andon */ +export function closeAndonUsingPost({ + body, + options, +}: { + body: API.AndonClose; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/close-andon', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** getAndonReqCfg POST /api/web/workcenter-operate/get-aAndon-req-cfg */ +export function getAAndonReqCfgUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-aAndon-req-cfg', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 获取异常事件配置 POST /api/web/workcenter-operate/get-abnormal-event-cfg-list */ +export function getAbnormalEventCfgListUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-abnormal-event-cfg-list', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAbnormalRecord POST /api/web/workcenter-operate/get-abnormal-record */ +export function getAbnormalRecordUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-abnormal-record', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAllUser POST /api/web/workcenter-operate/get-all-user */ +export function getAllUserUsingPost({ + options, +}: { + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-all-user', { + method: 'POST', + ...(options || {}), + }); +} + +/** getAllWorkshopAndLineList POST /api/web/workcenter-operate/get-all-workshop-line */ +export function getAllWorkshopLineUsingPost({ + options, +}: { + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-all-workshop-line', + { + method: 'POST', + ...(options || {}), + } + ); +} + +/** 获取安灯记录详情 POST /api/web/workcenter-operate/get-andon-record-info */ +export function getAndonRecordInfoUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-andon-record-info', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAndonRecordList POST /api/web/workcenter-operate/get-andon-record-list */ +export function getAndonRecordListUsingPost({ + body, + options, +}: { + body: API.AndonRecordQuery; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-andon-record-list', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getCurrentShift POST /api/web/workcenter-operate/get-current-shift */ +export function getCurrentShiftUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-current-shift', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getDeviceList POST /api/web/workcenter-operate/get-device-list */ +export function getDeviceListUsingPost({ + params, + body, + options, +}: { + // 叠加生成的Param类型 (非body参数openapi默认没有生成对象) + params: API.GetDeviceListUsingPostParams; + body: API.GetDeviceListUsingPostBody; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-device-list', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + params: { + ...params, + }, + data: body, + ...(options || {}), + }); +} + +/** getEsopList POST /api/web/workcenter-operate/get-esop-list */ +export function getEsopListUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-esop-list', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** 获取车间产线结构 POST /api/web/workcenter-operate/get-user-workshop-workcenter */ +export function getUserWorkshopWorkcenterUsingPost({ + params, + options, +}: { + // 叠加生成的Param类型 (非body参数openapi默认没有生成对象) + params: API.GetUserWorkshopWorkcenterUsingPostParams; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-user-workshop-workcenter', + { + method: 'POST', + params: { + ...params, + }, + ...(options || {}), + } + ); +} + +/** getWorkCenter POST /api/web/workcenter-operate/get-work-center */ +export function getWorkCenterUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-work-center', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** receiveAndon POST /api/web/workcenter-operate/receive-andon */ +export function receiveAndonUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/receive-andon', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** remarkStatus POST /api/web/workcenter-operate/remark-status */ +export function remarkStatusUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/remark-status', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** 报告异常事件 POST /api/web/workcenter-operate/report-abnormal-event */ +export function reportAbnormalEventUsingPost({ + body, + options, +}: { + body: API.ReportAbnormalEventDTO; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/report-abnormal-event', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** updateDeviceMachine POST /api/web/workcenter-operate/update-device-machine */ +export function updateDeviceMachineUsingPost({ + body, + options, +}: { + body: API.AddDeviceMachine; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/update-device-machine', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} diff --git "a/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 hook \344\270\212\344\270\213\346\226\207\345\217\202\346\225\260 - \351\252\214\350\257\201 context \345\257\271\350\261\241.snap" "b/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 hook \344\270\212\344\270\213\346\226\207\345\217\202\346\225\260 - \351\252\214\350\257\201 context \345\257\271\350\261\241.snap" new file mode 100644 index 0000000..92429e3 --- /dev/null +++ "b/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 hook \344\270\212\344\270\213\346\226\207\345\217\202\346\225\260 - \351\252\214\350\257\201 context \345\257\271\350\261\241.snap" @@ -0,0 +1,946 @@ +/* eslint-disable */ +// @ts-ignore +export * from './types'; + +export * from './web'; +/* eslint-disable */ +// @ts-ignore + +export type AddAndonRecordNodeDescUsingPostResponses = { + 200: ApiResult; +}; + +export type AddDeviceMachine = { + lineId: number; + lineName?: string; + machineCode: string; + machineName: string; + manageUserId?: number; + manageUserName?: string; + lightSn: string; + signalId?: number; + serialNo?: string; + location?: string; + imgList?: string[]; + /** 更新才有 */ + deviceMachineId?: number; +}; + +export type AddDeviceMachineUsingPostResponses = { + 200: ApiResult; +}; + +export type AndonClose = { + andonRecordId: number; + disposeDesc?: string; + disposeImgUrls?: string[]; +}; + +export type AndonRecordNode = { + id?: number; + andonRecordId?: number; + /** 节点描述 */ + nodeDesc?: string; + /** 节点备注 */ + nodeRemark?: string; + /** 1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销 */ + nodeType?: string; + nodeTypeName?: string; + nodeUserId?: number; + nodeUserName?: string; + createdUserId?: number; + createdTime?: string; + modifyiedUserId?: number; + modifyiedTime?: string; +}; + +export type AndonRecordQuery = { + queryDeptId?: number; + /** 与我有关, 处理人或者报告人是我或者接收人是我 */ + myRelatedFlag?: string; + /** 处理状态 1 查询未处理的 2 查询已处理的 */ + queryDisposeStatus?: string; + /** 1 60天内 2 今天 3 本月 5 日期范围查询 默认1 */ + queryTimeType?: string; + factoryId?: number; + startTime?: string; + endTime?: string; + size?: number; + current?: number; +}; + +export type AndonRecordVO = { + /** ID */ + id?: number; + /** 工厂id */ + factoryId?: number; + factoryName?: string; + deptId?: number; + deptName?: string; + /** 车间id */ + workshopId?: number; + workshopName?: string; + /** 产线d */ + lineId?: number; + lineName?: string; + /** 设备ID */ + machineId?: number; + /** 灯ID */ + signalId?: number; + /** 日历排班ID */ + calendarDetailId?: number; + calendarId?: number; + calendarDate?: string; + shiftDetailName?: string; + machineName?: string; + machineCode?: string; + /** 事件配置ID */ + configId?: number; + configName?: string; + eventName?: string; + /** 报告人ID */ + reportUserId?: number; + reportUserName?: string; + /** 开始时间 */ + reportTime?: string; + /** 报告备注 */ + reportComments?: string; + /** 报告日期 */ + reportDate?: string; + /** 优先级 */ + priority?: string; + /** 通知人ID列表 */ + notifyUseridStrs?: string; + /** 接收人 */ + receiveUserId?: number; + receiveUserName?: string; + /** 接收时间 */ + receiveTime?: string; + /** 接收用时 */ + receiveDurationTime?: number; + disposeDurationTime?: number; + /** 处理人ID */ + disposeUserId?: number; + disposeUserName?: string; + /** 处理方式 */ + disposeDesc?: string; + /** 处理时间 */ + disposeTime?: string; + /** 持续时间,单位秒 */ + totalDurationTime?: number; + /** 来源,1 移动端,2 安灯盒按钮, 3 异常事件 */ + sourceType?: string; + /** 状态,1 已上报,2 已接收,3 已处理, 9 已撤销 */ + state?: string; + /** 原因分析 */ + eventAnalysis?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + /** oee明细ID */ + oeeDetailId?: number; + workCenterName?: string; + workCenterCode?: string; + disposeUserNames?: string; + disposeUserIds?: string; + totalDurationTimeSt?: string; + receiveDurationTimeSt?: string; + disposeDurationTimeSt?: string; + /** 表状态,1 已上报,2 已接收,3 已处理, 9 已撤销转换状态 已申请 已响应 已关闭 已撤销 */ + statusText?: string; + disposeUserList?: PlatformUser[]; + recordNodeList?: AndonRecordNode[]; + showColor?: string; + workCenterId?: number; + shiftShowColor?: string; + shiftStartTime?: string; + shiftEndTime?: string; + reportImgList?: string[]; + disposeImgList?: string[]; + reportImgUrls?: string; + disposeImgUrls?: string; + shiftName?: string; + completedUserId?: number; + completedUserName?: string; +}; + +export type AndonReq = { + configId: number; + configName: string; + imgList?: string[]; + reportComments?: string; + /** 处理用户 */ + selectHandlerUserIds: number[]; + workCenterId: number; + reqUserId?: number; + /** 来源 */ + sourceType?: string; + /** 工序派工id */ + processDispatchId?: number; +}; + +export type AndonReqUsingPostResponses = { + 200: ApiResult; +}; + +export type ApiResult = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: Record; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultAndonRecordVO = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /**

安灯_记录

*/ + data?: AndonRecordVO; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultMyPageAndonRecordVO = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: MyPageAndonRecordVO; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultString = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: string; + /** 是否成功 */ + success?: boolean; +}; + +export type CancelRemarkStatusUsingPostResponses = { + 200: ApiResult; +}; + +export type ChangeAndonEventTypeUsingPostResponses = { + 200: ApiResult; +}; + +export type ChangeDisposeAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type CloseAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAAndonReqCfgUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAbnormalEventCfgListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAbnormalRecordUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAllUserUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAllWorkshopLineUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAndonRecordInfoUsingPostResponses = { + 200: ApiResultAndonRecordVO; +}; + +export type GetAndonRecordListUsingPostResponses = { + 200: ApiResultMyPageAndonRecordVO; +}; + +export type GetCurrentShiftUsingPostResponses = { + 200: ApiResultString; +}; + +export type GetDeviceListUsingPostBody = string; + +export type GetDeviceListUsingPostParams = { + /** ID */ + id?: number; + /** 工厂ID */ + factoryId?: number; + deptId?: number; + /** 车间ID */ + workshopId?: number; + /** 产线ID */ + lineId?: number; + /** 分类ID */ + categoryId?: number; + /** 灯ID */ + signalId?: number; + lightSn?: string; + /** 设备编号 */ + machineCode?: string; + /** 设备名称 */ + machineName?: string; + /** 拼音码 */ + pinyin?: string; + /** 五笔码 */ + wubi?: string; + /** 医院图片 */ + imgUrlStrs?: string; + /** 管理员ID */ + manageUserId?: number; + /** 品牌 */ + trademark?: string; + /** 型号 */ + model?: string; + /** 序列号 */ + serialNo?: string; + /** 供应商 */ + supplier?: string; + /** 启用日期 */ + activationDate?: string; + /** 验收日期 */ + checkDate?: string; + /** 出厂日期 */ + productionDate?: string; + /** 脉冲间隔 */ + pulseInterval?: number; + /** 标准利用率 */ + standardUseRate?: string; + /** 放置地点 */ + location?: string; + /** 状态,1启用,2 停用 */ + state?: string; + /** 备注 */ + remark?: string; + /** 删除标记 */ + deleteFlag?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + searchKey?: string; + /** 0 关机,1 运行,2 等待,3 异常 */ + oeeState?: string; + oeeTime?: string; + stateRecordId?: number; + stateStartTime?: string; +}; + +export type GetDeviceListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetEsopListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetUserWorkshopWorkcenterUsingPostParams = { + selectDeptId?: number; +}; + +export type GetUserWorkshopWorkcenterUsingPostResponses = { + 200: ApiResult; +}; + +export type GetWorkCenterUsingPostResponses = { + 200: ApiResult; +}; + +export type JSONObject = { + key?: Record; +}; + +export type MyPageAndonRecordVO = { + records?: AndonRecordVO[]; + total?: number; + size?: number; + current?: number; + orders?: OrderItem[]; + optimizeCountSql?: boolean; + searchCount?: boolean; + optimizeJoinOfCountSql?: boolean; + maxLimit?: number; + countId?: string; + startTime?: string; + startTimeStr?: string; + endTime?: string; + endTimeStr?: string; + hasNextPage?: boolean; +}; + +export type OrderItem = { + column?: string; + asc?: boolean; +}; + +export type PlatformUser = { + /** 用户ID */ + id?: number; + /** 团队id */ + teamId?: number; + /** 工厂id */ + factoryId?: number; + deptId?: number; + /** 所属车间id */ + workshopId?: number; + /** 所属产线d */ + lineId?: number; + /** 用户姓名 */ + userName?: string; + /** 邮箱 */ + email?: string; + /** 职称 */ + jobTitle?: string; + /** 用户工号 */ + jobNo?: string; + /** 用户账号 */ + accountNo?: string; + /** 用户密码 */ + password?: string; + /** 身份证号 */ + idNumber?: string; + /** 出生日期 */ + dateOfBirth?: string; + /** 联系电话 */ + telephone?: string; + /** 头像url */ + headImageUrl?: string; + /** 用户类型,1 平台,2 团队,3 工厂 */ + userType?: string; + /** 管理员标识,1 管理员,0 非管理员 */ + adminFlag?: string; + /** 状态(1:在用 2:停用) */ + state?: string; + /** 是否删除(0:否 1:是) */ + deleteFlag?: string; + /** 修改密码时间 */ + passwordModifyiedTime?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + /** 1男 2女 9 未知 */ + genderCode?: string; + publicOpenId?: string; + currentFactoryId?: number; + /** 备注 */ + remark?: string; +}; + +export type ReceiveAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type RemarkStatusUsingPostResponses = { + 200: ApiResult; +}; + +export type ReportAbnormalEventDTO = { + /** 异常记录id */ + abnormalRecordId: number; + /** 事件id */ + eventId?: number; + /** 工序派工id */ + processDispatchId?: number; +}; + +export type ReportAbnormalEventUsingPostResponses = { + 200: ApiResult; +}; + +export type UpdateDeviceMachineUsingPostResponses = { + 200: ApiResult; +}; +/* eslint-disable */ +// @ts-ignore +import request from 'axios'; + +import * as API from './types'; + +/** addAndonRecordNodeDesc POST /api/web/workcenter-operate/add-andon-record-node-desc */ +export function addAndonRecordNodeDescUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/add-andon-record-node-desc', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** addDeviceMachine POST /api/web/workcenter-operate/add-device-machine */ +export function addDeviceMachineUsingPost({ + body, + options, +}: { + body: API.AddDeviceMachine; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/add-device-machine', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 安灯请求 POST /api/web/workcenter-operate/andon-req */ +export function andonReqUsingPost({ + body, + options, +}: { + body: API.AndonReq; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/andon-req', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** cancelRemarkStatus POST /api/web/workcenter-operate/cancel-remark-status */ +export function cancelRemarkStatusUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/cancel-remark-status', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 改变安灯事件类型 POST /api/web/workcenter-operate/change-andon-event-type */ +export function changeAndonEventTypeUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/change-andon-event-type', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 改变安灯处理人 POST /api/web/workcenter-operate/change-dispose-andon */ +export function changeDisposeAndonUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/change-dispose-andon', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 关闭安灯 POST /api/web/workcenter-operate/close-andon */ +export function closeAndonUsingPost({ + body, + options, +}: { + body: API.AndonClose; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/close-andon', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** getAndonReqCfg POST /api/web/workcenter-operate/get-aAndon-req-cfg */ +export function getAAndonReqCfgUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-aAndon-req-cfg', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 获取异常事件配置 POST /api/web/workcenter-operate/get-abnormal-event-cfg-list */ +export function getAbnormalEventCfgListUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-abnormal-event-cfg-list', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAbnormalRecord POST /api/web/workcenter-operate/get-abnormal-record */ +export function getAbnormalRecordUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-abnormal-record', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAllUser POST /api/web/workcenter-operate/get-all-user */ +export function getAllUserUsingPost({ + options, +}: { + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-all-user', { + method: 'POST', + ...(options || {}), + }); +} + +/** getAllWorkshopAndLineList POST /api/web/workcenter-operate/get-all-workshop-line */ +export function getAllWorkshopLineUsingPost({ + options, +}: { + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-all-workshop-line', + { + method: 'POST', + ...(options || {}), + } + ); +} + +/** 获取安灯记录详情 POST /api/web/workcenter-operate/get-andon-record-info */ +export function getAndonRecordInfoUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-andon-record-info', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAndonRecordList POST /api/web/workcenter-operate/get-andon-record-list */ +export function getAndonRecordListUsingPost({ + body, + options, +}: { + body: API.AndonRecordQuery; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-andon-record-list', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getCurrentShift POST /api/web/workcenter-operate/get-current-shift */ +export function getCurrentShiftUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-current-shift', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getDeviceList POST /api/web/workcenter-operate/get-device-list */ +export function getDeviceListUsingPost({ + params, + body, + options, +}: { + // 叠加生成的Param类型 (非body参数openapi默认没有生成对象) + params: API.GetDeviceListUsingPostParams; + body: API.GetDeviceListUsingPostBody; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-device-list', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + params: { + ...params, + }, + data: body, + ...(options || {}), + }); +} + +/** getEsopList POST /api/web/workcenter-operate/get-esop-list */ +export function getEsopListUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-esop-list', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** 获取车间产线结构 POST /api/web/workcenter-operate/get-user-workshop-workcenter */ +export function getUserWorkshopWorkcenterUsingPost({ + params, + options, +}: { + // 叠加生成的Param类型 (非body参数openapi默认没有生成对象) + params: API.GetUserWorkshopWorkcenterUsingPostParams; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-user-workshop-workcenter', + { + method: 'POST', + params: { + ...params, + }, + ...(options || {}), + } + ); +} + +/** getWorkCenter POST /api/web/workcenter-operate/get-work-center */ +export function getWorkCenterUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-work-center', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** receiveAndon POST /api/web/workcenter-operate/receive-andon */ +export function receiveAndonUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/receive-andon', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** remarkStatus POST /api/web/workcenter-operate/remark-status */ +export function remarkStatusUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/remark-status', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** 报告异常事件 POST /api/web/workcenter-operate/report-abnormal-event */ +export function reportAbnormalEventUsingPost({ + body, + options, +}: { + body: API.ReportAbnormalEventDTO; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/report-abnormal-event', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** updateDeviceMachine POST /api/web/workcenter-operate/update-device-machine */ +export function updateDeviceMachineUsingPost({ + body, + options, +}: { + body: API.AddDeviceMachine; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/update-device-machine', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} diff --git "a/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 hook \345\274\202\345\270\270\345\244\204\347\220\206 - hook \345\207\275\346\225\260\346\212\233\345\207\272\351\224\231\350\257\257.snap" "b/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 hook \345\274\202\345\270\270\345\244\204\347\220\206 - hook \345\207\275\346\225\260\346\212\233\345\207\272\351\224\231\350\257\257.snap" new file mode 100644 index 0000000..3828a00 --- /dev/null +++ "b/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225 hook \345\274\202\345\270\270\345\244\204\347\220\206 - hook \345\207\275\346\225\260\346\212\233\345\207\272\351\224\231\350\257\257.snap" @@ -0,0 +1,946 @@ +/* eslint-disable */ +// @ts-ignore +export * from './types'; + +export * from './web'; +/* eslint-disable */ +// @ts-ignore + +export type ErrorAddAndonRecordNodeDescUsingPostResponses = { + 200: ApiResult; +}; + +export type ErrorAddDeviceMachine = { + lineId: number; + lineName?: string; + machineCode: string; + machineName: string; + manageUserId?: number; + manageUserName?: string; + lightSn: string; + signalId?: number; + serialNo?: string; + location?: string; + imgList?: string[]; + /** 更新才有 */ + deviceMachineId?: number; +}; + +export type ErrorAddDeviceMachineUsingPostResponses = { + 200: ApiResult; +}; + +export type ErrorAndonClose = { + andonRecordId: number; + disposeDesc?: string; + disposeImgUrls?: string[]; +}; + +export type ErrorAndonRecordNode = { + id?: number; + andonRecordId?: number; + /** 节点描述 */ + nodeDesc?: string; + /** 节点备注 */ + nodeRemark?: string; + /** 1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销 */ + nodeType?: string; + nodeTypeName?: string; + nodeUserId?: number; + nodeUserName?: string; + createdUserId?: number; + createdTime?: string; + modifyiedUserId?: number; + modifyiedTime?: string; +}; + +export type ErrorAndonRecordQuery = { + queryDeptId?: number; + /** 与我有关, 处理人或者报告人是我或者接收人是我 */ + myRelatedFlag?: string; + /** 处理状态 1 查询未处理的 2 查询已处理的 */ + queryDisposeStatus?: string; + /** 1 60天内 2 今天 3 本月 5 日期范围查询 默认1 */ + queryTimeType?: string; + factoryId?: number; + startTime?: string; + endTime?: string; + size?: number; + current?: number; +}; + +export type ErrorAndonRecordVO = { + /** ID */ + id?: number; + /** 工厂id */ + factoryId?: number; + factoryName?: string; + deptId?: number; + deptName?: string; + /** 车间id */ + workshopId?: number; + workshopName?: string; + /** 产线d */ + lineId?: number; + lineName?: string; + /** 设备ID */ + machineId?: number; + /** 灯ID */ + signalId?: number; + /** 日历排班ID */ + calendarDetailId?: number; + calendarId?: number; + calendarDate?: string; + shiftDetailName?: string; + machineName?: string; + machineCode?: string; + /** 事件配置ID */ + configId?: number; + configName?: string; + eventName?: string; + /** 报告人ID */ + reportUserId?: number; + reportUserName?: string; + /** 开始时间 */ + reportTime?: string; + /** 报告备注 */ + reportComments?: string; + /** 报告日期 */ + reportDate?: string; + /** 优先级 */ + priority?: string; + /** 通知人ID列表 */ + notifyUseridStrs?: string; + /** 接收人 */ + receiveUserId?: number; + receiveUserName?: string; + /** 接收时间 */ + receiveTime?: string; + /** 接收用时 */ + receiveDurationTime?: number; + disposeDurationTime?: number; + /** 处理人ID */ + disposeUserId?: number; + disposeUserName?: string; + /** 处理方式 */ + disposeDesc?: string; + /** 处理时间 */ + disposeTime?: string; + /** 持续时间,单位秒 */ + totalDurationTime?: number; + /** 来源,1 移动端,2 安灯盒按钮, 3 异常事件 */ + sourceType?: string; + /** 状态,1 已上报,2 已接收,3 已处理, 9 已撤销 */ + state?: string; + /** 原因分析 */ + eventAnalysis?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + /** oee明细ID */ + oeeDetailId?: number; + workCenterName?: string; + workCenterCode?: string; + disposeUserNames?: string; + disposeUserIds?: string; + totalDurationTimeSt?: string; + receiveDurationTimeSt?: string; + disposeDurationTimeSt?: string; + /** 表状态,1 已上报,2 已接收,3 已处理, 9 已撤销转换状态 已申请 已响应 已关闭 已撤销 */ + statusText?: string; + disposeUserList?: PlatformUser[]; + recordNodeList?: AndonRecordNode[]; + showColor?: string; + workCenterId?: number; + shiftShowColor?: string; + shiftStartTime?: string; + shiftEndTime?: string; + reportImgList?: string[]; + disposeImgList?: string[]; + reportImgUrls?: string; + disposeImgUrls?: string; + shiftName?: string; + completedUserId?: number; + completedUserName?: string; +}; + +export type ErrorAndonReq = { + configId: number; + configName: string; + imgList?: string[]; + reportComments?: string; + /** 处理用户 */ + selectHandlerUserIds: number[]; + workCenterId: number; + reqUserId?: number; + /** 来源 */ + sourceType?: string; + /** 工序派工id */ + processDispatchId?: number; +}; + +export type ErrorAndonReqUsingPostResponses = { + 200: ApiResult; +}; + +export type ErrorApiResult = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: Record; + /** 是否成功 */ + success?: boolean; +}; + +export type ErrorApiResultAndonRecordVO = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /**

安灯_记录

*/ + data?: AndonRecordVO; + /** 是否成功 */ + success?: boolean; +}; + +export type ErrorApiResultMyPageAndonRecordVO = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: MyPageAndonRecordVO; + /** 是否成功 */ + success?: boolean; +}; + +export type ErrorApiResultString = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: string; + /** 是否成功 */ + success?: boolean; +}; + +export type ErrorCancelRemarkStatusUsingPostResponses = { + 200: ApiResult; +}; + +export type ErrorChangeAndonEventTypeUsingPostResponses = { + 200: ApiResult; +}; + +export type ErrorChangeDisposeAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type ErrorCloseAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type ErrorGetAAndonReqCfgUsingPostResponses = { + 200: ApiResult; +}; + +export type ErrorGetAbnormalEventCfgListUsingPostResponses = { + 200: ApiResult; +}; + +export type ErrorGetAbnormalRecordUsingPostResponses = { + 200: ApiResult; +}; + +export type ErrorGetAllUserUsingPostResponses = { + 200: ApiResult; +}; + +export type ErrorGetAllWorkshopLineUsingPostResponses = { + 200: ApiResult; +}; + +export type ErrorGetAndonRecordInfoUsingPostResponses = { + 200: ApiResultAndonRecordVO; +}; + +export type ErrorGetAndonRecordListUsingPostResponses = { + 200: ApiResultMyPageAndonRecordVO; +}; + +export type ErrorGetCurrentShiftUsingPostResponses = { + 200: ApiResultString; +}; + +export type ErrorGetDeviceListUsingPostBody = string; + +export type ErrorGetDeviceListUsingPostParams = { + /** ID */ + id?: number; + /** 工厂ID */ + factoryId?: number; + deptId?: number; + /** 车间ID */ + workshopId?: number; + /** 产线ID */ + lineId?: number; + /** 分类ID */ + categoryId?: number; + /** 灯ID */ + signalId?: number; + lightSn?: string; + /** 设备编号 */ + machineCode?: string; + /** 设备名称 */ + machineName?: string; + /** 拼音码 */ + pinyin?: string; + /** 五笔码 */ + wubi?: string; + /** 医院图片 */ + imgUrlStrs?: string; + /** 管理员ID */ + manageUserId?: number; + /** 品牌 */ + trademark?: string; + /** 型号 */ + model?: string; + /** 序列号 */ + serialNo?: string; + /** 供应商 */ + supplier?: string; + /** 启用日期 */ + activationDate?: string; + /** 验收日期 */ + checkDate?: string; + /** 出厂日期 */ + productionDate?: string; + /** 脉冲间隔 */ + pulseInterval?: number; + /** 标准利用率 */ + standardUseRate?: string; + /** 放置地点 */ + location?: string; + /** 状态,1启用,2 停用 */ + state?: string; + /** 备注 */ + remark?: string; + /** 删除标记 */ + deleteFlag?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + searchKey?: string; + /** 0 关机,1 运行,2 等待,3 异常 */ + oeeState?: string; + oeeTime?: string; + stateRecordId?: number; + stateStartTime?: string; +}; + +export type ErrorGetDeviceListUsingPostResponses = { + 200: ApiResult; +}; + +export type ErrorGetEsopListUsingPostResponses = { + 200: ApiResult; +}; + +export type ErrorGetUserWorkshopWorkcenterUsingPostParams = { + selectDeptId?: number; +}; + +export type ErrorGetUserWorkshopWorkcenterUsingPostResponses = { + 200: ApiResult; +}; + +export type ErrorGetWorkCenterUsingPostResponses = { + 200: ApiResult; +}; + +export type ErrorJSONObject = { + key?: Record; +}; + +export type ErrorMyPageAndonRecordVO = { + records?: AndonRecordVO[]; + total?: number; + size?: number; + current?: number; + orders?: OrderItem[]; + optimizeCountSql?: boolean; + searchCount?: boolean; + optimizeJoinOfCountSql?: boolean; + maxLimit?: number; + countId?: string; + startTime?: string; + startTimeStr?: string; + endTime?: string; + endTimeStr?: string; + hasNextPage?: boolean; +}; + +export type ErrorOrderItem = { + column?: string; + asc?: boolean; +}; + +export type ErrorPlatformUser = { + /** 用户ID */ + id?: number; + /** 团队id */ + teamId?: number; + /** 工厂id */ + factoryId?: number; + deptId?: number; + /** 所属车间id */ + workshopId?: number; + /** 所属产线d */ + lineId?: number; + /** 用户姓名 */ + userName?: string; + /** 邮箱 */ + email?: string; + /** 职称 */ + jobTitle?: string; + /** 用户工号 */ + jobNo?: string; + /** 用户账号 */ + accountNo?: string; + /** 用户密码 */ + password?: string; + /** 身份证号 */ + idNumber?: string; + /** 出生日期 */ + dateOfBirth?: string; + /** 联系电话 */ + telephone?: string; + /** 头像url */ + headImageUrl?: string; + /** 用户类型,1 平台,2 团队,3 工厂 */ + userType?: string; + /** 管理员标识,1 管理员,0 非管理员 */ + adminFlag?: string; + /** 状态(1:在用 2:停用) */ + state?: string; + /** 是否删除(0:否 1:是) */ + deleteFlag?: string; + /** 修改密码时间 */ + passwordModifyiedTime?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + /** 1男 2女 9 未知 */ + genderCode?: string; + publicOpenId?: string; + currentFactoryId?: number; + /** 备注 */ + remark?: string; +}; + +export type ErrorReceiveAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type ErrorRemarkStatusUsingPostResponses = { + 200: ApiResult; +}; + +export type ErrorReportAbnormalEventDTO = { + /** 异常记录id */ + abnormalRecordId: number; + /** 事件id */ + eventId?: number; + /** 工序派工id */ + processDispatchId?: number; +}; + +export type ErrorReportAbnormalEventUsingPostResponses = { + 200: ApiResult; +}; + +export type ErrorUpdateDeviceMachineUsingPostResponses = { + 200: ApiResult; +}; +/* eslint-disable */ +// @ts-ignore +import request from 'axios'; + +import * as API from './types'; + +/** addAndonRecordNodeDesc POST /api/web/workcenter-operate/add-andon-record-node-desc */ +export function addAndonRecordNodeDescUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/add-andon-record-node-desc', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** addDeviceMachine POST /api/web/workcenter-operate/add-device-machine */ +export function addDeviceMachineUsingPost({ + body, + options, +}: { + body: API.AddDeviceMachine; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/add-device-machine', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 安灯请求 POST /api/web/workcenter-operate/andon-req */ +export function andonReqUsingPost({ + body, + options, +}: { + body: API.AndonReq; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/andon-req', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** cancelRemarkStatus POST /api/web/workcenter-operate/cancel-remark-status */ +export function cancelRemarkStatusUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/cancel-remark-status', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 改变安灯事件类型 POST /api/web/workcenter-operate/change-andon-event-type */ +export function changeAndonEventTypeUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/change-andon-event-type', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 改变安灯处理人 POST /api/web/workcenter-operate/change-dispose-andon */ +export function changeDisposeAndonUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/change-dispose-andon', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 关闭安灯 POST /api/web/workcenter-operate/close-andon */ +export function closeAndonUsingPost({ + body, + options, +}: { + body: API.AndonClose; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/close-andon', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** getAndonReqCfg POST /api/web/workcenter-operate/get-aAndon-req-cfg */ +export function getAAndonReqCfgUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-aAndon-req-cfg', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 获取异常事件配置 POST /api/web/workcenter-operate/get-abnormal-event-cfg-list */ +export function getAbnormalEventCfgListUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-abnormal-event-cfg-list', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAbnormalRecord POST /api/web/workcenter-operate/get-abnormal-record */ +export function getAbnormalRecordUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-abnormal-record', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAllUser POST /api/web/workcenter-operate/get-all-user */ +export function getAllUserUsingPost({ + options, +}: { + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-all-user', { + method: 'POST', + ...(options || {}), + }); +} + +/** getAllWorkshopAndLineList POST /api/web/workcenter-operate/get-all-workshop-line */ +export function getAllWorkshopLineUsingPost({ + options, +}: { + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-all-workshop-line', + { + method: 'POST', + ...(options || {}), + } + ); +} + +/** 获取安灯记录详情 POST /api/web/workcenter-operate/get-andon-record-info */ +export function getAndonRecordInfoUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-andon-record-info', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAndonRecordList POST /api/web/workcenter-operate/get-andon-record-list */ +export function getAndonRecordListUsingPost({ + body, + options, +}: { + body: API.AndonRecordQuery; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-andon-record-list', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getCurrentShift POST /api/web/workcenter-operate/get-current-shift */ +export function getCurrentShiftUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-current-shift', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getDeviceList POST /api/web/workcenter-operate/get-device-list */ +export function getDeviceListUsingPost({ + params, + body, + options, +}: { + // 叠加生成的Param类型 (非body参数openapi默认没有生成对象) + params: API.GetDeviceListUsingPostParams; + body: API.GetDeviceListUsingPostBody; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-device-list', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + params: { + ...params, + }, + data: body, + ...(options || {}), + }); +} + +/** getEsopList POST /api/web/workcenter-operate/get-esop-list */ +export function getEsopListUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-esop-list', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** 获取车间产线结构 POST /api/web/workcenter-operate/get-user-workshop-workcenter */ +export function getUserWorkshopWorkcenterUsingPost({ + params, + options, +}: { + // 叠加生成的Param类型 (非body参数openapi默认没有生成对象) + params: API.GetUserWorkshopWorkcenterUsingPostParams; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-user-workshop-workcenter', + { + method: 'POST', + params: { + ...params, + }, + ...(options || {}), + } + ); +} + +/** getWorkCenter POST /api/web/workcenter-operate/get-work-center */ +export function getWorkCenterUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-work-center', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** receiveAndon POST /api/web/workcenter-operate/receive-andon */ +export function receiveAndonUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/receive-andon', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** remarkStatus POST /api/web/workcenter-operate/remark-status */ +export function remarkStatusUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/remark-status', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** 报告异常事件 POST /api/web/workcenter-operate/report-abnormal-event */ +export function reportAbnormalEventUsingPost({ + body, + options, +}: { + body: API.ReportAbnormalEventDTO; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/report-abnormal-event', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** updateDeviceMachine POST /api/web/workcenter-operate/update-device-machine */ +export function updateDeviceMachineUsingPost({ + body, + options, +}: { + body: API.AddDeviceMachine; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/update-device-machine', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} diff --git "a/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225\345\220\221\345\220\216\345\205\274\345\256\271\346\200\247 - \344\270\215\344\275\277\347\224\250\346\226\260 hook \346\227\266\347\232\204\351\273\230\350\256\244\350\241\214\344\270\272.snap" "b/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225\345\220\221\345\220\216\345\205\274\345\256\271\346\200\247 - \344\270\215\344\275\277\347\224\250\346\226\260 hook \346\227\266\347\232\204\351\273\230\350\256\244\350\241\214\344\270\272.snap" new file mode 100644 index 0000000..85abde6 --- /dev/null +++ "b/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225\345\220\221\345\220\216\345\205\274\345\256\271\346\200\247 - \344\270\215\344\275\277\347\224\250\346\226\260 hook \346\227\266\347\232\204\351\273\230\350\256\244\350\241\214\344\270\272.snap" @@ -0,0 +1,2648 @@ +/* eslint-disable */ +// @ts-ignore +import * as API from './types'; + +export function displayAddDeviceMachine(field: keyof API.AddDeviceMachine) { + return { + lineId: 'lineId', + lineName: 'lineName', + machineCode: 'machineCode', + machineName: 'machineName', + manageUserId: 'manageUserId', + manageUserName: 'manageUserName', + lightSn: 'lightSn', + signalId: 'signalId', + serialNo: 'serialNo', + location: 'location', + imgList: 'imgList', + deviceMachineId: '更新才有', + }[field]; +} + +export function displayAndonClose(field: keyof API.AndonClose) { + return { + andonRecordId: 'andonRecordId', + disposeDesc: 'disposeDesc', + disposeImgUrls: 'disposeImgUrls', + }[field]; +} + +export function displayAndonRecordNode(field: keyof API.AndonRecordNode) { + return { + id: 'id', + andonRecordId: 'andonRecordId', + nodeDesc: '节点描述', + nodeRemark: '节点备注', + nodeType: + '1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销', + nodeTypeName: 'nodeTypeName', + nodeUserId: 'nodeUserId', + nodeUserName: 'nodeUserName', + createdUserId: 'createdUserId', + createdTime: 'createdTime', + modifyiedUserId: 'modifyiedUserId', + modifyiedTime: 'modifyiedTime', + }[field]; +} + +export function displayAndonRecordQuery(field: keyof API.AndonRecordQuery) { + return { + queryDeptId: 'queryDeptId', + myRelatedFlag: '与我有关, 处理人或者报告人是我或者接收人是我', + queryDisposeStatus: '处理状态 1 查询未处理的 2 查询已处理的', + queryTimeType: '1 60天内 2 今天 3 本月 5 日期范围查询 默认1', + factoryId: 'factoryId', + startTime: 'startTime', + endTime: 'endTime', + size: 'size', + current: 'current', + }[field]; +} + +export function displayAndonRecordVO(field: keyof API.AndonRecordVO) { + return { + id: 'ID', + factoryId: '工厂id', + factoryName: 'factoryName', + deptId: 'deptId', + deptName: 'deptName', + workshopId: '车间id', + workshopName: 'workshopName', + lineId: '产线d', + lineName: 'lineName', + machineId: '设备ID', + signalId: '灯ID', + calendarDetailId: '日历排班ID', + calendarId: 'calendarId', + calendarDate: 'calendarDate', + shiftDetailName: 'shiftDetailName', + machineName: 'machineName', + machineCode: 'machineCode', + configId: '事件配置ID', + configName: 'configName', + eventName: 'eventName', + reportUserId: '报告人ID', + reportUserName: 'reportUserName', + reportTime: '开始时间', + reportComments: '报告备注', + reportDate: '报告日期', + priority: '优先级', + notifyUseridStrs: '通知人ID列表', + receiveUserId: '接收人', + receiveUserName: 'receiveUserName', + receiveTime: '接收时间', + receiveDurationTime: '接收用时', + disposeDurationTime: 'disposeDurationTime', + disposeUserId: '处理人ID', + disposeUserName: 'disposeUserName', + disposeDesc: '处理方式', + disposeTime: '处理时间', + totalDurationTime: '持续时间,单位秒', + sourceType: '来源,1 移动端,2 安灯盒按钮, 3 异常事件', + state: '状态,1 已上报,2 已接收,3 已处理, 9 已撤销', + eventAnalysis: '原因分析', + createdUserId: '创建人', + createdTime: '创建时间', + modifyiedUserId: '最后更新人', + modifyiedTime: '最后更新时间', + datetimeStamp: '时间戳', + oeeDetailId: 'oee明细ID', + workCenterName: 'workCenterName', + workCenterCode: 'workCenterCode', + disposeUserNames: 'disposeUserNames', + disposeUserIds: 'disposeUserIds', + totalDurationTimeSt: 'totalDurationTimeSt', + receiveDurationTimeSt: 'receiveDurationTimeSt', + disposeDurationTimeSt: 'disposeDurationTimeSt', + statusText: + '表状态,1 已上报,2 已接收,3 已处理, 9 已撤销转换状态 已申请 已响应 已关闭 已撤销', + disposeUserList: 'disposeUserList', + recordNodeList: 'recordNodeList', + showColor: 'showColor', + workCenterId: 'workCenterId', + shiftShowColor: 'shiftShowColor', + shiftStartTime: 'shiftStartTime', + shiftEndTime: 'shiftEndTime', + reportImgList: 'reportImgList', + disposeImgList: 'disposeImgList', + reportImgUrls: 'reportImgUrls', + disposeImgUrls: 'disposeImgUrls', + shiftName: 'shiftName', + completedUserId: 'completedUserId', + completedUserName: 'completedUserName', + }[field]; +} + +export function displayAndonReq(field: keyof API.AndonReq) { + return { + configId: 'configId', + configName: 'configName', + imgList: 'imgList', + reportComments: 'reportComments', + selectHandlerUserIds: '处理用户', + workCenterId: 'workCenterId', + reqUserId: 'reqUserId', + sourceType: '来源', + processDispatchId: '工序派工id', + }[field]; +} + +export function displayApiResult(field: keyof API.ApiResult) { + return { + code: '状态码', + message: '提示', + data: '数据', + success: '是否成功', + }[field]; +} + +export function displayApiResultAndonRecordVO( + field: keyof API.ApiResultAndonRecordVO +) { + return { + code: '状态码', + message: '提示', + data: '

安灯_记录

', + success: '是否成功', + }[field]; +} + +export function displayApiResultMyPageAndonRecordVO( + field: keyof API.ApiResultMyPageAndonRecordVO +) { + return { + code: '状态码', + message: '提示', + data: '数据', + success: '是否成功', + }[field]; +} + +export function displayApiResultString(field: keyof API.ApiResultString) { + return { + code: '状态码', + message: '提示', + data: '数据', + success: '是否成功', + }[field]; +} + +export function displayGetDeviceListUsingPostParams( + field: keyof API.GetDeviceListUsingPostParams +) { + return { + id: 'ID', + factoryId: '工厂ID', + deptId: 'deptId', + workshopId: '车间ID', + lineId: '产线ID', + categoryId: '分类ID', + signalId: '灯ID', + lightSn: 'lightSn', + machineCode: '设备编号', + machineName: '设备名称', + pinyin: '拼音码', + wubi: '五笔码', + imgUrlStrs: '医院图片', + manageUserId: '管理员ID', + trademark: '品牌', + model: '型号', + serialNo: '序列号', + supplier: '供应商', + activationDate: '启用日期', + checkDate: '验收日期', + productionDate: '出厂日期', + pulseInterval: '脉冲间隔', + standardUseRate: '标准利用率', + location: '放置地点', + state: '状态,1启用,2 停用', + remark: '备注', + deleteFlag: '删除标记', + createdUserId: '创建人', + createdTime: '创建时间', + modifyiedUserId: '最后更新人', + modifyiedTime: '最后更新时间', + datetimeStamp: '时间戳', + searchKey: 'searchKey', + oeeState: '0 关机,1 运行,2 等待,3 异常', + oeeTime: 'oeeTime', + stateRecordId: 'stateRecordId', + stateStartTime: 'stateStartTime', + }[field]; +} + +export function displayGetUserWorkshopWorkcenterUsingPostParams( + field: keyof API.GetUserWorkshopWorkcenterUsingPostParams +) { + return { + selectDeptId: 'selectDeptId', + }[field]; +} + +export function displayJSONObject(field: keyof API.JSONObject) { + return { + key: 'key', + }[field]; +} + +export function displayMyPageAndonRecordVO( + field: keyof API.MyPageAndonRecordVO +) { + return { + records: 'records', + total: 'total', + size: 'size', + current: 'current', + orders: 'orders', + optimizeCountSql: 'optimizeCountSql', + searchCount: 'searchCount', + optimizeJoinOfCountSql: 'optimizeJoinOfCountSql', + maxLimit: 'maxLimit', + countId: 'countId', + startTime: 'startTime', + startTimeStr: 'startTimeStr', + endTime: 'endTime', + endTimeStr: 'endTimeStr', + hasNextPage: 'hasNextPage', + }[field]; +} + +export function displayOrderItem(field: keyof API.OrderItem) { + return { + column: 'column', + asc: 'asc', + }[field]; +} + +export function displayPlatformUser(field: keyof API.PlatformUser) { + return { + id: '用户ID', + teamId: '团队id', + factoryId: '工厂id', + deptId: 'deptId', + workshopId: '所属车间id', + lineId: '所属产线d', + userName: '用户姓名', + email: '邮箱', + jobTitle: '职称', + jobNo: '用户工号', + accountNo: '用户账号', + password: '用户密码', + idNumber: '身份证号', + dateOfBirth: '出生日期', + telephone: '联系电话', + headImageUrl: '头像url', + userType: '用户类型,1 平台,2 团队,3 工厂', + adminFlag: '管理员标识,1 管理员,0 非管理员', + state: '状态(1:在用 2:停用)', + deleteFlag: '是否删除(0:否 1:是)', + passwordModifyiedTime: '修改密码时间', + createdUserId: '创建人', + createdTime: '创建时间', + modifyiedUserId: '最后更新人', + modifyiedTime: '最后更新时间', + datetimeStamp: '时间戳', + genderCode: '1男 2女 9 未知', + publicOpenId: 'publicOpenId', + currentFactoryId: 'currentFactoryId', + remark: '备注', + }[field]; +} + +export function displayReportAbnormalEventDTO( + field: keyof API.ReportAbnormalEventDTO +) { + return { + abnormalRecordId: '异常记录id', + eventId: '事件id', + processDispatchId: '工序派工id', + }[field]; +} +/* eslint-disable */ +// @ts-ignore +export * from './types'; +export * from './displayTypeLabel'; + +export * from './schema'; + +export * from './web'; +export const $orderItem = { + type: 'object', + properties: { + column: { type: 'string', description: '' }, + asc: { type: 'boolean', description: '' }, + }, + isAllowed: true, +}; + +export const $andonRecordNode = { + type: 'object', + properties: { + id: { type: 'integer', description: '', format: 'int64' }, + andonRecordId: { type: 'integer', description: '', format: 'int64' }, + nodeDesc: { type: 'string', description: '节点描述' }, + nodeRemark: { type: 'string', description: '节点备注' }, + nodeType: { + type: 'string', + description: + '1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销', + }, + nodeTypeName: { type: 'string', description: '' }, + nodeUserId: { type: 'integer', description: '', format: 'int64' }, + nodeUserName: { type: 'string', description: '' }, + createdUserId: { type: 'integer', description: '', format: 'int64' }, + createdTime: { type: 'string', description: '' }, + modifyiedUserId: { type: 'integer', description: '', format: 'int64' }, + modifyiedTime: { type: 'string', description: '' }, + }, + isAllowed: true, +}; + +export const $platformUser = { + type: 'object', + properties: { + id: { type: 'integer', description: '用户ID', format: 'int64' }, + teamId: { type: 'integer', description: '团队id', format: 'int64' }, + factoryId: { type: 'integer', description: '工厂id', format: 'int64' }, + deptId: { type: 'integer', description: '', format: 'int64' }, + workshopId: { type: 'integer', description: '所属车间id', format: 'int64' }, + lineId: { type: 'integer', description: '所属产线d', format: 'int64' }, + userName: { type: 'string', description: '用户姓名' }, + email: { type: 'string', description: '邮箱' }, + jobTitle: { type: 'string', description: '职称' }, + jobNo: { type: 'string', description: '用户工号' }, + accountNo: { type: 'string', description: '用户账号' }, + password: { type: 'string', description: '用户密码' }, + idNumber: { type: 'string', description: '身份证号' }, + dateOfBirth: { type: 'string', description: '出生日期' }, + telephone: { type: 'string', description: '联系电话' }, + headImageUrl: { type: 'string', description: '头像url' }, + userType: { + type: 'string', + description: '用户类型,1 平台,2 团队,3 工厂', + }, + adminFlag: { + type: 'string', + description: '管理员标识,1 管理员,0 非管理员', + }, + state: { type: 'string', description: '状态(1:在用 2:停用)' }, + deleteFlag: { type: 'string', description: '是否删除(0:否 1:是)' }, + passwordModifyiedTime: { type: 'string', description: '修改密码时间' }, + createdUserId: { type: 'integer', description: '创建人', format: 'int64' }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '最后更新时间' }, + datetimeStamp: { type: 'string', description: '时间戳' }, + genderCode: { type: 'string', description: '1男 2女 9 未知' }, + publicOpenId: { type: 'string', description: '' }, + currentFactoryId: { type: 'integer', description: '', format: 'int64' }, + remark: { type: 'string', description: '备注' }, + }, + isAllowed: true, +}; + +export const $andonRecordVO = { + type: 'object', + properties: { + id: { type: 'integer', description: 'ID', format: 'int64' }, + factoryId: { type: 'integer', description: '工厂id', format: 'int64' }, + factoryName: { type: 'string', description: '' }, + deptId: { type: 'integer', description: '', format: 'int64' }, + deptName: { type: 'string', description: '' }, + workshopId: { type: 'integer', description: '车间id', format: 'int64' }, + workshopName: { type: 'string', description: '' }, + lineId: { type: 'integer', description: '产线d', format: 'int64' }, + lineName: { type: 'string', description: '' }, + machineId: { type: 'integer', description: '设备ID', format: 'int64' }, + signalId: { type: 'integer', description: '灯ID', format: 'int64' }, + calendarDetailId: { + type: 'integer', + description: '日历排班ID', + format: 'int64', + }, + calendarId: { type: 'integer', description: '', format: 'int64' }, + calendarDate: { type: 'string', description: '' }, + shiftDetailName: { type: 'string', description: '' }, + machineName: { type: 'string', description: '' }, + machineCode: { type: 'string', description: '' }, + configId: { type: 'integer', description: '事件配置ID', format: 'int64' }, + configName: { type: 'string', description: '' }, + eventName: { type: 'string', description: '' }, + reportUserId: { type: 'integer', description: '报告人ID', format: 'int64' }, + reportUserName: { type: 'string', description: '' }, + reportTime: { type: 'string', description: '开始时间' }, + reportComments: { type: 'string', description: '报告备注' }, + reportDate: { type: 'string', description: '报告日期' }, + priority: { type: 'string', description: '优先级' }, + notifyUseridStrs: { type: 'string', description: '通知人ID列表' }, + receiveUserId: { type: 'integer', description: '接收人', format: 'int64' }, + receiveUserName: { type: 'string', description: '' }, + receiveTime: { type: 'string', description: '接收时间' }, + receiveDurationTime: { + type: 'integer', + description: '接收用时', + format: 'int64', + }, + disposeDurationTime: { type: 'integer', description: '', format: 'int64' }, + disposeUserId: { + type: 'integer', + description: '处理人ID', + format: 'int64', + }, + disposeUserName: { type: 'string', description: '' }, + disposeDesc: { type: 'string', description: '处理方式' }, + disposeTime: { type: 'string', description: '处理时间' }, + totalDurationTime: { + type: 'integer', + description: '持续时间,单位秒', + format: 'int64', + }, + sourceType: { + type: 'string', + description: '来源,1 移动端,2 安灯盒按钮, 3 异常事件', + }, + state: { + type: 'string', + description: '状态,1 已上报,2 已接收,3 已处理, 9 已撤销', + }, + eventAnalysis: { type: 'string', description: '原因分析' }, + createdUserId: { type: 'integer', description: '创建人', format: 'int64' }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '最后更新时间' }, + datetimeStamp: { type: 'string', description: '时间戳' }, + oeeDetailId: { type: 'integer', description: 'oee明细ID', format: 'int64' }, + workCenterName: { type: 'string', description: '' }, + workCenterCode: { type: 'string', description: '' }, + disposeUserNames: { type: 'string', description: '' }, + disposeUserIds: { type: 'string', description: '' }, + totalDurationTimeSt: { type: 'string', description: '' }, + receiveDurationTimeSt: { type: 'string', description: '' }, + disposeDurationTimeSt: { type: 'string', description: '' }, + statusText: { + type: 'string', + description: + '表状态,1 已上报,2 已接收,3 已处理, 9 已撤销\n转换状态 已申请 已响应 已关闭 已撤销', + }, + disposeUserList: { + type: 'array', + items: { + description: '

平台_用户

', + type: 'object', + properties: { + id: { type: 'integer', description: '用户ID', format: 'int64' }, + teamId: { type: 'integer', description: '团队id', format: 'int64' }, + factoryId: { + type: 'integer', + description: '工厂id', + format: 'int64', + }, + deptId: { type: 'integer', description: '', format: 'int64' }, + workshopId: { + type: 'integer', + description: '所属车间id', + format: 'int64', + }, + lineId: { + type: 'integer', + description: '所属产线d', + format: 'int64', + }, + userName: { type: 'string', description: '用户姓名' }, + email: { type: 'string', description: '邮箱' }, + jobTitle: { type: 'string', description: '职称' }, + jobNo: { type: 'string', description: '用户工号' }, + accountNo: { type: 'string', description: '用户账号' }, + password: { type: 'string', description: '用户密码' }, + idNumber: { type: 'string', description: '身份证号' }, + dateOfBirth: { type: 'string', description: '出生日期' }, + telephone: { type: 'string', description: '联系电话' }, + headImageUrl: { type: 'string', description: '头像url' }, + userType: { + type: 'string', + description: '用户类型,1 平台,2 团队,3 工厂', + }, + adminFlag: { + type: 'string', + description: '管理员标识,1 管理员,0 非管理员', + }, + state: { type: 'string', description: '状态(1:在用 2:停用)' }, + deleteFlag: { type: 'string', description: '是否删除(0:否 1:是)' }, + passwordModifyiedTime: { + type: 'string', + description: '修改密码时间', + }, + createdUserId: { + type: 'integer', + description: '创建人', + format: 'int64', + }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '最后更新时间' }, + datetimeStamp: { type: 'string', description: '时间戳' }, + genderCode: { type: 'string', description: '1男 2女 9 未知' }, + publicOpenId: { type: 'string', description: '' }, + currentFactoryId: { + type: 'integer', + description: '', + format: 'int64', + }, + remark: { type: 'string', description: '备注' }, + }, + isAllowed: true, + 'x-id': 'PlatformUser', + }, + description: '', + }, + recordNodeList: { + type: 'array', + items: { + description: '

安灯记录-节点

', + type: 'object', + properties: { + id: { type: 'integer', description: '', format: 'int64' }, + andonRecordId: { type: 'integer', description: '', format: 'int64' }, + nodeDesc: { type: 'string', description: '节点描述' }, + nodeRemark: { type: 'string', description: '节点备注' }, + nodeType: { + type: 'string', + description: + '1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销', + }, + nodeTypeName: { type: 'string', description: '' }, + nodeUserId: { type: 'integer', description: '', format: 'int64' }, + nodeUserName: { type: 'string', description: '' }, + createdUserId: { type: 'integer', description: '', format: 'int64' }, + createdTime: { type: 'string', description: '' }, + modifyiedUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '' }, + }, + isAllowed: true, + 'x-id': 'AndonRecordNode', + }, + description: '', + }, + showColor: { type: 'string', description: '' }, + workCenterId: { type: 'integer', description: '', format: 'int64' }, + shiftShowColor: { type: 'string', description: '' }, + shiftStartTime: { type: 'string', description: '' }, + shiftEndTime: { type: 'string', description: '' }, + reportImgList: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + disposeImgList: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + reportImgUrls: { type: 'string', description: '' }, + disposeImgUrls: { type: 'string', description: '' }, + shiftName: { type: 'string', description: '' }, + completedUserId: { type: 'integer', description: '', format: 'int64' }, + completedUserName: { type: 'string', description: '' }, + }, + isAllowed: true, +}; + +export const $myPageAndonRecordVO = { + type: 'object', + properties: { + records: { + type: 'array', + items: { + description: '

安灯_记录

', + type: 'object', + properties: { + id: { type: 'integer', description: 'ID', format: 'int64' }, + factoryId: { + type: 'integer', + description: '工厂id', + format: 'int64', + }, + factoryName: { type: 'string', description: '' }, + deptId: { type: 'integer', description: '', format: 'int64' }, + deptName: { type: 'string', description: '' }, + workshopId: { + type: 'integer', + description: '车间id', + format: 'int64', + }, + workshopName: { type: 'string', description: '' }, + lineId: { type: 'integer', description: '产线d', format: 'int64' }, + lineName: { type: 'string', description: '' }, + machineId: { + type: 'integer', + description: '设备ID', + format: 'int64', + }, + signalId: { type: 'integer', description: '灯ID', format: 'int64' }, + calendarDetailId: { + type: 'integer', + description: '日历排班ID', + format: 'int64', + }, + calendarId: { type: 'integer', description: '', format: 'int64' }, + calendarDate: { type: 'string', description: '' }, + shiftDetailName: { type: 'string', description: '' }, + machineName: { type: 'string', description: '' }, + machineCode: { type: 'string', description: '' }, + configId: { + type: 'integer', + description: '事件配置ID', + format: 'int64', + }, + configName: { type: 'string', description: '' }, + eventName: { type: 'string', description: '' }, + reportUserId: { + type: 'integer', + description: '报告人ID', + format: 'int64', + }, + reportUserName: { type: 'string', description: '' }, + reportTime: { type: 'string', description: '开始时间' }, + reportComments: { type: 'string', description: '报告备注' }, + reportDate: { type: 'string', description: '报告日期' }, + priority: { type: 'string', description: '优先级' }, + notifyUseridStrs: { type: 'string', description: '通知人ID列表' }, + receiveUserId: { + type: 'integer', + description: '接收人', + format: 'int64', + }, + receiveUserName: { type: 'string', description: '' }, + receiveTime: { type: 'string', description: '接收时间' }, + receiveDurationTime: { + type: 'integer', + description: '接收用时', + format: 'int64', + }, + disposeDurationTime: { + type: 'integer', + description: '', + format: 'int64', + }, + disposeUserId: { + type: 'integer', + description: '处理人ID', + format: 'int64', + }, + disposeUserName: { type: 'string', description: '' }, + disposeDesc: { type: 'string', description: '处理方式' }, + disposeTime: { type: 'string', description: '处理时间' }, + totalDurationTime: { + type: 'integer', + description: '持续时间,单位秒', + format: 'int64', + }, + sourceType: { + type: 'string', + description: '来源,1 移动端,2 安灯盒按钮, 3 异常事件', + }, + state: { + type: 'string', + description: '状态,1 已上报,2 已接收,3 已处理, 9 已撤销', + }, + eventAnalysis: { type: 'string', description: '原因分析' }, + createdUserId: { + type: 'integer', + description: '创建人', + format: 'int64', + }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '最后更新时间' }, + datetimeStamp: { type: 'string', description: '时间戳' }, + oeeDetailId: { + type: 'integer', + description: 'oee明细ID', + format: 'int64', + }, + workCenterName: { type: 'string', description: '' }, + workCenterCode: { type: 'string', description: '' }, + disposeUserNames: { type: 'string', description: '' }, + disposeUserIds: { type: 'string', description: '' }, + totalDurationTimeSt: { type: 'string', description: '' }, + receiveDurationTimeSt: { type: 'string', description: '' }, + disposeDurationTimeSt: { type: 'string', description: '' }, + statusText: { + type: 'string', + description: + '表状态,1 已上报,2 已接收,3 已处理, 9 已撤销\n转换状态 已申请 已响应 已关闭 已撤销', + }, + disposeUserList: { + type: 'array', + items: { + description: '

平台_用户

', + type: 'object', + properties: { + id: { type: 'integer', description: '用户ID', format: 'int64' }, + teamId: { + type: 'integer', + description: '团队id', + format: 'int64', + }, + factoryId: { + type: 'integer', + description: '工厂id', + format: 'int64', + }, + deptId: { type: 'integer', description: '', format: 'int64' }, + workshopId: { + type: 'integer', + description: '所属车间id', + format: 'int64', + }, + lineId: { + type: 'integer', + description: '所属产线d', + format: 'int64', + }, + userName: { type: 'string', description: '用户姓名' }, + email: { type: 'string', description: '邮箱' }, + jobTitle: { type: 'string', description: '职称' }, + jobNo: { type: 'string', description: '用户工号' }, + accountNo: { type: 'string', description: '用户账号' }, + password: { type: 'string', description: '用户密码' }, + idNumber: { type: 'string', description: '身份证号' }, + dateOfBirth: { type: 'string', description: '出生日期' }, + telephone: { type: 'string', description: '联系电话' }, + headImageUrl: { type: 'string', description: '头像url' }, + userType: { + type: 'string', + description: '用户类型,1 平台,2 团队,3 工厂', + }, + adminFlag: { + type: 'string', + description: '管理员标识,1 管理员,0 非管理员', + }, + state: { type: 'string', description: '状态(1:在用 2:停用)' }, + deleteFlag: { + type: 'string', + description: '是否删除(0:否 1:是)', + }, + passwordModifyiedTime: { + type: 'string', + description: '修改密码时间', + }, + createdUserId: { + type: 'integer', + description: '创建人', + format: 'int64', + }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '最后更新时间' }, + datetimeStamp: { type: 'string', description: '时间戳' }, + genderCode: { type: 'string', description: '1男 2女 9 未知' }, + publicOpenId: { type: 'string', description: '' }, + currentFactoryId: { + type: 'integer', + description: '', + format: 'int64', + }, + remark: { type: 'string', description: '备注' }, + }, + isAllowed: true, + 'x-id': 'PlatformUser', + }, + description: '', + }, + recordNodeList: { + type: 'array', + items: { + description: '

安灯记录-节点

', + type: 'object', + properties: { + id: { type: 'integer', description: '', format: 'int64' }, + andonRecordId: { + type: 'integer', + description: '', + format: 'int64', + }, + nodeDesc: { type: 'string', description: '节点描述' }, + nodeRemark: { type: 'string', description: '节点备注' }, + nodeType: { + type: 'string', + description: + '1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销', + }, + nodeTypeName: { type: 'string', description: '' }, + nodeUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + nodeUserName: { type: 'string', description: '' }, + createdUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + createdTime: { type: 'string', description: '' }, + modifyiedUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '' }, + }, + isAllowed: true, + 'x-id': 'AndonRecordNode', + }, + description: '', + }, + showColor: { type: 'string', description: '' }, + workCenterId: { type: 'integer', description: '', format: 'int64' }, + shiftShowColor: { type: 'string', description: '' }, + shiftStartTime: { type: 'string', description: '' }, + shiftEndTime: { type: 'string', description: '' }, + reportImgList: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + disposeImgList: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + reportImgUrls: { type: 'string', description: '' }, + disposeImgUrls: { type: 'string', description: '' }, + shiftName: { type: 'string', description: '' }, + completedUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + completedUserName: { type: 'string', description: '' }, + }, + isAllowed: true, + 'x-id': 'AndonRecordVO', + }, + description: '', + }, + total: { type: 'integer', description: '', format: 'int64' }, + size: { type: 'integer', description: '', format: 'int64' }, + current: { type: 'integer', description: '', format: 'int64' }, + orders: { + type: 'array', + items: { + description: 'com.baomidou.mybatisplus.core.metadata.OrderItem', + type: 'object', + properties: { + column: { type: 'string', description: '' }, + asc: { type: 'boolean', description: '' }, + }, + isAllowed: true, + 'x-id': 'OrderItem', + }, + description: '', + }, + optimizeCountSql: { type: 'boolean', description: '' }, + searchCount: { type: 'boolean', description: '' }, + optimizeJoinOfCountSql: { type: 'boolean', description: '' }, + maxLimit: { type: 'integer', description: '', format: 'int64' }, + countId: { type: 'string', description: '' }, + startTime: { type: 'string', description: '' }, + startTimeStr: { type: 'string', description: '' }, + endTime: { type: 'string', description: '' }, + endTimeStr: { type: 'string', description: '' }, + hasNextPage: { type: 'boolean', description: '', default: false }, + }, + isAllowed: true, +}; + +export const $apiResult = { + type: 'object', + properties: { + code: { type: 'string', description: '状态码' }, + message: { type: 'string', description: '提示' }, + data: { description: '数据', type: 'object', properties: {} }, + success: { type: 'boolean', description: '是否成功' }, + }, + isAllowed: true, +}; + +export const $apiResultString = { + type: 'object', + properties: { + code: { type: 'string', description: '状态码' }, + message: { type: 'string', description: '提示' }, + data: { type: 'string', description: '数据' }, + success: { type: 'boolean', description: '是否成功' }, + }, + isAllowed: true, +}; + +export const $reportAbnormalEventDTO = { + type: 'object', + properties: { + abnormalRecordId: { + type: 'integer', + description: '异常记录id', + format: 'int64', + }, + eventId: { type: 'integer', description: '事件id', format: 'int64' }, + processDispatchId: { + type: 'integer', + description: '工序派工id', + format: 'int64', + }, + }, + required: ['abnormalRecordId'], + isAllowed: true, +}; + +export const $addDeviceMachine = { + type: 'object', + properties: { + lineId: { type: 'integer', description: '', format: 'int64' }, + lineName: { type: 'string', description: '' }, + machineCode: { type: 'string', description: '' }, + machineName: { type: 'string', description: '' }, + manageUserId: { type: 'integer', description: '', format: 'int64' }, + manageUserName: { type: 'string', description: '' }, + lightSn: { type: 'string', description: '' }, + signalId: { type: 'integer', description: '', format: 'int64' }, + serialNo: { type: 'string', description: '' }, + location: { type: 'string', description: '' }, + imgList: { + type: 'array', + items: { type: 'string' }, + description: '', + default: 'new ArrayList<>()', + }, + deviceMachineId: { + type: 'integer', + description: '更新才有', + format: 'int64', + }, + }, + required: ['lineId', 'machineCode', 'machineName', 'lightSn'], + isAllowed: true, +}; + +export const $apiResultAndonRecordVO = { + type: 'object', + properties: { + code: { type: 'string', description: '状态码' }, + message: { type: 'string', description: '提示' }, + data: { + description: '

安灯_记录

', + type: 'object', + properties: { + id: { type: 'integer', description: 'ID', format: 'int64' }, + factoryId: { type: 'integer', description: '工厂id', format: 'int64' }, + factoryName: { type: 'string', description: '' }, + deptId: { type: 'integer', description: '', format: 'int64' }, + deptName: { type: 'string', description: '' }, + workshopId: { type: 'integer', description: '车间id', format: 'int64' }, + workshopName: { type: 'string', description: '' }, + lineId: { type: 'integer', description: '产线d', format: 'int64' }, + lineName: { type: 'string', description: '' }, + machineId: { type: 'integer', description: '设备ID', format: 'int64' }, + signalId: { type: 'integer', description: '灯ID', format: 'int64' }, + calendarDetailId: { + type: 'integer', + description: '日历排班ID', + format: 'int64', + }, + calendarId: { type: 'integer', description: '', format: 'int64' }, + calendarDate: { type: 'string', description: '' }, + shiftDetailName: { type: 'string', description: '' }, + machineName: { type: 'string', description: '' }, + machineCode: { type: 'string', description: '' }, + configId: { + type: 'integer', + description: '事件配置ID', + format: 'int64', + }, + configName: { type: 'string', description: '' }, + eventName: { type: 'string', description: '' }, + reportUserId: { + type: 'integer', + description: '报告人ID', + format: 'int64', + }, + reportUserName: { type: 'string', description: '' }, + reportTime: { type: 'string', description: '开始时间' }, + reportComments: { type: 'string', description: '报告备注' }, + reportDate: { type: 'string', description: '报告日期' }, + priority: { type: 'string', description: '优先级' }, + notifyUseridStrs: { type: 'string', description: '通知人ID列表' }, + receiveUserId: { + type: 'integer', + description: '接收人', + format: 'int64', + }, + receiveUserName: { type: 'string', description: '' }, + receiveTime: { type: 'string', description: '接收时间' }, + receiveDurationTime: { + type: 'integer', + description: '接收用时', + format: 'int64', + }, + disposeDurationTime: { + type: 'integer', + description: '', + format: 'int64', + }, + disposeUserId: { + type: 'integer', + description: '处理人ID', + format: 'int64', + }, + disposeUserName: { type: 'string', description: '' }, + disposeDesc: { type: 'string', description: '处理方式' }, + disposeTime: { type: 'string', description: '处理时间' }, + totalDurationTime: { + type: 'integer', + description: '持续时间,单位秒', + format: 'int64', + }, + sourceType: { + type: 'string', + description: '来源,1 移动端,2 安灯盒按钮, 3 异常事件', + }, + state: { + type: 'string', + description: '状态,1 已上报,2 已接收,3 已处理, 9 已撤销', + }, + eventAnalysis: { type: 'string', description: '原因分析' }, + createdUserId: { + type: 'integer', + description: '创建人', + format: 'int64', + }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '最后更新时间' }, + datetimeStamp: { type: 'string', description: '时间戳' }, + oeeDetailId: { + type: 'integer', + description: 'oee明细ID', + format: 'int64', + }, + workCenterName: { type: 'string', description: '' }, + workCenterCode: { type: 'string', description: '' }, + disposeUserNames: { type: 'string', description: '' }, + disposeUserIds: { type: 'string', description: '' }, + totalDurationTimeSt: { type: 'string', description: '' }, + receiveDurationTimeSt: { type: 'string', description: '' }, + disposeDurationTimeSt: { type: 'string', description: '' }, + statusText: { + type: 'string', + description: + '表状态,1 已上报,2 已接收,3 已处理, 9 已撤销\n转换状态 已申请 已响应 已关闭 已撤销', + }, + disposeUserList: { + type: 'array', + items: { + description: '

平台_用户

', + type: 'object', + properties: { + id: { type: 'integer', description: '用户ID', format: 'int64' }, + teamId: { + type: 'integer', + description: '团队id', + format: 'int64', + }, + factoryId: { + type: 'integer', + description: '工厂id', + format: 'int64', + }, + deptId: { type: 'integer', description: '', format: 'int64' }, + workshopId: { + type: 'integer', + description: '所属车间id', + format: 'int64', + }, + lineId: { + type: 'integer', + description: '所属产线d', + format: 'int64', + }, + userName: { type: 'string', description: '用户姓名' }, + email: { type: 'string', description: '邮箱' }, + jobTitle: { type: 'string', description: '职称' }, + jobNo: { type: 'string', description: '用户工号' }, + accountNo: { type: 'string', description: '用户账号' }, + password: { type: 'string', description: '用户密码' }, + idNumber: { type: 'string', description: '身份证号' }, + dateOfBirth: { type: 'string', description: '出生日期' }, + telephone: { type: 'string', description: '联系电话' }, + headImageUrl: { type: 'string', description: '头像url' }, + userType: { + type: 'string', + description: '用户类型,1 平台,2 团队,3 工厂', + }, + adminFlag: { + type: 'string', + description: '管理员标识,1 管理员,0 非管理员', + }, + state: { type: 'string', description: '状态(1:在用 2:停用)' }, + deleteFlag: { + type: 'string', + description: '是否删除(0:否 1:是)', + }, + passwordModifyiedTime: { + type: 'string', + description: '修改密码时间', + }, + createdUserId: { + type: 'integer', + description: '创建人', + format: 'int64', + }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '最后更新时间' }, + datetimeStamp: { type: 'string', description: '时间戳' }, + genderCode: { type: 'string', description: '1男 2女 9 未知' }, + publicOpenId: { type: 'string', description: '' }, + currentFactoryId: { + type: 'integer', + description: '', + format: 'int64', + }, + remark: { type: 'string', description: '备注' }, + }, + isAllowed: true, + 'x-id': 'PlatformUser', + }, + description: '', + }, + recordNodeList: { + type: 'array', + items: { + description: '

安灯记录-节点

', + type: 'object', + properties: { + id: { type: 'integer', description: '', format: 'int64' }, + andonRecordId: { + type: 'integer', + description: '', + format: 'int64', + }, + nodeDesc: { type: 'string', description: '节点描述' }, + nodeRemark: { type: 'string', description: '节点备注' }, + nodeType: { + type: 'string', + description: + '1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销', + }, + nodeTypeName: { type: 'string', description: '' }, + nodeUserId: { type: 'integer', description: '', format: 'int64' }, + nodeUserName: { type: 'string', description: '' }, + createdUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + createdTime: { type: 'string', description: '' }, + modifyiedUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '' }, + }, + isAllowed: true, + 'x-id': 'AndonRecordNode', + }, + description: '', + }, + showColor: { type: 'string', description: '' }, + workCenterId: { type: 'integer', description: '', format: 'int64' }, + shiftShowColor: { type: 'string', description: '' }, + shiftStartTime: { type: 'string', description: '' }, + shiftEndTime: { type: 'string', description: '' }, + reportImgList: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + disposeImgList: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + reportImgUrls: { type: 'string', description: '' }, + disposeImgUrls: { type: 'string', description: '' }, + shiftName: { type: 'string', description: '' }, + completedUserId: { type: 'integer', description: '', format: 'int64' }, + completedUserName: { type: 'string', description: '' }, + }, + isAllowed: true, + 'x-id': 'AndonRecordVO', + }, + success: { type: 'boolean', description: '是否成功' }, + }, + isAllowed: true, +}; + +export const $andonClose = { + type: 'object', + properties: { + andonRecordId: { type: 'integer', description: '', format: 'int64' }, + disposeDesc: { type: 'string', description: '' }, + disposeImgUrls: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + }, + required: ['andonRecordId'], + isAllowed: true, +}; + +export const $apiResultMyPageAndonRecordVO = { + type: 'object', + properties: { + code: { type: 'string', description: '状态码' }, + message: { type: 'string', description: '提示' }, + data: { + description: '数据', + type: 'object', + properties: { + records: { + type: 'array', + items: { + description: '

安灯_记录

', + type: 'object', + properties: { + id: { type: 'integer', description: 'ID', format: 'int64' }, + factoryId: { + type: 'integer', + description: '工厂id', + format: 'int64', + }, + factoryName: { type: 'string', description: '' }, + deptId: { type: 'integer', description: '', format: 'int64' }, + deptName: { type: 'string', description: '' }, + workshopId: { + type: 'integer', + description: '车间id', + format: 'int64', + }, + workshopName: { type: 'string', description: '' }, + lineId: { + type: 'integer', + description: '产线d', + format: 'int64', + }, + lineName: { type: 'string', description: '' }, + machineId: { + type: 'integer', + description: '设备ID', + format: 'int64', + }, + signalId: { + type: 'integer', + description: '灯ID', + format: 'int64', + }, + calendarDetailId: { + type: 'integer', + description: '日历排班ID', + format: 'int64', + }, + calendarId: { type: 'integer', description: '', format: 'int64' }, + calendarDate: { type: 'string', description: '' }, + shiftDetailName: { type: 'string', description: '' }, + machineName: { type: 'string', description: '' }, + machineCode: { type: 'string', description: '' }, + configId: { + type: 'integer', + description: '事件配置ID', + format: 'int64', + }, + configName: { type: 'string', description: '' }, + eventName: { type: 'string', description: '' }, + reportUserId: { + type: 'integer', + description: '报告人ID', + format: 'int64', + }, + reportUserName: { type: 'string', description: '' }, + reportTime: { type: 'string', description: '开始时间' }, + reportComments: { type: 'string', description: '报告备注' }, + reportDate: { type: 'string', description: '报告日期' }, + priority: { type: 'string', description: '优先级' }, + notifyUseridStrs: { type: 'string', description: '通知人ID列表' }, + receiveUserId: { + type: 'integer', + description: '接收人', + format: 'int64', + }, + receiveUserName: { type: 'string', description: '' }, + receiveTime: { type: 'string', description: '接收时间' }, + receiveDurationTime: { + type: 'integer', + description: '接收用时', + format: 'int64', + }, + disposeDurationTime: { + type: 'integer', + description: '', + format: 'int64', + }, + disposeUserId: { + type: 'integer', + description: '处理人ID', + format: 'int64', + }, + disposeUserName: { type: 'string', description: '' }, + disposeDesc: { type: 'string', description: '处理方式' }, + disposeTime: { type: 'string', description: '处理时间' }, + totalDurationTime: { + type: 'integer', + description: '持续时间,单位秒', + format: 'int64', + }, + sourceType: { + type: 'string', + description: '来源,1 移动端,2 安灯盒按钮, 3 异常事件', + }, + state: { + type: 'string', + description: '状态,1 已上报,2 已接收,3 已处理, 9 已撤销', + }, + eventAnalysis: { type: 'string', description: '原因分析' }, + createdUserId: { + type: 'integer', + description: '创建人', + format: 'int64', + }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '最后更新时间' }, + datetimeStamp: { type: 'string', description: '时间戳' }, + oeeDetailId: { + type: 'integer', + description: 'oee明细ID', + format: 'int64', + }, + workCenterName: { type: 'string', description: '' }, + workCenterCode: { type: 'string', description: '' }, + disposeUserNames: { type: 'string', description: '' }, + disposeUserIds: { type: 'string', description: '' }, + totalDurationTimeSt: { type: 'string', description: '' }, + receiveDurationTimeSt: { type: 'string', description: '' }, + disposeDurationTimeSt: { type: 'string', description: '' }, + statusText: { + type: 'string', + description: + '表状态,1 已上报,2 已接收,3 已处理, 9 已撤销\n转换状态 已申请 已响应 已关闭 已撤销', + }, + disposeUserList: { + type: 'array', + items: { + description: '

平台_用户

', + type: 'object', + properties: { + id: { + type: 'integer', + description: '用户ID', + format: 'int64', + }, + teamId: { + type: 'integer', + description: '团队id', + format: 'int64', + }, + factoryId: { + type: 'integer', + description: '工厂id', + format: 'int64', + }, + deptId: { + type: 'integer', + description: '', + format: 'int64', + }, + workshopId: { + type: 'integer', + description: '所属车间id', + format: 'int64', + }, + lineId: { + type: 'integer', + description: '所属产线d', + format: 'int64', + }, + userName: { type: 'string', description: '用户姓名' }, + email: { type: 'string', description: '邮箱' }, + jobTitle: { type: 'string', description: '职称' }, + jobNo: { type: 'string', description: '用户工号' }, + accountNo: { type: 'string', description: '用户账号' }, + password: { type: 'string', description: '用户密码' }, + idNumber: { type: 'string', description: '身份证号' }, + dateOfBirth: { type: 'string', description: '出生日期' }, + telephone: { type: 'string', description: '联系电话' }, + headImageUrl: { type: 'string', description: '头像url' }, + userType: { + type: 'string', + description: '用户类型,1 平台,2 团队,3 工厂', + }, + adminFlag: { + type: 'string', + description: '管理员标识,1 管理员,0 非管理员', + }, + state: { + type: 'string', + description: '状态(1:在用 2:停用)', + }, + deleteFlag: { + type: 'string', + description: '是否删除(0:否 1:是)', + }, + passwordModifyiedTime: { + type: 'string', + description: '修改密码时间', + }, + createdUserId: { + type: 'integer', + description: '创建人', + format: 'int64', + }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { + type: 'string', + description: '最后更新时间', + }, + datetimeStamp: { type: 'string', description: '时间戳' }, + genderCode: { + type: 'string', + description: '1男 2女 9 未知', + }, + publicOpenId: { type: 'string', description: '' }, + currentFactoryId: { + type: 'integer', + description: '', + format: 'int64', + }, + remark: { type: 'string', description: '备注' }, + }, + isAllowed: true, + 'x-id': 'PlatformUser', + }, + description: '', + }, + recordNodeList: { + type: 'array', + items: { + description: '

安灯记录-节点

', + type: 'object', + properties: { + id: { type: 'integer', description: '', format: 'int64' }, + andonRecordId: { + type: 'integer', + description: '', + format: 'int64', + }, + nodeDesc: { type: 'string', description: '节点描述' }, + nodeRemark: { type: 'string', description: '节点备注' }, + nodeType: { + type: 'string', + description: + '1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销', + }, + nodeTypeName: { type: 'string', description: '' }, + nodeUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + nodeUserName: { type: 'string', description: '' }, + createdUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + createdTime: { type: 'string', description: '' }, + modifyiedUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '' }, + }, + isAllowed: true, + 'x-id': 'AndonRecordNode', + }, + description: '', + }, + showColor: { type: 'string', description: '' }, + workCenterId: { + type: 'integer', + description: '', + format: 'int64', + }, + shiftShowColor: { type: 'string', description: '' }, + shiftStartTime: { type: 'string', description: '' }, + shiftEndTime: { type: 'string', description: '' }, + reportImgList: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + disposeImgList: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + reportImgUrls: { type: 'string', description: '' }, + disposeImgUrls: { type: 'string', description: '' }, + shiftName: { type: 'string', description: '' }, + completedUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + completedUserName: { type: 'string', description: '' }, + }, + isAllowed: true, + 'x-id': 'AndonRecordVO', + }, + description: '', + }, + total: { type: 'integer', description: '', format: 'int64' }, + size: { type: 'integer', description: '', format: 'int64' }, + current: { type: 'integer', description: '', format: 'int64' }, + orders: { + type: 'array', + items: { + description: 'com.baomidou.mybatisplus.core.metadata.OrderItem', + type: 'object', + properties: { + column: { type: 'string', description: '' }, + asc: { type: 'boolean', description: '' }, + }, + isAllowed: true, + 'x-id': 'OrderItem', + }, + description: '', + }, + optimizeCountSql: { type: 'boolean', description: '' }, + searchCount: { type: 'boolean', description: '' }, + optimizeJoinOfCountSql: { type: 'boolean', description: '' }, + maxLimit: { type: 'integer', description: '', format: 'int64' }, + countId: { type: 'string', description: '' }, + startTime: { type: 'string', description: '' }, + startTimeStr: { type: 'string', description: '' }, + endTime: { type: 'string', description: '' }, + endTimeStr: { type: 'string', description: '' }, + hasNextPage: { type: 'boolean', description: '', default: false }, + }, + isAllowed: true, + 'x-id': 'MyPageAndonRecordVO', + }, + success: { type: 'boolean', description: '是否成功' }, + }, + isAllowed: true, +}; + +export const $andonRecordQuery = { + type: 'object', + properties: { + queryDeptId: { type: 'integer', description: '', format: 'int64' }, + myRelatedFlag: { + type: 'string', + description: '与我有关, 处理人或者报告人是我或者接收人是我', + default: '0', + }, + queryDisposeStatus: { + type: 'string', + description: '处理状态 1 查询未处理的 2 查询已处理的', + }, + queryTimeType: { + type: 'string', + description: '1 60天内 2 今天 3 本月 5 日期范围查询 默认1', + default: '1', + }, + factoryId: { type: 'integer', description: '', format: 'int64' }, + startTime: { type: 'string', description: '' }, + endTime: { type: 'string', description: '' }, + size: { type: 'integer', description: '', format: 'int64', default: 30 }, + current: { type: 'integer', description: '', format: 'int64', default: 1 }, + }, + isAllowed: true, +}; + +export const $andonReq = { + type: 'object', + properties: { + configId: { type: 'integer', description: '', format: 'int64' }, + configName: { type: 'string', description: '' }, + imgList: { type: 'array', items: { type: 'string' }, description: '' }, + reportComments: { type: 'string', description: '' }, + selectHandlerUserIds: { + type: 'array', + items: { type: 'integer' }, + description: '处理用户', + }, + workCenterId: { type: 'integer', description: '', format: 'int64' }, + reqUserId: { type: 'integer', description: '', format: 'int64' }, + sourceType: { type: 'string', description: '来源' }, + processDispatchId: { + type: 'integer', + description: '工序派工id', + format: 'int64', + }, + }, + required: ['configId', 'configName', 'selectHandlerUserIds', 'workCenterId'], + isAllowed: true, +}; + +export const $jSONObject = { + type: 'object', + properties: { key: { type: 'object', properties: {} } }, + isAllowed: true, +}; +/* eslint-disable */ +// @ts-ignore + +export type AddAndonRecordNodeDescUsingPostResponses = { + 200: ApiResult; +}; + +export type AddDeviceMachine = { + lineId: number; + lineName?: string; + machineCode: string; + machineName: string; + manageUserId?: number; + manageUserName?: string; + lightSn: string; + signalId?: number; + serialNo?: string; + location?: string; + imgList?: string[]; + /** 更新才有 */ + deviceMachineId?: number; +}; + +export type AddDeviceMachineUsingPostResponses = { + 200: ApiResult; +}; + +export type AndonClose = { + andonRecordId: number; + disposeDesc?: string; + disposeImgUrls?: string[]; +}; + +export type AndonRecordNode = { + id?: number; + andonRecordId?: number; + /** 节点描述 */ + nodeDesc?: string; + /** 节点备注 */ + nodeRemark?: string; + /** 1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销 */ + nodeType?: string; + nodeTypeName?: string; + nodeUserId?: number; + nodeUserName?: string; + createdUserId?: number; + createdTime?: string; + modifyiedUserId?: number; + modifyiedTime?: string; +}; + +export type AndonRecordQuery = { + queryDeptId?: number; + /** 与我有关, 处理人或者报告人是我或者接收人是我 */ + myRelatedFlag?: string; + /** 处理状态 1 查询未处理的 2 查询已处理的 */ + queryDisposeStatus?: string; + /** 1 60天内 2 今天 3 本月 5 日期范围查询 默认1 */ + queryTimeType?: string; + factoryId?: number; + startTime?: string; + endTime?: string; + size?: number; + current?: number; +}; + +export type AndonRecordVO = { + /** ID */ + id?: number; + /** 工厂id */ + factoryId?: number; + factoryName?: string; + deptId?: number; + deptName?: string; + /** 车间id */ + workshopId?: number; + workshopName?: string; + /** 产线d */ + lineId?: number; + lineName?: string; + /** 设备ID */ + machineId?: number; + /** 灯ID */ + signalId?: number; + /** 日历排班ID */ + calendarDetailId?: number; + calendarId?: number; + calendarDate?: string; + shiftDetailName?: string; + machineName?: string; + machineCode?: string; + /** 事件配置ID */ + configId?: number; + configName?: string; + eventName?: string; + /** 报告人ID */ + reportUserId?: number; + reportUserName?: string; + /** 开始时间 */ + reportTime?: string; + /** 报告备注 */ + reportComments?: string; + /** 报告日期 */ + reportDate?: string; + /** 优先级 */ + priority?: string; + /** 通知人ID列表 */ + notifyUseridStrs?: string; + /** 接收人 */ + receiveUserId?: number; + receiveUserName?: string; + /** 接收时间 */ + receiveTime?: string; + /** 接收用时 */ + receiveDurationTime?: number; + disposeDurationTime?: number; + /** 处理人ID */ + disposeUserId?: number; + disposeUserName?: string; + /** 处理方式 */ + disposeDesc?: string; + /** 处理时间 */ + disposeTime?: string; + /** 持续时间,单位秒 */ + totalDurationTime?: number; + /** 来源,1 移动端,2 安灯盒按钮, 3 异常事件 */ + sourceType?: string; + /** 状态,1 已上报,2 已接收,3 已处理, 9 已撤销 */ + state?: string; + /** 原因分析 */ + eventAnalysis?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + /** oee明细ID */ + oeeDetailId?: number; + workCenterName?: string; + workCenterCode?: string; + disposeUserNames?: string; + disposeUserIds?: string; + totalDurationTimeSt?: string; + receiveDurationTimeSt?: string; + disposeDurationTimeSt?: string; + /** 表状态,1 已上报,2 已接收,3 已处理, 9 已撤销转换状态 已申请 已响应 已关闭 已撤销 */ + statusText?: string; + disposeUserList?: PlatformUser[]; + recordNodeList?: AndonRecordNode[]; + showColor?: string; + workCenterId?: number; + shiftShowColor?: string; + shiftStartTime?: string; + shiftEndTime?: string; + reportImgList?: string[]; + disposeImgList?: string[]; + reportImgUrls?: string; + disposeImgUrls?: string; + shiftName?: string; + completedUserId?: number; + completedUserName?: string; +}; + +export type AndonReq = { + configId: number; + configName: string; + imgList?: string[]; + reportComments?: string; + /** 处理用户 */ + selectHandlerUserIds: number[]; + workCenterId: number; + reqUserId?: number; + /** 来源 */ + sourceType?: string; + /** 工序派工id */ + processDispatchId?: number; +}; + +export type AndonReqUsingPostResponses = { + 200: ApiResult; +}; + +export type ApiResult = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: Record; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultAndonRecordVO = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /**

安灯_记录

*/ + data?: AndonRecordVO; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultMyPageAndonRecordVO = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: MyPageAndonRecordVO; + /** 是否成功 */ + success?: boolean; +}; + +export type ApiResultString = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: string; + /** 是否成功 */ + success?: boolean; +}; + +export type CancelRemarkStatusUsingPostResponses = { + 200: ApiResult; +}; + +export type ChangeAndonEventTypeUsingPostResponses = { + 200: ApiResult; +}; + +export type ChangeDisposeAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type CloseAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAAndonReqCfgUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAbnormalEventCfgListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAbnormalRecordUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAllUserUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAllWorkshopLineUsingPostResponses = { + 200: ApiResult; +}; + +export type GetAndonRecordInfoUsingPostResponses = { + 200: ApiResultAndonRecordVO; +}; + +export type GetAndonRecordListUsingPostResponses = { + 200: ApiResultMyPageAndonRecordVO; +}; + +export type GetCurrentShiftUsingPostResponses = { + 200: ApiResultString; +}; + +export type GetDeviceListUsingPostBody = string; + +export type GetDeviceListUsingPostParams = { + /** ID */ + id?: number; + /** 工厂ID */ + factoryId?: number; + deptId?: number; + /** 车间ID */ + workshopId?: number; + /** 产线ID */ + lineId?: number; + /** 分类ID */ + categoryId?: number; + /** 灯ID */ + signalId?: number; + lightSn?: string; + /** 设备编号 */ + machineCode?: string; + /** 设备名称 */ + machineName?: string; + /** 拼音码 */ + pinyin?: string; + /** 五笔码 */ + wubi?: string; + /** 医院图片 */ + imgUrlStrs?: string; + /** 管理员ID */ + manageUserId?: number; + /** 品牌 */ + trademark?: string; + /** 型号 */ + model?: string; + /** 序列号 */ + serialNo?: string; + /** 供应商 */ + supplier?: string; + /** 启用日期 */ + activationDate?: string; + /** 验收日期 */ + checkDate?: string; + /** 出厂日期 */ + productionDate?: string; + /** 脉冲间隔 */ + pulseInterval?: number; + /** 标准利用率 */ + standardUseRate?: string; + /** 放置地点 */ + location?: string; + /** 状态,1启用,2 停用 */ + state?: string; + /** 备注 */ + remark?: string; + /** 删除标记 */ + deleteFlag?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + searchKey?: string; + /** 0 关机,1 运行,2 等待,3 异常 */ + oeeState?: string; + oeeTime?: string; + stateRecordId?: number; + stateStartTime?: string; +}; + +export type GetDeviceListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetEsopListUsingPostResponses = { + 200: ApiResult; +}; + +export type GetUserWorkshopWorkcenterUsingPostParams = { + selectDeptId?: number; +}; + +export type GetUserWorkshopWorkcenterUsingPostResponses = { + 200: ApiResult; +}; + +export type GetWorkCenterUsingPostResponses = { + 200: ApiResult; +}; + +export type JSONObject = { + key?: Record; +}; + +export type MyPageAndonRecordVO = { + records?: AndonRecordVO[]; + total?: number; + size?: number; + current?: number; + orders?: OrderItem[]; + optimizeCountSql?: boolean; + searchCount?: boolean; + optimizeJoinOfCountSql?: boolean; + maxLimit?: number; + countId?: string; + startTime?: string; + startTimeStr?: string; + endTime?: string; + endTimeStr?: string; + hasNextPage?: boolean; +}; + +export type OrderItem = { + column?: string; + asc?: boolean; +}; + +export type PlatformUser = { + /** 用户ID */ + id?: number; + /** 团队id */ + teamId?: number; + /** 工厂id */ + factoryId?: number; + deptId?: number; + /** 所属车间id */ + workshopId?: number; + /** 所属产线d */ + lineId?: number; + /** 用户姓名 */ + userName?: string; + /** 邮箱 */ + email?: string; + /** 职称 */ + jobTitle?: string; + /** 用户工号 */ + jobNo?: string; + /** 用户账号 */ + accountNo?: string; + /** 用户密码 */ + password?: string; + /** 身份证号 */ + idNumber?: string; + /** 出生日期 */ + dateOfBirth?: string; + /** 联系电话 */ + telephone?: string; + /** 头像url */ + headImageUrl?: string; + /** 用户类型,1 平台,2 团队,3 工厂 */ + userType?: string; + /** 管理员标识,1 管理员,0 非管理员 */ + adminFlag?: string; + /** 状态(1:在用 2:停用) */ + state?: string; + /** 是否删除(0:否 1:是) */ + deleteFlag?: string; + /** 修改密码时间 */ + passwordModifyiedTime?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + /** 1男 2女 9 未知 */ + genderCode?: string; + publicOpenId?: string; + currentFactoryId?: number; + /** 备注 */ + remark?: string; +}; + +export type ReceiveAndonUsingPostResponses = { + 200: ApiResult; +}; + +export type RemarkStatusUsingPostResponses = { + 200: ApiResult; +}; + +export type ReportAbnormalEventDTO = { + /** 异常记录id */ + abnormalRecordId: number; + /** 事件id */ + eventId?: number; + /** 工序派工id */ + processDispatchId?: number; +}; + +export type ReportAbnormalEventUsingPostResponses = { + 200: ApiResult; +}; + +export type UpdateDeviceMachineUsingPostResponses = { + 200: ApiResult; +}; +/* eslint-disable */ +// @ts-ignore +import request from 'axios'; + +import * as API from './types'; + +/** addAndonRecordNodeDesc POST /api/web/workcenter-operate/add-andon-record-node-desc */ +export function addAndonRecordNodeDescUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/add-andon-record-node-desc', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** addDeviceMachine POST /api/web/workcenter-operate/add-device-machine */ +export function addDeviceMachineUsingPost({ + body, + options, +}: { + body: API.AddDeviceMachine; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/add-device-machine', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 安灯请求 POST /api/web/workcenter-operate/andon-req */ +export function andonReqUsingPost({ + body, + options, +}: { + body: API.AndonReq; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/andon-req', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** cancelRemarkStatus POST /api/web/workcenter-operate/cancel-remark-status */ +export function cancelRemarkStatusUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/cancel-remark-status', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 改变安灯事件类型 POST /api/web/workcenter-operate/change-andon-event-type */ +export function changeAndonEventTypeUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/change-andon-event-type', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 改变安灯处理人 POST /api/web/workcenter-operate/change-dispose-andon */ +export function changeDisposeAndonUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/change-dispose-andon', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 关闭安灯 POST /api/web/workcenter-operate/close-andon */ +export function closeAndonUsingPost({ + body, + options, +}: { + body: API.AndonClose; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/close-andon', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** getAndonReqCfg POST /api/web/workcenter-operate/get-aAndon-req-cfg */ +export function getAAndonReqCfgUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-aAndon-req-cfg', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 获取异常事件配置 POST /api/web/workcenter-operate/get-abnormal-event-cfg-list */ +export function getAbnormalEventCfgListUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-abnormal-event-cfg-list', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAbnormalRecord POST /api/web/workcenter-operate/get-abnormal-record */ +export function getAbnormalRecordUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-abnormal-record', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAllUser POST /api/web/workcenter-operate/get-all-user */ +export function getAllUserUsingPost({ + options, +}: { + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-all-user', { + method: 'POST', + ...(options || {}), + }); +} + +/** getAllWorkshopAndLineList POST /api/web/workcenter-operate/get-all-workshop-line */ +export function getAllWorkshopLineUsingPost({ + options, +}: { + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-all-workshop-line', + { + method: 'POST', + ...(options || {}), + } + ); +} + +/** 获取安灯记录详情 POST /api/web/workcenter-operate/get-andon-record-info */ +export function getAndonRecordInfoUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-andon-record-info', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getAndonRecordList POST /api/web/workcenter-operate/get-andon-record-list */ +export function getAndonRecordListUsingPost({ + body, + options, +}: { + body: API.AndonRecordQuery; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-andon-record-list', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getCurrentShift POST /api/web/workcenter-operate/get-current-shift */ +export function getCurrentShiftUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-current-shift', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** getDeviceList POST /api/web/workcenter-operate/get-device-list */ +export function getDeviceListUsingPost({ + params, + body, + options, +}: { + // 叠加生成的Param类型 (非body参数openapi默认没有生成对象) + params: API.GetDeviceListUsingPostParams; + body: API.GetDeviceListUsingPostBody; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-device-list', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + params: { + ...params, + }, + data: body, + ...(options || {}), + }); +} + +/** getEsopList POST /api/web/workcenter-operate/get-esop-list */ +export function getEsopListUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-esop-list', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** 获取车间产线结构 POST /api/web/workcenter-operate/get-user-workshop-workcenter */ +export function getUserWorkshopWorkcenterUsingPost({ + params, + options, +}: { + // 叠加生成的Param类型 (非body参数openapi默认没有生成对象) + params: API.GetUserWorkshopWorkcenterUsingPostParams; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/get-user-workshop-workcenter', + { + method: 'POST', + params: { + ...params, + }, + ...(options || {}), + } + ); +} + +/** getWorkCenter POST /api/web/workcenter-operate/get-work-center */ +export function getWorkCenterUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/get-work-center', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** receiveAndon POST /api/web/workcenter-operate/receive-andon */ +export function receiveAndonUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/receive-andon', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** remarkStatus POST /api/web/workcenter-operate/remark-status */ +export function remarkStatusUsingPost({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request('/api/web/workcenter-operate/remark-status', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** 报告异常事件 POST /api/web/workcenter-operate/report-abnormal-event */ +export function reportAbnormalEventUsingPost({ + body, + options, +}: { + body: API.ReportAbnormalEventDTO; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/report-abnormal-event', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** updateDeviceMachine POST /api/web/workcenter-operate/update-device-machine */ +export function updateDeviceMachineUsingPost({ + body, + options, +}: { + body: API.AddDeviceMachine; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/update-device-machine', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} diff --git "a/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225\345\244\232\344\270\252 hook \345\220\214\346\227\266\344\275\277\347\224\250.snap" "b/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225\345\244\232\344\270\252 hook \345\220\214\346\227\266\344\275\277\347\224\250.snap" new file mode 100644 index 0000000..9ac8129 --- /dev/null +++ "b/test/__snapshots__/customRenderTemplateData/\346\265\213\350\257\225\345\244\232\344\270\252 hook \345\220\214\346\227\266\344\275\277\347\224\250.snap" @@ -0,0 +1,2242 @@ +/* eslint-disable */ +// @ts-ignore +import { queryOptions, useMutation } from '@tanstack/react-query'; +import type { DefaultError } from '@tanstack/react-query'; +import request from 'axios'; + +import * as apis from './HookwebController'; +import * as API from './types'; +/* eslint-disable */ +// @ts-ignore +import request from 'axios'; + +import * as API from './types'; + +/** addAndonRecordNodeDesc POST /api/web/workcenter-operate/add-andon-record-node-desc */ +export function hookApi13({ + body, + options, +}: { + body: API.JSONObject; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/add-andon-record-node-desc', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** addDeviceMachine POST /api/web/workcenter-operate/add-device-machine */ +export function hookApi15({ + body, + options, +}: { + body: API.AddDeviceMachine; + options?: { [key: string]: unknown }; +}) { + return request( + '/api/web/workcenter-operate/add-device-machine', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} +/* eslint-disable */ +// @ts-ignore +import * as API from './types'; + +export function displayAddDeviceMachine(field: keyof API.AddDeviceMachine) { + return { + lineId: 'lineId', + lineName: 'lineName', + machineCode: 'machineCode', + machineName: 'machineName', + manageUserId: 'manageUserId', + manageUserName: 'manageUserName', + lightSn: 'lightSn', + signalId: 'signalId', + serialNo: 'serialNo', + location: 'location', + imgList: 'imgList', + deviceMachineId: '更新才有', + }[field]; +} + +export function displayAndonClose(field: keyof API.AndonClose) { + return { + andonRecordId: 'andonRecordId', + disposeDesc: 'disposeDesc', + disposeImgUrls: 'disposeImgUrls', + }[field]; +} + +export function displayAndonRecordNode(field: keyof API.AndonRecordNode) { + return { + id: 'id', + andonRecordId: 'andonRecordId', + nodeDesc: '节点描述', + nodeRemark: '节点备注', + nodeType: + '1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销', + nodeTypeName: 'nodeTypeName', + nodeUserId: 'nodeUserId', + nodeUserName: 'nodeUserName', + createdUserId: 'createdUserId', + createdTime: 'createdTime', + modifyiedUserId: 'modifyiedUserId', + modifyiedTime: 'modifyiedTime', + }[field]; +} + +export function displayAndonRecordQuery(field: keyof API.AndonRecordQuery) { + return { + queryDeptId: 'queryDeptId', + myRelatedFlag: '与我有关, 处理人或者报告人是我或者接收人是我', + queryDisposeStatus: '处理状态 1 查询未处理的 2 查询已处理的', + queryTimeType: '1 60天内 2 今天 3 本月 5 日期范围查询 默认1', + factoryId: 'factoryId', + startTime: 'startTime', + endTime: 'endTime', + size: 'size', + current: 'current', + }[field]; +} + +export function displayAndonRecordVO(field: keyof API.AndonRecordVO) { + return { + id: 'ID', + factoryId: '工厂id', + factoryName: 'factoryName', + deptId: 'deptId', + deptName: 'deptName', + workshopId: '车间id', + workshopName: 'workshopName', + lineId: '产线d', + lineName: 'lineName', + machineId: '设备ID', + signalId: '灯ID', + calendarDetailId: '日历排班ID', + calendarId: 'calendarId', + calendarDate: 'calendarDate', + shiftDetailName: 'shiftDetailName', + machineName: 'machineName', + machineCode: 'machineCode', + configId: '事件配置ID', + configName: 'configName', + eventName: 'eventName', + reportUserId: '报告人ID', + reportUserName: 'reportUserName', + reportTime: '开始时间', + reportComments: '报告备注', + reportDate: '报告日期', + priority: '优先级', + notifyUseridStrs: '通知人ID列表', + receiveUserId: '接收人', + receiveUserName: 'receiveUserName', + receiveTime: '接收时间', + receiveDurationTime: '接收用时', + disposeDurationTime: 'disposeDurationTime', + disposeUserId: '处理人ID', + disposeUserName: 'disposeUserName', + disposeDesc: '处理方式', + disposeTime: '处理时间', + totalDurationTime: '持续时间,单位秒', + sourceType: '来源,1 移动端,2 安灯盒按钮, 3 异常事件', + state: '状态,1 已上报,2 已接收,3 已处理, 9 已撤销', + eventAnalysis: '原因分析', + createdUserId: '创建人', + createdTime: '创建时间', + modifyiedUserId: '最后更新人', + modifyiedTime: '最后更新时间', + datetimeStamp: '时间戳', + oeeDetailId: 'oee明细ID', + workCenterName: 'workCenterName', + workCenterCode: 'workCenterCode', + disposeUserNames: 'disposeUserNames', + disposeUserIds: 'disposeUserIds', + totalDurationTimeSt: 'totalDurationTimeSt', + receiveDurationTimeSt: 'receiveDurationTimeSt', + disposeDurationTimeSt: 'disposeDurationTimeSt', + statusText: + '表状态,1 已上报,2 已接收,3 已处理, 9 已撤销转换状态 已申请 已响应 已关闭 已撤销', + disposeUserList: 'disposeUserList', + recordNodeList: 'recordNodeList', + showColor: 'showColor', + workCenterId: 'workCenterId', + shiftShowColor: 'shiftShowColor', + shiftStartTime: 'shiftStartTime', + shiftEndTime: 'shiftEndTime', + reportImgList: 'reportImgList', + disposeImgList: 'disposeImgList', + reportImgUrls: 'reportImgUrls', + disposeImgUrls: 'disposeImgUrls', + shiftName: 'shiftName', + completedUserId: 'completedUserId', + completedUserName: 'completedUserName', + }[field]; +} + +export function displayAndonReq(field: keyof API.AndonReq) { + return { + configId: 'configId', + configName: 'configName', + imgList: 'imgList', + reportComments: 'reportComments', + selectHandlerUserIds: '处理用户', + workCenterId: 'workCenterId', + reqUserId: 'reqUserId', + sourceType: '来源', + processDispatchId: '工序派工id', + }[field]; +} + +export function displayApiResult(field: keyof API.ApiResult) { + return { + code: '状态码', + message: '提示', + data: '数据', + success: '是否成功', + }[field]; +} + +export function displayApiResultAndonRecordVO( + field: keyof API.ApiResultAndonRecordVO +) { + return { + code: '状态码', + message: '提示', + data: '

安灯_记录

', + success: '是否成功', + }[field]; +} + +export function displayApiResultMyPageAndonRecordVO( + field: keyof API.ApiResultMyPageAndonRecordVO +) { + return { + code: '状态码', + message: '提示', + data: '数据', + success: '是否成功', + }[field]; +} + +export function displayApiResultString(field: keyof API.ApiResultString) { + return { + code: '状态码', + message: '提示', + data: '数据', + success: '是否成功', + }[field]; +} + +export function displayHookApiParams(field: keyof API.HookApiParams) { + return { + selectDeptId: 'selectDeptId', + }[field]; +} + +export function displayHookApiParams2(field: keyof API.HookApiParams2) { + return { + id: 'ID', + factoryId: '工厂ID', + deptId: 'deptId', + workshopId: '车间ID', + lineId: '产线ID', + categoryId: '分类ID', + signalId: '灯ID', + lightSn: 'lightSn', + machineCode: '设备编号', + machineName: '设备名称', + pinyin: '拼音码', + wubi: '五笔码', + imgUrlStrs: '医院图片', + manageUserId: '管理员ID', + trademark: '品牌', + model: '型号', + serialNo: '序列号', + supplier: '供应商', + activationDate: '启用日期', + checkDate: '验收日期', + productionDate: '出厂日期', + pulseInterval: '脉冲间隔', + standardUseRate: '标准利用率', + location: '放置地点', + state: '状态,1启用,2 停用', + remark: '备注', + deleteFlag: '删除标记', + createdUserId: '创建人', + createdTime: '创建时间', + modifyiedUserId: '最后更新人', + modifyiedTime: '最后更新时间', + datetimeStamp: '时间戳', + searchKey: 'searchKey', + oeeState: '0 关机,1 运行,2 等待,3 异常', + oeeTime: 'oeeTime', + stateRecordId: 'stateRecordId', + stateStartTime: 'stateStartTime', + }[field]; +} + +export function displayJSONObject(field: keyof API.JSONObject) { + return { + key: 'key', + }[field]; +} + +export function displayMyPageAndonRecordVO( + field: keyof API.MyPageAndonRecordVO +) { + return { + records: 'records', + total: 'total', + size: 'size', + current: 'current', + orders: 'orders', + optimizeCountSql: 'optimizeCountSql', + searchCount: 'searchCount', + optimizeJoinOfCountSql: 'optimizeJoinOfCountSql', + maxLimit: 'maxLimit', + countId: 'countId', + startTime: 'startTime', + startTimeStr: 'startTimeStr', + endTime: 'endTime', + endTimeStr: 'endTimeStr', + hasNextPage: 'hasNextPage', + }[field]; +} + +export function displayOrderItem(field: keyof API.OrderItem) { + return { + column: 'column', + asc: 'asc', + }[field]; +} + +export function displayPlatformUser(field: keyof API.PlatformUser) { + return { + id: '用户ID', + teamId: '团队id', + factoryId: '工厂id', + deptId: 'deptId', + workshopId: '所属车间id', + lineId: '所属产线d', + userName: '用户姓名', + email: '邮箱', + jobTitle: '职称', + jobNo: '用户工号', + accountNo: '用户账号', + password: '用户密码', + idNumber: '身份证号', + dateOfBirth: '出生日期', + telephone: '联系电话', + headImageUrl: '头像url', + userType: '用户类型,1 平台,2 团队,3 工厂', + adminFlag: '管理员标识,1 管理员,0 非管理员', + state: '状态(1:在用 2:停用)', + deleteFlag: '是否删除(0:否 1:是)', + passwordModifyiedTime: '修改密码时间', + createdUserId: '创建人', + createdTime: '创建时间', + modifyiedUserId: '最后更新人', + modifyiedTime: '最后更新时间', + datetimeStamp: '时间戳', + genderCode: '1男 2女 9 未知', + publicOpenId: 'publicOpenId', + currentFactoryId: 'currentFactoryId', + remark: '备注', + }[field]; +} + +export function displayReportAbnormalEventDTO( + field: keyof API.ReportAbnormalEventDTO +) { + return { + abnormalRecordId: '异常记录id', + eventId: '事件id', + processDispatchId: '工序派工id', + }[field]; +} +/* eslint-disable */ +// @ts-ignore +export * from './types'; +export * from './displayTypeLabel'; + +export * from './schema'; + +export * from './HookwebController'; +export * from './HookwebController.reactquery'; +export const $orderItem = { + type: 'object', + properties: { + column: { type: 'string', description: '' }, + asc: { type: 'boolean', description: '' }, + }, + isAllowed: true, +}; + +export const $andonRecordNode = { + type: 'object', + properties: { + id: { type: 'integer', description: '', format: 'int64' }, + andonRecordId: { type: 'integer', description: '', format: 'int64' }, + nodeDesc: { type: 'string', description: '节点描述' }, + nodeRemark: { type: 'string', description: '节点备注' }, + nodeType: { + type: 'string', + description: + '1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销', + }, + nodeTypeName: { type: 'string', description: '' }, + nodeUserId: { type: 'integer', description: '', format: 'int64' }, + nodeUserName: { type: 'string', description: '' }, + createdUserId: { type: 'integer', description: '', format: 'int64' }, + createdTime: { type: 'string', description: '' }, + modifyiedUserId: { type: 'integer', description: '', format: 'int64' }, + modifyiedTime: { type: 'string', description: '' }, + }, + isAllowed: true, +}; + +export const $platformUser = { + type: 'object', + properties: { + id: { type: 'integer', description: '用户ID', format: 'int64' }, + teamId: { type: 'integer', description: '团队id', format: 'int64' }, + factoryId: { type: 'integer', description: '工厂id', format: 'int64' }, + deptId: { type: 'integer', description: '', format: 'int64' }, + workshopId: { type: 'integer', description: '所属车间id', format: 'int64' }, + lineId: { type: 'integer', description: '所属产线d', format: 'int64' }, + userName: { type: 'string', description: '用户姓名' }, + email: { type: 'string', description: '邮箱' }, + jobTitle: { type: 'string', description: '职称' }, + jobNo: { type: 'string', description: '用户工号' }, + accountNo: { type: 'string', description: '用户账号' }, + password: { type: 'string', description: '用户密码' }, + idNumber: { type: 'string', description: '身份证号' }, + dateOfBirth: { type: 'string', description: '出生日期' }, + telephone: { type: 'string', description: '联系电话' }, + headImageUrl: { type: 'string', description: '头像url' }, + userType: { + type: 'string', + description: '用户类型,1 平台,2 团队,3 工厂', + }, + adminFlag: { + type: 'string', + description: '管理员标识,1 管理员,0 非管理员', + }, + state: { type: 'string', description: '状态(1:在用 2:停用)' }, + deleteFlag: { type: 'string', description: '是否删除(0:否 1:是)' }, + passwordModifyiedTime: { type: 'string', description: '修改密码时间' }, + createdUserId: { type: 'integer', description: '创建人', format: 'int64' }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '最后更新时间' }, + datetimeStamp: { type: 'string', description: '时间戳' }, + genderCode: { type: 'string', description: '1男 2女 9 未知' }, + publicOpenId: { type: 'string', description: '' }, + currentFactoryId: { type: 'integer', description: '', format: 'int64' }, + remark: { type: 'string', description: '备注' }, + }, + isAllowed: true, +}; + +export const $andonRecordVO = { + type: 'object', + properties: { + id: { type: 'integer', description: 'ID', format: 'int64' }, + factoryId: { type: 'integer', description: '工厂id', format: 'int64' }, + factoryName: { type: 'string', description: '' }, + deptId: { type: 'integer', description: '', format: 'int64' }, + deptName: { type: 'string', description: '' }, + workshopId: { type: 'integer', description: '车间id', format: 'int64' }, + workshopName: { type: 'string', description: '' }, + lineId: { type: 'integer', description: '产线d', format: 'int64' }, + lineName: { type: 'string', description: '' }, + machineId: { type: 'integer', description: '设备ID', format: 'int64' }, + signalId: { type: 'integer', description: '灯ID', format: 'int64' }, + calendarDetailId: { + type: 'integer', + description: '日历排班ID', + format: 'int64', + }, + calendarId: { type: 'integer', description: '', format: 'int64' }, + calendarDate: { type: 'string', description: '' }, + shiftDetailName: { type: 'string', description: '' }, + machineName: { type: 'string', description: '' }, + machineCode: { type: 'string', description: '' }, + configId: { type: 'integer', description: '事件配置ID', format: 'int64' }, + configName: { type: 'string', description: '' }, + eventName: { type: 'string', description: '' }, + reportUserId: { type: 'integer', description: '报告人ID', format: 'int64' }, + reportUserName: { type: 'string', description: '' }, + reportTime: { type: 'string', description: '开始时间' }, + reportComments: { type: 'string', description: '报告备注' }, + reportDate: { type: 'string', description: '报告日期' }, + priority: { type: 'string', description: '优先级' }, + notifyUseridStrs: { type: 'string', description: '通知人ID列表' }, + receiveUserId: { type: 'integer', description: '接收人', format: 'int64' }, + receiveUserName: { type: 'string', description: '' }, + receiveTime: { type: 'string', description: '接收时间' }, + receiveDurationTime: { + type: 'integer', + description: '接收用时', + format: 'int64', + }, + disposeDurationTime: { type: 'integer', description: '', format: 'int64' }, + disposeUserId: { + type: 'integer', + description: '处理人ID', + format: 'int64', + }, + disposeUserName: { type: 'string', description: '' }, + disposeDesc: { type: 'string', description: '处理方式' }, + disposeTime: { type: 'string', description: '处理时间' }, + totalDurationTime: { + type: 'integer', + description: '持续时间,单位秒', + format: 'int64', + }, + sourceType: { + type: 'string', + description: '来源,1 移动端,2 安灯盒按钮, 3 异常事件', + }, + state: { + type: 'string', + description: '状态,1 已上报,2 已接收,3 已处理, 9 已撤销', + }, + eventAnalysis: { type: 'string', description: '原因分析' }, + createdUserId: { type: 'integer', description: '创建人', format: 'int64' }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '最后更新时间' }, + datetimeStamp: { type: 'string', description: '时间戳' }, + oeeDetailId: { type: 'integer', description: 'oee明细ID', format: 'int64' }, + workCenterName: { type: 'string', description: '' }, + workCenterCode: { type: 'string', description: '' }, + disposeUserNames: { type: 'string', description: '' }, + disposeUserIds: { type: 'string', description: '' }, + totalDurationTimeSt: { type: 'string', description: '' }, + receiveDurationTimeSt: { type: 'string', description: '' }, + disposeDurationTimeSt: { type: 'string', description: '' }, + statusText: { + type: 'string', + description: + '表状态,1 已上报,2 已接收,3 已处理, 9 已撤销\n转换状态 已申请 已响应 已关闭 已撤销', + }, + disposeUserList: { + type: 'array', + items: { + description: '

平台_用户

', + type: 'object', + properties: { + id: { type: 'integer', description: '用户ID', format: 'int64' }, + teamId: { type: 'integer', description: '团队id', format: 'int64' }, + factoryId: { + type: 'integer', + description: '工厂id', + format: 'int64', + }, + deptId: { type: 'integer', description: '', format: 'int64' }, + workshopId: { + type: 'integer', + description: '所属车间id', + format: 'int64', + }, + lineId: { + type: 'integer', + description: '所属产线d', + format: 'int64', + }, + userName: { type: 'string', description: '用户姓名' }, + email: { type: 'string', description: '邮箱' }, + jobTitle: { type: 'string', description: '职称' }, + jobNo: { type: 'string', description: '用户工号' }, + accountNo: { type: 'string', description: '用户账号' }, + password: { type: 'string', description: '用户密码' }, + idNumber: { type: 'string', description: '身份证号' }, + dateOfBirth: { type: 'string', description: '出生日期' }, + telephone: { type: 'string', description: '联系电话' }, + headImageUrl: { type: 'string', description: '头像url' }, + userType: { + type: 'string', + description: '用户类型,1 平台,2 团队,3 工厂', + }, + adminFlag: { + type: 'string', + description: '管理员标识,1 管理员,0 非管理员', + }, + state: { type: 'string', description: '状态(1:在用 2:停用)' }, + deleteFlag: { type: 'string', description: '是否删除(0:否 1:是)' }, + passwordModifyiedTime: { + type: 'string', + description: '修改密码时间', + }, + createdUserId: { + type: 'integer', + description: '创建人', + format: 'int64', + }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '最后更新时间' }, + datetimeStamp: { type: 'string', description: '时间戳' }, + genderCode: { type: 'string', description: '1男 2女 9 未知' }, + publicOpenId: { type: 'string', description: '' }, + currentFactoryId: { + type: 'integer', + description: '', + format: 'int64', + }, + remark: { type: 'string', description: '备注' }, + }, + isAllowed: true, + 'x-id': 'PlatformUser', + }, + description: '', + }, + recordNodeList: { + type: 'array', + items: { + description: '

安灯记录-节点

', + type: 'object', + properties: { + id: { type: 'integer', description: '', format: 'int64' }, + andonRecordId: { type: 'integer', description: '', format: 'int64' }, + nodeDesc: { type: 'string', description: '节点描述' }, + nodeRemark: { type: 'string', description: '节点备注' }, + nodeType: { + type: 'string', + description: + '1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销', + }, + nodeTypeName: { type: 'string', description: '' }, + nodeUserId: { type: 'integer', description: '', format: 'int64' }, + nodeUserName: { type: 'string', description: '' }, + createdUserId: { type: 'integer', description: '', format: 'int64' }, + createdTime: { type: 'string', description: '' }, + modifyiedUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '' }, + }, + isAllowed: true, + 'x-id': 'AndonRecordNode', + }, + description: '', + }, + showColor: { type: 'string', description: '' }, + workCenterId: { type: 'integer', description: '', format: 'int64' }, + shiftShowColor: { type: 'string', description: '' }, + shiftStartTime: { type: 'string', description: '' }, + shiftEndTime: { type: 'string', description: '' }, + reportImgList: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + disposeImgList: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + reportImgUrls: { type: 'string', description: '' }, + disposeImgUrls: { type: 'string', description: '' }, + shiftName: { type: 'string', description: '' }, + completedUserId: { type: 'integer', description: '', format: 'int64' }, + completedUserName: { type: 'string', description: '' }, + }, + isAllowed: true, +}; + +export const $myPageAndonRecordVO = { + type: 'object', + properties: { + records: { + type: 'array', + items: { + description: '

安灯_记录

', + type: 'object', + properties: { + id: { type: 'integer', description: 'ID', format: 'int64' }, + factoryId: { + type: 'integer', + description: '工厂id', + format: 'int64', + }, + factoryName: { type: 'string', description: '' }, + deptId: { type: 'integer', description: '', format: 'int64' }, + deptName: { type: 'string', description: '' }, + workshopId: { + type: 'integer', + description: '车间id', + format: 'int64', + }, + workshopName: { type: 'string', description: '' }, + lineId: { type: 'integer', description: '产线d', format: 'int64' }, + lineName: { type: 'string', description: '' }, + machineId: { + type: 'integer', + description: '设备ID', + format: 'int64', + }, + signalId: { type: 'integer', description: '灯ID', format: 'int64' }, + calendarDetailId: { + type: 'integer', + description: '日历排班ID', + format: 'int64', + }, + calendarId: { type: 'integer', description: '', format: 'int64' }, + calendarDate: { type: 'string', description: '' }, + shiftDetailName: { type: 'string', description: '' }, + machineName: { type: 'string', description: '' }, + machineCode: { type: 'string', description: '' }, + configId: { + type: 'integer', + description: '事件配置ID', + format: 'int64', + }, + configName: { type: 'string', description: '' }, + eventName: { type: 'string', description: '' }, + reportUserId: { + type: 'integer', + description: '报告人ID', + format: 'int64', + }, + reportUserName: { type: 'string', description: '' }, + reportTime: { type: 'string', description: '开始时间' }, + reportComments: { type: 'string', description: '报告备注' }, + reportDate: { type: 'string', description: '报告日期' }, + priority: { type: 'string', description: '优先级' }, + notifyUseridStrs: { type: 'string', description: '通知人ID列表' }, + receiveUserId: { + type: 'integer', + description: '接收人', + format: 'int64', + }, + receiveUserName: { type: 'string', description: '' }, + receiveTime: { type: 'string', description: '接收时间' }, + receiveDurationTime: { + type: 'integer', + description: '接收用时', + format: 'int64', + }, + disposeDurationTime: { + type: 'integer', + description: '', + format: 'int64', + }, + disposeUserId: { + type: 'integer', + description: '处理人ID', + format: 'int64', + }, + disposeUserName: { type: 'string', description: '' }, + disposeDesc: { type: 'string', description: '处理方式' }, + disposeTime: { type: 'string', description: '处理时间' }, + totalDurationTime: { + type: 'integer', + description: '持续时间,单位秒', + format: 'int64', + }, + sourceType: { + type: 'string', + description: '来源,1 移动端,2 安灯盒按钮, 3 异常事件', + }, + state: { + type: 'string', + description: '状态,1 已上报,2 已接收,3 已处理, 9 已撤销', + }, + eventAnalysis: { type: 'string', description: '原因分析' }, + createdUserId: { + type: 'integer', + description: '创建人', + format: 'int64', + }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '最后更新时间' }, + datetimeStamp: { type: 'string', description: '时间戳' }, + oeeDetailId: { + type: 'integer', + description: 'oee明细ID', + format: 'int64', + }, + workCenterName: { type: 'string', description: '' }, + workCenterCode: { type: 'string', description: '' }, + disposeUserNames: { type: 'string', description: '' }, + disposeUserIds: { type: 'string', description: '' }, + totalDurationTimeSt: { type: 'string', description: '' }, + receiveDurationTimeSt: { type: 'string', description: '' }, + disposeDurationTimeSt: { type: 'string', description: '' }, + statusText: { + type: 'string', + description: + '表状态,1 已上报,2 已接收,3 已处理, 9 已撤销\n转换状态 已申请 已响应 已关闭 已撤销', + }, + disposeUserList: { + type: 'array', + items: { + description: '

平台_用户

', + type: 'object', + properties: { + id: { type: 'integer', description: '用户ID', format: 'int64' }, + teamId: { + type: 'integer', + description: '团队id', + format: 'int64', + }, + factoryId: { + type: 'integer', + description: '工厂id', + format: 'int64', + }, + deptId: { type: 'integer', description: '', format: 'int64' }, + workshopId: { + type: 'integer', + description: '所属车间id', + format: 'int64', + }, + lineId: { + type: 'integer', + description: '所属产线d', + format: 'int64', + }, + userName: { type: 'string', description: '用户姓名' }, + email: { type: 'string', description: '邮箱' }, + jobTitle: { type: 'string', description: '职称' }, + jobNo: { type: 'string', description: '用户工号' }, + accountNo: { type: 'string', description: '用户账号' }, + password: { type: 'string', description: '用户密码' }, + idNumber: { type: 'string', description: '身份证号' }, + dateOfBirth: { type: 'string', description: '出生日期' }, + telephone: { type: 'string', description: '联系电话' }, + headImageUrl: { type: 'string', description: '头像url' }, + userType: { + type: 'string', + description: '用户类型,1 平台,2 团队,3 工厂', + }, + adminFlag: { + type: 'string', + description: '管理员标识,1 管理员,0 非管理员', + }, + state: { type: 'string', description: '状态(1:在用 2:停用)' }, + deleteFlag: { + type: 'string', + description: '是否删除(0:否 1:是)', + }, + passwordModifyiedTime: { + type: 'string', + description: '修改密码时间', + }, + createdUserId: { + type: 'integer', + description: '创建人', + format: 'int64', + }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '最后更新时间' }, + datetimeStamp: { type: 'string', description: '时间戳' }, + genderCode: { type: 'string', description: '1男 2女 9 未知' }, + publicOpenId: { type: 'string', description: '' }, + currentFactoryId: { + type: 'integer', + description: '', + format: 'int64', + }, + remark: { type: 'string', description: '备注' }, + }, + isAllowed: true, + 'x-id': 'PlatformUser', + }, + description: '', + }, + recordNodeList: { + type: 'array', + items: { + description: '

安灯记录-节点

', + type: 'object', + properties: { + id: { type: 'integer', description: '', format: 'int64' }, + andonRecordId: { + type: 'integer', + description: '', + format: 'int64', + }, + nodeDesc: { type: 'string', description: '节点描述' }, + nodeRemark: { type: 'string', description: '节点备注' }, + nodeType: { + type: 'string', + description: + '1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销', + }, + nodeTypeName: { type: 'string', description: '' }, + nodeUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + nodeUserName: { type: 'string', description: '' }, + createdUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + createdTime: { type: 'string', description: '' }, + modifyiedUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '' }, + }, + isAllowed: true, + 'x-id': 'AndonRecordNode', + }, + description: '', + }, + showColor: { type: 'string', description: '' }, + workCenterId: { type: 'integer', description: '', format: 'int64' }, + shiftShowColor: { type: 'string', description: '' }, + shiftStartTime: { type: 'string', description: '' }, + shiftEndTime: { type: 'string', description: '' }, + reportImgList: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + disposeImgList: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + reportImgUrls: { type: 'string', description: '' }, + disposeImgUrls: { type: 'string', description: '' }, + shiftName: { type: 'string', description: '' }, + completedUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + completedUserName: { type: 'string', description: '' }, + }, + isAllowed: true, + 'x-id': 'AndonRecordVO', + }, + description: '', + }, + total: { type: 'integer', description: '', format: 'int64' }, + size: { type: 'integer', description: '', format: 'int64' }, + current: { type: 'integer', description: '', format: 'int64' }, + orders: { + type: 'array', + items: { + description: 'com.baomidou.mybatisplus.core.metadata.OrderItem', + type: 'object', + properties: { + column: { type: 'string', description: '' }, + asc: { type: 'boolean', description: '' }, + }, + isAllowed: true, + 'x-id': 'OrderItem', + }, + description: '', + }, + optimizeCountSql: { type: 'boolean', description: '' }, + searchCount: { type: 'boolean', description: '' }, + optimizeJoinOfCountSql: { type: 'boolean', description: '' }, + maxLimit: { type: 'integer', description: '', format: 'int64' }, + countId: { type: 'string', description: '' }, + startTime: { type: 'string', description: '' }, + startTimeStr: { type: 'string', description: '' }, + endTime: { type: 'string', description: '' }, + endTimeStr: { type: 'string', description: '' }, + hasNextPage: { type: 'boolean', description: '', default: false }, + }, + isAllowed: true, +}; + +export const $apiResult = { + type: 'object', + properties: { + code: { type: 'string', description: '状态码' }, + message: { type: 'string', description: '提示' }, + data: { description: '数据', type: 'object', properties: {} }, + success: { type: 'boolean', description: '是否成功' }, + }, + isAllowed: true, +}; + +export const $apiResultString = { + type: 'object', + properties: { + code: { type: 'string', description: '状态码' }, + message: { type: 'string', description: '提示' }, + data: { type: 'string', description: '数据' }, + success: { type: 'boolean', description: '是否成功' }, + }, + isAllowed: true, +}; + +export const $reportAbnormalEventDTO = { + type: 'object', + properties: { + abnormalRecordId: { + type: 'integer', + description: '异常记录id', + format: 'int64', + }, + eventId: { type: 'integer', description: '事件id', format: 'int64' }, + processDispatchId: { + type: 'integer', + description: '工序派工id', + format: 'int64', + }, + }, + required: ['abnormalRecordId'], + isAllowed: true, +}; + +export const $addDeviceMachine = { + type: 'object', + properties: { + lineId: { type: 'integer', description: '', format: 'int64' }, + lineName: { type: 'string', description: '' }, + machineCode: { type: 'string', description: '' }, + machineName: { type: 'string', description: '' }, + manageUserId: { type: 'integer', description: '', format: 'int64' }, + manageUserName: { type: 'string', description: '' }, + lightSn: { type: 'string', description: '' }, + signalId: { type: 'integer', description: '', format: 'int64' }, + serialNo: { type: 'string', description: '' }, + location: { type: 'string', description: '' }, + imgList: { + type: 'array', + items: { type: 'string' }, + description: '', + default: 'new ArrayList<>()', + }, + deviceMachineId: { + type: 'integer', + description: '更新才有', + format: 'int64', + }, + }, + required: ['lineId', 'machineCode', 'machineName', 'lightSn'], + isAllowed: true, +}; + +export const $apiResultAndonRecordVO = { + type: 'object', + properties: { + code: { type: 'string', description: '状态码' }, + message: { type: 'string', description: '提示' }, + data: { + description: '

安灯_记录

', + type: 'object', + properties: { + id: { type: 'integer', description: 'ID', format: 'int64' }, + factoryId: { type: 'integer', description: '工厂id', format: 'int64' }, + factoryName: { type: 'string', description: '' }, + deptId: { type: 'integer', description: '', format: 'int64' }, + deptName: { type: 'string', description: '' }, + workshopId: { type: 'integer', description: '车间id', format: 'int64' }, + workshopName: { type: 'string', description: '' }, + lineId: { type: 'integer', description: '产线d', format: 'int64' }, + lineName: { type: 'string', description: '' }, + machineId: { type: 'integer', description: '设备ID', format: 'int64' }, + signalId: { type: 'integer', description: '灯ID', format: 'int64' }, + calendarDetailId: { + type: 'integer', + description: '日历排班ID', + format: 'int64', + }, + calendarId: { type: 'integer', description: '', format: 'int64' }, + calendarDate: { type: 'string', description: '' }, + shiftDetailName: { type: 'string', description: '' }, + machineName: { type: 'string', description: '' }, + machineCode: { type: 'string', description: '' }, + configId: { + type: 'integer', + description: '事件配置ID', + format: 'int64', + }, + configName: { type: 'string', description: '' }, + eventName: { type: 'string', description: '' }, + reportUserId: { + type: 'integer', + description: '报告人ID', + format: 'int64', + }, + reportUserName: { type: 'string', description: '' }, + reportTime: { type: 'string', description: '开始时间' }, + reportComments: { type: 'string', description: '报告备注' }, + reportDate: { type: 'string', description: '报告日期' }, + priority: { type: 'string', description: '优先级' }, + notifyUseridStrs: { type: 'string', description: '通知人ID列表' }, + receiveUserId: { + type: 'integer', + description: '接收人', + format: 'int64', + }, + receiveUserName: { type: 'string', description: '' }, + receiveTime: { type: 'string', description: '接收时间' }, + receiveDurationTime: { + type: 'integer', + description: '接收用时', + format: 'int64', + }, + disposeDurationTime: { + type: 'integer', + description: '', + format: 'int64', + }, + disposeUserId: { + type: 'integer', + description: '处理人ID', + format: 'int64', + }, + disposeUserName: { type: 'string', description: '' }, + disposeDesc: { type: 'string', description: '处理方式' }, + disposeTime: { type: 'string', description: '处理时间' }, + totalDurationTime: { + type: 'integer', + description: '持续时间,单位秒', + format: 'int64', + }, + sourceType: { + type: 'string', + description: '来源,1 移动端,2 安灯盒按钮, 3 异常事件', + }, + state: { + type: 'string', + description: '状态,1 已上报,2 已接收,3 已处理, 9 已撤销', + }, + eventAnalysis: { type: 'string', description: '原因分析' }, + createdUserId: { + type: 'integer', + description: '创建人', + format: 'int64', + }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '最后更新时间' }, + datetimeStamp: { type: 'string', description: '时间戳' }, + oeeDetailId: { + type: 'integer', + description: 'oee明细ID', + format: 'int64', + }, + workCenterName: { type: 'string', description: '' }, + workCenterCode: { type: 'string', description: '' }, + disposeUserNames: { type: 'string', description: '' }, + disposeUserIds: { type: 'string', description: '' }, + totalDurationTimeSt: { type: 'string', description: '' }, + receiveDurationTimeSt: { type: 'string', description: '' }, + disposeDurationTimeSt: { type: 'string', description: '' }, + statusText: { + type: 'string', + description: + '表状态,1 已上报,2 已接收,3 已处理, 9 已撤销\n转换状态 已申请 已响应 已关闭 已撤销', + }, + disposeUserList: { + type: 'array', + items: { + description: '

平台_用户

', + type: 'object', + properties: { + id: { type: 'integer', description: '用户ID', format: 'int64' }, + teamId: { + type: 'integer', + description: '团队id', + format: 'int64', + }, + factoryId: { + type: 'integer', + description: '工厂id', + format: 'int64', + }, + deptId: { type: 'integer', description: '', format: 'int64' }, + workshopId: { + type: 'integer', + description: '所属车间id', + format: 'int64', + }, + lineId: { + type: 'integer', + description: '所属产线d', + format: 'int64', + }, + userName: { type: 'string', description: '用户姓名' }, + email: { type: 'string', description: '邮箱' }, + jobTitle: { type: 'string', description: '职称' }, + jobNo: { type: 'string', description: '用户工号' }, + accountNo: { type: 'string', description: '用户账号' }, + password: { type: 'string', description: '用户密码' }, + idNumber: { type: 'string', description: '身份证号' }, + dateOfBirth: { type: 'string', description: '出生日期' }, + telephone: { type: 'string', description: '联系电话' }, + headImageUrl: { type: 'string', description: '头像url' }, + userType: { + type: 'string', + description: '用户类型,1 平台,2 团队,3 工厂', + }, + adminFlag: { + type: 'string', + description: '管理员标识,1 管理员,0 非管理员', + }, + state: { type: 'string', description: '状态(1:在用 2:停用)' }, + deleteFlag: { + type: 'string', + description: '是否删除(0:否 1:是)', + }, + passwordModifyiedTime: { + type: 'string', + description: '修改密码时间', + }, + createdUserId: { + type: 'integer', + description: '创建人', + format: 'int64', + }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '最后更新时间' }, + datetimeStamp: { type: 'string', description: '时间戳' }, + genderCode: { type: 'string', description: '1男 2女 9 未知' }, + publicOpenId: { type: 'string', description: '' }, + currentFactoryId: { + type: 'integer', + description: '', + format: 'int64', + }, + remark: { type: 'string', description: '备注' }, + }, + isAllowed: true, + 'x-id': 'PlatformUser', + }, + description: '', + }, + recordNodeList: { + type: 'array', + items: { + description: '

安灯记录-节点

', + type: 'object', + properties: { + id: { type: 'integer', description: '', format: 'int64' }, + andonRecordId: { + type: 'integer', + description: '', + format: 'int64', + }, + nodeDesc: { type: 'string', description: '节点描述' }, + nodeRemark: { type: 'string', description: '节点备注' }, + nodeType: { + type: 'string', + description: + '1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销', + }, + nodeTypeName: { type: 'string', description: '' }, + nodeUserId: { type: 'integer', description: '', format: 'int64' }, + nodeUserName: { type: 'string', description: '' }, + createdUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + createdTime: { type: 'string', description: '' }, + modifyiedUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '' }, + }, + isAllowed: true, + 'x-id': 'AndonRecordNode', + }, + description: '', + }, + showColor: { type: 'string', description: '' }, + workCenterId: { type: 'integer', description: '', format: 'int64' }, + shiftShowColor: { type: 'string', description: '' }, + shiftStartTime: { type: 'string', description: '' }, + shiftEndTime: { type: 'string', description: '' }, + reportImgList: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + disposeImgList: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + reportImgUrls: { type: 'string', description: '' }, + disposeImgUrls: { type: 'string', description: '' }, + shiftName: { type: 'string', description: '' }, + completedUserId: { type: 'integer', description: '', format: 'int64' }, + completedUserName: { type: 'string', description: '' }, + }, + isAllowed: true, + 'x-id': 'AndonRecordVO', + }, + success: { type: 'boolean', description: '是否成功' }, + }, + isAllowed: true, +}; + +export const $andonClose = { + type: 'object', + properties: { + andonRecordId: { type: 'integer', description: '', format: 'int64' }, + disposeDesc: { type: 'string', description: '' }, + disposeImgUrls: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + }, + required: ['andonRecordId'], + isAllowed: true, +}; + +export const $apiResultMyPageAndonRecordVO = { + type: 'object', + properties: { + code: { type: 'string', description: '状态码' }, + message: { type: 'string', description: '提示' }, + data: { + description: '数据', + type: 'object', + properties: { + records: { + type: 'array', + items: { + description: '

安灯_记录

', + type: 'object', + properties: { + id: { type: 'integer', description: 'ID', format: 'int64' }, + factoryId: { + type: 'integer', + description: '工厂id', + format: 'int64', + }, + factoryName: { type: 'string', description: '' }, + deptId: { type: 'integer', description: '', format: 'int64' }, + deptName: { type: 'string', description: '' }, + workshopId: { + type: 'integer', + description: '车间id', + format: 'int64', + }, + workshopName: { type: 'string', description: '' }, + lineId: { + type: 'integer', + description: '产线d', + format: 'int64', + }, + lineName: { type: 'string', description: '' }, + machineId: { + type: 'integer', + description: '设备ID', + format: 'int64', + }, + signalId: { + type: 'integer', + description: '灯ID', + format: 'int64', + }, + calendarDetailId: { + type: 'integer', + description: '日历排班ID', + format: 'int64', + }, + calendarId: { type: 'integer', description: '', format: 'int64' }, + calendarDate: { type: 'string', description: '' }, + shiftDetailName: { type: 'string', description: '' }, + machineName: { type: 'string', description: '' }, + machineCode: { type: 'string', description: '' }, + configId: { + type: 'integer', + description: '事件配置ID', + format: 'int64', + }, + configName: { type: 'string', description: '' }, + eventName: { type: 'string', description: '' }, + reportUserId: { + type: 'integer', + description: '报告人ID', + format: 'int64', + }, + reportUserName: { type: 'string', description: '' }, + reportTime: { type: 'string', description: '开始时间' }, + reportComments: { type: 'string', description: '报告备注' }, + reportDate: { type: 'string', description: '报告日期' }, + priority: { type: 'string', description: '优先级' }, + notifyUseridStrs: { type: 'string', description: '通知人ID列表' }, + receiveUserId: { + type: 'integer', + description: '接收人', + format: 'int64', + }, + receiveUserName: { type: 'string', description: '' }, + receiveTime: { type: 'string', description: '接收时间' }, + receiveDurationTime: { + type: 'integer', + description: '接收用时', + format: 'int64', + }, + disposeDurationTime: { + type: 'integer', + description: '', + format: 'int64', + }, + disposeUserId: { + type: 'integer', + description: '处理人ID', + format: 'int64', + }, + disposeUserName: { type: 'string', description: '' }, + disposeDesc: { type: 'string', description: '处理方式' }, + disposeTime: { type: 'string', description: '处理时间' }, + totalDurationTime: { + type: 'integer', + description: '持续时间,单位秒', + format: 'int64', + }, + sourceType: { + type: 'string', + description: '来源,1 移动端,2 安灯盒按钮, 3 异常事件', + }, + state: { + type: 'string', + description: '状态,1 已上报,2 已接收,3 已处理, 9 已撤销', + }, + eventAnalysis: { type: 'string', description: '原因分析' }, + createdUserId: { + type: 'integer', + description: '创建人', + format: 'int64', + }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '最后更新时间' }, + datetimeStamp: { type: 'string', description: '时间戳' }, + oeeDetailId: { + type: 'integer', + description: 'oee明细ID', + format: 'int64', + }, + workCenterName: { type: 'string', description: '' }, + workCenterCode: { type: 'string', description: '' }, + disposeUserNames: { type: 'string', description: '' }, + disposeUserIds: { type: 'string', description: '' }, + totalDurationTimeSt: { type: 'string', description: '' }, + receiveDurationTimeSt: { type: 'string', description: '' }, + disposeDurationTimeSt: { type: 'string', description: '' }, + statusText: { + type: 'string', + description: + '表状态,1 已上报,2 已接收,3 已处理, 9 已撤销\n转换状态 已申请 已响应 已关闭 已撤销', + }, + disposeUserList: { + type: 'array', + items: { + description: '

平台_用户

', + type: 'object', + properties: { + id: { + type: 'integer', + description: '用户ID', + format: 'int64', + }, + teamId: { + type: 'integer', + description: '团队id', + format: 'int64', + }, + factoryId: { + type: 'integer', + description: '工厂id', + format: 'int64', + }, + deptId: { + type: 'integer', + description: '', + format: 'int64', + }, + workshopId: { + type: 'integer', + description: '所属车间id', + format: 'int64', + }, + lineId: { + type: 'integer', + description: '所属产线d', + format: 'int64', + }, + userName: { type: 'string', description: '用户姓名' }, + email: { type: 'string', description: '邮箱' }, + jobTitle: { type: 'string', description: '职称' }, + jobNo: { type: 'string', description: '用户工号' }, + accountNo: { type: 'string', description: '用户账号' }, + password: { type: 'string', description: '用户密码' }, + idNumber: { type: 'string', description: '身份证号' }, + dateOfBirth: { type: 'string', description: '出生日期' }, + telephone: { type: 'string', description: '联系电话' }, + headImageUrl: { type: 'string', description: '头像url' }, + userType: { + type: 'string', + description: '用户类型,1 平台,2 团队,3 工厂', + }, + adminFlag: { + type: 'string', + description: '管理员标识,1 管理员,0 非管理员', + }, + state: { + type: 'string', + description: '状态(1:在用 2:停用)', + }, + deleteFlag: { + type: 'string', + description: '是否删除(0:否 1:是)', + }, + passwordModifyiedTime: { + type: 'string', + description: '修改密码时间', + }, + createdUserId: { + type: 'integer', + description: '创建人', + format: 'int64', + }, + createdTime: { type: 'string', description: '创建时间' }, + modifyiedUserId: { + type: 'integer', + description: '最后更新人', + format: 'int64', + }, + modifyiedTime: { + type: 'string', + description: '最后更新时间', + }, + datetimeStamp: { type: 'string', description: '时间戳' }, + genderCode: { + type: 'string', + description: '1男 2女 9 未知', + }, + publicOpenId: { type: 'string', description: '' }, + currentFactoryId: { + type: 'integer', + description: '', + format: 'int64', + }, + remark: { type: 'string', description: '备注' }, + }, + isAllowed: true, + 'x-id': 'PlatformUser', + }, + description: '', + }, + recordNodeList: { + type: 'array', + items: { + description: '

安灯记录-节点

', + type: 'object', + properties: { + id: { type: 'integer', description: '', format: 'int64' }, + andonRecordId: { + type: 'integer', + description: '', + format: 'int64', + }, + nodeDesc: { type: 'string', description: '节点描述' }, + nodeRemark: { type: 'string', description: '节点备注' }, + nodeType: { + type: 'string', + description: + '1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销', + }, + nodeTypeName: { type: 'string', description: '' }, + nodeUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + nodeUserName: { type: 'string', description: '' }, + createdUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + createdTime: { type: 'string', description: '' }, + modifyiedUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + modifyiedTime: { type: 'string', description: '' }, + }, + isAllowed: true, + 'x-id': 'AndonRecordNode', + }, + description: '', + }, + showColor: { type: 'string', description: '' }, + workCenterId: { + type: 'integer', + description: '', + format: 'int64', + }, + shiftShowColor: { type: 'string', description: '' }, + shiftStartTime: { type: 'string', description: '' }, + shiftEndTime: { type: 'string', description: '' }, + reportImgList: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + disposeImgList: { + type: 'array', + items: { type: 'string' }, + description: '', + }, + reportImgUrls: { type: 'string', description: '' }, + disposeImgUrls: { type: 'string', description: '' }, + shiftName: { type: 'string', description: '' }, + completedUserId: { + type: 'integer', + description: '', + format: 'int64', + }, + completedUserName: { type: 'string', description: '' }, + }, + isAllowed: true, + 'x-id': 'AndonRecordVO', + }, + description: '', + }, + total: { type: 'integer', description: '', format: 'int64' }, + size: { type: 'integer', description: '', format: 'int64' }, + current: { type: 'integer', description: '', format: 'int64' }, + orders: { + type: 'array', + items: { + description: 'com.baomidou.mybatisplus.core.metadata.OrderItem', + type: 'object', + properties: { + column: { type: 'string', description: '' }, + asc: { type: 'boolean', description: '' }, + }, + isAllowed: true, + 'x-id': 'OrderItem', + }, + description: '', + }, + optimizeCountSql: { type: 'boolean', description: '' }, + searchCount: { type: 'boolean', description: '' }, + optimizeJoinOfCountSql: { type: 'boolean', description: '' }, + maxLimit: { type: 'integer', description: '', format: 'int64' }, + countId: { type: 'string', description: '' }, + startTime: { type: 'string', description: '' }, + startTimeStr: { type: 'string', description: '' }, + endTime: { type: 'string', description: '' }, + endTimeStr: { type: 'string', description: '' }, + hasNextPage: { type: 'boolean', description: '', default: false }, + }, + isAllowed: true, + 'x-id': 'MyPageAndonRecordVO', + }, + success: { type: 'boolean', description: '是否成功' }, + }, + isAllowed: true, +}; + +export const $andonRecordQuery = { + type: 'object', + properties: { + queryDeptId: { type: 'integer', description: '', format: 'int64' }, + myRelatedFlag: { + type: 'string', + description: '与我有关, 处理人或者报告人是我或者接收人是我', + default: '0', + }, + queryDisposeStatus: { + type: 'string', + description: '处理状态 1 查询未处理的 2 查询已处理的', + }, + queryTimeType: { + type: 'string', + description: '1 60天内 2 今天 3 本月 5 日期范围查询 默认1', + default: '1', + }, + factoryId: { type: 'integer', description: '', format: 'int64' }, + startTime: { type: 'string', description: '' }, + endTime: { type: 'string', description: '' }, + size: { type: 'integer', description: '', format: 'int64', default: 30 }, + current: { type: 'integer', description: '', format: 'int64', default: 1 }, + }, + isAllowed: true, +}; + +export const $andonReq = { + type: 'object', + properties: { + configId: { type: 'integer', description: '', format: 'int64' }, + configName: { type: 'string', description: '' }, + imgList: { type: 'array', items: { type: 'string' }, description: '' }, + reportComments: { type: 'string', description: '' }, + selectHandlerUserIds: { + type: 'array', + items: { type: 'integer' }, + description: '处理用户', + }, + workCenterId: { type: 'integer', description: '', format: 'int64' }, + reqUserId: { type: 'integer', description: '', format: 'int64' }, + sourceType: { type: 'string', description: '来源' }, + processDispatchId: { + type: 'integer', + description: '工序派工id', + format: 'int64', + }, + }, + required: ['configId', 'configName', 'selectHandlerUserIds', 'workCenterId'], + isAllowed: true, +}; + +export const $jSONObject = { + type: 'object', + properties: { key: { type: 'object', properties: {} } }, + isAllowed: true, +}; +/* eslint-disable */ +// @ts-ignore + +export type MultiAddDeviceMachine = { + lineId: number; + lineName?: string; + machineCode: string; + machineName: string; + manageUserId?: number; + manageUserName?: string; + lightSn: string; + signalId?: number; + serialNo?: string; + location?: string; + imgList?: string[]; + /** 更新才有 */ + deviceMachineId?: number; +}; + +export type MultiAndonClose = { + andonRecordId: number; + disposeDesc?: string; + disposeImgUrls?: string[]; +}; + +export type MultiAndonRecordNode = { + id?: number; + andonRecordId?: number; + /** 节点描述 */ + nodeDesc?: string; + /** 节点备注 */ + nodeRemark?: string; + /** 1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销 */ + nodeType?: string; + nodeTypeName?: string; + nodeUserId?: number; + nodeUserName?: string; + createdUserId?: number; + createdTime?: string; + modifyiedUserId?: number; + modifyiedTime?: string; +}; + +export type MultiAndonRecordQuery = { + queryDeptId?: number; + /** 与我有关, 处理人或者报告人是我或者接收人是我 */ + myRelatedFlag?: string; + /** 处理状态 1 查询未处理的 2 查询已处理的 */ + queryDisposeStatus?: string; + /** 1 60天内 2 今天 3 本月 5 日期范围查询 默认1 */ + queryTimeType?: string; + factoryId?: number; + startTime?: string; + endTime?: string; + size?: number; + current?: number; +}; + +export type MultiAndonRecordVO = { + /** ID */ + id?: number; + /** 工厂id */ + factoryId?: number; + factoryName?: string; + deptId?: number; + deptName?: string; + /** 车间id */ + workshopId?: number; + workshopName?: string; + /** 产线d */ + lineId?: number; + lineName?: string; + /** 设备ID */ + machineId?: number; + /** 灯ID */ + signalId?: number; + /** 日历排班ID */ + calendarDetailId?: number; + calendarId?: number; + calendarDate?: string; + shiftDetailName?: string; + machineName?: string; + machineCode?: string; + /** 事件配置ID */ + configId?: number; + configName?: string; + eventName?: string; + /** 报告人ID */ + reportUserId?: number; + reportUserName?: string; + /** 开始时间 */ + reportTime?: string; + /** 报告备注 */ + reportComments?: string; + /** 报告日期 */ + reportDate?: string; + /** 优先级 */ + priority?: string; + /** 通知人ID列表 */ + notifyUseridStrs?: string; + /** 接收人 */ + receiveUserId?: number; + receiveUserName?: string; + /** 接收时间 */ + receiveTime?: string; + /** 接收用时 */ + receiveDurationTime?: number; + disposeDurationTime?: number; + /** 处理人ID */ + disposeUserId?: number; + disposeUserName?: string; + /** 处理方式 */ + disposeDesc?: string; + /** 处理时间 */ + disposeTime?: string; + /** 持续时间,单位秒 */ + totalDurationTime?: number; + /** 来源,1 移动端,2 安灯盒按钮, 3 异常事件 */ + sourceType?: string; + /** 状态,1 已上报,2 已接收,3 已处理, 9 已撤销 */ + state?: string; + /** 原因分析 */ + eventAnalysis?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + /** oee明细ID */ + oeeDetailId?: number; + workCenterName?: string; + workCenterCode?: string; + disposeUserNames?: string; + disposeUserIds?: string; + totalDurationTimeSt?: string; + receiveDurationTimeSt?: string; + disposeDurationTimeSt?: string; + /** 表状态,1 已上报,2 已接收,3 已处理, 9 已撤销转换状态 已申请 已响应 已关闭 已撤销 */ + statusText?: string; + disposeUserList?: PlatformUser[]; + recordNodeList?: AndonRecordNode[]; + showColor?: string; + workCenterId?: number; + shiftShowColor?: string; + shiftStartTime?: string; + shiftEndTime?: string; + reportImgList?: string[]; + disposeImgList?: string[]; + reportImgUrls?: string; + disposeImgUrls?: string; + shiftName?: string; + completedUserId?: number; + completedUserName?: string; +}; + +export type MultiAndonReq = { + configId: number; + configName: string; + imgList?: string[]; + reportComments?: string; + /** 处理用户 */ + selectHandlerUserIds: number[]; + workCenterId: number; + reqUserId?: number; + /** 来源 */ + sourceType?: string; + /** 工序派工id */ + processDispatchId?: number; +}; + +export type MultiApiResult = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: Record; + /** 是否成功 */ + success?: boolean; +}; + +export type MultiApiResultAndonRecordVO = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /**

安灯_记录

*/ + data?: AndonRecordVO; + /** 是否成功 */ + success?: boolean; +}; + +export type MultiApiResultMyPageAndonRecordVO = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: MyPageAndonRecordVO; + /** 是否成功 */ + success?: boolean; +}; + +export type MultiApiResultString = { + /** 状态码 */ + code?: string; + /** 提示 */ + message?: string; + /** 数据 */ + data?: string; + /** 是否成功 */ + success?: boolean; +}; + +export type MultiHookApi_10Responses = { + 200: ApiResult; +}; + +export type MultiHookApi_11Responses = { + 200: ApiResult; +}; + +export type MultiHookApi_12Responses = { + 200: ApiResultAndonRecordVO; +}; + +export type MultiHookApi_13Responses = { + 200: ApiResult; +}; + +export type MultiHookApi_14Body = string; + +export type MultiHookApi_14Responses = { + 200: ApiResult; +}; + +export type MultiHookApi_15Responses = { + 200: ApiResult; +}; + +export type MultiHookApi_16Responses = { + 200: ApiResult; +}; + +export type MultiHookApi_17Responses = { + 200: ApiResult; +}; + +export type MultiHookApi_18Responses = { + 200: ApiResult; +}; + +export type MultiHookApi_19Responses = { + 200: ApiResult; +}; + +export type MultiHookApi_20Responses = { + 200: ApiResult; +}; + +export type MultiHookApi_21Responses = { + 200: ApiResult; +}; + +export type MultiHookApi_22Responses = { + 200: ApiResult; +}; + +export type MultiHookApi_23Responses = { + 200: ApiResultString; +}; + +export type MultiHookApi_2Responses = { + 200: ApiResult; +}; + +export type MultiHookApi_3Responses = { + 200: ApiResult; +}; + +export type MultiHookApi_4Responses = { + 200: ApiResult; +}; + +export type MultiHookApi_5Responses = { + 200: ApiResult; +}; + +export type MultiHookApi_6Responses = { + 200: ApiResultMyPageAndonRecordVO; +}; + +export type MultiHookApi_7Responses = { + 200: ApiResult; +}; + +export type MultiHookApi_8Responses = { + 200: ApiResult; +}; + +export type MultiHookApi_9Responses = { + 200: ApiResult; +}; + +export type MultiHookApiParams = { + selectDeptId?: number; +}; + +export type MultiHookApiParams2 = { + /** ID */ + id?: number; + /** 工厂ID */ + factoryId?: number; + deptId?: number; + /** 车间ID */ + workshopId?: number; + /** 产线ID */ + lineId?: number; + /** 分类ID */ + categoryId?: number; + /** 灯ID */ + signalId?: number; + lightSn?: string; + /** 设备编号 */ + machineCode?: string; + /** 设备名称 */ + machineName?: string; + /** 拼音码 */ + pinyin?: string; + /** 五笔码 */ + wubi?: string; + /** 医院图片 */ + imgUrlStrs?: string; + /** 管理员ID */ + manageUserId?: number; + /** 品牌 */ + trademark?: string; + /** 型号 */ + model?: string; + /** 序列号 */ + serialNo?: string; + /** 供应商 */ + supplier?: string; + /** 启用日期 */ + activationDate?: string; + /** 验收日期 */ + checkDate?: string; + /** 出厂日期 */ + productionDate?: string; + /** 脉冲间隔 */ + pulseInterval?: number; + /** 标准利用率 */ + standardUseRate?: string; + /** 放置地点 */ + location?: string; + /** 状态,1启用,2 停用 */ + state?: string; + /** 备注 */ + remark?: string; + /** 删除标记 */ + deleteFlag?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + searchKey?: string; + /** 0 关机,1 运行,2 等待,3 异常 */ + oeeState?: string; + oeeTime?: string; + stateRecordId?: number; + stateStartTime?: string; +}; + +export type MultiHookApiResponses = { + 200: ApiResult; +}; + +export type MultiJSONObject = { + key?: Record; +}; + +export type MultiMyPageAndonRecordVO = { + records?: AndonRecordVO[]; + total?: number; + size?: number; + current?: number; + orders?: OrderItem[]; + optimizeCountSql?: boolean; + searchCount?: boolean; + optimizeJoinOfCountSql?: boolean; + maxLimit?: number; + countId?: string; + startTime?: string; + startTimeStr?: string; + endTime?: string; + endTimeStr?: string; + hasNextPage?: boolean; +}; + +export type MultiOrderItem = { + column?: string; + asc?: boolean; +}; + +export type MultiPlatformUser = { + /** 用户ID */ + id?: number; + /** 团队id */ + teamId?: number; + /** 工厂id */ + factoryId?: number; + deptId?: number; + /** 所属车间id */ + workshopId?: number; + /** 所属产线d */ + lineId?: number; + /** 用户姓名 */ + userName?: string; + /** 邮箱 */ + email?: string; + /** 职称 */ + jobTitle?: string; + /** 用户工号 */ + jobNo?: string; + /** 用户账号 */ + accountNo?: string; + /** 用户密码 */ + password?: string; + /** 身份证号 */ + idNumber?: string; + /** 出生日期 */ + dateOfBirth?: string; + /** 联系电话 */ + telephone?: string; + /** 头像url */ + headImageUrl?: string; + /** 用户类型,1 平台,2 团队,3 工厂 */ + userType?: string; + /** 管理员标识,1 管理员,0 非管理员 */ + adminFlag?: string; + /** 状态(1:在用 2:停用) */ + state?: string; + /** 是否删除(0:否 1:是) */ + deleteFlag?: string; + /** 修改密码时间 */ + passwordModifyiedTime?: string; + /** 创建人 */ + createdUserId?: number; + /** 创建时间 */ + createdTime?: string; + /** 最后更新人 */ + modifyiedUserId?: number; + /** 最后更新时间 */ + modifyiedTime?: string; + /** 时间戳 */ + datetimeStamp?: string; + /** 1男 2女 9 未知 */ + genderCode?: string; + publicOpenId?: string; + currentFactoryId?: number; + /** 备注 */ + remark?: string; +}; + +export type MultiReportAbnormalEventDTO = { + /** 异常记录id */ + abnormalRecordId: number; + /** 事件id */ + eventId?: number; + /** 工序派工id */ + processDispatchId?: number; +}; diff --git a/test/customRenderTemplateData.spec.ts b/test/customRenderTemplateData.spec.ts new file mode 100644 index 0000000..1e87a90 --- /dev/null +++ b/test/customRenderTemplateData.spec.ts @@ -0,0 +1,358 @@ +import { join } from 'path'; +import { describe, expect, it, vi } from 'vitest'; + +import { TypescriptFileType } from '../src/generator/config'; +import * as openAPI from '../src/index'; +import { getSnapshotDir, readGeneratedFiles } from './testUtils'; + +vi.setConfig({ + testTimeout: 15_000, +}); + +describe('customRenderTemplateData hook 测试', () => { + it('测试 ServiceController hook - 过滤和修改 API 列表', async (ctx) => { + await openAPI.generateService({ + schemaPath: join( + import.meta.dirname, + './example-files/openapi-custom-gen-file-list-hook.json' + ), + serversPath: './apis/test-service-controller-hook', + hook: { + customRenderTemplateData: { + [TypescriptFileType.serviceController]: (list, context) => { + // 过滤掉路径包含 deprecated 的 API + const filteredList = list.filter( + (api) => !api.path.includes('deprecated') + ); + + // 为剩余的 API 添加自定义属性并修改描述 + return filteredList.map((api) => ({ + ...api, + description: `[Hook处理] ${api.description || ''}`, + customProperty: 'added by hook', + })); + }, + }, + }, + }); + + await expect( + readGeneratedFiles('./apis/test-service-controller-hook') + ).resolves.toMatchFileSnapshot(getSnapshotDir(ctx)); + }); + + it('测试 Interface hook - 修改类型名称和属性', async (ctx) => { + await openAPI.generateService({ + schemaPath: join( + import.meta.dirname, + './example-files/openapi-custom-gen-file-list-hook.json' + ), + serversPath: './apis/test-interface-hook', + hook: { + customRenderTemplateData: { + [TypescriptFileType.interface]: (list, context) => { + return list.map((item) => ({ + ...item, + // 为所有类型添加 Custom 前缀 + typeName: `Custom${item.typeName}`, + // 如果有描述,添加前缀 + description: item.description + ? `[Hook处理] ${item.description}` + : item.description, + })); + }, + }, + }, + }); + + await expect( + readGeneratedFiles('./apis/test-interface-hook') + ).resolves.toMatchFileSnapshot(getSnapshotDir(ctx)); + }); + + it('测试 Interface hook - 修改JSONObject', async (ctx) => { + await openAPI.generateService({ + schemaPath: join( + import.meta.dirname, + './example-files/openapi-custom-gen-file-list-hook.json' + ), + serversPath: './apis/test-interface-json-object-hook', + hook: { + customRenderTemplateData: { + [TypescriptFileType.interface]: (list, context) => { + return list.map((item) => { + if (item.typeName === 'JSONObject') { + return { + typeName: 'JSONObject', + type: 'Record', + props: [], + isEnum: false, + }; + } + return item; + }); + }, + }, + }, + }); + + await expect( + readGeneratedFiles('./apis/test-interface-json-object-hook') + ).resolves.toMatchFileSnapshot(getSnapshotDir(ctx)); + }); + + it('测试 DisplayEnumLabel hook - 过滤枚举类型', async (ctx) => { + await openAPI.generateService({ + schemaPath: join( + import.meta.dirname, + './example-files/openapi-custom-gen-file-list-hook.json' + ), + serversPath: './apis/test-enum-label-hook', + isDisplayTypeLabel: true, + hook: { + customRenderTemplateData: { + [TypescriptFileType.displayEnumLabel]: (list, context) => { + // 只保留包含 Status 的枚举类型 + return list.filter( + (item) => + item.isEnum && item.typeName.toLowerCase().includes('status') + ); + }, + }, + }, + }); + + await expect( + readGeneratedFiles('./apis/test-enum-label-hook') + ).resolves.toMatchFileSnapshot(getSnapshotDir(ctx)); + }); + + it('测试 DisplayTypeLabel hook - 修改类型标签', async (ctx) => { + await openAPI.generateService({ + schemaPath: join( + import.meta.dirname, + './example-files/openapi-custom-gen-file-list-hook.json' + ), + serversPath: './apis/test-type-label-hook', + isDisplayTypeLabel: true, + hook: { + customRenderTemplateData: { + [TypescriptFileType.displayTypeLabel]: (list, context) => { + // 只保留非枚举类型,并添加前缀 + return list + .filter((item) => !item.isEnum) + .map((item) => ({ + ...item, + typeName: `Label${item.typeName}`, + })); + }, + }, + }, + }); + + await expect( + readGeneratedFiles('./apis/test-type-label-hook') + ).resolves.toMatchFileSnapshot(getSnapshotDir(ctx)); + }); + + it('测试 Schema hook - 修改 JSON Schema 类型名', async (ctx) => { + await openAPI.generateService({ + schemaPath: join( + import.meta.dirname, + './example-files/openapi-custom-gen-file-list-hook.json' + ), + serversPath: './apis/test-schema-hook', + isGenJsonSchemas: true, + hook: { + customRenderTemplateData: { + [TypescriptFileType.schema]: (list, context) => { + return list.map((item) => ({ + ...item, + // 为 schema 类型名添加自定义前缀 + typeName: item.typeName.replace('$', '$custom'), + })); + }, + }, + }, + }); + + await expect( + readGeneratedFiles('./apis/test-schema-hook') + ).resolves.toMatchFileSnapshot(getSnapshotDir(ctx)); + }); + + it('测试 ServiceIndex hook - 排序控制器列表', async (ctx) => { + await openAPI.generateService({ + schemaPath: join( + import.meta.dirname, + './example-files/openapi-custom-gen-file-list-hook.json' + ), + serversPath: './apis/test-service-index-hook', + hook: { + customRenderTemplateData: { + [TypescriptFileType.serviceIndex]: (list, context) => { + // 按文件名倒序排列 + return [...list].sort((a, b) => + b.fileName.localeCompare(a.fileName) + ); + }, + }, + }, + }); + + await expect( + readGeneratedFiles('./apis/test-service-index-hook') + ).resolves.toMatchFileSnapshot(getSnapshotDir(ctx)); + }); + + it('测试 ReactQuery hook - 过滤 GET 方法', async (ctx) => { + await openAPI.generateService({ + schemaPath: join( + import.meta.dirname, + './example-files/openapi-custom-gen-file-list-hook.json' + ), + serversPath: './apis/test-react-query-hook', + isGenReactQuery: true, + hook: { + customRenderTemplateData: { + [TypescriptFileType.reactQuery]: (list, context) => { + // 只为 GET 方法生成 React Query hooks + return list.filter((api) => api.method.toLowerCase() === 'get'); + }, + }, + }, + }); + + await expect( + readGeneratedFiles('./apis/test-react-query-hook') + ).resolves.toMatchFileSnapshot(getSnapshotDir(ctx)); + }); + + it('测试多个 hook 同时使用', async (ctx) => { + await openAPI.generateService({ + schemaPath: join( + import.meta.dirname, + './example-files/openapi-custom-gen-file-list-hook.json' + ), + serversPath: './apis/test-multiple-hooks', + isDisplayTypeLabel: true, + isGenJsonSchemas: true, + isGenReactQuery: true, + hook: { + // 现有 hook 保持兼容 + customFunctionName: (data) => `hook${data.operationId || 'Api'}`, + customClassName: (tagName) => `Hook${tagName}Controller`, + + // 新的文件模板 list hook + customRenderTemplateData: { + [TypescriptFileType.serviceController]: (list, context) => { + return list + .filter((api) => !api.path.includes('deprecated')) + .slice(0, 2); + }, + [TypescriptFileType.interface]: (list, context) => { + return list.map((item) => ({ + ...item, + typeName: `Multi${item.typeName}`, + })); + }, + [TypescriptFileType.reactQuery]: (list, context) => { + return list.filter((api) => api.method.toLowerCase() === 'get'); + }, + }, + }, + }); + + await expect( + readGeneratedFiles('./apis/test-multiple-hooks') + ).resolves.toMatchFileSnapshot(getSnapshotDir(ctx)); + }); + + it('测试 hook 异常处理 - hook 函数抛出错误', async (ctx) => { + await openAPI.generateService({ + schemaPath: join( + import.meta.dirname, + './example-files/openapi-custom-gen-file-list-hook.json' + ), + serversPath: './apis/test-hook-error-handling', + enableLogging: true, + hook: { + customRenderTemplateData: { + [TypescriptFileType.serviceController]: (list, context) => { + // 故意抛出错误测试错误处理 + throw new Error('测试 hook 错误处理'); + }, + [TypescriptFileType.interface]: (list, context) => { + // 正常的 hook 应该仍然工作 + return list.map((item) => ({ + ...item, + typeName: `Error${item.typeName}`, + })); + }, + }, + }, + }); + + // 即使有 hook 错误,文件生成应该继续正常工作 + await expect( + readGeneratedFiles('./apis/test-hook-error-handling') + ).resolves.toMatchFileSnapshot(getSnapshotDir(ctx)); + }); + + it('测试向后兼容性 - 不使用新 hook 时的默认行为', async (ctx) => { + await openAPI.generateService({ + schemaPath: join( + import.meta.dirname, + './example-files/openapi-custom-gen-file-list-hook.json' + ), + serversPath: './apis/test-backward-compatibility', + isDisplayTypeLabel: true, + isGenJsonSchemas: true, + // 不设置任何 hook,验证向后兼容性 + }); + + await expect( + readGeneratedFiles('./apis/test-backward-compatibility') + ).resolves.toMatchFileSnapshot(getSnapshotDir(ctx)); + }); + + it('测试 hook 上下文参数 - 验证 context 对象', async (ctx) => { + const contextLog: Array<{ fileName: string; hasParams: boolean }> = []; + + await openAPI.generateService({ + schemaPath: join( + import.meta.dirname, + './example-files/openapi-custom-gen-file-list-hook.json' + ), + serversPath: './apis/test-hook-context', + hook: { + customRenderTemplateData: { + [TypescriptFileType.serviceController]: (list, context) => { + // 记录 context 信息用于验证 + contextLog.push({ + fileName: context.fileName, + hasParams: !!context.params, + }); + return list; + }, + [TypescriptFileType.interface]: (list, context) => { + contextLog.push({ + fileName: context.fileName, + hasParams: !!context.params, + }); + return list; + }, + }, + }, + }); + + // 验证 context 对象被正确传递 + expect(contextLog.length).toBeGreaterThan(0); + expect(contextLog.every((log) => log.hasParams)).toBe(true); + expect(contextLog.some((log) => log.fileName.endsWith('.ts'))).toBe(true); + + await expect( + readGeneratedFiles('./apis/test-hook-context') + ).resolves.toMatchFileSnapshot(getSnapshotDir(ctx)); + }); +}); diff --git a/test/example-files/openapi-custom-gen-file-list-hook.json b/test/example-files/openapi-custom-gen-file-list-hook.json new file mode 100644 index 0000000..c9340a9 --- /dev/null +++ b/test/example-files/openapi-custom-gen-file-list-hook.json @@ -0,0 +1,3471 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "测试", + "description": "", + "version": "1.0.0" + }, + "tags": [], + "paths": { + "/api/web/workcenter-operate/get-user-workshop-workcenter": { + "post": { + "summary": "获取车间产线结构", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "selectDeptId", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "clientid", + "in": "header", + "description": "", + "example": "e5cd7e4891bf95d1d19206ce24a7b32e", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResult", + "description": "" + }, + "example": { + "code": "1", + "message": "成功", + "data": [ + { + "name": "", + "id": 0, + "workshopId": 0, + "lineList": [ + { + "name": "", + "id": 0, + "workshopId": 0, + "lineList": [ + { + "name": "", + "id": 0, + "workshopId": 0, + "lineList": [], + "centerList": [ + { + "id": 0, + "factoryId": 0, + "deptId": 0, + "workshopId": 0, + "lineId": 0, + "centerCode": "", + "centerName": "", + "pinyin": "", + "mainProcessMachineId": 0, + "workPType": "", + "workPCount": 0, + "deleteFlag": "", + "createdTime": "", + "createdUserId": 0, + "modifyiedUserId": 0, + "modifyiedTime": "", + "clockinginId": 0, + "clockinginUserId": 0, + "clockinginUserName": "", + "oeeState": "", + "oeeTime": "", + "remarkStatus": "", + "remarkStatusUserId": 0, + "remarkStatusUserName": "", + "stateRecordId": 0, + "stateStartTime": "" + } + ] + } + ], + "centerList": [ + { + "id": 0, + "factoryId": 0, + "deptId": 0, + "workshopId": 0, + "lineId": 0, + "centerCode": "", + "centerName": "", + "pinyin": "", + "mainProcessMachineId": 0, + "workPType": "", + "workPCount": 0, + "deleteFlag": "", + "createdTime": "", + "createdUserId": 0, + "modifyiedUserId": 0, + "modifyiedTime": "", + "clockinginId": 0, + "clockinginUserId": 0, + "clockinginUserName": "", + "oeeState": "", + "oeeTime": "", + "remarkStatus": "", + "remarkStatusUserId": 0, + "remarkStatusUserName": "", + "stateRecordId": 0, + "stateStartTime": "" + } + ] + } + ], + "centerList": [ + { + "id": 0, + "factoryId": 0, + "deptId": 0, + "workshopId": 0, + "lineId": 0, + "centerCode": "", + "centerName": "", + "pinyin": "", + "mainProcessMachineId": 0, + "workPType": "", + "workPCount": 0, + "deleteFlag": "", + "createdTime": "", + "createdUserId": 0, + "modifyiedUserId": 0, + "modifyiedTime": "", + "clockinginId": 0, + "clockinginUserId": 0, + "clockinginUserName": "", + "oeeState": "", + "oeeTime": "", + "remarkStatus": "", + "remarkStatusUserId": 0, + "remarkStatusUserName": "", + "stateRecordId": 0, + "stateStartTime": "" + } + ] + }, + { + "name": "", + "id": 0, + "workshopId": 0, + "lineList": [ + { + "name": "", + "id": 0, + "workshopId": 0, + "lineList": [ + { + "name": "", + "id": 0, + "workshopId": 0, + "lineList": [], + "centerList": [ + { + "id": 0, + "factoryId": 0, + "deptId": 0, + "workshopId": 0, + "lineId": 0, + "centerCode": "", + "centerName": "", + "pinyin": "", + "mainProcessMachineId": 0, + "workPType": "", + "workPCount": 0, + "deleteFlag": "", + "createdTime": "", + "createdUserId": 0, + "modifyiedUserId": 0, + "modifyiedTime": "", + "clockinginId": 0, + "clockinginUserId": 0, + "clockinginUserName": "", + "oeeState": "", + "oeeTime": "", + "remarkStatus": "", + "remarkStatusUserId": 0, + "remarkStatusUserName": "", + "stateRecordId": 0, + "stateStartTime": "" + } + ] + } + ], + "centerList": [ + { + "id": 0, + "factoryId": 0, + "deptId": 0, + "workshopId": 0, + "lineId": 0, + "centerCode": "", + "centerName": "", + "pinyin": "", + "mainProcessMachineId": 0, + "workPType": "", + "workPCount": 0, + "deleteFlag": "", + "createdTime": "", + "createdUserId": 0, + "modifyiedUserId": 0, + "modifyiedTime": "", + "clockinginId": 0, + "clockinginUserId": 0, + "clockinginUserName": "", + "oeeState": "", + "oeeTime": "", + "remarkStatus": "", + "remarkStatusUserId": 0, + "remarkStatusUserName": "", + "stateRecordId": 0, + "stateStartTime": "" + } + ] + } + ], + "centerList": [ + { + "id": 0, + "factoryId": 0, + "deptId": 0, + "workshopId": 0, + "lineId": 0, + "centerCode": "", + "centerName": "", + "pinyin": "", + "mainProcessMachineId": 0, + "workPType": "", + "workPCount": 0, + "deleteFlag": "", + "createdTime": "", + "createdUserId": 0, + "modifyiedUserId": 0, + "modifyiedTime": "", + "clockinginId": 0, + "clockinginUserId": 0, + "clockinginUserName": "", + "oeeState": "", + "oeeTime": "", + "remarkStatus": "", + "remarkStatusUserId": 0, + "remarkStatusUserName": "", + "stateRecordId": 0, + "stateStartTime": "" + } + ] + }, + { + "name": "", + "id": 0, + "workshopId": 0, + "lineList": [ + { + "name": "", + "id": 0, + "workshopId": 0, + "lineList": [ + { + "name": "", + "id": 0, + "workshopId": 0, + "lineList": [], + "centerList": [ + { + "id": 0, + "factoryId": 0, + "deptId": 0, + "workshopId": 0, + "lineId": 0, + "centerCode": "", + "centerName": "", + "pinyin": "", + "mainProcessMachineId": 0, + "workPType": "", + "workPCount": 0, + "deleteFlag": "", + "createdTime": "", + "createdUserId": 0, + "modifyiedUserId": 0, + "modifyiedTime": "", + "clockinginId": 0, + "clockinginUserId": 0, + "clockinginUserName": "", + "oeeState": "", + "oeeTime": "", + "remarkStatus": "", + "remarkStatusUserId": 0, + "remarkStatusUserName": "", + "stateRecordId": 0, + "stateStartTime": "" + } + ] + } + ], + "centerList": [ + { + "id": 0, + "factoryId": 0, + "deptId": 0, + "workshopId": 0, + "lineId": 0, + "centerCode": "", + "centerName": "", + "pinyin": "", + "mainProcessMachineId": 0, + "workPType": "", + "workPCount": 0, + "deleteFlag": "", + "createdTime": "", + "createdUserId": 0, + "modifyiedUserId": 0, + "modifyiedTime": "", + "clockinginId": 0, + "clockinginUserId": 0, + "clockinginUserName": "", + "oeeState": "", + "oeeTime": "", + "remarkStatus": "", + "remarkStatusUserId": 0, + "remarkStatusUserName": "", + "stateRecordId": 0, + "stateStartTime": "" + } + ] + } + ], + "centerList": [ + { + "id": 0, + "factoryId": 0, + "deptId": 0, + "workshopId": 0, + "lineId": 0, + "centerCode": "", + "centerName": "", + "pinyin": "", + "mainProcessMachineId": 0, + "workPType": "", + "workPCount": 0, + "deleteFlag": "", + "createdTime": "", + "createdUserId": 0, + "modifyiedUserId": 0, + "modifyiedTime": "", + "clockinginId": 0, + "clockinginUserId": 0, + "clockinginUserName": "", + "oeeState": "", + "oeeTime": "", + "remarkStatus": "", + "remarkStatusUserId": 0, + "remarkStatusUserName": "", + "stateRecordId": 0, + "stateStartTime": "" + } + ] + }, + { + "name": "", + "id": 0, + "workshopId": 0, + "lineList": [ + { + "name": "", + "id": 0, + "workshopId": 0, + "lineList": [ + { + "name": "", + "id": 0, + "workshopId": 0, + "lineList": [], + "centerList": [ + { + "id": 0, + "factoryId": 0, + "deptId": 0, + "workshopId": 0, + "lineId": 0, + "centerCode": "", + "centerName": "", + "pinyin": "", + "mainProcessMachineId": 0, + "workPType": "", + "workPCount": 0, + "deleteFlag": "", + "createdTime": "", + "createdUserId": 0, + "modifyiedUserId": 0, + "modifyiedTime": "", + "clockinginId": 0, + "clockinginUserId": 0, + "clockinginUserName": "", + "oeeState": "", + "oeeTime": "", + "remarkStatus": "", + "remarkStatusUserId": 0, + "remarkStatusUserName": "", + "stateRecordId": 0, + "stateStartTime": "" + } + ] + } + ], + "centerList": [ + { + "id": 0, + "factoryId": 0, + "deptId": 0, + "workshopId": 0, + "lineId": 0, + "centerCode": "", + "centerName": "", + "pinyin": "", + "mainProcessMachineId": 0, + "workPType": "", + "workPCount": 0, + "deleteFlag": "", + "createdTime": "", + "createdUserId": 0, + "modifyiedUserId": 0, + "modifyiedTime": "", + "clockinginId": 0, + "clockinginUserId": 0, + "clockinginUserName": "", + "oeeState": "", + "oeeTime": "", + "remarkStatus": "", + "remarkStatusUserId": 0, + "remarkStatusUserName": "", + "stateRecordId": 0, + "stateStartTime": "" + } + ] + } + ], + "centerList": [ + { + "id": 0, + "factoryId": 0, + "deptId": 0, + "workshopId": 0, + "lineId": 0, + "centerCode": "", + "centerName": "", + "pinyin": "", + "mainProcessMachineId": 0, + "workPType": "", + "workPCount": 0, + "deleteFlag": "", + "createdTime": "", + "createdUserId": 0, + "modifyiedUserId": 0, + "modifyiedTime": "", + "clockinginId": 0, + "clockinginUserId": 0, + "clockinginUserName": "", + "oeeState": "", + "oeeTime": "", + "remarkStatus": "", + "remarkStatusUserId": 0, + "remarkStatusUserName": "", + "stateRecordId": 0, + "stateStartTime": "" + } + ] + } + ], + "success": true + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/web/workcenter-operate/get-work-center": { + "post": { + "summary": "getWorkCenter", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "clientid", + "in": "header", + "description": "", + "example": "e5cd7e4891bf95d1d19206ce24a7b32e", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JSONObject", + "description": "" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResult", + "description": "" + }, + "example": { + "code": "1", + "message": "成功", + "data": [ + { + "id": 0, + "factoryId": 0, + "deptId": 0, + "workshopId": 0, + "lineId": 0, + "centerCode": "", + "centerName": "", + "pinyin": "", + "mainProcessMachineId": 0, + "workPType": "", + "workPCount": 0, + "deleteFlag": "", + "createdTime": "", + "createdUserId": 0, + "modifyiedUserId": 0, + "modifyiedTime": "", + "clockinginId": 0, + "clockinginUserId": 0, + "clockinginUserName": "", + "oeeState": "", + "oeeTime": "", + "remarkStatus": "", + "remarkStatusUserId": 0, + "remarkStatusUserName": "", + "stateRecordId": 0, + "stateStartTime": "" + } + ], + "success": true + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/web/workcenter-operate/get-aAndon-req-cfg": { + "post": { + "summary": "getAndonReqCfg", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "clientid", + "in": "header", + "description": "", + "example": "e5cd7e4891bf95d1d19206ce24a7b32e", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JSONObject", + "description": "" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResult", + "description": "" + }, + "example": { + "code": "1", + "message": "成功", + "data": [ + { + "eventId": 0, + "workshopId": 0, + "lineId": 0, + "showColor": "", + "eventName": "", + "userCheckedTab": "", + "userList": [ + { + "id": 0, + "teamId": 0, + "factoryId": 0, + "deptId": 0, + "userId": 0, + "userName": "", + "email": "", + "jobTitle": "", + "jobNo": "", + "telephone": "", + "headImageUrl": "", + "state": "", + "genderCode": "", + "deleteFlag": "", + "createdUserId": 0, + "createdTime": "", + "modifyiedUserId": 0, + "modifyiedTime": "", + "datetimeStamp": "", + "idNumber": "", + "dateOfBirth": "", + "emergencyContact": "", + "emergencyTelephone": "", + "wechatAccount": "", + "entryCompanyDate": "", + "dimissionDate": "", + "remark": "" + } + ] + } + ], + "success": true + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/web/workcenter-operate/andon-req": { + "post": { + "summary": "安灯请求", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "clientid", + "in": "header", + "description": "", + "example": "e5cd7e4891bf95d1d19206ce24a7b32e", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AndonReq", + "description": "" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResult", + "description": "" + }, + "example": { + "code": "1", + "message": "申请成功", + "data": null, + "success": true + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/web/workcenter-operate/get-all-workshop-line": { + "post": { + "summary": "getAllWorkshopAndLineList", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "clientid", + "in": "header", + "description": "", + "example": "e5cd7e4891bf95d1d19206ce24a7b32e", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResult", + "description": "" + }, + "example": { + "code": "1", + "message": "成功", + "data": [ + { + "id": 0, + "parentId": 0, + "factoryId": 0, + "type": "", + "deptCode": "", + "deptName": "", + "pinyin": "", + "wubi": "", + "remark": "", + "state": "", + "deleteFlag": "", + "createdUserId": 0, + "createdTime": "", + "modifyiedUserId": 0, + "modifyiedTime": "", + "datetimeStamp": "", + "childList": [ + { + "id": 0, + "parentId": 0, + "factoryId": 0, + "type": "", + "deptCode": "", + "deptName": "", + "pinyin": "", + "wubi": "", + "remark": "", + "state": "", + "deleteFlag": "", + "createdUserId": 0, + "createdTime": "", + "modifyiedUserId": 0, + "modifyiedTime": "", + "datetimeStamp": "", + "childList": [ + { + "id": 0, + "parentId": 0, + "factoryId": 0, + "type": "", + "deptCode": "", + "deptName": "", + "pinyin": "", + "wubi": "", + "remark": "", + "state": "", + "deleteFlag": "", + "createdUserId": 0, + "createdTime": "", + "modifyiedUserId": 0, + "modifyiedTime": "", + "datetimeStamp": "", + "childList": [] + } + ] + } + ] + } + ], + "success": true + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/web/workcenter-operate/get-andon-record-list": { + "post": { + "summary": "getAndonRecordList", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "clientid", + "in": "header", + "description": "", + "example": "e5cd7e4891bf95d1d19206ce24a7b32e", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AndonRecordQuery", + "description": "" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResultMyPageAndonRecordVO" + }, + "example": { + "code": "", + "message": "", + "data": { + "records": [ + { + "id": 0, + "factoryId": 0, + "factoryName": "", + "deptId": 0, + "deptName": "", + "workshopId": 0, + "workshopName": "", + "lineId": 0, + "lineName": "", + "machineId": 0, + "signalId": 0, + "calendarDetailId": 0, + "calendarId": 0, + "calendarDate": "", + "shiftDetailName": "", + "machineName": "", + "machineCode": "", + "configId": 0, + "configName": "", + "eventName": "", + "reportUserId": 0, + "reportUserName": "", + "reportTime": "", + "reportComments": "", + "reportDate": "", + "priority": "", + "notifyUseridStrs": "", + "receiveUserId": 0, + "receiveUserName": "", + "receiveTime": "", + "receiveDurationTime": 0, + "disposeDurationTime": 0, + "disposeUserId": 0, + "disposeUserName": "", + "disposeDesc": "", + "disposeTime": "", + "totalDurationTime": 0, + "sourceType": "", + "state": "", + "eventAnalysis": "", + "createdUserId": 0, + "createdTime": "", + "modifyiedUserId": 0, + "modifyiedTime": "", + "datetimeStamp": "", + "oeeDetailId": 0, + "workCenterName": "", + "workCenterCode": "", + "disposeUserNames": "", + "disposeUserIds": "", + "totalDurationTimeSt": "", + "receiveDurationTimeSt": "", + "disposeDurationTimeSt": "", + "statusText": "", + "disposeUserList": [ + { + "id": 0, + "teamId": 0, + "factoryId": 0, + "deptId": 0, + "workshopId": 0, + "lineId": 0, + "userName": "", + "email": "", + "jobTitle": "", + "jobNo": "", + "accountNo": "", + "password": "", + "idNumber": "", + "dateOfBirth": "", + "telephone": "", + "headImageUrl": "", + "userType": "", + "adminFlag": "", + "state": "", + "deleteFlag": "", + "passwordModifyiedTime": "", + "createdUserId": 0, + "createdTime": "", + "modifyiedUserId": 0, + "modifyiedTime": "", + "datetimeStamp": "", + "genderCode": "", + "publicOpenId": "", + "currentFactoryId": 0, + "remark": "" + } + ], + "recordNodeList": [ + { + "id": 0, + "andonRecordId": 0, + "nodeDesc": "", + "nodeRemark": "", + "nodeType": "", + "nodeTypeName": "", + "nodeUserId": 0, + "nodeUserName": "", + "createdUserId": 0, + "createdTime": "", + "modifyiedUserId": 0, + "modifyiedTime": "" + } + ], + "showColor": "", + "workCenterId": 0, + "shiftShowColor": "", + "shiftStartTime": "", + "shiftEndTime": "", + "reportImgList": [""], + "disposeImgList": [""], + "reportImgUrls": "", + "disposeImgUrls": "", + "shiftName": "", + "completedUserId": 0, + "completedUserName": "" + } + ], + "total": 0, + "size": 0, + "current": 0, + "orders": [ + { + "column": "", + "asc": false + } + ], + "optimizeCountSql": false, + "searchCount": false, + "optimizeJoinOfCountSql": false, + "maxLimit": 0, + "countId": "", + "startTime": "", + "startTimeStr": "", + "endTime": "", + "endTimeStr": "", + "hasNextPage": false + }, + "success": false + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/web/workcenter-operate/receive-andon": { + "post": { + "summary": "receiveAndon", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "clientid", + "in": "header", + "description": "", + "example": "e5cd7e4891bf95d1d19206ce24a7b32e", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JSONObject", + "description": "" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResult", + "description": "" + }, + "example": { + "code": "-1", + "message": "安灯记录id不能为空", + "data": null, + "success": false + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/web/workcenter-operate/get-all-user": { + "post": { + "summary": "getAllUser", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "clientid", + "in": "header", + "description": "", + "example": "e5cd7e4891bf95d1d19206ce24a7b32e", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResult", + "description": "" + }, + "example": { + "code": "1", + "message": "成功", + "data": [ + { + "id": 0, + "teamId": 0, + "factoryId": 0, + "deptId": 0, + "userId": 0, + "userName": "", + "email": "", + "jobTitle": "", + "jobNo": "", + "telephone": "", + "headImageUrl": "", + "state": "", + "genderCode": "", + "deleteFlag": "", + "createdUserId": 0, + "createdTime": "", + "modifyiedUserId": 0, + "modifyiedTime": "", + "datetimeStamp": "", + "idNumber": "", + "dateOfBirth": "", + "emergencyContact": "", + "emergencyTelephone": "", + "wechatAccount": "", + "entryCompanyDate": "", + "dimissionDate": "", + "remark": "" + } + ], + "success": true + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/web/workcenter-operate/change-dispose-andon": { + "post": { + "summary": "改变安灯处理人", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "clientid", + "in": "header", + "description": "", + "example": "e5cd7e4891bf95d1d19206ce24a7b32e", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JSONObject", + "description": "" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResult", + "description": "" + }, + "example": { + "code": "-1", + "message": "安灯记录id不能为空", + "data": null, + "success": false + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/web/workcenter-operate/change-andon-event-type": { + "post": { + "summary": "改变安灯事件类型", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "clientid", + "in": "header", + "description": "", + "example": "e5cd7e4891bf95d1d19206ce24a7b32e", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JSONObject", + "description": "" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResult", + "description": "" + }, + "example": { + "code": "-1", + "message": "变更的安灯类型不能为空", + "data": null, + "success": false + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/web/workcenter-operate/close-andon": { + "post": { + "summary": "关闭安灯", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "clientid", + "in": "header", + "description": "", + "example": "e5cd7e4891bf95d1d19206ce24a7b32e", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AndonClose", + "description": "" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResult", + "description": "" + }, + "example": { + "code": "1", + "message": "变更安灯类型成功", + "data": null, + "success": true + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/web/workcenter-operate/get-andon-record-info": { + "post": { + "summary": "获取安灯记录详情", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "clientid", + "in": "header", + "description": "", + "example": "e5cd7e4891bf95d1d19206ce24a7b32e", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JSONObject", + "description": "" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResultAndonRecordVO", + "description": "" + }, + "example": { + "code": "", + "message": "", + "data": { + "id": 0, + "factoryId": 0, + "factoryName": "", + "deptId": 0, + "deptName": "", + "workshopId": 0, + "workshopName": "", + "lineId": 0, + "lineName": "", + "machineId": 0, + "signalId": 0, + "calendarDetailId": 0, + "calendarId": 0, + "calendarDate": "", + "shiftDetailName": "", + "machineName": "", + "machineCode": "", + "configId": 0, + "configName": "", + "eventName": "", + "reportUserId": 0, + "reportUserName": "", + "reportTime": "", + "reportComments": "", + "reportDate": "", + "priority": "", + "notifyUseridStrs": "", + "receiveUserId": 0, + "receiveUserName": "", + "receiveTime": "", + "receiveDurationTime": 0, + "disposeDurationTime": 0, + "disposeUserId": 0, + "disposeUserName": "", + "disposeDesc": "", + "disposeTime": "", + "totalDurationTime": 0, + "sourceType": "", + "state": "", + "eventAnalysis": "", + "createdUserId": 0, + "createdTime": "", + "modifyiedUserId": 0, + "modifyiedTime": "", + "datetimeStamp": "", + "oeeDetailId": 0, + "workCenterName": "", + "workCenterCode": "", + "disposeUserNames": "", + "disposeUserIds": "", + "totalDurationTimeSt": "", + "receiveDurationTimeSt": "", + "disposeDurationTimeSt": "", + "statusText": "", + "disposeUserList": [ + { + "id": 0, + "teamId": 0, + "factoryId": 0, + "deptId": 0, + "workshopId": 0, + "lineId": 0, + "userName": "", + "email": "", + "jobTitle": "", + "jobNo": "", + "accountNo": "", + "password": "", + "idNumber": "", + "dateOfBirth": "", + "telephone": "", + "headImageUrl": "", + "userType": "", + "adminFlag": "", + "state": "", + "deleteFlag": "", + "passwordModifyiedTime": "", + "createdUserId": 0, + "createdTime": "", + "modifyiedUserId": 0, + "modifyiedTime": "", + "datetimeStamp": "", + "genderCode": "", + "publicOpenId": "", + "currentFactoryId": 0, + "remark": "" + } + ], + "recordNodeList": [ + { + "id": 0, + "andonRecordId": 0, + "nodeDesc": "", + "nodeRemark": "", + "nodeType": "", + "nodeTypeName": "", + "nodeUserId": 0, + "nodeUserName": "", + "createdUserId": 0, + "createdTime": "", + "modifyiedUserId": 0, + "modifyiedTime": "" + } + ], + "showColor": "", + "workCenterId": 0, + "shiftShowColor": "", + "shiftStartTime": "", + "shiftEndTime": "", + "reportImgList": [""], + "disposeImgList": [""], + "reportImgUrls": "", + "disposeImgUrls": "", + "shiftName": "", + "completedUserId": 0, + "completedUserName": "" + }, + "success": false + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/web/workcenter-operate/add-andon-record-node-desc": { + "post": { + "summary": "addAndonRecordNodeDesc", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "clientid", + "in": "header", + "description": "", + "example": "e5cd7e4891bf95d1d19206ce24a7b32e", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JSONObject", + "description": "" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResult", + "description": "" + }, + "example": { + "code": "-1", + "message": "安灯记录id不能为空", + "data": null, + "success": false + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/web/workcenter-operate/get-device-list": { + "post": { + "summary": "getDeviceList", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "id", + "in": "query", + "description": "ID", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "factoryId", + "in": "query", + "description": "工厂ID", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "deptId", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "workshopId", + "in": "query", + "description": "车间ID", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "lineId", + "in": "query", + "description": "产线ID", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "categoryId", + "in": "query", + "description": "分类ID", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "signalId", + "in": "query", + "description": "灯ID", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "lightSn", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "machineCode", + "in": "query", + "description": "设备编号", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "machineName", + "in": "query", + "description": "设备名称", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "pinyin", + "in": "query", + "description": "拼音码", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "wubi", + "in": "query", + "description": "五笔码", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "imgUrlStrs", + "in": "query", + "description": "医院图片", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "manageUserId", + "in": "query", + "description": "管理员ID", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "trademark", + "in": "query", + "description": "品牌", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "model", + "in": "query", + "description": "型号", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "serialNo", + "in": "query", + "description": "序列号", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "supplier", + "in": "query", + "description": "供应商", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "activationDate", + "in": "query", + "description": "启用日期", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "checkDate", + "in": "query", + "description": "验收日期", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "productionDate", + "in": "query", + "description": "出厂日期", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "pulseInterval", + "in": "query", + "description": "脉冲间隔", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "standardUseRate", + "in": "query", + "description": "标准利用率", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "location", + "in": "query", + "description": "放置地点", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "state", + "in": "query", + "description": "状态,1启用,2 停用", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "remark", + "in": "query", + "description": "备注", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "deleteFlag", + "in": "query", + "description": "删除标记", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "createdUserId", + "in": "query", + "description": "创建人", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "createdTime", + "in": "query", + "description": "创建时间", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "modifyiedUserId", + "in": "query", + "description": "最后更新人", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "modifyiedTime", + "in": "query", + "description": "最后更新时间", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "datetimeStamp", + "in": "query", + "description": "时间戳", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "searchKey", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "oeeState", + "in": "query", + "description": "0 关机,1 运行,2 等待,3 异常", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "oeeTime", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "stateRecordId", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "stateStartTime", + "in": "query", + "description": "", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "clientid", + "in": "header", + "description": "", + "example": "e5cd7e4891bf95d1d19206ce24a7b32e", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "string", + "description": "" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResult", + "description": "" + }, + "example": { + "code": "1", + "message": "成功", + "data": { + "records": [ + { + "value": "", + "label": "", + "param1": "", + "id": 0, + "factoryId": 0, + "factoryName": "", + "deptId": 0, + "deptName": "", + "workshopId": 0, + "workshopName": "", + "lineId": 0, + "lineName": "", + "signalId": 0, + "signalCode": "", + "signalName": "", + "machineCode": "", + "machineName": "", + "pinyin": "", + "wubi": "", + "imgUrlStrs": "", + "manageUserId": 0, + "manageUserName": "", + "trademark": "", + "model": "", + "serialNo": "", + "supplier": "", + "activationDate": "", + "checkDate": "", + "productionDate": "", + "pulseInterval": 0, + "standardUseRate": "", + "location": "", + "state": "", + "remark": "", + "deleteFlag": "", + "createdUserId": 0, + "createdTime": "", + "modifyiedUserId": 0, + "modifyiedTime": "", + "datetimeStamp": "", + "mainImgUrl": "", + "oeeState": "", + "oeeTime": "" + } + ], + "total": 0, + "size": 0, + "current": 0, + "orders": [ + { + "column": "", + "asc": false + } + ], + "optimizeCountSql": false, + "searchCount": false, + "optimizeJoinOfCountSql": false, + "maxLimit": 0, + "countId": "", + "startTime": "", + "startTimeStr": "", + "endTime": "", + "endTimeStr": "", + "hasNextPage": false, + "pages": 0 + }, + "success": true + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/web/workcenter-operate/add-device-machine": { + "post": { + "summary": "addDeviceMachine", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "clientid", + "in": "header", + "description": "", + "example": "e5cd7e4891bf95d1d19206ce24a7b32e", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddDeviceMachine", + "description": "" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResult", + "description": "" + }, + "example": { + "code": "-1", + "message": "设备编号已存在!", + "data": null, + "success": false + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/web/workcenter-operate/update-device-machine": { + "post": { + "summary": "updateDeviceMachine", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "clientid", + "in": "header", + "description": "", + "example": "e5cd7e4891bf95d1d19206ce24a7b32e", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddDeviceMachine", + "description": "" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResult", + "description": "" + }, + "example": { + "code": "-1", + "message": "deviceMachineId不能为空", + "data": null, + "success": false + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/web/workcenter-operate/get-abnormal-record": { + "post": { + "summary": "getAbnormalRecord", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "clientid", + "in": "header", + "description": "", + "example": "e5cd7e4891bf95d1d19206ce24a7b32e", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JSONObject", + "description": "" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResult", + "description": "" + }, + "example": { + "code": "1", + "message": "成功", + "data": { + "records": [ + { + "id": 0, + "factoryId": 0, + "factoryName": "", + "deptId": 0, + "deptName": "", + "workshopId": 0, + "workshopName": "", + "lineId": 0, + "lineName": "", + "machineId": 0, + "machineName": "", + "machineCode": "", + "signalId": 0, + "calendarDetailId": 0, + "calendarId": 0, + "calendarDate": "", + "shiftDetailName": "", + "shiftName": "", + "abnormalEventId": 0, + "abnormalEventName": "", + "reportTime": "", + "reportComments": "", + "reportDate": "", + "notifyUseridStrs": "", + "andonId": 0, + "state": "", + "eventAnalysis": "", + "createdUserId": 0, + "createdTime": "", + "modifyiedUserId": 0, + "modifyiedTime": "", + "datetimeStamp": "", + "disposeUserId": 0, + "disposeUserName": "", + "disposeDesc": "", + "disposeTime": "", + "disposeDurationTime": "", + "abnormalType": "", + "oeeDetailId": 0, + "showTimeSt": "", + "startTime": "", + "endTime": "", + "durationTime": "", + "shiftShowColor": "", + "shiftStartTime": "", + "shiftEndTime": "", + "notifyDetails": "" + } + ], + "total": 0, + "size": 0, + "current": 0, + "orders": [ + { + "column": "", + "asc": false + } + ], + "optimizeCountSql": false, + "searchCount": false, + "optimizeJoinOfCountSql": false, + "maxLimit": 0, + "countId": "", + "startTime": "", + "startTimeStr": "", + "endTime": "", + "endTimeStr": "", + "hasNextPage": false, + "pages": 0 + }, + "success": true + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/web/workcenter-operate/get-abnormal-event-cfg-list": { + "post": { + "summary": "获取异常事件配置", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "clientid", + "in": "header", + "description": "", + "example": "e5cd7e4891bf95d1d19206ce24a7b32e", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JSONObject", + "description": "" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResult", + "description": "" + }, + "example": { + "code": "1", + "message": "成功", + "data": [ + { + "parentId": 0, + "id": 0, + "name": "", + "children": [ + { + "parentId": 0, + "id": 0, + "name": "", + "children": [ + { + "parentId": 0, + "id": 0, + "name": "", + "children": [] + } + ] + } + ] + }, + { + "parentId": 0, + "id": 0, + "name": "", + "children": [ + { + "parentId": 0, + "id": 0, + "name": "", + "children": [ + { + "parentId": 0, + "id": 0, + "name": "", + "children": [] + } + ] + } + ] + } + ], + "success": true + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/web/workcenter-operate/report-abnormal-event": { + "post": { + "summary": "报告异常事件", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "clientid", + "in": "header", + "description": "", + "example": "e5cd7e4891bf95d1d19206ce24a7b32e", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ReportAbnormalEventDTO", + "description": "" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResult", + "description": "" + }, + "example": { + "code": "1", + "message": "操作成功", + "data": { + "id": 0, + "sourceId": 0, + "factoryId": 0, + "deptId": 0, + "workshopId": 0, + "lineId": 0, + "eventTypeId": 0, + "abnormalType": "", + "eventName": "", + "andonEventConfigId": 0, + "pinyin": "", + "wubi": "", + "defaultFlag": "", + "evaluationFlag": "", + "state": "", + "deleteFlag": "", + "createdTime": "", + "createdUserId": 0, + "modifyiedUserId": 0, + "modifyiedTime": "", + "datetimeStamp": "" + }, + "success": true + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/web/workcenter-operate/get-esop-list": { + "post": { + "summary": "getEsopList", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "clientid", + "in": "header", + "description": "", + "example": "e5cd7e4891bf95d1d19206ce24a7b32e", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JSONObject", + "description": "" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResult", + "description": "" + }, + "example": { + "code": "1", + "message": "成功", + "data": [ + { + "id": 0, + "factoryId": 0, + "fileCode": "", + "fileName": "", + "fileType": "", + "filePath": "", + "uploadTime": "", + "uploadUserId": 0, + "uploadUserName": "", + "createdTime": "", + "createdUserId": 0, + "modifyiedUserId": 0, + "modifyiedTime": "", + "productCode": "", + "customerName": "" + } + ], + "success": true + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/web/workcenter-operate/remark-status": { + "post": { + "summary": "remarkStatus", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "clientid", + "in": "header", + "description": "", + "example": "e5cd7e4891bf95d1d19206ce24a7b32e", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JSONObject", + "description": "" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResult", + "description": "" + }, + "example": { + "code": "-1", + "message": "workCenterId不能为空", + "data": null, + "success": false + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/web/workcenter-operate/cancel-remark-status": { + "post": { + "summary": "cancelRemarkStatus", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "clientid", + "in": "header", + "description": "", + "example": "e5cd7e4891bf95d1d19206ce24a7b32e", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JSONObject", + "description": "" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResult", + "description": "" + }, + "example": { + "code": "-1", + "message": "workCenterId不能为空", + "data": null, + "success": false + } + } + }, + "headers": {} + } + }, + "security": [] + } + }, + "/api/web/workcenter-operate/get-current-shift": { + "post": { + "summary": "getCurrentShift", + "deprecated": false, + "description": "", + "tags": [], + "parameters": [ + { + "name": "clientid", + "in": "header", + "description": "", + "example": "e5cd7e4891bf95d1d19206ce24a7b32e", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/JSONObject", + "description": "" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiResultString" + }, + "example": { + "code": "", + "message": "", + "data": "", + "success": false + } + } + }, + "headers": {} + } + }, + "security": [] + } + } + }, + "components": { + "schemas": { + "OrderItem": { + "type": "object", + "properties": { + "column": { + "type": "string", + "description": "" + }, + "asc": { + "type": "boolean", + "description": "" + } + } + }, + "AndonRecordNode": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "", + "format": "int64" + }, + "andonRecordId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "nodeDesc": { + "type": "string", + "description": "节点描述" + }, + "nodeRemark": { + "type": "string", + "description": "节点备注" + }, + "nodeType": { + "type": "string", + "description": "1 已上报,2 已接收,3 已处理(关闭), 4 更换处理人 5 变更内容 6 自定义回复 9 已撤销" + }, + "nodeTypeName": { + "type": "string", + "description": "" + }, + "nodeUserId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "nodeUserName": { + "type": "string", + "description": "" + }, + "createdUserId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "createdTime": { + "type": "string", + "description": "" + }, + "modifyiedUserId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "modifyiedTime": { + "type": "string", + "description": "" + } + } + }, + "PlatformUser": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "用户ID", + "format": "int64" + }, + "teamId": { + "type": "integer", + "description": "团队id", + "format": "int64" + }, + "factoryId": { + "type": "integer", + "description": "工厂id", + "format": "int64" + }, + "deptId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "workshopId": { + "type": "integer", + "description": "所属车间id", + "format": "int64" + }, + "lineId": { + "type": "integer", + "description": "所属产线d", + "format": "int64" + }, + "userName": { + "type": "string", + "description": "用户姓名" + }, + "email": { + "type": "string", + "description": "邮箱" + }, + "jobTitle": { + "type": "string", + "description": "职称" + }, + "jobNo": { + "type": "string", + "description": "用户工号" + }, + "accountNo": { + "type": "string", + "description": "用户账号" + }, + "password": { + "type": "string", + "description": "用户密码" + }, + "idNumber": { + "type": "string", + "description": "身份证号" + }, + "dateOfBirth": { + "type": "string", + "description": "出生日期" + }, + "telephone": { + "type": "string", + "description": "联系电话" + }, + "headImageUrl": { + "type": "string", + "description": "头像url" + }, + "userType": { + "type": "string", + "description": "用户类型,1 平台,2 团队,3 工厂" + }, + "adminFlag": { + "type": "string", + "description": "管理员标识,1 管理员,0 非管理员" + }, + "state": { + "type": "string", + "description": "状态(1:在用 2:停用)" + }, + "deleteFlag": { + "type": "string", + "description": "是否删除(0:否 1:是)" + }, + "passwordModifyiedTime": { + "type": "string", + "description": "修改密码时间" + }, + "createdUserId": { + "type": "integer", + "description": "创建人", + "format": "int64" + }, + "createdTime": { + "type": "string", + "description": "创建时间" + }, + "modifyiedUserId": { + "type": "integer", + "description": "最后更新人", + "format": "int64" + }, + "modifyiedTime": { + "type": "string", + "description": "最后更新时间" + }, + "datetimeStamp": { + "type": "string", + "description": "时间戳" + }, + "genderCode": { + "type": "string", + "description": "1男 2女 9 未知" + }, + "publicOpenId": { + "type": "string", + "description": "" + }, + "currentFactoryId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "remark": { + "type": "string", + "description": "备注" + } + } + }, + "AndonRecordVO": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "ID", + "format": "int64" + }, + "factoryId": { + "type": "integer", + "description": "工厂id", + "format": "int64" + }, + "factoryName": { + "type": "string", + "description": "" + }, + "deptId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "deptName": { + "type": "string", + "description": "" + }, + "workshopId": { + "type": "integer", + "description": "车间id", + "format": "int64" + }, + "workshopName": { + "type": "string", + "description": "" + }, + "lineId": { + "type": "integer", + "description": "产线d", + "format": "int64" + }, + "lineName": { + "type": "string", + "description": "" + }, + "machineId": { + "type": "integer", + "description": "设备ID", + "format": "int64" + }, + "signalId": { + "type": "integer", + "description": "灯ID", + "format": "int64" + }, + "calendarDetailId": { + "type": "integer", + "description": "日历排班ID", + "format": "int64" + }, + "calendarId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "calendarDate": { + "type": "string", + "description": "" + }, + "shiftDetailName": { + "type": "string", + "description": "" + }, + "machineName": { + "type": "string", + "description": "" + }, + "machineCode": { + "type": "string", + "description": "" + }, + "configId": { + "type": "integer", + "description": "事件配置ID", + "format": "int64" + }, + "configName": { + "type": "string", + "description": "" + }, + "eventName": { + "type": "string", + "description": "" + }, + "reportUserId": { + "type": "integer", + "description": "报告人ID", + "format": "int64" + }, + "reportUserName": { + "type": "string", + "description": "" + }, + "reportTime": { + "type": "string", + "description": "开始时间" + }, + "reportComments": { + "type": "string", + "description": "报告备注" + }, + "reportDate": { + "type": "string", + "description": "报告日期" + }, + "priority": { + "type": "string", + "description": "优先级" + }, + "notifyUseridStrs": { + "type": "string", + "description": "通知人ID列表" + }, + "receiveUserId": { + "type": "integer", + "description": "接收人", + "format": "int64" + }, + "receiveUserName": { + "type": "string", + "description": "" + }, + "receiveTime": { + "type": "string", + "description": "接收时间" + }, + "receiveDurationTime": { + "type": "integer", + "description": "接收用时", + "format": "int64" + }, + "disposeDurationTime": { + "type": "integer", + "description": "", + "format": "int64" + }, + "disposeUserId": { + "type": "integer", + "description": "处理人ID", + "format": "int64" + }, + "disposeUserName": { + "type": "string", + "description": "" + }, + "disposeDesc": { + "type": "string", + "description": "处理方式" + }, + "disposeTime": { + "type": "string", + "description": "处理时间" + }, + "totalDurationTime": { + "type": "integer", + "description": "持续时间,单位秒", + "format": "int64" + }, + "sourceType": { + "type": "string", + "description": "来源,1 移动端,2 安灯盒按钮, 3 异常事件" + }, + "state": { + "type": "string", + "description": "状态,1 已上报,2 已接收,3 已处理, 9 已撤销" + }, + "eventAnalysis": { + "type": "string", + "description": "原因分析" + }, + "createdUserId": { + "type": "integer", + "description": "创建人", + "format": "int64" + }, + "createdTime": { + "type": "string", + "description": "创建时间" + }, + "modifyiedUserId": { + "type": "integer", + "description": "最后更新人", + "format": "int64" + }, + "modifyiedTime": { + "type": "string", + "description": "最后更新时间" + }, + "datetimeStamp": { + "type": "string", + "description": "时间戳" + }, + "oeeDetailId": { + "type": "integer", + "description": "oee明细ID", + "format": "int64" + }, + "workCenterName": { + "type": "string", + "description": "" + }, + "workCenterCode": { + "type": "string", + "description": "" + }, + "disposeUserNames": { + "type": "string", + "description": "" + }, + "disposeUserIds": { + "type": "string", + "description": "" + }, + "totalDurationTimeSt": { + "type": "string", + "description": "" + }, + "receiveDurationTimeSt": { + "type": "string", + "description": "" + }, + "disposeDurationTimeSt": { + "type": "string", + "description": "" + }, + "statusText": { + "type": "string", + "description": "表状态,1 已上报,2 已接收,3 已处理, 9 已撤销\n转换状态 已申请 已响应 已关闭 已撤销" + }, + "disposeUserList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PlatformUser", + "description": "

平台_用户

" + }, + "description": "" + }, + "recordNodeList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AndonRecordNode", + "description": "

安灯记录-节点

" + }, + "description": "" + }, + "showColor": { + "type": "string", + "description": "" + }, + "workCenterId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "shiftShowColor": { + "type": "string", + "description": "" + }, + "shiftStartTime": { + "type": "string", + "description": "" + }, + "shiftEndTime": { + "type": "string", + "description": "" + }, + "reportImgList": { + "type": "array", + "items": { + "type": "string" + }, + "description": "" + }, + "disposeImgList": { + "type": "array", + "items": { + "type": "string" + }, + "description": "" + }, + "reportImgUrls": { + "type": "string", + "description": "" + }, + "disposeImgUrls": { + "type": "string", + "description": "" + }, + "shiftName": { + "type": "string", + "description": "" + }, + "completedUserId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "completedUserName": { + "type": "string", + "description": "" + } + } + }, + "MyPageAndonRecordVO": { + "type": "object", + "properties": { + "records": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AndonRecordVO", + "description": "

安灯_记录

" + }, + "description": "" + }, + "total": { + "type": "integer", + "description": "", + "format": "int64" + }, + "size": { + "type": "integer", + "description": "", + "format": "int64" + }, + "current": { + "type": "integer", + "description": "", + "format": "int64" + }, + "orders": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrderItem", + "description": "com.baomidou.mybatisplus.core.metadata.OrderItem" + }, + "description": "" + }, + "optimizeCountSql": { + "type": "boolean", + "description": "" + }, + "searchCount": { + "type": "boolean", + "description": "" + }, + "optimizeJoinOfCountSql": { + "type": "boolean", + "description": "" + }, + "maxLimit": { + "type": "integer", + "description": "", + "format": "int64" + }, + "countId": { + "type": "string", + "description": "" + }, + "startTime": { + "type": "string", + "description": "" + }, + "startTimeStr": { + "type": "string", + "description": "" + }, + "endTime": { + "type": "string", + "description": "" + }, + "endTimeStr": { + "type": "string", + "description": "" + }, + "hasNextPage": { + "type": "boolean", + "description": "", + "default": false + } + } + }, + "ApiResult": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "状态码" + }, + "message": { + "type": "string", + "description": "提示" + }, + "data": { + "description": "数据", + "type": "object", + "properties": {} + }, + "success": { + "type": "boolean", + "description": "是否成功" + } + } + }, + "": { + "type": "object", + "properties": {} + }, + "ApiResultString": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "状态码" + }, + "message": { + "type": "string", + "description": "提示" + }, + "data": { + "type": "string", + "description": "数据" + }, + "success": { + "type": "boolean", + "description": "是否成功" + } + } + }, + "ReportAbnormalEventDTO": { + "type": "object", + "properties": { + "abnormalRecordId": { + "type": "integer", + "description": "异常记录id", + "format": "int64" + }, + "eventId": { + "type": "integer", + "description": "事件id", + "format": "int64" + }, + "processDispatchId": { + "type": "integer", + "description": "工序派工id", + "format": "int64" + } + }, + "required": ["abnormalRecordId"] + }, + "AddDeviceMachine": { + "type": "object", + "properties": { + "lineId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "lineName": { + "type": "string", + "description": "" + }, + "machineCode": { + "type": "string", + "description": "" + }, + "machineName": { + "type": "string", + "description": "" + }, + "manageUserId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "manageUserName": { + "type": "string", + "description": "" + }, + "lightSn": { + "type": "string", + "description": "" + }, + "signalId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "serialNo": { + "type": "string", + "description": "" + }, + "location": { + "type": "string", + "description": "" + }, + "imgList": { + "type": "array", + "items": { + "type": "string" + }, + "description": "", + "default": "new ArrayList<>()" + }, + "deviceMachineId": { + "type": "integer", + "description": "更新才有", + "format": "int64" + } + }, + "required": ["lineId", "machineCode", "machineName", "lightSn"] + }, + "ApiResultAndonRecordVO": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "状态码" + }, + "message": { + "type": "string", + "description": "提示" + }, + "data": { + "$ref": "#/components/schemas/AndonRecordVO", + "description": "

安灯_记录

" + }, + "success": { + "type": "boolean", + "description": "是否成功" + } + } + }, + "AndonClose": { + "type": "object", + "properties": { + "andonRecordId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "disposeDesc": { + "type": "string", + "description": "" + }, + "disposeImgUrls": { + "type": "array", + "items": { + "type": "string" + }, + "description": "" + } + }, + "required": ["andonRecordId"] + }, + "ApiResultMyPageAndonRecordVO": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "状态码" + }, + "message": { + "type": "string", + "description": "提示" + }, + "data": { + "$ref": "#/components/schemas/MyPageAndonRecordVO", + "description": "数据" + }, + "success": { + "type": "boolean", + "description": "是否成功" + } + } + }, + "AndonRecordQuery": { + "type": "object", + "properties": { + "queryDeptId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "myRelatedFlag": { + "type": "string", + "description": "与我有关, 处理人或者报告人是我或者接收人是我", + "default": "0" + }, + "queryDisposeStatus": { + "type": "string", + "description": "处理状态 1 查询未处理的 2 查询已处理的" + }, + "queryTimeType": { + "type": "string", + "description": "1 60天内 2 今天 3 本月 5 日期范围查询 默认1", + "default": "1" + }, + "factoryId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "startTime": { + "type": "string", + "description": "" + }, + "endTime": { + "type": "string", + "description": "" + }, + "size": { + "type": "integer", + "description": "", + "format": "int64", + "default": 30 + }, + "current": { + "type": "integer", + "description": "", + "format": "int64", + "default": 1 + } + } + }, + "AndonReq": { + "type": "object", + "properties": { + "configId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "configName": { + "type": "string", + "description": "" + }, + "imgList": { + "type": "array", + "items": { + "type": "string" + }, + "description": "" + }, + "reportComments": { + "type": "string", + "description": "" + }, + "selectHandlerUserIds": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "处理用户" + }, + "workCenterId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "reqUserId": { + "type": "integer", + "description": "", + "format": "int64" + }, + "sourceType": { + "type": "string", + "description": "来源" + }, + "processDispatchId": { + "type": "integer", + "description": "工序派工id", + "format": "int64" + } + }, + "required": [ + "configId", + "configName", + "selectHandlerUserIds", + "workCenterId" + ] + }, + "JSONObject": { + "type": "object", + "properties": { + "key": { + "type": "object", + "properties": {} + } + } + } + }, + "securitySchemes": {} + }, + "servers": [] +}