问题修改

This commit is contained in:
lixiao 2025-04-27 10:27:57 +08:00
parent 27a11a4225
commit fc43decbb7
8 changed files with 123 additions and 10 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 "2504251140b"
#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

@ -1324,6 +1324,7 @@ void ExamCarSub3::Deal_KM3_Judge()
}
}
finishExamBroad();
//如果考试结束(训练不存在结束的概念,都是界面上点击结束考试,一般科目三都是可以重复进项目的)
if(isExamMode()) //考试模式的
{
@ -5068,6 +5069,119 @@ void ExamCarSub3::dealItemNoIDEndItem()
}
}
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)
{
TModelLine line;

View File

@ -78,6 +78,8 @@ protected:
void dealItemNoIDEndItem();
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);
bool calcToLaneLine(const TModelLine& Lxx, const std::vector<Pointi>& Pts, 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

@ -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]
@ -1171,7 +1169,7 @@ struct Index {
}
//只做一次的项目已经做过,后续不能人工触发
if (param307.includes(projectCode)) {
if (param307.includes(projectCode) && this.mode !== 5) {
if (this.mode === 2) {
return !(ykType == '3' || ykType == '4' || projectType == '3' || projectType == '4')
} else {