标签:selectrow loop orm null dea ctr datastore proc varchar
/*保存表单组件*/ saveFormControl: function (controls) { var that = this; //当勾选的组件不为空时 if (controls != undefined && controls != null && controls.length > 0) { var controlList = []; for (var i = 0; i < controls.length; ++i) { controlList[i] = controls[i].WF_CTRL_CODE; } //参数 var param = { reqType: "SaveFormControl", formID: that.uiStore.gvFormList.getSelectRow().WF_FORM_ID,//表单id formControls: controlList.join(‘,‘) }; that.ajaxDeal(that.dataStore.ajaxUrl, param, function () { //新增成功 //that.dataStore.sortFieldIndex = null; that.loadFormList(); }); } },
数据库拆分
/* 功能描述:流程表单组件保存 创建人:wenjing.shao 2018-10-11 */ PROCEDURE FORM_CONTROL_SAVE ( P_WF_FORM_ID TWF_FORM.WF_FORM_ID%TYPE, P_WF_FORM_CONTROLS VARCHAR2 ) AS V_COUNT INTEGER; V_SORT INTEGER; V_FORM_CONTROL_LIST VAR_LIST; --分割P_F_CODE BEGIN V_FORM_CONTROL_LIST := PKG_TOOL.PARSE_VAR_LIST(P_WF_FORM_CONTROLS); FOR I IN 1 .. V_FORM_CONTROL_LIST.COUNT LOOP SELECT COUNT(1) INTO V_COUNT FROM TWF_FORM_CONTROL WHERE WF_FORM_ID = P_WF_FORM_ID AND WF_CTRL_CODE = V_FORM_CONTROL_LIST(I); IF V_COUNT = 0 THEN SELECT NVL(MAX(INDEX_NO), 0) + 1 INTO V_SORT FROM TWF_FORM_CONTROL WHERE WF_FORM_ID = P_WF_FORM_ID; INSERT INTO TWF_FORM_CONTROL (WF_FORM_ID, WF_CTRL_CODE, INDEX_NO) VALUES (P_WF_FORM_ID, V_FORM_CONTROL_LIST(I), V_SORT); END IF; END LOOP; END FORM_CONTROL_SAVE;
标签:selectrow loop orm null dea ctr datastore proc varchar
原文地址:https://www.cnblogs.com/ChenMM/p/10129678.html