Subversion Repositories SmartDukaan

Rev

Rev 6821 | Rev 6857 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6821 Rev 6832
Line 438... Line 438...
438
     - oosStatusMap
438
     - oosStatusMap
439
     - date
439
     - date
440
    """
440
    """
441
    pass
441
    pass
442
 
442
 
-
 
443
  def getOosStatusesForXDaysForItem(self, itemId, days):
-
 
444
    """
-
 
445
    Parameters:
-
 
446
     - itemId
-
 
447
     - days
-
 
448
    """
-
 
449
    pass
-
 
450
 
443
 
451
 
444
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
452
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
445
  def __init__(self, iprot, oprot=None):
453
  def __init__(self, iprot, oprot=None):
446
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
454
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
447
 
455
 
Line 1994... Line 2002...
1994
    result = addOosStatusForItem_result()
2002
    result = addOosStatusForItem_result()
1995
    result.read(self._iprot)
2003
    result.read(self._iprot)
1996
    self._iprot.readMessageEnd()
2004
    self._iprot.readMessageEnd()
1997
    return
2005
    return
1998
 
2006
 
-
 
2007
  def getOosStatusesForXDaysForItem(self, itemId, days):
-
 
2008
    """
-
 
2009
    Parameters:
-
 
2010
     - itemId
-
 
2011
     - days
-
 
2012
    """
-
 
2013
    self.send_getOosStatusesForXDaysForItem(itemId, days)
-
 
2014
    return self.recv_getOosStatusesForXDaysForItem()
-
 
2015
 
-
 
2016
  def send_getOosStatusesForXDaysForItem(self, itemId, days):
-
 
2017
    self._oprot.writeMessageBegin('getOosStatusesForXDaysForItem', TMessageType.CALL, self._seqid)
-
 
2018
    args = getOosStatusesForXDaysForItem_args()
-
 
2019
    args.itemId = itemId
-
 
2020
    args.days = days
-
 
2021
    args.write(self._oprot)
-
 
2022
    self._oprot.writeMessageEnd()
-
 
2023
    self._oprot.trans.flush()
-
 
2024
 
-
 
2025
  def recv_getOosStatusesForXDaysForItem(self, ):
-
 
2026
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
2027
    if mtype == TMessageType.EXCEPTION:
-
 
2028
      x = TApplicationException()
-
 
2029
      x.read(self._iprot)
-
 
2030
      self._iprot.readMessageEnd()
-
 
2031
      raise x
-
 
2032
    result = getOosStatusesForXDaysForItem_result()
-
 
2033
    result.read(self._iprot)
-
 
2034
    self._iprot.readMessageEnd()
-
 
2035
    if result.success is not None:
-
 
2036
      return result.success
-
 
2037
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOosStatusesForXDaysForItem failed: unknown result");
-
 
2038
 
1999
 
2039
 
2000
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
2040
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
2001
  def __init__(self, handler):
2041
  def __init__(self, handler):
2002
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
2042
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
2003
    self._processMap["addWarehouse"] = Processor.process_addWarehouse
2043
    self._processMap["addWarehouse"] = Processor.process_addWarehouse
Line 2045... Line 2085...
2045
    self._processMap["getAllIgnoredInventoryupdateItemsCount"] = Processor.process_getAllIgnoredInventoryupdateItemsCount
2085
    self._processMap["getAllIgnoredInventoryupdateItemsCount"] = Processor.process_getAllIgnoredInventoryupdateItemsCount
2046
    self._processMap["getIgnoredInventoryUpdateItemids"] = Processor.process_getIgnoredInventoryUpdateItemids
2086
    self._processMap["getIgnoredInventoryUpdateItemids"] = Processor.process_getIgnoredInventoryUpdateItemids
2047
    self._processMap["updateItemStockPurchaseParams"] = Processor.process_updateItemStockPurchaseParams
2087
    self._processMap["updateItemStockPurchaseParams"] = Processor.process_updateItemStockPurchaseParams
2048
    self._processMap["getItemStockPurchaseParams"] = Processor.process_getItemStockPurchaseParams
2088
    self._processMap["getItemStockPurchaseParams"] = Processor.process_getItemStockPurchaseParams
2049
    self._processMap["addOosStatusForItem"] = Processor.process_addOosStatusForItem
