From a8bf95df5f6b15057a1580bf9da19fd0d84b09d0 Mon Sep 17 00:00:00 2001 From: wangzhongjie Date: Tue, 25 Mar 2025 10:41:13 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0ExaminationStuAbsentR?= =?UTF-8?q?sp=E6=8E=A5=E5=8F=A3=EF=BC=8C=E4=BC=98=E5=8C=96=E7=BC=BA?= =?UTF-8?q?=E8=80=83=E8=AF=B7=E6=B1=82=E5=93=8D=E5=BA=94=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/build-profile.json5 | 7 ++++++- entry/src/main/ets/api/userInfo.ets | 3 ++- entry/src/main/ets/model/api.ets | 9 ++++++++- entry/src/main/ets/pages/Judge.ets | 12 ++++++------ entry/src/main/ets/pages/TerminalInfos.ets | 1 - entry/src/main/ets/pages/UserInfo.ets | 14 ++++++++++---- entry/src/main/ets/pages/VideoConfig.ets | 1 - 7 files changed, 32 insertions(+), 15 deletions(-) diff --git a/entry/build-profile.json5 b/entry/build-profile.json5 index f272df29..cdb2ecac 100644 --- a/entry/build-profile.json5 +++ b/entry/build-profile.json5 @@ -2,6 +2,11 @@ "apiType": 'stageMode', "buildOption": { "externalNativeOptions": { + "abiFilters": [ + "arm64-v8a", + "armeabi-v7a", + "x86_64" + ], "path": "./src/main/cpp/CMakeLists.txt", "arguments": "", "cppFlags": "", @@ -16,5 +21,5 @@ { "name": "ohosTest", } - ] + ], } \ No newline at end of file diff --git a/entry/src/main/ets/api/userInfo.ets b/entry/src/main/ets/api/userInfo.ets index 20dd89a3..e9c0340d 100644 --- a/entry/src/main/ets/api/userInfo.ets +++ b/entry/src/main/ets/api/userInfo.ets @@ -1,6 +1,7 @@ import request from '../utils/Request' import http from '@ohos.net.http' import { + ApiResponseType, ExaminationStuAbsentParams, FaceCompareResp, GetExaminationItemRsp, @@ -55,7 +56,7 @@ export async function getExaminationStudentInfo(params: ESObject) { //缺考 export async function examinationStuAbsent(params: ExaminationStuAbsentParams) { - return request({ + return request({ url: '/der2/services/exam/examinationStuAbsent.ws', data: ` diff --git a/entry/src/main/ets/model/api.ets b/entry/src/main/ets/model/api.ets index 106c8ca5..f8464c01 100644 --- a/entry/src/main/ets/model/api.ets +++ b/entry/src/main/ets/model/api.ets @@ -11,6 +11,13 @@ export interface ApiResponseType { // 时间同步 /der2/services/exam/timeSynchronization.ws timeSynchronizationRsp?: TimeSynchronizationRsp; + + // 缺考 + examinationStuAbsentRsp?: ExaminationStuAbsentRsp +} + +interface ExaminationStuAbsentRsp { + head: Head } interface TimeSynchronizationRsp { @@ -163,7 +170,6 @@ export interface BeginExamRequest { code?: number } -// { getExaminationItemRsp: { body: { ykxx: '' } } } export interface GetExaminationItemRsp { getExaminationItemRsp: GetExaminationItemRspDetails } @@ -175,6 +181,7 @@ interface GetExaminationItemRspDetails { interface GetExaminationItemRspBody { ykxx: string; + kssycs?: string | number; } export interface ExaminationStuAbsentParams { diff --git a/entry/src/main/ets/pages/Judge.ets b/entry/src/main/ets/pages/Judge.ets index 2b00229d..b3358f67 100644 --- a/entry/src/main/ets/pages/Judge.ets +++ b/entry/src/main/ets/pages/Judge.ets @@ -24,7 +24,7 @@ import { SYSTEMPARMARR } from './judgeSDK/api/judgeSDK.d'; -import { chunkArr, formatTime, getCurrentHourTime, getCurrentTime } from '../common/utils/tools'; +import { chunkArr, getCurrentTime } from '../common/utils/tools'; import { getSyncData } from '../common/service/initable'; import { judgeConfig } from './judgeSDK/utils/judgeConfig'; import FileUtil from '../common/utils/File'; @@ -222,8 +222,8 @@ struct Index { IPADDR: '', CARCLASS: decodeURI(carInfo.carclass), KSCX: carInfo.kscx, - // TODO 确定一下是否有这个字段,表定义中没有 - CARNAME: decodeURI(carInfo.carname), + // CARNAME: decodeURI(carInfo.carname), + CARNAME: "", FLAG: carInfo.flag, BK1: carInfo.bk1, BK2: carInfo.bk2, @@ -238,7 +238,7 @@ struct Index { // const { xm, sfzmhm, lsh, kszp, ksdd, kssycs, kslx, ksxl, xldm } = stuInfo; this.name = stuInfo.xm || '测试考生'; this.idCard = stuInfo.sfzmhm || '01234567891010'; - this.lsh = this.singlePlay ? '0000000000000' : lsh; + this.lsh = this.singlePlay ? '0000000000000' : stuInfo.lsh; this.kszp = stuInfo.kszp; this.ksdd = stuInfo.ksdd; this.kssycs = stuInfo.kssycs; @@ -250,7 +250,7 @@ struct Index { // 获取扣分代码信息 async initMarkRules(markRules ?: MarkRule[]) { - const markRuleParams = markRules || (await GetSyncData('MA_MARKRULE') + const markRuleParams = markRules || (await GetSyncData('MA_MARKRULE')) markRuleParams.forEach(mark => { const tempObj = { @@ -692,7 +692,7 @@ struct Index { Text(this.startTime).fontColor('#FFF').fontSize(this.FONTSIZE) }.margin({ bottom: 10 }) - if (this.examSubject == 3) { + if (this.examSubject == "3") { Row() { Text('考试路线:').fontColor('#E5CCA1').fontSize(this.FONTSIZE) Text(`线路${this.wayno || 3}`).fontColor('#FFAD33').fontSize(this.FONTSIZE) diff --git a/entry/src/main/ets/pages/TerminalInfos.ets b/entry/src/main/ets/pages/TerminalInfos.ets index 1850c2b6..eb2f53be 100644 --- a/entry/src/main/ets/pages/TerminalInfos.ets +++ b/entry/src/main/ets/pages/TerminalInfos.ets @@ -61,7 +61,6 @@ struct Index { .linearGradient({ angle: 0, colors: [[0x403C36, 0.0], [0x4D473D, 0.34], [0x3D3A34, 1.0]] - }) .onChange((value: string) => { this.inputTextList1[index] = value diff --git a/entry/src/main/ets/pages/UserInfo.ets b/entry/src/main/ets/pages/UserInfo.ets index 79f95760..2c76afa4 100644 --- a/entry/src/main/ets/pages/UserInfo.ets +++ b/entry/src/main/ets/pages/UserInfo.ets @@ -36,6 +36,7 @@ import { RouteParamsType, SckType, SystemParamType, + UDPParamType, User } from '../model'; import { BusinessError } from '@ohos.base'; @@ -191,7 +192,7 @@ struct UserInfo { if (this.singlePlay) { return '' } else { - const photoBase64 = await this.filePhoto.getPhoto(); + const photoBase64: string = await this.filePhoto.getPhoto(); return photoBase64 } } @@ -800,11 +801,11 @@ struct UserInfo { examinationStuAbsent(param).then(res => { const arr = [this.signNum || 0, 1] - let tmpList = []; + let tmpList: number[] = []; tmpList.push(string2Bytes(arr[0], 1 * 8)[0]) tmpList.push(string2Bytes(arr[1], 1 * 8)[0]) - const param = { + const param: UDPParamType = { id: 43, list: tmpList, carNo: this.carInfo.carNo, @@ -849,7 +850,12 @@ struct UserInfo { async sfbdinterfaceFn() { AppStorage.setOrCreate('statue', 4) this.stepFlag = true - let examItems: GetExaminationItemRsp = { getExaminationItemRsp: { body: { ykxx: '' } } }; + let examItems: GetExaminationItemRsp = { + getExaminationItemRsp: + { + body: { ykxx: '' } + } + }; if (!this.singlePlay) { //获取已考项目 examItems = await getExaminationItem({ diff --git a/entry/src/main/ets/pages/VideoConfig.ets b/entry/src/main/ets/pages/VideoConfig.ets index 3d1f9914..f01dfbb0 100644 --- a/entry/src/main/ets/pages/VideoConfig.ets +++ b/entry/src/main/ets/pages/VideoConfig.ets @@ -709,7 +709,6 @@ struct Index { async writeConfig() { this.oldParam = JSON.parse(JSON.stringify(this.param)) this.videoArr = JSON.parse(JSON.stringify(this.videoArr)) - console.log('kkkk', JSON.stringify(this.param)) const folderPath = await this.fileUtil.initFolder(`/config`); this.fileUtil.addFile(`${folderPath}/config3.txt`, JSON.stringify(this.param), 'overWrite') this.showFlag = false