Commit 40fa4c5f authored by xiao-hesheng's avatar xiao-hesheng
Browse files

优化调整脚本

parent 2f3c5f35
......@@ -281,10 +281,10 @@ def second_dept_consume_Out_Stock(type): # 二级库消耗出库
print('request_body', request_body)
# # # # 发送请求
result = commonFuc().http_post(url, request_body, headers)
print('result', result)
print('低值耗材消耗出库result', result)
elif type == 3:
print('检验试剂消耗出库')
udi_code = get_udi2(4) # 试剂单瓶条码
udi_code = get_udi2(4,token) # 试剂单瓶条码
# 从message18文件中获取信息
info = FileUtils().r_info8(module, "条码信息", 'message18')
data1 = info['list_a']
......@@ -370,7 +370,7 @@ def second_dept_consume_Out_Stock(type): # 二级库消耗出库
result = commonFuc().http_post(url, request_body, headers)
# import pdb
# pdb.set_trace()
print('result', result)
print('检验试剂消耗出库result', result)
def sCan_grant(type=1): # 获取条码and扫码发放高值不能发放
......
......@@ -165,7 +165,7 @@ def second_dept_return_Out_Stock(type): # 二级库退库出库
commonFuc().get_business_data(module, "X-APP-CODE"))
if type == 2:
udi_code = get_udi2(2) # 获取条码 低值1 高值2 试剂3
udi_code = get_udi2(2,token) # 获取条码 低值1 高值2 试剂3
# 高值退库出库
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
......@@ -299,7 +299,7 @@ def second_dept_return_Out_Stock(type): # 二级库退库出库
print('result', result)
elif type == 1:
print('低值耗材或者试剂退库出库')
udi_code = get_udi2(1) # 获取条码 低值1 高值2 试剂3
udi_code = get_udi2(1,token) # 获取条码 低值1 高值2 试剂3
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"herpService_stock_pick_scan_url")
# 从message18文件中获取信息
......@@ -426,7 +426,7 @@ def second_dept_return_Out_Stock(type): # 二级库退库出库
print('低值产品退库出库,result', result)
elif type == 3:
print('试剂产品退库出库')
udi_code = get_udi2(3) # 获取条码 低值1 高值2 试剂3
udi_code = get_udi2(3,token) # 获取条码 低值1 高值2 试剂3
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"herpService_stock_pick_scan_url")
# 从message18文件中获取信息
......
......@@ -165,7 +165,7 @@ def second_dept_return_Out_Stock(type): # 二级库退库出库
commonFuc().get_business_data(module, "X-APP-CODE"))
if type == 2:
udi_code = get_udi2(2) # 获取条码 低值1 高值2 试剂3
udi_code = get_udi2(2,token) # 获取条码 低值1 高值2 试剂3
# 高值退库出库
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
......@@ -299,7 +299,7 @@ def second_dept_return_Out_Stock(type): # 二级库退库出库
print('result', result)
elif type == 1:
print('低值耗材或者试剂退库出库')
udi_code = get_udi2(1) # 获取条码 低值1 高值2 试剂3
udi_code = get_udi2(1,token) # 获取条码 低值1 高值2 试剂3
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"herpService_stock_pick_scan_url")
# 从message18文件中获取信息
......@@ -426,7 +426,7 @@ def second_dept_return_Out_Stock(type): # 二级库退库出库
print('低值产品退库出库,result', result)
elif type == 3:
print('试剂产品退库出库')
udi_code = get_udi2(3) # 获取条码 低值1 高值2 试剂3
udi_code = get_udi2(3,token) # 获取条码 低值1 高值2 试剂3
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"herpService_stock_pick_scan_url")
# 从message18文件中获取信息
......
......@@ -890,28 +890,29 @@ def get_udi3(type=1): # 三级科室库存明细查询获取条码
# # 请求体
request_body = 'request_body'
deptName3 = FileUtils().r_info8('b2_herp3_bs', '所有科室name', 'message6')["deptid3"]
stockId3 = get_stockId(deptName3 + '库房', 3)
stockId3 = get_stockId_fromdb(deptName3 + '库房')
deptid3 = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid3']
areaCode = get_stockAreaId_new_fromDb(deptName3, 2)
if type == 1:
hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message2')['hosGoodsId']
GoodsId = hosGoodsId.replace(get_hosid(), '')
request_body = commonFuc().get_business_data(module, "payload17_2", GoodsId, get_branch_id(), deptid3, stockId3)
request_body = commonFuc().get_business_data(module, "payload17_2", areaCode,GoodsId, get_branch_id(), deptid3, stockId3)
elif type == 2:
hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message1')['hosGoodsId']
GoodsId = hosGoodsId.replace(get_hosid(), '')
request_body = commonFuc().get_business_data(module, "payload17_2_1", GoodsId, get_branch_id(), deptid3,
request_body = commonFuc().get_business_data(module, "payload17_2_1",areaCode, GoodsId, get_branch_id(), deptid3,
stockId3)
elif type == 3:
hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId']
GoodsId = hosGoodsId.replace(get_hosid(), '')
request_body = commonFuc().get_business_data(module, "payload17_2_2", GoodsId, get_branch_id(), deptid3,
request_body = commonFuc().get_business_data(module, "payload17_2_2", areaCode,GoodsId, get_branch_id(), deptid3,
stockId3)
elif type == 4: # 试剂单瓶条码
hosGoodsId = FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId']
GoodsId = hosGoodsId.replace(get_hosid(), '')
request_body = commonFuc().get_business_data(module, "payload17_3", GoodsId, get_branch_id(), deptid3, stockId3)
request_body = commonFuc().get_business_data(module, "payload17_3",areaCode, GoodsId, get_branch_id(), deptid3, stockId3)
print('getudi_request_body', request_body)
# # # # 发送请求
......@@ -2995,8 +2996,8 @@ def pickScan4(udi_code): # 二级库扫码 只扫码不发放
deptid2 = FileUtils().r_info8('b2_herp3_bs', '所有科室id', 'message6')["deptid2"]
deptName = FileUtils().r_info8('b2_herp3_bs', '所有科室name', 'message6')["deptid2"]
stockId = get_stockId(deptName + '库房', 2)
deptName2 = deptName + '库房'
stockId = get_stockId_fromdb(deptName2)
areaCode = get_stockAreaId_new_fromDb(deptName, 2)
request_body = commonFuc().get_business_data(module, "payload60", udi_code, stockId, deptName2, areaCode)
print('获取条码信息request_body', request_body)
......
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