大车初始化
This commit is contained in:
parent
fd5b20f788
commit
d56167a911
@ -4,13 +4,13 @@
|
|||||||
{
|
{
|
||||||
"name": "default",
|
"name": "default",
|
||||||
"material": {
|
"material": {
|
||||||
"certpath": "/Users/wangzhongjie/.ohos/config/openharmony/default_car_next_xIuD6UMCLxZgyeiH-w2XdDck6DewIfdHAvOk_FUbNZo=.cer",
|
"certpath": "C:/Users/93218/.ohos/config/openharmony/default_harmony_vehicle_terminal_j6U20r4hUBYNJsocRUYxzV96xIPQLMTqn59Ua3h6tI4=.cer",
|
||||||
"storePassword": "0000001BF9AB68E8C3E0439D2AA8D641FD06550209928E9CB41AFB9E4D799D516B7D7DB8B1863601225968",
|
"storePassword": "0000001A3FBAE9120A580DE1C9D5F8AB398DD7175A8B9FABFBA723C6EB0B2BB78768AAB20CD625EDB6A8",
|
||||||
"keyAlias": "debugKey",
|
"keyAlias": "debugKey",
|
||||||
"keyPassword": "0000001B4363BBA79693F55689ED8AD636125B8928CFC30F51866D1190ABC6372B58D7025E2650A53AFD2B",
|
"keyPassword": "0000001AC5B516340EAB600B1F9452419BB8A854BB2BBCC2E47FCA97B67D93556BBF50F322FA80CC4A21",
|
||||||
"profile": "/Users/wangzhongjie/.ohos/config/openharmony/default_car_next_xIuD6UMCLxZgyeiH-w2XdDck6DewIfdHAvOk_FUbNZo=.p7b",
|
"profile": "C:/Users/93218/.ohos/config/openharmony/default_harmony_vehicle_terminal_j6U20r4hUBYNJsocRUYxzV96xIPQLMTqn59Ua3h6tI4=.p7b",
|
||||||
"signAlg": "SHA256withECDSA",
|
"signAlg": "SHA256withECDSA",
|
||||||
"storeFile": "/Users/wangzhongjie/.ohos/config/openharmony/default_car_next_xIuD6UMCLxZgyeiH-w2XdDck6DewIfdHAvOk_FUbNZo=.p12"
|
"storeFile": "C:/Users/93218/.ohos/config/openharmony/default_harmony_vehicle_terminal_j6U20r4hUBYNJsocRUYxzV96xIPQLMTqn59Ua3h6tI4=.p12"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@ -41,9 +41,13 @@ import { BaseJudge, GetSysSetResult } from './Typing';
|
|||||||
import { GetSyncData } from '../../utils/table/Operation';
|
import { GetSyncData } from '../../utils/table/Operation';
|
||||||
import promptAction from '@ohos.promptAction';
|
import promptAction from '@ohos.promptAction';
|
||||||
import { JudgePage } from '../Judge';
|
import { JudgePage } from '../Judge';
|
||||||
|
import systemDateTime from '@ohos.systemDateTime';
|
||||||
|
|
||||||
|
|
||||||
export class LargeJudge implements BaseJudge {
|
export class LargeJudge implements BaseJudge {
|
||||||
|
private mockLight: boolean = false
|
||||||
|
private mode: number = 1
|
||||||
|
|
||||||
private async GetJudgeBeginData(projects: Project[], carType: string, kssycs: string, isDdxk: boolean, ddxkTime: number, projectsCenterObj: Object, ddxkKsxmArr: string[], ddxkKfArr: string[], passingScore: number, wayno: number, name: string, lsh: string, idCard: string, isExam: boolean) {
|
private async GetJudgeBeginData(projects: Project[], carType: string, kssycs: string, isDdxk: boolean, ddxkTime: number, projectsCenterObj: Object, ddxkKsxmArr: string[], ddxkKfArr: string[], passingScore: number, wayno: number, name: string, lsh: string, idCard: string, isExam: boolean) {
|
||||||
const examinerInfo = AppStorage.get<ExaminerInfoType>('examinerInfo')
|
const examinerInfo = AppStorage.get<ExaminerInfoType>('examinerInfo')
|
||||||
const examinerName = examinerInfo?.name || ""
|
const examinerName = examinerInfo?.name || ""
|
||||||
@ -84,7 +88,7 @@ export class LargeJudge implements BaseJudge {
|
|||||||
ykkkcs: 1,
|
ykkkcs: 1,
|
||||||
wayno: Number(wayno),
|
wayno: Number(wayno),
|
||||||
czlx: 0,
|
czlx: 0,
|
||||||
kskssj: await systemTime.getCurrentTime(),
|
kskssj: await systemDateTime.getCurrentTime(),
|
||||||
passing: Number(passingScore),
|
passing: Number(passingScore),
|
||||||
ksxm,
|
ksxm,
|
||||||
//断点续考
|
//断点续考
|
||||||
@ -96,9 +100,9 @@ export class LargeJudge implements BaseJudge {
|
|||||||
special: [],
|
special: [],
|
||||||
sczb: (sczb === undefined || sczb == '0') ? 0 : 1,
|
sczb: (sczb === undefined || sczb == '0') ? 0 : 1,
|
||||||
sczbkf: kfdm,
|
sczbkf: kfdm,
|
||||||
dmndg: false,
|
dmndg: this.mockLight,
|
||||||
mfxx: false,
|
mfxx: this.mode === 5,
|
||||||
mfxxn: false
|
mfxxn: this.mode === 3 || this.mode === 4
|
||||||
}
|
}
|
||||||
dConsole.info(JudgeTag, '5.获取开始考试数据完成')
|
dConsole.info(JudgeTag, '5.获取开始考试数据完成')
|
||||||
return beginInfo
|
return beginInfo
|
||||||
@ -167,12 +171,12 @@ export class LargeJudge implements BaseJudge {
|
|||||||
return initInfo
|
return initInfo
|
||||||
};
|
};
|
||||||
|
|
||||||
public async JudgeInit(mode: number, carName: string): Promise<GetSysSetResult> {
|
public async JudgeInit(carName: string): Promise<GetSysSetResult> {
|
||||||
const systemParams = await GetSyncData<SYSTEM_PARAM>('MA_SYSTEMPARM')
|
const systemParams = await GetSyncData<SYSTEM_PARAM>('MA_SYSTEMPARM')
|
||||||
let currentParams: RouteParamsType = router.getParams() as RouteParamsType;
|
let currentParams: RouteParamsType = router.getParams() as RouteParamsType;
|
||||||
|
this.mode = currentParams.mode
|
||||||
let totalScore: number
|
let totalScore: number
|
||||||
let wayno: number
|
let wayno: number
|
||||||
let mockLight: boolean
|
|
||||||
let carlist: string
|
let carlist: string
|
||||||
let passingScore: number
|
let passingScore: number
|
||||||
let examMileage: string
|
let examMileage: string
|
||||||
@ -182,7 +186,7 @@ export class LargeJudge implements BaseJudge {
|
|||||||
let singlePlay: boolean = AppStorage.get("singlePlay")
|
let singlePlay: boolean = AppStorage.get("singlePlay")
|
||||||
let systemparmArr: Array<SYSTEM_PARAM> = []
|
let systemparmArr: Array<SYSTEM_PARAM> = []
|
||||||
let projects: Array<Project> = []
|
let projects: Array<Project> = []
|
||||||
if (mode === 2) {
|
if (this.mode === 2) {
|
||||||
totalScore = Number(currentParams.score) || totalScore
|
totalScore = Number(currentParams.score) || totalScore
|
||||||
}
|
}
|
||||||
if (singlePlay) {
|
if (singlePlay) {
|
||||||
@ -191,7 +195,7 @@ export class LargeJudge implements BaseJudge {
|
|||||||
//真实监管下发的项目
|
//真实监管下发的项目
|
||||||
let kStringArr: string[] = (currentParams.kString?.split(',') || []).filter(item => item);
|
let kStringArr: string[] = (currentParams.kString?.split(',') || []).filter(item => item);
|
||||||
// 单机模式下增驾进模拟灯光
|
// 单机模式下增驾进模拟灯光
|
||||||
mockLight = kStringArr.includes("41700") || singlePlay && mode === 3
|
this.mockLight = kStringArr.includes("41700") || singlePlay && this.mode === 3
|
||||||
|
|
||||||
let isInExam = kStringArr.length > 0;
|
let isInExam = kStringArr.length > 0;
|
||||||
|
|
||||||
@ -216,27 +220,27 @@ export class LargeJudge implements BaseJudge {
|
|||||||
//根据车型获取应行驶里程数
|
//根据车型获取应行驶里程数
|
||||||
if (no1 == 3 && no3 == 15 && Number(carNo) == no2) {
|
if (no1 == 3 && no3 == 15 && Number(carNo) == no2) {
|
||||||
let mileage = (decodeURI(systemParam.txt1) || '').split('^')
|
let mileage = (decodeURI(systemParam.txt1) || '').split('^')
|
||||||
if (mode === 1) {
|
if (this.mode === 1) {
|
||||||
examMileage = mileage[1]
|
examMileage = mileage[1]
|
||||||
} else if (mode === 2) {
|
} else if (this.mode === 2) {
|
||||||
examMileage = mileage[2]
|
examMileage = mileage[2]
|
||||||
} else {
|
} else {
|
||||||
examMileage = mileage[0]
|
examMileage = mileage[0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 满分学习里程
|
// 满分学习里程
|
||||||
if (mode === 5 && no1 == 3 && no2 == Number(carNo) && no3 == 63) {
|
if (this.mode === 5 && no1 == 3 && no2 == Number(carNo) && no3 == 63) {
|
||||||
let data = decodeURI(systemParam.txt1)?.split("^")
|
let data = decodeURI(systemParam.txt1)?.split("^")
|
||||||
examMileage = data[1] || examMileage
|
examMileage = data[1] || examMileage
|
||||||
}
|
}
|
||||||
//获取当前考车的考试项目
|
//获取当前考车的考试项目
|
||||||
if (mode === 2 && no1 == 3 && no2 == Number(carNo) && no3 == 46) {
|
if (this.mode === 2 && no1 == 3 && no2 == Number(carNo) && no3 == 46) {
|
||||||
// 夜考必考项目读取
|
// 夜考必考项目读取
|
||||||
allItems = decodeURIComponent(systemParam.txt1).split(',').filter(txt => txt !== '')
|
allItems = decodeURIComponent(systemParam.txt1).split(',').filter(txt => txt !== '')
|
||||||
} else if (mode !== 2 && no1 == 3 && no2 == Number(carNo) && no3 == 10) {
|
} else if (this.mode !== 2 && no1 == 3 && no2 == Number(carNo) && no3 == 10) {
|
||||||
// 其他模式必考项目获取
|
// 其他模式必考项目获取
|
||||||
allItems = decodeURIComponent(systemParam.txt1).split(',').filter(txt => txt !== '')
|
allItems = decodeURIComponent(systemParam.txt1).split(',').filter(txt => txt !== '')
|
||||||
} else if (mode == 5 && no1 == 3 && no2 == Number(carNo) && no3 == 63) {
|
} else if (this.mode == 5 && no1 == 3 && no2 == Number(carNo) && no3 == 63) {
|
||||||
// 满分学习项目
|
// 满分学习项目
|
||||||
let data = decodeURI(systemParam.txt1)?.split("^")
|
let data = decodeURI(systemParam.txt1)?.split("^")
|
||||||
allItems = data[0]?.split(",").filter(item => item !== "") || []
|
allItems = data[0]?.split(",").filter(item => item !== "") || []
|
||||||
@ -259,19 +263,19 @@ export class LargeJudge implements BaseJudge {
|
|||||||
if (no1 == 6) {
|
if (no1 == 6) {
|
||||||
const name = decodeURI(systemParam.txt1)
|
const name = decodeURI(systemParam.txt1)
|
||||||
// 白考过滤掉夜间行驶
|
// 白考过滤掉夜间行驶
|
||||||
if (mode !== 2 && no2 == 13) {
|
if (this.mode !== 2 && no2 == 13) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 模拟夜间驾驶(灯光)
|
// 模拟夜间驾驶(灯光)
|
||||||
if (!mockLight && no2 == 41) {
|
if (!this.mockLight && no2 == 41) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let isRequired = (mode === 5 && allItems.length === 0) || allItems.includes(no2 + '')
|
let isRequired = (this.mode === 5 && allItems.length === 0) || allItems.includes(no2 + '')
|
||||||
let isEnd = false
|
let isEnd = false
|
||||||
let isUpload = false
|
let isUpload = false
|
||||||
|
|
||||||
// 夜考除夜间行驶其他项目不需要重复上传
|
// 夜考除夜间行驶其他项目不需要重复上传
|
||||||
if (mode === 2 && no2 != 13) {
|
if (this.mode === 2 && no2 != 13) {
|
||||||
isUpload = true
|
isUpload = true
|
||||||
}
|
}
|
||||||
// 加减档自动完成,为非必须项目
|
// 加减档自动完成,为非必须项目
|
||||||
@ -291,7 +295,7 @@ export class LargeJudge implements BaseJudge {
|
|||||||
isUpload,
|
isUpload,
|
||||||
}
|
}
|
||||||
// 夜考时
|
// 夜考时
|
||||||
if (mode === 2 && no2 != 13) {
|
if (this.mode === 2 && no2 != 13) {
|
||||||
currentProject.ykType = isRequired ? "1" : "3"
|
currentProject.ykType = isRequired ? "1" : "3"
|
||||||
currentProject.isEnd = !allItems.includes(no2 + '')
|
currentProject.isEnd = !allItems.includes(no2 + '')
|
||||||
}
|
}
|
||||||
@ -300,7 +304,7 @@ export class LargeJudge implements BaseJudge {
|
|||||||
projects.push(currentProject);
|
projects.push(currentProject);
|
||||||
|
|
||||||
// 真实监管下发考试项目, 夜考模式不进此逻辑
|
// 真实监管下发考试项目, 夜考模式不进此逻辑
|
||||||
if (isInExam && mode !== 2 && !(kStringArr.includes(txt2) || kStringArr.includes(no2 + ''))) {
|
if (isInExam && this.mode !== 2 && !(kStringArr.includes(txt2) || kStringArr.includes(no2 + ''))) {
|
||||||
projectsObj[no2*1].type = '3'
|
projectsObj[no2*1].type = '3'
|
||||||
projectsObj[no2*1].isUpload = true
|
projectsObj[no2*1].isUpload = true
|
||||||
projectsObj[no2*1].isEnd = true
|
projectsObj[no2*1].isEnd = true
|
||||||
@ -329,7 +333,6 @@ export class LargeJudge implements BaseJudge {
|
|||||||
return {
|
return {
|
||||||
totalScore,
|
totalScore,
|
||||||
wayno,
|
wayno,
|
||||||
mockLight,
|
|
||||||
carlist,
|
carlist,
|
||||||
passingScore,
|
passingScore,
|
||||||
examMileage,
|
examMileage,
|
||||||
|
|||||||
@ -42,6 +42,7 @@ import { BaseJudge, GetSysSetResult } from './Typing';
|
|||||||
import { GetSyncData } from '../../utils/table/Operation';
|
import { GetSyncData } from '../../utils/table/Operation';
|
||||||
import promptAction from '@ohos.promptAction';
|
import promptAction from '@ohos.promptAction';
|
||||||
import { JudgePage } from '../Judge';
|
import { JudgePage } from '../Judge';
|
||||||
|
import systemDateTime from '@ohos.systemDateTime';
|
||||||
|
|
||||||
|
|
||||||
export class SmallJudge implements BaseJudge {
|
export class SmallJudge implements BaseJudge {
|
||||||
@ -85,7 +86,7 @@ export class SmallJudge implements BaseJudge {
|
|||||||
ykkkcs: 1,
|
ykkkcs: 1,
|
||||||
wayno: Number(wayno),
|
wayno: Number(wayno),
|
||||||
czlx: 0,
|
czlx: 0,
|
||||||
kskssj: await systemTime.getCurrentTime(),
|
kskssj: await systemDateTime.getCurrentTime(),
|
||||||
passing: Number(passingScore),
|
passing: Number(passingScore),
|
||||||
ksxm,
|
ksxm,
|
||||||
//断点续考
|
//断点续考
|
||||||
@ -168,12 +169,11 @@ export class SmallJudge implements BaseJudge {
|
|||||||
return initInfo
|
return initInfo
|
||||||
};
|
};
|
||||||
|
|
||||||
public async JudgeInit(mode: number, carName: string): Promise<GetSysSetResult> {
|
public async JudgeInit(carName: string): Promise<GetSysSetResult> {
|
||||||
const systemParams = await GetSyncData<SYSTEM_PARAM>('MA_SYSTEMPARM')
|
const systemParams = await GetSyncData<SYSTEM_PARAM>('MA_SYSTEMPARM')
|
||||||
let currentParams: RouteParamsType = router.getParams() as RouteParamsType;
|
let currentParams: RouteParamsType = router.getParams() as RouteParamsType;
|
||||||
let totalScore: number
|
let totalScore: number
|
||||||
let wayno: number
|
let wayno: number
|
||||||
let mockLight: boolean
|
|
||||||
let carlist: string
|
let carlist: string
|
||||||
let passingScore: number
|
let passingScore: number
|
||||||
let examMileage: string
|
let examMileage: string
|
||||||
@ -184,9 +184,6 @@ export class SmallJudge implements BaseJudge {
|
|||||||
let systemparmArr: Array<SYSTEM_PARAM> = []
|
let systemparmArr: Array<SYSTEM_PARAM> = []
|
||||||
let projects: Array<Project> = []
|
let projects: Array<Project> = []
|
||||||
let examSubject: string = ""
|
let examSubject: string = ""
|
||||||
if (mode === 2) {
|
|
||||||
totalScore = Number(currentParams.score) || totalScore
|
|
||||||
}
|
|
||||||
if (singlePlay) {
|
if (singlePlay) {
|
||||||
wayno = Number(currentParams.wayno) || 1;
|
wayno = Number(currentParams.wayno) || 1;
|
||||||
}
|
}
|
||||||
@ -288,7 +285,6 @@ export class SmallJudge implements BaseJudge {
|
|||||||
return {
|
return {
|
||||||
totalScore,
|
totalScore,
|
||||||
wayno,
|
wayno,
|
||||||
mockLight,
|
|
||||||
carlist,
|
carlist,
|
||||||
passingScore,
|
passingScore,
|
||||||
examMileage,
|
examMileage,
|
||||||
|
|||||||
@ -6,7 +6,6 @@ import { JudgePage } from "../Judge"
|
|||||||
export interface GetSysSetResult {
|
export interface GetSysSetResult {
|
||||||
totalScore: number
|
totalScore: number
|
||||||
wayno: number
|
wayno: number
|
||||||
mockLight: boolean
|
|
||||||
carlist: string
|
carlist: string
|
||||||
passingScore: number
|
passingScore: number
|
||||||
examMileage: string
|
examMileage: string
|
||||||
@ -19,7 +18,7 @@ export interface GetSysSetResult {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface BaseJudge {
|
export interface BaseJudge {
|
||||||
JudgeInit: (mode: number, carName: string) => Promise<GetSysSetResult>
|
JudgeInit: (carName: string) => Promise<GetSysSetResult>
|
||||||
JudgeStart: (callBack: Function, judgeUI: JudgePage, that: JudgeBusiness) => void
|
JudgeStart: (callBack: Function, judgeUI: JudgePage, that: JudgeBusiness) => void
|
||||||
Judging: (strData: string, callBack: Function, judgeUI: JudgePage, that: JudgeBusiness) => void
|
Judging: (strData: string, callBack: Function, judgeUI: JudgePage, that: JudgeBusiness) => void
|
||||||
JudgeEnd: (judgeUI: JudgePage, that: JudgeBusiness, isManual?: boolean) => void
|
JudgeEnd: (judgeUI: JudgePage, that: JudgeBusiness, isManual?: boolean) => void
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user