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
3485b15d
Commit
3485b15d
authored
Jan 18, 2024
by
陈桂东
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
6cc0f352
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
133 行增加
和
118 行删除
+133
-118
index.ets
common/index.ets
+8
-1
BzhxDao.ets
common/src/main/ets/db/dao/BzhxDao.ets
+11
-0
HwInfoDao.ets
common/src/main/ets/db/dao/HwInfoDao.ets
+10
-0
HwghDao.ets
common/src/main/ets/db/dao/HwghDao.ets
+5
-2
QyInfoDao.ets
common/src/main/ets/db/dao/QyInfoDao.ets
+9
-0
Bzhx.ts
common/src/main/ets/entity/Bzhx.ts
+10
-9
EntryAbility.ets
entry/src/main/ets/entryability/EntryAbility.ets
+1
-1
BzhxModel.ets
entry/src/main/ets/model/BzhxModel.ets
+9
-11
GldwModel.ets
entry/src/main/ets/model/GldwModel.ets
+9
-11
HjModel.ets
entry/src/main/ets/model/HjModel.ets
+4
-19
HwModel.ets
entry/src/main/ets/model/HwModel.ets
+8
-10
KfModel.ets
entry/src/main/ets/model/KfModel.ets
+5
-13
QyModel.ets
entry/src/main/ets/model/QyModel.ets
+9
-13
DataSynchronism.ets
entry/src/main/ets/pages/sub_systemMaintenance/DataSynchronism/DataSynchronism.ets
+4
-4
HouseList.ets
entry/src/main/ets/pages/sub_systemMaintenance/Warehouse/HouseList.ets
+27
-22
Warehouse.ets
entry/src/main/ets/pages/sub_systemMaintenance/Warehouse/Warehouse.ets
+3
-1
UniInitList.ets
features/SystemMaintenance/src/main/ets/model/UniInitList.ets
+1
-1
没有找到文件。
common/index.ets
View file @
3485b15d
...
@@ -8,6 +8,13 @@ export { StatusBarManager } from './src/main/ets/components/StatusBarManager';
...
@@ -8,6 +8,13 @@ export { StatusBarManager } from './src/main/ets/components/StatusBarManager';
export {SQLiteContext} from './src/main/ets/db/SQLiteContext';
export {SQLiteContext} from './src/main/ets/db/SQLiteContext';
export {GldwDao} from './src/main/ets/db/dao/GldwDao';
export {GldwDao} from './src/main/ets/db/dao/GldwDao';
export {HjInfoDao} from './src/main/ets/db/dao/HjInfoDao';
export {HjInfoDao} from './src/main/ets/db/dao/HjInfoDao';
export {HwInfoDao} from './src/main/ets/db/dao/HwInfoDao';
export {BzhxDao} from './src/main/ets/db/dao/BzhxDao';
export {QyInfoDao} from './src/main/ets/db/dao/QyInfoDao';
export {KfInfoDao} from './src/main/ets/db/dao/KfInfoDao';
export {Gldw} from './src/main/ets/entity/Gldw'
export {Gldw} from './src/main/ets/entity/Gldw'
export {HjInfo} from './src/main/ets/entity/HjInfo'
export {HjInfo} from './src/main/ets/entity/HjInfo'
export {HwInfo} from './src/main/ets/entity/HwInfo'
export {Bzhx} from './src/main/ets/entity/Bzhx'
export {KfInfo} from './src/main/ets/entity/KfInfo'
export {QyInfo} from './src/main/ets/entity/QyInfo'
common/src/main/ets/db/dao/BzhxDao.ets
View file @
3485b15d
...
@@ -52,4 +52,14 @@ export class BzhxDao extends BaseTable<Bzhx> {
...
@@ -52,4 +52,14 @@ export class BzhxDao extends BaseTable<Bzhx> {
)`;
)`;
return bzhx_sql;
return bzhx_sql;
}
}
// 获取被装号型列表
async getBzhxList(pmdmsix: string): Promise<Bzhx[]> {
let wp = this.getPredicates();
if (pmdmsix) {
wp.equalTo('PMDMSIX', pmdmsix);
}
wp.orderByAsc('GUID');
return this.query(wp, this.getTableColumns())
}
}
}
\ No newline at end of file
common/src/main/ets/db/dao/HwInfoDao.ets
View file @
3485b15d
...
@@ -52,4 +52,13 @@ export class HwInfoDao extends BaseTable<HwInfo> {
...
@@ -52,4 +52,13 @@ export class HwInfoDao extends BaseTable<HwInfo> {
)`;
)`;
return hw_sql;
return hw_sql;
}
}
async getHwList(no: string): Promise<HwInfo[]> {
let wp = this.getPredicates();
if (no) {
wp.equalTo('HWH', no);
}
wp.orderByAsc('HWH');
return this.query(wp, this.getTableColumns())
}
}
}
\ No newline at end of file
common/src/main/ets/db/dao/HwghDao.ets
View file @
3485b15d
import relationalStore from '@ohos.data.relationalStore';
import relationalStore from '@ohos.data.relationalStore';
import { Hwgh } from '../../entity/Hwgh';
import { Hwgh } from '../../entity/Hwgh';
import { HwInfo } from '../../entity/HwInfo';
import BaseTable, { ValueType } from '../BaseTable';
import BaseTable, { ValueType } from '../BaseTable';
import { Table } from '../decorator/Decorators';
import { Table } from '../decorator/Decorators';
import { HwInfoDao } from './HwInfoDao';
/**
/**
...
@@ -40,4 +42,6 @@ export class HwghDao extends BaseTable<Hwgh> {
...
@@ -40,4 +42,6 @@ export class HwghDao extends BaseTable<Hwgh> {
)`;
)`;
return hwgh_sql;
return hwgh_sql;
}
}
}
\ No newline at end of file
}
common/src/main/ets/db/dao/QyInfoDao.ets
View file @
3485b15d
...
@@ -45,4 +45,12 @@ export class QyInfoDao extends BaseTable<QyInfo> {
...
@@ -45,4 +45,12 @@ export class QyInfoDao extends BaseTable<QyInfo> {
)`;
)`;
return qy_sql;
return qy_sql;
}
}
async getQy(qydm: string): Promise<QyInfo[]> {
let wp = this.getPredicates();
if (qydm) {
wp.like('QYDM', qydm);
}
wp.orderByAsc("QYDM");
return this.query(wp, this.getTableColumns());
}
}
}
\ No newline at end of file
common/src/main/ets/entity/Bzhx.ts
View file @
3485b15d
...
@@ -7,37 +7,37 @@ export interface Bzhx {
...
@@ -7,37 +7,37 @@ export interface Bzhx {
/**
/**
* 10位品名代码(存放10位品名代码或6位无号配号加“0000”)
* 10位品名代码(存放10位品名代码或6位无号配号加“0000”)
*/
*/
pmdmten
?
:
string
,
pmdmten
:
string
,
/**
/**
* 6位品名代码
* 6位品名代码
*/
*/
pmdmsix
?
:
string
,
pmdmsix
:
string
,
/**
/**
* 物资品名
* 物资品名
*/
*/
wzpm
?
:
string
,
wzpm
:
string
,
/**
/**
* 无号配号品名填"无号配号"
* 无号配号品名填"无号配号"
*/
*/
hxmc
?
:
string
,
hxmc
:
string
,
/**
/**
* 序号:1、2、3、4、5、6 ...,无号配号填-1
* 序号:1、2、3、4、5、6 ...,无号配号填-1
*/
*/
xh
?
:
number
,
xh
:
number
,
/**
/**
* 关联品名GUID
* 关联品名GUID
*/
*/
pmguid
?
:
string
,
pmguid
:
string
,
/**
/**
* 关联号型GUID
* 关联号型GUID
*/
*/
hxguid
?
:
string
,
hxguid
:
string
,
/**
/**
* 管理品名旧的GUID
* 管理品名旧的GUID
*/
*/
pmguid_old
?
:
string
,
pmguid_old
:
string
,
/**
/**
* 货位状态|是否删除(11111111SF2禁用,11111111SF1正常)
* 货位状态|是否删除(11111111SF2禁用,11111111SF1正常)
*/
*/
hwzt
?
:
string
hwzt
:
string
}
}
\ No newline at end of file
entry/src/main/ets/entryability/EntryAbility.ets
View file @
3485b15d
...
@@ -10,7 +10,7 @@ export default class EntryAbility extends UIAbility {
...
@@ -10,7 +10,7 @@ export default class EntryAbility extends UIAbility {
onCreate(want, launchParam) {
onCreate(want, launchParam) {
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate');
// 初始化数据库
// 初始化数据库
database.initDB(this.context)
//
database.initDB(this.context)
}
}
onDestroy() {
onDestroy() {
...
...
entry/src/main/ets/model/BzhxModel.ets
View file @
3485b15d
import database from '../database/database'
import { BzhxDao, SQLiteContext,Bzhx } from '@ohos/common'
import { Bzhx } from '@ohos/common/src/main/ets/entity/Bzhx'
import { importSql } from '../sql/index'
// 被装号型
// 被装号型
class BzhxModal {
class BzhxModal {
private tableName = 'TAB_XTWH_JCSJ_BZHX'
// 添加被装号型
// 添加号型
async set(data: Bzhx[]) {
async set(data: Bzhx[]) {
for (let index = 0; index < data.length; index++) {
await SQLiteContext.with(BzhxDao).batchInsert(data)
const item = data[index];
}
const sql = importSql.getBzhxSql(item)
await database.set(sql, this.tableName)
// 查询被装号型
}
async query(pmdmsix? : string): Promise<Bzhx[]> {
let res = await SQLiteContext.with(BzhxDao).getBzhxList(pmdmsix)
return res;
}
}
}
}
...
...
entry/src/main/ets/model/GldwModel.ets
View file @
3485b15d
import database from '../database/database'
import { Gldw, SQLiteContext,GldwDao } from '@ohos/common'
import { Gldw } from '@ohos/common/src/main/ets/entity/Gldw'
import { importSql } from '../sql/index'
// 管理单位
// 管理单位
class GldwModal {
class GldwModal {
private tableName = 'TAB_BZGL_KNZY_APP_BGDDW'
// 添加管理单位
// 添加单位
async set(data: Gldw[]) {
async set(data: Gldw[]) {
for (let index = 0; index < data.length; index++) {
await SQLiteContext.with(GldwDao).batchInsert(data)
const item = data[index];
}
const sql = importSql.getGldwSql(item)
await database.set(sql, this.tableName)
// 查询管理单位
}
async query(dwmc? : string): Promise<Gldw[]> {
let res = await SQLiteContext.with(GldwDao).getGldwList(dwmc)
return res;
}
}
}
}
...
...
entry/src/main/ets/model/HjModel.ets
View file @
3485b15d
import database from '../database/database'
import { HjInfo, SQLiteContext, HjInfoDao } from '@ohos/common'
import { HjInfo, SQLiteContext, HjInfoDao, Logger } from '@ohos/common'
import { importSql } from '../sql/index'
// 货架管理
// 货架管理
class HjModal {
class HjModal {
private tableName = 'TAB_BZGL_KNZY_APP_HJB'
// 添加货架
// 添加货位
async set(data: HjInfo[]) {
async set(data: HjInfo[]) {
SQLiteContext.with(HjInfoDao).batchInsert(data).then(result => {
await SQLiteContext.with(HjInfoDao).batchInsert(data)
Logger.info(this, "插入成功" + result);
if (result > 0) {
Logger.info(this, "插入成功" + result);
}
})
// for (let index = 0; index < data.length; index++) {
// const item = data[index];
// const sql = importSql.getHjSql(item)
//
// //await database.set(sql, this.tableName)
// }
}
}
// 查询货架
async query(no?: string):Promise< HjInfo[]> {
async query(no?: string):Promise< HjInfo[]> {
let res = await SQLiteContext.with(HjInfoDao).getHjList(no);
let res = await SQLiteContext.with(HjInfoDao).getHjList(no);
return res;
return res;
...
...
entry/src/main/ets/model/HwModel.ets
View file @
3485b15d
import database from '../database/database'
import { HwInfo, SQLiteContext,HwInfoDao } from '@ohos/common'
import { HwInfo } from '@ohos/common/src/main/ets/entity/HwInfo'
import { importSql } from '../sql/index'
// 货位管理
// 货位管理
class HwModal {
class HwModal {
private tableName = 'TAB_BZGL_KNZY_APP_HWB'
// 添加货位
// 添加货位
async set(data: HwInfo[]) {
async set(data: HwInfo[]) {
for (let index = 0; index < data.length; index++) {
await SQLiteContext.with(HwInfoDao).batchInsert(data)
const item = data[index];
}
const sql = importSql.getHwSql(item)
await database.set(sql, this.tableName)
// 查询货位
}
async query(no? : string): Promise<HwInfo[]> {
let res = await SQLiteContext.with(HwInfoDao).getHwList(no)
return res;
}
}
}
}
...
...
entry/src/main/ets/model/KfModel.ets
View file @
3485b15d
import database from '../database/database'
import { KfInfoDao, SQLiteContext,KfInfo } from '@ohos/common'
import { KfInfo } from '@ohos/common/src/main/ets/entity/KfInfo'
import { importSql, sqlCommon } from '../sql/index'
// 库房管理
// 库房管理
class KfModal {
class KfModal {
private tableName = 'TAB_BZGL_KNZY_APP_DWKF'
// 添加库房
// 添加库房
async set(data: KfInfo[]) {
async set(data: KfInfo[]) {
for (let index = 0; index < data.length; index++) {
await SQLiteContext.with(KfInfoDao).batchInsert(data)
const item = data[index];
const sql = importSql.getCkkfSql(item)
await database.set(sql, this.tableName)
}
}
}
// 查询库房
// 查询库房
async query(kfmc?
: string)
{
async query(kfmc?
: string): Promise<KfInfo[]>
{
const sql = sqlCommon.getKf({ kfmc }
)
let res = await SQLiteContext.with(KfInfoDao).getKf(kfmc
)
return
await database.query<KfInfo>(sql, ['guid', 'kfdm', 'kfmc', 'kflx', 'yxj', 'isdefault'] ,this.tableName)
return
res;
}
}
}
}
...
...
entry/src/main/ets/model/QyModel.ets
View file @
3485b15d
import database from '../database/database'
import { QyInfo, SQLiteContext,QyInfoDao } from '@ohos/common'
import { QyInfo } from '@ohos/common/src/main/ets/entity/QyInfo'
import { importSql } from '../sql/index'
// 区域
// 区域
管理
class QyModal {
class QyModal {
private tableName = 'TAB_BZGL_KNZY_APP_QYB'
// 添加区域
async set(data: QyInfo[]) {
await SQLiteContext.with(QyInfoDao).batchInsert(data)
}
// 查询区域
// 查询区域
async set(data: QyInfo[]) {
async query(qydm? : string): Promise<QyInfo[]> {
for (let index = 0; index < data.length; index++) {
let res = await SQLiteContext.with(QyInfoDao).getQy(qydm)
const item = data[index];
return res;
const sql = importSql.getQySql(item)
await database.set(sql, this.tableName)
}
}
}
}
}
const qyModal = new QyModal()
const qyModal = new QyModal()
export default qyModal
export default qyModal
\ No newline at end of file
entry/src/main/ets/pages/sub_systemMaintenance/DataSynchronism/DataSynchronism.ets
View file @
3485b15d
...
@@ -80,7 +80,7 @@ export struct DataSynchronism {
...
@@ -80,7 +80,7 @@ export struct DataSynchronism {
const allData = JSON.parse(res).bzhxList as Bzhx[]
const allData = JSON.parse(res).bzhxList as Bzhx[]
// 添加品名
// 添加品名
await bzhxModal.set(allData)
//
await bzhxModal.set(allData)
// 获取基础信息
// 获取基础信息
const baseRes = await getBaseList({ dwguid: this.dwguid })
const baseRes = await getBaseList({ dwguid: this.dwguid })
...
@@ -90,16 +90,16 @@ export struct DataSynchronism {
...
@@ -90,16 +90,16 @@ export struct DataSynchronism {
await kfModel.set(ckkfList)
await kfModel.set(ckkfList)
// 区域添加
// 区域添加
await qyModel.set(qyList)
//
await qyModel.set(qyList)
// 货架添加
// 货架添加
await hjModel.set(hjList)
await hjModel.set(hjList)
// 货位添加
// 货位添加
await hwModel.set(hwList)
//
await hwModel.set(hwList)
// 添加管理单位
// 添加管理单位
await gldwModel.set(ddwAndJw)
//
await gldwModel.set(ddwAndJw)
...
...
entry/src/main/ets/pages/sub_systemMaintenance/Warehouse/HouseList.ets
View file @
3485b15d
...
@@ -4,6 +4,9 @@ import { KfInfo } from '@ohos/common/src/main/ets/entity/KfInfo'
...
@@ -4,6 +4,9 @@ import { KfInfo } from '@ohos/common/src/main/ets/entity/KfInfo'
export struct Demo {
export struct Demo {
data: KfInfo[]
data: KfInfo[]
arr = [1,2,3,4,5]
arr = [1,2,3,4,5]
@Styles commonPadding() {
.padding({top:4, bottom:4})
}
build() {
build() {
Column() {
Column() {
List(){
List(){
...
@@ -12,36 +15,38 @@ export struct Demo {
...
@@ -12,36 +15,38 @@ export struct Demo {
Row() {
Row() {
Column() {
Column() {
Row(){
Row(){
Text("库房代码:")
Text("库房代码:")
.commonPadding()
Text("2")
Text("2")
.commonPadding()
}
}
Row(){
Row(){
Text("库房名称:")
Text("库房名称:")
.commonPadding()
Text("2")
Text("2")
.commonPadding()
}
}
}.width('30%')
}.width('40%')
Column() {
Row() {
Text('凭证号: ')
Text('1')
}.alignSelf(ItemAlign.Start).padding({ top: 8, bottom: 8 })
Row() {
Column() {
Text("数量: ")
Row(){
Text('0').fontColor('#ff3d43')
Text("库房类型:").commonPadding()
Text('/').fontColor('#ff3d43')
Text("2").commonPadding()
Text('500').fontColor('#ff3d43')
}
}.alignSelf(ItemAlign.Start)
Row(){
}.width("30%").padding({ top: 8, bottom: 8 })
Text("优先级:").commonPadding()
Text("2").commonPadding()
}
}.width('40%')
Row() {
Row() {
Text("状态: ")
Radio({ value: 'Radio1', group: 'radioGroup' })
Text("未完成").fontColor('#ff3d43')
.height(18)
}
.width(18)
}.margin({ top: 10 }).border({ width: { bottom: '1lpx' }, color: "#717171" })
.onChange((isChecked: boolean) => {
console.log('Radio1 status is ' + isChecked)
})
}.width('10%')
}.commonPadding()
}
}
})
})
}
}
.divider({strokeWidth:1,color:$r("app.color.home_grid_fontColor")})
}.width('100%').height('100%')
}.width('100%').height('100%')
}
}
...
...
entry/src/main/ets/pages/sub_systemMaintenance/Warehouse/Warehouse.ets
View file @
3485b15d
import { BasicTable } from '../../../view/BasicTable/BasicTable'
import { BasicTable } from '../../../view/BasicTable/BasicTable'
import { TitleBar } from '../../../view/title/TitleBar'
import { TitleBar } from '../../../view/title/TitleBar'
import kfModel from '../../../model/KfModel'
import kfModel from '../../../model/KfModel'
import { Logger } from '@ohos/common'
@Entry
@Entry
@Component
@Component
...
@@ -12,9 +13,10 @@ export struct Warehouse {
...
@@ -12,9 +13,10 @@ export struct Warehouse {
this.getWarehouseList()
this.getWarehouseList()
}
}
// 获取库
存
数据
// 获取库
房
数据
async getWarehouseList() {
async getWarehouseList() {
const res = await kfModel.query()
const res = await kfModel.query()
Logger.info(this, "库房数据>" + JSON.stringify(res));
}
}
build() {
build() {
...
...
features/SystemMaintenance/src/main/ets/model/UniInitList.ets
View file @
3485b15d
...
@@ -28,7 +28,7 @@ export const uniInitList: UniListItem[] = [
...
@@ -28,7 +28,7 @@ export const uniInitList: UniListItem[] = [
showExtraIcon: true,
showExtraIcon: true,
showArrow: true,
showArrow: true,
//extraIcon: '',
//extraIcon: '',
url: 'pages/sub_systemMaintenance/Warehouse'
url: 'pages/sub_systemMaintenance/Warehouse
/Warehouse
'
},
},
{
{
title: '货架查看',
title: '货架查看',
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论