Merge remote-tracking branch 'outer/代理服务方案' into 代理服务方案
This commit is contained in:
commit
23f58579c2
@ -92,33 +92,6 @@ export default async function writeObjectOutNew(data, filePath): Promise<WR> {
|
||||
})
|
||||
}
|
||||
temp = await fn()
|
||||
|
||||
// temp = await request({
|
||||
// host: globalThis.JGHOST,
|
||||
// method: 'post',
|
||||
// //是否是新中心
|
||||
// isNewCenter: true,
|
||||
// xml: true,
|
||||
// url: '/dems_ws/services/TmriOutAccess?wsdl',
|
||||
// data: `<?xml version="1.0"?>
|
||||
// <SOAP-ENV:Envelope
|
||||
// xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
|
||||
// xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
// xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
|
||||
// >
|
||||
// <SOAP-ENV:Body>
|
||||
// <writeObjectOut xmlns="http://service.es.doron">
|
||||
// <wglb>${wglb}</wglb>
|
||||
// <jkxlh>${jkxlh}</jkxlh>
|
||||
// <glbm>${glbm}</glbm>
|
||||
// <jgbh>${jgbh}</jgbh>
|
||||
// <sjbs>${sjbs}</sjbs>
|
||||
// <data>${JSON.stringify(params.data)}</data>
|
||||
// <file>${JSON.stringify(params.file)}</file>
|
||||
// </writeObjectOut>
|
||||
// </SOAP-ENV:Body>
|
||||
// </SOAP-ENV:Envelope>`,
|
||||
// })
|
||||
} catch (e) {
|
||||
console.log("新监管错误")
|
||||
temp = e
|
||||
|
||||
@ -164,9 +164,11 @@ export default class Judge {
|
||||
}
|
||||
// 处理特殊参数配置
|
||||
handleSEP = async (code: number) => {
|
||||
const {judgeUI:{
|
||||
const {
|
||||
judgeUI:{
|
||||
judgeConfigObj
|
||||
},avPlayer} = this;
|
||||
}, avPlayer
|
||||
} = this;
|
||||
const { examSubject } = globalThis.carInfo;
|
||||
|
||||
switch (code) {
|
||||
@ -330,7 +332,8 @@ export default class Judge {
|
||||
checkExamIsEnd =
|
||||
async (isManual?: boolean) => {
|
||||
const { judgeUI, avPlayer, isExamEnd, isEndTip, ksjs } = this;
|
||||
const {isAllProjectsEnd,examSubject,singlePlay,totalScore,judgeConfigObj,passingScore,examMileage,jl} = judgeUI;
|
||||
const { isAllProjectsEnd, examSubject, singlePlay, totalScore, judgeConfigObj, passingScore, examMileage, jl } =
|
||||
judgeUI;
|
||||
|
||||
if (isExamEnd) {
|
||||
return
|
||||
@ -353,7 +356,8 @@ export default class Judge {
|
||||
if (isAllProjectsEnd && jl >= examMileage) {
|
||||
//成绩合格
|
||||
if (totalScore >= passingGrade && !isEndTip) {
|
||||
if (examSubject == 3 && (param342 == 0 || param342 == 2) && (param302 != 6 || param302 != 7 || param302 != 8)) {
|
||||
if (examSubject == 3 && (param342 == 0 || param342 == 2) &&
|
||||
(param302 != 6 || param302 != 7 || param302 != 8)) {
|
||||
if (param512[7] != 0) {
|
||||
clearTimeout(this.deductedPopShowTimer)
|
||||
avPlayer.playAudio(['voice/综合评判.mp3'])
|
||||
@ -410,7 +414,8 @@ export default class Judge {
|
||||
return
|
||||
}
|
||||
|
||||
if (examSubject == 3 && (param342 == 0 || param342 == 2) && (param302 != 6 || param302 != 7 || param302 != 8)) {
|
||||
if (examSubject == 3 && (param342 == 0 || param342 == 2) &&
|
||||
(param302 != 6 || param302 != 7 || param302 != 8)) {
|
||||
if (param512[7] != 0) {
|
||||
clearTimeout(this.deductedPopShowTimer)
|
||||
this.judgeUI.isDeductedPopShow = false
|
||||
@ -534,7 +539,9 @@ export default class Judge {
|
||||
const sbxh = getSbbm(ksxm, xmxh)
|
||||
const data = {
|
||||
//系统类别 接口序列号 接口标识
|
||||
xtlb: '17', jkxlh: serialNumber, jkid: '17C52',
|
||||
xtlb: '17',
|
||||
jkxlh: serialNumber,
|
||||
jkid: '17C52',
|
||||
drvexam: {
|
||||
// 考试科目 身份证号码
|
||||
lsh,
|
||||
@ -569,7 +576,9 @@ export default class Judge {
|
||||
const sbxh = examSubject == 3 ? undefined : getSbbm(ksxm, xmxh)
|
||||
|
||||
const data = {
|
||||
xtlb: '17', jkxlh: serialNumber, jkid: '17C55',
|
||||
xtlb: '17',
|
||||
jkxlh: serialNumber,
|
||||
jkid: '17C55',
|
||||
drvexam: {
|
||||
lsh,
|
||||
kskm: examSubject,
|
||||
@ -592,33 +601,6 @@ export default class Judge {
|
||||
console.info(judgeTag, '项目结束 end')
|
||||
promptWxCode('17C55', code)
|
||||
}
|
||||
private artSubject3ProjectsCodesArr: number[] = [3, 9, 4, 10, 12, 11]
|
||||
private lane: LANE = {
|
||||
road: '', num: 0, count: 0
|
||||
}
|
||||
private videoData: any
|
||||
private disConnectNum: number = 0;
|
||||
//调用监管接口
|
||||
sendWriteObjectOut = async (data, filePath) => {
|
||||
const temp = await writeObjectOut(data, filePath);
|
||||
console.log("wzj", JSON.stringify(temp))
|
||||
//断网&网络超时次数计算
|
||||
if (temp.code == 2300007 || temp.code == 2300028) {
|
||||
this.disConnectNum += 1;
|
||||
if (this.disConnectNum < 5) {
|
||||
return await this.sendWriteObjectOut(data, filePath)
|
||||
}
|
||||
}
|
||||
|
||||
if (this.disConnectNum >= 5) {
|
||||
console.info('surenjun', '123')
|
||||
this.judgeUI.errorMsg = '当前的考试过程信息网络传输异常,程序点击确认将重启!';
|
||||
this.judgeUI.disConnectErrorOpen = true
|
||||
}
|
||||
|
||||
this.disConnectNum = 0
|
||||
return temp
|
||||
}
|
||||
// 考试过程照片
|
||||
uploadProgressPhoto = async (ksxm) => {
|
||||
const time = await getCurrentTime();
|
||||
@ -631,7 +613,9 @@ export default class Judge {
|
||||
const project = projectsObj[ksxm]
|
||||
|
||||
const data = {
|
||||
xtlb: '17', jkxlh: serialNumber, jkid: '17C54',
|
||||
xtlb: '17',
|
||||
jkxlh: serialNumber,
|
||||
jkid: '17C54',
|
||||
drvexam: {
|
||||
lsh,
|
||||
kskm: examSubject,
|
||||
@ -652,6 +636,12 @@ export default class Judge {
|
||||
promptWxCode('17C54', code)
|
||||
console.info(judgeTag, '上传照片 end')
|
||||
}
|
||||
private artSubject3ProjectsCodesArr: number[] = [3, 9, 4, 10, 12, 11]
|
||||
private lane: LANE = {
|
||||
road: '', num: 0, count: 0
|
||||
}
|
||||
private videoData: any
|
||||
private disConnectNum: number = 0;
|
||||
|
||||
constructor(judgeUI) {
|
||||
this.serialIndex = 1;
|
||||
@ -696,6 +686,38 @@ export default class Judge {
|
||||
this.isExamEnd = false;
|
||||
}
|
||||
|
||||
//调用监管接口
|
||||
sendWriteObjectOut = async (data, filePath) => {
|
||||
const temp = await writeObjectOut(data, filePath);
|
||||
console.log("wzj", JSON.stringify(temp))
|
||||
if (this.disConnectNum == 0) {
|
||||
console.log("wzj", "第一次发送", JSON.stringify(data))
|
||||
}
|
||||
if (this.disConnectNum < 5 && this.disConnectNum > 0) {
|
||||
console.log("wzj", "第" + this.disConnectNum + "次重新发送", JSON.stringify(data))
|
||||
}
|
||||
//断网&网络超时次数计算
|
||||
if (temp.code == 2300007 || temp.code == 2300028) {
|
||||
this.disConnectNum += 1;
|
||||
if (this.disConnectNum < 5) {
|
||||
if (temp.code == 2300028) {
|
||||
await new Promise(resolve => setTimeout(resolve, 1000)); // 延迟1秒
|
||||
} else {
|
||||
return await this.sendWriteObjectOut(data, filePath)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.disConnectNum >= 5) {
|
||||
console.info('surenjun', '123')
|
||||
this.judgeUI.errorMsg = '当前的考试过程信息网络传输异常,程序点击确认将重启!';
|
||||
this.judgeUI.disConnectErrorOpen = true
|
||||
}
|
||||
|
||||
this.disConnectNum = 0
|
||||
return temp
|
||||
}
|
||||
|
||||
public async onJudgeFn(fn: Function) {
|
||||
await this.judging(fn)
|
||||
}
|
||||
@ -760,7 +782,8 @@ export default class Judge {
|
||||
const { sczb, kfdm } = currentParams;
|
||||
const { isExam } = this;
|
||||
const judgeUI = this.judgeUI
|
||||
const {projects,carType,kssycs,isDdxk,ddxkTime,projectsCenterObj,ddxkKsxmArr,ddxkKfArr,passingScore} = judgeUI;
|
||||
const { projects, carType, kssycs, isDdxk, ddxkTime, projectsCenterObj, ddxkKsxmArr, ddxkKfArr, passingScore } =
|
||||
judgeUI;
|
||||
const beginInfo = {
|
||||
kgid: '012',
|
||||
kgxm: decodeURI(examinerName || ''),
|
||||
@ -1083,7 +1106,8 @@ export default class Judge {
|
||||
console.info('surenjun', '扣分开始')
|
||||
//扣分时实时播报语音(0-否+1-是)
|
||||
const currentKf = kf[kfLen -1];
|
||||
if (judgeConfig.kfVoiceOpen || (examSubject == 2 && judgeConfigObj['618'] == '1') || (examSubject == 3 && judgeConfigObj['418'] == '1')) {
|
||||
if (judgeConfig.kfVoiceOpen || (examSubject == 2 && judgeConfigObj['618'] == '1') ||
|
||||
(examSubject == 3 && judgeConfigObj['418'] == '1')) {
|
||||
avPlayer.playAudio([`voice/${currentKf.markcatalog}.mp3`, `voice/mark_${Math.abs(currentKf.score)}.mp3`])
|
||||
}
|
||||
const isStart = await checkProjectIsStart(currentKf.xmdm, 2, currentKf);
|
||||
@ -1152,7 +1176,9 @@ export default class Judge {
|
||||
})
|
||||
|
||||
const data = {
|
||||
xtlb: '17', jkxlh: serialNumber, jkid: '17C53',
|
||||
xtlb: '17',
|
||||
jkxlh: serialNumber,
|
||||
jkid: '17C53',
|
||||
drvexam: {
|
||||
lsh,
|
||||
kskm: examSubject,
|
||||
@ -1219,7 +1245,8 @@ export default class Judge {
|
||||
// globalThis.windowClass.setWindowSystemBarEnable(['navigation'])
|
||||
|
||||
//自动退出待验证并且不合格
|
||||
if (!isManual && examSubject == 3 && (param302 == 1 || (singlePlay && param302 == 2)) && totalScore < passingScore) {
|
||||
if (!isManual && examSubject == 3 && (param302 == 1 || (singlePlay && param302 == 2)) &&
|
||||
totalScore < passingScore) {
|
||||
avPlayer.playAudio([`voice/考试结束.mp3`])
|
||||
}
|
||||
//联网模式下手动结束的直接退出
|
||||
@ -1281,7 +1308,9 @@ export default class Judge {
|
||||
const photoBase64 = await getPhoto();
|
||||
const { d1, d2, d3, d4, d5 } = ksjs
|
||||
const data = {
|
||||
xtlb: '17', jkxlh: serialNumber, jkid: '17C56',
|
||||
xtlb: '17',
|
||||
jkxlh: serialNumber,
|
||||
jkid: '17C56',
|
||||
drvexam: {
|
||||
lsh,
|
||||
kchp: encodeURI(plateNo),
|
||||
@ -1321,7 +1350,8 @@ export default class Judge {
|
||||
let voiceURL = ''
|
||||
if (examSubject == 2) {
|
||||
if (isAllProjectsEnd) {
|
||||
voiceURL = (totalScore < passingScore ? `voice/unqualified_${kssycs == 1 ? 'one' : 'two'}.wav` : 'voice/qualified.mp3')
|
||||
voiceURL =
|
||||
(totalScore < passingScore ? `voice/unqualified_${kssycs == 1 ? 'one' : 'two'}.wav` : 'voice/qualified.mp3')
|
||||
} else {
|
||||
voiceURL = `voice/unqualified_${kssycs == 1 ? 'one' : 'two'}.wav`
|
||||
currentKssycs = kssycs == 1 ? 0 : 1
|
||||
@ -1465,9 +1495,11 @@ export default class Judge {
|
||||
} = this;
|
||||
const singlePlay = globalThis.singlePlay
|
||||
const { lsh, startHourTime, totalScore, examTime, judgeConfigObj } = judgeUI;
|
||||
const {fourInOneScreen:{
|
||||
const {
|
||||
fourInOneScreen:{
|
||||
gpsDigit
|
||||
}} = judgeConfig
|
||||
}
|
||||
} = judgeConfig
|
||||
const examType = examSubject == 2 ? 2 : 3
|
||||
const { sensor, gps } = tempData;
|
||||
if (tempData.sensor === undefined) {
|
||||
@ -1490,7 +1522,8 @@ export default class Judge {
|
||||
const ascksyhArr = stringToASC(fillZero(ksyh || 0, 13))
|
||||
const ascsbxhArr = stringToASC(sbxh)
|
||||
const translateSignals = getTranslateSignals(
|
||||
[zfxd, yfxd, shtd, ygd, jgd, skd, dh1, dh2, lhq, jsc, ssc, fsc, lb, mkg, aqd].concat(getDwStatusType(dw)).concat(getCarStatusType(carzt)).concat([ygq, sensor.wd, 0])
|
||||
[zfxd, yfxd, shtd, ygd, jgd, skd, dh1, dh2, lhq, jsc, ssc, fsc, lb, mkg, aqd].concat(getDwStatusType(dw))
|
||||
.concat(getCarStatusType(carzt)).concat([ygq, sensor.wd, 0])
|
||||
)
|
||||
//@ts-ignore
|
||||
const translateJd = convertGpsCoord2(wd).toFixed(gpsDigit) * Math.pow(10, gpsDigit);
|
||||
@ -1518,7 +1551,8 @@ export default class Judge {
|
||||
translateSignals,
|
||||
//速度 发动机转速 GPS纬度 GPS经度 主天线位置
|
||||
//@ts-ignore
|
||||
string2Bytes(tempSd * 100, 2 * 8), string2Bytes(fdjzs / 100, 8), string2Bytes(translateJd, 4 * 8), string2Bytes(translateWd, 4 * 8), string2Bytes(1, 8),
|
||||
string2Bytes(tempSd * 100, 2 * 8), string2Bytes(fdjzs / 100, 8), string2Bytes(translateJd, 4 * 8),
|
||||
string2Bytes(translateWd, 4 * 8), string2Bytes(1, 8),
|
||||
//GPS东向距离
|
||||
string2Bytes(dxjl < 0 ? (dxjl + 4294967296) : dxjl, 4 * 8),
|
||||
//GPS北向距离
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user