uo_taskdamt_spi.sru 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. $PBExportHeader$uo_taskdamt_spi.sru
  2. forward
  3. global type uo_taskdamt_spi from nonvisualobject
  4. end type
  5. end forward
  6. global type uo_taskdamt_spi from nonvisualobject
  7. end type
  8. global uo_taskdamt_spi uo_taskdamt_spi
  9. forward prototypes
  10. public function integer uf_save (s_eb_cusamt s_import[], ref string arg_msg, boolean ifcommit)
  11. private function string pf_errmsg ()
  12. end prototypes
  13. public function integer uf_save (s_eb_cusamt s_import[], ref string arg_msg, boolean ifcommit);int rslt = 1
  14. rslt = 0
  15. PopulateError(999, '需要子类实现')
  16. arg_msg = pf_errmsg()
  17. GOTO ext
  18. ext:
  19. IF ifcommit THEN
  20. IF rslt = 1 THEN
  21. COMMIT;
  22. ELSE
  23. ROLLBACK;
  24. END IF
  25. END IF
  26. return rslt
  27. //s_taskdamt arg_s_bd
  28. //uo_taskdamt uo_ware
  29. //uo_ware = Create uo_taskdamt
  30. //FOR i = 1 To UpperBound(s_import)
  31. // FOR j = 1 To UpperBound(l_s_amt)
  32. // IF l_s_amt[j].scid = s_import[i].scid &
  33. // And l_s_amt[j].cussptid = s_import[i].cusid &
  34. // And l_s_amt[j].part = s_import[i].part &
  35. // And l_s_amt[j].billdate = s_import[i].billdate &
  36. // And l_s_amt[j].assign_emp = s_import[i].assign_emp &
  37. // And l_s_amt[j].dscrp = s_import[i].dscrp THEN EXIT
  38. // NEXT
  39. //
  40. // IF j > UpperBound(l_s_amt) THEN
  41. // l_s_amt[j].billid = 0
  42. // l_s_amt[j].scid = s_import[i].scid
  43. // l_s_amt[j].cussptid = s_import[i].cusid
  44. // l_s_amt[j].part = s_import[i].part
  45. // l_s_amt[j].billdate = s_import[i].billdate
  46. // l_s_amt[j].assign_emp = s_import[i].assign_emp
  47. // l_s_amt[j].dscrp = s_import[i].dscrp
  48. // END IF
  49. //
  50. // k = UpperBound(l_s_amt[j].arg_s_mx) + 1
  51. // l_s_amt[j].arg_s_mx[k].scid = l_s_amt[j].scid
  52. // l_s_amt[j].arg_s_mx[k].billid = l_s_amt[j].billid
  53. // l_s_amt[j].arg_s_mx[k].printid = k
  54. // l_s_amt[j].arg_s_mx[k].relid = s_import[i].relid
  55. // l_s_amt[j].arg_s_mx[k].reltaskcode = s_import[i].reltaskcode
  56. // l_s_amt[j].arg_s_mx[k].damt = s_import[i].damt
  57. // l_s_amt[j].arg_s_mx[k].dscrp = s_import[i].mxdscrp
  58. // l_s_amt[j].arg_s_mx[k].accountsid = s_import[i].accountsid
  59. // l_s_amt[j].arg_s_mx[k].billamt = s_import[i].billamt
  60. // l_s_amt[j].arg_s_mx[k].itemid = s_import[i].itemid
  61. // l_s_amt[j].arg_s_mx[k].takeamt = s_import[i].takeamt
  62. // l_s_amt[j].arg_s_mx[k].reltakeamt = s_import[i].reltakeamt
  63. // l_s_amt[j].arg_s_mx[k].realmoneyid = s_import[i].realmoneyid
  64. // l_s_amt[j].arg_s_mx[k].realrate = s_import[i].realrate
  65. // l_s_amt[j].arg_s_mx[k].billtype = s_import[i].billtype
  66. // l_s_amt[j].arg_s_mx[k].banktypeid = s_import[i].banktypeid
  67. // l_s_amt[j].arg_s_mx[k].reldamt = s_import[i].reldamt
  68. //NEXT
  69. //
  70. //FOR i = 1 To UpperBound(l_s_amt)
  71. // IF uo_ware.Save(l_s_amt[i],arg_msg,False) <> 1 THEN
  72. // rslt = 0
  73. // GOTO ext
  74. // END IF
  75. //NEXT
  76. end function
  77. private function string pf_errmsg ();String rslt
  78. rslt = Error.Text + ' at ' + Error.ObjectEvent + ' in ' + Error.Object + ' line ' + String(Error.Line)
  79. RETURN rslt
  80. end function
  81. on uo_taskdamt_spi.create
  82. call super::create
  83. TriggerEvent( this, "constructor" )
  84. end on
  85. on uo_taskdamt_spi.destroy
  86. TriggerEvent( this, "destructor" )
  87. call super::destroy
  88. end on