Subversion Repositories SmartDukaan

Rev

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

Rev 11751 Rev 12531
Line 589... Line 589...
589
     - inventoryItemId
589
     - inventoryItemId
590
     - type
590
     - type
591
    """
591
    """
592
    pass
592
    pass
593
 
593
 
-
 
594
  def checkGrnImeiStatus(self, imeiNos):
-
 
595
    """
-
 
596
    Parameters:
-
 
597
     - imeiNos
-
 
598
    """
-
 
599
    pass
-
 
600
 
594
 
601
 
595
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
602
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
596
  def __init__(self, iprot, oprot=None):
603
  def __init__(self, iprot, oprot=None):
597
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
604
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
598
 
605
 
Line 2718... Line 2725...
2718
      return result.success
2725
      return result.success
2719
    if result.ex is not None:
2726
    if result.ex is not None:
2720
      raise result.ex
2727
      raise result.ex
2721
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getScansForInventoryItem failed: unknown result");
2728
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getScansForInventoryItem failed: unknown result");
2722
 
2729
 
-
 
2730
  def checkGrnImeiStatus(self, imeiNos):
-
 
2731
    """
-
 
2732
    Parameters:
-
 
2733
     - imeiNos
-
 
2734
    """
-
 
2735
    self.send_checkGrnImeiStatus(imeiNos)
-
 
2736
    return self.recv_checkGrnImeiStatus()
-
 
2737
 
-
 
2738
  def send_checkGrnImeiStatus(self, imeiNos):
-
 
2739
    self._oprot.writeMessageBegin('checkGrnImeiStatus', TMessageType.CALL, self._seqid)
-
 
2740
    args = checkGrnImeiStatus_args()
-
 
2741
    args.imeiNos = imeiNos
-
 
2742
    args.write(self._oprot)
-
 
2743
    self._oprot.writeMessageEnd()
-
 
2744
    self._oprot.trans.flush()
-
 
2745
 
-
 
2746
  def recv_checkGrnImeiStatus(self, ):
-
 
2747
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
2748
    if mtype == TMessageType.EXCEPTION:
-
 
2749
      x = TApplicationException()
-
 
2750
      x.read(self._iprot)
-
 
2751
      self._iprot.readMessageEnd()
-
 
2752
      raise x
-
 
2753
    result = checkGrnImeiStatus_result()
-
 
2754
    result.read(self._iprot)
-
 
2755
    self._iprot.readMessageEnd()
-
 
2756
    if result.success is not None:
-
 
2757
      return result.success
-
 
2758
    if result.ex is not None:
-
 
2759
      raise result.ex
-
 
2760
    raise TApplicationException(TApplicationException.MISSING_RESULT, "checkGrnImeiStatus failed: unknown result");
-
 
2761
 
2723
 
2762
 
2724
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
2763
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
2725
  def __init__(self, handler):
2764
  def __init__(self, handler):
2726
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
2765
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
2727
    self._processMap["getInventoryItem"] = Processor.process_getInventoryItem
2766
    self._processMap["getInventoryItem"] = Processor.process_getInventoryItem
Line 2784... Line 2823...
2784
    self._processMap["getScansforPurchase"] = Processor.process_getScansforPurchase
2823
    self._processMap["getScansforPurchase"] = Processor.process_getScansforPurchase
2785
    self._processMap["getCurrentBadQuantityForItem"] = Processor.process_getCurrentBadQuantityForItem
2824
    self._processMap["getCurrentBadQuantityForItem"] = Processor.process_getCurrentBadQuantityForItem
2786
    self._processMap["scanForBadPurchaseReturn"] = Processor.process_scanForBadPurchaseReturn
2825
    self._processMap["scanForBadPurchaseReturn"] = Processor.process_scanForBadPurchaseReturn
2787
    self._processMap["getItemsInPurchaseReturn"] = Processor.process_getItemsInPurchaseReturn
2826
    self._processMap["getItemsInPurchaseReturn"] = Processor.process_getItemsInPurchaseReturn
2788
    self._processMap["getScansForInventoryItem"] = Processor.process_getScansForInventoryItem
2827
    self._processMap["getScansForInventoryItem"] = Processor.process_getScansForInventoryItem
-
 
2828
    self._processMap["checkGrnImeiStatus"] = Processor.process_checkGrnImeiStatus
2789
 
2829
 
2790
  def process(self, iprot, oprot):
