yanyuan
2023-11-01 bcf28ff5a04e52420ce53b224862e9f436166b98
FIx BaseConversionFactor error

基础单位转换数据(中间表)中不允许存在类似PCS转PCS这样自己转自己的数据
已修改3个文件
已删除1个文件
24 ■■■■ 文件已修改
_Main/BL/Type_BaseConversionFactor/StaticMethod_CreateOrUpdate.qbl 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_GlobalDTOTable/Method_SynchronizeDataToMacroPlan#127.qbl 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/DefaultValue_BusinessType.qbl 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_MacroPlan/StaticMethod_DoASync#253.qbl 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_BaseConversionFactor/StaticMethod_CreateOrUpdate.qbl
@@ -26,6 +26,20 @@
      if( productId <> "" ) {
        product := Product_MP::FindById( macroPlan, productId );
      }else{
    //    info( productId );
    //    cf := select( source,
    //              AsSourceUnitOfMeasure,
    //              cf,
    //              ( cf.TargetUnitOfMeasure() = target
    //                or cf.TargetUnitOfMeasure() = source )
    //              and cf.Product_MP() = product
    //              );
    //    info( isnull( cf ) );
    //    info( "sourceuomname: " + cf.astype( BaseConversionFactor ).SourceUnitOfMeasureName() );
    //    info( "targetuomname: " + target.Name() );
    //    info( "cf.targetuomname: " + cf.astype( BaseConversionFactor ).TargetUnitOfMeasureName() );
    //    info( "productid: " + guard( product.ID(), "" ) );
    //    info( "cf.product: " + cf.astype( BaseConversionFactor ).ProductID() );
        result := BaseConversionFactor::CreateUpdate( source, target, factor, product, isEnable )
      }
    
_Main/BL/Type_GlobalDTOTable/Method_SynchronizeDataToMacroPlan#127.qbl
@@ -28,6 +28,7 @@
  TextBody:
  [*
    organcodelist := selectvalues( this, Global_MappingOperationBOM, bom,true, bom.OrganCode() );
    info( macroPlan.BusinessType() );
    businessTypes := macroPlan.BusinessType().Tokenize( "," );
    if( not isnull( businessTypes ) and businessTypes.Size() > 0 ) {
        traverse( businessTypes, Elements, item ) {
@@ -48,7 +49,6 @@
      }
    
    macroPlan.InitialUnitAndStockingPoint();
    info( macroPlan.BusinessType() );
    info( organcodelist.Element( 0 ) );
    //
    //if ( isUnitOfMeasure_MP ) {
_Main/BL/Type_MacroPlan/DefaultValue_BusinessType.qbl
文件已删除
_Main/BL/Type_MacroPlan/StaticMethod_DoASync#253.qbl
@@ -17,6 +17,8 @@
    info( "Prepare to do sync" )
    info( "Get organ code list" )
    businessTypeName := businessType.BusinessTypeName().Tokenize( "," );
    macroPlan.BusinessType( businessType.BusinessTypeName() );
    organcodelist := selectvalues( businessType, OrganCode, organ, true, organ.OrganCodeName() );
    
    if( organcodelist.Size() = 0 ){