單機模式修改 #59
@ -128,6 +128,8 @@ export async function getDoubleCeneterTable(param) {
|
|||||||
export async function getSingleCenterTable(param) {
|
export async function getSingleCenterTable(param) {
|
||||||
return new Promise((reslove, reject) => {
|
return new Promise((reslove, reject) => {
|
||||||
upDataZhongxinginitialization(param).then((result) => {
|
upDataZhongxinginitialization(param).then((result) => {
|
||||||
|
console.log('teststetfinsh01')
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
reslove(true)
|
reslove(true)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -85,10 +85,10 @@ function sqlInsertCommonFn(tableName, resultArr, context?, delFlag = true) {
|
|||||||
}, map[tableName], context);
|
}, map[tableName], context);
|
||||||
accountTable.getRdbStore(() => {
|
accountTable.getRdbStore(() => {
|
||||||
accountTable.query('0', async (result) => {
|
accountTable.query('0', async (result) => {
|
||||||
console.log('sqlsqlinsertresult',JSON.stringify(result))
|
console.log('teststet3',)
|
||||||
|
|
||||||
// console.log('表长度',result.length,tableName)
|
// console.log('表长度',result.length,tableName)
|
||||||
if (result.length == 0) {
|
if (result.length == 0) {
|
||||||
console.log('sqlsqlinsert00000')
|
|
||||||
let INSERT_SQL = "INSERT INTO " + tableName
|
let INSERT_SQL = "INSERT INTO " + tableName
|
||||||
+ " (" + map[tableName].ACCOUNT_TABLE.columns.toString() + ") VALUES "
|
+ " (" + map[tableName].ACCOUNT_TABLE.columns.toString() + ") VALUES "
|
||||||
|
|
||||||
@ -109,8 +109,10 @@ function sqlInsertCommonFn(tableName, resultArr, context?, delFlag = true) {
|
|||||||
}
|
}
|
||||||
INSERT_SQL += str
|
INSERT_SQL += str
|
||||||
})
|
})
|
||||||
console.log('sqlsqlinsertINSERT_SQLINSERT_SQL', INSERT_SQL)
|
console.log('sqlsINSERT_SQLINSERT_SQL', INSERT_SQL)
|
||||||
accountTable.sqlOperate(INSERT_SQL, tableName, (val) => {
|
accountTable.sqlOperate(INSERT_SQL, tableName, (val) => {
|
||||||
|
console.log('teststet3',val,tableName)
|
||||||
|
|
||||||
console.log('sqlsqlinsert,', val, 'tableName', tableName)
|
console.log('sqlsqlinsert,', val, 'tableName', tableName)
|
||||||
resolve(val)
|
resolve(val)
|
||||||
})
|
})
|
||||||
@ -327,30 +329,26 @@ export async function getEsCarModel(context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function upDataZhongxinginitialization(param) {
|
export async function upDataZhongxinginitialization(param) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise(async(resolve, reject) => {
|
||||||
if (!param.carId) {
|
if (!param.carId) {
|
||||||
resolve(false)
|
resolve(false)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (param.singlePlay) {
|
if (param.singlePlay) {
|
||||||
|
console.log('teststet0')
|
||||||
const fileUtil = new FileUtil(param.context)
|
const fileUtil = new FileUtil(param.context)
|
||||||
const tableList=['MA_ITEMINFO','MA_MARKRULE','MA_SYSTEMPARM','MA_MAP_COLLECT','MA_MAP_COLLECT_SHAPE','MA_MAP_ITEMCLASS','MA_MAP_POINT','MA_MAP_POINT_ITEM','MA_MAP_ROAD','MA_MAP_ROAD_LANE','MAP_SUBITEM','MA_SYSSET','ES_CARINFO','MA_MARKRULESET','MA_CDSBINFO','MA_T_CARPARMSET'];
|
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'];
|
||||||
tableList.map(async(tableName)=>{
|
|
||||||
const data = await fileUtil.readFile(GlobalConfig.comoonfileWriteAddress + `/config/tableList/${tableName}.txt`);
|
for(let i=0;i<=tableList.length-1;i++){
|
||||||
if(data&&JSON.parse(data)){
|
console.log('teststet1',tableList[i])
|
||||||
sqlInsertCommonFn(tableName, JSON.parse(data), param.context).then((result) => {
|
const data = await fileUtil.readFile(GlobalConfig.comoonfileWriteAddress + `/config/tableList/${tableList[i]}.txt`);
|
||||||
console.log(key, '单机表建立成功')
|
console.log('teststet1',data)
|
||||||
if (result) {
|
|
||||||
|
await sqlInsertCommonFn(tableList[i], JSON.parse(data) || [], param.context)
|
||||||
|
console.log('teststet2',data)
|
||||||
|
}
|
||||||
|
console.log('teststetfinsh')
|
||||||
resolve(true)
|
resolve(true)
|
||||||
} else {
|
|
||||||
resolve(false)
|
|
||||||
}
|
|
||||||
}).catch((msg) => {
|
|
||||||
reject(false)
|
|
||||||
console.log(key, '单机表建立失败')
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const str = {
|
const str = {
|
||||||
|
|||||||
@ -115,9 +115,19 @@ export default class TcpClient {
|
|||||||
// socketTimeout: 3000,
|
// socketTimeout: 3000,
|
||||||
}, err => {
|
}, err => {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
console.log('testTagtestTagerrrrr,success')
|
||||||
|
if(this.num>3){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
getTCP()
|
||||||
|
resolve(false)
|
||||||
|
}, 2000)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
console.log('testTagtestTagconnect,success')
|
||||||
|
|
||||||
globalThis.getCloseTcp = false
|
globalThis.getCloseTcp = false
|
||||||
resolve(true)
|
resolve(true)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
@ -130,7 +140,7 @@ export default class TcpClient {
|
|||||||
getTCP()
|
getTCP()
|
||||||
resolve(false)
|
resolve(false)
|
||||||
}, 2000)
|
}, 2000)
|
||||||
console.log('testTagconnect,error')
|
console.log('testTagtestTagconnect,error')
|
||||||
|
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
@ -152,7 +162,7 @@ export default class TcpClient {
|
|||||||
|
|
||||||
onMessage(callback?) {
|
onMessage(callback?) {
|
||||||
this.tcp.on('message', value => {
|
this.tcp.on('message', value => {
|
||||||
console.log(TAG, 'Tcponmessage', value.length, value)
|
console.log(TAG, 'Tcponmessage', value)
|
||||||
globalThis.tcpUdpError = false
|
globalThis.tcpUdpError = false
|
||||||
|
|
||||||
// console.log('messageLengt',,value.message.length))
|
// console.log('messageLengt',,value.message.length))
|
||||||
|
|||||||
@ -132,10 +132,9 @@ struct Index {
|
|||||||
if (this.loading) {
|
if (this.loading) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
router.pushUrl({
|
this.testXMLToJSONInWorker()
|
||||||
url: 'pages/UserInfo',
|
|
||||||
params: { judge: true }
|
;
|
||||||
}, router.RouterMode.Single);
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
Image($r('app.media.index_zj')).width('28%').height('71%').margin({right:80* globalThis.ratio}).onClick(() => {
|
Image($r('app.media.index_zj')).width('28%').height('71%').margin({right:80* globalThis.ratio}).onClick(() => {
|
||||||
@ -285,7 +284,7 @@ struct Index {
|
|||||||
let workData: WorkData = e.data;
|
let workData: WorkData = e.data;
|
||||||
if (workData.isComplete) {
|
if (workData.isComplete) {
|
||||||
router.pushUrl({
|
router.pushUrl({
|
||||||
url: 'pages/ExaminerLogin',
|
url: globalThis.singlePlay?'pages/UserInfo':'pages/ExaminerLogin',
|
||||||
}, router.RouterMode.Single)
|
}, router.RouterMode.Single)
|
||||||
}
|
}
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|||||||
@ -22,7 +22,7 @@ struct Index {
|
|||||||
// @State inputTextList2: string[] = ['192.168.7.124','20022']
|
// @State inputTextList2: string[] = ['192.168.7.124','20022']
|
||||||
|
|
||||||
// @State inputTextList1: string[] = ['172.37.55.191','18782','192.168.7.1','8082','255.255.255.0','192.168.7.170','114.114.114.114','192.168.7.124','20022','172.37.55.59','20122']
|
// @State inputTextList1: string[] = ['172.37.55.191','18782','192.168.7.1','8082','255.255.255.0','192.168.7.170','114.114.114.114','192.168.7.124','20022','172.37.55.59','20122']
|
||||||
@State inputTextList1: string[] = ['192.168.1.146','18782','192.168.1.146','8082','255.255.255.0','192.168.7.1','114.114.114.114','192.168.7.124','20022','192.168.7.170','20122']
|
@State inputTextList1: string[] = ['192.168.1.144','18782','192.168.1.146','8082','255.255.255.0','192.168.7.1','114.114.114.114','192.168.7.124','20022','192.168.7.170','20122']
|
||||||
// @State inputTextList2: string[] = []
|
// @State inputTextList2: string[] = []
|
||||||
// 112.80.35.83 11052
|
// 112.80.35.83 11052
|
||||||
// @State inputTextList1: string[] = ['192.168.36.2','8084','192.168.36.200','20122','255.255.255.0','192.168.36.1','','','114.114.114.114','192.168.36.139','8000']
|
// @State inputTextList1: string[] = ['192.168.36.2','8084','192.168.36.200','20122','255.255.255.0','192.168.36.1','','','114.114.114.114','192.168.36.139','8000']
|
||||||
|
|||||||
@ -17,17 +17,15 @@ import promptAction from '@ohos.promptAction';
|
|||||||
import FilePhoto from './judgeSDK/utils/filePhoto';
|
import FilePhoto from './judgeSDK/utils/filePhoto';
|
||||||
import { getSyncData, upDateTableByArray } from '../common/service/initable';
|
import { getSyncData, upDateTableByArray } from '../common/service/initable';
|
||||||
import { CandidateData, EmptyCandidateObject } from '../mock/CandidateData';
|
import { CandidateData, EmptyCandidateObject } from '../mock/CandidateData';
|
||||||
import BoardPrePareSetPopup from './compontents/judge/BoardPrePareSetPopup'
|
import BoardPrePareSetPopup from './compontents/judge/BoardPrePareSetPopup';
|
||||||
import LoadingPopup from './compontents/judge/LoadingPopup';
|
import LoadingPopup from './compontents/judge/LoadingPopup';
|
||||||
import VoiceAnnounce from './judgeSDK/utils/voiceAnnouncements';
|
import VoiceAnnounce from './judgeSDK/utils/voiceAnnouncements';
|
||||||
import { JudgeConfig } from '../config/judge';
|
|
||||||
import { judgeConfig } from './judgeSDK/utils/judgeConfig';
|
import { judgeConfig } from './judgeSDK/utils/judgeConfig';
|
||||||
import { initJudgeUdp } from '../common/utils/UdpJudge';
|
import { initJudgeUdp } from '../common/utils/UdpJudge';
|
||||||
|
|
||||||
@Entry
|
@Entry
|
||||||
@Component
|
@Component
|
||||||
struct UserInfo {
|
struct UserInfo {
|
||||||
private filePhoto: FilePhoto
|
|
||||||
private avPlayer
|
|
||||||
@State pageIndex: number = 0
|
@State pageIndex: number = 0
|
||||||
@State ratio: number = 1700 / 960
|
@State ratio: number = 1700 / 960
|
||||||
@State index: number = 0
|
@State index: number = 0
|
||||||
@ -48,7 +46,10 @@ struct UserInfo {
|
|||||||
@State isBoardPrePareSetPopupShow: boolean = false
|
@State isBoardPrePareSetPopupShow: boolean = false
|
||||||
@State isLoadingPopupVisible: boolean = false;
|
@State isLoadingPopupVisible: boolean = false;
|
||||||
@State loadingText: string = '正在认证监管信息,请稍后...'
|
@State loadingText: string = '正在认证监管信息,请稍后...'
|
||||||
@State sczbkf:{xmdm:number,kfdm:string}[] = []
|
@State sczbkf: {
|
||||||
|
xmdm: number,
|
||||||
|
kfdm: string
|
||||||
|
}[] = []
|
||||||
@State currentUser: User = EmptyCandidateObject
|
@State currentUser: User = EmptyCandidateObject
|
||||||
@State dataList: Array<User> = []
|
@State dataList: Array<User> = []
|
||||||
@State list: Array<User> = []
|
@State list: Array<User> = []
|
||||||
@ -86,7 +87,10 @@ struct UserInfo {
|
|||||||
return photoBase64
|
return photoBase64
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private AccountTable = new AccountTable(() => {}, USER);
|
private filePhoto: FilePhoto
|
||||||
|
private avPlayer
|
||||||
|
private AccountTable = new AccountTable(() => {
|
||||||
|
}, USER);
|
||||||
private context = getContext(this) as common.UIAbilityContext;
|
private context = getContext(this) as common.UIAbilityContext;
|
||||||
private labelBlocks = [
|
private labelBlocks = [
|
||||||
{ label: '考生姓名', key: 'xm' },
|
{ label: '考生姓名', key: 'xm' },
|
||||||
@ -960,7 +964,7 @@ struct CommText {
|
|||||||
|
|
||||||
build() {
|
build() {
|
||||||
Text(this.text)
|
Text(this.text)
|
||||||
.fontSize(16 * this.ratio)
|
.fontSize(19.5 * this.ratio)
|
||||||
.lineHeight(30 * this.ratio)
|
.lineHeight(30 * this.ratio)
|
||||||
.fontWeight(500)
|
.fontWeight(500)
|
||||||
.fontColor(this.color)
|
.fontColor(this.color)
|
||||||
|
|||||||
@ -31,6 +31,7 @@ workerPort.onmessage = (e: MessageEvents): void => {
|
|||||||
if(param.mode=='1'){
|
if(param.mode=='1'){
|
||||||
//单中心
|
//单中心
|
||||||
getSingleCenterTable(param).then((ret) => {
|
getSingleCenterTable(param).then((ret) => {
|
||||||
|
console.log('teststetfinsh1')
|
||||||
if (ret) {
|
if (ret) {
|
||||||
workerPort.postMessage({ isComplete: true });
|
workerPort.postMessage({ isComplete: true });
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user