Merge
This commit is contained in:
		
						commit
						10b005cd25
					
				| @ -196,4 +196,3 @@ export async function uploadHarmonyLiCheng(data) { | |||||||
|     method: 'post', |     method: 'post', | ||||||
|   }) |   }) | ||||||
| } | } | ||||||
| 
 |  | ||||||
|  | |||||||
| @ -36,7 +36,7 @@ export default async function writeObjectOutNew(data,filePath): Promise<WR> { | |||||||
| 
 | 
 | ||||||
|   // let connectTimeout = sjbs === '02-21-000014' ?60000:1
 |   // let connectTimeout = sjbs === '02-21-000014' ?60000:1
 | ||||||
| 
 | 
 | ||||||
|   console.info('surenjun','调用旧监管') |   console.info('surenjun','调用新监管') | ||||||
| 
 | 
 | ||||||
|   const temp = await request({ |   const temp = await request({ | ||||||
|     host: globalThis.JGHOST, |     host: globalThis.JGHOST, | ||||||
| @ -69,14 +69,13 @@ export default async function writeObjectOutNew(data,filePath): Promise<WR> { | |||||||
|     await fileUtil.initFolder(filePath); |     await fileUtil.initFolder(filePath); | ||||||
|     fileUtil.editFile(`${filePath}/wuxi_exam_data.txt`,JSON.stringify(temp) +`\n`); |     fileUtil.editFile(`${filePath}/wuxi_exam_data.txt`,JSON.stringify(temp) +`\n`); | ||||||
|   } |   } | ||||||
|   // @ts-ignore
 |   // const {code} = temp;
 | ||||||
|   const {code} = temp; |   // if(code == '2300007' || code == '2300028'){
 | ||||||
|   if(code == '2300007' || code == '2300028'){ |   //   return await writeObjectOutNew(params,filePath)
 | ||||||
|     return await writeObjectOutNew(params,filePath) |   // }else{
 | ||||||
|   }else{ |   //   return temp
 | ||||||
|     // @ts-ignore
 |   // }
 | ||||||
|     return temp |   return temp | ||||||
|   } |  | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -94,7 +94,7 @@ export const getMessageHeartbeat = async (msg) => { | |||||||
|     //考试员号
 |     //考试员号
 | ||||||
|     ascksyhArr.map(ksyh => string2Bytes(ksyh, 8)[0]), |     ascksyhArr.map(ksyh => string2Bytes(ksyh, 8)[0]), | ||||||
|     //科目类型(0:未考试 1:科目二 2:科目三) + 考试开始时间
 |     //科目类型(0:未考试 1:科目二 2:科目三) + 考试开始时间
 | ||||||
|     string2Bytes(`${0}${'00:00:00'}`, 4 * 8), |     string2Bytes(`${0}${'00:00:000'}`, 4 * 8), | ||||||
|     // 消息序号
 |     // 消息序号
 | ||||||
|     string2Bytes(serialIndex, 2 * 8), |     string2Bytes(serialIndex, 2 * 8), | ||||||
|     translateSignals, |     translateSignals, | ||||||
|  | |||||||
| @ -145,10 +145,9 @@ struct UserInfo { | |||||||
|     this.updateTimeLimit = false |     this.updateTimeLimit = false | ||||||
|     this.ksksLimit = false |     this.ksksLimit = false | ||||||
|     this.currentUser = EmptyCandidateObject |     this.currentUser = EmptyCandidateObject | ||||||
|     const mediaTest = new FilePhoto(this.context); |  | ||||||
|     this.filePhoto = new FilePhoto(this.context); |     this.filePhoto = new FilePhoto(this.context); | ||||||
|     //语音功能on |     //语音功能on | ||||||
|     new WebRTCVoice(this.context); |     // new WebRTCVoice(this.context); | ||||||
|     //初始化数据 |     //初始化数据 | ||||||
|     this.initData() |     this.initData() | ||||||
|     //身份证读卡器初始化 |     //身份证读卡器初始化 | ||||||
|  | |||||||
| @ -72,6 +72,7 @@ export default class Judge { | |||||||
|     this.kfArr = judgeUI.kfArr |     this.kfArr = judgeUI.kfArr | ||||||
|     this.xmmcStr = ''; |     this.xmmcStr = ''; | ||||||
|     this.xmmcCode = ''; |     this.xmmcCode = ''; | ||||||
|  |     this.xmmcEndCode = undefined; | ||||||
|     this.carztStr = ''; |     this.carztStr = ''; | ||||||
|     this.testKmItems = {}; |     this.testKmItems = {}; | ||||||
|     // 考试回放配置
 |     // 考试回放配置
 | ||||||
| @ -387,6 +388,7 @@ export default class Judge { | |||||||
|         this.xmmcStr = xmmcStr; |         this.xmmcStr = xmmcStr; | ||||||
|         this.xmmcCode = xmmcCode; |         this.xmmcCode = xmmcCode; | ||||||
|         this.xmmcSingleCode = xmmcSingleCode |         this.xmmcSingleCode = xmmcSingleCode | ||||||
|  |         this.xmmcEndCode = xmmcCode | ||||||
|         this.xmdm = xmdm; |         this.xmdm = xmdm; | ||||||
|         this.xmxh = xmxh; |         this.xmxh = xmxh; | ||||||
|         this.judgeUI.isProjectIn = true |         this.judgeUI.isProjectIn = true | ||||||
| @ -484,7 +486,7 @@ export default class Judge { | |||||||
|       case 10:{ |       case 10:{ | ||||||
|         const param611 = judgeConfigObj['611'] || ''; |         const param611 = judgeConfigObj['611'] || ''; | ||||||
|         const [f,s] = param611.split('/') |         const [f,s] = param611.split('/') | ||||||
|         const {xmdm} = precast; |         const {xmdm,xmxh} = precast; | ||||||
|         const xmmcCode = judgeUI.projectsObj[xmdm].projectCodeCenter; |         const xmmcCode = judgeUI.projectsObj[xmdm].projectCodeCenter; | ||||||
|         const xmmcSingleCode = judgeUI.projectsObj[xmdm].projectCode; |         const xmmcSingleCode = judgeUI.projectsObj[xmdm].projectCode; | ||||||
|         // if(examSubject == 2 && ((xmdm == 0 && f == 1) || (xmdm == 1 && s == 1) || xmdm == 3)){
 |         // if(examSubject == 2 && ((xmdm == 0 && f == 1) || (xmdm == 1 && s == 1) || xmdm == 3)){
 | ||||||
| @ -598,6 +600,7 @@ export default class Judge { | |||||||
|               console.info(judgeTag, `项目结束-${xmdm}-${projectsObj[xmdm].name}`) |               console.info(judgeTag, `项目结束-${xmdm}-${projectsObj[xmdm].name}`) | ||||||
|               await endProject(xmdm); |               await endProject(xmdm); | ||||||
|               this.xmmcSingleCode = 0; |               this.xmmcSingleCode = 0; | ||||||
|  |               this.xmmcEndCode = undefined; | ||||||
|             }, {isDelay: true}) |             }, {isDelay: true}) | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
| @ -766,7 +769,7 @@ export default class Judge { | |||||||
|     const carInfo = globalThis.carInfo; |     const carInfo = globalThis.carInfo; | ||||||
|     const deviceNo = globalThis.deviceNo; |     const deviceNo = globalThis.deviceNo; | ||||||
|     const { examSubject,plateNo,carNo } = carInfo; |     const { examSubject,plateNo,carNo } = carInfo; | ||||||
|     const {judgeUI,getProjectInfo,fileLog,xmmcSingleCode,filePath} = this; |     const {judgeUI,getProjectInfo,fileLog,xmmcSingleCode,xmmcEndCode,filePath} = this; | ||||||
|     const {lsh,idCard,serialNumber,ksdd,projectsObj} = judgeUI |     const {lsh,idCard,serialNumber,ksdd,projectsObj} = judgeUI | ||||||
|     const time = await getCurrentTime(); |     const time = await getCurrentTime(); | ||||||
|     const project = getProjectInfo(ksxm); |     const project = getProjectInfo(ksxm); | ||||||
| @ -790,7 +793,7 @@ export default class Judge { | |||||||
|         ksxm: project == undefined |         ksxm: project == undefined | ||||||
|           ? (commonKsxm |           ? (commonKsxm | ||||||
|             ? (projectsObj[commonKsxm].projectCodeCenter) |             ? (projectsObj[commonKsxm].projectCodeCenter) | ||||||
|             : (examSubject == 3 ? 30000 : 10000)) |             : (examSubject == 3 ? 30000 : (xmmcEndCode == undefined ? 10000 : xmmcEndCode))) | ||||||
|           : project.projectCodeCenter , |           : project.projectCodeCenter , | ||||||
|         kfxm: kf.markcatalog, |         kfxm: kf.markcatalog, | ||||||
|         kfxmmx: `${ksxm},${kf.markserial}`, |         kfxmmx: `${ksxm},${kf.markserial}`, | ||||||
| @ -1033,7 +1036,8 @@ export default class Judge { | |||||||
|     const { examSubject ,plateNo} = carInfo; |     const { examSubject ,plateNo} = carInfo; | ||||||
|     const {judgeUI,ksjs,getPhoto,uploadProgressData,uploadDisConnectData,avPlayer,kfArr,judgeTask,filePath} = this; |     const {judgeUI,ksjs,getPhoto,uploadProgressData,uploadDisConnectData,avPlayer,kfArr,judgeTask,filePath} = this; | ||||||
|     const {lsh,idCard,serialNumber,kssycs,totalScore,judgeConfigObj,isAllProjectsEnd,passingScore} = judgeUI |     const {lsh,idCard,serialNumber,kssycs,totalScore,judgeConfigObj,isAllProjectsEnd,passingScore} = judgeUI | ||||||
|     await uploadDisConnectData(); |     //TODO 断网考试结束补传
 | ||||||
|  |     // await uploadDisConnectData();
 | ||||||
|     const time = await getCurrentTime(); |     const time = await getCurrentTime(); | ||||||
|     const photoBase64 = await getPhoto(); |     const photoBase64 = await getPhoto(); | ||||||
|     const {d1,d2,d3,d4,d5} = ksjs |     const {d1,d2,d3,d4,d5} = ksjs | ||||||
| @ -1215,7 +1219,12 @@ export default class Judge { | |||||||
|       return |       return | ||||||
|     } |     } | ||||||
|     const {zfxd,yfxd,shtd,ygd,jgd,skd,dh1,dh2,lhq,jsc,ssc,fsc,lb,mkg,aqd,ygq,cs,fdjzs,dw} = sensor |     const {zfxd,yfxd,shtd,ygd,jgd,skd,dh1,dh2,lhq,jsc,ssc,fsc,lb,mkg,aqd,ygq,cs,fdjzs,dw} = sensor | ||||||
|     const {jd,wd, hxj,  fyj,  hbg,sd} = gps |     const {jd,wd, hxj,  fyj,  hbg,sd} = gps; | ||||||
|  | 
 | ||||||
|  |     //过滤错误数据
 | ||||||
|  |     if(jd == 0){ | ||||||
|  |       return | ||||||
|  |     } | ||||||
|     const translateProject = getTranslateProject(); |     const translateProject = getTranslateProject(); | ||||||
|     const sbxh = getSbxh(xmdm, xmxh) |     const sbxh = getSbxh(xmdm, xmxh) | ||||||
|     const {carzt,dcjl,qjjl,dxjl,bxjl} = performInfo || {}; |     const {carzt,dcjl,qjjl,dxjl,bxjl} = performInfo || {}; | ||||||
| @ -1294,9 +1303,8 @@ export default class Judge { | |||||||
|       tempArr = tempArr.concat(itemArr) |       tempArr = tempArr.concat(itemArr) | ||||||
|     }) |     }) | ||||||
|     this.serialIndex += 1; |     this.serialIndex += 1; | ||||||
|     fileLog.setFourAndOneLogData(`${startHourTime},${translateJd},${translateWd}`); |     fileLog.setFourAndOneLogData(`${lsh},${ksyh},${examType}${globalThis.startHourTime || startHourTime},`); | ||||||
|     fileLog.setFourAndOneLogDataBytes(tempArr.toString()); |     fileLog.setFourAndOneLogDataBytes(tempArr.toString()); | ||||||
| 
 |  | ||||||
|     return Array2Byte(tempArr) |     return Array2Byte(tempArr) | ||||||
|   } |   } | ||||||
|   //获取场地序号
 |   //获取场地序号
 | ||||||
| @ -1583,7 +1591,7 @@ export default class Judge { | |||||||
|       const bytes = await this.getMessageHeartbeat(); |       const bytes = await this.getMessageHeartbeat(); | ||||||
|       bytes && globalThis.judgeUdp.send(bytes) |       bytes && globalThis.judgeUdp.send(bytes) | ||||||
| 
 | 
 | ||||||
|     }, 20) |     }, 200) | ||||||
| 
 | 
 | ||||||
|     globalThis.judgeTimer = judgeTimer; |     globalThis.judgeTimer = judgeTimer; | ||||||
|   } |   } | ||||||
| @ -1673,6 +1681,7 @@ export default class Judge { | |||||||
|   private xmmcStr: string |   private xmmcStr: string | ||||||
|   private xmmcCode: string |   private xmmcCode: string | ||||||
|   private xmmcSingleCode: number |   private xmmcSingleCode: number | ||||||
|  |   private xmmcEndCode?:number | ||||||
|   private xmdm: string | number |   private xmdm: string | number | ||||||
|   private xmxh: string |   private xmxh: string | ||||||
|   private fileModel: FileModel |   private fileModel: FileModel | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user