diff --git a/src/api/wcs/deviceHost/index.ts b/src/api/wcs/deviceHost/index.ts index 5d0432d..8a7f4ce 100644 --- a/src/api/wcs/deviceHost/index.ts +++ b/src/api/wcs/deviceHost/index.ts @@ -1,6 +1,7 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { DeviceHostVO, DeviceHostForm, DeviceHostId, DeviceHostIds, DeviceHostQuery } from '@/api/wcs/deviceHost/types'; +import type { WcsDropdownQuery } from '@/api/wcs/types'; /** * 查询设备主机列表 @@ -20,7 +21,7 @@ export const listDeviceHost = (query?: DeviceHostQuery): AxiosPromise): AxiosPromise => { +export const getDeviceHostList = (query?: WcsDropdownQuery): AxiosPromise => { return request({ url: '/wcs/deviceHost/getDeviceHostList', method: 'get', diff --git a/src/api/wcs/deviceHost/types.ts b/src/api/wcs/deviceHost/types.ts index 22af562..acc1168 100644 --- a/src/api/wcs/deviceHost/types.ts +++ b/src/api/wcs/deviceHost/types.ts @@ -1,3 +1,5 @@ +import type { WcsBaseEntity } from '../types'; + export type DeviceHostId = string | number; export type DeviceHostIds = DeviceHostId[]; @@ -55,10 +57,9 @@ export interface DeviceHostVO { createdByName: string; /** 更新人名称 */ updatedByName: string; - } -export interface DeviceHostForm extends BaseEntity { +export interface DeviceHostForm extends WcsBaseEntity { /** * 主键标识 */ @@ -98,21 +99,9 @@ export interface DeviceHostForm extends BaseEntity { * 备注 */ remark?: string; - - /** - * 创建时间 - */ - createdTime?: string; - - createdBy?: string | number; - updatedBy?: string | number; - createdByName?: string; - updatedByName?: string; - } export interface DeviceHostQuery extends PageQuery { - /** * 主机编号 */ diff --git a/src/api/wcs/deviceInfo/index.ts b/src/api/wcs/deviceInfo/index.ts index 3a29b57..d47ae5c 100644 --- a/src/api/wcs/deviceInfo/index.ts +++ b/src/api/wcs/deviceInfo/index.ts @@ -1,6 +1,7 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { DeviceInfoVO, DeviceInfoForm, DeviceInfoId, DeviceInfoIds, DeviceInfoQuery } from '@/api/wcs/deviceInfo/types'; +import type { WcsDropdownQuery } from '@/api/wcs/types'; /** * 查询设备信息列表 @@ -20,7 +21,7 @@ export const listDeviceInfo = (query?: DeviceInfoQuery): AxiosPromise): AxiosPromise => { +export const getDeviceInfoList = (query?: WcsDropdownQuery): AxiosPromise => { return request({ url: '/wcs/deviceInfo/getDeviceInfoList', method: 'get', diff --git a/src/api/wcs/deviceInfo/types.ts b/src/api/wcs/deviceInfo/types.ts index 11cb49f..96fea92 100644 --- a/src/api/wcs/deviceInfo/types.ts +++ b/src/api/wcs/deviceInfo/types.ts @@ -1,3 +1,5 @@ +import type { WcsBaseEntity } from '../types'; + export type DeviceInfoId = string | number; export type DeviceInfoIds = DeviceInfoId[]; @@ -58,10 +60,9 @@ export interface DeviceInfoVO { createdByName: string; /** 更新人名称 */ updatedByName: string; - } -export interface DeviceInfoForm extends BaseEntity { +export interface DeviceInfoForm extends WcsBaseEntity { /** * 主键标识 */ @@ -101,21 +102,9 @@ export interface DeviceInfoForm extends BaseEntity { * 备注 */ remark?: string; - - /** - * 创建时间 - */ - createdTime?: string; - - createdBy?: string | number; - updatedBy?: string | number; - createdByName?: string; - updatedByName?: string; - } export interface DeviceInfoQuery extends PageQuery { - /** * 设备编号 */ diff --git a/src/api/wcs/deviceParam/types.ts b/src/api/wcs/deviceParam/types.ts index 122f307..05d5e9f 100644 --- a/src/api/wcs/deviceParam/types.ts +++ b/src/api/wcs/deviceParam/types.ts @@ -1,3 +1,5 @@ +import type { WcsBaseEntity } from '../types'; + export type DeviceParamId = string | number; export type DeviceParamIds = DeviceParamId[]; @@ -68,10 +70,9 @@ export interface DeviceParamVO { createdByName: string; /** 更新人名称 */ updatedByName: string; - } -export interface DeviceParamForm extends BaseEntity { +export interface DeviceParamForm extends WcsBaseEntity { /** * 主键标识 */ @@ -121,21 +122,9 @@ export interface DeviceParamForm extends BaseEntity { * 备注 */ remark?: string; - - /** - * 创建时间 - */ - createdTime?: string; - - createdBy?: string | number; - updatedBy?: string | number; - createdByName?: string; - updatedByName?: string; - } export interface DeviceParamQuery extends PageQuery { - /** * 参数编号 */ diff --git a/src/api/wcs/locationInfo/types.ts b/src/api/wcs/locationInfo/types.ts index c6af896..71ec856 100644 --- a/src/api/wcs/locationInfo/types.ts +++ b/src/api/wcs/locationInfo/types.ts @@ -1,3 +1,5 @@ +import type { WcsBaseEntity } from '../types'; + export type LocationInfoId = string | number; export type LocationInfoIds = LocationInfoId[]; @@ -95,10 +97,9 @@ export interface LocationInfoVO { createdByName: string; /** 更新人名称 */ updatedByName: string; - } -export interface LocationInfoForm extends BaseEntity { +export interface LocationInfoForm extends WcsBaseEntity { /** * 主键标识 */ @@ -173,21 +174,9 @@ export interface LocationInfoForm extends BaseEntity { * 备注 */ remark?: string; - - /** - * 创建时间 - */ - createdTime?: string; - - createdBy?: string | number; - updatedBy?: string | number; - createdByName?: string; - updatedByName?: string; - } export interface LocationInfoQuery extends PageQuery { - /** * 库位编号 */ diff --git a/src/api/wcs/materialInfo/index.ts b/src/api/wcs/materialInfo/index.ts index 61741b8..6512e60 100644 --- a/src/api/wcs/materialInfo/index.ts +++ b/src/api/wcs/materialInfo/index.ts @@ -1,6 +1,7 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { MaterialInfoVO, MaterialInfoForm, MaterialInfoId, MaterialInfoIds, MaterialInfoQuery } from '@/api/wcs/materialInfo/types'; +import type { WcsDropdownQuery } from '@/api/wcs/types'; /** * 查询物料信息列表 @@ -20,7 +21,7 @@ export const listMaterialInfo = (query?: MaterialInfoQuery): AxiosPromise): AxiosPromise => { +export const getMaterialInfoList = (query?: WcsDropdownQuery): AxiosPromise => { return request({ url: '/wcs/materialInfo/getMaterialInfoList', method: 'get', diff --git a/src/api/wcs/materialInfo/types.ts b/src/api/wcs/materialInfo/types.ts index 0a6b9cf..bbd5893 100644 --- a/src/api/wcs/materialInfo/types.ts +++ b/src/api/wcs/materialInfo/types.ts @@ -1,3 +1,5 @@ +import type { WcsBaseEntity } from '../types'; + export type MaterialInfoId = string | number; export type MaterialInfoIds = MaterialInfoId[]; @@ -60,10 +62,9 @@ export interface MaterialInfoVO { createdByName: string; /** 更新人名称 */ updatedByName: string; - } -export interface MaterialInfoForm extends BaseEntity { +export interface MaterialInfoForm extends WcsBaseEntity { /** * 主键标识 */ @@ -108,21 +109,9 @@ export interface MaterialInfoForm extends BaseEntity { * 备注 */ remark?: string; - - /** - * 创建时间 - */ - createdTime?: string; - - createdBy?: string | number; - updatedBy?: string | number; - createdByName?: string; - updatedByName?: string; - } export interface MaterialInfoQuery extends PageQuery { - /** * 物料编号 */ diff --git a/src/api/wcs/pathDetails/types.ts b/src/api/wcs/pathDetails/types.ts index 747101b..ec4baf5 100644 --- a/src/api/wcs/pathDetails/types.ts +++ b/src/api/wcs/pathDetails/types.ts @@ -1,3 +1,5 @@ +import type { WcsBaseEntity } from '../types'; + export type PathDetailsId = string | number; export type PathDetailsIds = PathDetailsId[]; @@ -45,10 +47,9 @@ export interface PathDetailsVO { createdByName: string; /** 更新人名称 */ updatedByName: string; - } -export interface PathDetailsForm extends BaseEntity { +export interface PathDetailsForm extends WcsBaseEntity { /** * 主键标识 */ @@ -78,21 +79,9 @@ export interface PathDetailsForm extends BaseEntity { * 备注 */ remark?: string; - - /** - * 创建时间 - */ - createdTime?: string; - - createdBy?: string | number; - updatedBy?: string | number; - createdByName?: string; - updatedByName?: string; - } export interface PathDetailsQuery extends PageQuery { - /** * 路径编号 */ diff --git a/src/api/wcs/pathInfo/index.ts b/src/api/wcs/pathInfo/index.ts index 9e78d33..2ab2d27 100644 --- a/src/api/wcs/pathInfo/index.ts +++ b/src/api/wcs/pathInfo/index.ts @@ -1,6 +1,7 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { PathInfoVO, PathInfoForm, PathInfoId, PathInfoIds, PathInfoQuery } from '@/api/wcs/pathInfo/types'; +import type { WcsDropdownQuery } from '@/api/wcs/types'; /** * 查询路径信息列表 @@ -20,7 +21,7 @@ export const listPathInfo = (query?: PathInfoQuery): AxiosPromise * 获取路径信息下拉列表 * @param query */ -export const getPathInfoList = (query?: Partial): AxiosPromise => { +export const getPathInfoList = (query?: WcsDropdownQuery): AxiosPromise => { return request({ url: '/wcs/pathInfo/getPathInfoList', method: 'get', diff --git a/src/api/wcs/pathInfo/types.ts b/src/api/wcs/pathInfo/types.ts index f1dedfe..1b3b008 100644 --- a/src/api/wcs/pathInfo/types.ts +++ b/src/api/wcs/pathInfo/types.ts @@ -1,4 +1,5 @@ import type { PathDetailsForm, PathDetailsVO } from '../pathDetails/types'; +import type { WcsBaseEntity } from '../types'; export type PathInfoId = string | number; export type PathInfoIds = PathInfoId[]; @@ -47,7 +48,7 @@ export interface PathInfoVO { updatedByName: string; } -export interface PathInfoForm extends BaseEntity { +export interface PathInfoForm extends WcsBaseEntity { /** * 主键标识 */ @@ -78,16 +79,6 @@ export interface PathInfoForm extends BaseEntity { * 主子表保存时随主表一并提交,避免页面侧使用 any 绕过类型检查。 */ details?: PathDetailsForm[]; - - /** - * 创建时间 - */ - createdTime?: string; - - createdBy?: string | number; - updatedBy?: string | number; - createdByName?: string; - updatedByName?: string; } export interface PathInfoQuery extends PageQuery { diff --git a/src/api/wcs/storeInfo/index.ts b/src/api/wcs/storeInfo/index.ts index 067e8a8..254df5b 100644 --- a/src/api/wcs/storeInfo/index.ts +++ b/src/api/wcs/storeInfo/index.ts @@ -1,6 +1,7 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { StoreInfoVO, StoreInfoForm, StoreInfoId, StoreInfoIds, StoreInfoQuery } from '@/api/wcs/storeInfo/types'; +import type { WcsDropdownQuery } from '@/api/wcs/types'; /** * 查询仓库信息列表 @@ -20,7 +21,7 @@ export const listStoreInfo = (query?: StoreInfoQuery): AxiosPromise): AxiosPromise => { +export const getStoreInfoList = (query?: WcsDropdownQuery): AxiosPromise => { return request({ url: '/wcs/storeInfo/getStoreInfoList', method: 'get', diff --git a/src/api/wcs/storeInfo/types.ts b/src/api/wcs/storeInfo/types.ts index 2ae425b..cf22f30 100644 --- a/src/api/wcs/storeInfo/types.ts +++ b/src/api/wcs/storeInfo/types.ts @@ -1,3 +1,5 @@ +import type { WcsBaseEntity } from '../types'; + export type StoreInfoId = string | number; export type StoreInfoIds = StoreInfoId[]; @@ -40,10 +42,9 @@ export interface StoreInfoVO { createdByName: string; /** 更新人名称 */ updatedByName: string; - } -export interface StoreInfoForm extends BaseEntity { +export interface StoreInfoForm extends WcsBaseEntity { /** * 主键标识 */ @@ -68,21 +69,9 @@ export interface StoreInfoForm extends BaseEntity { * 备注 */ remark?: string; - - /** - * 创建时间 - */ - createdTime?: string; - - createdBy?: string | number; - updatedBy?: string | number; - createdByName?: string; - updatedByName?: string; - } export interface StoreInfoQuery extends PageQuery { - /** * 仓库编号 */ diff --git a/src/api/wcs/taskDetail/types.ts b/src/api/wcs/taskDetail/types.ts index cbfa343..cae8b10 100644 --- a/src/api/wcs/taskDetail/types.ts +++ b/src/api/wcs/taskDetail/types.ts @@ -1,3 +1,5 @@ +import type { WcsBaseEntity } from '../types'; + export type TaskDetailId = string | number; export type TaskDetailIds = TaskDetailId[]; @@ -110,10 +112,9 @@ export interface TaskDetailVO { createdByName: string; /** 更新人名称 */ updatedByName: string; - } -export interface TaskDetailForm extends BaseEntity { +export interface TaskDetailForm extends WcsBaseEntity { /** * 主键标识 */ @@ -188,26 +189,9 @@ export interface TaskDetailForm extends BaseEntity { * 备注 */ remark?: string; - - /** - * 创建时间 - */ - createdTime?: string; - - /** - * 更新时间 - */ - updatedTime?: string; - - createdBy?: string | number; - updatedBy?: string | number; - createdByName?: string; - updatedByName?: string; - } export interface TaskDetailQuery extends PageQuery { - /** * 任务编号 */ diff --git a/src/api/wcs/taskQueue/types.ts b/src/api/wcs/taskQueue/types.ts index 28e1f00..54bc7b6 100644 --- a/src/api/wcs/taskQueue/types.ts +++ b/src/api/wcs/taskQueue/types.ts @@ -1,4 +1,5 @@ -import { TaskDetailForm, TaskDetailVO } from '../taskDetail/types'; +import type { TaskDetailForm, TaskDetailVO } from '../taskDetail/types'; +import type { WcsBaseEntity } from '../types'; export type TaskQueueId = string | number; export type TaskQueueIds = TaskQueueId[]; @@ -115,10 +116,9 @@ export interface TaskQueueVO { createdByName: string; /** 更新人名称 */ updatedByName: string; - } -export interface TaskQueueForm extends BaseEntity { +export interface TaskQueueForm extends WcsBaseEntity { /** * 主键标识 */ @@ -194,28 +194,11 @@ export interface TaskQueueForm extends BaseEntity { */ remark?: string; - /** - * 创建时间 - */ - createdTime?: string; - - /** - * 更新时间 - */ - updatedTime?: string; - /** 实时任务明细列表 */ details?: TaskDetailForm[]; - - createdBy?: string | number; - updatedBy?: string | number; - createdByName?: string; - updatedByName?: string; - } export interface TaskQueueQuery extends PageQuery { - /** * 任务编号 */ diff --git a/src/api/wcs/types.ts b/src/api/wcs/types.ts new file mode 100644 index 0000000..1702b01 --- /dev/null +++ b/src/api/wcs/types.ts @@ -0,0 +1,15 @@ +export interface WcsBaseEntity { + /** + * hw-wcs 业务库字段固定为 created_time/updated_time, + * 与 RuoYi 通用 BaseEntity 的 createTime/updateTime 不同,单独建模可避免两套审计字段混用。 + */ + createdTime?: string; + updatedTime?: string; + createdBy?: string | number; + updatedBy?: string | number; +} + +/** + * 下拉列表接口不需要分页参数,只保留业务筛选项和 params,避免调用侧为了绕过 PageQuery 必填项使用 any。 + */ +export type WcsDropdownQuery = Partial>;