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