Compare commits

...

8 Commits

Author SHA1 Message Date
fc43decbb7 问题修改 2025-04-27 10:27:57 +08:00
27a11a4225 问题修改 2025-04-25 17:05:33 +08:00
90c348eb47 问题修改 2025-04-25 17:05:14 +08:00
e03483d16f 问题修改 2025-04-25 17:04:50 +08:00
cb9ea64d9b 问题修改 2025-04-25 16:26:18 +08:00
df6ca8d40f 问题修改 2025-04-25 16:17:03 +08:00
436d9fc2a0 问题修改 2025-04-25 15:39:02 +08:00
6bc04eee49 问题修改 2025-04-25 13:46:12 +08:00
16 changed files with 229 additions and 85 deletions

View File

@ -27,7 +27,7 @@
#define JUDGE_VERSION_MAJOR 1
#define JUDGE_VERSION_MINOR 0
#define JUDGE_VERSION_PATCH 3
#define JUDGE_VERSION_STAMP "2504241045b"
#define JUDGE_VERSION_STAMP "2504251910b"
#if JUDGE_USE_OLD
# undef JUDGE_VERSION_STAMP
# define JUDGE_VERSION_STAMP "2411121010b.old"

View File

@ -247,6 +247,7 @@ namespace sound
sound_sub3(456001); // \sound\通过急弯.wav
sound_sub3(458001); // \sound\通过拱桥.wav
sound_sub3(zhpp); // \sound\综合评判.wav 请考官综合评判
sound_sub3(ksjs); // \sound\考试结束.wav
sound_subx(xmqx); //项目取消

View File

