12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- $PBExportHeader$f_inware_cp_audit.srf
- global type f_inware_cp_audit from function_object
- end type
- forward prototypes
- global function integer f_inware_cp_audit (ref string arg_msg, ref long arg_cnt, ref long arg_failcnt)
- end prototypes
- global function integer f_inware_cp_audit (ref string arg_msg, ref long arg_cnt, ref long arg_failcnt);uo_inware_cp uo_ware
- uo_ware = Create uo_inware_cp
- uo_ware.commit_transaction = sqlca
- datastore ds_inware
- ds_inware = Create datastore
- ds_inware.DataObject = 'ds_inware_cp_noaudit_pda'
- ds_inware.SetTransObject(sqlca)
- ds_inware.Retrieve()
- Long ll_i
- String ls_inwarecode
- Long ll_scid,ll_inwareid
- String ls_msg
- Long ll_fail,ll_suc
- FOR ll_i = 1 To ds_inware.RowCount()
- ll_scid = ds_inware.Object.scid[ll_i]
- ll_inwareid = ds_inware.Object.inwareid[ll_i]
- ls_inwarecode = ds_inware.Object.inwarecode[ll_i]
-
- IF uo_ware.getinfo(ll_scid,ll_inwareid,ls_msg) = 0 THEN
- ROLLBACK;
- arg_msg = arg_msg + ls_inwarecode + ' 审核失败,'+ls_msg + '~r~n'
- ll_fail++
- CONTINUE
- END IF
-
- IF uo_ware.auditing(True,ls_msg) = 0 THEN
- ROLLBACK;
- arg_msg = arg_msg + ls_inwarecode + ' 审核失败,'+ls_msg + '~r~n'
- ll_fail++
- CONTINUE
- END IF
-
- ll_suc++
- NEXT
- arg_cnt = ll_suc
- arg_failcnt = ll_fail
- Destroy uo_ware
- Destroy ds_inware
- RETURN 1
- end function
|