Commit 0f1ba0ba authored by xiao-hesheng's avatar xiao-hesheng
Browse files

流程五脚本提交

parent 5bb8c670
...@@ -227,8 +227,12 @@ def check_mcms_psi(type=1): ...@@ -227,8 +227,12 @@ def check_mcms_psi(type=1):
stock_name = get_branch_name() + "中心库房" stock_name = get_branch_name() + "中心库房"
target_stock_id = get_stockId_fromdb(stock_name) target_stock_id = get_stockId_fromdb(stock_name)
target_area_code = get_stockAreaId_new_fromDb(target_dept_name, 1) target_area_code = get_stockAreaId_new_fromDb(target_dept_name, 1)
source_id = FileUtils().r_info8('b5_spd3_core_business_flow', '验收单号', 'message15')['CHECK_NO1'] # source_id = FileUtils().r_info8('b5_spd3_core_business_flow', '验收单号', 'message15')['CHECK_NO1']
source_no = get_distrBillId(branch_id, bill_mode) sql = "select source_id from mcms_psi where target_branch_id='%s' and bill_mode='%s' and stock_kind='RK_YS' order by CREATE_TIME desc LIMIT 1;" % (
branch_id, bill_mode)
source_id=get_id(sql)
# source_no = get_distrBillId(branch_id, bill_mode)
source_no=None
source_repl_id = source_no source_repl_id = source_no
source_corp_id = FileUtils().r_info8('b5_spd3_core_business_flow', '供货关系申请2', 'message')["e_corpId"] source_corp_id = FileUtils().r_info8('b5_spd3_core_business_flow', '供货关系申请2', 'message')["e_corpId"]
source_dept_id = source_corp_id source_dept_id = source_corp_id
...@@ -270,8 +274,8 @@ def check_mcms_psi(type=1): ...@@ -270,8 +274,8 @@ def check_mcms_psi(type=1):
target_dept_name, target_stock_id target_dept_name, target_stock_id
, target_area_code, source_id, source_no, source_repl_id, , target_area_code, source_id, source_no, source_repl_id,
source_corp_id, source_dept_id, source_dept_name source_corp_id, source_dept_id, source_dept_name
, source_stock_id, accounter, account_date, buyBillId, planBillId, , source_stock_id, accounter, account_date, planBillId,
planOrderNo, buyOrderNo, purOrderNo, purBillId planOrderNo, purOrderNo, purBillId
, purBillDate, distrBillId, distrOrderNo, checkBillId, checkOrderNo, , purBillDate, distrBillId, distrOrderNo, checkBillId, checkOrderNo,
psiInBillId, psiInOrderNo, create_user psiInBillId, psiInOrderNo, create_user
, create_time, last_modified, last_modified_user) , create_time, last_modified, last_modified_user)
...@@ -282,8 +286,8 @@ def check_mcms_psi(type=1): ...@@ -282,8 +286,8 @@ def check_mcms_psi(type=1):
target_dept_name, target_stock_id target_dept_name, target_stock_id
, target_area_code, source_id, source_no, source_repl_id, , target_area_code, source_id, source_no, source_repl_id,
source_corp_id, source_dept_id, source_dept_name source_corp_id, source_dept_id, source_dept_name
, source_stock_id, accounter, account_date, buyBillId, planBillId, , source_stock_id, accounter, account_date, planBillId,
planOrderNo, buyOrderNo, purOrderNo, purBillId planOrderNo, purOrderNo, purBillId
, purBillDate, distrBillId, distrOrderNo, checkBillId, checkOrderNo, , purBillDate, distrBillId, distrOrderNo, checkBillId, checkOrderNo,
psiInBillId, psiInOrderNo, create_user psiInBillId, psiInOrderNo, create_user
, create_time, last_modified, last_modified_user) , create_time, last_modified, last_modified_user)
...@@ -294,8 +298,8 @@ def check_mcms_psi(type=1): ...@@ -294,8 +298,8 @@ def check_mcms_psi(type=1):
target_dept_name, target_stock_id target_dept_name, target_stock_id
, target_area_code, source_id, source_no, source_repl_id, , target_area_code, source_id, source_no, source_repl_id,
source_corp_id, source_dept_id, source_dept_name source_corp_id, source_dept_id, source_dept_name
, source_stock_id, accounter, account_date, buyBillId, planBillId, , source_stock_id, accounter, account_date, planBillId,
planOrderNo, buyOrderNo, purOrderNo, purBillId planOrderNo, purOrderNo, purBillId
, purBillDate, distrBillId, distrOrderNo, checkBillId, checkOrderNo, , purBillDate, distrBillId, distrOrderNo, checkBillId, checkOrderNo,
psiInBillId, psiInOrderNo, create_user psiInBillId, psiInOrderNo, create_user
, create_time, last_modified, last_modified_user) , create_time, last_modified, last_modified_user)
...@@ -539,29 +543,28 @@ using(pro_path + r'//air_case/b5_spd3_core_business_flow/a_a7流程五_中心库 ...@@ -539,29 +543,28 @@ using(pro_path + r'//air_case/b5_spd3_core_business_flow/a_a7流程五_中心库
from a_a7流程五_中心库入库结算_正结算3_内网验收入库结算 import check_accept_order,putaway from a_a7流程五_中心库入库结算_正结算3_内网验收入库结算 import check_accept_order,putaway
try: try:
# # 验收 # # 验收
# check_accept_order(1) # 低值 check_accept_order(1) # 低值
# time.sleep(6) time.sleep(6)
# check_mcms_check(1) check_mcms_check(1)
# time.sleep(3) time.sleep(3)
# check_accept_order(2) # 高值 check_accept_order(2) # 高值
# time.sleep(6) time.sleep(6)
# check_mcms_check(2) check_mcms_check(2)
# time.sleep(3) time.sleep(3)
# check_accept_order(3) # 试剂 check_accept_order(3) # 试剂
# time.sleep(6) time.sleep(6)
# check_mcms_check(3) check_mcms_check(3)
# 入库上架 # 入库上架
# putaway()
# time.sleep(6)
check_mcms_psi(3)
putaway() putaway()
time.sleep(6)
check_mcms_psi(3)
putaway() putaway()
time.sleep(6)
time.sleep(3)
check_mcms_psi(2) check_mcms_psi(2)
time.sleep(3) putaway()
time.sleep(6)
check_mcms_psi(1) check_mcms_psi(1)
time.sleep(3)
OBD_ID = settle()# 生成结算单 OBD_ID = settle()# 生成结算单
# 调用审批结算单 # 调用审批结算单
approval_center(OBD_ID) approval_center(OBD_ID)
......
...@@ -443,6 +443,6 @@ ...@@ -443,6 +443,6 @@
"mcms_check_batch2_1008": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_detail_id": "%s", "distr_detail_id": "%s", "pur_mode": 60, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "barcode_id": "%s", "sub_barcode_id": None, "qty": Decimal("100.00"), "reject_qty": Decimal("0.00"), "reject_reason": None, "settlement": 1, "tb_status": 1, "pur_task_id": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0}' "mcms_check_batch2_1008": '{"id": "%s", "pid": "%s", "order_no": "%s", "source_detail_id": "%s", "distr_detail_id": "%s", "pur_mode": 60, "hos_goods_id": "%s", "mdm_goods_code": "%s", "goods_code": "%s", "barcode_id": "%s", "sub_barcode_id": None, "qty": Decimal("100.00"), "reject_qty": Decimal("0.00"), "reject_reason": None, "settlement": 1, "tb_status": 1, "pur_task_id": None, "create_user": "%s", "create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 0}'
#手工采购计划_中心库入库单 #手工采购计划_中心库入库单
"check_mcms_psi1_1008": '{"id": "%s", "order_no": "%s", "bill_mode": "16", "rec_type": "HDI", "psi_flag": 1, "psi_kind": "101", "stock_kind": "RK_YS", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "自动化测试", "source_id": "%s", "source_no": "%s", "source_repl_id": "%s", "source_corp_id": "%s", "source_branch_id": None, "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": None, "source_area_name": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": %s, "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s","purOrderNo":"%s","purBillId":"%s","purBillDate":"%s","distrBillId":"%s","distrOrderNo":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s","create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "BD", "reject_reason": None, "receipt_status": 0}' "check_mcms_psi1_1008": '{"id": "%s", "order_no": "%s", "bill_mode": "16", "rec_type": "YND", "psi_flag": 1, "psi_kind": "101", "stock_kind": "RK_YS", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "自动化测试", "source_id": "%s", "source_no": %s, "source_repl_id": %s, "source_corp_id": "%s", "source_branch_id": None, "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": None, "source_area_name": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": %s, "bill_relation_json": "{"planBillId":"%s","planOrderNo":"%s","purOrderNo":"%s","purBillId":"%s","purBillDate":"%s","distrBillId":"%s","distrOrderNo":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s","create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "SG", "reject_reason": None, "receipt_status": 0}'
"check_mcms_psi2_1008": '{"id": "%s", "order_no": "%s", "bill_mode": "20", "rec_type": "HDI", "psi_flag": 1, "psi_kind": "101", "stock_kind": "RK_YS", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "自动化测试", "source_id": "%s", "source_no": "%s", "source_repl_id": "%s", "source_corp_id": "%s", "source_branch_id": None, "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": None, "source_area_name": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": %s, "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s","purOrderNo":"%s","purBillId":"%s","purBillDate":"%s","distrBillId":"%s","distrOrderNo":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s","create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "BD", "reject_reason": None, "receipt_status": 0}' "check_mcms_psi2_1008": '{"id": "%s", "order_no": "%s", "bill_mode": "20", "rec_type": "YND", "psi_flag": 1, "psi_kind": "101", "stock_kind": "RK_YS", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "自动化测试", "source_id": "%s", "source_no": %s, "source_repl_id": %s, "source_corp_id": "%s", "source_branch_id": None, "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": None, "source_area_name": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": %s, "bill_relation_json": "{"planBillId":"%s","planOrderNo":"%s","purOrderNo":"%s","purBillId":"%s","purBillDate":"%s","distrBillId":"%s","distrOrderNo":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s","create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "SG", "reject_reason": None, "receipt_status": 0}'
"check_mcms_psi3_1008": '{"id": "%s", "order_no": "%s", "bill_mode": "66", "rec_type": "HDI", "psi_flag": 1, "psi_kind": "101", "stock_kind": "RK_YS", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "自动化测试", "source_id": "%s", "source_no": "%s", "source_repl_id": "%s", "source_corp_id": "%s", "source_branch_id": None, "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": None, "source_area_name": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": %s, "bill_relation_json": "{"buyBillId":"%s","planBillId":"%s","planOrderNo":"%s","buyOrderNo":"%s","purOrderNo":"%s","purBillId":"%s","purBillDate":"%s","distrBillId":"%s","distrOrderNo":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s","create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "BD", "reject_reason": None, "receipt_status": 0}' "check_mcms_psi3_1008": '{"id": "%s", "order_no": "%s", "bill_mode": "66", "rec_type": "YND", "psi_flag": 1, "psi_kind": "101", "stock_kind": "RK_YS", "target_corp_id": "%s", "target_branch_id": "%s", "target_dept_id": "%s", "target_dept_name": "%s", "target_stock_id": "%s", "target_area_code": "%s", "target_area_name": "自动化测试", "source_id": "%s", "source_no": %s, "source_repl_id": %s, "source_corp_id": "%s", "source_branch_id": None, "source_dept_id": "%s", "source_dept_name": "%s", "source_stock_id": "%s", "source_area_code": None, "source_area_name": None, "remark": None, "tb_status": 30, "accounter": "%s", "account_date": %s, "bill_relation_json": "{"planBillId":"%s","planOrderNo":"%s","purOrderNo":"%s","purBillId":"%s","purBillDate":"%s","distrBillId":"%s","distrOrderNo":"%s","checkBillId":"%s","checkOrderNo":"%s","psiInBillId":"%s","psiInOrderNo":"%s"}", "reject_time": None, "reject_remark": None, "create_user": "%s","create_time": %s, "last_modified": %s, "last_modified_user": "%s", "version": 1, "last_auditor": None, "last_audit_time": None, "reject_user": None, "initial_order": None, "source_type": "SG", "reject_reason": None, "receipt_status": 0}'
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