Commit 91106633 by 毛勇泽

射频扫码集成+扫码解析工具类

parent 438d2062
import relationalStore from '@ohos.data.relationalStore';
import { Wzhxdm } from '../../entity/Wzhxdm';
import { Logger } from '../../utils/Logger';
import BaseTable, { ValueType } from '../BaseTable';
import { Table } from '../decorator/Decorators';
......@@ -58,12 +59,17 @@ export class WzhxdmDao extends BaseTable<Wzhxdm> {
)`;
return wzhxdm_sql;
}
async selectHXList(lsm?:string):Promise<Wzhxdm[]>{
let wp = this.getPredicates();
if (lsm) {
wp.equalTo('LSM', lsm);
async selectHXList(sql?: string): Promise<Wzhxdm[]> {
let db = await this.futureDb;
let rs = await db.querySql('', []);
let items: Wzhxdm[];
if (rs.goToFirstRow()) {
do {
Logger.info(this, 'queryAll rowIndex=' + rs.rowIndex)
items.push(this.toBean(rs))
} while (rs.goToNextRow())
}
wp.orderByAsc('LSM');
return this.query(wp, this.getTableColumns())
return items;
}
}
\ No newline at end of file
......@@ -247,7 +247,7 @@ async function analysisQrCode(bqData, isData = false) {
// const allList = await selectInformationType("GY_M_PMV3", allsql)
// const allList1 = await createOrFindSQL("GY_M_PMV3", allsql1)\
console.log('sql', sql)
let wzdmList = await bzhxModal.queryHXlist( sql)
let wzdmList = await bzhxModal.queryHXlist(sql)
for (let j = 0; j < wzdmList.length; j++) {
let wzdm = wzdmList[j];
Object.keys(hx_map).forEach((item) => {
......
......@@ -19,8 +19,8 @@ class BzhxModal {
let res = await SQLiteContext.with(WzdmDao).selectWZDM(lsm);
return res;
}
async queryHXlist(lsm?: string):Promise<Wzhxdm[]> {
let res = await SQLiteContext.with(WzhxdmDao).selectHXList(lsm);
async queryHXlist(sql?: string):Promise<Wzhxdm[]> {
let res = await SQLiteContext.with(WzhxdmDao).selectHXList(sql);
return res;
}
}
......
......@@ -2,12 +2,17 @@
"lockfileVersion": 1,
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
"specifiers": {
"@ohos/hypium@1.0.6": "@ohos/hypium@1.0.6"
"@ohos/hypium@1.0.6": "@ohos/hypium@1.0.6",
"@ohos/axios@^2.1.1": "@ohos/axios@2.1.1"
},
"packages": {
"@ohos/hypium@1.0.6": {
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz",
"integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ=="
},
"@ohos/axios@2.1.1": {
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/axios/-/axios-2.1.1.har",
"integrity": "sha512-EQax257+eKKT0Rx7h6N6xvmKbDRWDjCCWOP2vyyktySFwvjtypXuXmQKEvRjmAalR6cqf8mbfhWmpg0bD9OQ3w=="
}
}
}
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论