lazhen
2024-09-30 936cbe9cabf9ae35420a16d4b00f10965ae63a3c
换型损失设置数量改为正数
已修改11个文件
已添加1个文件
已删除1个文件
78 ■■■■ 文件已修改
_Main/BL/InfoMessages.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ChangeLossSetting/Attribute_ChangeLossNr.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ChangeLossSetting/Attribute_ChangeLossNumber.qbl 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ChangeLossSetting/StaticMethod_ValidateInput.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_CheckImport.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_ExportTemplate.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_Import.qbl 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_OfflinePlanCell/StaticMethod_DeductionOfReplacementLoss.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditChangeLossSetting/Component_pnlContent.def 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditChangeLossSetting/Response_pnlActions_btnOk_OnClick.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_ListChangeLossSetting#568.def 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/UI/MacroPlannerWebApp/Views/Change_loss_setting_view.vw 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/metadata.properties 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/InfoMessages.qbl
@@ -172,7 +172,7 @@
  }
  InfoMessage MP_ChangeLossSettingExcel_Import_PositiveInteger
  {
    DefaultText: 'The import ChangeLossNr is not positive integer.'
    DefaultText: 'The import ChangeLossNr is not positive number.'
  }
  InfoMessage MP_ChangeLossSettingExcel_Import_ProductNoExist
  {
_Main/BL/Type_ChangeLossSetting/Attribute_ChangeLossNr.qbl
ÎļþÒÑɾ³ý
_Main/BL/Type_ChangeLossSetting/Attribute_ChangeLossNumber.qbl
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,7 @@
Quintiq file version 2.0
#parent: #root
Attribute ChangeLossNumber
{
  #keys: '3[415136.0.1176550071][415136.0.1176550070][415136.0.1176550072]'
  ValueType: Real
}
_Main/BL/Type_ChangeLossSetting/StaticMethod_ValidateInput.qbl
@@ -9,15 +9,17 @@
  Product_MP product2,
  Date startdate,
  Date enddate,
  Number number
  String number
) as Boolean
{
  TextBody:
  [*
    // ç”„兰鸽 Jun-5-2024 (created)
    feedback := '';
    if( isnull( unit ) or isnull( product1 ) or isnull( product2 ) or number < 1 ){
    if( [Number]number < 0 ){
      feedback := Translations::MP_ChangeLossSettingExcel_Import_PositiveInteger();
    }
    if( isnull( unit ) or isnull( product1 ) or isnull( product2 ) or [Number]number = 0 ){
      feedback := Translations::MP_ChangeLossSetting_CheckNull();
    }
    if( product1 = product2 ){
_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_CheckImport.qbl
@@ -16,7 +16,7 @@
      error( Translations::MP_ChangeLossSettingExcel_Import_NullInputRequiredField() );
    }
    //导入的数量小于0
    if( exists( macroplan, ChangeLossSettingExcel, excel, [Real]excel.ChangeLossNumber() > 0 and ceil( [Real]excel.ChangeLossNumber() ) <> floor( [Real]excel.ChangeLossNumber() ) ) ){
    if( exists( macroplan, ChangeLossSettingExcel, excel, [Real]excel.ChangeLossNumber() <= 0 ) ){
      error( Translations::MP_ChangeLossSettingExcel_Import_PositiveInteger() );
    }
    //导入产品是否存在
_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_ExportTemplate.qbl
@@ -9,7 +9,7 @@
  [*
    // ç”„兰鸽 Aug-22-2024 (created)
    traverse( macroplan, ChangeLossSetting, cls ){
      macroplan.ChangeLossSettingExcel( relnew, Product1 := cls.ProductFirst().ID(), Product2 := cls.ProductSecond().ID(), Unit := cls.Unit().ID(), ChangeLossNumber := [String]cls.ChangeLossNr(), StartDate := cls.StartDate(), EndDate := cls.EndDate() );
      macroplan.ChangeLossSettingExcel( relnew, Product1 := cls.ProductFirst().ID(), Product2 := cls.ProductSecond().ID(), Unit := cls.Unit().ID(), ChangeLossNumber := [String]cls.ChangeLossNumber(), StartDate := cls.StartDate(), EndDate := cls.EndDate() );
    }
    value := macroplan.MP_ExportChangeLossSettingsBroker().ExecuteToXLS( isxlsxformat ).AsBinaryValue();
    macroplan.ChangeLossSettingExcel( relflush );
_Main/BL/Type_ChangeLossSettingExcel/StaticMethod_Import.qbl
@@ -28,13 +28,14 @@
                                          and cls.Unit().ID() = excel.Unit()
                                          and cls.StartDate() = excel.StartDate()
                                          and cls.EndDate() = excel.EndDate() );
      info( excel.ChangeLossNumber() );
      if( isnull( cls ) ){
        product1        := selectobject( macroplan, Product_MP, product, product.ID() = excel.Product1() );
        product2        := selectobject( macroplan, Product_MP, product, product.ID() = excel.Product2() );
        unit            := selectobject( macroplan, Unit, unit, unit.ID() = excel.Unit() );
        feedback        := '';
        if( ChangeLossSetting::ValidateInput( feedback, macroplan, null( ChangeLossSetting ), unit, product1, product2, excel.StartDate(), excel.EndDate(), [Number]excel.ChangeLossNumber() ) ){
          cls             := macroplan.ChangeLossSetting( relnew, ChangeLossNr := [Number]excel.ChangeLossNumber() );
        if( ChangeLossSetting::ValidateInput( feedback, macroplan, null( ChangeLossSetting ), unit, product1, product2, excel.StartDate(), excel.EndDate(), excel.ChangeLossNumber() ) ){
          cls             := macroplan.ChangeLossSetting( relnew, ChangeLossNumber := [Real]excel.ChangeLossNumber() );
          
          cls.ProductFirst( relset, product1 );
          cls.ProductSecond( relset, product2 );
@@ -47,8 +48,9 @@
          error( feedback );
        }
      }else {
        cls.ChangeLossNr( [Number]excel.ChangeLossNumber() );
        cls.ChangeLossNumber( [Real]excel.ChangeLossNumber() );
      }
      info( '-------------------', cls.ChangeLossNumber() );
      excel.Delete();
    }
  *]
_Main/BL/Type_OfflinePlanCell/StaticMethod_DeductionOfReplacementLoss.qbl
@@ -36,7 +36,7 @@
                                         tempOPC.OfflinePlanRow().Type() = "1" and 
                                         tempOPC.OfflinePlanRow().ProductID() = firstOrderCell.OfflinePlanRow().ProductID()
                                        );
            firstQuantityCell.Value( [String] ( [Number]firstQuantityCell.Value() - cls.ChangeLossNr() ) );
            firstQuantityCell.Value( [String] ( [Number]firstQuantityCell.Value() - cls.ChangeLossNumber() ) );
    //        info( "当前列时间:", opc.ColumnDate().Format( "Y-M2-D2" ), "    å½“前序号:", i, "    å•元格的值:", firstOrderCell.Value(), "    äº§å“åï¼š", firstOrderCell.OfflinePlanRow().ProductID(),
    //              "下一个序号:", i + 1, "    å•元格的值:", secondOrderCell.Value(), "    äº§å“åï¼š", secondOrderCell.OfflinePlanRow().ProductID() );
          }
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditChangeLossSetting/Component_pnlContent.def
@@ -89,18 +89,6 @@
        Taborder: 2
      ]
    }
    Component npChangeLossNr
    {
      #keys: '[415136.0.738250237]'
      BaseType: 'WebNumberPicker'
      Properties:
      [
        DataBinding: 'dhDialogData.Data.ChangeLossNr'
        Label: 'Change loss number'
        Min: '0'
        Taborder: 5
      ]
    }
    Component dsStartDate
    {
      #keys: '[415136.0.1132411785]'
@@ -123,6 +111,17 @@
        Taborder: 4
      ]
    }
    Component efChangeLossNr
    {
      #keys: '[415136.0.1176801957]'
      BaseType: 'WebEditField'
      Properties:
      [
        DataBinding: 'dhDialogData.Data.ChangeLossNumber'
        Label: 'Change loss number'
        Taborder: 5
      ]
    }
  ]
  Properties:
  [
_Main/UI/MacroPlannerWebApp/Component_DialogCreateEditChangeLossSetting/Response_pnlActions_btnOk_OnClick.def
@@ -6,7 +6,7 @@
  DefinitionID: 'Responsedef_WebButton_OnClick'
  Precondition:
  [*
    return ChangeLossSetting::ValidateInput( feedback, MacroPlan, dhDialogData.Data().WrappedInstance(), ddlUnit.Data(), ddlProduct1.Data(), ddlProduct2.Data(), dsStartDate.Date(), dsEndDate.Date(), [Number]npChangeLossNr.Number() );
    return ChangeLossSetting::ValidateInput( feedback, MacroPlan, dhDialogData.Data().WrappedInstance(), ddlUnit.Data(), ddlProduct1.Data(), ddlProduct2.Data(), dsStartDate.Date(), dsEndDate.Date(), efChangeLossNr.Text() );
  *]
  QuillAction
  {
_Main/UI/MacroPlannerWebApp/Component_FormChangeLossSetting/Component_ListChangeLossSetting#568.def
@@ -28,7 +28,7 @@
      ]
      Properties:
      [
        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit.ID","title":"Unit","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"Unit.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductFirst.ID","title":"Product1","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ProductFirst.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductSecond.ID","title":"Product2","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ProductSecond.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StartDate","title":"StartDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"EndDate","title":"EndDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"EndDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ChangeLossNr","title":"ChangeLossNr","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ChangeLossNr"}}]'
        Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Unit.ID","title":"Unit","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"Unit.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductFirst.ID","title":"Product1","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ProductFirst.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductSecond.ID","title":"Product2","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ProductSecond.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"StartDate","title":"StartDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"StartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"EndDate","title":"EndDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"EndDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ChangeLossNumber","title":"ChangeLossNumber","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ChangeLossNumber"}}]'
        ContextMenu: 'listContextMenuChangeLossSetting'
        Taborder: 2
      ]
_Main/UI/MacroPlannerWebApp/Views/Change_loss_setting_view.vw
@@ -78,14 +78,14 @@
              subtotals: ''
              width: 150
            }
            column_ChangeLossNr
            column_ChangeLossNumber
            {
              columnId: 'ChangeLossNr'
              dataPath: 'ChangeLossNr'
              dataType: 'number'
              columnId: 'ChangeLossNumber'
              dataPath: 'ChangeLossNumber'
              dataType: 'real'
              index: 5
              subtotals: ''
              width: 150
              width: 183
            }
          }
        }
_Main/metadata.properties
@@ -1,6 +1,6 @@
component=submodel
kind=Quintiq Metadata File
name=MacroPlanner
version.component=2022.3.0.0
version.component=2022.3.0.56
version.fileformat=2
version.quintiq=6.3.3.0 , build 248673