This commit is contained in:
lvyuankang 2024-11-20 13:44:40 +08:00
parent 0b2b653b8e
commit 33534c7253
6 changed files with 100 additions and 73 deletions

View File

@ -33,6 +33,10 @@ export default class TcpClient {
// time:dateFormat(new Date()),
// PLC:`${TAG} tcpOnerror ${JSON.stringify(err)}`,
// })
this.writeLog({
time:dateFormat(new Date()),
message: `${TAG} tcponerror localIp${JSON.stringify(err)}`,
})
console.log(TAG, 'tcpOnerror', JSON.stringify(err))
setTimeout(async () => {
getTCP()
@ -54,10 +58,18 @@ export default class TcpClient {
address: this.localIp, port: parseInt(this.localIpPort), family: 1
}, err => {
if (err) {
this.writeLog({
time:dateFormat(new Date()),
message: `${TAG} tcprebind tcpreBinderror${JSON.stringify(err)}`,
})
globalThis.getCloseTcp = true
hilog.info(0x0000, 'testTag', "tcpreBinderror:" + JSON.stringify(err));
resolve(true)
}
this.writeLog({
time:dateFormat(new Date()),
message: `${TAG} tcprebind success`,
})
console.log('testTag,rebindtestTag tcp bind success');
globalThis.getCloseTcp = false
resolve(false)
@ -76,7 +88,7 @@ export default class TcpClient {
bindTcp() {
this.writeLog({
time:dateFormat(new Date()),
message: `${TAG} tcpbind localIp${this.localIp} ${localIpPort}`,
message: `${TAG} tcpbind localIp${this.localIp} ${this.localIpPort}`,
})
console.log(TAG, 'tcpbind', this.localIp, 'localIp', this.localIpPort)
return new Promise((resolve, reject) => {
@ -148,6 +160,10 @@ export default class TcpClient {
return
}
setTimeout(() => {
this.writeLog({
time:dateFormat(new Date()),
message: `${TAG} tcp重连`,
})
getTCP()
resolve(false)
}, 2000)

View File

@ -345,20 +345,16 @@ export default class UdpClientByCenter {
// this.stashFn(str)
const newArr = JSON.parse(JSON.stringify(strachArr))
this.writeLog({
time:dateFormat(new Date()),
PLC: JSON.stringify(newArr.toString()),
})
// this.writeLog({
// time:dateFormat(new Date()),
// PLC: JSON.stringify(newArr.toString()),
// })
if(strachArr[83]!='4'||strachArr[92]!='0'){
console.log('差分状态异常',strachArr[83],strachArr[92])
// this.chafenFlag++
// if(this.chafenFlag>=15&&!globalThis.dialogOpen){
// // getUDP(globalThis.context,true)
// globalThis.title='差分状态异常'
// globalThis.type='3'
// globalThis.errorDialog.open()
// globalThis.dialogOpen=true
// }
this.writeLog({
time:dateFormat(new Date()),
PLC: `${TAG}差分状态异常,${strachArr[83]},${strachArr[92]}`,
})
}else{
globalThis.dialogOpen=false
this.chafenFlag=0

View File

@ -413,62 +413,11 @@ struct UserInfo {
that.ksxtbh = ksxtbhArr?.[0]?.v_value || '222'
const studentRefreshParam = syssetParams.filter(sys => sys.v_no === '452') //判断自动更新
that.studentRefreshStatue = studentRefreshParam?.[0]?.v_value || '0'
const openCheckFlagParam = syssetParams.filter(sys => sys.v_no == '17')
const openCheckFlagParam = syssetParams.filter(sys => sys.v_no == '17') //0
const openCheckFlag = openCheckFlagParam?.[0]?.v_value == '1' ? '1' : '0'
const faceParam = syssetParams.filter(sys => sys.v_no == '2413')
syssetParams.forEach(sys => {
//364 绕车一周评判时机(1-开始考试后判 2-开始考试前判)
if (sys.v_no === '364' && decodeURIComponent(sys.v_value) == '2') {
this.isBoardPrePareSetPopupOpen = true;
}
// 车上没有缺考功能
if (sys.v_no === '770') {
this.systemParam.Param770Str = sys.v_value;
}
// 开始考试前必须解开安全带或关车门
if (sys.v_no === '803') {
this.systemParam.Param803Str = sys.v_value + '';
}
//判断是否考生是否按顺序考试
if (sys.v_no === '341'&&decodeURIComponent(sys.v_value) == '1') {
this.systemParam.Param341= true
}else{
this.systemParam.Param341= false
}
//开始考试触发方式
if (sys.v_no === '612') {
this.systemParam.Param612Str= decodeURIComponent(sys.v_value)
}
//车上考试过一次就不能缺考
if (sys.v_no === '352') {
this.systemParam.Param352Str= decodeURIComponent(sys.v_value)
}
//828考生待考界面安全员显示考试员
if (sys.v_no === '828') {
this.systemParam.Param828Str= decodeURIComponent(sys.v_value)
if(this.systemParam.Param828Str=='1'){
this.labelBlocks[5].label='安全员名'
}else{
this.labelBlocks[5].label='考试员名'
}
this.labelBlocks=JSON.parse(JSON.stringify(this.labelBlocks))
}
//视频保存天数
if (sys.v_no === '305') {
this.systemParam.Param305Str= decodeURIComponent(sys.v_value)
if(!Number(this.systemParam.Param305Str)){
this.systemParam.Param305Str='2'
}
// delHilog(this.Param305Str)
getUserAlbumItemByDisplayName('', this.systemParam.Param305Str,1)
getUserAlbumItemByDisplayName('',this.systemParam.Param305Str,2)
}
})
// faceParam?.[0]?.v_value ||
const faceParam = syssetParams.filter(sys => sys.v_no == '2413') //3
console.log('FaceOpenStatue',openCheckFlag,this.FaceOpenStatue)
// 1身份证读卡器 2指纹 3人脸
if (openCheckFlag == '1') {
that.FaceOpenStatue = faceParam?.[0]?.v_value == '3' ? '1' : '0'
@ -477,6 +426,59 @@ struct UserInfo {
that.openDeviceByIDCard()
}
}
syssetParams.forEach(sys => {
//364 绕车一周评判时机(1-开始考试后判 2-开始考试前判)
if (sys.v_no === '364' && decodeURIComponent(sys.v_value) == '2') {
that.isBoardPrePareSetPopupOpen = true;
}
// 车上没有缺考功能
if (sys.v_no === '770') {
that.systemParam.Param770Str = sys.v_value;
}
// 开始考试前必须解开安全带或关车门
if (sys.v_no === '803') {
that.systemParam.Param803Str = sys.v_value + '';
}
//判断是否考生是否按顺序考试
if (sys.v_no === '341'&&decodeURIComponent(sys.v_value) == '1') {
that.systemParam.Param341= true
}else{
that.systemParam.Param341= false
}
//开始考试触发方式
if (sys.v_no === '612') {
that.systemParam.Param612Str= decodeURIComponent(sys.v_value)
}
//车上考试过一次就不能缺考
if (sys.v_no === '352') {
that.systemParam.Param352Str= decodeURIComponent(sys.v_value)
}
//828考生待考界面安全员显示考试员
if (sys.v_no === '828') {
that.systemParam.Param828Str= decodeURIComponent(sys.v_value)
if(that.systemParam.Param828Str=='1'){
that.labelBlocks[5].label='安全员名'
}else{
that.labelBlocks[5].label='考试员名'
}
that.labelBlocks=JSON.parse(JSON.stringify(this.labelBlocks))
}
//视频保存天数
if (sys.v_no === '305') {
that.systemParam.Param305Str= decodeURIComponent(sys.v_value)
if(!Number(this.systemParam.Param305Str)){
that.systemParam.Param305Str='2'
}
// delHilog(this.Param305Str)
getUserAlbumItemByDisplayName('', that.systemParam.Param305Str,1)
getUserAlbumItemByDisplayName('',that.systemParam.Param305Str,2)
}
})
// faceParam?.[0]?.v_value ||
//0不自动更新 1自动更新不限次数 2没有考生更新2次
if (that.studentRefreshStatue == '2') {
@ -932,9 +934,13 @@ struct UserInfo {
return
}
console.log('this.FaceOpenStatuethis.FaceOpenStatue',this.FaceOpenStatue)
if (this.FaceOpenStatue != '0') {
// 同一学员连续第二次考试时不再验证身份
if (this.FaceOpenStatue != '0'||!(this.currentUser.kssycs=='1'&&this.systemParam.Param830Str=='1')) {
if(this.currentUser.kssycs=='1'&&this.systemParam.Param830Str=='1'){
this.sfbdinterfaceFn()
}else{
this.showFaceCompare = true
}
} else {
this.sfbdinterfaceFn()
}

View File

@ -413,10 +413,9 @@ export default struct SignDisplayCom {
}
let t = 0
for (let i = 83; i <= 97; i++) {
this.GPSColum[t].value = this.signArr[i]
this.GPSColum[t].value = ((Number((this.signArr[97]||0))*1.852).toFixed(2)).toString()
t++
}
this.GPSColum[97].value= ((Number(this.GPSColum[97])*1.852).toFixed(2)).toString()
this.sjxhColum = JSON.parse(JSON.stringify((this.sjxhColum)))
that.signArr = JSON.parse(JSON.stringify((this.signArr)))
that.GPSColum = JSON.parse(JSON.stringify((this.GPSColum)))

View File

@ -79,6 +79,16 @@ export default class FileLog {
public setExamJudgeLogData = async (str:string) => {
const {fileUtil,folderPath} = this;
await fileUtil.editFile(`${folderPath}/judge_log_data.txt`,str);
// 设置四合一画面数据
public setFourAndOneLogData = async (str:string) => {
const {fileUtil,folderPath} = this;
await fileUtil.editFile(`${folderPath}/four_one_log_data.txt`,str);
}
public setFourAndOneLogDataBytes = async (str:string) => {
const {fileUtil,folderPath} = this;
await fileUtil.editFile(`${folderPath}/four_one_log_byte_data.txt`,str);
}
// 无锡所轨迹数据

View File

@ -2,7 +2,7 @@
//考试回放开关
export const judgeConfig = {
//本地目录开关
isTrajectoryOpen: true,
isTrajectoryOpen: false,
//是否开启拍照
isPhotoOpen: true,
//扣分语音是否强制开启