Commit 22d0d38d authored by xiao-hesheng's avatar xiao-hesheng
Browse files

流程一脚本提交

parent 68618683
......@@ -237,6 +237,7 @@ def test2(): # 科室添加产品信息(产品是从外网同步过来的)
break
dept2_id = FileUtils().r_info(module, '科室信息')["dept2_id"]
j=1
for i in list2:
# 请求体
......@@ -268,8 +269,73 @@ def test2(): # 科室添加产品信息(产品是从外网同步过来的)
commonFuc().check_text_exist('error', result)
#增加设置产品为赋码管理
set_goods_coding_type(get_branch_id())
#
# url = commonFuc().get_api_add_port_url()+commonFuc().get_business_data(module, "basic_mcmsDeptGoodsInfo_page_url")
# hosGoodsId=list2[2]
# GoodsId=hosGoodsId.replace(get_hosid(),"")
# request_body = commonFuc().get_business_data(module, "payload58_13_2", GoodsId,dept2_id, get_hosid())
# print('request_body',request_body)
# result = commonFuc().http_post(url, request_body, headers)
# print('result',result)
# #修改产品属性值
# url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, "basic_mcmsDeptGoodsInfo_updateById")
hosGoodsId = list2[2]
GoodsId = hosGoodsId.replace(get_hosid(), "")
# request_body = commonFuc().get_business_data(module, "payload58_13_2", GoodsId, dept2_id, get_hosid())
# print('request_body', request_body)
# result = commonFuc().http_post(url, request_body, headers)
# print('result', result)
dept1_id = FileUtils().r_info8(module, '一级科室信息','message4')["dept1_id"]
targetDeptId=dept1_id
edit_goods_property(GoodsId,dept2_id,targetDeptId)
def edit_goods_property(GoodsId,currentDeptId, targetDeptId):
# 2024年11月19日,检测试剂产品增加了是否单瓶管理功能,默认为否,需要修改脚本
# 在科室产品分配中查询检测试剂
#修改试剂的属性值,单瓶管理为"是"
module = "b2_herp3_bs"
# # 登录获取用户id等信息,使用创建的用户登录===========开始
info = FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')
username = info['username1']
password = commonFuc().get_business_data("b2_herp3_bs", "password")
print('username,password', username, password)
# # 获取token和projectCode
token, projectCode, uxid, corpId, info = login(username, password, 2)
# 登录获取用户id等信息,使用创建的用户登录============结束
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module, "basic_mcmsDeptGoodsInfo_page_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"))
# #请求体
request_body = commonFuc().get_business_data(module, "payload58_13_2",GoodsId, currentDeptId, get_hosid())
result = commonFuc().http_post(url, request_body, headers)
print('科室产品列表查询', result)
data1 = commonFuc().analysis_json('data', commonFuc().analysis_json('data', result))
for i in data1:
shelfCode = commonFuc().analysis_json('shelfCode', i)
id1 = commonFuc().analysis_json('id', i)
pkgDefId = commonFuc().analysis_json('pkgDefId', i)
purMode = commonFuc().analysis_json('purMode', i)
tbStatus = commonFuc().analysis_json('tbStatus', i)
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"herpService_basic_mcmsDeptGoodsInfo_url")
url = url + id1
result = commonFuc().http_get(url, headers)
print('获取产品详情信息', result)
data2 = commonFuc().analysis_json('data', result)
packetQty = commonFuc().analysis_json('packetQty', data2)
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"basic_mcmsDeptGoodsInfo_updateById")
if purMode == 60: # 低值和试剂
request_body = commonFuc().get_business_data(module, "payload58_10_3", id1, pkgDefId, targetDeptId,
shelfCode, packetQty,
tbStatus)
print('编辑试剂产品属性request_body', request_body)
result = commonFuc().http_post(url, request_body, headers)
print('编辑试剂产品属性result', result)
def grants_user(orgName='d69a68df361a4289b2262e4ef75b55a5', mgrRangeId='feb0cc16618c437fb4d033cd339a0377'):
module = "b2_herp3_bs"
# 登录获取用户id等信息,使用创建的用户登录===========开始
......
......@@ -401,11 +401,14 @@ json_headers2: {
"payload58_10": {"consumeMode":null,"id":"2c127343e49947f5855021c790f4b08e","pkgDefId":"f8ad68aae4a5406ab04316e46bbf38bd","stockLower":100,"stockUpper":1000000,"targetDeptId":"d69a68df361a4289b2262e4ef75b55a5","shelfCode":"area0354-2-02-01","codingType":0,"grantWay":2,"packetQty":66,"tbStatus":1}
"payload58_10_1": {"consumeMode":null,"id":"%s","pkgDefId":"%s","stockLower":0,"stockUpper":0,"targetDeptId":"%s","shelfCode":"%s","codingType":0,"grantWay":null,"packetQty":"%s","tbStatus":"%s","autoUnpack":null}
"payload58_10_2": {"consumeMode":null,"id":"%s","pkgDefId":null,"stockLower":0,"stockUpper":0,"targetDeptId":"%s","shelfCode":"%s","codingType":0,"grantWay":null,"packetQty":null,"tbStatus":"%s","autoUnpack":null}
"payload58_10_3": {"consumeMode":null,"id":"%s","pkgDefId":"%s","stockLower":0,"stockUpper":0,"targetDeptId":"%s","shelfCode":"%s","codingType":0,"grantWay":null,"packetQty":"%s","tbStatus":"%s","autoUnpack":0,"limitFlag":0,"buyRound":0,"buyAllow":1,"bottleMgrFlag":1}
"payload58_11": {"consumeMode":null,"id":"2c127343e49947f5855021c790f4b08e","pkgDefId":"aaf8ad68aae4a5406ab04316e46bbf38bd","stockLower":100,"stockUpper":1000000,"targetDeptId":"d69a68df361a4289b2262e4ef75b55a5","shelfCode":"area0354-2-02-01","codingType":0,"grantWay":2,"packetQty":66,"tbStatus":1}
"payload58_12": {"consumeMode":null,"id":"2c127343e49947f5855021c790f4b08e","pkgDefId":"56b010aba2e04f978e3038c0f53d910c","stockLower":0,"stockUpper":0,"targetDeptId":"d69a68df361a4289b2262e4ef75b55a5","shelfCode":"area0354-2-02-01","codingType":1,"grantWay":1,"packetQty":33,"tbStatus":1}
"payload58_13": {"queryObject":{"goodsName":"","goodsSpec":"","purModes":[],"deptId":"96c4d23bff8541599eb1a7f5f813e421","hosId":"h0347"},"pageNum":1,"pageSize":50}
"payload58_13_1": {"queryObject":{"goodsName":"","goodsSpec":"","purModes":[],"deptId":"%s","hosId":"%s"},"pageNum":1,"pageSize":50}
"payload58_13_2": {"queryObject":{"goodsName":"%s","goodsSpec":"","purModes":[],"deptId":"%s","hosId":"%s"},"pageNum":1,"pageSize":50}
"payload58_14": {"queryObject":{"goodsName":"%s","goodsSpec":"SSY-001","purModes":["10"],"deptId":"96c4d23bff8541599eb1a7f5f813e421","hosId":"h0347"},"pageNum":1,"pageSize":50}
"payload58_15": {"queryObject":{"goodsName":"","goodsSpec":"%s","purModes":["10"],"deptId":"96c4d23bff8541599eb1a7f5f813e421","hosId":"h0347"},"pageNum":1,"pageSize":50}
......
......@@ -335,8 +335,8 @@ def main_text():
delData().Delete_business_Data_All()
delData().Delete_business_Data_All2()
delData().Delete_branch_by_id(3, branch_id)
print(branch_id, '删除完毕')
messagebox.showinfo("提示信息", branch_id+"数据删除完毕")
# print(branch_id, '删除完毕')
# messagebox.showinfo("提示信息", branch_id+"数据删除完毕")
def del_current_brachdata():
import tkinter as tk
......
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