f_chkfxfilemapwithmd5andupload.srf 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. $PBExportHeader$f_chkfxfilemapwithmd5andupload.srf
  2. global type f_chkfxfilemapwithmd5andupload from function_object
  3. end type
  4. forward prototypes
  5. global function integer f_chkfxfilemapwithmd5andupload (string a_md5s[], string a_filepaths[], ref string arg_msg)
  6. end prototypes
  7. global function integer f_chkfxfilemapwithmd5andupload (string a_md5s[], string a_filepaths[], ref string arg_msg);// 提交待上传到fx_filemap的附件
  8. // ChkFxFileMapWithMd5AndUpload
  9. // a_md5s[] -- md5
  10. // a_filepaths[] -- 文件全路径
  11. int rslt = 1
  12. if (IsNull(a_md5s)) then
  13. rslt = 0
  14. arg_msg = 'f_chkfxfilemapwithmd5andupload调用异常(0)'
  15. goto ext
  16. end if
  17. if (UpperBound(a_md5s) <= 0) then
  18. rslt = 0
  19. arg_msg = 'f_chkfxfilemapwithmd5andupload调用异常(1)'
  20. goto ext
  21. end if
  22. if (UpperBound(a_md5s) <> UpperBound(a_filepaths)) then
  23. rslt = 0
  24. arg_msg = 'f_chkfxfilemapwithmd5andupload调用异常(2)'
  25. goto ext
  26. end if
  27. long ll_i
  28. oleobject parm, rsp, md5s, filepaths
  29. parm = FXAppCom.CreatePbDictionary()
  30. md5s = FXAppCom.NewPBArray()
  31. filepaths = FXAppCom.NewPBArray()
  32. for ll_i = 1 to UpperBound(a_md5s)
  33. md5s.AddString(a_md5s[ll_i])
  34. filepaths.AddString(a_filepaths[ll_i])
  35. next
  36. parm.SetString('token', app_token_fx)
  37. parm.SetObject('md5s', md5s)
  38. parm.SetObject('filepaths', filepaths)
  39. rsp = FXAppCom.ChkFxFileMapWithMd5AndUpload(parm)
  40. arg_msg = rsp.GetString('ErrMsg')
  41. if (arg_msg <> '') then
  42. rslt = 0
  43. goto ext
  44. end if
  45. ext:
  46. return rslt
  47. end function