2830
  def process(self, iprot, oprot):
2791
    (name, type, seqid) = iprot.readMessageBegin()
2831
    (name, type, seqid) = iprot.readMessageBegin()
2792
    if name not in self._processMap:
2832
    if name not in self._processMap:
2793
      iprot.skip(TType.STRUCT)
2833
      iprot.skip(TType.STRUCT)
Line 3596... Line 3636...
3596
    oprot.writeMessageBegin("getScansForInventoryItem", TMessageType.REPLY, seqid)
3636
    oprot.writeMessageBegin("getScansForInventoryItem", TMessageType.REPLY, seqid)
3597
    result.write(oprot)
3637
    result.write(oprot)
3598
    oprot.writeMessageEnd()
3638
    oprot.writeMessageEnd()
3599
    oprot.trans.flush()
3639
    oprot.trans.flush()
3600
 
3640
 
-
 
3641
  def process_checkGrnImeiStatus(self, seqid, iprot, oprot):
-
 
3642
    args = checkGrnImeiStatus_args()
-
 
3643
    args.read(iprot)
-
 
3644
    iprot.readMessageEnd()
-
 
3645
    result = checkGrnImeiStatus_result()
-
 
3646
    try:
-
 
3647
      result.success = self._handler.checkGrnImeiStatus(args.imeiNos)
-
 
3648
    except WarehouseServiceException, ex:
-
 
3649
      result.ex = ex
-
 
3650
    oprot.writeMessageBegin("checkGrnImeiStatus", TMessageType.REPLY, seqid)
-
 
3651
    result.write(oprot)
-
 
3652
    oprot.writeMessageEnd()
-
 
3653
    oprot.trans.flush()
-
 
3654
 
3601
 
3655
 
3602
# HELPER FUNCTIONS AND STRUCTURES
3656
# HELPER FUNCTIONS AND STRUCTURES
3603
 
3657
 
3604
class getInventoryItem_args:
3658
class getInventoryItem_args:
3605
  """
3659
  """
Line 12555... Line 12609...
12555
      oprot.writeListEnd()
12609
      oprot.writeListEnd()
12556
      oprot.writeFieldEnd()
12610
      oprot.writeFieldEnd()
12557
    if self.ex is not None:
12611
    if self.ex is not None:
12558
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
12612
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
12559
      self.ex.write(oprot)
12613
      self.ex.write(oprot)
-
 
12614
      oprot.writeFieldEnd()
-
 
12615
    oprot.writeFieldStop()
-
 
12616
    oprot.writeStructEnd()
-
 
12617
 
-
 
12618
  def validate(self):
-
 
12619
    return
-
 
12620
 
-
 
12621
 
-
 
12622
  def __repr__(self):
-
 
12623
    L = ['%s=%r' % (key, value)
-
 
12624
      for key, value in self.__dict__.iteritems()]
-
 
12625
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
12626
 
-
 
12627
  def __eq__(self, other):
-
 
12628
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
12629
 
-
 
12630
  def __ne__(self, other):
-
 
12631
    return not (self == other)
-
 
12632
 
-
 
12633
class checkGrnImeiStatus_args:
-
 
12634
  """
-
 
12635
  Attributes:
-
 
12636
   - imeiNos
-
 
12637
  """
-
 
12638
 
-
 
12639
  thrift_spec = (
-
 
12640
    None, # 0
-
 
12641
    (1, TType.LIST, 'imeiNos', (TType.STRING,None), None, ), # 1
-
 
12642
  )
-
 
12643
 
-
 
12644
  def __init__(self, imeiNos=None,):
-
 
12645
    self.imeiNos = imeiNos
-
 
12646
 
-
 
12647
  def read(self, iprot):
-
 
12648
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
12649
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
12650
      return
-
 
12651
    iprot.readStructBegin()
-
 
12652
    while True:
-
 
12653
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
12654
      if ftype == TType.STOP:
-
 
12655
        break
-
 
12656
      if fid == 1:
-
 
12657
        if ftype == TType.LIST:
-
 
12658
          self.imeiNos = []
-
 
12659
          (_etype287, _size284) = iprot.readListBegin()
-
 
12660
          for _i288 in xrange(_size284):
-
 
12661
            _elem289 = iprot.readString();
-
 
12662
            self.imeiNos.append(_elem289)
-
 
12663
          iprot.readListEnd()
-
 