@ -656,7 +656,7 @@ bool ExamCarSub3::Init_KM3_Global()
//examItem->TestPro = ItemProFlagIdle;
//examItem->FinishFlag = true;
examItem->NoID = true;
KM3EndItem(itemNo,false,false);
KM3EndItem(itemNo,isReplay(),false); //轨迹回放工具回放模式要发时间,不然项目不好变绿
}
}
}
@ -1270,7 +1270,6 @@ void ExamCarSub3::Deal_KM3_Judge()
m_curItem = nullptr;
dealItemNoIDEnd14Jjdw(); //必须放这里
dealItemNoIDEndItem(); //必须放这里
//执行具体的专项评判
std::string msg;
@ -1325,6 +1324,7 @@ void ExamCarSub3::Deal_KM3_Judge()
}
}
finishExamBroad();
//如果考试结束(训练不存在结束的概念,都是界面上点击结束考试,一般科目三都是可以重复进项目的)
if(isExamMode()) //考试模式的
{
@ -3883,24 +3883,24 @@ bool ExamCarSub3::KM3AllPass()
return true;
}
for(auto it = m_sub3Items.begin(); it != m_sub3Items.end(); it++)
{
const TKM3Item* item = it->second->getExamItem();
//必考项目未完成
if(item->NoID == false && (item->Item_Color == itemStateWk || item->Item_Color == itemStateZk))
{
return false;
}
//科目三项目结束,免考项目处理
//重要流程
if(item->NoID == true) //20240731
{
if(item->FinishFlag == false)
{
KM3EndItem(item->ItemNo);
}
}
}
//for(auto it = m_sub3Items.begin(); it != m_sub3Items.end(); it++)
//{
// const TKM3Item* item = it->second->getExamItem();
// //必考项目未完成
// if(item->NoID == false && (item->Item_Color == itemStateWk || item->Item_Color == itemStateZk))
// {
// return false;
// }
// //科目三项目结束,免考项目处理
// //重要流程
// if(item->NoID == true) //20240731
// {
// if(item->FinishFlag == false)
// {
// KM3EndItem(item->ItemNo);
// }
// }
//}
return true;
}
@ -5011,24 +5011,6 @@ void ExamCarSub3::dealOffset()
}
void ExamCarSub3::dealItemNoIDEndItem()
{
if(isMileage())
{
for(auto it = m_sub3Items.begin(); it != m_sub3Items.end(); it++)
{
TKM3Item* item = it->second->getExamItem();
if(item->NoID == true && item->ItemNo != Sub3ItemType14Jjdw) //20240731
{
if(item->FinishFlag == false)
{
KM3EndItem(item->ItemNo);
}
}
}
}
}
void ExamCarSub3::dealItemNoIDEnd14Jjdw()
{
TKM3Item* item14 = findExamItem(Sub3ItemType14Jjdw); //20240731
if(item14 && item14->NoID == true) //免考加减挡的 即:全程加减档
@ -5048,7 +5030,7 @@ void ExamCarSub3::dealItemNoIDEnd14Jjdw()
else
{
TKM3Item* item = findExamItem(Sub3ItemType11Kbtc);
if(item && item->TestPro == ItemProFlagInit)
if(item && item->TestPro >= ItemProFlagInit)
{
//ToDo1:生成 全程加减挡 进项目事件
//createEventEnterItem({item14->ItemNo, ""});
@ -5057,6 +5039,147 @@ void ExamCarSub3::dealItemNoIDEnd14Jjdw()
}
}
}
if(isMileage())
{
for(auto it = m_sub3Items.begin(); it != m_sub3Items.end(); it++)
{
TKM3Item* item = it->second->getExamItem();
if(item->NoID == true)
{
if(item->ItemNo == Sub3ItemType13Yjxs)
{
if(item->FinishFlag == false)
{
KM3EndItem(item->ItemNo);
}
}
else if(item->ItemNo == Sub3ItemType14Jjdw) //加减档单独处理
{
}
else //20240731
{
if(item->Item_Color == itemStateWk) //&& item->FinishFlag == false
{
KM3EndItem(item->ItemNo);
}
}
}
}
}
}
void ExamCarSub3::finishExamBroad()
{
/*
- 2025-04-25
:
302=4578退;
302=1:.wav
302=3:.wav
:
302=8n秒退出
302=7退
:
302=4退
302=5退
302=6退
*/
bool finish = true;
for(auto it = m_sub3Items.begin(); it != m_sub3Items.end(); it++)
{
const TKM3Item* item = it->second->getExamItem();
if(item->Item_Color == itemStateWk || item->Item_Color == itemStateZk)
{
finish = false;
break;
}
}
bool play_zhpp = false;
bool play_ksjs = false;
bool mileage = isMileage();
bool qualified = isQualified();
bool exam = isExamMode();
const std::string& s302 = TableSysSet->get302();
if(s302 == "0")
{
if(mileage && finish && qualified)
{
play_zhpp = true;
}
}
if(s302 == "1")
{
if(mileage && finish && qualified)
{
play_zhpp = true;
}
if(exam && !qualified)
{
play_ksjs = true;
}
}
else if(s302 == "2")
{
if(mileage && finish && qualified)
{
play_zhpp = true;
}
}
else if(s302 == "3")
{
if(mileage && finish && qualified)
{
play_zhpp = true;
}
if(!qualified)
{
play_ksjs = true;
}
}
else if(s302 == "4")
{
}
else if(s302 == "5")
{
if(mileage && finish && qualified)
{
play_zhpp = true;
}
}
else if(s302 == "6")
{
}
else if(s302 == "7")
{
}
else if(s302 == "8")
{
}
if(play_zhpp)
{
if(!m_pub.play_finish)
{
m_pub.play_finish = true;
createEventSound({Sub3ItemType20Comm, sound::sub3_zhpp}); //请考官综合评判
}
}
if(play_ksjs)
{
if(!m_pub.play_finish)
{
m_pub.play_finish = true;
createEventSound({Sub3ItemType20Comm, sound::sub3_ksjs}); //考试结束
}
}
}
bool ExamCarSub3::calcToLaneArc(const TModelLine& Lxx, const TModelPolygon& poly, const Pointi& b1, const Pointi& pt, int& dm, bool cross)