2089
    self._processMap["addOosStatusForItem"] = Processor.process_addOosStatusForItem
-
 
2090
    self._processMap["getOosStatusesForXDaysForItem"] = Processor.process_getOosStatusesForXDaysForItem
2050
 
2091
 
2051
  def process(self, iprot, oprot):
2092
  def process(self, iprot, oprot):
2052
    (name, type, seqid) = iprot.readMessageBegin()
2093
    (name, type, seqid) = iprot.readMessageBegin()
2053
    if name not in self._processMap:
2094
    if name not in self._processMap:
2054
      iprot.skip(TType.STRUCT)
2095
      iprot.skip(TType.STRUCT)
Line 2644... Line 2685...
2644
    oprot.writeMessageBegin("addOosStatusForItem", TMessageType.REPLY, seqid)
2685
    oprot.writeMessageBegin("addOosStatusForItem", TMessageType.REPLY, seqid)
2645
    result.write(oprot)
2686
    result.write(oprot)
2646
    oprot.writeMessageEnd()
2687
    oprot.writeMessageEnd()
2647
    oprot.trans.flush()
2688
    oprot.trans.flush()
2648
 
2689
 
-
 
2690
  def process_getOosStatusesForXDaysForItem(self, seqid, iprot, oprot):
-
 
2691
    args = getOosStatusesForXDaysForItem_args()
-
 
2692
    args.read(iprot)
-
 
2693
    iprot.readMessageEnd()
-
 
2694
    result = getOosStatusesForXDaysForItem_result()
-
 
2695
    result.success = self._handler.getOosStatusesForXDaysForItem(args.itemId, args.days)
-
 
2696
    oprot.writeMessageBegin("getOosStatusesForXDaysForItem", TMessageType.REPLY, seqid)
-
 
2697
    result.write(oprot)
-
 
2698
    oprot.writeMessageEnd()
-
 
2699
    oprot.trans.flush()
-
 
2700
 
2649
 
2701
 
2650
# HELPER FUNCTIONS AND STRUCTURES
2702
# HELPER FUNCTIONS AND STRUCTURES
2651
 
2703
 
2652
class addWarehouse_args:
2704
class addWarehouse_args:
2653
  """
2705
  """
Line 8883... Line 8935...
8883
    oprot.writeFieldStop()
8935
    oprot.writeFieldStop()
8884
    oprot.writeStructEnd()
8936
    oprot.writeStructEnd()
8885
 
8937
 
8886
  def validate(self):
8938
  def validate(self):
8887
    return
8939
    return
-
 
8940
 
-
 
8941
 
-
 
8942
  def __repr__(self):
-
 
8943
    L = ['%s=%r' % (key, value)
-
 
8944
      for key, value in self.__dict__.iteritems()]
-
 
8945
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
8946
 
-
 
8947
  def __eq__(self, other):
-
 
8948
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
8949
 
-
 
8950
  def __ne__(self, other):
-
 
8951
    return not (self == other)
-
 
8952
 
-
 
8953
class getOosStatusesForXDaysForItem_args:
-
 
8954
  """
-
 
8955
  Attributes:
-
 
8956
   - itemId
-
 
8957
   - days
-
 
8958
  """
-
 
8959
 
-
 
8960
  thrift_spec = (
-
 
8961
    None, # 0
-
 
8962
    (1, TType.I64, 'itemId', None, None, ), # 1
-
 
8963
    (2, TType.I32, 'days', None, None, ), # 2
-
 
8964
  )
-
 
8965
 
-
 
8966
  def __init__(self, itemId=None, days=None,):
-
 
8967
    self.itemId = itemId
-
 
8968
    self.days = days
-
 
8969
 
-
 
8970
  def read(self, iprot):
-
 
8971
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
8972
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
8973
      return
-
 
8974
    iprot.readStructBegin()
-
 
8975
    while True:
-
 
8976
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
8977
      if ftype == TType.STOP:
-
 
8978
        break
-
 
8979
      if fid == 1:
-
 
8980
        if ftype == TType.I64:
-
 
8981
          self.itemId = iprot.readI64();
-
 
8982
        else:
-
 
8983
          iprot.skip(ftype)
-
 
8984
      elif fid == 2:
-
 
