Compare commits

..

No commits in common. "46cc3a311f924cf5ac954c7cdb304f4d09d8f905" and "0aaf5ddd1a3d25b2744755a839a64ce6944ed21f" have entirely different histories.

5 changed files with 8 additions and 19 deletions

View File

@ -25,7 +25,7 @@ CommonConstants {
*/ */
static readonly ACCOUNT_TABLE = { static readonly ACCOUNT_TABLE = {
tableName: 'USER', tableName: 'USER',
sqlCreate: 'CREATE TABLE IF NOT EXISTS USER(id TEXT,sfzmhm TEXT,xm CHAR(20), lsh TEXT, kszp TEXT,ksdd TEXT,kssycs TEXT,kslx TEXT,kscx TEXT,ksxl TEXT,ksy1 TEXT)', sqlCreate: 'CREATE TABLE IF NOT EXISTS USER(id INTEGER PRIMARY KEY AUTOINCREMENT,sfzmhm TEXT,xm CHAR(20), lsh TEXT, kszp TEXT,ksdd TEXT,kssycs TEXT,kslx TEXT,kscx TEXT,ksxl TEXT,ksy1 TEXT)',
columns: ['id','sfzmhm','xm','lsh','kszp','ksdd','kssycs','kslx','kscx','ksxl','ksy1'] columns: ['id','sfzmhm','xm','lsh','kszp','ksdd','kssycs','kslx','kscx','ksxl','ksy1']
}; };

View File

@ -261,11 +261,9 @@ export async function takePhotoFn(context) {
if (param[key1]) { if (param[key1]) {
param.pztd = param[`td${Number(i) + 1}`] param.pztd = param[`td${Number(i) + 1}`]
takePhoto(param, context, 'jt/', 0, (data) => { takePhoto(param, context, 'jt/', 0, (data) => {
if(data.errorCode!=0){
console.log('拍照失败')
return
}
if (Number(data.fileSize) <= (Number(param.zdyz) * 1000)) { if (Number(data.fileSize) <= (Number(param.zdyz) * 1000)) {
console.log('getPhtot0000')
map[key1] = true map[key1] = true
promptAction.showToast({ promptAction.showToast({
message: `视频遮挡`, message: `视频遮挡`,

View File

@ -106,8 +106,7 @@ console.log('baoyihubaoyihu',video_uri,flag)
// var snapResult = rtsp_server.getVideoSnapshot(context, video_uri, '', dir); // var snapResult = rtsp_server.getVideoSnapshot(context, video_uri, '', dir);
if(flag==0){ if(flag==0){
rtsp_server.detectVideoSnapshotSize(video_uri,fileName,(err,snapResult)=>{ rtsp_server.detectVideoSnapshotSize(video_uri,fileName,(err,snapResult)=>{
console.log("baohaowen_detectLoop round end size1:"+JSON.stringify(snapResult)); console.log("baohaowen_detectLoop round end size1:"+snapResult.fileSize);
//errorCode=0为正常
callback({fileSize:snapResult.fileSize,errorCode:snapResult.errorCode }) callback({fileSize:snapResult.fileSize,errorCode:snapResult.errorCode })
}); });
@ -117,7 +116,6 @@ console.log('baoyihubaoyihu',video_uri,flag)
return new Promise<takePhotoParam>((resolve,reject)=>{ return new Promise<takePhotoParam>((resolve,reject)=>{
rtsp_server.getVideoSnapshot(context, video_uri, fileName,dir,true,(err,snapResult)=>{ rtsp_server.getVideoSnapshot(context, video_uri, fileName,dir,true,(err,snapResult)=>{
console.log('baoyihubaoyihu',video_uri,flag,JSON.stringify(snapResult)) console.log('baoyihubaoyihu',video_uri,flag,JSON.stringify(snapResult))
//errorCode=-2拍照失败
console.log('getPhtot',JSON.stringify(snapResult)) console.log('getPhtot',JSON.stringify(snapResult))
resolve({base64: snapResult.dataString,name:snapResult.fileName,fileSize:snapResult.fileSize,errorCode:snapResult.errorCode }) resolve({base64: snapResult.dataString,name:snapResult.fileName,fileSize:snapResult.fileSize,errorCode:snapResult.errorCode })
}); });

View File

@ -14,7 +14,6 @@ export default struct Index {
@State inputTextArr: string[] = ['', '']; @State inputTextArr: string[] = ['', ''];
@State imgArr1: Resource[] = [$r('app.media.1_nor'), $r('app.media.2_nor'), $r('app.media.3_nor'), $r('app.media.4_nor'), $r('app.media.5_nor'), $r('app.media.6_nor'), $r('app.media.7_nor'), $r('app.media.8_nor'), $r('app.media.9_nor'), $r('app.media.0_nor'), $r('app.media.x_nor'), $r('app.media.clear_nor'), $r('app.media.delete_nor'), $r('app.media.confirm_nor')] @State imgArr1: Resource[] = [$r('app.media.1_nor'), $r('app.media.2_nor'), $r('app.media.3_nor'), $r('app.media.4_nor'), $r('app.media.5_nor'), $r('app.media.6_nor'), $r('app.media.7_nor'), $r('app.media.8_nor'), $r('app.media.9_nor'), $r('app.media.0_nor'), $r('app.media.x_nor'), $r('app.media.clear_nor'), $r('app.media.delete_nor'), $r('app.media.confirm_nor')]
@State currentInputIndex: number = 0 @State currentInputIndex: number = 0
@State limit: boolean = false
@State @Watch('outClick') outFlag: boolean = false; @State @Watch('outClick') outFlag: boolean = false;
private vocObj = null; private vocObj = null;
private title = '' private title = ''
@ -80,9 +79,7 @@ export default struct Index {
}); });
return return
} }
if(this.limit){
return
}
const param = { const param = {
carId: globalThis.carInfo.carId, carId: globalThis.carInfo.carId,
examinationRoomId: globalThis.carInfo.examinationRoomId, examinationRoomId: globalThis.carInfo.examinationRoomId,
@ -91,13 +88,10 @@ export default struct Index {
} }
this.type='2' this.type='2'
this.errorDialog.open() this.errorDialog.open()
this.limit=true
console.log('carInfo', JSON.stringify(globalThis.carInfo)) console.log('carInfo', JSON.stringify(globalThis.carInfo))
examinerLoginService(param).then(res => { examinerLoginService(param).then(res => {
console.log('res?.examinerLoginRsp?.head?.resultCode',res?.examinerLoginRsp?.head?.resultCode,JSON.stringify(res)) console.log('res?.examinerLoginRsp?.head?.resultCode',res?.examinerLoginRsp?.head?.resultCode,JSON.stringify(res))
this.errorDialog.close() this.errorDialog.close()
this.limit=false
if(res?.examinerLoginRsp?.head?.resultCode=='1'){ if(res?.examinerLoginRsp?.head?.resultCode=='1'){
// this.type='1' // this.type='1'
// this.title=decodeURIComponent(res.examinerLoginRsp.head.resultMessage) // this.title=decodeURIComponent(res.examinerLoginRsp.head.resultMessage)

View File

@ -462,13 +462,13 @@ struct UserInfo {
await upDateTableByArray('USER', []) await upDateTableByArray('USER', [])
this.type='2' this.type='2'
this.errorDialog.open() this.errorDialog.open()
this.updateTimeLimit = true
const param = `<getExaminationStudentInfoReq><head><checkCode>${Md5.Instance.get_md5(globalThis.carInfo.carId + globalThis.carInfo.examinationRoomId + globalThis.username)}</checkCode></head><body><carId>${globalThis.carInfo.carId}</carId><examinationRoomId>${globalThis.carInfo.examinationRoomId}</examinationRoomId><examinerName>${globalThis.username}</examinerName></body></getExaminationStudentInfoReq>` const param = `<getExaminationStudentInfoReq><head><checkCode>${Md5.Instance.get_md5(globalThis.carInfo.carId + globalThis.carInfo.examinationRoomId + globalThis.username)}</checkCode></head><body><carId>${globalThis.carInfo.carId}</carId><examinationRoomId>${globalThis.carInfo.examinationRoomId}</examinationRoomId><examinerName>${globalThis.username}</examinerName></body></getExaminationStudentInfoReq>`
getExaminationStudentInfo(param).then(async (res) => { getExaminationStudentInfo(param).then(async (res) => {
this.errorDialog.close() this.errorDialog.close()
setTimeout(() => { setTimeout(() => {
this.updateTimeLimit = false this.updateTimeLimit = true
}, 3000) }, 30000)
this.updateTimeLimit = false
if (!res||res?.getExaminationStudentInfoRsp?.head?.resultCode=='1') { if (!res||res?.getExaminationStudentInfoRsp?.head?.resultCode=='1') {
return return
} }
@ -517,7 +517,6 @@ struct UserInfo {
} }
}) })
}).catch((error) => { }).catch((error) => {
this.updateTimeLimit = false
console.log('error12error' + error) console.log('error12error' + error)
}) })
} }