From 160249d574bc6776d347eb7c046ee2d759af8c16 Mon Sep 17 00:00:00 2001 From: yunchai <yunying.chai@capgemini.com> Date: 星期六, 07 十月 2023 21:34:32 +0800 Subject: [PATCH] 临时提交 --- _Main/UI/MacroPlannerWebApp/Component_FrmErrorLogs/Response_Panel391_Button655_OnClick.def | 39 +++++++++++++ _Main/UI/MacroPlannerWebApp/Component_FrmErrorLogs/Component_Panel391.def | 24 ++++++++ _Main/UI/MacroPlannerWebApp/Component_FrmErrorLogs/_ROOT_Component_FrmErrorLogs.def | 3 _Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedgingEx.qbl | 67 ++++++++++++++++++++++ _Main/UI/MacroPlannerWebApp/Component_FrmErrorLogs/Component_List710.def | 2 _Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderReverseOrAuthorize.qbl | 2 6 files changed, 134 insertions(+), 3 deletions(-) diff --git a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedgingEx.qbl b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedgingEx.qbl new file mode 100644 index 0000000..b32aa30 --- /dev/null +++ b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderHedgingEx.qbl @@ -0,0 +1,67 @@ +Quintiq file version 2.0 +#parent: #root +StaticMethod SM_OrderHedgingEx ( + MacroPlan Owner, + String Operator +) as owning JSON +{ + Description: '濉骇鍚庡啿鍑�' + TextBody: + [* + /*******************************濉骇鍚庤鍗曞啿鍑�*********************** + *鍑芥暟鍚嶇О锛歋M_OrderHedgingEx + *鍒� 寤� 浜猴細yunying + *鍒涘缓鏃堕棿锛�2023-09-27 + *鎻� 杩帮細濉骇鍚庤鍗曞啿鍑�,濉骇鍚庣殑琛細Owner.FillingCapacityOrder + *鍙� 鏁帮細Operator 鎿嶄綔浜� + *杩� 鍥� 鍊硷細JSON {Status: true 鎴愬姛/false 澶辫触,Msg:"鎻愮ず娑堟伅"} + *******************************************************************/ + // 鍒濆鍖栫粨鏋� + bStatus := false; + strMsg :=""; + try + { + error( "AAAAAA"); + if(not isnull( Owner)) + { + // Customer 鎹㈡垚鐘舵�� + NewOrders := selectset( Owner,FillingCapacityOrder,Obj,Obj.State() = "鏈啿鍑�"); + if(NewOrders.Size()>0) + { + traverse( NewOrders,Elements,Obj) + { + if( Obj.OrderType()="鍙嶇" or Obj.OrderType()="鎺堟潈") + { + // 鏇存柊鐘舵�� + Obj.State("宸插啿鍑�"); + } + else + { + strMsg :="璁㈠崟绫诲瀷锛�" + Obj.OrderType() + "鏃犳硶鍐插噺锛�"; + } + } + bStatus:=true; + strMsg :="濉骇鍚庡啿鍑忓畬鎴愶紒"; + } + else + { + strMsg :="鏃犲彲鍐插噺鐨勬暟鎹紒"; + } + } + else + { + strMsg :="鍔犺浇鏁版嵁澶辫触锛岃鍒涘缓鎴栭�夋嫨鍦烘櫙鍚庡啀鎿嶄綔锛�"; + } + } + onerror + { + strMsg :="濉骇鍚庤鍗曞啿鍑忓彂鐢熼敊璇紝璇疯仈绯荤郴缁熺鐞嗗憳锛�"; + // 璁板綍閿欒鏃ュ織 + Owner.H_ErrorLogs(relnew,EClassName := "H_FunctionClass",EDateTime := DateTime::ActualGMTTime(),EFunctionName := "SM_OrderHedgingEx", + DeveloperInformation := e.DeveloperInformation(),ErrorNr := e.ErrorNr(),DetailedInformation := e.DetailedInformation(), + GeneralInformation := e.GeneralInformation()); + } + return JSON::Object().Add( "Status",bStatus) + .Add( "Msg",strMsg).Build(); + *] +} diff --git a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderReverseOrAuthorize.qbl b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderReverseOrAuthorize.qbl index a74b90f..2b201ca 100644 --- a/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderReverseOrAuthorize.qbl +++ b/_Main/BL/Type_H_FunctionClass/StaticMethod_SM_OrderReverseOrAuthorize.qbl @@ -39,7 +39,7 @@ nReverseQtyNew :=0; //璁$畻鍚庣殑鍙嶇鏁伴噺 nAuthorizeQtyNew :=0; //璁$畻鍚庣殑鎺堟潈鏁伴噺 nHaveForecastQty :=0; //鏈夐娴嬫暟閲� - nNoHaveForecastQty:=0;//浜旈娴嬫暟閲� + nNoHaveForecastQty:=0;//鏃犻娴嬫暟閲� // 鑾峰彇棰勬祴鏁伴噺锛堝鎴�+SKU+鏈堜唤 鐞嗚鏄病鏈夌墿鏂欓娴嬶級 OrderForecast := select(Owner, H_OrderForecastRealQty , Obj, Obj.SKU() = SKU and Obj.CustomCode() = CustomerCode diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmErrorLogs/Component_List710.def b/_Main/UI/MacroPlannerWebApp/Component_FrmErrorLogs/Component_List710.def index 975cea9..bd6d61d 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FrmErrorLogs/Component_List710.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FrmErrorLogs/Component_List710.def @@ -36,6 +36,6 @@ ] Properties: [ - Taborder: 1 + Taborder: 2 ] } diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmErrorLogs/Component_Panel391.def b/_Main/UI/MacroPlannerWebApp/Component_FrmErrorLogs/Component_Panel391.def new file mode 100644 index 0000000..c27e0ed --- /dev/null +++ b/_Main/UI/MacroPlannerWebApp/Component_FrmErrorLogs/Component_Panel391.def @@ -0,0 +1,24 @@ +Quintiq file version 2.0 +Component Panel391 +{ + #keys: '[414724.0.193860534]' + BaseType: 'WebPanel' + Children: + [ + Component Button655 + { + #keys: '[414724.0.193860558]' + BaseType: 'WebButton' + Properties: + [ + Image: 'BULL' + Label: '濉骇鍐插噺' + Taborder: 0 + ] + } + ] + Properties: + [ + Taborder: 0 + ] +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmErrorLogs/Response_Panel391_Button655_OnClick.def b/_Main/UI/MacroPlannerWebApp/Component_FrmErrorLogs/Response_Panel391_Button655_OnClick.def new file mode 100644 index 0000000..821d8ed --- /dev/null +++ b/_Main/UI/MacroPlannerWebApp/Component_FrmErrorLogs/Response_Panel391_Button655_OnClick.def @@ -0,0 +1,39 @@ +Quintiq file version 2.0 +#parent: Panel391/Button655 +Response OnClick () id:Response_Panel391_Button655_OnClick +{ + #keys: '[414724.0.194975663]' + CanBindMultiple: false + DefinitionID: 'Responsedef_WebButton_OnClick' + Precondition: + [* + return not isnull( MacroPlan); + *] + QuillAction + { + Body: + [* + HResult := H_FunctionClass::SM_OrderHedgingEx( MacroPlan,"娴嬭瘯鐢ㄦ埛" ); + Msg := HResult.Get( "Msg").GetString(); + if( HResult.Get( "Status").GetBoolean()) + { + if( Msg.Length()>0) + { + WebMessageBox::Information(Msg); + } + } + else + { + if( Msg.Length()>0) + { + WebMessageBox::Warning(Msg); + } + else + { + WebMessageBox::Information("杩愯閿欒锛�"); + } + } + *] + GroupServerCalls: false + } +} diff --git a/_Main/UI/MacroPlannerWebApp/Component_FrmErrorLogs/_ROOT_Component_FrmErrorLogs.def b/_Main/UI/MacroPlannerWebApp/Component_FrmErrorLogs/_ROOT_Component_FrmErrorLogs.def index 23776ce..81eec9c 100644 --- a/_Main/UI/MacroPlannerWebApp/Component_FrmErrorLogs/_ROOT_Component_FrmErrorLogs.def +++ b/_Main/UI/MacroPlannerWebApp/Component_FrmErrorLogs/_ROOT_Component_FrmErrorLogs.def @@ -30,9 +30,10 @@ ] Properties: [ - Taborder: 0 + Taborder: 1 ] } + #child: Panel391 ] Properties: [ -- Gitblit v1.9.3