12664
        else:
-
 
12665
          iprot.skip(ftype)
-
 
12666
      else:
-
 
12667
        iprot.skip(ftype)
-
 
12668
      iprot.readFieldEnd()
-
 
12669
    iprot.readStructEnd()
-
 
12670
 
-
 
12671
  def write(self, oprot):
-
 
12672
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
12673
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
12674
      return
-
 
12675
    oprot.writeStructBegin('checkGrnImeiStatus_args')
-
 
12676
    if self.imeiNos is not None:
-
 
12677
      oprot.writeFieldBegin('imeiNos', TType.LIST, 1)
-
 
12678
      oprot.writeListBegin(TType.STRING, len(self.imeiNos))
-
 
12679
      for iter290 in self.imeiNos:
-
 
12680
        oprot.writeString(iter290)
-
 
12681
      oprot.writeListEnd()
-
 
12682
      oprot.writeFieldEnd()
-
 
12683
    oprot.writeFieldStop()
-
 
12684
    oprot.writeStructEnd()
-
 
12685
 
-
 
12686
  def validate(self):
-
 
12687
    return
-
 
12688
 
-
 
12689
 
-
 
12690
  def __repr__(self):
-
 
12691
    L = ['%s=%r' % (key, value)
-
 
12692
      for key, value in self.__dict__.iteritems()]
-
 
12693
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
12694
 
-
 
12695
  def __eq__(self, other):
-
 
12696
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
12697
 
-
 
12698
  def __ne__(self, other):
-
 
12699
    return not (self == other)
-
 
12700
 
-
 
12701
class checkGrnImeiStatus_result:
-
 
12702
  """
-
 
12703
  Attributes:
-
 
12704
   - success
-
 
12705
   - ex
-
 
12706
  """
-
 
12707
 
-
 
12708
  thrift_spec = (
-
 
12709
    (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0
-
 
12710
    (1, TType.STRUCT, 'ex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
-
 
12711
  )
-
 
12712
 
-
 
12713
  def __init__(self, success=None, ex=None,):
-
 
12714
    self.success = success
-
 
12715
    self.ex = ex
-
 
12716
 
-
 
12717
  def read(self, iprot):
-
 
12718
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
12719
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
12720
      return
-
 
12721
    iprot.readStructBegin()
-
 
12722
    while True:
-
 
12723
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
12724
      if ftype == TType.STOP:
-
 
12725
        break
-
 
12726
      if fid == 0:
-
 
12727
        if ftype == TType.LIST:
-
 
12728
          self.success = []
-
 
12729
          (_etype294, _size291) = iprot.readListBegin()
-
 
12730
          for _i295 in xrange(_size291):
-
 
12731
            _elem296 = iprot.readString();
-
 
12732
            self.success.append(_elem296)
-
 
12733
          iprot.readListEnd()
-
 
12734
        else:
-
 
12735
          iprot.skip(ftype)
-
 
12736
      elif fid == 1:
-
 
12737
        if ftype == TType.STRUCT:
-
 
12738
          self.ex = WarehouseServiceException()
-
 
12739
          self.ex.read(iprot)
-
 
12740
        else:
-
 
12741
          iprot.skip(ftype)
-
 
12742
      else:
-
 
12743
        iprot.skip(ftype)
-
 
12744
      iprot.readFieldEnd()
-
 
12745
    iprot.readStructEnd()
-
 
12746
 
-
 
12747
  def write(self, oprot):
-
 
12748
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
12749
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
12750
      return
-
 
12751
    oprot.writeStructBegin('checkGrnImeiStatus_result')
-
 
12752
    if self.success is not None:
-
 
12753
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
12754
      oprot.writeListBegin(TType.STRING, len(self.success))
-
 
12755
      for iter297 in self.success:
-
 
12756
        oprot.writeString(iter297)
-
 
12757
      oprot.writeListEnd()
-
 
12758
      oprot.writeFieldEnd()
-
 
12759
    if self.ex is not None:
-
 
12760
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
-
 
12761
      self.ex.write(oprot)
12560
      oprot.writeFieldEnd()
12762
      oprot.writeFieldEnd()
12561
    oprot.writeFieldStop()
12763
    oprot.writeFieldStop()
12562
    oprot.writeStructEnd()
12764
    oprot.writeStructEnd()
12563
 
12765
 
12564
  def validate(self):
12766
  def validate(self):