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

数据库验证流程十一脚本编写

parent 176cc8e9
......@@ -317,8 +317,10 @@ def check_mcms_dept_buy_approval_after(type=16):
goodsCode = commonFuc().analysis_json('goodsCode', list_a)
pkgDefId = commonFuc().analysis_json('pkgDefId', list_a)
pkgDefName = commonFuc().analysis_json('pkgDefName', list_a)
# 获取边仓id
target_stock_id = get_id("select logic_id FROM yb_direct WHERE branch_id ='%s';" % branch_id)
# # 获取边仓id
# target_stock_id = get_id("select logic_id FROM yb_direct WHERE branch_id ='%s';" % branch_id)
stock_name = get_branch_name() + "中心库房"
target_stock_id = get_stockId_fromdb(stock_name, 1)
bill_expdt_date = get_expdt_date(
"select bill_expdt_date from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % (
branch_id, type))
......@@ -336,11 +338,13 @@ def check_mcms_dept_buy_approval_after(type=16):
last_audit_time = get_create_time(
"select last_audit_time from mcms_dept_buy where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % (
branch_id, type))
target_stock_name = '自动化测试12345'
target_stock_name =get_branch_name()+"中心库房"
# import pdb
# pdb.set_trace()
rec_addr = deptname2
if type == 16:
expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
'mcms_dept_buy_approval_after', id1, order_no1, get_hosid(), branch_id,
'mcms_dept_buy_approval_after4', id1, order_no1, get_hosid(), branch_id,
deptid2,
deptname2, area_code, area_name, target_dept_id, target_dept_name,
target_stock_id, target_stock_name, bill_expdt_date, rec_user,
......@@ -348,7 +352,7 @@ def check_mcms_dept_buy_approval_after(type=16):
last_modified, last_modified_user, last_auditor, last_audit_time)
elif type == 20:
expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
'mcms_dept_buy_approval_after2', id1, order_no1, get_hosid(),
'mcms_dept_buy_approval_after5', id1, order_no1, get_hosid(),
branch_id, deptid2,
deptname2, area_code, area_name, target_dept_id, target_dept_name,
target_stock_id, target_stock_name, bill_expdt_date, rec_user,
......@@ -356,7 +360,7 @@ def check_mcms_dept_buy_approval_after(type=16):
last_modified, last_modified_user, last_auditor, last_audit_time)
else:
expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
'mcms_dept_buy_approval_after3', id1, order_no1, get_hosid(),
'mcms_dept_buy_approval_after6', id1, order_no1, get_hosid(),
branch_id, deptid2,
deptname2, area_code, area_name, target_dept_id, target_dept_name,
target_stock_id, target_stock_name, bill_expdt_date, rec_user,
......@@ -465,7 +469,12 @@ def mcms_dept_buy_detail_approval_after(type=16):
else:
print('error')
commonFuc().check_text_exist_result_text('error', 'succees')
def check_mcms_mcms_pur_plan():
branch_id = get_branch_id()
# 获取主表主键
sql = "select id from mcms_pur_plan where branch_id='%s' and bill_mode='%s' order by create_time desc LIMIT 1;" % (
branch_id, type)
id1 = process_tuple(get_dept_buy_id(sql))
try:
# add_dept2() # 新增一个二级科室
# add_new_deptinfo() # 写入科室信息到文件中
......@@ -502,6 +511,7 @@ try:
second_dept_Request(FileUtils().r_info8("b5_spd3_core_business_flow", "产品审核信息", 'message3')['hosGoodsId'], 3)
check_mcms_dept_buy_car(3)
BuyCarSubmit() # 请领车提交
#上面暂时注释=========================================
list_data = ['16', '20', '66']
for i in list_data:
check_mcms_dept_buy(int(i))
......@@ -512,6 +522,8 @@ try:
for i in list_data:
check_mcms_dept_buy_approval_after(int(i))
mcms_dept_buy_detail_approval_after(int(i))
#检查自动生成的采购计划数据
check_mcms_mcms_pur_plan()
# 采购模块处理
purchase_module_process()
for i in range(3): # 三个单据共审批3次
......
......@@ -17,5 +17,10 @@
"mcms_dept_buy_detail_approval_after2": '{"id": "%s", "pid": "%s", "order_no": "%s", "order_num": 1, "source_id": None, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "price": Decimal("99.999900"), "pur_mode": 60, "pkg_def_id": "%s", "pkg_def_name": "%s", "pkg_def_qty": Decimal("100.00"), "buy_pkg_qty": Decimal("1.00"), "buy_qty": Decimal("100.00"), "send_pkg_qty": "0", "send_qty": "0", "rec_pkg_qty": "0", "rec_qty": "0", "tb_status": 40, "close_type": 0, "remark": None, "close_remark": None, "close_time": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "del_flag": 0, "re_order_no": None, "coding_type": 0}'
"mcms_dept_buy_direct_sending": '{"id": "%s", "order_no": "%s", "bill_mode": "16", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "area_code": "%s", "area_name": "%s", "source_id": None, "buy_way": "3", "create_type": "SG", "buy_kind": "QL", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_stock_name": "%s", "bill_expdt_date": %s, "bill_expect_date": None, "priority": 0, "buy_priority": 0, "barcode_flag": 1, "pkg_flag": 1, "remark": "", "dept_audit_remark": None, "audit_remark": None, "close_remark": None, "srv_id": None, "srv_name": None, "gen_status": 0, "close_status": 0, "tb_status": 10, "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "del_flag": 0, "last_auditor": None, "last_audit_time": None, "close_time": None, "old_order_no": None}'
"mcms_dept_buy_direct_sending2": '{"id": "%s", "order_no": "%s", "bill_mode": "20", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "area_code": "%s", "area_name": "%s", "source_id": None, "buy_way": "3", "create_type": "SG", "buy_kind": "QL", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_stock_name": "%s", "bill_expdt_date": %s, "bill_expect_date": None, "priority": 0, "buy_priority": 0, "barcode_flag": 1, "pkg_flag": 1, "remark": "", "dept_audit_remark": None, "audit_remark": None, "close_remark": None, "srv_id": None, "srv_name": None, "gen_status": 0, "close_status": 0, "tb_status": 10, "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "del_flag": 0, "last_auditor": None, "last_audit_time": None, "close_time": None, "old_order_no": None}'
"mcms_dept_buy_direct_sending3": '{"id": "%s", "order_no": "%s", "bill_mode": "66", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "area_code": "%s", "area_name": "%s", "source_id": None, "buy_way": "3", "create_type": "SG", "buy_kind": "QL", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_stock_name": "%s", "bill_expdt_date": %s, "bill_expect_date": None, "priority": 0, "buy_priority": 0, "barcode_flag": 1, "pkg_flag": 1, "remark": "", "dept_audit_remark": None, "audit_remark": None, "close_remark": None, "srv_id": None, "srv_name": None, "gen_status": 0, "close_status": 0, "tb_status": 10, "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "del_flag": 0, "last_auditor": None, "last_audit_time": None, "close_time": None, "old_order_no": None}'
\ No newline at end of file
"mcms_dept_buy_direct_sending2": '{"id": "%s", "order_no": "%s", "bill_mode": "20", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "area_code": "%s", "area_name": "%s", "source_id": None, "buy_way": "3", "create_type": "SG", "buy_kind": "QL", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_stock_name": "%s", "bill_expdt_date": %s, "bill_expect_date": None, "priority": 0, "buy_priority": 0, "barcode_flag": 1, "pkg_flag": 0, "remark": "", "dept_audit_remark": None, "audit_remark": None, "close_remark": None, "srv_id": None, "srv_name": None, "gen_status": 0, "close_status": 0, "tb_status": 10, "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "del_flag": 0, "last_auditor": None, "last_audit_time": None, "close_time": None, "old_order_no": None}'
"mcms_dept_buy_direct_sending3": '{"id": "%s", "order_no": "%s", "bill_mode": "66", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "area_code": "%s", "area_name": "%s", "source_id": None, "buy_way": "3", "create_type": "SG", "buy_kind": "QL", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_stock_name": "%s", "bill_expdt_date": %s, "bill_expect_date": None, "priority": 0, "buy_priority": 0, "barcode_flag": 1, "pkg_flag": 1, "remark": "", "dept_audit_remark": None, "audit_remark": None, "close_remark": None, "srv_id": None, "srv_name": None, "gen_status": 0, "close_status": 0, "tb_status": 10, "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "del_flag": 0, "last_auditor": None, "last_audit_time": None, "close_time": None, "old_order_no": None}'
"mcms_dept_buy_approval_after4": '{"id": "%s", "order_no": "%s", "bill_mode": "16", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "area_code": "%s", "area_name": "%s", "source_id": None, "buy_way": "3", "create_type": "SG", "buy_kind": "QL", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_stock_name": "%s", "bill_expdt_date": %s, "bill_expect_date": None, "priority": 0, "buy_priority": 0, "barcode_flag": 1, "pkg_flag": 1, "remark": "", "dept_audit_remark": "22", "audit_remark": None, "close_remark": None, "srv_id": None, "srv_name": None, "gen_status": 0, "close_status": 0, "tb_status": 40, "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "del_flag": 0, "last_auditor": "%s", "last_audit_time": %s, "close_time": None, "old_order_no": None}'
"mcms_dept_buy_approval_after5": '{"id": "%s", "order_no": "%s", "bill_mode": "20", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "area_code": "%s", "area_name": "%s", "source_id": None, "buy_way": "3", "create_type": "SG", "buy_kind": "QL", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_stock_name": "%s", "bill_expdt_date": %s, "bill_expect_date": None, "priority": 0, "buy_priority": 0, "barcode_flag": 1, "pkg_flag": 0, "remark": "", "dept_audit_remark": "22", "audit_remark": None, "close_remark": None, "srv_id": None, "srv_name": None, "gen_status": 0, "close_status": 0, "tb_status": 40, "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "del_flag": 0, "last_auditor": "%s", "last_audit_time": %s, "close_time": None, "old_order_no": None}'
"mcms_dept_buy_approval_after6": '{"id": "%s", "order_no": "%s", "bill_mode": "66", "hos_id": "%s", "branch_id": "%s", "dept_id": "%s", "dept_name": "%s", "area_code": "%s", "area_name": "%s", "source_id": None, "buy_way": "3", "create_type": "SG", "buy_kind": "QL", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_stock_name": "%s", "bill_expdt_date": %s, "bill_expect_date": None, "priority": 0, "buy_priority": 0, "barcode_flag": 1, "pkg_flag": 1, "remark": "", "dept_audit_remark": "22", "audit_remark": None, "close_remark": None, "srv_id": None, "srv_name": None, "gen_status": 0, "close_status": 0, "tb_status": 40, "rec_user": "%s", "rec_phone": "None", "rec_addr": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "del_flag": 0, "last_auditor": "%s", "last_audit_time": %s, "close_time": None, "old_order_no": None}'
......@@ -76,9 +76,9 @@ 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分9</td>
<td class="details-col-elapsed">100.0%</td>
<td class='details-col-elapsed'>0</td>
<td class='details-col-elapsed'>1分57</td>
<td class="details-col-elapsed">0.0%</td>
</tr>
</table>
......@@ -93,9 +93,9 @@ setInterval(updateTime, 1000); // 每秒更新一次时间
</tr>
<tr width="600">
<td class="details-col-elapsed"><a href='../log/r_b8库房管理_库区设置_同步库房信息/log.html' target='_blank'>r_b8库房管理_库区设置_同步库房信息</a></td>
<td class="success">成功</td>
<td class="details-col-elapsed">9.789</td>
<td class="details-col-elapsed"><a href='../log/a_b4流程十一请领业务流_二级库向直送_数据库验证/log.html' target='_blank'>a_b4流程十一请领业务流_二级库向直送_数据库验证</a></td>
<td class="fail">失败</td>
<td class="details-col-elapsed">116.835</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