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

流程五脚本提交

parent 99fa5809
......@@ -679,10 +679,12 @@ def check_mcms_out_balance_detail(type=1, pid=""):
# 从文件中获取条码信息
info = FileUtils().r_info8('b5_spd3_core_business_flow', "条码信息", 'message18')
list_a = info['list_a']
bar_id = commonFuc().analysis_json('id', list_a)
bar_code = commonFuc().analysis_json('pkgCodeSee', list_a)
bar_id = get_id("select bar_id from mcms_out_balance_detail where pid='%s' order by id LIMIT 1;" % (
pid))
bar_code = get_id("select bar_code from mcms_out_balance_detail where pid='%s' order by id LIMIT 1;" % (
pid))
from_id = get_id(
"select id from mcms_psi_batch where hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;" % (hos_goods_id))
"select from_id from mcms_out_balance_detail where pid='%s' order by id LIMIT 1;" % (pid))
from_order_no = get_id(
"select order_no from mcms_psi_batch where hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;" % (
hos_goods_id))
......@@ -702,10 +704,10 @@ def check_mcms_out_balance_detail(type=1, pid=""):
sub_prov_name = prov_name
account_date = get_account_date1("select account_date from mcms_out_balance_detail where id='%s';" % id)
un_settle_id = get_id(
"select id from mcms_out_un_balance where branch_id='%s' and from_kind='CK_TH' and hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;" % (
"select id from mcms_out_un_balance where branch_id='%s' and from_kind='RK_YS' and hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;" % (
branch_id, hos_goods_id))
expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
'check_mcms_out_balance_detail_0918_1', id,
'check_mcms_out_balance_detail_1008_1', id,
pid, prov_id, prov_name, sub_prov_id, sub_prov_name, out_dept_id,
out_dept_name, account_date, from_id, from_order_no, hos_goods_id, bar_id,
bar_code, distr_detail_id, hos_batch_id, un_settle_id, create_user,
......@@ -802,7 +804,7 @@ def check_mcms_out_balance_detail2(type=1, pid=""):
else:
commonFuc().check_text_exist_result_text('error', 'success')
expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
'check_mcms_out_balance_detail_0918_2', id,
'check_mcms_out_balance_detail_1008_2', id,
pid, prov_id, prov_name, sub_prov_id, sub_prov_name, out_dept_id,
out_dept_name, account_date, from_id, from_order_no, hos_goods_id, bar_id,
bar_code, distr_detail_id, hos_batch_id, un_settle_id, create_user,
......@@ -904,7 +906,7 @@ def check_mcms_out_balance_approve_after(type=1, OBh_ID=""):
check_user = create_user
check_time = get_create_time("select check_time from mcms_out_balance where id='%s';" % id)
expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
'check_mcms_out_balance_0919', id,
'check_mcms_out_balance_1009', id,
order_no, branch_id, hos_id, prov_id, prov_name, settle_month,
settle_start_time, settle_end_time, create_user, create_time,
last_modified, last_modified_user, check_user, check_time
......@@ -976,12 +978,16 @@ def check_mcms_out_balance_detail_approve_after(type=1, pid=""):
list_a = info['list_a']
bar_id = commonFuc().analysis_json('id', list_a)
bar_code = commonFuc().analysis_json('pkgCodeSee', list_a)
# from_id = get_id(
# "select id from mcms_psi_batch where hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;" % (hos_goods_id))
# from_order_no = get_id(
# "select order_no from mcms_psi_batch where hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;" % (
# hos_goods_id))
from_id = get_id(
"select id from mcms_psi_batch where hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;" % (hos_goods_id))
"select from_id from mcms_out_balance_detail where id='%s';" % (id))
from_order_no = get_id(
"select order_no from mcms_psi_batch where hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;" % (
hos_goods_id))
"select from_order_no from mcms_out_balance_detail where id='%s';" % (
id))
account_user_id = get_login_user_uxid_bydb(FileUtils().r_info8('b2_herp3_bs', "用户名信息", 'message3')['username1'])
create_user = account_user_id
create_time = get_create_time("select create_time from mcms_out_balance_detail where id='%s';" % id)
......@@ -1000,7 +1006,7 @@ def check_mcms_out_balance_detail_approve_after(type=1, pid=""):
"select id from mcms_out_un_balance where branch_id='%s' and from_kind='CK_TH' and hos_goods_id='%s' order by CREATE_TIME desc LIMIT 1;" % (
branch_id, hos_goods_id))
expected = commonFuc().get_business_data('b6_spd3_core_business_flow_database_check',
'check_mcms_out_balance_detail_0919_1', id,
'check_mcms_out_balance_detail_1009_1', id,
pid, prov_id, prov_name, sub_prov_id, sub_prov_name, out_dept_id,
out_dept_name, account_date, from_id, from_order_no, hos_goods_id, bar_id,
bar_code, distr_detail_id, hos_batch_id, un_settle_id, create_user,
......@@ -1155,10 +1161,10 @@ try:
# OBD_ID = settle()# 生成结算单
# print(OBD_ID)
# time.sleep(6)
OBD_ID='OBh0347202410080005'
check_mcms_out_balance(1, OBD_ID) # 检查审批前的结算数据
# 调用审批结算单
approval_center(OBD_ID)
OBD_ID='OBh0347202410090005'
# check_mcms_out_balance(1, OBD_ID) # 检查审批前的结算数据
# # 调用审批结算单
# approval_center(OBD_ID)
time.sleep(6)
check_mcms_out_balance_approve_after(1, OBD_ID) # 检查审批后的结算数据
commonFuc().check_text_exist_result_text('succees', 'succees')
......
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