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
3fafc5c4
Commit
3fafc5c4
authored
Jan 28, 2024
by
毛勇泽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增包裹
parent
51fe3548
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
148 行增加
和
19 行删除
+148
-19
BgglDto.ets
common/src/main/ets/bean/dto/BgglDto.ets
+19
-18
BgglDao.ets
common/src/main/ets/db/dao/BgglDao.ets
+57
-1
NativeSql.ets
common/src/main/ets/db/sql/NativeSql.ets
+12
-0
BgglModel.ets
entry/src/main/ets/model/BgglModel.ets
+10
-0
InputPayDailog.ets
entry/src/main/ets/pages/package/dialog/InputPayDailog.ets
+49
-0
AddPackagePage.ets
entry/src/main/ets/pages/package/scanpack/AddPackagePage.ets
+0
-0
main_pages.json
entry/src/main/resources/base/profile/main_pages.json
+1
-0
没有找到文件。
common/src/main/ets/bean/dto/BgglDto.ets
View file @
3fafc5c4
export interface newBgglDto {
export interface newBgglDto {
guid: string;
guid
?
: string;
ddh: string;
ddh
?
: string;
xs: number;
xs
?
: number;
pc: number;
pc
?
: number;
fwdw: string;
fwdw
?
: string;
kfdm: string;
kfdm
?
: string;
bgzt: string;
bgzt
?
: string;
slr: string;
slr
?
: string;
sldwdm: string;
sldwdm
?
: string;
sjh: number;
sjh
?
: number;
jssj: string;
jssj
?
: string;
cksj: string;
cksj
?
: string;
sfdc: string;
sfdc
?
: string;
sfdf: string;
sfdf
?
: string;
hwh: string;
hwh
?
: string;
qjm: string;
qjm
?
: string;
dfje: number;
dfje
?
: number;
kfmc: string;
kfmc
?
: string;
}
}
\ No newline at end of file
common/src/main/ets/db/dao/BgglDao.ets
View file @
3fafc5c4
...
@@ -112,6 +112,7 @@ export class BgglDao extends BaseTable<Bggl> {
...
@@ -112,6 +112,7 @@ export class BgglDao extends BaseTable<Bggl> {
async SetYpfActive(guid?:string) {
async SetYpfActive(guid?:string) {
try {
try {
let val_sql = NativeSql.SetYpfActive(guid)
let val_sql = NativeSql.SetYpfActive(guid)
Logger.info('派发>>sql', val_sql)
let db = await this.futureDb;
let db = await this.futureDb;
let rs = await db.executeSql(val_sql);
let rs = await db.executeSql(val_sql);
return rs;
return rs;
...
@@ -119,7 +120,39 @@ export class BgglDao extends BaseTable<Bggl> {
...
@@ -119,7 +120,39 @@ export class BgglDao extends BaseTable<Bggl> {
throw new Error('[插入异常]|' + e)
throw new Error('[插入异常]|' + e)
}
}
}
}
/*更新包裹状态*/
async updateBgSql(params?:any) {
try {
let val_sql = NativeSql.updateBgSql(params)
Logger.info('更新包裹状态>>sql', val_sql)
let db = await this.futureDb;
let rs = await db.executeSql(val_sql);
return rs;
} catch (e) {
throw new Error('[插入异常]|' + e)
}
}
/**
* // 检测包裹是否重复添加
*/
async testRepetitionBgSql(ddh?:string): Promise<newBgglDto[]> {
try {
let val_sql = NativeSql.testRepetitionBgSql(ddh);
Logger.info('检测包裹是否重复添加>>sql', val_sql)
let db = await this.futureDb;
let rs = await db.querySql(val_sql);
let items = []
if (rs.goToFirstRow()) {
do {
items.push(this.toPackageRef(rs))
} while (rs.goToNextRow())
}
Logger.info(this, '最新上架>>' + JSON.stringify(items))
return items;
} catch (e) {
throw new Error('[查询异常]|' + e)
}
}
toWzcrkRefWz(cursor: relationalStore.ResultSet): newBgglDto {
toWzcrkRefWz(cursor: relationalStore.ResultSet): newBgglDto {
let info: newBgglDto = {
let info: newBgglDto = {
guid: cursor.getString(cursor.getColumnIndex('guid')),
guid: cursor.getString(cursor.getColumnIndex('guid')),
...
@@ -143,4 +176,26 @@ export class BgglDao extends BaseTable<Bggl> {
...
@@ -143,4 +176,26 @@ export class BgglDao extends BaseTable<Bggl> {
};
};
return info;
return info;
}
}
toPackageRef(cursor: relationalStore.ResultSet): newBgglDto {
let info: newBgglDto = {
guid: cursor.getString(cursor.getColumnIndex('guid')),
ddh: cursor.getString(cursor.getColumnIndex('ddh')),
xs: cursor.getLong(cursor.getColumnIndex('xs')),
pc: cursor.getLong(cursor.getColumnIndex('pc')),
fwdw: cursor.getString(cursor.getColumnIndex('fwdw')),
bgzt: cursor.getString(cursor.getColumnIndex('bgzt')),
slr: cursor.getString(cursor.getColumnIndex('slr')),
sldwdm: cursor.getString(cursor.getColumnIndex('sldwdm')),
sjh: cursor.getLong(cursor.getColumnIndex('sjh')),
jssj: cursor.getString(cursor.getColumnIndex('jssj')),
cksj: cursor.getString(cursor.getColumnIndex('cksj')),
sfdc: cursor.getString(cursor.getColumnIndex('sfdc')),
sfdf: cursor.getString(cursor.getColumnIndex('sfdf')),
kfdm: cursor.getString(cursor.getColumnIndex('kfdm')),
qjm: cursor.getString(cursor.getColumnIndex('qjm')),
dfje: cursor.getLong(cursor.getColumnIndex('dfje')),
hwh: cursor.getString(cursor.getColumnIndex('hwh')),
};
return info;
}
}
}
\ No newline at end of file
common/src/main/ets/db/sql/NativeSql.ets
View file @
3fafc5c4
...
@@ -674,6 +674,18 @@ WHERE
...
@@ -674,6 +674,18 @@ WHERE
`update TAB_BZGL_KNZY_APP_BGGL set BGZT = '已领取' , sfdc = '0' ,CKSJ = '${time}' where guid in ('${guid}') `
`update TAB_BZGL_KNZY_APP_BGGL set BGZT = '已领取' , sfdc = '0' ,CKSJ = '${time}' where guid in ('${guid}') `
return sql
return sql
}
}
// 检测包裹是否重复添加
static testRepetitionBgSql (ddh?:string):string{
const sql = `select * from tab_bzgl_knzy_app_bggl where ddh = '${ddh}'`
return sql
}
// 更新包裹状态
static updateBgSql(params?:any):string {
const time = dateUtils.formatDateTime(new Date(), 'all')
const sql =
`update TAB_BZGL_KNZY_APP_BGGL set BGZT = '待上架', JSSJ =' ${time}' , XS = ${params.xs}, PC = ${params.pc} where ddh in ('${params.ddh}')`
return sql
}
}
}
entry/src/main/ets/model/BgglModel.ets
View file @
3fafc5c4
...
@@ -89,6 +89,16 @@ class BgglModel {
...
@@ -89,6 +89,16 @@ class BgglModel {
let res = await SQLiteContext.with(BgglDao).SetYpfActive(guid)
let res = await SQLiteContext.with(BgglDao).SetYpfActive(guid)
return res
return res
}
}
/*更新包裹状态*/
async updateBgSql(params?:any) {
let res = await SQLiteContext.with(BgglDao).updateBgSql(params)
return res
}
// 检测包裹是否重复添加
async testRepetitionBgSql(ddh: string): Promise<newBgglDto[]> {
let res = await SQLiteContext.with(BgglDao).testRepetitionBgSql(ddh);
return res;
}
// 清空表
// 清空表
async clear() {
async clear() {
await SQLiteContext.with(BgglDao).clearTable()
await SQLiteContext.with(BgglDao).clearTable()
...
...
entry/src/main/ets/pages/package/dialog/InputPayDailog.ets
0 → 100644
View file @
3fafc5c4
import { DividerTitle } from '../../../view/DividerTitle/DividerTitle';
@Extend(Button) function CommonButtonStyle() {
.backgroundColor('#fff')
.fontColor('#000')
}
@Entry
@Component
export struct InputPayDailog{
build(){
Column() {
Text("输入运费").fontSize(16).fontColor("#9C9C9C").lineHeight(18).padding(20)
TextInput({ text: "0" })
.enterKeyType(EnterKeyType.Search)
.borderColor("#454545")
.borderRadius(5)
.height(40)
.margin({left:20,right:20,top:10})
.flexGrow(1)
.borderColor('#bcc5d7')
.borderWidth(1)
.backgroundColor('#fff')
Divider()
.vertical(false)
.margin({top:12})
.height(14)
.strokeWidth(1)
.color('#989A9C')
.opacity(0.6)
Row() {
Flex({ justifyContent: FlexAlign.SpaceBetween, alignItems: ItemAlign.Start }) {
Button("取消").CommonButtonStyle().width("50%").onClick(() => {
})
Divider()
.vertical(true)
.strokeWidth(2)
.color('#989A9C')
.opacity(0.6).height(40)
Button("确认").CommonButtonStyle().fontColor("#007dff").width("50%")
.onClick(async () => {
})
}
}.backgroundColor("#fff").height(40)
}.margin({left:20,right:20})
.borderRadius(10)
.backgroundColor('#fff')
}
}
\ No newline at end of file
entry/src/main/ets/pages/package/scanpack/AddPackagePage.ets
0 → 100644
View file @
3fafc5c4
差异被折叠。
点击展开。
entry/src/main/resources/base/profile/main_pages.json
View file @
3fafc5c4
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
"pages/package/Pick"
,
"pages/package/Pick"
,
"pages/package/Pack"
,
"pages/package/Pack"
,
"pages/package/scanpack/ScanPackPage"
,
"pages/package/scanpack/ScanPackPage"
,
"pages/package/scanpack/AddPackagePage"
,
"pages/metailmange/WzInPage/WzInPage"
,
"pages/metailmange/WzInPage/WzInPage"
,
"pages/metailmange/WzOutPage/WzOutPage"
,
"pages/metailmange/WzOutPage/WzOutPage"
,
"pages/metailmange/WzExchangePage"
,
"pages/metailmange/WzExchangePage"
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论