Merge branch '代理服务方案' of http://88.22.24.105:3000/harmony_car/subject-two into 代理服务方案
This commit is contained in:
commit
a1d348f1c2
@ -27,7 +27,7 @@
|
||||
#define JUDGE_VERSION_MAJOR 1
|
||||
#define JUDGE_VERSION_MINOR 0
|
||||
#define JUDGE_VERSION_PATCH 3
|
||||
#define JUDGE_VERSION_STAMP "2504281937b"
|
||||
#define JUDGE_VERSION_STAMP "2505132200b"
|
||||
#if JUDGE_USE_OLD
|
||||
# undef JUDGE_VERSION_STAMP
|
||||
# define JUDGE_VERSION_STAMP "2411121010b.old"
|
||||
|
||||
@ -1,6 +1,21 @@
|
||||
#include "Tools.h"
|
||||
#include "HVersion.h"
|
||||
#include "Loggerxx.h"
|
||||
|
||||
bool Tools::checkVersion(const std::string& version)
|
||||
{
|
||||
std::vector<std::string> ver = Tools::split(version, ".");
|
||||
//int major = std::atoi(ver[0].c_str());
|
||||
//int minor = std::atoi(ver[1].c_str());
|
||||
//int patch = std::atoi(ver[2].c_str());
|
||||
std::string v3 = ver[3];
|
||||
if(v3.back() == 'b')
|
||||
{
|
||||
v3.pop_back();
|
||||
}
|
||||
return (v3 < "2505121242");
|
||||
}
|
||||
|
||||
int64 Tools::nowTime()
|
||||
{
|
||||
return std::chrono::duration_cast<std::chrono::milliseconds>
|
||||
|
||||
@ -13,6 +13,8 @@
|
||||
class Tools
|
||||
{
|
||||
public:
|
||||
|
||||
static bool checkVersion(const std::string& version);
|
||||
//获取当前系统时间,单位:毫秒
|
||||
static int64 nowTime();
|
||||
//壁钟,防止有人篡改系统时间,导致考试有些评判项目计时限时不准
|
||||
@ -190,6 +192,7 @@ public:
|
||||
//获取当前机器的CPU逻辑核心数
|
||||
static int getCpuProcessors();
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // TOOLS_H
|
||||
|
||||
@ -284,13 +284,35 @@ bool ExamCarSub2::examMarkItem(ExamItemCode itemNo, const std::string& serial, b
|
||||
|
||||
void ExamCarSub2::examNonGps(TChuanGan* cg)
|
||||
{
|
||||
const TGpsInfo& gps = cg->real.gps;
|
||||
if(!gps.rtkEnabled || !gps.valid() || cg->real.gps.errorFlag)
|
||||
const TGpsInfo* gps = nullptr;
|
||||
bool ok = true;
|
||||
const TGpsInfo* gps1 = &cg->real.gps;
|
||||
//如果gps1异常了就直接报gps1,如gps1正常就检查gps2
|
||||
if(!gps1->rtkEnabled || !gps1->valid() || gps1->errorFlag)
|
||||
{
|
||||
gps = gps1;
|
||||
ok = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
ExamCarType cartype = carType();
|
||||
if(IS_A2C6(cartype))
|
||||
{
|
||||
const TGpsInfo* gps2 = &cg->real.gps2;
|
||||
if(!gps2->rtkEnabled || !gps2->valid() || gps2->errorFlag)
|
||||
{
|
||||
gps = gps2;
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!ok)
|
||||
{
|
||||
if(m_nontime == 0)
|
||||
{
|
||||
m_nontime = gps.sj;
|
||||
m_nongps = gps;
|
||||
m_nontime = Tools::nowTime();
|
||||
m_nongps = *gps;
|
||||
createEventNonGps({TNonGpsReport, m_nongps}); //上报GPS异常数据
|
||||
}
|
||||
else
|
||||
|
||||
@ -268,7 +268,7 @@ bool ExamCarSub3::Init_KM3_Global()
|
||||
const TDBCarInfo* carInfo = TableCarInfo->findCarInfo(carId);
|
||||
if(nullptr == carInfo || carInfo->CARCLASS.empty())
|
||||
{
|
||||
logerror("database not find carID=%d or carClass=%p is empty, init error", carId, carInfo);
|
||||
logerror("database carInfo error, carID=%d, carInfo=0x%p, carClass=%s", carId, carInfo, carInfo->CARCLASS.c_str());
|
||||
return false;
|
||||
}
|
||||
TASSERT_BOOL(carInfo->CARCLASS == carClass(), "");
|
||||
@ -409,7 +409,8 @@ bool ExamCarSub3::Init_KM3_Global()
|
||||
//当前时间到达夜考时间点了
|
||||
//if( (Now() - Trunc(now())) > (Car.Night_Hr / 24 + Car.Night_Mi / 24 / 60) )
|
||||
DateTimex dt = Tools::nowDateTime();
|
||||
if(dt.hour*60 + dt.minute >= m_car.Night_Hr*60 + m_car.Night_Mi)
|
||||
//考试模式判断时间,训练模式用外壳传的参数
|
||||
if((isExamMode() && (dt.hour*60 + dt.minute >= m_car.Night_Hr*60 + m_car.Night_Mi)) || (isExamDrill() && isSfyk()))
|
||||
{
|
||||
//如果不考模拟灯光
|
||||
if(!m_stuInfo.dmndg)
|
||||
@ -4405,13 +4406,35 @@ bool ExamCarSub3::examMarkItem(ExamItemCode itemNo, const std::string& serial, b
|
||||
|
||||
void ExamCarSub3::examNonGps(TChuanGan* cg)
|
||||
{
|
||||
const TGpsInfo& gps = cg->real.gps;
|
||||
if(!gps.rtkEnabled || !gps.valid() || cg->real.gps.errorFlag)
|
||||
const TGpsInfo* gps = nullptr;
|
||||
bool ok = true;
|
||||
const TGpsInfo* gps1 = &cg->real.gps;
|
||||
//如果gps1异常了就直接报gps1,如gps1正常就检查gps2
|
||||
if(!gps1->rtkEnabled || !gps1->valid() || gps1->errorFlag)
|
||||
{
|
||||
gps = gps1;
|
||||
ok = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
ExamCarType cartype = carType();
|
||||
if(IS_A2C6(cartype))
|
||||
{
|
||||
const TGpsInfo* gps2 = &cg->real.gps2;
|
||||
if(!gps2->rtkEnabled || !gps2->valid() || gps2->errorFlag)
|
||||
{
|
||||
gps = gps2;
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!ok)
|
||||
{
|
||||
if(m_nontime == 0)
|
||||
{
|
||||
m_nontime = Tools::nowTime();
|
||||
m_nongps = gps;
|
||||
m_nongps = *gps;
|
||||
createEventNonGps({TNonGpsReport, m_nongps}); //上报GPS异常数据
|
||||
}
|
||||
else
|
||||
@ -5036,7 +5059,7 @@ void ExamCarSub3::dealItemNoIDEndItem()
|
||||
{
|
||||
//ToDo1:生成 全程加减挡 进项目事件
|
||||
//createEventEnterItem({item14->ItemNo, ""});
|
||||
KM3EndItem(item14->ItemNo);
|
||||
KM3EndItem(item14->ItemNo, true, false);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -5046,7 +5069,7 @@ void ExamCarSub3::dealItemNoIDEndItem()
|
||||
{
|
||||
//ToDo1:生成 全程加减挡 进项目事件
|
||||
//createEventEnterItem({item14->ItemNo, ""});
|
||||
KM3EndItem(item14->ItemNo);
|
||||
KM3EndItem(item14->ItemNo, true, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5063,7 +5086,7 @@ void ExamCarSub3::dealItemNoIDEndItem()
|
||||
{
|
||||
if(item->FinishFlag == false)
|
||||
{
|
||||
KM3EndItem(item->ItemNo);
|
||||
KM3EndItem(item->ItemNo, true, false);
|
||||
}
|
||||
}
|
||||
else if(item->ItemNo == Sub3ItemType14Jjdw) //加减档单独处理
|
||||
@ -5073,7 +5096,7 @@ void ExamCarSub3::dealItemNoIDEndItem()
|
||||
{
|
||||
if(item->Item_Color == itemStateWk) //&& item->FinishFlag == false
|
||||
{
|
||||
KM3EndItem(item->ItemNo);
|
||||
KM3EndItem(item->ItemNo, true, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5848,6 +5871,8 @@ void ExamCarSub3::Calc_LaneDistance_Tail()
|
||||
{
|
||||
calcToLaneArc2(Lj, road->Area, body.b1_b_G, body.ZH_W_b_G, RTKKM3_Tail.Wheel_LB_ToBaseLine);
|
||||
calcToLaneArc2(Lj, road->Area, body.b1_b_G, body.YH_W_b_G, RTKKM3_Tail.Wheel_RB_ToBaseLine);
|
||||
calcToLaneArc2(Lj, road->Area, body.b1_b_G, body.b(RF_I), RTKKM3_Tail.Body_RF_ToBaseLine);
|
||||
calcToLaneArc2(Lj, road->Area, body.b1_b_G, body.b(RB_I), RTKKM3_Tail.Body_RB_ToBaseLine);
|
||||
}
|
||||
|
||||
//else if(p == 3) //3:车身左侧与本车道左侧距离
|
||||
@ -5870,6 +5895,8 @@ void ExamCarSub3::Calc_LaneDistance_Tail()
|
||||
{
|
||||
calcToLaneLine(Lj, road->Area.Pts, body.b1_b_G, body.ZH_W_b_G, RTKKM3_Tail.Wheel_LB_ToBaseLine);
|
||||
calcToLaneLine(Lj, road->Area.Pts, body.b1_b_G, body.YH_W_b_G, RTKKM3_Tail.Wheel_RB_ToBaseLine);
|
||||
calcToLaneLine(Lj, road->Area.Pts, body.b1_b_G, body.b(RF_I), RTKKM3_Tail.Body_RF_ToBaseLine, true);
|
||||
calcToLaneLine(Lj, road->Area.Pts, body.b1_b_G, body.b(RB_I), RTKKM3_Tail.Body_RB_ToBaseLine, true);
|
||||
}
|
||||
|
||||
//else if(p == 3) //3:车身左侧与本车道左侧距离
|
||||
|
||||
@ -50,12 +50,11 @@ bool ExamSensor::pretreatment(TChuanGan* cg)
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!cg->real.gps.rtkEnabled)
|
||||
{
|
||||
//cg->move = moveUnknown;
|
||||
//cg->real.gps.ai_gps = Pointi(0, 0);
|
||||
return true;
|
||||
}
|
||||
//2025-05-09 //杭州临平KM3一开始就不在差分不然计算不到行驶距离和前进状态
|
||||
//if(!cg->real.gps.rtkEnabled)
|
||||
//{
|
||||
// return true;
|
||||
//}
|
||||
|
||||
ExamSubject subject = m_car->examSubject();
|
||||
if(subject == ExamSubject2)
|
||||
@ -169,6 +168,9 @@ bool ExamSensor::convertDatas(TChuanGan* cg)
|
||||
//}
|
||||
|
||||
//航向角(默认是按诺瓦泰的数据格式定义的,所以要加上180度) 1:天宝(北云)/C1 2:诺瓦泰
|
||||
//2505121242兼容这个时间之前的特殊版卡类型做航向角转换处理的
|
||||
if(Tools::checkVersion(m_car->carVerison()))
|
||||
{
|
||||
if(gps.bklx == boardTypeTB)
|
||||
{
|
||||
gps.hxj += 180.0;
|
||||
@ -177,6 +179,8 @@ bool ExamSensor::convertDatas(TChuanGan* cg)
|
||||
{
|
||||
gps.hxj -= 360.0;
|
||||
}
|
||||
}
|
||||
|
||||
//实际上车这里经纬度要转化,测试的数据都是转化好的
|
||||
gps.jd = GpsMath::convertGpsCoord2(gps.jd);
|
||||
gps.wd = GpsMath::convertGpsCoord2(gps.wd);
|
||||
@ -191,6 +195,9 @@ bool ExamSensor::convertDatas(TChuanGan* cg)
|
||||
if(IS_A2C6(cartype))
|
||||
{
|
||||
TGpsInfo& gps2 = cg->real.gps2;
|
||||
//2505121242兼容这个时间之前的特殊版卡类型做航向角转换处理的
|
||||
if(Tools::checkVersion(m_car->carVerison()))
|
||||
{
|
||||
if(gps2.bklx == boardTypeTB)
|
||||
{
|
||||
gps2.hxj += 180.0;
|
||||
@ -199,11 +206,12 @@ bool ExamSensor::convertDatas(TChuanGan* cg)
|
||||
{
|
||||
gps2.hxj -= 360.0;
|
||||
}
|
||||
}
|
||||
//实际上车这里经纬度要转化,测试的数据都是转化好的
|
||||
gps2.jd = GpsMath::convertGpsCoord2(gps2.jd);
|
||||
gps2.wd = GpsMath::convertGpsCoord2(gps2.wd);
|
||||
#if !JUDGE_USE_INSPECT
|
||||
gps.sd *= GPS_VEL_COEFF; //无锡所检测不需要乘这个系数,因为我们实际用的时候是gps速度,无锡所是加工后的数据
|
||||
gps2.sd *= GPS_VEL_COEFF; //无锡所检测不需要乘这个系数,因为我们实际用的时候是gps速度,无锡所是加工后的数据
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -533,25 +541,30 @@ bool ExamSensor::GetCarDirStauts(TChuanGan* cg)
|
||||
calcCarGears(cg);
|
||||
|
||||
if(!m_initGPSFlag)
|
||||
{
|
||||
if(cg->real.gps.rtkEnabled == true)
|
||||
{
|
||||
m_initGPSFlag = true;
|
||||
setStatus(cg, moveStop);
|
||||
m_stopOffset = cg->real.gps.ai_gps;
|
||||
}
|
||||
else
|
||||
{
|
||||
//数据异常
|
||||
return true; //如果从一开始考试一直在非差分状态 如果返回false就进不了评判了 比如模拟灯光 20240726
|
||||
}
|
||||
//2025-05-09 KM3 //杭州临平KM3一开始就不在差分不然计算不到行驶距离和前进状态
|
||||
//if(cg->real.gps.rtkEnabled == true)
|
||||
//{
|
||||
// m_initGPSFlag = true;
|
||||
// setStatus(cg, moveStop);
|
||||
// m_stopOffset = cg->real.gps.ai_gps;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// //数据异常
|
||||
// return true; //如果从一开始考试一直在非差分状态 如果返回false就进不了评判了 比如模拟灯光 20240726
|
||||
//}
|
||||
}
|
||||
|
||||
//if(cg.Rtk_Enabled = False) or (Lscg[zj(1)].Rtk_Enabled = False) or (Lscg[zj(2)].Rtk_Enabled = False) then Exit;
|
||||
if(cg->move == moveStop && cg->real.gps.rtkEnabled == false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
//2025-05-09 KM3 //杭州临平KM3一开始就不在差分不然计算不到行驶距离和前进状态
|
||||
//if(cg->move == moveStop && cg->real.gps.rtkEnabled == false)
|
||||
//{
|
||||
// return false;
|
||||
//}
|
||||
|
||||
static constexpr int MoveAgainCm = 20;
|
||||
//1、拿到通用的停车时间阈值
|
||||
@ -584,7 +597,7 @@ bool ExamSensor::GetCarDirStauts(TChuanGan* cg)
|
||||
int b = 0, c = 0;
|
||||
if(I == 0)
|
||||
{
|
||||
if(cg->real.gps.rtkEnabled == false) continue;
|
||||
//if(cg->real.gps.rtkEnabled == false) continue; //2025-05-09 KM3 //杭州临平KM3一开始就不在差分不然计算不到行驶距离和前进状态
|
||||
b = m_stopOffset.x - cg->real.gps.ai_gps.x;
|
||||
c = m_stopOffset.y - cg->real.gps.ai_gps.y;
|
||||
}
|
||||
@ -789,6 +802,10 @@ bool ExamSensor::GetCarDirStatus_KM2(TChuanGan* cg)
|
||||
|
||||
if(!m_initGPSFlag)
|
||||
{
|
||||
//m_initGPSFlag = true;
|
||||
//setStatus(cg, moveStop);
|
||||
//m_stopOffset = cg->real.gps.ai_gps;
|
||||
//2025-05-09 KM2 //杭州临平KM3一开始就不在差分不然计算不到行驶距离和前进状态
|
||||
if(cg->real.gps.rtkEnabled == true)
|
||||
{
|
||||
m_initGPSFlag = true;
|
||||
@ -803,6 +820,7 @@ bool ExamSensor::GetCarDirStatus_KM2(TChuanGan* cg)
|
||||
}
|
||||
|
||||
//if(cg.Rtk_Enabled = False) or (Lscg[zj(1)].Rtk_Enabled = False) or (Lscg[zj(2)].Rtk_Enabled = False) then Exit;
|
||||
//2025-05-09 KM2 //杭州临平KM3一开始就不在差分不然计算不到行驶距离和前进状态
|
||||
if(cg->move == moveStop && cg->real.gps.rtkEnabled == false)
|
||||
{
|
||||
return false;
|
||||
@ -872,7 +890,7 @@ bool ExamSensor::GetCarDirStatus_KM2(TChuanGan* cg)
|
||||
int b = 0, c = 0;
|
||||
if(I == 0)
|
||||
{
|
||||
if(cg->real.gps.rtkEnabled == false) continue;
|
||||
if(cg->real.gps.rtkEnabled == false) continue; //2025-05-09 KM2 //杭州临平KM3一开始就不在差分不然计算不到行驶距离和前进状态
|
||||
b = m_stopOffset.x - cg->real.gps.ai_gps.x;
|
||||
c = m_stopOffset.y - cg->real.gps.ai_gps.y;
|
||||
}
|
||||
@ -986,80 +1004,78 @@ void ExamSensor::setStatus(TChuanGan* cg, CarMoveState s)
|
||||
|
||||
bool ExamSensor::filterWrong(TChuanGan* cg)
|
||||
{
|
||||
TGpsInfo& gps = cg->real.gps;
|
||||
|
||||
//位置差分, 角度差分
|
||||
if(gps.dwzt == gpsStatusNARROW_INT && gps.jdzt == gpsStatusANGLE)
|
||||
{
|
||||
gps.rtkEnabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
gps.rtkEnabled = false;
|
||||
logwarning("rtk Enabled not, dwzt=%d, jdzt=%d", gps.dwzt, gps.jdzt);
|
||||
}
|
||||
|
||||
TChuanGan* his = m_car->historyChuanGan();
|
||||
gps.errorFlag = false;
|
||||
//过滤GPS漂移数据
|
||||
if(his != nullptr)
|
||||
bool ok1 = filterGpsWrong(&cg->real.gps, his != nullptr ? &his->real.gps : nullptr);
|
||||
bool ok2 = true;
|
||||
ExamCarType cartype = m_car->carType();
|
||||
if(IS_A2C6(cartype))
|
||||
{
|
||||
const TGpsInfo& h_gps = his->real.gps;
|
||||
int64 interval = std::abs(gps.sj - h_gps.sj);
|
||||
//如果是正常连续数据才判断漂移,有可能是断网收不到数据,然后过了几秒又收到数据距离会远超过限制距离
|
||||
if(interval < 1*SECOND)
|
||||
{
|
||||
TGPSPoint p1 = h_gps.to();
|
||||
TGPSPoint p2 = gps.to();
|
||||
double distance = GpsMath::calcGpsDistanceCM(p1, p2, p1.gc);
|
||||
if(distance > DEVIATION_RANGE_DISTANCE_CM)
|
||||
{
|
||||
logwarning("deviation rang distance=%0.2f CM", distance);
|
||||
gps.errorFlag = true;
|
||||
}
|
||||
double angle = std::abs(gps.hxj - h_gps.hxj);
|
||||
if(angle > DEVIATION_RANGE_ANGLE_MIN && angle < DEVIATION_RANGE_ANGLE_MAX)
|
||||
{
|
||||
logwarning("deviation rang angle=%0.2f", angle);
|
||||
gps.errorFlag = true;
|
||||
}
|
||||
}
|
||||
ok2 = filterGpsWrong(&cg->real.gps2, his != nullptr ? &his->real.gps2 : nullptr);
|
||||
}
|
||||
|
||||
m_car->examNonGps(cg);
|
||||
|
||||
if(gps.errorFlag)
|
||||
{
|
||||
logwarning("errorFlag invalid dwzt=%d, jdzt=%d, jd=%0.8f, wd=%0.8f", gps.dwzt, gps.jdzt, gps.jd, gps.wd);
|
||||
return false;
|
||||
//ExamSubject sub = m_car->examSubject();
|
||||
//if(ExamSubject2 == sub)
|
||||
//{
|
||||
// return ok1 && ok2;
|
||||
//}
|
||||
//else if(ExamSubject3 == sub)
|
||||
//{
|
||||
// return ok1 && ok2;
|
||||
//}
|
||||
|
||||
return ok1 && ok2;
|
||||
}
|
||||
|
||||
if(!gps.valid())
|
||||
bool ExamSensor::filterGpsWrong(TGpsInfo* gps, const TGpsInfo* h_gps)
|
||||
{
|
||||
logwarning("gps invalid dwzt=%d, jdzt=%d, jd=%0.8f, wd=%0.8f", gps.dwzt, gps.jdzt, gps.jd, gps.wd);
|
||||
return false;
|
||||
}
|
||||
|
||||
ExamSubject sub = m_car->examSubject();
|
||||
if(ExamSubject2 == sub)
|
||||
//位置差分, 角度差分
|
||||
if(gps->dwzt == gpsStatusNARROW_INT && gps->jdzt == gpsStatusANGLE)
|
||||
{
|
||||
//return gps.rtkEnabled == true && gps.valid();
|
||||
return gps.valid(); //2025-03-20 modify
|
||||
}
|
||||
else if(ExamSubject3 == sub)
|
||||
{
|
||||
if(gps.valid()) //20240811 yhy
|
||||
{
|
||||
//数据是正常的
|
||||
gps->rtkEnabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
//if(m_car->historyCount() > 0)
|
||||
//{
|
||||
// cloneWith(m_car->historyChuanGan(), cg);
|
||||
//}
|
||||
gps->rtkEnabled = false;
|
||||
logwarning("rtk Enabled not, dwzt=%d, jdzt=%d", gps->dwzt, gps->jdzt);
|
||||
}
|
||||
return true;
|
||||
|
||||
gps->errorFlag = false;
|
||||
//过滤GPS漂移数据
|
||||
if(h_gps != nullptr)
|
||||
{
|
||||
int64 interval = std::abs(gps->sj - h_gps->sj);
|
||||
//如果是正常连续数据才判断漂移,有可能是断网收不到数据,然后过了几秒又收到数据距离会远超过限制距离
|
||||
if(interval < 1*SECOND)
|
||||
{
|
||||
TGPSPoint p1 = h_gps->to();
|
||||
TGPSPoint p2 = gps->to();
|
||||
double distance = GpsMath::calcGpsDistanceCM(p1, p2, p1.gc);
|
||||
if(distance > DEVIATION_RANGE_DISTANCE_CM)
|
||||
{
|
||||
logwarning("deviation rang distance=%0.2f CM", distance);
|
||||
gps->errorFlag = true;
|
||||
}
|
||||
double angle = std::abs(gps->hxj - h_gps->hxj);
|
||||
if(angle > DEVIATION_RANGE_ANGLE_MIN && angle < DEVIATION_RANGE_ANGLE_MAX)
|
||||
{
|
||||
logwarning("deviation rang angle=%0.2f", angle);
|
||||
gps->errorFlag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(gps->errorFlag)
|
||||
{
|
||||
logwarning("errorFlag invalid dwzt=%d, jdzt=%d, jd=%0.8f, wd=%0.8f", gps->dwzt, gps->jdzt, gps->jd, gps->wd);
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!gps->valid())
|
||||
{
|
||||
logwarning("gps invalid dwzt=%d, jdzt=%d, jd=%0.8f, wd=%0.8f", gps->dwzt, gps->jdzt, gps->jd, gps->wd);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@ -26,6 +26,7 @@ public:
|
||||
virtual bool calcCarBody(TChuanGan* cg);
|
||||
//过滤异常数据
|
||||
virtual bool filterWrong(TChuanGan* cg);
|
||||
virtual bool filterGpsWrong(TGpsInfo* gps, const TGpsInfo* h_gps);
|
||||
//计算考车状态(科目三)
|
||||
virtual bool GetCarDirStauts(TChuanGan* cg);
|
||||
//计算考车状态(科目二)
|
||||
|
||||
@ -483,6 +483,26 @@ void IExamCar::examPerformSummary()
|
||||
exam.bxjl = dis.y*10; //单位毫米 所以要乘10
|
||||
exam.hint = m_message;
|
||||
exam.lane = historyChuanGan()->RTKKM3;
|
||||
ExamCarType cartype = carType();
|
||||
if(IS_A2C6(cartype))
|
||||
{
|
||||
//对于牵引车,车身距离都是指的挂车(车厢),如果车轮,车前轮指的是车头的轮子,车后轮指的挂车最后面轮子,和军华确认过的 2025-05-13
|
||||
const TRTKResult& rtkTail = historyChuanGan()->RTKKM3_Tail;
|
||||
TRTKResult& lane = exam.lane;
|
||||
|
||||
lane.Body_LF_ToLeftEdge = rtkTail.Body_LF_ToLeftEdge;
|
||||
lane.Body_LB_ToLeftEdge = rtkTail.Body_LB_ToLeftEdge;
|
||||
lane.Body_RF_ToRightEdge = rtkTail.Body_RF_ToRightEdge;
|
||||
lane.Body_RB_ToRightEdge = rtkTail.Body_RB_ToRightEdge;
|
||||
lane.Body_RF_ToBaseLine = rtkTail.Body_RF_ToBaseLine;
|
||||
lane.Body_RB_ToBaseLine = rtkTail.Body_RB_ToBaseLine;
|
||||
|
||||
lane.Wheel_RB_ToRightEdge = rtkTail.Wheel_RB_ToRightEdge;
|
||||
lane.Wheel_RB_ToBaseLine = rtkTail.Wheel_RB_ToBaseLine;
|
||||
lane.Wheel_LB_ToRightEdge = rtkTail.Wheel_LB_ToRightEdge;
|
||||
lane.Wheel_LB_ToBaseLine = rtkTail.Wheel_LB_ToBaseLine;
|
||||
|
||||
}
|
||||
|
||||
std::string data = XParser::toAny(exam);
|
||||
FactoryExamService->examJudgeCallbackPerformToCaller(data.c_str(), data.size());
|
||||
|
||||
@ -89,6 +89,7 @@ public:
|
||||
virtual ISurveyCarAbstract* carModel() MEANS { return m_carModel; }
|
||||
virtual int modelSize() MEANS { return m_carModel->size(); }
|
||||
virtual ExamSubject examSubject() MEANS { return ExamSubject(m_carInfo->kskm); }
|
||||
virtual const std::string& carVerison() MEANS { return m_carInfo->sdkver; }
|
||||
virtual int carID() MEANS { return m_carInfo->kchm; }
|
||||
virtual const std::string& carClass() MEANS { return m_carInfo->name; }
|
||||
virtual int carCode() MEANS { return m_carCode; }
|
||||
|
||||
@ -104,6 +104,8 @@ public:
|
||||
virtual int modelSize() const = 0;
|
||||
//考试科目
|
||||
virtual ExamSubject examSubject() const = 0;
|
||||
//轨迹初始化版本号
|
||||
virtual const std::string& carVerison() const = 0;
|
||||
//考车ID
|
||||
virtual int carID() const = 0;
|
||||
//考车名称
|
||||
|
||||
@ -136,12 +136,6 @@ const char* GraphicImage::image()
|
||||
#endif
|
||||
|
||||
int offset_y = 1;
|
||||
if(m_showVersion)
|
||||
{
|
||||
drawText(Pointi(1, offset_y), JUDGE_VERSION_INFO, RGB_BLUE, 16);
|
||||
offset_y += 16;
|
||||
}
|
||||
|
||||
if(m_showTime)
|
||||
{
|
||||
int64 tick = Tools::nowTime();
|
||||
@ -149,6 +143,11 @@ const char* GraphicImage::image()
|
||||
drawText(Pointi(1, offset_y), tm.c_str(), RGB_PERILLA, 16);
|
||||
offset_y += 16;
|
||||
}
|
||||
//if(m_showVersion)
|
||||
//{
|
||||
// drawText(Pointi(1, offset_y), JUDGE_VERSION_INFO, RGB_BLUE, 16);
|
||||
// offset_y += 16;
|
||||
//}
|
||||
|
||||
toRgb();
|
||||
return (const char*)m_rgb;
|
||||
|
||||
@ -95,6 +95,8 @@ protected:
|
||||
//当前路段是否禁止左右转、直行、掉头
|
||||
bool forbidInLane(const std::string& laneDir, TURN_TYPE d);
|
||||
|
||||
bool judgeAllowable() { return true; /*(!m_car->rtkEnabled() || !m_car->rtkEnabled(1)) ? false : true; */ }
|
||||
|
||||
//显示状态信息
|
||||
void showStatus(const std::string& msg);
|
||||
protected:
|
||||
|
||||
@ -101,7 +101,7 @@ void Sub3Judge01Sczb::dealJudgeItem()
|
||||
HELP_COST_TIME("");
|
||||
if(m_exam->TestPro != ItemProFlagJudge) return;
|
||||
//超声波评判跟差分信号没有关系,所以不做差分信号状态的判断
|
||||
//if(!m_car->rtkEnabled() || !m_car->rtkEnabled(1)) return;
|
||||
//if(!judgeAllowable()) return;
|
||||
|
||||
const std::string& s386 = TableSysSet->get386();
|
||||
//if(s386 == "3") //无锡地区模式只要发动机启动了,点切换就上车准备自动完成播报模拟灯光
|
||||
|
||||
@ -52,6 +52,16 @@ bool Sub3Judge02Qbxx::dealJudgeEnter()
|
||||
|
||||
m_exam->TestPro = ItemProFlagJudge;
|
||||
//ToDo2:生成进项目事件
|
||||
|
||||
if(m_car->examAlready(Sub3ItemType01Sczb) && m_car->examAlready(Sub3ItemType41Mndg))
|
||||
{
|
||||
if(!m_sound_qibu)
|
||||
{
|
||||
m_sound_qibu = true;
|
||||
m_car->createEventSound({m_exam->ItemNo, sound::sub3_402001});
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -63,7 +73,7 @@ void Sub3Judge02Qbxx::dealJudgeItem()
|
||||
|
||||
HELP_COST_TIME("");
|
||||
if(m_exam->TestPro != ItemProFlagJudge) return;
|
||||
if(!m_car->rtkEnabled() || !m_car->rtkEnabled(1)) return;
|
||||
if(!judgeAllowable()) return;
|
||||
|
||||
const TChuanGan* cg = m_car->historyChuanGan();
|
||||
const TSensorInfo& sor = cg->real.sensor;
|
||||
|
||||
@ -69,7 +69,7 @@ protected:
|
||||
private:
|
||||
TSub3Item02Qbxx m_itemv;
|
||||
bool m_Pub_First_QiBu_Flag = false; //起步方向灯和喇叭 只判一次 第一次进起步项目才判
|
||||
|
||||
bool m_sound_qibu = false;
|
||||
//**********************以下是新科目三************************
|
||||
private:
|
||||
//起步项目中,车辆状态从停止切换前进前10s内,头部姿态没有大于左后侧角度【23度】
|
||||
|
||||
@ -105,7 +105,7 @@ void Sub3Judge03Zxxs::dealJudgeItem()
|
||||
{
|
||||
HELP_COST_TIME("");
|
||||
if(m_exam->TestPro != ItemProFlagJudge) return;
|
||||
if(!m_car->rtkEnabled() || !m_car->rtkEnabled(1)) return;
|
||||
if(!judgeAllowable()) return;
|
||||
|
||||
const TChuanGan* cg = m_car->historyChuanGan();
|
||||
const TRTKResult& RTKKM3 = cg->RTKKM3;
|
||||
|
||||
@ -56,7 +56,7 @@ void Sub3Judge04Bgcd::dealJudgeItem()
|
||||
{
|
||||
HELP_COST_TIME("");
|
||||
if(m_exam->TestPro != ItemProFlagJudge) return;
|
||||
if(!m_car->rtkEnabled() || !m_car->rtkEnabled(1)) return;
|
||||
if(!judgeAllowable()) return;
|
||||
|
||||
const TChuanGan* cg = m_car->historyChuanGan();
|
||||
const TRTKResult& RTKKM3 = cg->RTKKM3;
|
||||
|
||||
@ -78,7 +78,7 @@ void Sub3Judge05Lkzx::dealJudgeItem()
|
||||
{
|
||||
HELP_COST_TIME("");
|
||||
if(m_exam->TestPro != ItemProFlagJudge) return;
|
||||
if(!m_car->rtkEnabled() || !m_car->rtkEnabled(1)) return;
|
||||
if(!judgeAllowable()) return;
|
||||
|
||||
//setup1: 路口类型 1-平交 2-环道 3-三叉 缺省 1-平交
|
||||
//setup2: 限速值,通过路口停车线时的车速 缺省 35
|
||||
|
||||
@ -110,7 +110,7 @@ void Sub3Judge06Rxhd::dealJudgeItem()
|
||||
{
|
||||
HELP_COST_TIME("");
|
||||
if(m_exam->TestPro != ItemProFlagJudge) return;
|
||||
if(!m_car->rtkEnabled() || !m_car->rtkEnabled(1)) return;
|
||||
if(!judgeAllowable()) return;
|
||||
|
||||
const TChuanGan* cg = m_car->historyChuanGan();
|
||||
const TSensorInfo& sor = cg->real.sensor;
|
||||
|
||||
@ -82,7 +82,7 @@ void Sub3Judge07Xxqy::dealJudgeItem()
|
||||
{
|
||||
HELP_COST_TIME("");
|
||||
if(m_exam->TestPro != ItemProFlagJudge) return;
|
||||
if(!m_car->rtkEnabled() || !m_car->rtkEnabled(1)) return;
|
||||
if(!judgeAllowable()) return;
|
||||
|
||||
const TChuanGan* cg = m_car->historyChuanGan();
|
||||
const TSensorInfo& sor = cg->real.sensor;
|
||||
|
||||
@ -93,7 +93,7 @@ void Sub3Judge08Gjzt::dealJudgeItem()
|
||||
{
|
||||
HELP_COST_TIME("");
|
||||
if(m_exam->TestPro != ItemProFlagJudge) return;
|
||||
if(!m_car->rtkEnabled() || !m_car->rtkEnabled(1)) return;
|
||||
if(!judgeAllowable()) return;
|
||||
|
||||
const TChuanGan* cg = m_car->historyChuanGan();
|
||||
const TRTKResult& RTKKM3 = cg->RTKKM3;
|
||||
|
||||
@ -63,7 +63,7 @@ void Sub3Judge09Hcxx::dealJudgeItem()
|
||||
{
|
||||
HELP_COST_TIME("");
|
||||
if(m_exam->TestPro != ItemProFlagJudge) return;
|
||||
if(!m_car->rtkEnabled() || !m_car->rtkEnabled(1)) return;
|
||||
if(!judgeAllowable()) return;
|
||||
|
||||
const TChuanGan* cg = m_car->historyChuanGan();
|
||||
const TRTKResult& RTKKM3 = cg->RTKKM3;
|
||||
|
||||
@ -144,7 +144,7 @@ void Sub3Judge10Ccxx::dealJudgeItem()
|
||||
{
|
||||
HELP_COST_TIME("");
|
||||
if(m_exam->TestPro != ItemProFlagJudge) return;
|
||||
if(!m_car->rtkEnabled() || !m_car->rtkEnabled(1)) return;
|
||||
if(!judgeAllowable()) return;
|
||||
|
||||
const TChuanGan* cg = m_car->historyChuanGan();
|
||||
const TRTKResult& RTKKM3 = cg->RTKKM3;
|
||||
|
||||
@ -141,7 +141,7 @@ void Sub3Judge11Kbtc::dealJudgeItem()
|
||||
{
|
||||
HELP_COST_TIME("");
|
||||
if(m_exam->TestPro != ItemProFlagJudge) return;
|
||||
//if(!m_car->rtkEnabled() || !m_car->rtkEnabled(1)) return;
|
||||
//if(!judgeAllowable()) return;
|
||||
|
||||
const TChuanGan* cg = m_car->historyChuanGan();
|
||||
const TSensorInfo& sor = cg->real.sensor;
|
||||
@ -554,7 +554,7 @@ void Sub3Judge11Kbtc::DoStatus_2()
|
||||
else if(s430 == "1") //拉手刹放空挡
|
||||
{
|
||||
//20180625
|
||||
if(sor.ssc == SYES && sor.dw == 0)
|
||||
if(sor.ssc == SYES && (sor.dw == 0 || sor.dw == 10))
|
||||
{
|
||||
m_itemv.Status = 3;
|
||||
return;
|
||||
@ -699,8 +699,14 @@ void Sub3Judge11Kbtc::DoStatus_3()
|
||||
}
|
||||
|
||||
//压路边线
|
||||
if(!IS_A2C6(m_carType))
|
||||
{
|
||||
Judge_KBTC_YaXian();
|
||||
}
|
||||
else
|
||||
{
|
||||
Judge_KBTC_YaXian_Tail(); //A2C6-20250314
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
@ -1076,10 +1082,16 @@ void Sub3Judge11Kbtc::DoStatus_4()
|
||||
if(ksdd == siteof::hbtskm3 || ksdd == siteof::lyggy)
|
||||
{
|
||||
if(m_car->rtkEnabled())
|
||||
{
|
||||
if(!IS_A2C6(m_carType))
|
||||
{
|
||||
Judge_KBTC_YaXian();
|
||||
}
|
||||
else
|
||||
{
|
||||
Judge_KBTC_YaXian_Tail(); //A2C6-20250314
|
||||
}
|
||||
}
|
||||
} // 20171211
|
||||
}
|
||||
else //20170215
|
||||
@ -1307,7 +1319,6 @@ void Sub3Judge11Kbtc::Judge_KBTC_YaXian()
|
||||
RightJL1_RF = RTKKM3_1.Body_RF_ToBaseLine;
|
||||
RightJL2_RF = RTKKM3_2.Body_RF_ToBaseLine;
|
||||
|
||||
|
||||
RightJL0_RB = RTKKM3_0.Body_RB_ToBaseLine;
|
||||
RightJL1_RB = RTKKM3_1.Body_RB_ToBaseLine;
|
||||
RightJL2_RB = RTKKM3_2.Body_RB_ToBaseLine;
|
||||
@ -1457,16 +1468,20 @@ void Sub3Judge11Kbtc::Judge_KBTC_YaXian_Tail()
|
||||
RightJL1_RF = RTKKM3_Tail_1.Body_RF_ToBaseLine;
|
||||
RightJL2_RF = RTKKM3_Tail_2.Body_RF_ToBaseLine;
|
||||
|
||||
|
||||
RightJL0_RB = RTKKM3_Tail_0.Body_RB_ToBaseLine;
|
||||
RightJL1_RB = RTKKM3_Tail_1.Body_RB_ToBaseLine;
|
||||
RightJL2_RB = RTKKM3_Tail_2.Body_RB_ToBaseLine;
|
||||
}
|
||||
else
|
||||
{
|
||||
RightJL0_RF = RTKKM3_Tail_0.Wheel_RF_ToBaseLine;
|
||||
RightJL1_RF = RTKKM3_Tail_1.Wheel_RF_ToBaseLine;
|
||||
RightJL2_RF = RTKKM3_Tail_2.Wheel_RF_ToBaseLine;
|
||||
//对于牵引车,车身距离都是指的挂车(车厢),如果车轮,车前轮指的是车头的轮子,车后轮指的挂车最后面轮子,和军华确认过的 2025-05-13
|
||||
const TRTKResult& RTKKM3_0 = m_car->historyRtkKM3(0);
|
||||
const TRTKResult& RTKKM3_1 = m_car->historyRtkKM3(1);
|
||||
const TRTKResult& RTKKM3_2 = m_car->historyRtkKM3(2);
|
||||
|
||||
RightJL0_RF = RTKKM3_0.Wheel_RF_ToBaseLine;
|
||||
RightJL1_RF = RTKKM3_1.Wheel_RF_ToBaseLine;
|
||||
RightJL2_RF = RTKKM3_2.Wheel_RF_ToBaseLine;
|
||||
|
||||
RightJL0_RB = RTKKM3_Tail_0.Wheel_RB_ToBaseLine;
|
||||
RightJL1_RB = RTKKM3_Tail_1.Wheel_RB_ToBaseLine;
|
||||
|
||||
@ -59,7 +59,7 @@ void Sub3Judge12Lkdt::dealJudgeItem()
|
||||
{
|
||||
HELP_COST_TIME("");
|
||||
if(m_exam->TestPro != ItemProFlagJudge) return;
|
||||
if(!m_car->rtkEnabled() || !m_car->rtkEnabled(1)) return;
|
||||
if(!judgeAllowable()) return;
|
||||
|
||||
//setup1: 路口类型 1-平交 2-环道 3-三叉 缺省 1-平交
|
||||
//setup2: 限速值,通过路口停车线时的车速 缺省 35
|
||||
|
||||
@ -48,7 +48,7 @@ void Sub3Judge12Ptdt::dealJudgeItem()
|
||||
{
|
||||
HELP_COST_TIME("");
|
||||
if(m_exam->TestPro != ItemProFlagJudge) return;
|
||||
if(!m_car->rtkEnabled() || !m_car->rtkEnabled(1)) return;
|
||||
if(!judgeAllowable()) return;
|
||||
|
||||
const TChuanGan* cg = m_car->historyChuanGan();
|
||||
const TRTKResult& RTKKM3 = cg->RTKKM3;
|
||||
|
||||
@ -31,7 +31,7 @@ void Sub3Judge14Jjdw::dealJudgeItem()
|
||||
{
|
||||
HELP_COST_TIME("");
|
||||
if(m_exam->TestPro != ItemProFlagJudge) return;
|
||||
if(!m_car->rtkEnabled() || !m_car->rtkEnabled(1)) return;
|
||||
if(!judgeAllowable()) return;
|
||||
|
||||
std::string Str425;
|
||||
std::string TempLog;
|
||||
|
||||
@ -73,7 +73,7 @@ void Sub3Judge15Lkzz::dealJudgeItem()
|
||||
{
|
||||
HELP_COST_TIME("");
|
||||
if(m_exam->TestPro != ItemProFlagJudge) return;
|
||||
if(!m_car->rtkEnabled() || !m_car->rtkEnabled(1)) return;
|
||||
if(!judgeAllowable()) return;
|
||||
|
||||
//setup1: 路口类型 1-平交 2-环道 3-三叉 缺省 1-平交
|
||||
//setup2: 限速值,通过路口停车线时的车速 缺省 35
|
||||
|
||||
@ -73,7 +73,7 @@ void Sub3Judge16Lkyz::dealJudgeItem()
|
||||
{
|
||||
HELP_COST_TIME("");
|
||||
if(m_exam->TestPro != ItemProFlagJudge) return;
|
||||
if(!m_car->rtkEnabled() || !m_car->rtkEnabled(1)) return;
|
||||
if(!judgeAllowable()) return;
|
||||
|
||||
//setup1: 路口类型 1-平交 2-环道 3-三叉 缺省 1-平交
|
||||
//setup2: 限速值,通过路口停车线时的车速 缺省 35
|
||||
|
||||
@ -868,7 +868,8 @@ void Sub3Judge20Comm::CallMoNiDengGuang()
|
||||
|
||||
if(m > 0)
|
||||
{
|
||||
if(m_engineTick > 0 && cg->tkCnt - m_engineTick > m*SECOND)
|
||||
//if(m_engineTick > 0 && cg->tkCnt - m_engineTick > m*SECOND)
|
||||
if(m_engineTick > 0 && m_car->timeElapsed() > m*SECOND)
|
||||
{
|
||||
JUDGE_MARK_SUB3(20, "94", true);
|
||||
}
|
||||
|
||||
@ -80,9 +80,20 @@ export default async function writeObjectOutNew(data, filePath): Promise<WR> {
|
||||
}
|
||||
let fn = () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
let tick = setTimeout(() => {
|
||||
emitter.emit({
|
||||
eventId: 1
|
||||
})
|
||||
reject({
|
||||
code: 1, data: {
|
||||
code: 2300007
|
||||
}
|
||||
})
|
||||
}, 15 * 1000)
|
||||
console.log("wzj process start,项目代码:", params.data.param.ksxm)
|
||||
globalThis.serviceExtProxy.processData("1", (errorCode: number, retVal: string) => {
|
||||
console.log("lixiao process accept,项目代码:", params.data.param.ksxm, " 错误码:", errorCode, JSON.stringify(retVal))
|
||||
clearTimeout(tick)
|
||||
let result = JSON.parse(retVal)
|
||||
if (result.code === 0) {
|
||||
resolve(result.data)
|
||||
@ -92,7 +103,6 @@ export default async function writeObjectOutNew(data, filePath): Promise<WR> {
|
||||
})
|
||||
reject(result.data)
|
||||
}
|
||||
// console.log(`js-test index.ets processData, errorCode: ${errorCode}, retVal: ${retVal}`);
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
@ -52,6 +52,8 @@ struct Index {
|
||||
confirm: () => {
|
||||
}
|
||||
}),
|
||||
|
||||
|
||||
customStyle: true,
|
||||
alignment: DialogAlignment.Center,
|
||||
})
|
||||
@ -60,7 +62,7 @@ struct Index {
|
||||
private context = getContext(this) as common.UIAbilityContext;
|
||||
private serviceExtProxy: IdlServiceExtProxy
|
||||
@State judgeVersion: string = ""
|
||||
private version: string = "2025.05.06.01"
|
||||
private version: string = "2025.05.09.01"
|
||||
|
||||
@Styles
|
||||
commStyle(){
|
||||
@ -452,7 +454,6 @@ struct Index {
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
aboutToDisappear() {
|
||||
@ -463,10 +464,6 @@ struct Index {
|
||||
if (this.loading) {
|
||||
return
|
||||
}
|
||||
// let mode=globalThis.timeInfo?.mode?globalThis.timeInfo?.mode:1
|
||||
|
||||
// console.log('mode',mode)
|
||||
|
||||
const param = {
|
||||
carId: globalThis.carInfo?.carId,
|
||||
examinationRoomId: globalThis.carInfo?.examinationRoomId,
|
||||
@ -481,30 +478,18 @@ struct Index {
|
||||
singlePlay: globalThis.singlePlay
|
||||
}
|
||||
this.loading = true
|
||||
console.log("sql 1111")
|
||||
|
||||
getSingleCenterTable(param).then((ret) => {
|
||||
console.log('teststetfinsh1', ret)
|
||||
// DB.queryListBySql('select * from MA_SYSSET', [{
|
||||
// name: "v_no",
|
||||
// type: ColumnType.STRING,
|
||||
// columnName: "v_no"
|
||||
// }]).then((res) => {
|
||||
// console.log('sql success', JSON.stringify(res))
|
||||
// }).catch((err) => {
|
||||
// console.log('sql error1', err)
|
||||
// })
|
||||
console.log('getSingleCenterTable finish', ret)
|
||||
if (ret) {
|
||||
getSyncData('MA_SYSSET').then(data => {
|
||||
console.log('datadata', JSON.stringify(data))
|
||||
// @ts-ignore
|
||||
getSyncData('MA_SYSSET').then((data: any[]) => {
|
||||
console.log('MA_SYSSET data', JSON.stringify(data))
|
||||
data.forEach(sys => {
|
||||
//判断是否能点开始考试
|
||||
if (sys.v_no === '854') {
|
||||
globalThis.param854Str = sys.v_value
|
||||
}
|
||||
if (sys.v_no === '824' && decodeURIComponent(sys.v_value) == '0') {
|
||||
// this.Param612Str= decodeURIComponent(sys.v_value)
|
||||
router.pushUrl({
|
||||
url: 'pages/CarCheck',
|
||||
params: {
|
||||
@ -517,9 +502,12 @@ struct Index {
|
||||
}, router.RouterMode.Single)
|
||||
}
|
||||
})
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
});
|
||||
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
|
||||
@ -568,9 +556,7 @@ struct Index {
|
||||
globalThis.singlePlay = false
|
||||
}
|
||||
this.isSingle = globalThis.singlePlay
|
||||
// this.loading = false
|
||||
this.num = 0
|
||||
// const TcpClient: TcpClient =new TcpClient(result[0].tcplocalIp, result[0].tcplocalIpPort,result[0].tcpOppositeIp,result[0].tcpOppositePort)
|
||||
globalThis.lsh = '1111111111111'
|
||||
}
|
||||
|
||||
@ -611,7 +597,6 @@ struct Index {
|
||||
console.error(`Failed to request permissions from user. Code is ${err.code}, message is ${err.message}`);
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
async initParams() {
|
||||
|
||||
@ -109,7 +109,6 @@ struct UserInfo {
|
||||
if (this.ksksLimit) {
|
||||
return
|
||||
}
|
||||
console.log('routerParamrouterParam')
|
||||
try {
|
||||
await this.checkSignal()
|
||||
this.faceCompareSucess = 0
|
||||
@ -140,7 +139,6 @@ struct UserInfo {
|
||||
// 同一学员连续第二次考试时不再验证身份
|
||||
if (this.currentUser.kssycs == '1' && this.systemParam.Param830Str == '1') {
|
||||
this.sfbdinterfaceFn()
|
||||
|
||||
} else {
|
||||
this.ksksLimit = false
|
||||
this.showFaceCompare = true
|
||||
@ -891,6 +889,7 @@ struct UserInfo {
|
||||
const {carId,examinationRoomId} = carInfo;
|
||||
let examItems = { getExaminationItemRsp: { body: { ykxx: '' } } };
|
||||
if (!globalThis.singlePlay) {
|
||||
try {
|
||||
//获取已考项目
|
||||
// @ts-ignore
|
||||
examItems = await getExaminationItem({
|
||||
@ -899,6 +898,15 @@ struct UserInfo {
|
||||
lsh: this.currentUser.lsh || '',
|
||||
examinationRoomId
|
||||
})
|
||||
} catch (e) {
|
||||
promptAction.showToast({
|
||||
message: "获取考试信息失败,请重试",
|
||||
duration: 3000
|
||||
})
|
||||
this.isLoadingPopupVisible = false
|
||||
this.isExamStart = false
|
||||
return
|
||||
}
|
||||
}
|
||||
this.currentUser.id = '1'
|
||||
const avPlayer = this.avPlayer;
|
||||
@ -906,11 +914,9 @@ struct UserInfo {
|
||||
|
||||
avPlayer.playAudio([`voice/监管通信中.mp3`], false, async () => {
|
||||
console.info('surenjun', '播放结束开始考试接口调用')
|
||||
try {
|
||||
const {code,keystr,message} = await this.beginExam() || {};
|
||||
console.info('surenjun', '开始考试接口调用结束')
|
||||
// console.info('surenjun',code +'')
|
||||
//@ts-ignore TODO code转换
|
||||
|
||||
if (code != 1) {
|
||||
avPlayer.playAudio([code == -200 ? 'voice/photo_error.mp3' : 'voice/监管审核未通过.mp3']);
|
||||
this.isLoadingPopupVisible = false
|
||||
@ -938,6 +944,15 @@ struct UserInfo {
|
||||
this.updateTimeLimit = false
|
||||
this.stopDeviceById()
|
||||
this.stepFlag = false
|
||||
} catch (e) {
|
||||
promptAction.showToast({
|
||||
message: "监管审核失败,请重试",
|
||||
duration: 3000
|
||||
})
|
||||
this.isLoadingPopupVisible = false
|
||||
this.isExamStart = false
|
||||
return
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@ -1097,9 +1112,7 @@ struct UserInfo {
|
||||
}).catch(err => {
|
||||
console.log("USER insert fail", JSON.stringify(err))
|
||||
})
|
||||
// await upDateTableByArray('USER', [this.currentUser])
|
||||
console.log("User", JSON.stringify(this.currentUser))
|
||||
// await sqlInsertCommonFn("USER", [this.currentUser])
|
||||
globalThis.statue = 4
|
||||
this.isBoardPrePareSetPopupShow = true;
|
||||
this.isFirstBoardPrePareSetPopupBtnShow = true;
|
||||
|
||||
@ -54,6 +54,7 @@ import {
|
||||
examJudgeVersion
|
||||
} from './api/index';
|
||||
import { getSyncData, upDateTableByArray } from '../../common/service/initable';
|
||||
import promptAction from '@ohos.promptAction';
|
||||
|
||||
const judgeTag = 'SURENJUN_JUDGE'
|
||||
|
||||
@ -1298,17 +1299,15 @@ export default class Judge {
|
||||
judgeUI,
|
||||
ksjs,
|
||||
getPhoto,
|
||||
uploadProgressData,
|
||||
uploadDisConnectData,
|
||||
avPlayer,
|
||||
kfArr,
|
||||
judgeTask,
|
||||
filePath,
|
||||
closeAllFiles
|
||||
} = this;
|
||||
const { lsh, idCard, serialNumber, kssycs, totalScore, judgeConfigObj, isAllProjectsEnd, passingScore } = judgeUI
|
||||
//TODO 断网考试结束补传
|
||||
// await uploadDisConnectData();
|
||||
try {
|
||||
const time = await getCurrentTime();
|
||||
const photoBase64 = await getPhoto();
|
||||
const { d1, d2, d3, d4, d5 } = ksjs
|
||||
@ -1458,6 +1457,14 @@ export default class Judge {
|
||||
})
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
promptAction.showToast({
|
||||
message: "考试结束异常,请尝试重新结束",
|
||||
duration: 3000
|
||||
})
|
||||
judgeUI.loadingPopupVisible = false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 当前项目转换
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user