Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
test
autotest-airtest-web-spd
Commits
76b73b13
Commit
76b73b13
authored
Jul 05, 2024
by
xiao-hesheng
Browse files
脚本优化
parent
ff6bcebb
Changes
6
Hide whitespace changes
Inline
Side-by-side
air_case/b5_spd3_core_business_flow/a_b2流程九请领业务流_二级库向中心库.air/a_b2流程九请领业务流_二级库向中心库.py
View file @
76b73b13
...
...
@@ -265,7 +265,7 @@ def get_centeStock_pick_list_counts():
print
(
'生成拣货单列表查询,result1'
,
result1
)
total1
=
commonFuc
().
analysis_json
(
'total'
,
commonFuc
().
analysis_json
(
'data'
,
result1
))
return
total1
def
pick_execute
(
GoodsId
,
type
=
1
):
def
pick_execute
(
hosGoodsId
,
GoodsId
,
type
=
1
):
module
=
"b5_spd3_core_business_flow"
# # 登录获取用户id等信息,使用创建的用户登录===========开始
info
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)
...
...
@@ -416,7 +416,7 @@ def main():
#低值拣货执行
hosGoodsId
=
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"产品审核信息"
,
'message2'
)[
'hosGoodsId'
]
GoodsId
=
hosGoodsId
.
replace
(
get_hosid
(),
''
)
pick_execute
(
GoodsId
,
1
)
pick_execute
(
hosGoodsId
,
GoodsId
,
1
)
# 高值拣货执行
hosGoodsId
=
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"产品审核信息"
,
'message1'
)[
'hosGoodsId'
]
GoodsId
=
hosGoodsId
.
replace
(
get_hosid
(),
''
)
...
...
data/b5_spd3_core_business_flow/message18
View file @
76b73b13
条码信息
:
list_a
:
-
&id001
-
id
:
UT240705000214
lastModified
:
version
:
createTime
:
'2024-07-05 10:18:30'
createUser
:
lastModifiedUser
:
snCode
:
UT240705000214
hosId
:
h0347
branchId
:
stockId
:
9b3e40528eff4ed1bf4ee12b587e00d0
areaCode
:
areah03472634
areaName
:
自动化测试
shelfCode
:
areah03472634-2-01-01
codeType
:
16
tagType
:
0
hosGoodsId
:
h034700004462
mdmGoodsCode
:
'11661415'
goodsCode
:
'00004462'
goodsDi
:
'01123456789012'
barName
:
100支/100
batchCode
:
'333'
expdtDate
:
'2025-01-11'
productDate
:
'2024-07-05'
mfrCode
:
mfrCodeSee
:
pkgCode
:
"010112345678901210333\x1D112407051725011121UT240705000214"
pkgCodeSee
:
010112345678901210333112407051725011121UT240705000214
ssccCode
:
'010839000187046429'
extInfo
:
outId
:
tbStatus
:
20
goodsCodeDi
:
barcodeId
:
ext
:
pkgDefId
:
db284f5e13594188b4aa09a5832293ec
pkgDefQty
:
100
purBillId
:
CG2024070520620
pkgDefName
:
'100'
distrBillId
:
PSh0347202407050026
inStockTime
:
'2024-07-05 10:21:08'
distrDetailId
:
'03839280'
certificateCode
:
''
sourceDetailId
:
purMode
:
10
purModes
:
price
:
pid
:
goodsMfrsName
:
德国歌德公司 Geuder AG
mfrsName
:
goodsSpec
:
G-31891
unit
:
支
goodsName
:
一次性注射器_低值C2g9i
pkgDefId
:
db284f5e13594188b4aa09a5832293ec
pkgDefQty
:
100
defaultPkgDefQty
:
defaultQty
:
defaultSurplusQty
:
defaultPkgDefId
:
purDetailId
:
pkgDefName
:
'100'
printNum
:
0
deptId
:
deptName
:
billId
:
taskId
:
made
:
德国
provId
:
p1e31d
provName
:
国药集团公司GxzLS
subProvId
:
p1e31d
subProvName
:
国药集团公司GxzLS
provHosGoodsId
:
sourceType
:
taskDate
:
sourceOrderNo
:
taskType
:
detailId
:
branchGoodsPkgDefList
:
unitName
:
areaCodeList
:
diType
:
mdmGoodsSpecCode
:
hosGoodsCode
:
'00004462'
supplyId
:
inSettlement
:
spdGoodsCode
:
codeKind
:
brand
:
miCode
:
transferRatio
:
1.0
miDjmc
:
tbStatusList
:
purModeText
:
stockName
:
tbStatusText
:
pkgType
:
bottleId
:
pkgStatus
:
qty
:
packUnit
:
minSaleQty
:
rfidFlag
:
mfrCodeFlag
:
scanStatus
:
scanId
:
multiChargeFlag
:
useFrequency
:
chargeUnit
:
lockStatus
:
remark
:
hosBatchId
:
settleFlag
:
inStockTime
:
verifyFlag
:
subSendFlag
:
10
id
:
UT240705000215
snCode
:
UT240705000215
ssccCode
:
'010839000187046528'
pkgCodeSee
:
010112345678901210333112407051725011121UT240705000215
hosGoodsId
:
h034700004462
hosGoodsCode
:
'00004462'
goodsCode
:
'00004462'
goodsName
:
一次性注射器_低值C2g9i
goodsSpec
:
G-31891
goodsMfrsName
:
德国歌德公司 Geuder AG
unit
:
支
purMode
:
10
batchCode
:
'333'
productDate
:
'2024-07-05'
expdtDate
:
'2025-01-11'
pkgDefName
:
'100'
pkgDefQty
:
100.0
stockId
:
9b3e40528eff4ed1bf4ee12b587e00d0
stockName
:
东土城路院区)Gl$!中心库房
areaName
:
自动化测试
areaCode
:
areah03472634
lockStatus
:
0
unitName
:
100支/100
shelfCode
:
areah03472634-2-01-01
shelfNo
:
自动化测试-2-01-01
pkgDefId
:
db284f5e13594188b4aa09a5832293ec
extInfo
:
'{"pkgDefId": "db284f5e13594188b4aa09a5832293ec", "pkgDefQty": 100, "purBillId":
"CG2024070520620"
,
"pkgDefName"
:
"100", "distrBillId": "PSh0347202407050026",
"inStockTime"
:
"2024-07-05 10:21:08", "distrDetailId": "03839280", "certificateCode":
""}'
bottleId
:
pkgType
:
'16'
miDjmc
:
''
miCode
:
''
transferRatio
:
1.0
qty
:
1
shelfKind
:
0
shelfKindName
:
普通货位
provName
:
国药集团公司GxzLS
provId
:
p1e31d
inStockDate
:
mfrCode
:
made
:
德国
price
:
barName
:
100支/100
purModeText
:
低值耗材
codeType
:
16
list_b
:
-
*id001
list_c
:
...
...
data/b5_spd3_core_business_flow/message20
View file @
76b73b13
二级库条码信息
:
list_a
:
-
&id001
id
:
'8800000001075
520
'
snCode
:
'8800000001075
520
'
ssccCode
:
'0108390001870
12
32
5
'
pkgCodeSee
:
'01000000000044
32
1022221124070
4
1725011
0
218800000001075
520
'
hosGoodsId
:
h0347000044
32
hosGoodsCode
:
'000044
32
'
goodsCode
:
'000044
32
'
goodsName
:
高值牙钻机
8hjrB
id
:
'8800000001075
736
'
snCode
:
'8800000001075
736
'
ssccCode
:
'0108390001870
76
32
7
'
pkgCodeSee
:
'01000000000044
61
1022221124070
5
1725011
1
218800000001075
736
'
hosGoodsId
:
h0347000044
61
hosGoodsCode
:
'000044
61
'
goodsCode
:
'000044
61
'
goodsName
:
高值牙钻机
rY4w$
goodsSpec
:
G-31891
goodsMfrsName
:
德国歌德公司 Geuder AG
unit
:
支
purMode
:
20
batchCode
:
'2222'
productDate
:
'2024-07-0
4
'
expdtDate
:
'2025-01-1
0
'
productDate
:
'2024-07-0
5
'
expdtDate
:
'2025-01-1
1
'
pkgDefName
:
pkgDefQty
:
1.0
stockId
:
a7a5bedfb8a3408fb17c4abdfd9da4d5
stockId
:
6898e3a36c3c4b36bf1ea0648b26cba4
stockName
:
二级检验科002库房
areaName
:
默认库区
areaCode
:
areah0347261
4
areaCode
:
areah034726
3
1
lockStatus
:
0
unitName
:
1支
shelfCode
:
areah0347261
4
-A-01-01
shelfCode
:
areah034726
3
1-A-01-01
shelfNo
:
A01-A-01-01
pkgDefId
:
extInfo
:
'{"pkgDefQty": 1, "distrBillId": "PSh03472024070
4
009
6
", "inStockTime":
"2024-07-0
4
1
2
:
12:4
8", "useFrequency": 1, "distrDetailId": "0383923
6
", "multiChargeFlag":
extInfo
:
'{"pkgDefQty": 1, "distrBillId": "PSh03472024070
5
00
2
9", "inStockTime":
"2024-07-0
5
1
0
:
39:2
8", "useFrequency": 1, "distrDetailId": "038392
8
3", "multiChargeFlag":
0}'
bottleId
:
pkgType
:
'25'
...
...
@@ -38,9 +38,9 @@
qty
:
1
shelfKind
:
0
shelfKindName
:
普通货位
provName
:
国药集团公司
ASrWh
provId
:
p1e
2fe
inStockDate
:
'2024-07-0
4
1
2:12:4
8'
provName
:
国药集团公司
GxzLS
provId
:
p1e
31d
inStockDate
:
'2024-07-0
5
1
0:39:2
8'
mfrCode
:
made
:
德国
price
:
...
...
data/b5_spd3_core_business_flow/message21
View file @
76b73b13
二级库请领产品信息
:
list_a
:
-
&id001
-
hosGoodsId
:
h0347000044
3
3
purMode
:
1
0
-
hosGoodsId
:
h0347000044
6
3
purMode
:
6
0
grantRule
:
id
:
goodsName
:
一次性注射器_低值7QT@(
goodsName
:
新型冠状病毒检测试剂a7oLM
goodsSpec
:
G-31891
mdmGoodsCode
:
'11661
38
6'
goodsCode
:
'000044
3
3'
mdmGoodsCode
:
'11661
41
6'
goodsCode
:
'000044
6
3'
unit
:
支
goodsMfrsName
:
德国歌德公司 Geuder AG
miDjmc
:
''
...
...
@@ -16,32 +16,32 @@
pkgDefName
:
'100'
pkgDefQty
:
100.0
pkgQty
:
qty
:
700.
0
qty
:
0
goodsImg
:
[]
pkgDefId
:
0cef5dc580aa4b5dbe97ce2add7cbb21
pkgDefId
:
fdfa9805e01946bba3c5b8bd487a6dc7
buyPkgQty
:
unitName
:
100支/100
price
:
99.9999
hosId
:
branchId
:
deptId
:
f8324b9a0bff4ed7a43350b91a04426
f
deptId
:
232328e5ceb44b799efba96c512618b
f
deptName
:
areaCode
:
areaName
:
targetDeptId
:
3e559b76a8fc42819e9c1370d488cab8
targetDeptId
:
d5e1acc8708f47a7b152e103204ee4cb
targetDeptName
:
设备科001
targetStockId
:
9
2286fa2798042d6af9879fdaf89c5ad
targetStockName
:
东土城路院区
ftZkF
中心库房
targetStockId
:
9
b3e40528eff4ed1bf4ee12b587e00d0
targetStockName
:
东土城路院区
)Gl$!
中心库房
purchaseFlag
:
1
tempFlag
:
0
grantWay
:
2
grantWay
:
1
deptGoodsStatus
:
codingType
:
0
purModeText
:
低值耗材
goodsGeneralName
:
一次性注射器
provName
:
国药集团公司
ASrWh
noRecPkgQty
:
21.
0
noRecQty
:
2100.
0
purModeText
:
检验试剂
goodsGeneralName
:
检测试剂
provName
:
国药集团公司
GxzLS
noRecPkgQty
:
0
noRecQty
:
0
autoUnpack
:
0
consumeQty
:
consumePkgQty
:
...
...
data/b5_spd3_core_business_flow/message22
View file @
76b73b13
...
...
@@ -2,11 +2,11 @@
list_a
:
-
&id001
-
id
:
2aeb6b71864042b8aece41d819c70542
lastModified
:
'2024-07-05 10:
13
:3
7
'
version
:
0
lastModified
:
'2024-07-05 10:
40
:3
9
'
version
:
1
createTime
:
'2024-07-05 10:13:37'
createUser
:
UID-05
0151
lastModifiedUser
:
UID-05
0151
createUser
:
h0347_
UID-05
1395
lastModifiedUser
:
h0347_
UID-05
1395
stockId
:
6898e3a36c3c4b36bf1ea0648b26cba4
shelfCode
:
areah03472631
shelfName
:
默认库区
...
...
@@ -18,8 +18,8 @@
parentId
:
levelCode
:
tbStatus
:
1
linkman
:
recPhone
:
linkman
:
h0347_UID-051395
recPhone
:
None
delFlag
:
0
shelfNo
:
A01
shelfKind
:
0
...
...
main1/main_text.py
View file @
76b73b13
...
...
@@ -17,6 +17,7 @@ rootPath = os.path.split(curPath)[0] # [0]表示元组中的为一个元素
sys
.
path
.
append
(
rootPath
)
# 将项目的根目录路径添加到环境变量中,然后在cmd命令行中就可以正常运行脚本
import
tkinter
as
tk
from
tkinter
import
*
import
tkinter.messagebox
from
common.run_cmd_script
import
execute_command
pro_path
=
commonFuc
().
get_pro_path2
()
sys
.
path
.
append
(
pro_path
+
r
'/air_case/b5_spd3_core_business_flow/execute.air'
)
...
...
@@ -134,15 +135,34 @@ def main_text():
sys
.
exit
(
0
)
def
del_data
():
# 删除自动化脚本产生的数据
delData
().
Delete_branch_by_id
()
delData
().
Delete_goods_change_info
()
delData
().
Delete_probeInfo_other
()
delData
().
Del_supply_relation
()
delData
().
Delete_business_Data
()
delData
().
Del_reporter_data
()
delData
().
Delete_business_Data_All
()
delData
().
Delete_business_Data_All2
()
print
(
'===================删除垃圾数据完毕============================'
)
result
=
confirm
()
if
result
==
True
:
result1
=
confirm1
()
if
result1
==
True
:
delData
().
Delete_branch_by_id
()
delData
().
Delete_goods_change_info
()
delData
().
Delete_probeInfo_other
()
delData
().
Del_supply_relation
()
delData
().
Delete_business_Data
()
delData
().
Del_reporter_data
()
delData
().
Delete_business_Data_All
()
delData
().
Delete_business_Data_All2
()
print
(
'===================删除垃圾数据完毕============================'
)
else
:
print
(
'Cancel'
)
def
confirm
():
result
=
tkinter
.
messagebox
.
askokcancel
(
"确认"
,
"您确定要执行此操作吗?"
)
# print(result)
print
(
"用户选择了:"
,
"OK"
if
result
else
"Cancel"
)
return
result
def
confirm1
():
result
=
tkinter
.
messagebox
.
askokcancel
(
"再次确认"
,
"您确定要执行此删除操作吗?数据删除后不可逆."
)
# print(result)
print
(
"用户选择了:"
,
"OK"
if
result
else
"Cancel"
)
return
result
# 文本显示的位置。
Button
(
root
,
text
=
'流程一'
,
width
=
8
,
height
=
4
,
command
=
flow1
).
grid
(
row
=
2
,
column
=
0
)
Button
(
root
,
text
=
'流程二'
,
anchor
=
'center'
,
width
=
8
,
height
=
4
,
command
=
flow2
).
grid
(
row
=
2
,
column
=
2
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment