diff --git a/v1/Application.cfc b/v1/Application.cfc index 9cbc045..8e813d9 100644 --- a/v1/Application.cfc +++ b/v1/Application.cfc @@ -57,7 +57,7 @@ //variables.framework.docs={}; variables.framework.docs.APIName="svc-api"; - variables.framework.docs.APIVersion="0.189"; /*$ git config --global --unset user.password*/ + variables.framework.docs.APIVersion="0.190"; /*$ git config --global --unset user.password*/ variables.framework.globalHeaders = structNew(); variables.framework.globalHeaders["Access-Control-Expose-Headers"] = "Location"; @@ -321,13 +321,22 @@ arguments.requestArguments.contragentId=usrCustomerInfo.contragentId; //Integer arguments.requestArguments.contractId=usrCustomerInfo.contractId; //Integer arguments.requestArguments.specificationId=usrCustomerInfo.specificationId; //Integer + try { arguments.requestArguments.isImpersonated=usrCustomerInfo.impersonation.is_impersonated; - arguments.requestArguments.clientID=usrCustomerInfo.clientID; - arguments.requestArguments.login=usrCustomerInfo.login; } catch (e) { arguments.requestArguments.isImpersonated=false; // так себе решение, надо было бы NULL + } + + try { + arguments.requestArguments.clientID=usrCustomerInfo.clientID; + } catch (e) { arguments.requestArguments.clientID=""; + } + + try { + arguments.requestArguments.login=usrCustomerInfo.login; + } catch (e) { arguments.requestArguments.login=""; } diff --git a/v1/resources/instance.cfc b/v1/resources/instance.cfc index 63b1597..562203a 100644 --- a/v1/resources/instance.cfc +++ b/v1/resources/instance.cfc @@ -291,6 +291,8 @@ + + select p.svc_operation_cfs_param @@ -304,7 +306,10 @@ join svc_operation_cfs_param sop on (iop.svc_operation_cfs_param_id=sop.svc_operation_cfs_param_id) join instance_operation io on (iop.instance_operation_uid=io.instance_operation_uid) where sop.svc_operation_cfs_param_id=p.svc_operation_cfs_param_id AND - io.instance_uid=) + io.instance_uid= AND + io.instance_operation_uid= + --limit 1 + ) from svc_operation_cfs_param p join svc_operation o on (p.svc_operation_id=o.svc_operation_id) join svc on (o.svc_id=svc.svc_id) diff --git a/v1/resources/instance_operation_cfs_param_ls.cfc b/v1/resources/instance_operation_cfs_param_ls.cfc index 1e82a9d..401d2d6 100644 --- a/v1/resources/instance_operation_cfs_param_ls.cfc +++ b/v1/resources/instance_operation_cfs_param_ls.cfc @@ -213,7 +213,8 @@ arguments.requestArguments.specificationId=usrCustomerInfo.specificationId; //In from svc_operation_cfs_param sop join svc_operation so on (sop.svc_operation_id=so.svc_operation_id) where sop.svc_operation_cfs_param_id= - + + @@ -222,7 +223,7 @@ arguments.requestArguments.specificationId=usrCustomerInfo.specificationId; //In - + insert into instance_operation_cfs_param (