在这里form builder不允许commit_form 于是想着用 forms_ddl(‘COMMIT‘); 一实验果然可以实现:
--mend行 sum分拷贝到mid行 copy(name_in(‘mend.SUM_SCORE‘),‘mid.SUM_SCORE_M‘); --copy(name_in(‘mid.STD_SCORE‘),‘mid.SUM_SCORE_M‘); --fnd_message.debug(:mend.SUM_SCORE); --fnd_message.debug(:mid.SUM_SCORE_M); --mid行与难度系数比 copy(name_in(‘mid.SUM_SCORE_M‘) * nvl(name_in(‘mid.HARD_RATIO‘),1),‘mid.MID_AVG_SCORE‘); --mid行平均分到line行 copy(name_in(‘mid.SMALL_AVG‘),‘lines.MID_AVG‘); --line行算总分 copy(name_in(‘lines.MID_AVG‘)*name_in(‘lines.WPM_WEIGHTING‘),‘LINES.WPM_MEND_AVG_SCORE‘); --header行算总分 copy(name_in(‘lines.BIG_SUM‘),‘headers.TOTAL_SCORE‘); copy(name_in(‘HEADERS.PEOPLE_FINAL_SCORE‘),‘HEADERS.FINAL_SCORE‘); /**/ if :mend.MEND_SCORE is not null then :mend.MEND_SUBMIT_FLAG := 1; :mend.M_SU_FLAG := ‘已评价‘; else :mend.MEND_SUBMIT_FLAG := 0; :mend.M_SU_FLAG := ‘未评价‘; end if; UPDATE CUX_HRPE_MEND_T SET MEND_ID = :MEND.MEND_ID, MID_ID = :MEND.MID_ID, LINE_ID = :MEND.LINE_ID, HEADER_ID = :MEND.HEADER_ID, MEND_SUBMIT_FLAG = :MEND.MEND_SUBMIT_FLAG WHERE ROWID = :MEND.row_id; IF (SQL%NOTFOUND) THEN RAISE NO_DATA_FOUND; END IF; forms_ddl(‘COMMIT‘); -- set_record_property(:system.trigger_record,:system.trigger_block, STATUS,QUERY_STATUS); DECLARE l_mend_sub_f NUMBER := 0; l_count_MID NUMBER := 0; l_MID_sub_f NUMBER := 0; l_count_LINE NUMBER := 0; BEGIN --算行提交状态 Select SUM(nvl(MEND_SUBMIT_FLAG,0)),Count(1) into l_mend_sub_f,l_count_MID From CUX_HRPE_MEND_T M Where 1=1 And m.MID_id = :MEND.MID_ID; IF l_mend_sub_f = l_count_MID THEN :MID.MID_SUBMIT_FLAG := 1; :MID.MID_SU_FLAG := ‘已评价‘; ELSE :MID.MID_SUBMIT_FLAG := 0; :MID.MID_SU_FLAG := ‘未评价‘; END IF; UPDATE CUX_HRPE_MID_T SET LINE_ID = :MID.LINE_ID, HEADER_ID = :MID.HEADER_ID, MID_ID = :MID.MID_ID, MID_SUBMIT_FLAG = :MID.MID_SUBMIT_FLAG WHERE ROWID = :MID.row_id; IF (SQL%NOTFOUND) THEN RAISE NO_DATA_FOUND; END IF; forms_ddl(‘COMMIT‘); Select SUM(nvl(MID_SUBMIT_FLAG,0)),Count(1) into l_MID_sub_f,l_count_LINE From CUX_HRPE_Mid_T M Where 1=1 And m.line_id = :MEND.line_id; IF l_MID_sub_f = l_count_LINE THEN :LINES.wpm_submit_flag := 1; :LINES.L_SU_FLAG := ‘已评价‘; ELSE :LINES.wpm_submit_flag := 0; :LINES.L_SU_FLAG := ‘未评价‘; END IF; UPDATE CUX_HRPE_LINES_T SET LINE_ID = :LINES.LINE_ID, HEADER_ID = :LINES.HEADER_ID, WPM_SUBMIT_FLAG = :LINES.WPM_SUBMIT_FLAG WHERE ROWID = :LINES.row_id; IF (SQL%NOTFOUND) THEN RAISE NO_DATA_FOUND; END IF; forms_ddl(‘COMMIT‘); set_record_property(:system.trigger_record,:system.trigger_block, STATUS,QUERY_STATUS); End;
时间: 2024-11-06 17:04:09