INSERT INTO formdatsource (
`TENANTID`,
`FORMID`,
`DATASOURCENAME`,
`DATABASENAME`,
`DATASOURCE`,
`DELETEFLG`,
`CREATEUSER`,
`CREATEDATETIME`,
`UPDATEUSER`,
`UPDATEDATETIME`
) VALUES
#{item.tenantID},
#{item.formID},
#{item.dataSourceName},
#{item.databaseName},
#{item.datasource},
#{item.deleteFlg},
#{item.createUser},
CURRENT_TIME(),
#{item.updateUser},
CURRENT_TIME()
INSERT INTO `forminterface` (
`TENANTID`,
`FORMID`,
`INTERFACE`,
`INTERFACEMETHOD`,
`CUSTOMINTERFACEMETHOD`,
`DELETEFLG`,
`CREATEUSER`,
`CREATEDATETIME`,
`UPDATEUSER`,
`UPDATEDATETIME`
) VALUES
#{item.tenantID},
#{item.formID},
#{item.INTERFACE},
#{item.interfacemethod},
#{item.customInterfacemethod},
#{item.deleteFlg},
#{item.createUser},
CURRENT_TIME(),
#{item.updateUser},
CURRENT_TIME()
INSERT INTO `FORMEVENT` (
`TENANTID`,
`FORMID`,
`FIELDNAME`,
`EVENT`,
`FIELDTYPE`,
`EVENTMETHOD`,
`DELETEFLG`,
`CREATEUSER`,
`CREATEDATETIME`,
`UPDATEUSER`,
`UPDATEDATETIME`
)VALUES
#{item.tenantID},
#{item.formID},
#{item.fieldName},
#{item.event},
#{item.fieldType},
#{item.eventmethod},
#{item.deleteFlg},
#{item.createUser},
CURRENT_TIME(),
#{item.updateUser},
CURRENT_TIME()
INSERT INTO `formresource` (
`TENANTID`,
`FORMID`,
`RESOURCEFILEID`,
`RESOURCEFILEPATH`,
`DELETEFLG`,
`CREATEUSER`,
`CREATEDATETIME`,
`UPDATEUSER`,
`UPDATEDATETIME`
) values
#{item.tenantID},
#{item.formID},
#{item.resourceFileID},
#{item.resourceFilepath},
#{item.deleteFlg},
#{item.createUser},
CURRENT_TIME(),
#{item.updateUser},
CURRENT_TIME()
INSERT INTO `formsetting` (
`FORMID`,
`TENANTID`,
`SAVEABLE`,
`DISPOSABLE`,
`CLEARABLE`,
`QUERYABLE`,
`CREATEABLE`,
`AUDITABLE`,
`SUBMITABLE`,
`REJECTABLE`,
`PRINTABLE`,
`EXPORTABLE`,
`DELETEFLG`,
`CREATEUSER`,
`CREATEDATETIME`,
`UPDATEUSER`,
`UPDATEDATETIME`,
`editable`,
`deleteable`
) values
#{item.formID},
#{item.tenantID},
#{item.saveable},
#{item.disposable},
#{item.clearable},
#{item.queryable},
#{item.createable},
#{item.auditable},
#{item.submitable},
#{item.rejectable},
#{item.printable},
#{item.exportable},
#{item.deleteFlg},
#{item.createUser},
CURRENT_TIME(),
#{item.updateUser},
CURRENT_TIME(),
#{item.editable},
#{item.deleteable}
INSERT INTO `tab_configuration` (
`FORMID`,
`TENANTID`,
`APPENDIX`,
`PROCESSINFO`,
`DELETEFLG`,
`CREATEUSER`,
`CREATEDATETIME`,
`UPDATEUSER`,
`UPDATEDATETIME`
) values
#{item.formID},
#{item.tenantID},
#{item.appendix},
#{item.processInfo},
0,
#{item.createUser},
CURRENT_TIME(),
#{item.updateUser},
CURRENT_TIME()
INSERT INTO FORMBASE(
FORMID,
TENANTID,
TEMPLATEID,
DESCRIPTION,
ENABLESETTING,
VALIDATIONRULEGROUPID,
DESIGNMODE,
FORMLAYOUT,
FIELDSET,
RESULTFORM,
PUBLISHURL,
REQUIREPASSWORD,
FORMWEIGHT,
FORMHEIGHT,
ACCESSPASSWORD,
SEARCHURL,
DOWNLOADURL,
DELETEFLG,
CREATEUSER,
CREATEDATETIME,
UPDATEUSER,
UPDATEDATETIME,
accountingRule
) VALUES(
#{formID},
#{tenantID},
#{templateID},
#{description},
#{enablesetting},
#{validationRuleGroupID},
#{designMode},
#{formLayout},
#{fieldset},
#{resultForm},
#{publishURL},
#{requirepassword},
#{formWidth},
#{formHeight},
#{accesspassword},
#{searchURL},
#{downloadURL},
'0',
#{createUser},
CURRENT_TIMESTAMP(),
#{createUser},
CURRENT_TIMESTAMP(),
#{accountingRule}
)
INSERT INTO FORMFIELD(
FORMID,
TENANTID,
COLUMNORDERNUM,
FIELDTYPE,
PARENTSUBFORMNUM,
FIELDORDERNUM,
FIELDKEY,
DELETEFLG,
CREATEUSER,
CREATEDATETIME,
UPDATEUSER,
UPDATEDATETIME
) VALUES(
#{formID},
#{tenantID},
#{columnOrderNum},
#{fieldtype},
#{parentsubFormNum},
#{fieldOrderNum},
#{fieldKey},
'0',
#{createUser},
CURRENT_TIMESTAMP(),
#{createUser},
CURRENT_TIMESTAMP()
)
DELETE FROM FORMFIELD
WHERE
FORMID = #{formID}
AND TENANTID = #{tenantID}
INSERT INTO FIELDPROPERTY(
FORMID,
TENANTID,
COLUMNORDERNUM,
PROPERTY,
VALUE,
DELETEFLG,
CREATEUSER,
CREATEDATETIME,
UPDATEUSER,
UPDATEDATETIME
) VALUES
(
#{item.formID,jdbcType=CHAR},
#{item.tenantID,jdbcType=CHAR},
#{item.columnOrderNum,jdbcType=INTEGER},
#{item.property,jdbcType=CHAR},
#{item.value,jdbcType=VARCHAR},
'0',
#{item.createUser,jdbcType=VARCHAR},
CURRENT_TIMESTAMP(),
#{item.createUser,jdbcType=VARCHAR},
CURRENT_TIMESTAMP()
)
INSERT INTO
FORMDATAMANAGER(
FORMID,
TENANTID,
FORMDATANUM,
FORMDATATABLE,
SUBFORMFLG,
SUBFORMFIELDKEY,
DATAROWNUM,
DELETEFLG,
CREATEUSER,
CREATEDATETIME,
UPDATEUSER,
UPDATEDATETIME
) VALUES(
#{formID},
#{tenantID},
#{formdataNum},
#{formdatatable},
#{subFormFlg},
#{subFormfieldKey},
0,
'0',
#{createUser},
CURRENT_TIMESTAMP(),
#{createUser},
CURRENT_TIMESTAMP()
)
DELETE FROM FIELDPROPERTY
WHERE
FORMID = #{formID}
AND TENANTID = #{tenantID}
UPDATE FORMBASE
SET
TEMPLATEID = #{templateID},
DESCRIPTION = #{description},
ENABLESETTING = #{enablesetting},
VALIDATIONRULEGROUPID = #{validationRuleGroupID},
DESIGNMODE = #{designMode},
FORMLAYOUT = #{formLayout},
FIELDSET = #{fieldset},
RESULTFORM = #{resultForm},
PUBLISHURL = #{publishURL},
REQUIREPASSWORD = #{requirepassword},
FORMWEIGHT = #{formWidth},
FORMHEIGHT = #{formHeight},
ACCESSPASSWORD = #{accesspassword},
SEARCHURL = #{searchURL},
DOWNLOADURL = #{downloadURL},
UPDATEUSER = #{updateUser}
WHERE
FORMID = #{formID}
AND TENANTID = #{tenantID}
UPDATE FORMBASE
SET
ENABLESETTING = #{formVersion}
WHERE
FORMID = #{formID}
AND TENANTID = #{tenantID}
UPDATE FORMBASE
SET
TEMPLATEID = #{templateID},
DESCRIPTION = #{description},
VALIDATIONRULEGROUPID = #{validationRuleGroupID},
DESIGNMODE = #{designMode},
FORMLAYOUT = #{formLayout},
FIELDSET = #{fieldset},
RESULTFORM = #{resultForm},
FORMWEIGHT = #{formWidth},
FORMHEIGHT = #{formHeight},
UPDATEUSER = #{updateUser},
accountingRule = #{accountingRule}
WHERE
FORMID = #{formID}
AND TENANTID = #{tenantID}
${excuteSql}
DELETE FROM
FORMDATAMANAGER
WHERE FORMID = #{formID}
AND TENANTID = #{tenantID}
AND subFormFlg =
#{subFormFlg}
AND formdataNum = #{formdataNum}
${excuteUpdateSql}
${excuteAlterSql}
${excuteAlterDataStateSql}
DELETE
FROM
FORMDATAMANAGER
WHERE
FORMID = #{formID}