037 man, cfs_param note
This commit is contained in:
@@ -57,6 +57,7 @@
|
||||
<m:field title="instance_operation_uid">iop.instance_operation_uid::text as instance_operation_uid</m:field>
|
||||
<m:field title="svc_operation_cfs_param_id">iop.svc_operation_cfs_param_id</m:field>
|
||||
<m:field title="param_value">iop.param_value</m:field>
|
||||
<m:field title="note">iop.note</m:field>
|
||||
<m:field title="dt_created">to_char(iop.dt_created, 'YYYY-MM-DD"T"HH24:MI:SS.FF3TZHTZM') as dt_created</m:field>
|
||||
<m:field title="creator_id">iop.creator_id</m:field>
|
||||
<m:field title="svc_operation_cfs_param">sop.svc_operation_cfs_param</m:field>
|
||||
@@ -100,54 +101,12 @@
|
||||
</cffunction>
|
||||
|
||||
|
||||
<!--- <cffunction name="post" hint="Создание нового CFS параметра операции.">
|
||||
<cfargument name="instanceOperationUid" type="string" required=true hint="type:guid"/>
|
||||
<cfargument name="svcOperationCfsParamId" type="string" required=true hint="type:integer"/>
|
||||
<cfargument name="paramValue" type="string" required=true hint="type:string ***Валидацию пока не проводим, а надо"/>
|
||||
|
||||
<cftry>
|
||||
<cfset this.helper.validateField(arguments, "instanceUid", "guid")/>
|
||||
<cfset this.helper.validateField(arguments, "svcOperationCfsParamId", "integer")/>
|
||||
<!--- Еще возможна ошибка, что мы подадим параметр не от своей операции или сервиса - он останется невидим для всех --->
|
||||
<!--- *** Проверка: операция не запущена, иначе создавать параметры нельзя --->
|
||||
|
||||
<cfcatch type="invalidParamValue">
|
||||
<cfreturn representationOf(this.helper.formatBadRequestError(cfcatch)).withStatus(400)/>
|
||||
</cfcatch>
|
||||
</cftry>
|
||||
|
||||
<cfset local={}/>
|
||||
<cfset local.instanceOperationCfsParamUid=#createGUID()#/>
|
||||
|
||||
<cftry>
|
||||
<cfquery name="local.qSave">
|
||||
insert into instance_operation_cfs_param (
|
||||
instance_operation_cfs_param_uid,instance_operation_uid,svc_operation_cfs_param_id,param_value,dt_created,creator_id
|
||||
) values (
|
||||
<cfqueryparam cfsqltype="cf_sql_other" value="#local.instanceOperationCfsParamUid#"/>
|
||||
,<cfqueryparam cfsqltype="cf_sql_other" value="#arguments.instanceOperationUid#"/>
|
||||
,<cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.svcOperationCfsParamId#"/>
|
||||
,<cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.paramValue#"/>
|
||||
,<cfqueryparam cfsqltype="cf_sql_timestamp" value="#Now()#" />
|
||||
,<cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.usrId#" />
|
||||
);
|
||||
</cfquery>
|
||||
|
||||
<cfcatch type="any">
|
||||
<cfreturn representationOf(this.helper.formatException(cfcatch, "Internal Error")).withStatus(500)/><!--- это не нужно показывать в продуктиве --->
|
||||
</cfcatch>
|
||||
</cftry>
|
||||
|
||||
<cfreturn noData()
|
||||
.withHeaders({location: "./#local.instanceOperationCfsParamUid#"})
|
||||
.withStatus(201, "Created")
|
||||
/>
|
||||
</cffunction> --->
|
||||
|
||||
<cffunction name="post" hint="Создание нового CFS параметра операции.">
|
||||
<cfargument name="instanceOperationUid" type="string" required=true hint="type:guid"/>
|
||||
<cfargument name="svcOperationCfsParamId" type="string" required=true hint="type:integer"/>
|
||||
<cfargument name="paramValue" type="string" required=true hint="type:string ***Валидацию пока не проводим, а надо"/>
|
||||
<cfargument name="note" type="string" required=false default="" hint="type:string description: комментарий пользователя"/>
|
||||
|
||||
<cftry>
|
||||
<cfset this.helper.validateField(arguments, "instanceOperationUid", "guid")/>
|
||||
@@ -200,12 +159,13 @@
|
||||
|
||||
<cfquery name="local.qSave">
|
||||
insert into instance_operation_cfs_param (
|
||||
instance_operation_cfs_param_uid,instance_operation_uid,svc_operation_cfs_param_id,param_value,dt_created,creator_id
|
||||
instance_operation_cfs_param_uid,instance_operation_uid,svc_operation_cfs_param_id,param_value,note,dt_created,creator_id
|
||||
) values (
|
||||
<cfqueryparam cfsqltype="cf_sql_other" value="#local.instanceOperationCfsParamUid#"/>
|
||||
,<cfqueryparam cfsqltype="cf_sql_other" value="#arguments.instanceOperationUid#"/>
|
||||
,<cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.svcOperationCfsParamId#"/>
|
||||
,<cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.paramValue#"/>
|
||||
,<cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.note#"/>
|
||||
,<cfqueryparam cfsqltype="cf_sql_timestamp" value="#Now()#" />
|
||||
,<cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.usrId#" />
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user