View File

@ -77,7 +77,8 @@ protected:
void dealOffset(); //行驶距离补偿
void dealItemNoIDEndItem();
void dealItemNoIDEnd14Jjdw();
void finishExamBroad();
bool calcToLaneArc(const TModelLine& Lxx, const TModelPolygon& poly, const Pointi& b1, const Pointi& pt, int& dm, bool cross=false);
bool calcToLaneArc2(const TModelLine& Lxx, const TModelPolygon& area, const Pointi& b1, const Pointi& pt, int& dm, bool cross=false);

View File

@ -1277,10 +1277,6 @@ void Sub3Judge11Kbtc::DoStatus_100()
//ToDo: 语音提示-->请起步,继续完成考试
m_car->createEventSound({itemNo(), sound::sub3_406005});
}
else
{
m_car->createEventSound({itemNo(), sound::sub3_zhpp}); //请考官综合评判
}
}
void Sub3Judge11Kbtc::Judge_KBTC_YaXian()

View File

@ -1596,6 +1596,8 @@ struct TPubKM3
int m_KsZgSs = 0; //记录考试中的最高时速
//int m_KsLjLc = 0; //记录考试累计里程(米)
bool play_finish = false;
};
/*

View File

@ -19,7 +19,7 @@
#define KIT_VERSION_MAJOR 1
#define KIT_VERSION_MINOR 0
#define KIT_VERSION_PATCH 2
#define KIT_VERSION_STAMP "2504241048b"
#define KIT_VERSION_STAMP "2504251142b"
#define KIT_VERSION_STR JUDGE_STR(KIT_VERSION_MAJOR.KIT_VERSION_MINOR.KIT_VERSION_PATCH)

View File

@ -101,18 +101,20 @@ void ShowBeginExam::updateBeginExam(const QString& info)
examEvent->updateExamEvent(text, KIT_RGB_GREEN);
}
for(size_t i = 0; i < value.kfxm.size(); i++)
{
const TKfXm& kfxm = value.kfxm[i];
updateItemProperty(kfxm.xmdm, KIT_RGB_RED);
QString time = kit::toEasyTime(value.kskssj);
QString event = time + CL8("[开始考试带的下发扣分]");
examEvent->updateExamEvent(event + getMarkItemText(findMarkItemText(kfxm)), KIT_RGB_RED);
m_replay->replayItemMarkPush(kfxm.xmdm, kfxm); //???通用项目扣分怎么知道是哪个项目扣分的?
}
if(value.ddxk)
{
for(size_t i = 0; i < value.kfxm.size(); i++)
{
const TKfXm& kfxm = value.kfxm[i];
updateItemProperty(kfxm.xmdm, KIT_RGB_RED);
QString time = kit::toEasyTime(value.kskssj);
QString event = time + CL8("[断点续考扣分]");
examEvent->updateExamEvent(event + getMarkItemText(findMarkItemText(kfxm)), KIT_RGB_RED);
m_replay->replayItemMarkPush(kfxm.xmdm, kfxm); //???通用项目扣分怎么知道是哪个项目扣分的?
}
}
else
{

View File

@ -363,6 +363,15 @@ export async function setJudgeUdp() {
})
console.info('surenjun', `考车发送确定扣分指令,指令为:${directives}`)
},
//申请语音对讲
askVoice() {
globalThis.udpClient2.sendMsgExt({
id: 49,
list: [],
carNo: globalThis.carInfo.carNo,
placeId: globalThis.carInfo.examinationRoomId,
})
}
}
}

View File

@ -26,7 +26,7 @@ import { examJudgeVersion } from './judgeSDK/api';
@Component
struct Index {
@State carNum: string = ''
@State version: string = '2025.04.24.01'
@State version: string = '2025.04.25.01'
@State judgeVersion: string = ''
@State url: string = ''
@State hasAuth: boolean = false;

View File

@ -37,7 +37,6 @@ import promptAction from '@ohos.promptAction';
struct Index {
// 考试模式 1:白考,2:夜考,3:增驾(模拟灯光未考),4:增驾(模拟灯光已考),5:满分学习
private mode: number = 1
// 夜考扣分
private isYkkf: boolean = false
async aboutToDisappear() {
@ -47,9 +46,8 @@ struct Index {
async aboutToAppear() {
let currentParams: any = router.getParams();
this.mode = Number(currentParams.mode)
promptAction.showToast({
message: "当前模式:" + this.mode
})
console.log("当前模式:" + this.mode)
const time = await getCurrentTime()
this.startTime = time.split(' ')[1]
@ -332,10 +330,6 @@ struct Index {
if (this.mode === 2 && no2 != 13) {
isUpload = true
}
// 夜考靠边停车设置为非必须
if (this.mode === 2 && no2 == 11) {
isRequired = false
}
// 加减档自动完成,为非必须项目
if (no2 == 14) {
isRequired = false
@ -462,13 +456,14 @@ struct Index {
const examItems: string = currentParams?.examItems?.[1] || "";
const nightScoreArr = examItems?.split(",").filter(item => item) || []
const ddxkKfArr = kfItems.split(";")?.[3]?.split('^').filter(item => item) || []
console.log("lixiao, goDdxkItems", JSON.stringify(nightScoreArr), JSON.stringify(examItems))
nightScoreArr.forEach((kf, index) => {
this.isYkkf = true
let xmdm = '';
let kfdm = ''
let currentKf
Object.entries(this.markRuleListObj).forEach(([key, value]) => {
if (value.markcatalog == kf) {
if (value.markcatalog == kf && !currentKf) {
[xmdm, kfdm] = key.split('_')
currentKf = value
}
@ -1121,6 +1116,7 @@ struct Index {
return false
}
const projectType = this.projectsObj[projectCode].type;
const ykType = this.projectsObj[projectCode].ykType
//不允许人工触发的项目列表,以","分隔
const unExitManualProjects = this.judgeConfigObj['332'].split(',') || [];
@ -1172,9 +1168,13 @@ struct Index {
return index === 0 ? true : false
}
//项目已经做过,后续不能人工触发
if (param307.includes(projectCode) && (projectType == '3' || projectType == '4')) {
return false
//只做一次的项目已经做过,后续不能人工触发
if (param307.includes(projectCode) && this.mode !== 5) {
if (this.mode === 2) {
return !(ykType == '3' || ykType == '4' || projectType == '3' || projectType == '4')
} else {
return !(projectType == '3' || projectType == '4')
}
}
//319不为0或者387不为1里程不够时靠边停车项目不能触发

View File

@ -433,8 +433,8 @@ struct UserInfo {
async getExamMode(kStringArr: string[]) {
// @ts-ignore
// 满分学习
if (this.currentUser.czlx === 1) {
this.mode === 5
if (this.currentUser.czlx == "1") {
this.mode = 5
return
}
const result = await getSyncData('ES_CARINFO')
@ -925,7 +925,6 @@ struct UserInfo {
console.log("lixiao mode", this.mode)
let score = Number(this.currentUser.jdxx?.split("^")[0])
let kfxm = this.currentUser.jdxx?.split("^")[1]
let length = Number(this.currentUser.jdxx?.split("^")[2])
if (this.mode === 2 && !this.currentUser.jdxx) {
promptAction.showToast({
message: "当前尚未进行白考,无法开始夜考!"

View File

@ -333,7 +333,7 @@ export default class Judge {
async (isManual?: boolean) => {
const {judgeUI,avPlayer,isExamEnd,isEndTip,ksjs} = this;
const {isAllProjectsEnd,examSubject,singlePlay,totalScore,judgeConfigObj,passingScore,examMileage,jl} = judgeUI;
const param302 = judgeConfigObj['302'];
if (isExamEnd) {
return
}
@ -345,7 +345,6 @@ export default class Judge {
this.isExamEnd = true
this.isManual = true
} else {
const param302 = judgeConfigObj['302'];
const param342 = judgeConfigObj['342'];
const param512 = (judgeConfigObj['512'] || '').split(',');
@ -357,11 +356,11 @@ export default class Judge {
if (totalScore >= passingGrade && !isEndTip) {
if (examSubject == 3 && (param342 == 0 || param342 == 2) && (param302 != 6 || param302 != 7 || param302 != 8)) {
if (param512[7] != 0) {
clearTimeout(this.deductedPopShowTimer)
avPlayer.playAudio(['voice/综合评判.mp3'])
this.judgeUI.isDeductedPopShow = true
this.judgeUI.defaultTabIndex = 1
this.isEndTip = true
// clearTimeout(this.deductedPopShowTimer)
// avPlayer.playAudio(['voice/综合评判.mp3'])
// this.judgeUI.isDeductedPopShow = true
// this.judgeUI.defaultTabIndex = 1
// this.isEndTip = true
return
}
} else {
@ -383,9 +382,12 @@ export default class Judge {
//成绩不合格
if (totalScore < passingGrade) {
//科目三不合格报靠边停车
if (examSubject == 3 && param302 == 1) {
avPlayer.playAudio([`voice/考试结束.mp3`]);
return
if (examSubject == 3) {
if (param302 == 1) {
avPlayer.playAudio([`voice/考试结束.mp3`]);
} else if (param302 == 0) {
return
}
}
await examJudgeEndExam()
this.isExamEnd = true
@ -903,6 +905,9 @@ export default class Judge {
//扣分类型
type: kf.type
})
console.log("lixiao koufen", JSON.stringify(thisKf));
console.log("lixiao koufen", JSON.stringify(judgeUI.projectsObj[kf.xmdm]));
this.judgeUI.totalScore += thisKf.score * 1;
if (kf.xmdm != 20) {
const type = judgeUI.projectsObj[kf.xmdm].type;
@ -1224,6 +1229,12 @@ export default class Judge {
})
})
} else {
if (code[0] == 'zhpp') {
clearTimeout(this.deductedPopShowTimer)
this.judgeUI.isDeductedPopShow = true
this.judgeUI.defaultTabIndex = 1
this.isEndTip = true
}
avPlayer.playAudio([`voice/${code[0]}.mp3`])
}
}
@ -1244,7 +1255,7 @@ export default class Judge {
avPlayer.playAudio([`voice/考试结束.mp3`])
}
//联网模式下手动结束的直接退出
if (!singlePlay && isManual && !isAllProjectsEnd) {
if (!singlePlay && isManual && !isAllProjectsEnd && totalScore >= passingScore) {
avPlayer.playAudio(['voice/empty.mp3'], true, () => {
this.isUdpEnd = true;
closeAllFiles()
@ -1363,7 +1374,7 @@ export default class Judge {
}
}
if (examSubject == 3) {
console.log(judgeTag, "exam end",isAllProjectsEnd);
console.log(judgeTag, "exam end", isAllProjectsEnd);
if (isAllProjectsEnd) {
if (totalScore < passingScore) {
voiceURL = `voice/${kssycs == 1 ? 'exam_no_pass_finish' : 'exam_no_pass'}.mp3`
@ -1679,12 +1690,12 @@ export default class Judge {
console.info(judgeTag, '项目状态projectsObj:' + JSON.stringify(projectsObj[projectKey]));
const {type,isRequired,ykType} = projectsObj[projectKey];
allProjectNum += 1;
if (type == 3 || type == 4) {
if (type == 3 || type == 4 || ykType == 3 || ykType == 4) {
allEndProjectsNum += 1;
}
if (isRequired && projectKey != '11') {
projectNum += 1;
if (type == 3 || type == 4) {
if (type == 3 || type == 4 || ykType == 3 || ykType == 4) {
endProjectsNum += 1;
}
}

Binary file not shown.

Binary file not shown.