Commit b051432f authored by xiao-hesheng's avatar xiao-hesheng
Browse files

流程十一脚本编写

parent 6d660d4f
......@@ -274,34 +274,76 @@ def add_new_deptinfo():
FileUtils().w_info8(info1, module, '所有科室name', titlename, 'message6')
def edit_goods_target(currentDeptId, targetDeptId):
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_1", 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)
packetQty = commonFuc().analysis_json('packetQty', i)
tbStatus = commonFuc().analysis_json('tbStatus', i)
url= commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"basic_mcmsDeptGoodsInfo_updateById")
url = commonFuc().get_api_add_port_url() + commonFuc().get_business_data(module,
"basic_mcmsDeptGoodsInfo_updateById")
request_body = commonFuc().get_business_data(module, "payload58_10_1", id1,pkgDefId, targetDeptId, shelfCode, packetQty,
tbStatus)
print('编辑产品请领渠道request_body', request_body)
result = commonFuc().http_post(url, request_body, headers)
print('编辑产品请领渠道result', result)
try:
add_dept2() # 新增一个二级科室
add_new_deptinfo() # 写入科室信息到文件中
grants_user_new() # 新增授权
# 同步库房信息
execute_command("python runner_test.py tag id2263-221 debug sit")
# 设置部门用户
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"]) # 设置二级科室负责人
get_stockAreaId_new(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5'],
FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid5'], 2)
set_stockShelf_Linkman()#设置库区联系人
#新建科室产品分配
dept_goods_distribute(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5'])
#编辑产品请领目标为二级检验科002
updateUserLoginDefaultRange(get_listUserMgrRangePage1(5)) # 设置登录账号默认权限是新二级库
# # 低值
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() # 新增授权
# # 同步库房信息
# execute_command("python runner_test.py tag id2263-221 debug sit")
# # 设置部门用户
# 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"]) # 设置二级科室负责人
# get_stockAreaId_new(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5'],
# FileUtils().r_info8("b2_herp3_bs", "所有科室name", 'message6')['deptid5'], 2)
# set_stockShelf_Linkman()#设置库区联系人
# #新建科室产品分配
# dept_goods_distribute(FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5'])
# #编辑产品请领目标为二级检验科002
currentDeptId = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid5']
targetDeptId = FileUtils().r_info8("b2_herp3_bs", "所有科室id", 'message6')['deptid2']
edit_goods_target(currentDeptId, targetDeptId)
# updateUserLoginDefaultRange(get_listUserMgrRangePage1(5)) # 设置登录账号默认权限是新二级库
# # # 低值
# 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()
# for i in range(3): # 三个单据共审批3次
# approval_center()
......
......@@ -114,6 +114,7 @@
"herpService_interfaceLog_url": "/api/herpService/interfaceLog/listVoPage"
"herpService_BusinessTypeEnum_url": "/api/herpService/enum/list/BusinessTypeEnum"
"herpService_insertOrUpdateBatch_url": "/api/herpService/procReModel/insertOrUpdateBatch"
"herpService_basic_mcmsDeptGoodsInfo_url": "/api/herpService/basic/mcmsDeptGoodsInfo/getById?id="
data1: '条码,high_info,check_detail,高值打码,out_stock,goods_change_baseInfo,center_out_stock_pkg,mcms_centre_out_stock,pkg_info,mcms_dept_out_stock,barcode_common,mcms_centre_in_stock,goods_change_price,mcms_dept_in_stock,check_detail_pkg,center_out_stock_high,center_out_stock_high,high_consume,shelf_code,barcode_common_pkg,check_detail_high,balance_bill,barcode_rfid,bottle_info,验收单明细打印,产品信息变更,中心库出库单低值,医院中心库出库单,包信息,医院科室出库单,高值纸质条码打印,医院中心库入库单,产品调价,医院科室入库单,低值验收单,中心库出库单高值,高值耗材使用登记表,货位码,单元包纸质条码打印,高值验收单,结算单打印,高值RFID条码打印,单瓶码打印'
data2: 'code,医院标识,code1,code1,erpCode,JDE编码修改,GOODS_CHANGE_STATUS,产品信息变更状态,GOODS_CHARGE_COST,是否计入成本,GOODS_KIND_TYPE,产品分类类型,MFRS_KIND,企业职能,miCode,医保编码修改,NOTICE_RANGE_KIND,公告通知范围,PUR_MODE,耗材类型,YWMS,业务模式,CORP_TYPE,主体类别,PROGRAM_TYPE,程序端,GRAIN,参数粒度,ENV,发布环境,PROJECT_GROUP,系统分组,RETURN_REASON_TYPE,退货原因,NEWCPFL,新产品分类,ZZLX,企业证照类型,68FL,68器械分类,18FL,18器械分类,GOODS_START_STOP,产品启停,YYDJ,医院等级,GOODS_TEMP,产品临采,GLJB,耗材管理级别,GOODS_PURCHASE,产品是否采购,HIS_CODE_CHANGE,HIS编码修改,MI_CODE_CHANGE,医保型号修改,MI_GOODS_GG_CHANGE,医保产品规格,MI_GOODS_XH_CHANGE,医保型号修改,GOODS_CHARGE,产品是否计费,GOODS_BAR_CODE,产品管理模式,GOODS_PUR_MODE,耗材类型,GOODS_CHANGE_PRICE,产品调价类型,GOODS_BAR_CODE_STRATEGY,UDI管理策略,FOCUS_CONTROL_TYPE,重点管控分类,MANUAL_PICK_REASON,手工出库原因,RFID_LABEL_CHANGE,RFID标签管理,ALLOT_PICK_REASON,调拨出库原因,MAGRE_PICK_REASON,移库出库原因'
......@@ -394,9 +395,13 @@ json_headers2: {
"payload58_8": {"consumeMode":null,"id":"2c127343e49947f5855021c790f4b08e","pkgDefId":"56b010aba2e04f978e3038c0f53d910c","stockLower":0,"stockUpper":0,"targetDeptId":"d69a68df361a4289b2262e4ef75b55a5","shelfCode":"area0354-2-01-02","codingType":1,"grantWay":1,"packetQty":33,"tbStatus":0}
"payload58_9": {"consumeMode":null,"id":"2c127343e49947f5855021c790f4b08e","pkgDefId":"56b010aba2e04f978e3038c0f53d910c","stockLower":0,"stockUpper":0,"targetDeptId":"d69a68df361a4289b2262e4ef75b55a5","shelfCode":"area0354-2-01-02","codingType":1,"grantWay":1,"packetQty":33,"tbStatus":1}
"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_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_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}
"payload58_16": {"queryObject":{"goodsName":"","goodsSpec":"","purModes":["%s"],"deptId":"96c4d23bff8541599eb1a7f5f813e421","hosId":"h0347"},"pageNum":1,"pageSize":50}
......
......@@ -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分37</td>
<td class='details-col-elapsed'>0分4</td>
<td class="details-col-elapsed">100.0%</td>
</tr>
</table>
......@@ -95,7 +95,7 @@ setInterval(updateTime, 1000); // 每秒更新一次时间
<tr width="600">
<td class="details-col-elapsed"><a href='../log/a_b5流程十二请领业务流_二级库向二级库/log.html' target='_blank'>a_b5流程十二请领业务流_二级库向二级库</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">37.263</td>
<td class="details-col-elapsed">4.302</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