8985
        if ftype == TType.I32:
-
 
8986
          self.days = iprot.readI32();
-
 
8987
        else:
-
 
8988
          iprot.skip(ftype)
-
 
8989
      else:
-
 
8990
        iprot.skip(ftype)
-
 
8991
      iprot.readFieldEnd()
-
 
8992
    iprot.readStructEnd()
-
 
8993
 
-
 
8994
  def write(self, oprot):
-
 
8995
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
8996
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
8997
      return
-
 
8998
    oprot.writeStructBegin('getOosStatusesForXDaysForItem_args')
-
 
8999
    if self.itemId is not None:
-
 
9000
      oprot.writeFieldBegin('itemId', TType.I64, 1)
-
 
9001
      oprot.writeI64(self.itemId)
-
 
9002
      oprot.writeFieldEnd()
-
 
9003
    if self.days is not None:
-
 
9004
      oprot.writeFieldBegin('days', TType.I32, 2)
-
 
9005
      oprot.writeI32(self.days)
-
 
9006
      oprot.writeFieldEnd()
-
 
9007
    oprot.writeFieldStop()
-
 
9008
    oprot.writeStructEnd()
-
 
9009
 
-
 
9010
  def validate(self):
-
 
9011
    return
-
 
9012
 
-
 
9013
 
-
 
9014
  def __repr__(self):
-
 
9015
    L = ['%s=%r' % (key, value)
-
 
9016
      for key, value in self.__dict__.iteritems()]
-
 
9017
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
9018
 
-
 
9019
  def __eq__(self, other):
-
 
9020
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
9021
 
-
 
9022
  def __ne__(self, other):
-
 
9023
    return not (self == other)
-
 
9024
 
-
 
9025
class getOosStatusesForXDaysForItem_result:
-
 
9026
  """
-
 
9027
  Attributes:
-
 
9028
   - success
-
 
9029
  """
-
 
9030
 
-
 
9031
  thrift_spec = (
-
 
9032
    (0, TType.LIST, 'success', (TType.STRUCT,(OOSStatus, OOSStatus.thrift_spec)), None, ), # 0
-
 
9033
  )
-
 
9034
 
-
 
9035
  def __init__(self, success=None,):
-
 
9036
    self.success = success
-
 
9037
 
-
 
9038
  def read(self, iprot):
-
 
9039
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
9040
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
9041
      return
-
 
9042
    iprot.readStructBegin()
-
 
9043
    while True:
-
 
9044
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
9045
      if ftype == TType.STOP:
-
 
9046
        break
-
 
9047
      if fid == 0:
-
 
9048
        if ftype == TType.LIST:
-
 
9049
          self.success = []
-
 
9050
          (_etype196, _size193) = iprot.readListBegin()
-
 
9051
          for _i197 in xrange(_size193):
-
 
9052
            _elem198 = OOSStatus()
-
 
9053
            _elem198.read(iprot)
-
 
9054
            self.success.append(_elem198)
-
 
9055
          iprot.readListEnd()
-
 
9056
        else:
-
 
9057
          iprot.skip(ftype)
-
 
9058
      else:
-
 
9059
        iprot.skip(ftype)
-
 
9060
      iprot.readFieldEnd()
-
 
9061
    iprot.readStructEnd()
-
 
9062
 
-
 
9063
  def write(self, oprot):
-
 
9064
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
9065
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
9066
      return
-
 
9067
    oprot.writeStructBegin('getOosStatusesForXDaysForItem_result')
-
 
9068
    if self.success is not None:
-
 
9069
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
9070
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
9071
      for iter199 in self.success:
-
 
9072
        iter199.write(oprot)
-
 
9073
      oprot.writeListEnd()
-
 
9074
      oprot.writeFieldEnd()
-
 
9075
    oprot.writeFieldStop()
-
 
9076
    oprot.writeStructEnd()
-
 
9077
 
-
 
9078
  def validate(self):
-
 
9079
    return
8888
 
9080
 
8889
 
9081
 
8890
  def __repr__(self):
9082
  def __repr__(self):
8891
    L = ['%s=%r' % (key, value)
9083
    L = ['%s=%r' % (key, value)
8892
      for key, value in self.__dict__.iteritems()]
9084
      for key, value in self.__dict__.iteritems()]