fix: 优化文件关闭
This commit is contained in:
parent
6eb48607ba
commit
268623c6e4
@ -12,6 +12,7 @@ import {
|
||||
} from '../model';
|
||||
import FileUtils from '../utils/FileUtils';
|
||||
import { GetSyncData } from '../utils/table/Operation';
|
||||
import { JudgeTag } from '../config';
|
||||
|
||||
//监管接口序列号映射
|
||||
const gjxlhObj: Record<string, string> = {
|
||||
@ -52,7 +53,7 @@ export default async function writeObjectOutNew(data: RegulatoryInterfaceParams,
|
||||
}
|
||||
|
||||
// let connectTimeout = sjbs === '02-21-000014' ?60000:1
|
||||
console.info('surenjun', '调用新监管')
|
||||
console.info(JudgeTag, '调用新监管')
|
||||
let temp: WR
|
||||
try {
|
||||
const JGHOST: string = AppStorage.get<string>('JGHOST') || ""
|
||||
|
||||
@ -271,7 +271,7 @@ export struct JudgePage {
|
||||
BK2: carInfo.bk2!,
|
||||
X_MCH: carInfo.x_mch || "",
|
||||
})
|
||||
dConsole.info(JudgeTag, 'surenjun =>carinfoArrr', JSON.stringify(this.carinfoArr))
|
||||
dConsole.info(JudgeTag, '=>carinfoArrr', JSON.stringify(this.carinfoArr))
|
||||
}
|
||||
|
||||
// 获取考生信息
|
||||
@ -320,7 +320,7 @@ export struct JudgePage {
|
||||
async initSysset(sysset?: SYSSET[]) {
|
||||
const syssetParams: SYSSET[] | MASYSSETTableType[] = sysset || await GetSyncData<MASYSSETTableType>('MA_SYSSET')
|
||||
const serialNumberArr = (syssetParams as SYSSET[]).filter(sys => sys.v_no === '901');
|
||||
dConsole.info(JudgeTag, 'surenjun serialNumberArr' + JSON.stringify(serialNumberArr))
|
||||
dConsole.info(JudgeTag, 'serialNumberArr' + JSON.stringify(serialNumberArr))
|
||||
this.serialNumber = (serialNumberArr[0] && serialNumberArr[0].v_value) || '';
|
||||
const syssetJudgeConfigArr: SyssetConfig[] = []
|
||||
|
||||
@ -471,7 +471,7 @@ export struct JudgePage {
|
||||
const examItems: string | undefined = currentParams?.examItems;
|
||||
// 2024-01-03 16:29:26;0;20300,;2,4^2,4;null;
|
||||
if (examItems !== '' && examItems !== undefined) {
|
||||
dConsole.info(JudgeTag, 'surenjun examItems=>', examItems)
|
||||
dConsole.info(JudgeTag, 'examItems=>', examItems)
|
||||
const examItemsArrs = examItems.split(';');
|
||||
const startTime = examItemsArrs[0]
|
||||
const ddxkKsxmArr = examItemsArrs[2]?.split(',').filter(item => item) || []
|
||||
@ -570,7 +570,7 @@ export struct JudgePage {
|
||||
const projectCode = artSubject3ProjectsCodesArr[index]
|
||||
let sideParkingStatus = GetIsExitManualProject(index, this.judgeConfigObj, this.artSubject3ProjectsCodesArr, this.projectsObj, this.carztStr, this.isManualProjectIn, this.isProjectIn, this.jl, this.examMileage, this.isRequiredProjectsEnd, this.lane)
|
||||
if (index === 5) {
|
||||
dConsole.info(JudgeTag, 'surenjun 靠边停车状态=> ', sideParkingStatus)
|
||||
dConsole.info(JudgeTag, '靠边停车状态=> ', sideParkingStatus)
|
||||
}
|
||||
const currentProject: ProjectInfo = Reflect.get(projectsObj, projectCode)
|
||||
if (sideParkingStatus) {
|
||||
@ -594,7 +594,7 @@ export struct JudgePage {
|
||||
if (xmmcStr == '无' || xmmcStr == '') {
|
||||
//512[6] 人工项目按钮放大确认
|
||||
const param512: string[] = (Reflect.get(this.judgeConfigObj, '512') || '').split(',');
|
||||
dConsole.info(JudgeTag, 'surenjun', param512)
|
||||
dConsole.info(JudgeTag, param512)
|
||||
if (param512[6] !== '0') {
|
||||
this.amplifiedImgIndex = index;
|
||||
this.isAmplifyPopShow = true
|
||||
|
||||
@ -79,7 +79,7 @@ export class BaseJudge {
|
||||
}
|
||||
|
||||
async goJudgeVoice(sound: JudgeSound, avPlayer: VoiceAnnounce) {
|
||||
dConsole.info(JudgeTag, 'surenjun code=>', JSON.stringify(sound.code))
|
||||
dConsole.info(JudgeTag, 'code=>', JSON.stringify(sound.code))
|
||||
//判断是不是模拟灯光语音
|
||||
if (sound.type == 1) {
|
||||
avPlayer?.playAudio([`voice/${sound.code[0]}.mp3`], false, () => {
|
||||
@ -751,7 +751,8 @@ export class BaseJudge {
|
||||
}
|
||||
|
||||
async judgeEnd(judgeUI: JudgePage, that: JudgeBusiness, isManual?: boolean) {
|
||||
dConsole.info("lixiao", 'surenjun 收到远程结束考试消息3')
|
||||
dConsole.info(JudgeTag, '收到远程结束考试消息3')
|
||||
dConsole.closeProcessData()
|
||||
const isAllProjectsEnd = judgeUI.isAllProjectsEnd
|
||||
const examSubject = judgeUI.examSubject
|
||||
const singlePlay = judgeUI.singlePlay
|
||||
|
||||
@ -126,7 +126,7 @@ export default class JudgeBusiness {
|
||||
|
||||
// 结束考试
|
||||
public JudgeEnd(isManual?: boolean) {
|
||||
dConsole.info("lixiao", 'surenjun 收到远程结束考试消息1')
|
||||
dConsole.info("lixiao", '收到远程结束考试消息1')
|
||||
this.judgeBusiness.JudgeEnd(this.judgeUI, this, isManual)
|
||||
}
|
||||
|
||||
|
||||
@ -115,8 +115,6 @@ export async function examJudgeBeginExam(data: JudgeBeginObj) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* @desc结束考试
|
||||
*
|
||||
@ -205,7 +203,7 @@ async function handle(temp: number, fnName: string): Promise<number> {
|
||||
if (temp == 0) {
|
||||
resolve(temp);
|
||||
} else {
|
||||
dConsole.error('surenjun error:' + `调用c++函数 ${fnName} 异常:` + libJudgeSdk.examJudgeErrorInfo(temp * 1))
|
||||
dConsole.error('error:' + `调用c++函数 ${fnName} 异常:` + libJudgeSdk.examJudgeErrorInfo(temp * 1))
|
||||
reject(temp)
|
||||
}
|
||||
})
|
||||
|
||||
@ -252,8 +252,7 @@ export class SmallJudge extends BaseJudge implements BaseJudgeImpl {
|
||||
const no2Num = Number(no2)
|
||||
//真实监管下发考试项目
|
||||
if (isInExam && !(kStringArr.includes(txt2) || kStringArr.includes(no2 + ''))) {
|
||||
dConsole.info(JudgeTag, 'surenjun =>', txt2)
|
||||
dConsole.info(JudgeTag, 'surenjun => no2', no2)
|
||||
dConsole.info(JudgeTag, '=> no2', no2)
|
||||
currentProject.type = '3'
|
||||
currentProject.isUpload = true
|
||||
currentProject.isEnd = true
|
||||
@ -330,7 +329,7 @@ export class SmallJudge extends BaseJudge implements BaseJudgeImpl {
|
||||
}
|
||||
|
||||
public async JudgeEnd(judgeUI: JudgePage, that: JudgeBusiness, isManual?: boolean) {
|
||||
dConsole.info("lixiao", 'surenjun 收到远程结束考试消息2')
|
||||
dConsole.info(JudgeTag, '收到远程结束考试消息2')
|
||||
super.judgeEnd(judgeUI, that, isManual)
|
||||
};
|
||||
}
|
||||
|
||||
@ -126,7 +126,7 @@ export function getKmProjectVoice(
|
||||
const param544Str: number[] = (Reflect.get(judgeConfig, '544')?.split(',')) || []
|
||||
const param405Str: number = Reflect.get(judgeConfig, '405') || 0;
|
||||
|
||||
dConsole.info('surenjun => param544Str.length', param544Str.length)
|
||||
dConsole.info('param544Str.length', param544Str.length)
|
||||
|
||||
const num: number = lane?.num
|
||||
const count: number = lane?.count
|
||||
|
||||
@ -865,7 +865,7 @@ struct UserInfoPage {
|
||||
let result = JSON.parse(msg) as WorkerBackMessage
|
||||
|
||||
if (result.type === WorkerBackMessageType.RemoteStartExam) {
|
||||
dConsole.log('surenjun', 'userInfo收到开始考试事件')
|
||||
dConsole.log('userInfo收到开始考试事件')
|
||||
if (this.isBoardPrePareSetPopupOpen && !this.isFirstBoardPrePareSetPopupBtnShow) {
|
||||
this.prePareSCZB()
|
||||
} else {
|
||||
|
||||
@ -190,7 +190,7 @@ export default struct DeductedPopup {
|
||||
// const carInfo = this.carInfo;
|
||||
// const { examSubject, plateNo, carNo } = carInfo;
|
||||
const time = GetCurrentTime();
|
||||
dConsole.info('surenjun uploadProgressPhoto',)
|
||||
dConsole.info('uploadProgressPhoto',)
|
||||
const photoBase64 = await GetPhotoBase64(this.context)
|
||||
const photoData: RegulatoryInterfaceParams = {
|
||||
xtlb: '17',
|
||||
@ -210,7 +210,7 @@ export default struct DeductedPopup {
|
||||
}
|
||||
};
|
||||
const code = await writeObjectOut(photoData, "", this.context);
|
||||
dConsole.info('surenjun uploadProgressPhoto end',)
|
||||
dConsole.info('uploadProgressPhoto end',)
|
||||
}
|
||||
|
||||
// 扣分
|
||||
|
||||
@ -55,7 +55,7 @@ export default class FileModel {
|
||||
try {
|
||||
return this.fileUtil?.getFileContent(`${folderPath}/${fileName}`);
|
||||
} catch (e) {
|
||||
dConsole.info('surenjun', JSON.stringify(e));
|
||||
dConsole.info(JSON.stringify(e));
|
||||
promptAction.showToast({
|
||||
message: `请检查模型路径${folderPath}/${fileName}是否正确!`,
|
||||
duration: 4000
|
||||
|
||||
@ -16,7 +16,7 @@ export default class GetDistance {
|
||||
public initFolder = async () => {
|
||||
const time = GetCurrentTime()
|
||||
const folderPath = await this.fileUtil.initFolder(`/车辆行驶距离统计`);
|
||||
console.info('surenjun folderPath=>', folderPath);
|
||||
console.info('folderPath=>', folderPath);
|
||||
const date = time.split(' ')[0].split('-').join('_')
|
||||
const timeStr = time.split(' ')[1]
|
||||
this.timeStr = timeStr
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user