Commit 1505bee0 authored by xiao-hesheng's avatar xiao-hesheng
Browse files

流程五脚本提交

No related merge requests found
Showing with 48 additions and 36 deletions
+48 -36
......@@ -458,7 +458,7 @@ def check_mcms_psi_batch_in(DR_ID, type, order_no, source_id1):
batch_main_key = get_id("select id from mcms_psi_batch where pid='%s' order by create_time desc LIMIT 1;" % DR_ID)
pid = DR_ID
# order_no = get_id("select order_no from mcms_psi_dept_batch where pid='%s';" % DR_ID)
source_detail_id = source_id1 + '0001'
source_detail_id = get_id("select source_detail_id from mcms_psi_batch where id='%s';" % batch_main_key)
pick_detail_id = None
if type == 1:
hos_goods_id = FileUtils().r_info8('b5_spd3_core_business_flow', '产品审核信息', 'message2')["hosGoodsId"]
......@@ -480,7 +480,7 @@ def check_mcms_psi_batch_in(DR_ID, type, order_no, source_id1):
commonFuc().check_text_exist_result_text('succees', 'succees')
else:
commonFuc().check_text_exist_result_text('error', 'succees')
barcode_id = get_id("select barcode_id from mcms_psi_batch where pid='%s';" % DR_ID)
barcode_id = get_id("select barcode_id from mcms_psi_batch where id='%s';" % batch_main_key)
if check_barcode_id(barcode_id) == True:
print('ok')
commonFuc().check_text_exist_result_text('succees', 'succees')
......@@ -976,8 +976,12 @@ def check_mcms_out_balance_detail_approve_after(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 id='%s';" % (
id))
bar_code = get_id("select bar_code from mcms_out_balance_detail where id='%s';" % (
id))
# 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(
......@@ -1003,7 +1007,7 @@ def check_mcms_out_balance_detail_approve_after(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_1009_1', id,
......@@ -1135,36 +1139,35 @@ sys.path.append(pro_path + r'/air_case/b5_spd3_core_business_flow/a_a7流程五_
using(pro_path + r'//air_case/b5_spd3_core_business_flow/a_a7流程五_中心库入库结算_正结算3_内网验收入库结算.air')
from a_a7流程五_中心库入库结算_正结算3_内网验收入库结算 import check_accept_order,putaway
try:
# # # 验收
# check_accept_order(3) # 试剂
# time.sleep(6)
# check_mcms_check(3)
# time.sleep(3)
# check_accept_order(2) # 高值
# time.sleep(6)
# check_mcms_check(2)
# time.sleep(3)
# check_accept_order(1) # 低值
# time.sleep(6)
# check_mcms_check(1)
# # 入库上架
# putaway()
# time.sleep(6)
# check_mcms_psi(1)
# putaway()
# time.sleep(6)
# check_mcms_psi(2)
# putaway()
# time.sleep(6)
# check_mcms_psi(3)
# time.sleep(3)
# OBD_ID = settle()# 生成结算单
# print(OBD_ID)
# time.sleep(6)
OBD_ID='OBh0347202410090005'
# check_mcms_out_balance(1, OBD_ID) # 检查审批前的结算数据
# # 验收
check_accept_order(3) # 试剂
time.sleep(6)
check_mcms_check(3)
time.sleep(3)
check_accept_order(2) # 高值
time.sleep(6)
check_mcms_check(2)
time.sleep(3)
check_accept_order(1) # 低值
time.sleep(6)
check_mcms_check(1)
# 入库上架
putaway()
time.sleep(6)
check_mcms_psi(1)
putaway()
time.sleep(6)
check_mcms_psi(2)
putaway()
time.sleep(6)
check_mcms_psi(3)
time.sleep(3)
OBD_ID = settle()# 生成结算单
print(OBD_ID)
time.sleep(6)
check_mcms_out_balance(1, OBD_ID) # 检查审批前的结算数据
# # 调用审批结算单
# approval_center(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')
......
......@@ -452,6 +452,15 @@
"check_mcms_out_balance_1008": '{"id": "%s", "order_no": "%s", "branch_id": "%s", "hos_id": "%s", "prov_id": "%s", "prov_name": "%s", "settle_dept_id": None, "tb_status": 0, "sum_row": 2, "settle_amount": Decimal("19999.980000"), "settle_way": 0, "settle_month": "%s", "settle_start_time": %s, "settle_end_time": %s, "remark": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "check_msg": None, "settle_qty": Decimal("200.0000"), "check_user": None, "check_time": None}'
#手工采购计划入库_结算数据子表
"check_mcms_out_balance_detail_1008_1": '{"id": "%s", "pid": "%s", "prov_id": "%s", "prov_name": "%s", "sub_prov_id": "%s", "sub_prov_name": "%s", "out_dept_id": "%s", "out_dept_name": "%s", "account_date": %s, "pur_mode": 10, "from_table": "mcms_psi_batch", "from_id": "%s", "from_order_no": "%s", "hos_goods_id": "%s", "bar_id": "%s", "bar_code": "%s", "distr_detail_id": "%s", "hos_batch_id": "%s", "tb_status": 10, "price": Decimal("99.999900"), "settle_qty": Decimal("-100.00"), "invoice_qty": Decimal("0.00"), "settle_amount": Decimal("-9999.9900"), "un_settle_id": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "settle_type": 1, "contract_id": None, "normal_contract_id": None, "temp_purchase": 0, "hos_id": "%s", "fcat_id": None, "invoice_price": Decimal("99.999900"), "online_kind": "10"}'
"check_mcms_out_balance_detail_1008_1": '{"id": "%s", "pid": "%s", "prov_id": "%s", "prov_name": "%s", "sub_prov_id": "%s", "sub_prov_name": "%s", "out_dept_id": "%s", "out_dept_name": "%s", "account_date": %s, "pur_mode": 10, "from_table": "mcms_psi_batch", "from_id": "%s", "from_order_no": "%s", "hos_goods_id": "%s", "bar_id": "%s", "bar_code": "%s", "distr_detail_id": "%s", "hos_batch_id": "%s", "tb_status": 10, "price": Decimal("99.999900"), "settle_qty": Decimal("100.00"), "invoice_qty": Decimal("0.00"), "settle_amount": Decimal("9999.9900"), "un_settle_id": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "settle_type": 1, "contract_id": None, "normal_contract_id": None, "temp_purchase": 0, "hos_id": "%s", "fcat_id": None, "invoice_price": Decimal("99.999900"), "online_kind": "10"}'
"check_mcms_out_balance_detail_1008_2": '{"id": "%s", "pid": "%s", "prov_id": "%s", "prov_name": "%s", "sub_prov_id": "%s", "sub_prov_name": "%s", "out_dept_id": "%s", "out_dept_name": "%s", "account_date": %s, "pur_mode": 10, "from_table": "mcms_psi_batch", "from_id": "%s", "from_order_no": "%s", "hos_goods_id": "%s", "bar_id": "%s", "bar_code": "%s", "distr_detail_id": "%s", "hos_batch_id": "%s", "tb_status": 10, "price": Decimal("99.999900"), "settle_qty": Decimal("100.00"), "invoice_qty": Decimal("0.00"), "settle_amount": Decimal("9999.9900"), "un_settle_id": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "settle_type": 1, "contract_id": None, "normal_contract_id": None, "temp_purchase": 0, "hos_id": "%s", "fcat_id": None, "invoice_price": Decimal("99.999900"), "online_kind": "10"}'
\ No newline at end of file
"check_mcms_out_balance_detail_1008_2": '{"id": "%s", "pid": "%s", "prov_id": "%s", "prov_name": "%s", "sub_prov_id": "%s", "sub_prov_name": "%s", "out_dept_id": "%s", "out_dept_name": "%s", "account_date": %s, "pur_mode": 10, "from_table": "mcms_psi_batch", "from_id": "%s", "from_order_no": "%s", "hos_goods_id": "%s", "bar_id": "%s", "bar_code": "%s", "distr_detail_id": "%s", "hos_batch_id": "%s", "tb_status": 10, "price": Decimal("99.999900"), "settle_qty": Decimal("100.00"), "invoice_qty": Decimal("0.00"), "settle_amount": Decimal("9999.9900"), "un_settle_id": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0, "settle_type": 1, "contract_id": None, "normal_contract_id": None, "temp_purchase": 0, "hos_id": "%s", "fcat_id": None, "invoice_price": Decimal("99.999900"), "online_kind": "10"}'
#中心库退货出库_结算数据主表_审批后
"check_mcms_out_balance_1009": '{"id": "%s", "order_no": "%s", "branch_id": "%s", "hos_id": "%s", "prov_id": "%s", "prov_name": "%s", "settle_dept_id": None, "tb_status": 20, "sum_row": 2, "settle_amount": Decimal("19999.980000"), "settle_way": 0, "settle_month": "%s", "settle_start_time": %s, "settle_end_time": %s, "remark": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "check_msg": "22", "settle_qty": Decimal("200.0000"), "check_user": "%s", "check_time": %s}'
#中心库退货出库_结算数据子表_审批后
"check_mcms_out_balance_detail_1009_1": '{"id": "%s", "pid": "%s", "prov_id": "%s", "prov_name": "%s", "sub_prov_id": "%s", "sub_prov_name": "%s", "out_dept_id": "%s", "out_dept_name": "%s", "account_date": %s, "pur_mode": 10, "from_table": "mcms_psi_batch", "from_id": "%s", "from_order_no": "%s", "hos_goods_id": "%s", "bar_id": "%s", "bar_code": "%s", "distr_detail_id": "%s", "hos_batch_id": "%s", "tb_status": 11, "price": Decimal("99.999900"), "settle_qty": Decimal("100.00"), "invoice_qty": Decimal("0.00"), "settle_amount": Decimal("9999.9900"), "un_settle_id": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "settle_type": 1, "contract_id": None, "normal_contract_id": None, "temp_purchase": 0, "hos_id": "%s", "fcat_id": None, "invoice_price": Decimal("99.999900"), "online_kind": "10"}'
"check_mcms_out_balance_detail_1009_2": '{"id": "%s", "pid": "%s", "prov_id": "%s", "prov_name": "%s", "sub_prov_id": "%s", "sub_prov_name": "%s", "out_dept_id": "%s", "out_dept_name": "%s", "account_date": %s, "pur_mode": 10, "from_table": "mcms_psi_batch", "from_id": "%s", "from_order_no": "%s", "hos_goods_id": "%s", "bar_id": "%s", "bar_code": "%s", "distr_detail_id": "%s", "hos_batch_id": "%s", "tb_status": 11, "price": Decimal("99.999900"), "settle_qty": Decimal("100.00"), "invoice_qty": Decimal("0.00"), "settle_amount": Decimal("9999.9900"), "un_settle_id": "%s", "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "settle_type": 1, "contract_id": None, "normal_contract_id": None, "temp_purchase": 0, "hos_id": "%s", "fcat_id": None, "invoice_price": Decimal("99.999900"), "online_kind": "10"}'
\ No newline at end of file
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