Compare commits

...

2 Commits

Author SHA1 Message Date
wangzhongjie
e352bd7b98 Merge branch 'new_centers' of http://88.22.24.105:3000/harmony_car/subject-two into new_centers 2024-10-08 13:24:57 +08:00
wangzhongjie
c8314f91a1 fix:一些变化 2024-10-08 13:24:52 +08:00
9 changed files with 1550 additions and 0 deletions

View File

@ -0,0 +1,82 @@
// @ts-ignore
/* eslint-disable */
import request from '../common/utils/http';
/** 1.获取考车考点信息 获取考车gpsIP、udpIP、音视频端口等考车和考点参数配置 POST /para/initCarInfoCache.ws */
export async function initCarInfoCacheUsingPost(
body: API.GpsIPUdpIP2,
options?: { [key: string]: any },
) {
return request<API.ROfGpsIPUdpIP_>('/para/initCarInfoCache.ws', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}
/** 3.初始化考车视频参数 初始化考车视频参数 POST /para/initCarParameter.ws */
export async function initCarVideoParameterUsingPost(
body: API.Pinyin_7,
options?: { [key: string]: any },
) {
return request<API.ROf2>('/para/initCarParameter.ws', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}
/** 4.从参数平台获取参数 单个读表,读取其他 ma_ 开头的评判参数表 POST /para/initCenterCache.ws */
export async function initCenterCacheFromParamUsingPost(
body: API.Pinyin_5,
options?: { [key: string]: any },
) {
return request<API.ROfListOfobject>('/para/initCenterCache.ws', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}
/** 2.初始化模型 初始化模型 POST /para/initEsModel.ws */
export async function initModelUsingPost(body: API.Pinyin_32, options?: { [key: string]: any }) {
return request<API.ROf10>('/para/initEsModel.ws', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}
/** 5.参数平台基础数据同步 被请求的 GET /param/baseDataSync */
export async function paramBaseDataSyncUsingGet(options?: { [key: string]: any }) {
return request<API.ROf3>('/param/baseDataSync', {
method: 'GET',
...(options || {}),
});
}
/** 6.参数平台参数数据同步 被请求的 GET /param/configDataSync/${param0} */
export async function paramConfigDataSyncUsingGet(
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
params: API.paramConfigDataSyncUsingGETParams,
options?: { [key: string]: any },
) {
const { tableName: param0, ...queryParams } = params;
return request<API.ROfobject>(`/param/configDataSync/${param0}`, {
method: 'GET',
params: { ...queryParams },
...(options || {}),
});
}

View File

@ -0,0 +1,116 @@
// @ts-ignore
/* eslint-disable */
import request from '../common/utils/http';
/** 4.考车自检项目信息读取 考车自检项目信息读取 POST /exam/carConfigurationInfo.ws */
export async function carConfigurationInfoUsingPost(
body: API.Pinyin_34,
options?: { [key: string]: any },
) {
return request<API.ROf11>('/exam/carConfigurationInfo.ws', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}
/** 6.随车考试员登录 随车考试员登录 POST /exam/examinerLogin.ws */
export async function examinerLoginUsingPost(
body: API.Pinyin_39,
options?: { [key: string]: any },
) {
return request<API.ROf12>('/exam/examinerLogin.ws', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}
/** 3.获取考点系统参数 考车从考试中心获取考点系统参数即考试平台的exam_point_config表 POST /exam/initSysset300.ws */
export async function initExamPointConfigUsingPost(
body: API.Pinyin_33,
options?: { [key: string]: any },
) {
return request<API.ROfListOfobject>('/exam/initSysset300.ws', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}
/** 8.考车考点信息查询 考车考点信息查询 POST /exam/queryVehiclePoint.ws */
export async function queryVehiclePointUsingPost(
body: API.Pinyin_28,
options?: { [key: string]: any },
) {
return request<API.ROfobject>('/exam/queryVehiclePoint.ws', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}
/** 1.终端设备注册 包括但不限于考车、闸机 POST /exam/registrationDeviceNo.ws */
export async function registrationDeviceNoUsingPost(
body: API.Pinyin_23,
options?: { [key: string]: any },
) {
return request<API.ROfobject>('/exam/registrationDeviceNo.ws', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}
/** 2.终端初始化时间同步 终端初始化时间同步 POST /exam/timeSynchronization.ws */
export async function timeSynchronizationUsingPost(options?: { [key: string]: any }) {
return request<API.ROf9>('/exam/timeSynchronization.ws', {
method: 'POST',
...(options || {}),
});
}
/** 5.考车自检结果写入 考车自检结果写入 POST /exam/uploadExamCarCheckResult.ws */
export async function uploadExamCarCheckResultUsingPost(
body: API.Pinyin_29,
options?: { [key: string]: any },
) {
return request<API.ROfobject>('/exam/uploadExamCarCheckResult.ws', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}
/** 7.考车日志信息上传 考车日志信息上传 POST /exam/uploadVehicleLog.ws */
export async function uploadVehicleLogUsingPost(
body: API.Pinyin_27,
options?: { [key: string]: any },
) {
return request<API.ROfobject>('/exam/uploadVehicleLog.ws', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}

View File

@ -0,0 +1,78 @@
// @ts-ignore
/* eslint-disable */
import request from '../common/utils/http';
/** 3.考车对考生缺考操作 考车对考生缺考操作 POST /exam/examinationStuAbsent.ws */
export async function examinationStuAbsentUsingPost(
body: API.Pinyin_26,
options?: { [key: string]: any },
) {
return request<API.ROfobject>('/exam/examinationStuAbsent.ws', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}
/** 2.断点续考 断点续考获取考试项目 POST /exam/getExaminationItem.ws */
export async function getExaminationItemUsingPost(
body: API.Pinyin_18,
options?: { [key: string]: any },
) {
return request<API.ROf8>('/exam/getExaminationItem.ws', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}
/** 1.下载考生信息 考车端通过此接口下载监管(或本地随机)分配的考生信息 POST /exam/getExaminationStudentInfo.ws */
export async function getExaminationStudentInfoUsingPost(
body: API.Pinyin_3,
options?: { [key: string]: any },
) {
return request<API.ROf_>('/exam/getExaminationStudentInfo.ws', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}
/** 4.上传考试过程数据文件 上传考试过程数据文件 POST /exam/uploadExamDataFile.ws */
export async function uploadExamDataFileUsingPost(
body: API.Pinyin_2,
options?: { [key: string]: any },
) {
return request<API.ROfobject>('/exam/uploadExamDataFile.ws', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}
/** 5.上传考生考试里程 上传考生考试里程 POST /exam/uploadExamMileage.ws */
export async function uploadExamMileageUsingPost(
body: API.Pinyin__,
options?: { [key: string]: any },
) {
return request<API.ROfobject>('/exam/uploadExamMileage.ws', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}

View File

@ -0,0 +1,45 @@
// @ts-ignore
/* eslint-disable */
import request from '../common/utils/http';
/** 2.无锡所接口请求 无锡所通用接口请求 POST /common/callWxsRest.do */
export async function callWxsRestUsingPost(body: API.Pinyin_20, options?: { [key: string]: any }) {
return request<API.ROfobject>('/common/callWxsRest.do', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}
/** 3.无锡所接口请求测试 无锡所接口请求测试,返回测试数据 POST /common/callWxsRestTest.do */
export async function callWxsRestTestUsingPost(
body: API.Pinyin_20,
options?: { [key: string]: any },
) {
return request<API.ROfobject>('/common/callWxsRestTest.do', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}
/** 1.大屏显示数据查询与控制 大屏显示数据查询与控制 POST /data/examInfoStandardDisplay.ws */
export async function examInfoStandardDisplayUsingPost(
body: API.Pinyin_13,
options?: { [key: string]: any },
) {
return request<API.ROf5>('/data/examInfoStandardDisplay.ws', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}

View File

@ -0,0 +1,75 @@
// @ts-ignore
/* eslint-disable */
import request from '../common/utils/http';
/** 4.数据更新 数据更新:照片,指纹,随机序号,监管签到,状态等操作 POST /data/getAccessControlInfo.ws */
export async function getAccessControlInfoUsingPost(
body: API.Pinyin_30,
options?: { [key: string]: any },
) {
return request<API.ROfobject>('/data/getAccessControlInfo.ws', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}
/** 2.身份合法性判断 身份合法性判断:约考信息下载,收费查询,场次控制等 POST /data/getAccessStuInfo.ws */
export async function getAccessStuInfoUsingPost(
body: API.Pinyin_36,
options?: { [key: string]: any },
) {
return request<API.ROfobject>('/data/getAccessStuInfo.ws', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}
/** 1.门禁版本控制 门禁版本控制 POST /exam/gateLoginInit.ws */
export async function getLoginInitUsingPost(body: API.Pinyin_38, options?: { [key: string]: any }) {
return request<API.ROfobject>('/exam/gateLoginInit.ws', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}
/** 3.门禁/考车终端人脸识别 门禁/考车终端人脸识别 POST /imageCompare/base64ImageStrCompare.ws */
export async function base64ImageStrCompareUsingPost(
body: API.Pinyin_37,
options?: { [key: string]: any },
) {
return request<API.ROfobject>('/imageCompare/base64ImageStrCompare.ws', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}
/** 5.考官/随车考试员闸机人脸识别 考官/随车考试员闸机人脸识别,此处安全员是代替没有身份证学员人脸识别 POST /pmUserCheckCardNoFace.ws */
export async function examManFaceRecognitionUsingPost(
body: API.Pinyin_25,
options?: { [key: string]: any },
) {
return request<API.ROfobject>('/pmUserCheckCardNoFace.ws', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}

View File

@ -0,0 +1,63 @@
// @ts-ignore
/* eslint-disable */
import request from '../common/utils/http';
/** 3.合成视频监测 合成视频监测 POST /data/compositedVideosMonitor.ws */
export async function compositedVideosMonitorUsingPost(
body: API.Pinyin_11,
options?: { [key: string]: any },
) {
return request<API.ROfobject>('/data/compositedVideosMonitor.ws', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}
/** 1.场地摄像头设备信息 场地摄像头设备信息--科目二三都调用此接口科三只有贵州在用2022-10-13 POST /data/getKm2FieldGunCameraInfo.ws */
export async function getKm2FieldGunCameraInfoUsingPost(
body: API.Pinyin_11,
options?: { [key: string]: any },
) {
return request<API.ROf4>('/data/getKm2FieldGunCameraInfo.ws', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}
/** 4.获取考生考试信息 获取考生考试信息 POST /data/getStudExamInfo.ws */
export async function getStudExamInfoUsingPost(
body: API.Pinyin_17,
options?: { [key: string]: any },
) {
return request<API.ROf7>('/data/getStudExamInfo.ws', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}
/** 2.小红求获取扣分信息(参数平台接口) 小红求获取扣分信息-(视频合成用-小红球程序-放在参数平台) POST /data/obtainMarkRuleSetInfo.ws */
export async function obtainMarkRuleSetInfoUsingPost(
body: API.Pinyin_15,
options?: { [key: string]: any },
) {
return request<API.ROf6>('/data/obtainMarkRuleSetInfo.ws', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}

View File

@ -0,0 +1,31 @@
// @ts-ignore
/* eslint-disable */
import request from '../common/utils/http';
/** 2.考试中心执行参数同步 由外部(考试平台)调用,主动请求参数平台同步基础数据 GET /system/doParamBaseDataSync */
export async function doParamBaseDataSyncUsingGet(options?: { [key: string]: any }) {
return request<API.ROfobject>('/system/doParamBaseDataSync', {
method: 'GET',
...(options || {}),
});
}
/** 3.考试中心执行参数数据同步 由外部(考试平台)调用,主动请求参数平台同步参数数据 GET /system/doParamConfigDataSync */
export async function doParamConfigDataSyncUsingGet(options?: { [key: string]: any }) {
return request<API.ROfobject>('/system/doParamConfigDataSync', {
method: 'GET',
...(options || {}),
});
}
/** 1.用户登录 用户登录接口获取用户相关信息和登录Token登录后调用后台接口时将Token放到请求头中 POST /system/userLogin.do */
export async function userLoginUsingPost(body: API.Pinyin_21, options?: { [key: string]: any }) {
return request<API.ROfobject>('/system/userLogin.do', {
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
},
data: body,
...(options || {}),
});
}

964
entry/src/main/ets/api/typings.d.ts vendored Normal file
View File

@ -0,0 +1,964 @@
declare namespace API {
type CarBrand_ = {
/** 品牌名 {type_name} */
brandName?: string;
/** 创建者 */
createBy?: string;
/** 创建时间 */
createTime?: string;
/** 百米脉冲 */
hundredMeterPulse?: string;
/** 主键 */
id?: number;
/** 签到序号起始点 */
signNumber?: number;
/** SIMPLE_NAME */
simpleName?: string;
/** 更新者 */
updateBy?: string;
/** 更新时间 */
updateTime?: string;
};
type CarInfo_ = {
/** 监管分车时间 */
assignTime?: string;
/** 车辆品牌id [car_brand.id] {cartypeid} */
carBrandId?: number;
/** 考车自检状态0不用检查1待检查2检查通过3检查不通过 */
carCheckStatus?: string;
/** 考车实际IP {carip} */
carIp?: string;
/** 考车对应mac地址 */
carMac?: string;
/** 考车编号 {carno} */
carNo?: string;
/** 考车身份证号 */
cardNoArray?: string;
/** 创建者 */
createBy?: string;
/** 创建时间 */
createTime?: string;
/** 删除标记0存在2已经删除status */
delFlag?: string;
/** 考点id [sys_dept.dept_id] {exampointid} */
deptId?: number;
/** 设备号 */
deviceNo?: string;
/** 考车状态1正常2停用3异常 */
deviceStatus?: string;
/** 准驾车型 {cartype} */
drivingLicenseType?: string;
/** 终点库位号 {zdkwh} */
endPointNo?: string;
/** 考车路线 */
examLineArray?: string;
/** 所属考官对应的用户id [sys_user.user_id] */
examManId?: number;
/** 考试场次 {kscc} */
examRound?: number;
/** 当前登录随车考试员id [examiner_info.id] */
examinerId?: number;
/** 考场区域代号 */
fieldId?: string;
/** 百米脉冲 */
hundredMeterPulse?: string;
/** 主键 */
id?: number;
/** 监控审核人脸识别方式0无人脸识别1视频截图方式2考车上传方式 {isface} */
isFace?: string;
/** 是否更新map_collect 01 {is_mapcollect} */
isMapCollect?: string;
/** 是否需要审核01 */
isReview?: string;
/** 上一次登录随车考试员 [examiner_info.id] */
lastExaminerId?: number;
/** 考车号牌 {carcode} */
licensePlate?: string;
/** 模型id [model_info.id] {modelid} */
modelId?: number;
/** 导航线路 {dhxl} */
navigationLine?: string;
/** 考车对应软件版本 */
softwareVersion?: string;
/** 更新者 */
updateBy?: string;
/** 更新时间 */
updateTime?: string;
/** 车辆型号 */
vehicleModel?: string;
/** 考车对应车辆识别代号 */
vin?: string;
/** 考试路线 */
wayNo?: number;
};
type ExamInfoVo = {
bk1?: string;
bz1?: string;
cartype?: string;
czlx?: string;
fieldid?: string;
flag?: string;
fz?: string;
jdxx?: string;
jxmc?: string;
kchp?: string;
kfxm?: string;
kscc?: string;
kscx?: string;
ksdd?: string;
kskm?: string;
kslx?: string;
ksmjzp?: string;
kssycs?: string;
ksxl?: string;
ksy1?: string;
ksy1sfzmhm?: string;
ksy2?: string;
ksy2sfzmhm?: string;
kszp?: string;
kszt?: string;
ktbh?: string;
lsh?: string;
motorType?: string;
roadway?: string;
securityGuard?: string;
sfcode?: string;
sfzmhm?: string;
updatetime?: string;
xb?: string;
xh?: string;
xldm?: string;
xm?: string;
ykrq?: string;
yycs?: string;
zkzmbh?: string;
zwxx1?: string;
zwxx2?: string;
zwxx3?: string;
zwxx4?: string;
};
type ExamPointInfo_ = {
/** 考场地址 {address} */
address?: string;
/** 考场车辆类型1小车2大车3摩托{is_motor} */
carType?: string;
/** 创建者 */
createBy?: string;
/** 创建时间 */
createTime?: string;
/** 所属部门id [sys_dept.dept_id] {organize_id} */
deptId?: number;
/** 考点名称 {name} */
deptName?: string;
/** 准驾车型(列表,逗号隔开) {car_type} */
drivingLicenseType?: string;
/** 考点代码 {code} */
examPointCode?: string;
/** 考点全称 {fullname} */
fullName?: string;
/** 主键 */
id?: number;
/** 联系人 {contact} */
master?: string;
/** 联系电话 {phone} */
phone?: string;
/** 电子地图映射信息json */
photoInfo?: string;
/** 电子地图图片路径 {path} */
photoPath?: string;
/** 备注 */
remark?: string;
/** 考试科目 {type} */
subjectType?: string;
/** 更新者 */
updateBy?: string;
/** 更新时间 */
updateTime?: string;
};
type GpsIPUdpIP_ = {
/** 车辆品牌名称 */
carBrandName?: string;
/** 准驾车型C1、C2... */
drivingLicenseType?: string;
/** GPS差分服务器地址 */
gpsAddress?: string;
/** 是否需要自检0不需要自检1需要自检 */
isNeedCheck?: string;
/** 百米脉冲 */
pulse?: string;
/** 考试科目 */
subjectType?: string;
/** UDP服务器数据端口号 */
udpDataPort?: string;
/** UDP服务器ip */
udpIp?: string;
/** UDP服务器消息端口号 */
udpMessagePort?: string;
/** 语音对讲服务ip */
voiceIp?: string;
/** 语音对讲服务端口号 */
voicePort?: string;
};
type GpsIPUdpIP2 = {
/** 车牌号 */
licensePlate: string;
/** 评判版本号 */
softwareVersion: string;
};
type MarkRuleSet = {
itemName?: string;
itemno?: string;
kfxh?: string;
markcatalog?: string;
markdepend?: string;
markreal?: string;
markserial?: string;
markshow?: string;
markstandard?: string;
};
type paramConfigDataSyncUsingGETParams = {
/** tableName */
tableName: string;
};
type Pinyin__ = {
/** 车牌号 */
licensePlate: string;
/** 考试里程{kslc} */
mileage: number;
/** 流水号 */
serialNo: string;
/** 特殊扣分内容 */
specialSub?: string;
};
type Pinyin_10 = {
/** 考车id */
gunCameraInfos?: Pinyin_9[];
};
type Pinyin_11 = {
/** 小红球程序编号 */
deviceNo: string;
/** 小红球消息 */
message: string;
};
type Pinyin_12 = {
kaoShengXinXi?: ExamInfoVo[];
};
type Pinyin_13 = {
b2no?: string;
c1no?: string;
c2no?: string;
c5no?: string;
deviceNo?: string;
fieldId?: string;
kscc?: string;
};
type Pinyin_14 = {
judgeVersion?: string;
kdid?: string;
kskm?: string;
markRuleSet?: MarkRuleSet[];
shellVersion?: string;
speendParam?: string;
vehicleSpeend?: VehicleSpeend[];
};
type Pinyin_15 = {
/** 小红球程序编号 */
deviceNo: string;
};
type Pinyin_16 = {
aqyphoto?: string;
aqysfzmhm?: string;
aqyxm?: string;
bkhgkssj?: string;
jxmc?: string;
kch?: string;
kchp?: string;
kclx?: string;
kcmc?: string;
kscs?: string;
kscx?: string;
ksxl?: string;
ksyphoto?: string;
ksysfzmhm?: string;
ksyxm?: string;
lsh?: string;
sfzmhm?: string;
xm?: string;
yycs?: string;
zp1?: string;
zp2?: string;
zwh?: string;
};
type Pinyin_17 = {
/** 考车编号 */
carNo: string;
/** 小红球程序编号 */
deviceNo: string;
/** 流水号 */
serialNo: string;
};
type Pinyin_18 = {
/** 随车考试员编号 */
examinerCode?: string;
/** 车牌号 */
licensePlate: string;
/** 流水号 */
serialNo: string;
};
type Pinyin_19 = {
/** 安徽已考项目 */
ahykxx?: string;
/** 大车初考项目 */
firstABykxx?: string;
/** 考试剩余次数 */
kssycs?: string;
/** 考试预约流水号 */
lsh?: string;
/** 摩托车考试模式 */
motorType?: string;
/** 大车补考项目 */
secondABykxx?: string;
/** 约考信息,内容如:开始时间;里程;考试项目;扣分项目;特殊地方扣分明细 */
ykxx?: string;
};
type Pinyin_2 = {
/** 文件base64 */
examData: string;
/** 考试结束时间 */
examEndTime: string;
/** 考试开始时间 */
examStartTime: string;
/** 文件名称type=2/3时需要传 */
fileName?: string;
/** 车牌号 */
licensePlate: string;
/** 流水号 */
serialNo: string;
/** 文件类型鸿蒙考车固定传10本地轨迹1监管轨迹2轨迹回放3注意力识别 */
type: string;
};
type Pinyin_20 = {
/** 考车请求时间跟下面请求数据data中的业务发生时间相同这里用作设备时差校验 */
carSendTime: string;
/** 请求数据详见无锡所接口文档。JSON对象 */
data: Record<string, any>;
/** 文件列表 */
files?: WxsBaseFileBean[];
/** 车牌号 */
licensePlate: string;
/** 接口编号例如02-21-000009考试开始 */
restCode: string;
};
type Pinyin_21 = {
/** 设备imei号 */
imei: string;
/** 用户登录时间戳 */
loginTime: number;
/** md5加密串(根据imei号+时间戳+盐混淆) */
signKey: string;
};
type Pinyin_22 = {
/** 中心服务器当前时间 */
time?: string;
};
type Pinyin_23 = {
/** 设备名称 */
deviceName: string;
/** 设备编号 */
deviceNo: string;
/** 设备类型1考车2闸机3大屏4指纹仪5拍照 */
type: string;
};
type Pinyin_24 = {
/** 考试项目 */
bk1?: string;
/** 备注1 0,0, */
bz1?: string;
/** 考试车型考生表的carType */
cartype?: string;
/** 操作类型 */
czlx?: string;
/** 考试区域 */
fieldid?: string;
/** 考试是否合格 */
flag?: string;
/** 考试分组 */
fz?: string;
/** 阶段信息 */
jdxx?: string;
/** 驾校名称 */
jxmc?: string;
/** 考车号牌 */
kchp?: string;
/** 扣分项目 */
kfxm?: string;
/** 考试场次 */
kscc?: string;
/** 考试车型 */
kscx?: string;
/** 考试地点,考场编号 */
ksdd?: string;
/** 考试科目 */
kskm?: string;
/** 考试类型 */
kslx?: string;
/** ksmjzp */
ksmjzp?: string;
/** 考试剩余次数 */
kssycs?: string;
/** 考试线路-实用 */
ksxl?: string;
/** 考试员姓名1 */
ksy1?: string;
/** 考试员1身份证号 */
ksy1sfzmhm?: string;
/** 考试员随车考试员2 */
ksy2?: string;
/** 考试员2身份证号 */
ksy2sfzmhm?: string;
/** 考生照片base64编码 */
kszp?: string;
/** 考试状态 */
kszt?: string;
/** 考台编号 */
ktbh?: string;
/** 考试预约流水号 */
lsh?: string;
/** 摩托车考试模式 1.先考科目2再考科目3 2.科目2 3.科目3 4.先考科目3再考科目2 */
motorType?: string;
/** 车道 */
roadway?: string;
/** 安全员姓名 */
securityGuard?: string;
/** 6位身份编码 */
sfcode?: string;
/** 身份证号 */
sfzmhm?: string;
/** 上车更新时间 */
updatetime?: string;
/** 考生性别 */
xb?: string;
/** 序号 */
xh?: string;
/** 监管线路代码,上传用 */
xldm?: string;
/** 考生姓名 */
xm?: string;
/** 约考日期 */
ykrq?: string;
/** 预约次数 */
yycs?: string;
/** 准考证明编号admissionNo */
zkzmbh?: string;
/** 指纹1 */
zwxx1?: string;
/** 指纹2 */
zwxx2?: string;
/** 指纹3 */
zwxx3?: string;
/** 指纹4 */
zwxx4?: string;
};
type Pinyin_25 = {
/** 设备号 */
deviceNo: string;
/** 照片1 */
firstImage: string;
/** 照片2 */
secondImage: string;
/** 身份证号码 */
sfzh: string;
};
type Pinyin_26 = {
/** 车牌号 */
licensePlate: string;
/** 流水号 */
serialNo: string;
};
type Pinyin_27 = {
/** 类别1外壳2视屏3评判4接口 */
category: string;
/** 车牌号 */
licensePlate: string;
/** 日志内容 */
logData: string;
/** 考车日志类型1升级日2错误日志 */
logType: string;
/** 考车发生时间格式yyyy-MM-dd HH:mm:ss */
vehicleTime: string;
};
type Pinyin_28 = {
/** 设备编号 */
deviceNo: string;
};
type Pinyin_29 = {
/** 自检结果附带信息 */
condition: string;
/** 自检结果1合格0不合格 */
flag: string;
/** 车牌号 */
licensePlate: string;
};
type Pinyin_3 = {
/** 车牌号 */
licensePlate: string;
};
type Pinyin_30 = {
/** 考车编号 */
carNo?: string;
/** 车辆类型 */
carType?: string;
/** 身份证号 */
cardNo?: string;
/** 设备编号 */
deviceNo?: string;
faceVerifyRes?: string;
/** fieldId */
fieldId?: string;
fingerVerifyRes?: string;
/** 体温是否正常标志 */
health?: string;
/** 6位身份编码 */
idNoSix?: string;
/** 考官证件号码 */
kgCardNo?: string;
/** 人工过门禁原因 */
manualReason?: string;
/** mixModel */
mixModel?: string;
/** 人脸识别度 */
rlsbValue?: string;
/** 流水号 */
serialNo?: string;
sfzzp?: string;
/** 考试科目 */
subjectType?: string;
/** 体温值 */
temperature?: string;
/** 体温照片1 */
twzp1?: string;
/** 体温照片2 */
twzp2?: string;
/** 照片 */
zp?: string;
zw1?: string;
zw2?: string;
zw3?: string;
zw4?: string;
};
type Pinyin_31 = {
/** 模型内容base64 */
content: string;
/** 文件名 */
filename: string;
};
type Pinyin_32 = {
/** 车牌号 */
licensePlate: string;
};
type Pinyin_33 = {
/** 车牌号码 */
licensePlate: string;
};
type Pinyin_34 = {
/** 车牌号 */
licensePlate: string;
};
type Pinyin_35 = {
/** 是否需要自检0不需要自检1需要自检 */
isNeedCheck?: string;
/** 自检项目 */
items?: string;
/** 串口号 */
portNo?: string;
/** 重试次数 */
retryTime?: string;
/** 1取反0不取反例如安全带取反且离合器不取反即1^0 */
reverse?: string;
};
type Pinyin_36 = {
/** 住址 */
addr?: string;
/** 设备编号 */
deviceNo?: string;
/** fieldId */
fieldId?: string;
/** 考官证件号码 */
kgsfzmhm?: string;
/** 考试科目 */
kskm?: string;
/** 流水号 */
lsh?: string;
/** mixModel */
mixModel?: string;
/** 身份证号 */
sfzh: string;
/** 姓名 */
xm?: string;
};
type Pinyin_37 = {
/** 设备号 */
deviceNo?: string;
/** 照片1 */
firstImage?: string;
/** 考试科目 */
kskm?: string;
/** 认证次数 */
rzcs?: string;
/** 照片2 */
secondImage: string;
/** 身份证号码 */
sfzh: string;
/** 设备类型(1、门禁2、考车3、过程) */
type: string;
/** 审核类型(2、人工审核) */
verifyType?: string;
};
type Pinyin_38 = {
/** 设备硬件号 */
deviceNo: string;
/** 门禁程序版本号 */
gateVersion: string;
};
type Pinyin_39 = {
/** 随车考试员登录用户名(可以是身份证号、员工号、制卡号等等) */
examinerName: string;
/** 随车考试员密码 */
examinerPwd?: string;
/** 车牌号 */
licensePlate: string;
};
type Pinyin_4 = {
/** 考生信息列表 */
studentList?: Pinyin_24[];
};
type Pinyin_40 = {
/** 指纹信息1 */
finger1?: string;
/** 指纹信息2 */
finger2?: string;
/** 随车考试员姓名 */
name?: string;
};
type Pinyin_5 = {
/** 车牌号码 */
licensePlate: string;
/** 表名,大写 */
tableName: string;
};
type Pinyin_6 = {
/** car_mac */
car_mac: string;
/** 设备类型1海康2大华 */
equipment_type: string;
/** 第一路通道 */
first_channel: string;
/** 第一路ip */
first_ip: string;
/** 第一路密码 */
first_password: string;
/** 第一路端口 */
first_port: string;
/** 第一路用户名 */
first_username: string;
/** 第四路通道 */
fourth_channel: string;
/** 第四路ip */
fourth_ip: string;
/** 第四路密码 */
fourth_password: string;
/** 第四路端口 */
fourth_port: string;
/** 第四路用户名 */
fourth_username: string;
/** 连接类型0主码流TCP方式1子码流TCP方式2主码流UDP方式3子码流UDP方式 */
line_type: string;
/** 拍照通道 */
photo_channel: string;
/** 叠加内容11.考生姓名身份证号3.当前项目4.当前时间) */
photo_overlay_text_content1: string;
/** 叠加内容21.考生姓名身份证号3.当前项目4.当前时间0 */
photo_overlay_text_content2: string;
/** 叠加内容31.考生姓名身份证号3.当前项目4.当前时间0 */
photo_overlay_text_content3: string;
/** 照片叠加文字1启用0关闭 */
photo_overlay_text_enable: string;
/** 位置1左上角2右上角3左下角4.右下角) */
photo_overlay_text_position: string;
/** 文字大小 */
photo_overlay_text_size: string;
/** 分割符1/2*\3换行 */
photo_overlay_text_split: string;
/** 启用过程人脸比对 {process_face_comparion_enable} */
process_face_comparion_enable: string;
/** 过程人脸比对模式1启用0关闭 {process_face_comparion_mode} */
process_face_comparion_mode: string;
/** 第二路通道 */
second_channel: string;
/** 第二路ip */
second_ip: string;
/** 第二路密码 */
second_password: string;
/** 第二路端口 */
second_port: string;
/** 第二路用户名 */
second_username: string;
/** 第三路通道 */
third_channel: string;
/** 第三路ip */
third_ip: string;
/** 第三路密码 */
third_password: string;
/** 第三路端口 */
third_port: string;
/** 第三路用户名 */
third_username: string;
/** 视频路数 */
video_channel: string;
/** 录像方式0本地录像1本地不录象 */
video_mode: string;
/** 视频遮挡 */
video_occlusion: string;
/** 视频遮挡范围1一路2二路3三路4四路 */
video_occlusion_range: string;
/** 视频叠加位置X */
video_overlay_position_x: string;
/** 视频叠加位置Y */
video_overlay_position_y: string;
/** 视频叠加内容11考生姓名2身份证号3当前项目4当前时间 */
video_overlay_text_content1: string;
/** 视频叠加内容21考生姓名2身份证号3当前项目4当前时间0 */
video_overlay_text_content2: string;
/** 视频叠加内容31考生姓名2身份证号3当前项目4当前时间0 */
video_overlay_text_content3: string;
/** 视频叠加文字1启用0关闭 */
video_overlay_text_enable: string;
/** 视频叠加分割符1/2*\3换行 */
video_overlay_text_split: string;
/** 录像范围1一路2二路3三路4四路 */
video_range: string;
/** 本考车对应视频合成服务器IP填错将不能开始考试 */
video_synthesis_server_ip: string;
/** 本考车对应视频合成服务器端口(填错将不能开始考试) */
video_synthesis_server_port: string;
/** 本考车对应视频合成信息处理系统IP填错或不填将可能导致录像丢失 */
video_synthesis_system_ip: string;
/** 本考车对应视频合成信息处理系统本地响应端口(填错或不填将可能导致录像丢失) */
video_synthesis_system_port: string;
};
type Pinyin_7 = {
/** 车牌号 */
licensePlate: string;
};
type Pinyin_8 = {
/** 车辆品牌列表 */
carBrandList?: CarBrand_[];
/** 考车列表 */
carInfoList?: CarInfo_[];
/** 考点列表 */
examPointInfoList?: ExamPointInfo_[];
};
type Pinyin_9 = {
/** 摄像头通道号 */
channel?: string;
/** 硬盘录像机ip */
deviceIP?: string;
/** 监管场地编号 */
equipmentId?: string;
/** 非全景绑定的全景 */
fullId?: string;
/** 全景区域坐标 */
gpsArea?: string;
/** 摄像头id */
id?: string;
/** 是否全景摄像头 */
isFull?: string;
/** 硬盘录像机密码 */
password?: string;
/** 硬盘录像机端口 */
port?: string;
/** 硬盘录像机用户名 */
user?: string;
};
type ROf_ = {
/** 状态码 1成功 0通用失败 */
code: number;
data?: Pinyin_4;
/** 返回消息 */
msg: string;
};
type ROf10 = {
/** 状态码 1成功 0通用失败 */
code: number;
data?: Pinyin_31;
/** 返回消息 */
msg: string;
};
type ROf11 = {
/** 状态码 1成功 0通用失败 */
code: number;
data?: Pinyin_35;
/** 返回消息 */
msg: string;
};
type ROf12 = {
/** 状态码 1成功 0通用失败 */
code: number;
data?: Pinyin_40;
/** 返回消息 */
msg: string;
};
type ROf2 = {
/** 状态码 1成功 0通用失败 */
code: number;
data?: Pinyin_6;
/** 返回消息 */
msg: string;
};
type ROf3 = {
/** 状态码 1成功 0通用失败 */
code: number;
data?: Pinyin_8;
/** 返回消息 */
msg: string;
};
type ROf4 = {
/** 状态码 1成功 0通用失败 */
code: number;
data?: Pinyin_10;
/** 返回消息 */
msg: string;
};
type ROf5 = {
/** 状态码 1成功 0通用失败 */
code: number;
data?: Pinyin_12;
/** 返回消息 */
msg: string;
};
type ROf6 = {
/** 状态码 1成功 0通用失败 */
code: number;
data?: Pinyin_14;
/** 返回消息 */
msg: string;
};
type ROf7 = {
/** 状态码 1成功 0通用失败 */
code: number;
data?: Pinyin_16;
/** 返回消息 */
msg: string;
};
type ROf8 = {
/** 状态码 1成功 0通用失败 */
code: number;
data?: Pinyin_19;
/** 返回消息 */
msg: string;
};
type ROf9 = {
/** 状态码 1成功 0通用失败 */
code: number;
data?: Pinyin_22;
/** 返回消息 */
msg: string;
};
type ROfGpsIPUdpIP_ = {
/** 状态码 1成功 0通用失败 */
code: number;
data?: GpsIPUdpIP_;
/** 返回消息 */
msg: string;
};
type ROfListOfobject = {
/** 状态码 1成功 0通用失败 */
code: number;
/** 承载数据 */
data?: Record<string, any>[];
/** 返回消息 */
msg: string;
};
type ROfobject = {
/** 状态码 1成功 0通用失败 */
code: number;
/** 承载数据 */
data?: Record<string, any>;
/** 返回消息 */
msg: string;
};
type VehicleSpeend = {
carType?: string;
speend?: string;
};
type WxsBaseFileBean = {
/** 文件内容base64编码 */
data: string;
/** 文件类别或id */
fileid: string;
};
}

View File

@ -0,0 +1,96 @@
import Prompt from '@system.prompt';
import http from '@ohos.net.http';
enum RequestMethod {
OPTIONS = "OPTIONS",
GET = "GET",
HEAD = "HEAD",
POST = "POST",
PUT = "PUT",
DELETE = "DELETE",
TRACE = "TRACE",
CONNECT = "CONNECT"
}
const BaseUrl = ""
interface Response {
code: number,
data: any,
msg: string
}
export async function request<T>(
url: string,
config: {
method: string;
params?: any;
data?: any
[key: string]: any
}
): Promise<T> {
const httpRequest = http.createHttp();
return new Promise((resolve, reject) => {
console.info("start request url: ", url, "request params: ", JSON.stringify(config.params || config.data || {}))
httpRequest.request(BaseUrl + url,
{
method: config.method as RequestMethod,
header: {
...config.header,
},
extraData: {
...(config.params || {}),
...(config.data || {})
},
expectDataType: http.HttpDataType.OBJECT,
connectTimeout: 60000, //超时时间
}).then(async (data) => {
let result = data.result as Response
if (result.code === 1) {
console.info("success request url: ", url)
console.info(JSON.stringify(result))
resolve(data.result as T)
} else if (result.code === 401) {
// console.error("401 request", url)
// let user = await PreferenceUtils.getUserModel()
// if (user?.isLogin) {
// userLoginUsingPost({
// account: user.account,
// psd: user.password,
// }).then(res => {
// let newUser: UserModel = new UserModel(res.data)
// newUser.account = user.account
// newUser.password = user.password
// newUser.isLogin = true
// PreferenceUtils.writeUserData(newUser)
// request(url, config)
// }).catch(() => {
// PreferenceUtils.writeUserData(new UserModel())
// if (router.getState().name !== "Login") {
// router.pushUrl({ url: "pages/Login" })
// }
// })
// } else {
// PreferenceUtils.writeUserData(new UserModel())
// if (router.getState().name !== "Login") {
// router.pushUrl({ url: "pages/Login" })
// }
// }
} else {
console.error("error request url: ", url)
console.error(result.msg)
reject(result.msg)
Prompt.showToast({
message: result.msg,
duration: 2000,
})
}
}).catch((err) => {
console.error("error request url: ", BaseUrl + url)
console.error(err)
reject(err)
})
});
}