From 9c9638c18c5098cd429a39723de7c095c14aa360 Mon Sep 17 00:00:00 2001 From: renhao <renhui.hao@capgemini.com> Date: 星期一, 25 九月 2023 22:12:09 +0800 Subject: [PATCH] 供应商unit --- _Main/BL/Type_Unit/StaticMethod_CreateOrUpdate.qbl | 8 +++++--- _Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/_Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl index eeb6a49..e826ddb 100644 --- a/_Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl +++ b/_Main/BL/Type_MacroPlan/Method_MappingUnitData.qbl @@ -42,12 +42,13 @@ infinite, unitofmeasurename ); - Unit::CreateOrUpdate( this, + supplyunit := Unit::CreateOrUpdate( this, "渚涘簲鍟�", "渚涘簲鍟�", "澶╅┈闆嗗洟", infinite, unitofmeasurename ); + supplyunit.IsSupplier(true); Unit::CreateOrUpdate( this, "鏁磋溅杩愯緭", diff --git a/_Main/BL/Type_Unit/StaticMethod_CreateOrUpdate.qbl b/_Main/BL/Type_Unit/StaticMethod_CreateOrUpdate.qbl index df72958..5806f00 100644 --- a/_Main/BL/Type_Unit/StaticMethod_CreateOrUpdate.qbl +++ b/_Main/BL/Type_Unit/StaticMethod_CreateOrUpdate.qbl @@ -7,7 +7,7 @@ String parentunitid, String capacitytype, String unitofmeasurename -) +) as Unit { TextBody: [* @@ -21,7 +21,7 @@ unit := Unit::FindById( owner, id ); if( id="澶╅┈闆嗗洟" and isnull( unit ) ){ - owner.Unit( relnew, + unit := owner.Unit( relnew, ID := id, Name := name, UnitOfMeasureName := unitofmeasurename, @@ -31,7 +31,7 @@ CapacityType := capacitytype ); }else{ if( isnull( unit ) ){ - owner.Unit( relnew, ID := id, + unit := owner.Unit( relnew, ID := id, Name := name, ParentUnitID := parentunitid, CapacityType := capacitytype, @@ -46,5 +46,7 @@ unit.UnitOfMeasureName( unitofmeasurename ); } } + + return unit; *] } -- Gitblit v1.9.3