Commit 4a2c6fed authored by xiao-hesheng's avatar xiao-hesheng
Browse files

流程九脚本编写

No related merge requests found
Showing with 64 additions and 10 deletions
+64 -10
......@@ -294,7 +294,8 @@ def pick_execute(GoodsId):
print('生成拣货单列表锁定,result1', result)
# 生成拣货单列表锁定===============================================
#拣货==============================
udi_code=get_udi(1) #获取条码 低值1 高值2 试剂3
udi_code=get_udi1(1) #获取条码 低值1 高值2 试剂3
print('udi_code',udi_code)
pickScan(PICK_ID)
# url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
# "herpService_BuyPick_updateLock_url")
......
......@@ -508,8 +508,59 @@ 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):#库存明细查询获取条码
# type=1低值 2高值 3试剂
module = "b5_spd3_core_business_flow"
token, projectCode1, uxid1, corpId1, info1 = call_login()
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, "mcmsInvoice_barcode_url")
print('get_udi', 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"))
def get_udi(type=1):
# # 请求体
request_body = 'request_body'
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", GoodsId, get_branch_id())
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", GoodsId, get_branch_id())
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", GoodsId, get_branch_id())
print('getudi_request_body', request_body)
# # # # 发送请求
result = commonFuc().http_post(url, request_body, headers)
data1 = commonFuc().analysis_json('data', commonFuc().analysis_json('data', result))
pkgcode = data1[0]['pkgCodeSee']
pkgcode1 = pkgcode[0:20]
pkgcode2 = pkgcode[21:len(pkgcode)]
print(pkgcode1, pkgcode2)
# 013530000003170010333\x1D112404261724110221UT240426000001802
print('aaaaaaaaaaaaaaaaa', data1[0]['pkgCodeSee'])
# # 将条码信息写入文件
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, module, '条码信息', titlename, 'message18')
return pkgcode
def get_udi(type=1):#退货出库扫条码
# type=1低值 2高值 3试剂
module = "b5_spd3_core_business_flow"
token, projectCode1, uxid1, corpId1, info1 = call_login()
......@@ -547,7 +598,8 @@ def get_udi(type=1):
print(pkgcode1, pkgcode2)
# 013530000003170010333\x1D112404261724110221UT240426000001802
print('aaaaaaaaaaaaaaaaa', data1[0]['pkgCodeSee'])
# 扫条码
# 退货出库扫条码
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, "herpService_pick_return_scan_url")
print('herpService_pick_return_scan_url', url)
branch_name = FileUtils().r_info('b2_herp3_bs', '院区新增')["branch_name"]
......@@ -2018,7 +2070,7 @@ def pickScan(PICK_ID):#拣货扫码
areaName = 'areaName';
shelfCode = 'shelfCode'
codeType = 'codeType';
tagType = 'tagType';
tagType = '0';
hosGoodsId = 'hosGoodsId';
mdmGoodsCode = 'mdmGoodsCode';
goodsCode = 'goodsCode';
......@@ -2034,13 +2086,13 @@ def pickScan(PICK_ID):#拣货扫码
print(i)
UTid = i['id']
areaCode = i['areaCode']
createTime = i['createTime']
hosId = i['hosId']
# createTime = i['createTime']
# hosId = i['hosId']
stockId = i['stockId'];
areaCode = i['areaCode'];
areaName = i['areaName'];
shelfCode = i['shelfCode']
codeType = i['codeType'];
codeType = i['pkgType'];
tagType = i['tagType'];
hosGoodsId = i['hosGoodsId'];
mdmGoodsCode = i['mdmGoodsCode']
......@@ -2085,8 +2137,9 @@ def pickScan(PICK_ID):#拣货扫码
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)
# # 请求体
request_body = commonFuc().get_business_data(module, "payload50", areaCode, UTid, createTime, UTid, hosId, stockId,
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,
......
......@@ -56,7 +56,7 @@
<tr width="600">
<td class='details-col-elapsed'>1</td>
<td class='details-col-elapsed'>0</td>
<td class='details-col-elapsed'>1分48</td>
<td class='details-col-elapsed'>1分20</td>
<td class="details-col-elapsed">0.0%</td>
</tr>
</table>
......@@ -74,7 +74,7 @@
<tr width="600">
<td class="details-col-elapsed"><a href='../log/a_b2流程九请领业务流_二级库向中心库/log.html' target='_blank'>a_b2流程九请领业务流_二级库向中心库</a></td>
<td class="fail">失败</td>
<td class="details-col-elapsed">107.966</td>
<td class="details-col-elapsed">80.157</td>
<td class="details-col-elapsed">xiaohesheng</td>
</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