Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
jump_hm_warehouse
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
毛勇泽
jump_hm_warehouse
Commits
66eef2b5
Commit
66eef2b5
authored
Jan 20, 2024
by
陈桂东
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物资代码同步
parent
a2a8d316
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
44 行增加
和
0 行删除
+44
-0
WzdmModel.ets
entry/src/main/ets/model/WzdmModel.ets
+41
-0
DataSynchronism.ets
entry/src/main/ets/pages/sub_systemMaintenance/DataSynchronism/DataSynchronism.ets
+3
-0
没有找到文件。
entry/src/main/ets/model/WzdmModel.ets
0 → 100644
View file @
66eef2b5
import { WzdmDao, SQLiteContext, Wzdm, Bzhx } from '@ohos/common'
import { isEmpty, uuid } from '@ohos/common/src/main/ets/utils/util'
// 物资代码
class WzdmModel {
// 添加物资代码
async set(data: Bzhx[]) {
const copyData = data.map(v => {
return {
guid: uuid(),
drxh: isEmpty(v.xh),
dmlbbm: isEmpty(),
dmlbmc: isEmpty(),
wzdm: isEmpty(),
hxdm:isEmpty(v.pmdmTen),
fldm: isEmpty(),
lsm: isEmpty(v.pmdmTen.slice(0, 6)),
sfdel: isEmpty(),
hxlbbsm: isEmpty(),
}
})
await SQLiteContext.with(WzdmDao).batchInsert(copyData)
}
// 查询物资代码
async query(lsm?: string): Promise<Wzdm[]> {
let res = await SQLiteContext.with(WzdmDao).selectWZDM(lsm)
return res;
}
// 清空表
async clear() {
await SQLiteContext.with(WzdmDao).clearTable()
}
}
const wzdmModel = new WzdmModel()
export default wzdmModel
\ No newline at end of file
entry/src/main/ets/pages/sub_systemMaintenance/DataSynchronism/DataSynchronism.ets
View file @
66eef2b5
...
...
@@ -16,6 +16,7 @@ import { Logger } from '@ohos/common/src/main/ets/utils/Logger'
import wzcrkModel from '../../../model/WzcrkModel'
import { Bggl } from '@ohos/common/src/main/ets/entity/Bggl'
import bgglModel from '../../../model/BgglModel'
import wzdmModel from '../../../model/WzdmModel'
@Extend(Button) function CommonButtonStyle() {
.borderWidth(2)
...
...
@@ -86,6 +87,8 @@ export struct Pmhx {
// 添加品名
await bzhxModal.set(allData)
await wzdmModel.set(allData)
// 获取基础信息
const baseRes = await getBaseList({ dwguid: this.dwguid })
const { bzdw, ckkfList, ddwAndJw, hjList, hwList, qyList} = JSON.parse(baseRes)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论