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
d12f968f
Commit
d12f968f
authored
Jul 12, 2024
by
肖 和生
Browse files
Merge remote-tracking branch 'remotes/origin/master' into core_flow
parents
eeb95ef5
900e3a85
Changes
3
Hide whitespace changes
Inline
Side-by-side
air_case/b5_spd3_core_business_flow/a_b4流程十一请领业务流_二级库向直送.air/a_b4流程十一请领业务流_二级库向直送.py
View file @
d12f968f
...
@@ -218,15 +218,15 @@ def BuyCarSubmit():
...
@@ -218,15 +218,15 @@ def BuyCarSubmit():
# 创建领车交易=================================================
# 创建领车交易=================================================
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"herpService_buy_createBuyBill_url"
)
"herpService_buy_createBuyBill_url"
)
print
(
'创建领车交易================='
,
url
)
print
(
'创建
请
领车交易================='
,
url
)
billExpdtDate
=
timeUtils
().
get_time_add
(
30
,
2
)
billExpdtDate
=
timeUtils
().
get_time_add
(
30
,
2
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload44"
,
billExpdtDate
,
get_branch_id
(),
list_id
[
0
],
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload44"
,
billExpdtDate
,
get_branch_id
(),
list_id
[
0
],
list_id
[
1
],
list_id
[
2
])
list_id
[
1
],
list_id
[
2
])
print
(
'创建领车交易'
,
'request_body'
,
request_body
)
print
(
'创建
请
领车交易'
,
'request_body'
,
request_body
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'创建领车交易,result'
,
result
)
print
(
'创建
请
领车交易,result'
,
result
)
currentTaskList
=
commonFuc
().
analysis_json
(
'currentTaskList'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
currentTaskList
=
commonFuc
().
analysis_json
(
'currentTaskList'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
...
@@ -440,7 +440,7 @@ def order_dp(type=1):
...
@@ -440,7 +440,7 @@ def order_dp(type=1):
# 发送请求
# 发送请求
while
True
:
while
True
:
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
print
(
'
待确认列表查询
result'
,
result
)
# 断言
# 断言
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
...
@@ -588,7 +588,7 @@ def order_dp(type=1):
...
@@ -588,7 +588,7 @@ def order_dp(type=1):
print
(
'request_body'
,
request_body
)
print
(
'request_body'
,
request_body
)
# 发送请求
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
print
(
'
配送提交
result'
,
result
)
# 断言
# 断言
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
data
=
commonFuc
().
analysis_json
(
'data'
,
result
)
...
@@ -835,7 +835,7 @@ def main():
...
@@ -835,7 +835,7 @@ def main():
# 从下面开始,上面的暂时注释
# 从下面开始,上面的暂时注释
goods_move2
()
# 设置产品出库渠道为直送
goods_move2
()
# 设置产品出库渠道为直送
updateUserLoginDefaultRange
(
get_listUserMgrRangePage
(
2
))
# 设置登录账号默认权限是二级库
updateUserLoginDefaultRange
(
get_listUserMgrRangePage
(
2
))
# 设置登录账号默认权限是二级库
for
i
in
range
(
6
):
for
i
in
range
(
1
):
# # 低值
# # 低值
second_dept_Request
(
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"产品审核信息"
,
'message2'
)[
'hosGoodsId'
],
1
)
second_dept_Request
(
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"产品审核信息"
,
'message2'
)[
'hosGoodsId'
],
1
)
# # 高值
# # 高值
...
@@ -847,8 +847,11 @@ def main():
...
@@ -847,8 +847,11 @@ def main():
approval_center
()
approval_center
()
# 采购模块处理
# 采购模块处理
purchase_module_process
()
purchase_module_process
()
for
i
in
range
(
3
):
# 三个单据共审批3次
# 三个单据共审批3次
approval_center
()
approval_center
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号试剂'
,
'message12'
))
approval_center
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号'
,
'message7'
))
approval_center
(
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
'采购计划单号高值'
,
'message11'
))
order_dp
(
1
)
# 1低值
order_dp
(
1
)
# 1低值
order_dp
(
2
)
# 2高值
order_dp
(
2
)
# 2高值
order_dp
(
3
)
# 3试剂
order_dp
(
3
)
# 3试剂
...
...
air_case/b5_spd3_core_business_flow/a_b5流程十二请领业务流_二级库向二级库.air/a_b5流程十二请领业务流_二级库向二级库.py
View file @
d12f968f
...
@@ -5,6 +5,7 @@ import traceback
...
@@ -5,6 +5,7 @@ import traceback
from
air_case.b1_herp3_login.登录内网系统.登录内网系统
import
login_system
from
air_case.b1_herp3_login.登录内网系统.登录内网系统
import
login_system
from
air_case.public1.public1.public1
import
*
from
air_case.public1.public1.public1
import
*
from
common.db.sql.sql_del_branch_info
import
delData
from
common.db.sql.sql_del_branch_info
import
delData
from
common.db.sql.sql_tools
import
get_id
,
process_tuple
from
common.fileUtls
import
FileUtils
from
common.fileUtls
import
FileUtils
from
common.run_cmd_script
import
execute_command
from
common.run_cmd_script
import
execute_command
...
@@ -70,7 +71,8 @@ def second_dept_Request(hosGoodsId, type):
...
@@ -70,7 +71,8 @@ def second_dept_Request(hosGoodsId, type):
# 高值
# 高值
# hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId']
# hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId']
GoodsId
=
hosGoodsId
.
replace
(
get_hosid
(),
''
)
GoodsId
=
hosGoodsId
.
replace
(
get_hosid
(),
''
)
areaCode
=
get_stockAreaId_new
(
deptid2
,
deptname2
,
2
)
# areaCode = get_stockAreaId_new(deptid2, deptname2, 2)
areaCode
=
process_tuple
(
get_id
(
"select shelf_code from mcms_stock_shelf where address='二级科室005'and shelf_name='默认库区'order by create_time desc LIMIT 1;"
))
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload39"
,
GoodsId
,
get_hosid
(),
deptid2
,
areaCode
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload39"
,
GoodsId
,
get_hosid
(),
deptid2
,
areaCode
)
print
(
'我要请领_手工请领_列表查询'
,
'request_body'
,
request_body
)
print
(
'我要请领_手工请领_列表查询'
,
'request_body'
,
request_body
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
...
@@ -96,6 +98,7 @@ def second_dept_Request(hosGoodsId, type):
...
@@ -96,6 +98,7 @@ def second_dept_Request(hosGoodsId, type):
goodsGeneralName
=
commonFuc
().
analysis_json
(
'goodsGeneralName'
,
data1
)
goodsGeneralName
=
commonFuc
().
analysis_json
(
'goodsGeneralName'
,
data1
)
provName
=
commonFuc
().
analysis_json
(
'provName'
,
data1
)
provName
=
commonFuc
().
analysis_json
(
'provName'
,
data1
)
pkgDefId
=
commonFuc
().
analysis_json
(
'pkgDefId'
,
data1
)
pkgDefId
=
commonFuc
().
analysis_json
(
'pkgDefId'
,
data1
)
pkgDefName
=
commonFuc
().
analysis_json
(
'pkgDefName'
,
data1
)
# 信息写入文件
# 信息写入文件
list_a
=
[]
list_a
=
[]
list_b
=
[]
list_b
=
[]
...
@@ -113,22 +116,22 @@ def second_dept_Request(hosGoodsId, type):
...
@@ -113,22 +116,22 @@ def second_dept_Request(hosGoodsId, type):
"herpService_buy_createBuyCar_url"
)
"herpService_buy_createBuyCar_url"
)
print
(
'添加到请领车================='
,
url
)
print
(
'添加到请领车================='
,
url
)
if
type
==
1
:
if
type
==
1
:
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload40"
,
hosGoodsId
,
goodsName
,
goodsSpec
,
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload40"
,
hosGoodsId
,
purMode
,
goodsName
,
goodsSpec
,
mdmGoodsCode
,
mdmGoodsCode
,
goodsCode
,
unit
,
purMode
,
goodsMfrsName
,
pkgDefId
,
unitName
,
price
,
goodsCode
,
unit
,
goodsMfrs
Name
,
pkgDef
Name
,
pkgDefId
,
unitName
,
price
,
deptId
,
deptId
,
areaCode
,
areaName
,
targetDeptId
,
targetDeptName
,
targetStockId
,
areaCode
,
areaName
,
targetDeptId
,
targetDeptName
,
targetStockId
,
targetStockName
,
purModeText
,
goodsGeneralName
,
provName
)
targetStockName
,
purModeText
,
goodsGeneralName
,
provName
)
elif
type
==
2
:
elif
type
==
2
:
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload41"
,
hosGoodsId
,
goodsName
,
goodsSpec
,
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload41"
,
hosGoodsId
,
purMode
,
goodsName
,
goodsSpec
,
mdmGoodsCode
,
mdmGoodsCode
,
goodsCode
,
unit
,
purMode
,
goodsMfrsName
,
unitName
,
price
,
deptId
,
goodsCode
,
unit
,
goodsMfrsName
,
unitName
,
price
,
deptId
,
areaCode
,
areaName
,
targetDeptId
,
targetDeptName
,
targetStockId
,
areaCode
,
areaName
,
targetDeptId
,
targetDeptName
,
targetStockId
,
targetStockName
,
purModeText
,
goodsGeneralName
,
provName
)
targetStockName
,
purModeText
,
goodsGeneralName
,
provName
)
elif
type
==
3
:
elif
type
==
3
:
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload42"
,
hosGoodsId
,
goodsName
,
goodsSpec
,
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload42"
,
hosGoodsId
,
purMode
,
goodsName
,
goodsSpec
,
mdmGoodsCode
,
mdmGoodsCode
,
goodsCode
,
unit
,
purMode
,
goodsMfrsName
,
pkgDefId
,
unitName
,
price
,
goodsCode
,
unit
,
goodsMfrs
Name
,
pkgDef
Name
,
pkgDefId
,
unitName
,
price
,
deptId
,
deptId
,
areaCode
,
areaName
,
targetDeptId
,
targetDeptName
,
targetStockId
,
areaCode
,
areaName
,
targetDeptId
,
targetDeptName
,
targetStockId
,
targetStockName
,
purModeText
,
goodsGeneralName
,
provName
)
targetStockName
,
purModeText
,
goodsGeneralName
,
provName
)
...
...
data/b5_spd3_core_business_flow/data
View file @
d12f968f
...
@@ -138,11 +138,15 @@ json_headers2: {
...
@@ -138,11 +138,15 @@ json_headers2: {
"payload37": {"pageNum":1,"pageSize":50,"queryObject":{"deptId":null,"outStockNo":"","status":null,"branchId":"%s"}}
"payload37": {"pageNum":1,"pageSize":50,"queryObject":{"deptId":null,"outStockNo":"","status":null,"branchId":"%s"}}
"payload38": {"billId":"%s","remark":null,"targetDeptId":"%s","version":0}
"payload38": {"billId":"%s","remark":null,"targetDeptId":"%s","version":0}
"payload39": {"pageNum":1,"pageSize":50,"queryObject":{"goodsName":"%s","goodsSpec":"","purModes":[],"hosId":"%s","deptId":"%s","areaCode":"%s","provName":""}}
"payload39": {"pageNum":1,"pageSize":50,"queryObject":{"goodsName":"%s","goodsSpec":"","purModes":[],"hosId":"%s","deptId":"%s","areaCode":"%s","provName":""}}
"payload40": {"id":null,"hosGoodsId":"%s","goodsName":"%s","goodsSpec":"%s","mdmGoodsCode":"%s","goodsCode":"%s","unit":"%s","purMode":"%s","goodsMfrsName":"%s","miDjmc":"","miCode":"","pkgDefName":"100","pkgDefQty":100,"pkgQty":null,"qty":0,"goodsImg":[],"pkgDefId":"%s","buyPkgQty":1,"unitName":"%s","price":"%s","hosId":null,"branchId":null,"deptId":"%s","deptName":null,"areaCode":"%s","areaName":"%s","targetDeptId":"%s","targetDeptName":"%s","targetStockId":"%s","targetStockName":"%s","purchaseFlag":1,"tempFlag":0,"grantWay":1,"deptGoodsStatus":null,"codingType":null,"purModeText":"%s","goodsGeneralName":"%s","provName":"%s","noRecPkgQty":0,"noRecQty":0,"buyQty":100}
"payload40": {"hosGoodsId":"%s","purMode":"%s","grantRule":null,"id":null,"goodsName":"%s","goodsSpec":"%s","mdmGoodsCode":"%s","goodsCode":"%s","unit":"%s","goodsMfrsName":"%s","miDjmc":"","miCode":"","pkgDefName":"%s","pkgDefQty":100,"pkgQty":null,"qty":100,"goodsImg":[],"pkgDefId":"%s","buyPkgQty":1,"unitName":"%s","price":"%s","hosId":null,"branchId":null,"deptId":"%s","deptName":null,"areaCode":"%s","areaName":"%s","targetDeptId":"%s","targetDeptName":"%s","targetStockId":"%s","targetStockName":"%s","purchaseFlag":1,"tempFlag":0,"grantWay":null,"deptGoodsStatus":null,"codingType":0,"purModeText":"%s","goodsGeneralName":"%s","provName":"%s","noRecPkgQty":1,"noRecQty":100,"autoUnpack":0,"consumeQty":null,"consumePkgQty":null,"buyQty":100}
"payload41": {"id":null,"hosGoodsId":"%s","goodsName":"%s","goodsSpec":"%s","mdmGoodsCode":"%s","goodsCode":"%s","unit":"%s","purMode":"%s","goodsMfrsName":"%s","miDjmc":"","miCode":"","pkgDefName":null,"pkgDefQty":1,"pkgQty":null,"qty":0,"goodsImg":[],"pkgDefId":null,"buyPkgQty":1,"unitName":"%s","price":"%s","hosId":null,"branchId":null,"deptId":"%s","deptName":null,"areaCode":"%s","areaName":"%s","targetDeptId":"%s","targetDeptName":"%s","targetStockId":"%s","targetStockName":"%s","purchaseFlag":1,"tempFlag":0,"grantWay":1,"deptGoodsStatus":null,"codingType":0,"purModeText":"%s","goodsGeneralName":"%s","provName":"%s","noRecPkgQty":0,"noRecQty":0,"buyQty":1}
"payload42": {"id":null,"hosGoodsId":"%s","goodsName":"%s","goodsSpec":"%s","mdmGoodsCode":"%s","goodsCode":"%s","unit":"%s","purMode":"%s","goodsMfrsName":"%s","miDjmc":"","miCode":"","pkgDefName":"100","pkgDefQty":100,"pkgQty":null,"qty":0,"goodsImg":[],"pkgDefId":"%s","buyPkgQty":1,"unitName":"%s","price":"%s","hosId":null,"branchId":null,"deptId":"%s","deptName":null,"areaCode":"%s","areaName":"%s","targetDeptId":"%s","targetDeptName":"%s","targetStockId":"%s","targetStockName":"%s","purchaseFlag":1,"tempFlag":0,"grantWay":1,"deptGoodsStatus":null,"codingType":null,"purModeText":"%s","goodsGeneralName":"%s","provName":"%s","noRecPkgQty":0,"noRecQty":0,"buyQty":100}
"payload41": {"hosGoodsId":"%s","purMode":"%s","grantRule":null,"id":null,"goodsName":"%s","goodsSpec":"%s","mdmGoodsCode":"%s","goodsCode":"%s","unit":"%s","goodsMfrsName":"%s","miDjmc":"","miCode":"","pkgDefName":null,"pkgDefQty":1,"pkgQty":null,"qty":1,"goodsImg":[],"pkgDefId":null,"buyPkgQty":1,"unitName":"%s","price":"%s","hosId":null,"branchId":null,"deptId":"%s","deptName":null,"areaCode":"%s","areaName":"%s","targetDeptId":"%s","targetDeptName":"%s","targetStockId":"%s","targetStockName":"%s","purchaseFlag":1,"tempFlag":0,"grantWay":null,"deptGoodsStatus":null,"codingType":0,"purModeText":"%s","goodsGeneralName":"%s","provName":"%s","noRecPkgQty":0,"noRecQty":0,"autoUnpack":null,"consumeQty":null,"consumePkgQty":null,"buyQty":1}
"payload42": {"hosGoodsId":"%s","purMode":"%s","grantRule":null,"id":null,"goodsName":"%s","goodsSpec":"%s","mdmGoodsCode":"%s","goodsCode":"%s","unit":"%s","goodsMfrsName":"%s","miDjmc":"","miCode":"","pkgDefName":"%s","pkgDefQty":100,"pkgQty":null,"qty":100,"goodsImg":[],"pkgDefId":"%s","buyPkgQty":1,"unitName":"%s","price":"%s","hosId":null,"branchId":null,"deptId":"%s","deptName":null,"areaCode":"%s","areaName":"%s","targetDeptId":"%s","targetDeptName":"%s","targetStockId":"%s","targetStockName":"%s","purchaseFlag":1,"tempFlag":0,"grantWay":null,"deptGoodsStatus":null,"codingType":0,"purModeText":"%s","goodsGeneralName":"%s","provName":"%s","noRecPkgQty":0,"noRecQty":0,"autoUnpack":0,"consumeQty":null,"consumePkgQty":null,"buyQty":100}
"payload43": {"areaCode":"%s","goodsName":"","goodsSpec":"","purModes":[],"hosId":"%s","deptId":"%s"}
"payload43": {"areaCode":"%s","goodsName":"","goodsSpec":"","purModes":[],"hosId":"%s","deptId":"%s"}
"payload44": {"billExpdtDate":"%s","billExpectDate":"","priority":"0","remark":"","branchId":"%s","buyCarIds":["%s","%s","%s"]}
"payload44": {"billExpdtDate":"%s","billExpectDate":"","priority":"0","remark":"","branchId":"%s","buyCarIds":["%s","%s","%s"]}
"payload45": {"dtos":"%s","opinion":1}
"payload45": {"dtos":"%s","opinion":1}
"payload46": {"pageNum":1,"pageSize":50,"queryObject":{"deptId":"","auditStartTime":null,"auditEndTime":null,"startBillExpectDate":null,"endBillExpectDate":null,"priorityList":[],"orderNo":"","keyword":"","goodsSpec":"","shelfName":"","address":""}}
"payload46": {"pageNum":1,"pageSize":50,"queryObject":{"deptId":"","auditStartTime":null,"auditEndTime":null,"startBillExpectDate":null,"endBillExpectDate":null,"priorityList":[],"orderNo":"","keyword":"","goodsSpec":"","shelfName":"","address":""}}
"payload46_1": {"pageNum":1,"pageSize":50,"queryObject":{"orderNo":"","priorityList":[],"branchId":"%s"}}
"payload46_1": {"pageNum":1,"pageSize":50,"queryObject":{"orderNo":"","priorityList":[],"branchId":"%s"}}
...
...
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