当前位置: 首页>>代码示例>>Python>>正文


Python DBSession.lot_current_user_id方法代码示例

本文整理汇总了Python中app.model.DBSession.lot_current_user_id方法的典型用法代码示例。如果您正苦于以下问题:Python DBSession.lot_current_user_id方法的具体用法?Python DBSession.lot_current_user_id怎么用?Python DBSession.lot_current_user_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在app.model.DBSession的用法示例。


在下文中一共展示了DBSession.lot_current_user_id方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: checkOutLot

# 需要导入模块: from app.model import DBSession [as 别名]
# 或者: from app.model.DBSession import lot_current_user_id [as 别名]
 def checkOutLot(self,barcode,userId,pbarId=None):
     retVal = {}
     try:
         lot = DBSession().query(ReagentLot).filter(ReagentLot.lot_barcode==barcode.strip()).one() #@UndefinedVariable : lot_barcode comes from SQLAlchemy reflection
         lot.lot_current_user_id = int(userId)
         retVal = {'success': "Successfully checked out " + lot.lot_barcode}
     except Exception,e:
         log.debug(e)
         retVal = {'error': 'barcode ' +  barcode + ' not found in inventory'}
开发者ID:aytsai,项目名称:ricebowl,代码行数:11,代码来源:root.py

示例2: disposeLot

# 需要导入模块: from app.model import DBSession [as 别名]
# 或者: from app.model.DBSession import lot_current_user_id [as 别名]
 def disposeLot(self,barcode,userId,pbarId=None):
     retVal = {}
     try:
         lot = DBSession().query(ReagentLot).filter(ReagentLot.lot_barcode==barcode.strip()).one() #@UndefinedVariable : lot_barcode comes from SQLAlchemy reflection
         lot.lot_is_disposed = 'Y'
         lot.lot_current_user_id = None
         retVal = {'success': 'Marked as disposed ' + lot.lot_barcode}
     except Exception,e:
         log.debug(e)
         retVal = {'error': 'barcode ' +  barcode + ' not found in inventory'}
开发者ID:aytsai,项目名称:ricebowl,代码行数:12,代码来源:root.py

示例3: link

# 需要导入模块: from app.model import DBSession [as 别名]
# 或者: from app.model.DBSession import lot_current_user_id [as 别名]
 def link(self,parentId,childBarcode):
     retVal={'success': 'Successfully linked reagent'}
     try:
         child = DBSession().query(ReagentLot).filter(ReagentLot.lot_barcode==childBarcode).one()
         child.loc = DBSession().query(ReagentLotLocation).get(parentId)
         child.aud_modified_date = datetime.datetime.now()
         child.lot_current_user_id = None
     except Exception,e:
         log.exception(e)
         retVal={'error':"Could not find barcode " + childBarcode}
开发者ID:aytsai,项目名称:ricebowl,代码行数:12,代码来源:root.py

示例4: checkInLot

# 需要导入模块: from app.model import DBSession [as 别名]
# 或者: from app.model.DBSession import lot_current_user_id [as 别名]
 def checkInLot(self,barcode,userId,pbarId=None):
     retVal = {}
     msg = ''
     try:
         lot = DBSession().query(ReagentLot).filter(ReagentLot.lot_barcode==barcode.strip()).one() #@UndefinedVariable : lot_barcode comes from SQLAlchemy reflection
         msg += ', place in <b>bin</b> ' + str(lot.loc.loc_name)
         msg += ', <b>shelf</b> ' + str(lot.loc.loc_shelf)
         msg += ', <b>cabinet</b> ' + str(lot.loc.loc_cabinet) 
         msg += ', <b>room</b> ' + str(lot.loc.loc_room) 
         if lot.lot_current_user_id == None:
             retVal = {'error': lot.lot_barcode + ' already checked in ' + msg}
         else:
             lot.lot_current_user_id = None
             retVal = {'success': lot.lot_barcode + ' has been checked in ' + msg}
     except Exception,e:
         log.debug(e)
         retVal = {'error': 'barcode ' +  barcode + ' not found in inventory'}
开发者ID:aytsai,项目名称:ricebowl,代码行数:19,代码来源:root.py


注:本文中的app.model.DBSession.lot_current_user_id方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。