UploadOFLRecord.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #pragma once
  2. #include "SpSecureClient.h"
  3. #include "offline_video_record_t.h"
  4. namespace SalesRecorder {
  5. #define MAX_LISTSIZE 50 // 离线双录一次最大提交笔数 add by ly 2018/02/13
  6. #pragma pack(1)
  7. //[StructName("SOVREQ")]
  8. struct SaveOfflineVideoReq
  9. {
  10. char TerminalNo[16];
  11. char VideoSerialID[20];
  12. //char EndTime[20];
  13. char CardNo[32];
  14. char Name[32];
  15. char ProductCode[32];
  16. char ProductName[128];
  17. char ManagerSAP[12];
  18. char ManagerName[32];
  19. char ProductType[12];
  20. char BusinessType[12];
  21. char CompanyCode[8];
  22. char WitnessSAP[12];
  23. char WitnessName[32];
  24. int Duration;
  25. };
  26. //[StructName("SOVANS")]
  27. struct SaveOfflineVideoReply
  28. {
  29. char TerminalNo[16];
  30. char VideoSerialID[20];
  31. int ResultCode;
  32. };
  33. struct OFLVideoRecord
  34. {
  35. char VideoSerialID[20];
  36. char BeginTime[20];
  37. char CardNo[32];
  38. char Name[32];
  39. char ProductCode[32];
  40. char ProductName[128];
  41. char ManagerSAP[12];
  42. char ManagerName[32];
  43. char ProductType[12];
  44. char BusinessType[12];
  45. char CompanyCode[8];
  46. char WitnessSAP[12];
  47. char WitnessName[32];
  48. int Duration;
  49. };
  50. class CUploadOFLRecordConnection : public SpSecureClient
  51. {
  52. public:
  53. explicit CUploadOFLRecordConnection(CEntityBase *pEntity) : SpSecureClient(pEntity) {}
  54. void SendOFLVideoRecord(offline_video_record_t *offlinevideorecord);
  55. void SendOFLVideoRecords(std::vector<offline_video_record_t *> &offlinevideorecordlist);
  56. protected:
  57. virtual ~CUploadOFLRecordConnection() { /*empty implementation*/ }
  58. virtual void OnDisconnect();
  59. virtual void OnPkgAnswer(const CSmartPointer<IPackage> &pRecvPkg);
  60. };
  61. }