feat: 添加ExaminationStuAbsentRsp接口,优化缺考请求响应处理
This commit is contained in:
parent
0f564b746a
commit
a8bf95df5f
@ -2,6 +2,11 @@
|
|||||||
"apiType": 'stageMode',
|
"apiType": 'stageMode',
|
||||||
"buildOption": {
|
"buildOption": {
|
||||||
"externalNativeOptions": {
|
"externalNativeOptions": {
|
||||||
|
"abiFilters": [
|
||||||
|
"arm64-v8a",
|
||||||
|
"armeabi-v7a",
|
||||||
|
"x86_64"
|
||||||
|
],
|
||||||
"path": "./src/main/cpp/CMakeLists.txt",
|
"path": "./src/main/cpp/CMakeLists.txt",
|
||||||
"arguments": "",
|
"arguments": "",
|
||||||
"cppFlags": "",
|
"cppFlags": "",
|
||||||
@ -16,5 +21,5 @@
|
|||||||
{
|
{
|
||||||
"name": "ohosTest",
|
"name": "ohosTest",
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
}
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
import request from '../utils/Request'
|
import request from '../utils/Request'
|
||||||
import http from '@ohos.net.http'
|
import http from '@ohos.net.http'
|
||||||
import {
|
import {
|
||||||
|
ApiResponseType,
|
||||||
ExaminationStuAbsentParams,
|
ExaminationStuAbsentParams,
|
||||||
FaceCompareResp,
|
FaceCompareResp,
|
||||||
GetExaminationItemRsp,
|
GetExaminationItemRsp,
|
||||||
@ -55,7 +56,7 @@ export async function getExaminationStudentInfo(params: ESObject) {
|
|||||||
|
|
||||||
//缺考
|
//缺考
|
||||||
export async function examinationStuAbsent(params: ExaminationStuAbsentParams) {
|
export async function examinationStuAbsent(params: ExaminationStuAbsentParams) {
|
||||||
return request({
|
return request<ApiResponseType>({
|
||||||
url: '/der2/services/exam/examinationStuAbsent.ws',
|
url: '/der2/services/exam/examinationStuAbsent.ws',
|
||||||
data: `<?xml version="1.0" encoding="UTF-8" ?>
|
data: `<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<examinationStuAbsentReq>
|
<examinationStuAbsentReq>
|
||||||
|
|||||||
@ -11,6 +11,13 @@ export interface ApiResponseType {
|
|||||||
|
|
||||||
// 时间同步 /der2/services/exam/timeSynchronization.ws
|
// 时间同步 /der2/services/exam/timeSynchronization.ws
|
||||||
timeSynchronizationRsp?: TimeSynchronizationRsp;
|
timeSynchronizationRsp?: TimeSynchronizationRsp;
|
||||||
|
|
||||||
|
// 缺考
|
||||||
|
examinationStuAbsentRsp?: ExaminationStuAbsentRsp
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ExaminationStuAbsentRsp {
|
||||||
|
head: Head
|
||||||
}
|
}
|
||||||
|
|
||||||
interface TimeSynchronizationRsp {
|
interface TimeSynchronizationRsp {
|
||||||
@ -163,7 +170,6 @@ export interface BeginExamRequest {
|
|||||||
code?: number
|
code?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
// { getExaminationItemRsp: { body: { ykxx: '' } } }
|
|
||||||
export interface GetExaminationItemRsp {
|
export interface GetExaminationItemRsp {
|
||||||
getExaminationItemRsp: GetExaminationItemRspDetails
|
getExaminationItemRsp: GetExaminationItemRspDetails
|
||||||
}
|
}
|
||||||
@ -175,6 +181,7 @@ interface GetExaminationItemRspDetails {
|
|||||||
|
|
||||||
interface GetExaminationItemRspBody {
|
interface GetExaminationItemRspBody {
|
||||||
ykxx: string;
|
ykxx: string;
|
||||||
|
kssycs?: string | number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ExaminationStuAbsentParams {
|
export interface ExaminationStuAbsentParams {
|
||||||
|
|||||||
@ -24,7 +24,7 @@ import {
|
|||||||
SYSTEMPARMARR
|
SYSTEMPARMARR
|
||||||
} from './judgeSDK/api/judgeSDK.d';
|
} 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 { getSyncData } from '../common/service/initable';
|
||||||
import { judgeConfig } from './judgeSDK/utils/judgeConfig';
|
import { judgeConfig } from './judgeSDK/utils/judgeConfig';
|
||||||
import FileUtil from '../common/utils/File';
|
import FileUtil from '../common/utils/File';
|
||||||
@ -222,8 +222,8 @@ struct Index {
|
|||||||
IPADDR: '',
|
IPADDR: '',
|
||||||
CARCLASS: decodeURI(carInfo.carclass),
|
CARCLASS: decodeURI(carInfo.carclass),
|
||||||
KSCX: carInfo.kscx,
|
KSCX: carInfo.kscx,
|
||||||
// TODO 确定一下是否有这个字段,表定义中没有
|
// CARNAME: decodeURI(carInfo.carname),
|
||||||
CARNAME: decodeURI(carInfo.carname),
|
CARNAME: "",
|
||||||
FLAG: carInfo.flag,
|
FLAG: carInfo.flag,
|
||||||
BK1: carInfo.bk1,
|
BK1: carInfo.bk1,
|
||||||
BK2: carInfo.bk2,
|
BK2: carInfo.bk2,
|
||||||
@ -238,7 +238,7 @@ struct Index {
|
|||||||
// const { xm, sfzmhm, lsh, kszp, ksdd, kssycs, kslx, ksxl, xldm } = stuInfo;
|
// const { xm, sfzmhm, lsh, kszp, ksdd, kssycs, kslx, ksxl, xldm } = stuInfo;
|
||||||
this.name = stuInfo.xm || '测试考生';
|
this.name = stuInfo.xm || '测试考生';
|
||||||
this.idCard = stuInfo.sfzmhm || '01234567891010';
|
this.idCard = stuInfo.sfzmhm || '01234567891010';
|
||||||
this.lsh = this.singlePlay ? '0000000000000' : lsh;
|
this.lsh = this.singlePlay ? '0000000000000' : stuInfo.lsh;
|
||||||
this.kszp = stuInfo.kszp;
|
this.kszp = stuInfo.kszp;
|
||||||
this.ksdd = stuInfo.ksdd;
|
this.ksdd = stuInfo.ksdd;
|
||||||
this.kssycs = stuInfo.kssycs;
|
this.kssycs = stuInfo.kssycs;
|
||||||
@ -250,7 +250,7 @@ struct Index {
|
|||||||
|
|
||||||
// 获取扣分代码信息
|
// 获取扣分代码信息
|
||||||
async initMarkRules(markRules ?: MarkRule[]) {
|
async initMarkRules(markRules ?: MarkRule[]) {
|
||||||
const markRuleParams = markRules || (await GetSyncData<MA_MARKRULEType>('MA_MARKRULE')
|
const markRuleParams = markRules || (await GetSyncData<MA_MARKRULEType>('MA_MARKRULE'))
|
||||||
|
|
||||||
markRuleParams.forEach(mark => {
|
markRuleParams.forEach(mark => {
|
||||||
const tempObj = {
|
const tempObj = {
|
||||||
@ -692,7 +692,7 @@ struct Index {
|
|||||||
Text(this.startTime).fontColor('#FFF').fontSize(this.FONTSIZE)
|
Text(this.startTime).fontColor('#FFF').fontSize(this.FONTSIZE)
|
||||||
}.margin({ bottom: 10 })
|
}.margin({ bottom: 10 })
|
||||||
|
|
||||||
if (this.examSubject == 3) {
|
if (this.examSubject == "3") {
|
||||||
Row() {
|
Row() {
|
||||||
Text('考试路线:').fontColor('#E5CCA1').fontSize(this.FONTSIZE)
|
Text('考试路线:').fontColor('#E5CCA1').fontSize(this.FONTSIZE)
|
||||||
Text(`线路${this.wayno || 3}`).fontColor('#FFAD33').fontSize(this.FONTSIZE)
|
Text(`线路${this.wayno || 3}`).fontColor('#FFAD33').fontSize(this.FONTSIZE)
|
||||||
|
|||||||
@ -61,7 +61,6 @@ struct Index {
|
|||||||
.linearGradient({
|
.linearGradient({
|
||||||
angle: 0,
|
angle: 0,
|
||||||
colors: [[0x403C36, 0.0], [0x4D473D, 0.34], [0x3D3A34, 1.0]]
|
colors: [[0x403C36, 0.0], [0x4D473D, 0.34], [0x3D3A34, 1.0]]
|
||||||
|
|
||||||
})
|
})
|
||||||
.onChange((value: string) => {
|
.onChange((value: string) => {
|
||||||
this.inputTextList1[index] = value
|
this.inputTextList1[index] = value
|
||||||
|
|||||||
@ -36,6 +36,7 @@ import {
|
|||||||
RouteParamsType,
|
RouteParamsType,
|
||||||
SckType,
|
SckType,
|
||||||
SystemParamType,
|
SystemParamType,
|
||||||
|
UDPParamType,
|
||||||
User
|
User
|
||||||
} from '../model';
|
} from '../model';
|
||||||
import { BusinessError } from '@ohos.base';
|
import { BusinessError } from '@ohos.base';
|
||||||
@ -191,7 +192,7 @@ struct UserInfo {
|
|||||||
if (this.singlePlay) {
|
if (this.singlePlay) {
|
||||||
return ''
|
return ''
|
||||||
} else {
|
} else {
|
||||||
const photoBase64 = await this.filePhoto.getPhoto();
|
const photoBase64: string = await this.filePhoto.getPhoto();
|
||||||
return photoBase64
|
return photoBase64
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -800,11 +801,11 @@ struct UserInfo {
|
|||||||
|
|
||||||
examinationStuAbsent(param).then(res => {
|
examinationStuAbsent(param).then(res => {
|
||||||
const arr = [this.signNum || 0, 1]
|
const arr = [this.signNum || 0, 1]
|
||||||
let tmpList = [];
|
let tmpList: number[] = [];
|
||||||
tmpList.push(string2Bytes(arr[0], 1 * 8)[0])
|
tmpList.push(string2Bytes(arr[0], 1 * 8)[0])
|
||||||
tmpList.push(string2Bytes(arr[1], 1 * 8)[0])
|
tmpList.push(string2Bytes(arr[1], 1 * 8)[0])
|
||||||
|
|
||||||
const param = {
|
const param: UDPParamType = {
|
||||||
id: 43,
|
id: 43,
|
||||||
list: tmpList,
|
list: tmpList,
|
||||||
carNo: this.carInfo.carNo,
|
carNo: this.carInfo.carNo,
|
||||||
@ -849,7 +850,12 @@ struct UserInfo {
|
|||||||
async sfbdinterfaceFn() {
|
async sfbdinterfaceFn() {
|
||||||
AppStorage.setOrCreate('statue', 4)
|
AppStorage.setOrCreate('statue', 4)
|
||||||
this.stepFlag = true
|
this.stepFlag = true
|
||||||
let examItems: GetExaminationItemRsp = { getExaminationItemRsp: { body: { ykxx: '' } } };
|
let examItems: GetExaminationItemRsp = {
|
||||||
|
getExaminationItemRsp:
|
||||||
|
{
|
||||||
|
body: { ykxx: '' }
|
||||||
|
}
|
||||||
|
};
|
||||||
if (!this.singlePlay) {
|
if (!this.singlePlay) {
|
||||||
//获取已考项目
|
//获取已考项目
|
||||||
examItems = await getExaminationItem({
|
examItems = await getExaminationItem({
|
||||||
|
|||||||
@ -709,7 +709,6 @@ struct Index {
|
|||||||
async writeConfig() {
|
async writeConfig() {
|
||||||
this.oldParam = JSON.parse(JSON.stringify(this.param))
|
this.oldParam = JSON.parse(JSON.stringify(this.param))
|
||||||
this.videoArr = JSON.parse(JSON.stringify(this.videoArr))
|
this.videoArr = JSON.parse(JSON.stringify(this.videoArr))
|
||||||
console.log('kkkk', JSON.stringify(this.param))
|
|
||||||
const folderPath = await this.fileUtil.initFolder(`/config`);
|
const folderPath = await this.fileUtil.initFolder(`/config`);
|
||||||
this.fileUtil.addFile(`${folderPath}/config3.txt`, JSON.stringify(this.param), 'overWrite')
|
this.fileUtil.addFile(`${folderPath}/config3.txt`, JSON.stringify(this.param), 'overWrite')
|
||||||
this.showFlag = false
|
this.showFlag = false
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user