Commit fa0b57c8 by 毛勇泽

落位扫描

parent 0919e842
......@@ -36,4 +36,5 @@ export {DsRfid} from './src/main/ets/entity/DsRfid';
export {DsRfidDao} from './src/main/ets/db/dao/DsRfidDao';
export {pzlx_dict,szlx_dict,new_zmlx_dict} from './src/main/ets/utils/dict';
export {SearchData} from './src/main/ets/bean/dto/SearchData';
export {HWFromData} from './src/main/ets/bean/dto/SearchData';
export {WzPositionInfo} from './src/main/ets/bean/dto/WzPositionInfo';
\ No newline at end of file
......@@ -4,4 +4,16 @@ export interface SearchData{
gldwguid?: string;
kfguid?: string;
zmlx?: string
gldwmc?:string
kfmc?:string
kfdm?:string
zmmc?:string,
hwh?:string
}
export interface HWFromData{
hwh?: string,
guid?: string,
hjguid?: string,
kfdm?: string,
wzInfo?: Array<any>
}
\ No newline at end of file
......@@ -260,6 +260,24 @@ export class WzcrkmxDao extends BaseTable<Wzcrkmx> {
throw new Error('[查询异常]|' + e)
}
}
/*验证扫描:验证扫描完的数据有没有*/
async testInsertSql(params):Promise<TestHwWzDto[]>{
try {
let val_sql = NativeSql.testInsertSql(params);
let db = await this.futureDb;
let rs = await db.querySql(val_sql);
let items = []
if (rs.goToFirstRow()) {
do {
items.push(this.toTestHwWzDto(rs))
} while (rs.goToNextRow())
}
Logger.info(this, 'queryAll items=' + JSON.stringify(items))
return items;
} catch (e) {
throw new Error('[查询异常]|' + e)
}
}
/**
* 验证当前货位在本方库转换
......@@ -375,6 +393,30 @@ export class WzcrkmxDao extends BaseTable<Wzcrkmx> {
throw new Error('[更新异常]|' + e)
}
}
/*验证扫描完更新*/
async updateWzcshSql(params){
try {
let val_sql = NativeSql.updateWzcshSql(params)
Logger.info("更新扫描",val_sql)
let db = await this.futureDb;
let rs = await db.executeSql(val_sql);
return rs;
} catch (e) {
throw new Error('[插入异常]|' + e)
}
}
/*验证扫描完新增*/
async insertWzcshSql(params){
try {
let val_sql = NativeSql.insertWzcshSql(params)
Logger.info("扫描完新增",val_sql)
let db = await this.futureDb;
let rs = await db.executeSql(val_sql);
return rs;
} catch (e) {
throw new Error('[插入异常]|' + e)
}
}
}
\ No newline at end of file
......@@ -582,4 +582,19 @@ WHERE
const sql=`select hw.pmdmcode, hx.hxmc, sum (case when hw.hwh='LS-1-1-1' then ifnull (hw.hwsl,0) +0 else 0 end) SY,sum (case when hw.hwh != 'LS-1-1-1' then ifnull (hw.hwsl, 0) +0 else 0 end) YL from tab_bzgl_knzy_app_hwb hw inner join TAB_BZGL_KNZY_APP_HJB hj on hj.guid = hw.hjguid inner join TAB_BZGL_KNZY_APP_QYB gy on gy.guid = hj.qyguid left join TAB_XTWH_JCSJ_BZHX hx on hw.pmdmcode = hx.pmdmten where substr (hw.pmdmcode, 1, 6) = ${params.pmdmcode} and hw.kfguid = ${params.kfguid} and hw.gldwguid= ${params.gldwguid} and zmlx = ${params.zmlx} group by hw.pmdmcode, hx.hxmc`
return sql
}
/*验证扫描:验证扫描完的数据有没有*/
static testInsertSql(params?: any):string{
const sql= `select * from (select hw.*,qy.kfdm kfdm from tab_bzgl_knzy_app_hwb hw left join tab_bzgl_knzy_app_hjb hj on hj.guid = hw.hjguid left join tab_bzgl_knzy_app_qyb qy on qy.guid = hj.qyguid ) where kfguid = '${params.kfguid}' and hwh = ${params.hwh} and (pmdmcode = ${(params.pmdmcode)} or pmdmcode ='' or pmdmcode is null )`
return sql
}
/*验证扫描完更新*/
static updateWzcshSql(params?: any):string{
const sql=`update tab_bzgl_knzy_app_hwb set hwsl = ifnull(hwsl,0) + ${params.srsl}, pmdmcode = ${params.pmdmcode} where guid = ${params.guid}`
return sql
}
/*验证扫描完新增*/
static insertWzcshSql(params?: any):string{
const sql=`insert into tab_bzgl_knzy_app_hwb (guid, hwh, pmdmcode, hwsl, hjguid,hwzt,gldwguid,kfguid,zmlx) values ('${params.guid}','${params.hwh}',${params.pmdmcode},${params.srsl},'${params.hjguid}','11111111SF1','${params.gldwguid}','${params.kfguid}',${params.zmlx})`
return sql
}
}
\ No newline at end of file
......@@ -53,6 +53,11 @@ class WzcrkmxModel {
let res = await SQLiteContext.with(WzcrkmxDao).testHwWz(data.kfdm, data.hjguid, data.hwh)
return res
}
// 验证扫描:验证扫描完的数据有没有
async testInsertSql(params) {
let res = await SQLiteContext.with(WzcrkmxDao).testInsertSql(params)
return res
}
async getPzMxItem(params, isPmSix) {
let res = await SQLiteContext.with(WzcrkmxDao).getPzMxItem(params, isPmSix)
return res
......@@ -69,6 +74,16 @@ class WzcrkmxModel {
let res = await SQLiteContext.with(WzcrkmxDao).updateWzmx(params)
return res
}
/*验证扫描完更新*/
async updateWzcshSql(params) {
let res = await SQLiteContext.with(WzcrkmxDao).updateWzcshSql(params)
return res
}
/*验证扫描完新增*/
async insertWzcshSql(params) {
let res = await SQLiteContext.with(WzcrkmxDao).insertWzcshSql(params)
return res
}
// 清空表
async clear() {
await SQLiteContext.with(WzcrkmxDao).clearTable()
......
......@@ -16,7 +16,7 @@ struct WzHxPositionTotalPage{
}
build() {
Column() {
TitleBar({ title: "物资状态" })
TitleBar({ title: "号型落位统计" })
Flex({ direction: FlexDirection.Column }) {
Row() {
List({ space: 2 }) {
......@@ -28,10 +28,8 @@ struct WzHxPositionTotalPage{
Text('品名代码: ' + item.pmdmcode).fontSize(14).fontColor('#3b4144')
}
.width('70%')
Blank()
.layoutWeight(1)
Flex({
direction: FlexDirection.Column,
justifyContent: FlexAlign.Center,
......
......@@ -33,12 +33,7 @@ struct WzPositionPage {
@State dataSource: WzPositionClass[] = []
@State checkedList: Array<string> = []
@State radioChecked: boolean = true
@State searchData: SearchData = {
wzpm: '',
gldwguid: '',
kfguid: '',
zmlx: ''
}
@State searchData: SearchData = {}
@State gldwselectValue: Array<SelectOption> = []
@State kfselectValue: Array<SelectOption> = []
@State zmlxselectValue: Array<SelectOption> = []
......@@ -68,6 +63,19 @@ struct WzPositionPage {
.fontSize("14vp")
Button("扫描落位")
.bottomBtnSty().fontColor("#0fa983").fontSize("14vp")
.onClick(() => {
if (this.searchData.gldwguid && this.searchData.kfguid && this.searchData.zmlx) {
router.pushUrl({ url: 'pages/metailmange/WzPositionPage/WzPositionDetailPage/WzScanPositionPage', params: {
searchData: this.searchData
} })
}else {
promptAction.showToast({
message: '请选择管理单位、库房、账目类型',
bottom: 200
})
}
})
Button("导出结果数据包")
.bottomBtnSty()
.onClick(async () => {
......@@ -183,6 +191,7 @@ struct WzPositionPage {
.borderColor("#454545")
.onSelect(async (index: number, value?: string) => {
this.searchData.gldwguid = this.dwList[index].guid
this.searchData.gldwmc=value
this.getPositionPage()
})
.width(100)
......@@ -198,6 +207,8 @@ struct WzPositionPage {
.borderColor("#454545")
.onSelect(async (index: number, value?: string) => {
this.searchData.kfguid = this.kfList[index].guid
this.searchData.kfdm = this.kfList[index].kfdm
this.searchData.kfmc=value
this.getPositionPage()
})
.width(100)
......@@ -213,6 +224,7 @@ struct WzPositionPage {
.borderColor("#454545")
.onSelect(async (index: number, value?: string) => {
this.searchData.zmlx = "'"+zmlx_dict[index].value+"'"
this.searchData.zmmc=value
this.getPositionPage()
})
.width(100)
......
import { DividerTitle } from '../../../../view/DividerTitle/DividerTitle'
@CustomDialog
@Component
export struct WzPositionScanDialog {
@Link currentInfo: {
gldwguid?: string,
kfguid?: string,
zmlx?: string,
gldwmc?: string,
kfmc?: string,
zmmc?: string,
hwh?: string
}
controller: CustomDialogController
build() {
Column() {
Flex({ justifyContent: FlexAlign.SpaceBetween }) {
Text("管理单位:").fontSize(16).lineHeight(18)
Text(this.currentInfo.gldwmc).fontSize(16).fontColor("#000").fontWeight(700)
}.padding(15)
Flex({ justifyContent: FlexAlign.SpaceBetween }) {
Text("库房:").fontSize(16).lineHeight(18)
Text(this.currentInfo.kfmc).fontSize(16).fontColor("#000").fontWeight(700)
}.padding(15)
Flex({ justifyContent: FlexAlign.SpaceBetween }) {
Text("账目类型:").fontSize(16).lineHeight(18)
Text(this.currentInfo.zmmc).fontSize(16).fontColor("#000").fontWeight(700)
}.padding(15)
Flex({ justifyContent: FlexAlign.SpaceBetween }) {
Text("当前扫描货位号:").fontSize(16).lineHeight(18)
Text(this.currentInfo.hwh).fontSize(20).fontColor("#0fa983").fontWeight(700)
}.padding(15)
}
.margin({ top: 80 })
.width('100%')
.borderRadius(5)
.backgroundColor('#fff')
}
}
\ No newline at end of file
......@@ -20,6 +20,7 @@
"pages/metailmange/WzPositionPage/WzPositionPage",
"pages/metailmange/WzPositionPage/WzPositionDetailPage/WzPositionTotalPage",
"pages/metailmange/WzPositionPage/WzPositionDetailPage/WzHxPositionTotalPage",
"pages/metailmange/WzPositionPage/WzPositionDetailPage/WzScanPositionPage",
"pages/metailmange/WzReversePage",
"pages/metailmange/WzReversePage/WzReverseDetailPage/WzReverseDetailPage",
"pages/metailmange/WzReversePage/WzReversePage",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论