Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
		
						commit
						1ad5458a6b
					
				| @ -159,7 +159,7 @@ export async function getSingleCenterTable(param) { | |||||||
|   return new Promise((reslove, reject) => { |   return new Promise((reslove, reject) => { | ||||||
|     try{ |     try{ | ||||||
|       upDataZhongxinginitialization(param).then((result) => { |       upDataZhongxinginitialization(param).then((result) => { | ||||||
|         console.log('teststetfinsh01',result) |         console.log('kkkkkkkkkkk',result) | ||||||
| 
 | 
 | ||||||
|         if (result) { |         if (result) { | ||||||
|           reslove(true) |           reslove(true) | ||||||
|  | |||||||
| @ -29,6 +29,7 @@ import util from '@ohos.util'; | |||||||
| import FileModel from '../../pages/judgeSDK/utils/fileModel'; | import FileModel from '../../pages/judgeSDK/utils/fileModel'; | ||||||
| import FileUtil from '../../common/utils/File'; | import FileUtil from '../../common/utils/File'; | ||||||
| import { GlobalConfig } from '../../config/index'; | import { GlobalConfig } from '../../config/index'; | ||||||
|  | import prompt from '@ohos.promptAction' | ||||||
| 
 | 
 | ||||||
| // @ts-nocheck
 | // @ts-nocheck
 | ||||||
| //读表
 | //读表
 | ||||||
| @ -343,20 +344,21 @@ export async function upDataZhongxinginitialization(param) { | |||||||
|     } |     } | ||||||
|     let flag=true |     let flag=true | ||||||
|     if (param.singlePlay) { |     if (param.singlePlay) { | ||||||
|       console.log('teststet0') |       console.log('teststet0',JSON.stringify(param)) | ||||||
|       const fileUtil = new FileUtil(param.context) |       const fileUtil = new FileUtil(param.context) | ||||||
|       const tableList = ['MA_SYSSET', 'MA_SYSTEMPARM', 'MA_MARKRULE', 'MA_MARKRULESET','ES_CARINFO','MA_MAP_ROAD','MA_MAP_ROAD_LANE','MAP_SUBITEM','MA_T_CARPARMSET','MA_MAP_ITEMCLASS','MA_MAP_POINT','MA_MAP_POINT_ITEM']; |       const tableList = ['MA_SYSSET', 'MA_SYSTEMPARM', 'MA_MARKRULE', 'MA_MARKRULESET','ES_CARINFO','MA_MAP_ROAD','MA_MAP_ROAD_LANE','MAP_SUBITEM','MA_T_CARPARMSET','MA_MAP_ITEMCLASS','MA_MAP_POINT','MA_MAP_POINT_ITEM']; | ||||||
|      for(let i=0;i<=tableList.length-1;i++){ |      for(let i=0;i<=tableList.length-1;i++){ | ||||||
|        const data = await fileUtil.readFile(GlobalConfig.comoonfileWriteAddress + `/config/tableList/${tableList[i]}.txt`); |        const data = await fileUtil.readFile(GlobalConfig.comoonfileWriteAddress + `/config/tableList/${tableList[i]}.txt`); | ||||||
|        const result=await sqlInsertCommonFn(tableList[i], JSON.parse(data) || [], param.context) |        const result=await sqlInsertCommonFn(tableList[i], JSON.parse(data) || [], param.context) | ||||||
|        flag=flag?result:false |        result?(flag=true):(flag=false) | ||||||
|      } |      } | ||||||
|       if(flag){ |       if(!flag){ | ||||||
|         prompt.showToast({ |         prompt.showToast({ | ||||||
|           message: '本地文件初始化数据库失败', |           message: '本地文件初始化数据库失败', | ||||||
|           duration: 3000 |           duration: 3000 | ||||||
|         }); |         }); | ||||||
|       } |       } | ||||||
|  | 
 | ||||||
|       resolve(flag) |       resolve(flag) | ||||||
|       return |       return | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -30,7 +30,9 @@ export default class EntryAbility extends UIAbility { | |||||||
|         globalThis.hasAuth = false |         globalThis.hasAuth = false | ||||||
|         // globalThis.version = '2022.08.13.01'
 |         // globalThis.version = '2022.08.13.01'
 | ||||||
|         // globalThis.judgeVersion = '2022.12.05.1'
 |         // globalThis.judgeVersion = '2022.12.05.1'
 | ||||||
|         globalThis.version = '2024.11.22.14' |         // globalThis.version = '2022.12.05.1'
 | ||||||
|  |         // globalThis.judgeVersion = '2022.08.13.01'
 | ||||||
|  |         globalThis.version = '2024.11.22.14'//济南
 | ||||||
|         globalThis.judgeVersion = '2024.11.22.14' |         globalThis.judgeVersion = '2024.11.22.14' | ||||||
|         globalThis.videoVersion= '1.0' |         globalThis.videoVersion= '1.0' | ||||||
|         // globalThis.version = '2023.12.13.01'
 |         // globalThis.version = '2023.12.13.01'
 | ||||||
|  | |||||||
| @ -103,9 +103,7 @@ struct Index { | |||||||
|                 if (this.loading) { |                 if (this.loading) { | ||||||
|                   return |                   return | ||||||
|                 } |                 } | ||||||
|                 setTimeout(() => { | 
 | ||||||
|                   this.angle = 360 |  | ||||||
|                 }, 1000) |  | ||||||
|                 this.angle = 0 |                 this.angle = 0 | ||||||
|                 if (!globalThis.timeInfo) { |                 if (!globalThis.timeInfo) { | ||||||
|                   globalThis.type='1' |                   globalThis.type='1' | ||||||
| @ -118,6 +116,7 @@ struct Index { | |||||||
|                   this.loading = false |                   this.loading = false | ||||||
|                   return |                   return | ||||||
|                 } |                 } | ||||||
|  | 
 | ||||||
|                 if (!globalThis.carInfo) { |                 if (!globalThis.carInfo) { | ||||||
|                   promptAction.showToast({ |                   promptAction.showToast({ | ||||||
|                     message: `车辆信息接口获取失败`, |                     message: `车辆信息接口获取失败`, | ||||||
| @ -125,10 +124,14 @@ struct Index { | |||||||
|                   }); |                   }); | ||||||
|                   globalThis.type='1' |                   globalThis.type='1' | ||||||
|                   AppStorage.SetOrCreate('errorMsg', 1); |                   AppStorage.SetOrCreate('errorMsg', 1); | ||||||
|  |                   console.log('testXMLToJSONInWorker5',JSON.stringify(globalThis.carInfo)) | ||||||
|  | 
 | ||||||
|                   globalThis.title='车辆信息接口获取失败' |                   globalThis.title='车辆信息接口获取失败' | ||||||
|                   this.loading = false |                   this.loading = false | ||||||
|                   return |                   return | ||||||
|                 } |                 } | ||||||
|  |                 console.log('testXMLToJSONInWorker6',JSON.stringify(globalThis.carInfo)) | ||||||
|  | 
 | ||||||
|                 this.testXMLToJSONInWorker() |                 this.testXMLToJSONInWorker() | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -143,6 +146,31 @@ struct Index { | |||||||
|                 if (this.loading) { |                 if (this.loading) { | ||||||
|                   return |                   return | ||||||
|                 } |                 } | ||||||
|  |                 if (!globalThis.timeInfo) { | ||||||
|  |                   globalThis.type='1' | ||||||
|  |                   AppStorage.SetOrCreate('errorMsg', 1); | ||||||
|  |                   globalThis.title='时间同步接口连接失败' | ||||||
|  |                   promptAction.showToast({ | ||||||
|  |                     message: `时间同步接口连接失败`, | ||||||
|  |                     duration: 3000 | ||||||
|  |                   }); | ||||||
|  |                   this.loading = false | ||||||
|  |                   return | ||||||
|  |                 } | ||||||
|  | 
 | ||||||
|  |                 if (!globalThis.carInfo) { | ||||||
|  |                   promptAction.showToast({ | ||||||
|  |                     message: `车辆信息接口获取失败`, | ||||||
|  |                     duration: 3000 | ||||||
|  |                   }); | ||||||
|  |                   globalThis.type='1' | ||||||
|  |                   AppStorage.SetOrCreate('errorMsg', 1); | ||||||
|  |                   console.log('testXMLToJSONInWorker5',JSON.stringify(globalThis.carInfo)) | ||||||
|  | 
 | ||||||
|  |                   globalThis.title='车辆信息接口获取失败' | ||||||
|  |                   this.loading = false | ||||||
|  |                   return | ||||||
|  |                 } | ||||||
|                 //判断数据库是否有表数据,有则直接跳转,没有则读取本地数据 |                 //判断数据库是否有表数据,有则直接跳转,没有则读取本地数据 | ||||||
|                 getSyncData('MA_SYSSET').then(data => { |                 getSyncData('MA_SYSSET').then(data => { | ||||||
|                   console.log('datadata', JSON.stringify(data)) |                   console.log('datadata', JSON.stringify(data)) | ||||||
| @ -151,7 +179,7 @@ struct Index { | |||||||
|                       url: 'pages/UserInfo', |                       url: 'pages/UserInfo', | ||||||
|                     }, router.RouterMode.Single) |                     }, router.RouterMode.Single) | ||||||
|                   } else { |                   } else { | ||||||
|                     this.loading = true | 
 | ||||||
|                     this.testXMLToJSONInWorker() |                     this.testXMLToJSONInWorker() | ||||||
|                   } |                   } | ||||||
|                 }) |                 }) | ||||||
| @ -301,21 +329,26 @@ struct Index { | |||||||
|     if (this.loading) { |     if (this.loading) { | ||||||
|       return |       return | ||||||
|     } |     } | ||||||
|  |     console.log('globalThis.timeInfo11111',JSON.stringify(globalThis.timeInfo),'globalThis.carInfo',JSON.stringify(globalThis.carInfo)) | ||||||
|  | 
 | ||||||
|     let workerInstance = new worker.ThreadWorker('entry/ets/workers/worker.ts'); |     let workerInstance = new worker.ThreadWorker('entry/ets/workers/worker.ts'); | ||||||
|     const param = { |     const param = { | ||||||
|  |       singlePlay: this.isSingle, | ||||||
|       carId: globalThis.carInfo?.carId, |       carId: globalThis.carInfo?.carId, | ||||||
|       examinationRoomId: globalThis.carInfo?.examinationRoomId, |       examinationRoomId: globalThis.carInfo?.examinationRoomId, | ||||||
|       judgeVersion: globalThis.judgeVersion, |       judgeVersion: globalThis.judgeVersion, | ||||||
|       shellVersion: globalThis.version, |       shellVersion: globalThis.version, | ||||||
|       paraKdid: globalThis.timeInfo?.paraKdid, |       paraKdid: globalThis.timeInfo?.paraKdid, | ||||||
|       mode: globalThis.timeInfo?.mode, |       mode: globalThis.timeInfo?.mode, | ||||||
|       context: this.context, |  | ||||||
|       host: globalThis.host, |       host: globalThis.host, | ||||||
|       centerHost: globalThis.timeInfo.url, |       centerHost: globalThis.timeInfo?.url, | ||||||
|       singlePlay: globalThis.singlePlay |       context: this.context, | ||||||
|     } |     } | ||||||
|     console.log('globalThis.timeInfo',JSON.stringify(globalThis.timeInfo),'globalThis.carInfo',JSON.stringify(globalThis.carInfo)) |     console.log('globalThis.timeInfo',JSON.stringify(globalThis.timeInfo),'globalThis.carInfo',JSON.stringify(globalThis.carInfo)) | ||||||
|     this.loading = true |     this.loading = true | ||||||
|  |     setTimeout(() => { | ||||||
|  |       this.angle = 360 | ||||||
|  |     }, 1000) | ||||||
|     workerInstance.postMessage(param); |     workerInstance.postMessage(param); | ||||||
|     workerInstance.onmessage = (e: MessageEvents): void => { |     workerInstance.onmessage = (e: MessageEvents): void => { | ||||||
|       console.log("baoyihu after postMessage :", JSON.stringify(e.data)); |       console.log("baoyihu after postMessage :", JSON.stringify(e.data)); | ||||||
| @ -365,11 +398,11 @@ struct Index { | |||||||
| 
 | 
 | ||||||
|     console.log('globalThis.singlePlay', globalThis.singlePlay) |     console.log('globalThis.singlePlay', globalThis.singlePlay) | ||||||
|     if (globalThis.singlePlay == undefined || globalThis.singlePlay == null) { |     if (globalThis.singlePlay == undefined || globalThis.singlePlay == null) { | ||||||
|  |       globalThis.singlePlay = false | ||||||
|       this.vocObj.playAudio({ |       this.vocObj.playAudio({ | ||||||
|         type: 1, |         type: 1, | ||||||
|         name: 'welcome.wav' |         name: 'welcome.wav' | ||||||
|       }) |       }) | ||||||
|       globalThis.singlePlay = false |  | ||||||
|     } |     } | ||||||
|     this.isSingle = globalThis.singlePlay |     this.isSingle = globalThis.singlePlay | ||||||
|     this.loading = false |     this.loading = false | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user