示例#1
0
 def addStorePlace(self, data):
     # 添加库房信息,校验唯一性,如果已经存在,就不添加了。
     storeName = data["store_place"]
     adminName = data["admin_name"]
     try:
         spd = StorePlaceDal()
         storePlace = spd.get_store_place_id_by_ch_name(storeName)
         if storePlace:
             return False, u"库房地点" + storeName + u"已经存在,不能重复添加!"
         spd.add_store_place(storeName, adminName)
         return True, u"添加成功"
     except Exception as _ex:
         LOG.error("add new storehouse infos error: %s" % str(_ex))
         return False, u"添加失败"
示例#2
0
 def get_store_place_id_by_ch_name(self, ch_name):
     spe = StorePlaceDal()
     store_place = spe.get_store_place_id_by_ch_name(ch_name)
     return self.actual_return_id_val(store_place)
示例#3
0
 def get_store_place_name_by_num(self, store_place_id):
     spe = StorePlaceDal()
     store_place = spe.get_store_place_name_by_id(store_place_id)
     return self.actual_return_ch_name_val(store_place)