"select order_no from spd3_herp_test2.mcms_operation_apply where branch_id='%s' order by create_time desc LIMIT 1;"%branch_id)
operationNoticeBillId=get_id(
"select id from spd3_herp_test2.mcms_operation_notice where branch_id='%s' order by create_time desc LIMIT 1;"%branch_id)
operationNoticeOrderNo=get_id(
"select order_no from spd3_herp_test2.mcms_operation_notice where branch_id='%s' order by create_time desc LIMIT 1;"%branch_id)
operationApplyBillId=get_id(
"select id from spd3_herp_test2.mcms_operation_apply where branch_id='%s' order by create_time desc LIMIT 1;"%branch_id)
psiOutBillId=get_id("select id from mcms_psi where target_branch_id='%s' and bill_mode='%s' and stock_kind='CK_QL' order by CREATE_TIME desc LIMIT 1;"%(branch_id,bill_mode))
psiOutOrderNo=get_id("select order_no from mcms_psi where target_branch_id='%s' and bill_mode='%s' and stock_kind='CK_QL' order by CREATE_TIME desc LIMIT 1;"%(branch_id,bill_mode))