uo_ljjob_order_wkp_barcode_pda.sru 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. $PBExportHeader$uo_ljjob_order_wkp_barcode_pda.sru
  2. forward
  3. global type uo_ljjob_order_wkp_barcode_pda from uo_ljjob
  4. end type
  5. end forward
  6. global type uo_ljjob_order_wkp_barcode_pda from uo_ljjob
  7. end type
  8. global uo_ljjob_order_wkp_barcode_pda uo_ljjob_order_wkp_barcode_pda
  9. type variables
  10. boolean replace = false
  11. boolean finishbarcode = false
  12. end variables
  13. forward prototypes
  14. public subroutine uf_setparm (string arg_parm)
  15. public function integer uf_dojob (ref string arg_msg)
  16. end prototypes
  17. public subroutine uf_setparm (string arg_parm);String ls_key
  18. String ls_value
  19. Long ll_pos, ll_pos2
  20. ls_key = '优先完成时间较早的计划='
  21. ll_pos = Pos(arg_parm, ls_key)
  22. IF ll_pos > 0 THEN
  23. ll_pos = ll_pos + Len(ls_key)
  24. ll_pos2 = Pos(arg_parm, ';', ll_pos)
  25. IF ll_pos2 > 0 THEN
  26. ls_value = Mid(arg_parm, ll_pos, ll_pos2 - ll_pos)
  27. ELSE
  28. ls_value = Mid(arg_parm, ll_pos)
  29. END IF
  30. IF Lower(Trim(ls_value)) = 'true' THEN
  31. Replace = True
  32. END IF
  33. END IF
  34. ls_key = '生成工序完工单='
  35. ll_pos = Pos(arg_parm, ls_key)
  36. IF ll_pos > 0 THEN
  37. ll_pos = ll_pos + Len(ls_key)
  38. ll_pos2 = Pos(arg_parm, ';', ll_pos)
  39. IF ll_pos2 > 0 THEN
  40. ls_value = Mid(arg_parm, ll_pos, ll_pos2 - ll_pos)
  41. ELSE
  42. ls_value = Mid(arg_parm, ll_pos)
  43. END IF
  44. IF Lower(Trim(ls_value)) = 'true' THEN
  45. finishbarcode = True
  46. END IF
  47. END IF
  48. end subroutine
  49. public function integer uf_dojob (ref string arg_msg);Int rslt = 1
  50. uo_checkpda uo_pda
  51. uo_pda = Create uo_checkpda
  52. Long ll_cnt
  53. Long ll_failcnt
  54. IF uo_pda.uof_order_wkp_barcode_pda(Replace, finishbarcode, arg_msg, ll_cnt, ll_failcnt) <> 1 THEN
  55. rslt = 0
  56. GOTO ext
  57. END IF
  58. GOTO ext
  59. ext:
  60. Destroy uo_pda
  61. RETURN rslt
  62. end function
  63. on uo_ljjob_order_wkp_barcode_pda.create
  64. call super::create
  65. end on
  66. on uo_ljjob_order_wkp_barcode_pda.destroy
  67. call super::destroy
  68. end on