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
0a3e9f95
Commit
0a3e9f95
authored
May 28, 2024
by
xiao-hesheng
Browse files
流程十一脚本编写
parent
3e8d5a21
Changes
4
Hide whitespace changes
Inline
Side-by-side
air_case/b5_spd3_core_business_flow/a_b4流程十一请领业务流_二级库向直送.air/a_b4流程十一请领业务流_二级库向直送.py
View file @
0a3e9f95
...
...
@@ -21,7 +21,7 @@ python runner_test.py tag id2302-14 debug mdm3
def
SERACH_goods_id
(
GoodsId
):
#在请领出库渠道边仓中搜索产品
#
在请领出库渠道边仓中搜索产品
module
=
'b5_spd3_core_business_flow'
# # 登录获取用户id等信息,使用创建的用户登录===========开始
info
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)
...
...
@@ -47,7 +47,7 @@ def SERACH_goods_id(GoodsId):
return
branchGoodsId
def
goods_move2
():
#
设置请领出库渠道为直送
def
goods_move2
():
#
设置请领出库渠道为直送
# # 登录获取用户id等信息,使用创建的用户登录===========开始
info
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)
username
=
info
[
'username1'
]
...
...
@@ -230,48 +230,6 @@ def BuyCarSubmit():
currentTaskList
=
commonFuc
().
analysis_json
(
'currentTaskList'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
def
add_logic_stock
():
delData
().
Delete_yb_logic_stock
()
module
=
"b5_spd3_core_business_flow"
# 登录集中管控平台
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_platform
()
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
# #添加云仓===============================================
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"platformService_basic_logic_save_url"
)
print
(
'添加云仓================='
,
url
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload54"
,
get_hosid
(),
get_branch_id
(),
get_branch_id
(),
uxid
,
uxid
,
get_in_userid
(),
get_hosid
(),
uxid
,
uxid
)
print
(
'添加云仓'
,
'request_body'
,
request_body
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'添加云仓,result'
,
result
)
def
cloud_stock_opeartion
():
print
(
'云仓处理'
)
# 云仓登录
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_logic_stock
()
module
=
"b5_spd3_core_business_flow"
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
# #云仓处理查看单据===============================================
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"platformService_basic_logic_save_url"
)
print
(
'云仓处理查看单据================='
,
url
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload54"
,
get_hosid
(),
get_branch_id
(),
get_branch_id
(),
uxid
,
uxid
,
get_in_userid
(),
get_hosid
(),
uxid
,
uxid
)
print
(
'云仓处理查看单据'
,
'request_body'
,
request_body
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'云仓处理查看单据,result'
,
result
)
def
add_dept2
():
module
=
'b2_herp3_bs'
# 内网登录
...
...
@@ -347,28 +305,26 @@ def add_new_deptinfo():
try
:
add_dept2
()
# 新增一个二级科室
add_new_deptinfo
()
# 写入科室信息到文件中
grants_user_new
()
#新增授权
set_dept_user
(
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室id"
,
'message6'
)[
'deptid5'
],
FileUtils
().
r_info8
(
"b2_herp3_bs"
,
"所有科室name"
,
'message6'
)[
'deptid5'
],
2
)
set_dept_lead_new
(
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid5"
])
# 设置二级科室负责人
goods_move2
()
# 设置产品出库渠道为直送
# # 科室必须同步到外网,集中管控平台创建边仓才能选择到用户,"deptType":"0"
# add_logic_stock()
#
# # 设置产品出库渠道为边仓
# goods_move()
# updateUserLoginDefaultRange(get_listUserMgrRangePage(2)) # 设置登录账号默认权限是二级库
#
# # # # 低值
# 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", "产品审核信息", 'message1')['hosGoodsId'], 2)
# # # 试剂
# second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId'], 3)
# BuyCarSubmit() # 请领车提交
# for i in range(6): # 三个单据共审批6次
# approval_center()
# add_dept2() # 新增一个二级科室
# add_new_deptinfo() # 写入科室信息到文件中
# grants_user_new() #新增授权
# 设置部门用户
# set_dept_user(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5'],FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid5'],2)
# 设置部门负责人
# set_dept_lead_new(FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid5"]) # 设置二级科室负责人
goods_move2
()
# 设置产品出库渠道为直送
updateUserLoginDefaultRange
(
get_listUserMgrRangePage
(
2
))
# 设置登录账号默认权限是二级库
# # 低值
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"
,
"产品审核信息"
,
'message1'
)[
'hosGoodsId'
],
2
)
# # 试剂
second_dept_Request
(
FileUtils
().
r_info8
(
"b5_spd3_core_business_flow"
,
"产品审核信息"
,
'message3'
)[
'hosGoodsId'
],
3
)
BuyCarSubmit
()
# 请领车提交
for
i
in
range
(
6
):
#三个单据共审批6次
approval_center
()
# 采购模块处理
commonFuc
().
check_text_exist_result_text
(
'succees'
,
'succees'
)
except
:
commonFuc
().
check_text_exist_result_text
(
'error'
,
'1'
)
air_case/public1/public1/public1.py
View file @
0a3e9f95
...
...
@@ -508,7 +508,8 @@ def call_login(type=1): # type=1外网登录 2内网登录
token1
,
projectCode1
,
uxid1
,
corpId1
,
info1
=
login
(
username
,
password
,
2
)
return
token1
,
projectCode1
,
uxid1
,
corpId1
,
info1
def
get_udi1
(
type
=
1
):
#库存明细查询获取条码
def
get_udi1
(
type
=
1
):
# 库存明细查询获取条码
# type=1低值 2高值 3试剂
module
=
"b5_spd3_core_business_flow"
token
,
projectCode1
,
uxid1
,
corpId1
,
info1
=
call_login
()
...
...
@@ -547,10 +548,10 @@ def get_udi1(type=1):#库存明细查询获取条码
# 013530000003170010333\x1D112404261724110221UT240426000001802
# print('aaaaaaaaaaaaaaaaa', data1[0]['pkgCodeSee'])
# pkgcode='pkgcode'
print
(
'条码库存result'
,
result
)
print
(
'条码库存result'
,
result
)
for
i
in
data1
:
lockStatus
=
commonFuc
().
analysis_json
(
'lockStatus'
,
i
)
lockStatus
=
commonFuc
().
analysis_json
(
'lockStatus'
,
i
)
if
lockStatus
==
0
:
print
(
'lockStatus'
,
lockStatus
)
pkgCodeSee
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
i
)
...
...
@@ -592,7 +593,9 @@ def get_udi1(type=1):#库存明细查询获取条码
# continue
# print('pkgcode',pkgcode)
# return pkgcode
def
get_udi
(
type
=
1
):
#退货出库扫条码
def
get_udi
(
type
=
1
):
# 退货出库扫条码
# type=1低值 2高值 3试剂
module
=
"b5_spd3_core_business_flow"
token
,
projectCode1
,
uxid1
,
corpId1
,
info1
=
call_login
()
...
...
@@ -623,14 +626,15 @@ def get_udi(type=1):#退货出库扫条码
# # # # 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
data1
=
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
pkgCodeSee
=
'pkgCodeSee'
;
pkgcode
=
'pkgcode'
pkgCodeSee
=
'pkgCodeSee'
;
pkgcode
=
'pkgcode'
for
i
in
data1
:
lockStatus
=
commonFuc
().
analysis_json
(
'lockStatus'
,
i
)
if
lockStatus
==
0
:
pkgCodeSee
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
i
)
pkgcode
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
i
)
lockStatus
=
commonFuc
().
analysis_json
(
'lockStatus'
,
i
)
if
lockStatus
==
0
:
pkgCodeSee
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
i
)
pkgcode
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
i
)
break
elif
lockStatus
==
1
:
elif
lockStatus
==
1
:
continue
# pkgcode = data1[0]['pkgCodeSee']
# pkgcode1 = pkgcode[0:20]
...
...
@@ -664,6 +668,7 @@ def get_udi(type=1):#退货出库扫条码
FileUtils
().
w_info8
(
info
,
module
,
'条码信息'
,
titlename
,
'message18'
)
return
pkgcode
def
invoice
(
type
=
1
,
OBh_ID
=
'OBhxxxxxxxxxxxxxxx'
):
# # 登录获取用户id等信息,使用创建的用户登录===========开始
info
=
FileUtils
().
r_info8
(
'b5_spd3_core_business_flow'
,
"供货关系申请2"
,
'message'
)
...
...
@@ -928,19 +933,17 @@ def invoice(type=1, OBh_ID='OBhxxxxxxxxxxxxxxx'):
except
:
continue
print
(
'result'
,
'内网发票核对'
,
result
)
data1
=
commonFuc
().
analysis_json
(
'data'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
version
=
commonFuc
().
analysis_json
(
'version'
,
data1
)
version
=
commonFuc
().
analysis_json
(
'version'
,
data1
)
for
i
in
data1
:
id
=
commonFuc
().
analysis_json
(
'id'
,
i
)
if
id
==
id1
:
VI_id
=
id1
break
print
(
'id1'
,
id1
,
'VI_id'
,
VI_id
)
print
(
'id1'
,
id1
,
'VI_id'
,
VI_id
)
print
(
'version'
,
version
)
# ==============发票列表查询
...
...
@@ -949,13 +952,13 @@ def invoice(type=1, OBh_ID='OBhxxxxxxxxxxxxxxx'):
"mcmsInvoice_invoiceUpdateStatusList_url"
)
print
(
'发票核对提交url'
,
url
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload10"
,
id1
,
version
,
get_hosid
())
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload10"
,
id1
,
version
,
get_hosid
())
print
(
'发票核对提交request_body'
,
request_body
)
while
True
:
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
if
code
==
0
:
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
if
code
==
0
:
break
else
:
time
.
sleep
(
6
)
...
...
@@ -987,8 +990,8 @@ def invoice(type=1, OBh_ID='OBhxxxxxxxxxxxxxxx'):
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"mcmsInvoice_invoiceUpdateStatusList_url"
)
print
(
'url'
,
url
)
version2
=
int
(
version
)
+
1
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload12"
,
VI_id2
,
version2
,
get_hosid
())
version2
=
int
(
version
)
+
1
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload12"
,
VI_id2
,
version2
,
get_hosid
())
print
(
'request_body'
,
request_body
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
'发票提交,下一步归档'
,
result
)
...
...
@@ -1019,8 +1022,8 @@ def invoice(type=1, OBh_ID='OBhxxxxxxxxxxxxxxx'):
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"mcmsInvoice_invoiceUpdateStatusList_url"
)
print
(
'url'
,
url
)
version3
=
int
(
version2
)
+
1
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload14"
,
VI_id3
,
version3
,
get_hosid
())
version3
=
int
(
version2
)
+
1
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload14"
,
VI_id3
,
version3
,
get_hosid
())
print
(
'request_body'
,
request_body
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
'发票归档提交,下一步付款'
,
result
)
...
...
@@ -1051,7 +1054,7 @@ def invoice(type=1, OBh_ID='OBhxxxxxxxxxxxxxxx'):
"mcmsInvoice_genPaymentBills_url"
)
print
(
'url'
,
url
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload16"
,
VI_id4
,
get_hosid
())
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload16"
,
VI_id4
,
get_hosid
())
print
(
'request_body'
,
request_body
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
'付款提交'
,
result
)
...
...
@@ -2121,7 +2124,8 @@ def set_stockShelf_Linkman():
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'resultbbbbbbbbbbb'
,
result
)
def
pickScan
(
PICK_ID
,
udi_code
,
type
=
1
):
#拣货扫码
def
pickScan
(
PICK_ID
,
udi_code
,
type
=
1
):
# 拣货扫码
module
=
"b5_spd3_core_business_flow"
# # 登录获取用户id等信息,使用创建的用户登录===========开始
info
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)
...
...
@@ -2134,75 +2138,77 @@ def pickScan(PICK_ID,udi_code,type=1):#拣货扫码
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
#==============================获取条码信息
#
==============================获取条码信息
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"herpService_hdiBarcode_scan_url"
)
url
=
url
+
udi_code
url
=
url
+
udi_code
print
(
'获取条码信息url'
,
url
)
result
=
commonFuc
().
http_get
(
url
,
headers
)
print
(
'获取条码信息'
,
result
)
#获取必要信息
data1
=
commonFuc
().
analysis_json
(
'data'
,
result
)
areaCode
=
commonFuc
().
analysis_json
(
'areaCode'
,
data1
)
UTid
=
commonFuc
().
analysis_json
(
'id'
,
data1
)
createTime
=
commonFuc
().
analysis_json
(
'id'
,
data1
)
stockId
=
commonFuc
().
analysis_json
(
'stockId'
,
data1
)
areaCode
=
commonFuc
().
analysis_json
(
'areaCode'
,
data1
)
areaName
=
commonFuc
().
analysis_json
(
'areaName'
,
data1
)
shelfCode
=
commonFuc
().
analysis_json
(
'shelfCode'
,
data1
)
codeType
=
commonFuc
().
analysis_json
(
'codeType'
,
data1
)
tagType
=
commonFuc
().
analysis_json
(
'tagType'
,
data1
)
hosGoodsId
=
commonFuc
().
analysis_json
(
'hosGoodsId'
,
data1
)
mdmGoodsCode
=
commonFuc
().
analysis_json
(
'mdmGoodsCode'
,
data1
)
goodsCode
=
commonFuc
().
analysis_json
(
'goodsCode'
,
data1
)
goodsDi
=
commonFuc
().
analysis_json
(
'goodsDi'
,
data1
)
barName
=
commonFuc
().
analysis_json
(
'barName'
,
data1
)
batchCode
=
commonFuc
().
analysis_json
(
'batchCode'
,
data1
)
expdtDate
=
commonFuc
().
analysis_json
(
'expdtDate'
,
data1
)
productDate
=
commonFuc
().
analysis_json
(
'productDate'
,
data1
)
pkgCode
=
commonFuc
().
analysis_json
(
'pkgCode'
,
data1
)
pkgCodeSee
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
data1
)
ssccCode
=
commonFuc
().
analysis_json
(
'ssccCode'
,
data1
)
tbStatus
=
commonFuc
().
analysis_json
(
'tbStatus'
,
data1
)
ext
=
commonFuc
().
analysis_json
(
'ext'
,
data1
)
distrDetailId
=
commonFuc
().
analysis_json
(
'distrDetailId'
,
ext
)
distrBillId
=
commonFuc
().
analysis_json
(
'distrBillId'
,
ext
)
purBillId
=
commonFuc
().
analysis_json
(
'purBillId'
,
ext
)
pkgDefQty
=
commonFuc
().
analysis_json
(
'pkgDefQty'
,
ext
)
pkgDefId
=
commonFuc
().
analysis_json
(
'pkgDefId'
,
ext
)
pkgDefName
=
commonFuc
().
analysis_json
(
'pkgDefName'
,
ext
)
purMode
=
commonFuc
().
analysis_json
(
'purMode'
,
data1
)
goodsMfrsName
=
commonFuc
().
analysis_json
(
'goodsMfrsName'
,
data1
)
goodsSpec
=
commonFuc
().
analysis_json
(
'goodsSpec'
,
data1
)
unit
=
commonFuc
().
analysis_json
(
'unit'
,
data1
)
goodsName
=
commonFuc
().
analysis_json
(
'goodsName'
,
data1
)
pkgDefId
=
commonFuc
().
analysis_json
(
'pkgDefId'
,
data1
)
#
获取必要信息
data1
=
commonFuc
().
analysis_json
(
'data'
,
result
)
areaCode
=
commonFuc
().
analysis_json
(
'areaCode'
,
data1
)
UTid
=
commonFuc
().
analysis_json
(
'id'
,
data1
)
createTime
=
commonFuc
().
analysis_json
(
'id'
,
data1
)
stockId
=
commonFuc
().
analysis_json
(
'stockId'
,
data1
)
areaCode
=
commonFuc
().
analysis_json
(
'areaCode'
,
data1
)
areaName
=
commonFuc
().
analysis_json
(
'areaName'
,
data1
)
shelfCode
=
commonFuc
().
analysis_json
(
'shelfCode'
,
data1
)
codeType
=
commonFuc
().
analysis_json
(
'codeType'
,
data1
)
tagType
=
commonFuc
().
analysis_json
(
'tagType'
,
data1
)
hosGoodsId
=
commonFuc
().
analysis_json
(
'hosGoodsId'
,
data1
)
mdmGoodsCode
=
commonFuc
().
analysis_json
(
'mdmGoodsCode'
,
data1
)
goodsCode
=
commonFuc
().
analysis_json
(
'goodsCode'
,
data1
)
goodsDi
=
commonFuc
().
analysis_json
(
'goodsDi'
,
data1
)
barName
=
commonFuc
().
analysis_json
(
'barName'
,
data1
)
batchCode
=
commonFuc
().
analysis_json
(
'batchCode'
,
data1
)
expdtDate
=
commonFuc
().
analysis_json
(
'expdtDate'
,
data1
)
productDate
=
commonFuc
().
analysis_json
(
'productDate'
,
data1
)
pkgCode
=
commonFuc
().
analysis_json
(
'pkgCode'
,
data1
)
pkgCodeSee
=
commonFuc
().
analysis_json
(
'pkgCodeSee'
,
data1
)
ssccCode
=
commonFuc
().
analysis_json
(
'ssccCode'
,
data1
)
tbStatus
=
commonFuc
().
analysis_json
(
'tbStatus'
,
data1
)
ext
=
commonFuc
().
analysis_json
(
'ext'
,
data1
)
distrDetailId
=
commonFuc
().
analysis_json
(
'distrDetailId'
,
ext
)
distrBillId
=
commonFuc
().
analysis_json
(
'distrBillId'
,
ext
)
purBillId
=
commonFuc
().
analysis_json
(
'purBillId'
,
ext
)
pkgDefQty
=
commonFuc
().
analysis_json
(
'pkgDefQty'
,
ext
)
pkgDefId
=
commonFuc
().
analysis_json
(
'pkgDefId'
,
ext
)
pkgDefName
=
commonFuc
().
analysis_json
(
'pkgDefName'
,
ext
)
purMode
=
commonFuc
().
analysis_json
(
'purMode'
,
data1
)
goodsMfrsName
=
commonFuc
().
analysis_json
(
'goodsMfrsName'
,
data1
)
goodsSpec
=
commonFuc
().
analysis_json
(
'goodsSpec'
,
data1
)
unit
=
commonFuc
().
analysis_json
(
'unit'
,
data1
)
goodsName
=
commonFuc
().
analysis_json
(
'goodsName'
,
data1
)
pkgDefId
=
commonFuc
().
analysis_json
(
'pkgDefId'
,
data1
)
# pkgDefQty=commonFuc().analysis_json('pkgDefQty',data1)
pkgDefName
=
commonFuc
().
analysis_json
(
'pkgDefName'
,
data1
)
printNum
=
commonFuc
().
analysis_json
(
'printNum'
,
data1
)
made
=
commonFuc
().
analysis_json
(
'made'
,
data1
)
hosGoodsCode
=
commonFuc
().
analysis_json
(
'hosGoodsCode'
,
data1
)
stockName
=
commonFuc
().
analysis_json
(
'stockName'
,
data1
)
pkgDefName
=
commonFuc
().
analysis_json
(
'pkgDefName'
,
data1
)
printNum
=
commonFuc
().
analysis_json
(
'printNum'
,
data1
)
made
=
commonFuc
().
analysis_json
(
'made'
,
data1
)
hosGoodsCode
=
commonFuc
().
analysis_json
(
'hosGoodsCode'
,
data1
)
stockName
=
commonFuc
().
analysis_json
(
'stockName'
,
data1
)
# ==============================获取条码信息
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"herpService_BuyPick_pickScan_url"
)
print
(
'url'
,
url
)
deptid1
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室id'
,
'message6'
)[
"deptid1"
]
deptName
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
'所有科室name'
,
'message6'
)[
"deptid1"
]
stockName
=
get_branch_name
()
createTime
=
timeUtils
().
get_time_hms
(
1
)
stockName
=
get_branch_name
()
createTime
=
timeUtils
().
get_time_hms
(
1
)
# # 请求体
if
type
==
1
:
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload50"
,
areaCode
,
UTid
,
createTime
,
UTid
,
get_hosid
(),
stockId
,
if
type
==
1
:
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload50"
,
areaCode
,
UTid
,
createTime
,
UTid
,
get_hosid
(),
stockId
,
areaCode
,
areaName
,
shelfCode
,
codeType
,
tagType
,
hosGoodsId
,
mdmGoodsCode
,
goodsCode
,
goodsDi
,
barName
,
batchCode
,
expdtDate
,
productDate
,
pkgCode
,
pkgCodeSee
,
ssccCode
,
tbStatus
,
distrDetailId
,
productDate
,
pkgCode
,
pkgCodeSee
,
ssccCode
,
tbStatus
,
distrDetailId
,
distrBillId
,
purBillId
,
pkgDefQty
,
pkgDefId
,
pkgDefName
,
purMode
,
goodsMfrsName
,
goodsSpec
,
unit
,
goodsName
,
pkgDefId
,
pkgDefQty
,
pkgDefName
,
printNum
,
made
,
hosGoodsCode
,
PICK_ID
,
areaName
,
stockName
)
elif
type
==
2
:
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload50_2"
,
areaCode
,
UTid
,
createTime
,
UTid
,
get_hosid
(),
hosGoodsCode
,
PICK_ID
,
areaName
,
stockName
)
elif
type
==
2
:
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload50_2"
,
areaCode
,
UTid
,
createTime
,
UTid
,
get_hosid
(),
stockId
,
areaCode
,
areaName
,
shelfCode
,
codeType
,
tagType
,
hosGoodsId
,
mdmGoodsCode
,
goodsCode
,
goodsDi
,
barName
,
batchCode
,
expdtDate
,
...
...
@@ -2212,7 +2218,7 @@ def pickScan(PICK_ID,udi_code,type=1):#拣货扫码
goodsMfrsName
,
goodsSpec
,
unit
,
goodsName
,
printNum
,
made
,
hosGoodsCode
,
PICK_ID
,
areaName
,
stockName
)
elif
type
==
3
:
elif
type
==
3
:
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload50"
,
areaCode
,
UTid
,
createTime
,
UTid
,
get_hosid
(),
stockId
,
areaCode
,
areaName
,
shelfCode
,
codeType
,
tagType
,
hosGoodsId
,
...
...
@@ -2232,10 +2238,12 @@ def pickScan(PICK_ID,udi_code,type=1):#拣货扫码
print
(
'result'
,
result
)
PICK_ID
=
commonFuc
().
analysis_json
(
'data'
,
result
)
def
get_branch_name
():
return
FileUtils
().
r_info
(
'b2_herp3_bs'
,
'院区新增'
)[
"branch_name"
]
def
out_warehouse_review
(
PICK_ID
):
#出库复核
def
out_warehouse_review
(
PICK_ID
):
# 出库复核
module
=
"b5_spd3_core_business_flow"
# # 登录获取用户id等信息,使用创建的用户登录===========开始
info
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)
...
...
@@ -2251,7 +2259,7 @@ def out_warehouse_review(PICK_ID):#出库复核
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
#从文件中获取必要信息
#
从文件中获取必要信息
info
=
FileUtils
().
r_info8
(
module
,
"条码信息"
,
'message18'
)
# print('info', info)
list_a
=
info
[
'list_a'
]
...
...
@@ -2369,12 +2377,12 @@ def out_warehouse_review(PICK_ID):#出库复核
UT_id
=
commonFuc
().
analysis_json
(
'id'
,
data
)
createTime
=
commonFuc
().
analysis_json
(
'createTime'
,
data
)
snCode
=
commonFuc
().
analysis_json
(
'snCode'
,
data
)
tbStatus
=
commonFuc
().
analysis_json
(
'tbStatus'
,
data
)
tagType
=
commonFuc
().
analysis_json
(
'tagType'
,
data
)
goodsDi
=
commonFuc
().
analysis_json
(
'goodsDi'
,
data
)
distrBillId
=
commonFuc
().
analysis_json
(
'distrBillId'
,
commonFuc
().
analysis_json
(
'ext'
,
data
))
purBillId
=
commonFuc
().
analysis_json
(
'purBillId'
,
commonFuc
().
analysis_json
(
'ext'
,
data
))
distrDetailId
=
commonFuc
().
analysis_json
(
'distrDetailId'
,
commonFuc
().
analysis_json
(
'ext'
,
data
))
tbStatus
=
commonFuc
().
analysis_json
(
'tbStatus'
,
data
)
tagType
=
commonFuc
().
analysis_json
(
'tagType'
,
data
)
goodsDi
=
commonFuc
().
analysis_json
(
'goodsDi'
,
data
)
distrBillId
=
commonFuc
().
analysis_json
(
'distrBillId'
,
commonFuc
().
analysis_json
(
'ext'
,
data
))
purBillId
=
commonFuc
().
analysis_json
(
'purBillId'
,
commonFuc
().
analysis_json
(
'ext'
,
data
))
distrDetailId
=
commonFuc
().
analysis_json
(
'distrDetailId'
,
commonFuc
().
analysis_json
(
'ext'
,
data
))
print
(
UT_id
)
# ========================扫码复核
# ========出库复核提交==========
...
...
@@ -2383,7 +2391,7 @@ def out_warehouse_review(PICK_ID):#出库复核
print
(
'url'
,
url
)
# sourceId = ' '.join(PICK_ID)
sourceId
=
PICK_ID
sourceId
=
PICK_ID
# 请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload21"
,
UT_id
,
createTime
,
snCode
,
hosId
,
stockId
,
areaCode
,
areaName
,
shelfCode
,
codeType
,
tagType
,
hosGoodsId
,
...
...
@@ -2398,6 +2406,7 @@ def out_warehouse_review(PICK_ID):#出库复核
print
(
'herpService_stock_review_pass_submit_urlresult'
,
result
)
# ========出库复核提交
def
second_dept_one_key_in
():
updateUserLoginDefaultRange
(
get_listUserMgrRangePage
(
2
))
# 设置登录账号默认权限是二级库
module
=
"b5_spd3_core_business_flow"
...
...
@@ -2477,6 +2486,8 @@ def second_dept_one_key_in():
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'一键入库result'
,
result
)
# 一键入库====================================================
def
login_platform
():
module
=
"a3_mdm3_hs"
from
air_case.mdm_login.登录外网系统.登录资源管控平台
import
login_system
...
...
@@ -2487,6 +2498,8 @@ def login_platform():
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
return
token
,
projectCode
,
uxid
,
corpId
,
info
def
login_logic_stock
():
module
=
"b5_spd3_core_business_flow"
from
air_case.mdm_login.登录外网系统.登录云仓
import
login_system
...
...
@@ -2500,38 +2513,42 @@ def login_logic_stock():
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
return
token
,
projectCode
,
uxid
,
corpId
,
info
def
branch_add
():
module
=
"b2_herp3_bs"
#内网登录
#
内网登录
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
# print('医院名称',username)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
# print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# 获取token和projectCode
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
token
,
projectCode
,
uxid
,
corpId
,
info
=
login_system
(
username
,
password
).
get_token
()
# print( token,projectCode,uxid,corpId,info)
#a4_院区新增
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"insert_url"
)
print
(
'a4_院区新增'
,
url
)
#
a4_院区新增
url
=
commonFuc
().
get_api_add_port_url
()
+
commonFuc
().
get_business_data
(
module
,
"insert_url"
)
print
(
'a4_院区新增'
,
url
)
# 获取请求头信息
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers2"
,
commonFuc
().
get_business_data
(
module
,
"json_contentType"
),
token
,
commonFuc
().
get_business_data
(
module
,
"X-APP-CODE"
))
name
=
timeUtils
().
get_time_hms
(
5
)
#请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload"
,
name
,
name
)
name
=
timeUtils
().
get_time_hms
(
5
)
#
请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload"
,
name
,
name
)
# 发送请求
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
result
=
commonFuc
().
http_post
(
url
,
request_body
,
headers
)
print
(
'result'
,
result
)
#断言
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
commonFuc
().
check_text_exist
(
0
,
result
)
id1
=
commonFuc
().
analysis_json
(
'id'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
name
=
commonFuc
().
analysis_json
(
'name'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
#
断言
code
=
commonFuc
().
analysis_json
(
'code'
,
result
)
commonFuc
().
check_text_exist
(
0
,
result
)
id1
=
commonFuc
().
analysis_json
(
'id'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
name
=
commonFuc
().
analysis_json
(
'name'
,
commonFuc
().
analysis_json
(
'data'
,
result
))
# print(id1,name,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
return
id1
,
name
return
id1
,
name
def
get_in_userid
():
# # 登录获取用户id等信息,使用创建的用户登录===========开始
info
=
FileUtils
().
r_info8
(
'b2_herp3_bs'
,
"用户名信息"
,
'message3'
)
...
...
@@ -2543,6 +2560,7 @@ def get_in_userid():
# 登录获取用户id等信息,使用创建的用户登录============结束
return
uxid
def
set_dept_lead_new
(
dept2_id
):
# 设置新增的二级科室负责人
module
=
'b2_herp3_bs'
username
=
FileUtils
().
r_info8
(
module
,
'用户名信息'
,
'message3'
)[
"username1"
]
...
...
@@ -2581,6 +2599,7 @@ def set_dept_lead_new(dept2_id): # 设置新增的二级科室负责人
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
def
grants_user_new
():
module
=
"b2_herp3_bs"
# 登录获取用户id等信息,使用创建的用户登录===========开始
...
...
@@ -2612,15 +2631,17 @@ def grants_user_new():
userId
=
uxid1
mgrBranchId
=
FileUtils
().
r_info
(
module
,
'院区新增'
)[
"branch_id"
]
mgrBranchName
=
FileUtils
().
r_info
(
module
,
'院区新增'
)[
"branch_name"
]
deptid1
=
FileUtils
().
r_info8
(
module
,
'所有科室id'
,
'message6'
)[
"deptid1"
]
deptid2
=
FileUtils
().
r_info8
(
module
,
'所有科室id'
,
'message6'
)[
"deptid2"
]
deptid3
=
FileUtils
().
r_info8
(
module
,
'所有科室id'
,
'message6'
)[
"deptid3"
]
deptid4
=
FileUtils
().
r_info8
(
module
,
'所有科室id'
,
'message6'
)[
"deptid4"
]
deptid1
=
FileUtils
().
r_info8
(
module
,
'所有科室id'
,
'message6'
)[
"deptid1"
]
deptid2
=
FileUtils
().
r_info8
(
module
,
'所有科室id'
,
'message6'
)[
"deptid2"
]
deptid3
=
FileUtils
().
r_info8
(
module
,
'所有科室id'
,
'message6'
)[
"deptid3"
]
deptid4
=
FileUtils
().
r_info8
(
module
,
'所有科室id'
,
'message6'
)[
"deptid4"
]
deptid5
=
FileUtils
().
r_info8
(
module
,
'所有科室id'
,
'message6'
)[
"deptid5"
]
# # 请求体
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload63_12_2_2"
,
userId
,
mgrBranchId
,
mgrBranchName
,
deptid1
,
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload63_12_2_2"
,
userId
,
mgrBranchId
,
mgrBranchName
,
deptid1
,
mgrBranchId
,
mgrBranchName
,
deptid2
,
mgrBranchId
,
mgrBranchName
,
deptid3
,
mgrBranchId
,
mgrBranchName
,
deptid4
,
mgrBranchId
,
mgrBranchName
,
deptid5
deptid3
,
mgrBranchId
,
mgrBranchName
,
deptid4
,
mgrBranchId
,
mgrBranchName
,
deptid5
)
print
(
'request_body'
,
request_body
)
# # # # 发送请求
...
...
@@ -2632,4 +2653,4 @@ def grants_user_new():
if
code
==
0
and
data
==
5
:
commonFuc
().
check_text_exist
(
0
,
result
)
else
:
commonFuc
().
check_text_exist
(
'error'
,
result
)
\ No newline at end of file
commonFuc
().
check_text_exist
(
'error'
,
result
)
data/b5_spd3_core_business_flow/message21
View file @
0a3e9f95
...
...
@@ -33,14 +33,14 @@
targetStockName
:
东土城路院区Sn
%
cM中心库房
purchaseFlag
:
1
tempFlag
:
0
grantWay
:
2
grantWay
:
3
deptGoodsStatus
:
codingType
:
0
purModeText
:
检验试剂
goodsGeneralName
:
检测试剂
provName
:
国药集团公司m!4a&
noRecPkgQty
:
0
.0
noRecQty
:
0.0
noRecPkgQty
:
1
.0
noRecQty
:
10
0.0
autoUnpack
:
list_b
:
-
*id001
...
...
report/summary.html
View file @
0a3e9f95
...
...
@@ -77,7 +77,7 @@ setInterval(updateTime, 1000); // 每秒更新一次时间
<tr
width=
"600"
>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
1
</td>
<td
class=
'details-col-elapsed'
>
0分
21
秒
</td>
<td
class=
'details-col-elapsed'
>
0分
50
秒
</td>
<td
class=
"details-col-elapsed"
>
100.0%
</td>
</tr>
</table>
...
...
@@ -93,9 +93,9 @@ setInterval(updateTime, 1000); // 每秒更新一次时间
</tr>
<tr
width=
"600"
>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a_b4流程十一请领业务流_二级库向
二级库
/log.html'
target=
'_blank'
>
a_b4流程十一请领业务流_二级库向
二级库
</a></td>
<td
class=
"details-col-elapsed"
><a
href=
'../log/a_b4流程十一请领业务流_二级库向
直送
/log.html'
target=
'_blank'
>
a_b4流程十一请领业务流_二级库向
直送
</a></td>
<td
class=
"success"
>
成功
</td>
<td
class=
"details-col-elapsed"
>
21.361
</td>
<td
class=
"details-col-elapsed"
>
50.434
</td>
<td
class=
"details-col-elapsed"
>
xiaohesheng
</td>
</tr>
...
...
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