fix:忽略cpp目录
This commit is contained in:
parent
8dcdb29f61
commit
6b855d1835
@ -4,13 +4,13 @@
|
|||||||
{
|
{
|
||||||
"name": "default",
|
"name": "default",
|
||||||
"material": {
|
"material": {
|
||||||
"certpath": "/Users/surenjun/.ohos/config/openharmony/auto_ohos_default_subject-two_com.oh.dts.cer",
|
"certpath": "/Users/wangzhongjie/.ohos/config/openharmony/auto_ohos_default_subject-two_com.oh.dts.cer",
|
||||||
"storePassword": "0000001B0C5B52D8C8C6F415D4216EAD2848AA4A376B36FD72006E4072C15BA3D11E6E65C0D1FFA92A6D86",
|
"storePassword": "0000001BBB63DD61213CF0DB2F4C752AEA1CA0C399A96F876B4CEEBE867F18A6C6A959203972B59A421CD8",
|
||||||
"keyAlias": "debugKey",
|
"keyAlias": "debugKey",
|
||||||
"keyPassword": "0000001B8DCA3C8913C86858A0CDEAEB6BEE0DC29FCE9932930CA1FFE68FFF84341736AADF81F056CDD683",
|
"keyPassword": "0000001BE0D5D3EB862C643A7206CFCE4664C22DA79C6D0D87FC8B187C2AD7F1DDFF70F49DE2BEA35B037B",
|
||||||
"profile": "/Users/surenjun/.ohos/config/openharmony/auto_ohos_default_subject-two_com.oh.dts.p7b",
|
"profile": "/Users/wangzhongjie/.ohos/config/openharmony/auto_ohos_default_subject-two_com.oh.dts.p7b",
|
||||||
"signAlg": "SHA256withECDSA",
|
"signAlg": "SHA256withECDSA",
|
||||||
"storeFile": "/Users/surenjun/.ohos/config/openharmony/auto_ohos_default_subject-two_com.oh.dts.p12"
|
"storeFile": "/Users/wangzhongjie/.ohos/config/openharmony/auto_ohos_default_subject-two_com.oh.dts.p12"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@ -3,42 +3,43 @@ import promptAction from '@ohos.promptAction'
|
|||||||
import router from '@ohos.router'
|
import router from '@ohos.router'
|
||||||
import { dateFormat } from '../utils/tools'
|
import { dateFormat } from '../utils/tools'
|
||||||
import FileUtil from '../../common/utils/File'
|
import FileUtil from '../../common/utils/File'
|
||||||
import AccountTable from '../../common/database/tables/AccountTable';
|
import AccountTable from '../../common/database/tables/AccountTable'
|
||||||
import MA_SYSSET from '../../common/constants/MA_SYSSET';
|
import MA_SYSSET from '../../common/constants/MA_SYSSET'
|
||||||
import { takePhoto, deleteAllFileByPiC } from '../../common/service/videoService'
|
import { takePhoto } from '../../common/service/videoService'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
getDataBaseTable,
|
|
||||||
upDateTable,
|
|
||||||
getMySystemSetTable,
|
|
||||||
delSyncTable,
|
delSyncTable,
|
||||||
upDataZhongxinginitialization
|
getDataBaseTable,
|
||||||
|
getMySystemSetTable,
|
||||||
|
upDataZhongxinginitialization,
|
||||||
|
upDateTable
|
||||||
} from '../../common/service/initable'
|
} from '../../common/service/initable'
|
||||||
import { GlobalConfig } from '../../config/index'
|
import { GlobalConfig } from '../../config/index'
|
||||||
import testNapi from '@ohos.hiserialsdk'
|
import testNapi from '@ohos.hiserialsdk'
|
||||||
|
|
||||||
export async function getliushuiNum(){
|
export async function getliushuiNum() {
|
||||||
console.log('getLiushuihao')
|
console.log('getLiushuihao')
|
||||||
this.fileUtil = new FileUtil(this.context)
|
this.fileUtil = new FileUtil(this.context)
|
||||||
const data = await this.fileUtil.readFile(GlobalConfig.comoonfileWriteAddress+'/config/liushui.txt');
|
const data = await this.fileUtil.readFile(GlobalConfig.comoonfileWriteAddress + '/config/liushui.txt');
|
||||||
if(data === '' || data === undefined){
|
if (data === '' || data === undefined) {
|
||||||
this.num=0
|
this.num = 0
|
||||||
let str=this.num.toString()
|
let str = this.num.toString()
|
||||||
for(let i=0;str.length<=5;i++){
|
for (let i = 0; str.length <= 5; i++) {
|
||||||
str='0'+str
|
str = '0' + str
|
||||||
}
|
}
|
||||||
this.lsh=str
|
this.lsh = str
|
||||||
// return str
|
// return str
|
||||||
}else{
|
} else {
|
||||||
this.num=Number(JSON.parse(data).value)+1
|
this.num = Number(JSON.parse(data).value) + 1
|
||||||
let str=this.num.toString()
|
let str = this.num.toString()
|
||||||
for(let i=0;str.length<=5;i++){
|
for (let i = 0; str.length <= 5; i++) {
|
||||||
str='0'+str
|
str = '0' + str
|
||||||
}
|
}
|
||||||
this.lsh=str
|
this.lsh = str
|
||||||
// return str
|
// return str
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//配置流水号
|
//配置流水号
|
||||||
export async function setliushuiNum(context) {
|
export async function setliushuiNum(context) {
|
||||||
const fileUtil = new FileUtil(context)
|
const fileUtil = new FileUtil(context)
|
||||||
@ -130,6 +131,7 @@ export async function getDoubleCeneterTable() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//单中心存表
|
//单中心存表
|
||||||
export async function getSingleCenterTable() {
|
export async function getSingleCenterTable() {
|
||||||
return new Promise((reslove, reject) => {
|
return new Promise((reslove, reject) => {
|
||||||
@ -207,11 +209,11 @@ export async function takePhotoFn(context) {
|
|||||||
spzd1: false,
|
spzd1: false,
|
||||||
zdyz: '5',
|
zdyz: '5',
|
||||||
}
|
}
|
||||||
globalThis.spzd={
|
globalThis.spzd = {
|
||||||
spzd1:false,
|
spzd1: false,
|
||||||
spzd2:false,
|
spzd2: false,
|
||||||
spzd3:false,
|
spzd3: false,
|
||||||
spzd4:false,
|
spzd4: false,
|
||||||
}
|
}
|
||||||
globalThis.takePhotoNum = 0
|
globalThis.takePhotoNum = 0
|
||||||
const map = {}
|
const map = {}
|
||||||
@ -228,11 +230,11 @@ export async function takePhotoFn(context) {
|
|||||||
map[key] = false
|
map[key] = false
|
||||||
// param[key] = false
|
// param[key] = false
|
||||||
}
|
}
|
||||||
for(let i=0;i<=arr.length-1;i++){
|
for (let i = 0; i <= arr.length - 1; i++) {
|
||||||
let key=arr[i]
|
let key = arr[i]
|
||||||
if (param[key]) {
|
if (param[key]) {
|
||||||
param.pztd = param[`td${Number(i) + 1}`]
|
param.pztd = param[`td${Number(i) + 1}`]
|
||||||
takePhoto(param, context, 'jt/',0,(data)=>{
|
takePhoto(param, context, 'jt/', 0, (data) => {
|
||||||
if (Number(data.fileSize) <= (Number(param.zdyz) * 1000)) {
|
if (Number(data.fileSize) <= (Number(param.zdyz) * 1000)) {
|
||||||
map[key] = true
|
map[key] = true
|
||||||
promptAction.showToast({
|
promptAction.showToast({
|
||||||
@ -244,9 +246,9 @@ export async function takePhotoFn(context) {
|
|||||||
map[key] = false
|
map[key] = false
|
||||||
globalThis.spzd[key] = false
|
globalThis.spzd[key] = false
|
||||||
}
|
}
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
takePhotoFn()
|
takePhotoFn()
|
||||||
},3000)
|
}, 3000)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -257,56 +259,58 @@ export async function takePhotoFn(context) {
|
|||||||
}
|
}
|
||||||
}, 3000)
|
}, 3000)
|
||||||
}
|
}
|
||||||
|
|
||||||
let fd
|
let fd
|
||||||
const devPath="/dev/ttyUSB0"
|
const devPath = "/dev/ttyS3"
|
||||||
async function openChuankouFn():Promise<number> {
|
|
||||||
|
async function openChuankouFn(): Promise<number> {
|
||||||
console.log('fdfd1111 start')
|
console.log('fdfd1111 start')
|
||||||
fd = await testNapi.SerialOpen(devPath);
|
fd = await testNapi.SerialOpen(devPath);
|
||||||
globalThis.fd=fd
|
globalThis.fd = fd
|
||||||
console.log('fdfd1111',globalThis.fd)
|
console.log('fdfd1111', globalThis.fd)
|
||||||
|
|
||||||
let parity = 0x4e; // 'N'
|
let parity = 0x4e; // 'N'
|
||||||
let ret = await testNapi.SerialSet(globalThis.fd, 115200, 0, 8, 1, parity);
|
let ret = await testNapi.SerialSet(globalThis.fd, 115200, 0, 8, 1, parity);
|
||||||
console.log('setNum',ret)
|
console.log('setNum', ret)
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getChuankouFnMsg() {
|
async function getChuankouFnMsg() {
|
||||||
let timeout = 50000; // 2秒超时
|
let timeout = 50000; // 2秒超时
|
||||||
let databuff = [0x61, 0xAA, 0x0A, 0X15, 0X00]; // send ABCDE
|
let databuff = [0x61, 0xAA, 0x0A, 0X15, 0X00]; // send ABCDE
|
||||||
console.log('fdfd',globalThis.fd)
|
console.log('fdfd', globalThis.fd)
|
||||||
let uint8Arr = new Uint8Array(databuff);
|
let uint8Arr = new Uint8Array(databuff);
|
||||||
testNapi.SerialSend(globalThis.fd, uint8Arr).then((ret) => {
|
testNapi.SerialSend(globalThis.fd, uint8Arr).then((ret) => {
|
||||||
console.log('mmmm',ret)
|
console.log('mmmm', ret)
|
||||||
testNapi?.SerialRecv(globalThis.fd, timeout,12).then((revTestInfo) => {
|
testNapi?.SerialRecv(globalThis.fd, timeout, 12).then((revTestInfo) => {
|
||||||
console.log('revTestInfo',revTestInfo.recevedBuf.length)
|
console.log('revTestInfo', revTestInfo.recevedBuf.length)
|
||||||
|
|
||||||
const message = revTestInfo?.recevedBuf?.toString()
|
const message = revTestInfo?.recevedBuf?.toString()
|
||||||
console.log('chuankou',message)
|
console.log('chuankou', message)
|
||||||
if (message == '') {
|
if (message == '') {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const msg = message?.split(',')
|
const msg = message?.split(',')
|
||||||
if(!msg?.length){
|
if (!msg?.length) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (msg[0] != '98' || msg[1] != '85' || msg.length < 9) {
|
if (msg[0] != '98' || msg[1] != '85' || msg.length < 9) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
globalThis.chuankoMsg=msg[9]
|
globalThis.chuankoMsg = msg[9]
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getChuankouFn(){
|
export async function getChuankouFn() {
|
||||||
if(globalThis.fd){
|
if (globalThis.fd) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
openChuankouFn().then((fd) => {
|
openChuankouFn().then((fd) => {
|
||||||
setInterval(()=>{
|
setInterval(() => {
|
||||||
getChuankouFnMsg()
|
getChuankouFnMsg()
|
||||||
},1000)
|
}, 1000)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user