Пример #1
0
def prepare_middle_layer_route(warehouse_id, order_ids):
    sql = '''
      insert into order_route(order_id,warehouse_id,route_flag,creator,creation_date,modifier,last_modified_date)
      values ('%s', '%s', 1, 'MiddleLayerInvoker', '2015-12-28 15:28:27', 'MiddleLayerInvoker', '2015-12-28 15:28:27')
    '''
    for order_id in order_ids.split(','):
        DbOperator.execute_sql(db='middle_layer', sql=sql % (order_id, warehouse_id))
Пример #2
0
    def billing_get_billId_by_apply_no(cls, apply_no):
        """
        按退款申请在db查询退款账单
        :param apply_no:
        :return:
        """
        print u'*' * 20 + u'按退款申请在db查询退款账单'
        sql = "select refund_bill_id from billing_refund_bill_detail where refund_apply_no = '%s'" % apply_no
        result = DbOperator.fetch_data('tms_tst_billing', sql)
        if len(result) == 0:
            raise StandardError(u'退款申请[%s]无对应退款账单' % apply_no)
        else:
            refund_bill_id = result[0]

        return refund_bill_id