Commit 5869cb84 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

流程十二脚本编写

parent f759dea5
...@@ -19,6 +19,142 @@ case_tag:api,spd_core1,a_b9流程十六退库业务_二级库向一级库退库, ...@@ -19,6 +19,142 @@ case_tag:api,spd_core1,a_b9流程十六退库业务_二级库向一级库退库,
python runner_test.py tag id2302-19 debug mdm3 python runner_test.py tag id2302-19 debug mdm3
""" """
# 入库上架
def putaway():
module = "b5_spd3_core_business_flow"
updateUserLoginDefaultRange(get_listUserMgrRangePage1(1)) # 设置登录账号默认权限是一级库
# # 登录获取用户id等信息,使用创建的用户登录===========开始
info = FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')
# print(info)
username = info['username1']
password = commonFuc().get_business_data("b2_herp3_bs", "password")
# username = '001f90380'
# password='1qaz!QAZ'
print('username,password', username, password)
# # print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
# # 获取token和projectCode
token, projectCode, uxid, corpId, info = login_system(username, password).get_token()
# 登录获取用户id等信息,使用创建的用户登录============结束
# =====================上架入库列表查询==========================
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode)
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, "stock_in_page_url")
print(url)
branch_id = FileUtils().r_info('b2_herp3_bs', '院区新增')["branch_id"]
hosId = branch_id[0:5]
request_body = commonFuc().get_business_data(module, "payload6", branch_id, hosId)
result = commonFuc().http_post(url, request_body, headers)
print('result', result)
data = commonFuc().analysis_json('data', result)
total = commonFuc().analysis_json('total', data)
if total >= 1:
# 将上架入库列表数据写入文件
data = commonFuc().analysis_json('data', result)
data1 = commonFuc().analysis_json('data', data)
list_a = []
list_b = []
list_c = []
list_a.append(data1)
list_b.append(data1)
list_c.append(data1)
# print('list_a', len(list_a), list_a)
info = (list_a, list_b, list_c)
titlename = ('list_a', 'list_b', 'list_c')
# 将验收单详细信息写入到文件中
FileUtils().w_info8(info, 'b5_spd3_core_business_flow', '上架入库列表数据', titlename, 'message16')
# =====================上架入库列表查询==========================
# =============查看验收单详情========================
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, "stock_detail_url")
print('查看验收单详情',url)
deptid1 = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid1"]
areaCode = FileUtils().r_info8('b2_herp3_bs', 'shelfinfo', 'message7')["shelfCode"]
branch_id = FileUtils().r_info('b2_herp3_bs', '院区新增')["branch_id"]
hosId = branch_id[0:5]
# 从message16文件中获取信息
info = FileUtils().r_info8('b5_spd3_core_business_flow', "上架入库列表数据", 'message16')
list_a = info['list_a']
print('list_a', list_a)
sourceId = 'sourceId'
for i in list_a:
for j in i:
sourceId = j['sourceId']
break
# 从message13文件中获取信息
info = FileUtils().r_info8('b5_spd3_core_business_flow', "验收单信息", 'message13')
# print('info', info)
list_a = info['list_a']
print('list_a', list_a)
sourceType = "sourceType"
for i in list_a:
print('i', i)
for j in i:
sourceType = j["sourceType"]
break
request_body = commonFuc().get_business_data(module, "payload4", deptid1, areaCode, hosId, sourceId, sourceType)
print('request_body', 'd', request_body)
result = commonFuc().http_post(url, request_body, headers)
print('result', result)
# 将验收单详情写入文件
data = commonFuc().analysis_json('data', result)
list_a = []
list_b = []
list_c = []
list_a.append(data)
list_b.append(data)
list_c.append(data)
# print('list_a', len(list_a), list_a)
info = (list_a, list_b, list_c)
titlename = ('list_a', 'list_b', 'list_c')
# 将验收单详细信息写入到文件中
FileUtils().w_info8(info, 'b5_spd3_core_business_flow', '验收单库存详情信息', titlename, 'message17')
time.sleep(6)
# ============= # =============查看验收单详情================================================
# ================================入库上架===================
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, "stock_detail_submit_url")
print(url)
viewId = 'viewId'
shelfCode = 'shelfCode'
sourceId = 'sourceId'
sourceType = 'PSD'
sourceVersion = '0'
targetDeptId = deptid1
targetDeptName = 'targetDeptName'
targetAreaCode = 'targetAreaCode'
targetAreaName = 'targetAreaName'
# 从message17文件中获取信息
info = FileUtils().r_info8('b5_spd3_core_business_flow', "验收单库存详情信息", 'message17')
# print('info', info)
list_a = info['list_a']
print('list_a', list_a)
for i in list_a:
print('i', i)
for j in i:
viewId = j["viewId"]
shelfCode = j['shelfCode']
sourceId = j['id']
break
# 从message16文件中获取信息
info = FileUtils().r_info8('b5_spd3_core_business_flow', "上架入库列表数据", 'message16')
list_a = info['list_a']
print('list_a', list_a)
for i in list_a:
for j in i:
sourceId = j['sourceId']
targetAreaName = j['areaName']
targetAreaCode = j['areaCode']
break
request_body = commonFuc().get_business_data(module, "payload5", viewId, shelfCode, sourceId, sourceType,
sourceVersion, targetDeptId,
targetDeptName, targetAreaCode, targetAreaName)
print('request_body', request_body)
time.sleep(3)
result = commonFuc().http_post(url, request_body, headers)
print('result', result)
# ================================入库上架================================
...@@ -426,9 +562,10 @@ def second_dept_return_Out_Stock(type): # 二级库退库出库 ...@@ -426,9 +562,10 @@ def second_dept_return_Out_Stock(type): # 二级库退库出库
try: try:
updateUserLoginDefaultRange(get_listUserMgrRangePage1(2)) # 设置登录账号默认权限是三级库 # updateUserLoginDefaultRange(get_listUserMgrRangePage1(2)) # 设置登录账号默认权限是二级库
second_dept_return_Out_Stock(2) #高值耗材退货出库 # second_dept_return_Out_Stock(2) #高值耗材退货出库
approval_center() # approval_center()#审批
putaway()#中心库上架
# second_dept_return_Out_Stock(1) #低值耗材退货出库 # second_dept_return_Out_Stock(1) #低值耗材退货出库
# second_dept_return_Out_Stock(3) #低值耗材退货出库 # second_dept_return_Out_Stock(3) #低值耗材退货出库
# second_dept_one_key_in(2) # second_dept_one_key_in(2)
......
...@@ -7,13 +7,13 @@ ...@@ -7,13 +7,13 @@
createTime: createTime:
createUser: h0347_UID-051330 createUser: h0347_UID-051330
lastModifiedUser: lastModifiedUser:
billMode: '16' billMode: '20'
recType: recType:
stockKind: stockKind:
purMode: purMode:
sourceId: CHECKh03472024061300002 sourceId: DRh034720240613000121
sourceType: PSD sourceType: CK_TK
sourceVersion: 0 sourceVersion: 1
batchList: batchList:
billRelationJson: billRelationJson:
hosId: h0347 hosId: h0347
...@@ -21,18 +21,18 @@ ...@@ -21,18 +21,18 @@
deptName: deptName:
branchId: h0347-3669 branchId: h0347-3669
branchName: branchName:
taskType: 1 taskType: 2
sourceOrgId: p1e292 sourceOrgId: 7020cc82c12a46e0a8ca998a00bf6760
sourceOrgName: 国药集团公司K19@c sourceOrgName: 二级检验科002
sourceOrderNo: YS240613002 sourceOrderNo: DN20240613000121
taskSourceNo: PSh0347202406130005 taskSourceNo: DN20240613000121
areaCode: areah03472305 areaCode:
areaName: 自动化测试 areaName:
goodsName: goodsName:
goodsGg: goodsGg:
startDate: startDate:
endDate: endDate:
taskDate: '2024-06-13 07:13:00' taskDate: '2024-06-13 15:16:38'
pkgTaskId: pkgTaskId:
pkgFlag: pkgFlag:
remark: '' remark: ''
......
验收单库存详情信息: 验收单库存详情信息:
list_a: list_a:
- &id001 - &id001 []
- id: CHECKh034720240613000020001
lastModified:
version:
createTime:
createUser:
lastModifiedUser:
rowIdx:
purMode: 10
unitName: 100支/100
pid: CHECKh03472024061300002
hosGoodsId: h034700004090
batchCode: '333'
expdtDate: '2024-12-20'
productDate: '2024-06-13'
batchPrice: 99.9999
settlement: 1
batchType: 20
srcBatchId: '03838410'
srcBatchPrice: 99.9999
shelfCode: areah03472305-2-01-01
shelfKind:
barcodeId: UT240613000201
subBarcodeId:
qty: 10000.0
pkgQty: 100
distrId: PSh0347202406130005
distrDetailId: '03838410'
pkgDefQty: 100.0
pkgDefName: '100'
viewId: h0347000040903332024-12-20100支/100
codingType:
batchFlag:
hasSterilize: 0
sterilizeQty:
sterilizePassQty:
sterilizeRejectQty:
orderNo:
sourceDetailId: '03838410'
mdmGoodsCode: '11661038'
goodsCode: '00004090'
tbStatus: 1
billMode: '16'
hosId: h0347
branchId: h0347-3669
purBillId: Ch034720240613000049
provId: p1e292
provName: 国药集团公司K19@c
subSendFlag: 10
exeProvId: p1e292
exeProvName: 国药集团公司K19@c
purDetailId: 4c67058b00ee43af8f633f63d438f9de
goodsName: 一次性注射器_低值6Vcb1
goodsGg: G-31891
mfrsId: mfrs-11229
mfrsName: 德国歌德公司 Geuder AG
made: 德国
unit:
purPrice: 99.9999
pkgDefId: 2a07241891d04de2a01a58fee45711d9
supplyId: 77ab6d5381334a01866ffeab9ad96a82
subProvId: p1e292
subProvName: 国药集团公司K19@c
subPrice: 99.9999
distrPrice: 99.9999
distrPkgQty: 100.0
distrQty: 10000.0
certificateCode: ''
productCertCode:
detailRelationJson:
extInfo:
psiPrice: 99.9999
ext:
goodsGg: G-31891
goodsCode: '00004090'
purMode: 10
goodsName: 一次性注射器_低值6Vcb1
ygptCode: ''
transCond: ''
storageCond: ''
erpCode: '11661038'
ybDefId: ''
purTaskId:
multiChargeFlag:
trustMrfsName:
list_b: list_b:
- *id001 - *id001
list_c: list_c:
......
...@@ -77,7 +77,7 @@ setInterval(updateTime, 1000); // 每秒更新一次时间 ...@@ -77,7 +77,7 @@ setInterval(updateTime, 1000); // 每秒更新一次时间
<tr width="600"> <tr width="600">
<td class='details-col-elapsed'>1</td> <td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>1</td> <td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>0分13</td> <td class='details-col-elapsed'>0分15</td>
<td class="details-col-elapsed">100.0%</td> <td class="details-col-elapsed">100.0%</td>
</tr> </tr>
</table> </table>
...@@ -95,7 +95,7 @@ setInterval(updateTime, 1000); // 每秒更新一次时间 ...@@ -95,7 +95,7 @@ setInterval(updateTime, 1000); // 每秒更新一次时间
<tr width="600"> <tr width="600">
<td class="details-col-elapsed"><a href='../log/a_b9流程十六退库业务_二级库向一级库退库/log.html' target='_blank'>a_b9流程十六退库业务_二级库向一级库退库</a></td> <td class="details-col-elapsed"><a href='../log/a_b9流程十六退库业务_二级库向一级库退库/log.html' target='_blank'>a_b9流程十六退库业务_二级库向一级库退库</a></td>
<td class="success">成功</td> <td class="success">成功</td>
<td class="details-col-elapsed">13.71</td> <td class="details-col-elapsed">15.574</td>
<td class="details-col-elapsed">xiaohesheng</td> <td class="details-col-elapsed">xiaohesheng</td>
</tr> </tr>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment