| | |
| | | |
| | | if( priorityFactor.Name() = "å¤§å¼ ç婿°´å¹³" ) |
| | | { |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5, |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5, |
| | | IsRange := false,GradingName := "大ç",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3, |
| | | IsRange := false,GradingName := "å°ç",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | |
| | | |
| | | if( priorityFactor.Name() = "客æ·çç¥" ) |
| | | { |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5, |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5, |
| | | IsRange := false,GradingName := "81%â¤Xâ¤100%",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 4, |
| | | IsRange := false,GradingName := "61%â¤Xâ¤80%",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | |
| | | IsRange := false,GradingName := "1%â¤Xâ¤20%",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | } |
| | | |
| | | if( priorityFactor.Name() = "ç»åå¸åºç级" ) |
| | | { |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5, |
| | | IsRange := false,GradingName := "æç¥",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3, |
| | | IsRange := false,GradingName := "éç¹",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 1, |
| | | IsRange := false,GradingName := "æ½å",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | } |
| | | |
| | | if( priorityFactor.Name() = "订åä¸åæ¶é´" ) |
| | | { |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5, |
| | | IsRange := false,GradingName := "120",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 4, |
| | | IsRange := false,GradingName := "90",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3, |
| | | IsRange := false,GradingName := "60",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 2, |
| | | IsRange := false,GradingName := "30",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 1, |
| | | IsRange := false,GradingName := "0",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | } |
| | | |
| | | if( priorityFactor.Name() = "éæ±ç±»å" ) |
| | | { |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5, |
| | | IsRange := false,GradingName := "æé¢æµ",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3, |
| | | IsRange := false,GradingName := "æ 颿µ",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 1, |
| | | IsRange := false,GradingName := "çº¯é¢æµ",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | } |
| | | |
| | | if( priorityFactor.Name() = "客æ·ç级" ) |
| | | { |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5, |
| | | IsRange := false,GradingName := "81%â¤Xâ¤100%",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 4, |
| | | IsRange := false,GradingName := "61%â¤Xâ¤80%",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5, |
| | | IsRange := false,GradingName := "æç¥",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3, |
| | | IsRange := false,GradingName := "41%â¤Xâ¤60%",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 2, |
| | | IsRange := false,GradingName := "21%â¤Xâ¤40%",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | IsRange := false,GradingName := "éç¹",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 1, |
| | | IsRange := false,GradingName := "1%â¤Xâ¤20%",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | IsRange := false,GradingName := "æ½å",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | } |
| | | |
| | | if( priorityFactor.Name() = "DOI" or priorityFactor.Name() = "DSI") |
| | | { |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 5, |
| | | IsRange := false,GradingName := "<7",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 3, |
| | | IsRange := false,GradingName := "<15",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 1, |
| | | IsRange := false,GradingName := "<30",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | priorityFactor.PriorityFactorDetails(relnew,BusinessType := priorityFactor.BusinessType(), IsBusinessType := isBusinessType,GradeTarget := 1, |
| | | IsRange := false,GradingName := ">30",RangeMin := 0.0,RangeMax := 0.0,PriorityFactorName := priorityFactor.Name()); |
| | | } |
| | | *] |
| | | } |
| | |
| | | { |
| | | // 䏿¯ç¬¦å· ç´æ¥è·å计ç®åçæ°å¼ |
| | | score := PriorityResult::GetDetailsValue( customerOrder,remindFormula,macroPlan,globalOTDTable); |
| | | |
| | | info( "123123"); |
| | | // æªåæå·²ç»è®¡ç®çä¼å
级å å éå½è®¡ç® |
| | | remindFormula := PriorityResult::GetRemindFormula( remindFormula,macroPlan); |
| | | PriorityResult::CalculateScore( remindFormula,customerOrder,businessType,macroPlan,score,globalOTDTable); |
| | |
| | | TextBody: |
| | | [* |
| | | // NBoTk Sep-26-2023 (created) |
| | | // å½å计ç®ä¼å
级å åç»å 妿è·åä¸å°å
¨é¨å
é»è®¤ä¸º1 |
| | | |
| | | value := 0.0; |
| | | |
| | |
| | | if( "å¤§å¼ ç婿°´å¹³" = priorityFactor.Name()) |
| | | { |
| | | obj := selectobject( priorityFactor,PriorityFactorDetails,p , p.PriorityFactorName() = "å¤§å¼ ç婿°´å¹³" and p.GradingName() = customerOrder.SheetProfitability()); |
| | | value := priorityFactor.Coefficient() * obj.GradeTarget(); |
| | | gradeTarget := 1.0; |
| | | if( not isnull( obj ) ) |
| | | { |
| | | gradeTarget := obj.GradeTarget(); |
| | | } |
| | | value := priorityFactor.Coefficient() * gradeTarget; |
| | | } |
| | | |
| | | if( "DOI" = priorityFactor.Name()) |
| | | { |
| | | // DOIæ°æ® |
| | | obj := selectobject( globalOTDTable,Global_MappingDOI_DSI,doi,doi.ProductID() = customerOrder.ProductID()) |
| | | value := priorityFactor.Coefficient() * [Real]obj.DOI(); |
| | | doi := 1.0; |
| | | if( not isnull( obj ) ) |
| | | { |
| | | doi := [Real]obj.DOI(); |
| | | } |
| | | value := priorityFactor.Coefficient() * doi; |
| | | } |
| | | |
| | | if( "DSI" = priorityFactor.Name()) |
| | | { |
| | | // DOIæ°æ® |
| | | obj := selectobject( globalOTDTable,Global_MappingDOI_DSI,doi,doi.ProductID() = customerOrder.ProductID()) |
| | | value := priorityFactor.Coefficient() * [Real]obj.DSI(); |
| | | dsi := 1.0; |
| | | if( not isnull( obj ) ) |
| | | { |
| | | dsi := [Real]obj.DSI(); |
| | | } |
| | | value := priorityFactor.Coefficient() * dsi; |
| | | } |
| | | |
| | | if( "ç»åå¸åºç级" = priorityFactor.Name()) |
| | | { |
| | | obj := selectobject( priorityFactor,PriorityFactorDetails,p , p.PriorityFactorName() = "ç»åå¸åºç级" and p.GradingName() = customerOrder.SegmentPriority()); |
| | | value := priorityFactor.Coefficient() * obj.GradeTarget(); |
| | | gradeTarget := 1.0; |
| | | if( not isnull( obj ) ) |
| | | { |
| | | gradeTarget := obj.GradeTarget(); |
| | | } |
| | | value := priorityFactor.Coefficient() * gradeTarget; |
| | | } |
| | | |
| | | if( "éæ±ç±»å" = priorityFactor.Name()) |
| | | { |
| | | // æé¢æµ æ 颿µ çº¯é¢æµ |
| | | obj := selectobject( priorityFactor,PriorityFactorDetails,p,p.GradingName() = customerOrder.OrderType()); |
| | | value := priorityFactor.Coefficient() * obj.GradeTarget(); |
| | | gradeTarget := 1.0; |
| | | if( not isnull( obj ) ) |
| | | { |
| | | gradeTarget := obj.GradeTarget(); |
| | | } |
| | | value := priorityFactor.Coefficient() * gradeTarget; |
| | | } |
| | | |
| | | if( "客æ·ç级" = priorityFactor.Name()) |
| | | { |
| | | // éè¿æ°æ®æ¹è®¡ç®å®¢æ·ç级 |
| | | obj := selectobject( globalOTDTable,Global_MappingCustomerGrade,doi,doi.BusinessType() = customerOrder.BusinessType() and doi.Customer() = customerOrder.CustomerName()) |
| | | value := priorityFactor.Coefficient() * [Real]obj.CustomerGrade(); |
| | | obj := selectobject( globalOTDTable,Global_MappingCustomerGrade,doi,doi.BusinessType() = customerOrder.BusinessType() and doi.Customer() = customerOrder.CustomerName()) |
| | | customerGrade := 1.0; |
| | | if( not isnull( obj ) ) |
| | | { |
| | | customerGrade := [Real]obj.CustomerGrade(); |
| | | } |
| | | value := priorityFactor.Coefficient() * customerGrade; |
| | | } |
| | | |
| | | if( "订åä¸åæ¶é´" = priorityFactor.Name()) |
| | |
| | | { |
| | | if( formula.StartsWith( p.Name()) ) |
| | | { |
| | | str := formula.SubString( 0 + p.Name().Length(),formula.Length()); |
| | | // 夿å©ä½å符é¿åº¦ |
| | | if( p.Name().Length() = formula.Length() ) |
| | | { |
| | | str := "" |
| | | } |
| | | else |
| | | { |
| | | str := formula.SubString( 0 + p.Name().Length(),formula.Length()); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | traverse( macroPlan,SalesDemand.astype( CustomerOrder ),e) |
| | | { |
| | | // äºä¸é¨ä¿¡æ¯ |
| | | businessType := e.BusinessType(); |
| | | //businessType := e.BusinessType(); |
| | | businessType := "ææºäºä¸é¨"; |
| | | |
| | | // è·å对åºäºä¸é¨è®¡ç®å
¬å¼ |
| | | priorityPolicys := selectobject( macroPlan,PriorityPolicy,p,p.BusinessType() = businessType and p.Name() = priorityPolicyName); |
| | |
| | | obj := selectobject( macroPlan,SalesDemand.astype( CustomerOrder ),order, |
| | | order.ID() = e.CustomerOrderID() |
| | | ); |
| | | obj.PriorityName([String]priorityValue); |
| | | |
| | | // å建ä¼å
çº§æ°æ® |
| | | macroPlan.Priority(relnew,Weight := priorityValue,Name := [String]priorityValue); |
| | | priorityValue := priorityValue + 1; |
| | | // è®¢åæ°æ®ä¸ä¸ºç©ºååå¤ç |
| | | if( not isnull( obj ) ) |
| | | { |
| | | obj.PriorityName([String]priorityValue); |
| | | |
| | | // å建ä¼å
çº§æ°æ® |
| | | macroPlan.Priority(relnew,Weight := priorityValue,Name := obj.OrderID()); |
| | | priorityValue := priorityValue + 1; |
| | | } |
| | | |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method CalculatePriorityResult () id:Method_DialogChoosePriorityPolicy_CalculatePriorityResult |
| | | { |
| | | #keys: '[414382.0.577602130]' |
| | | Body: |
| | | [* |
| | | name := PriorityPolicyStringList.Text(); |
| | | PriorityResult::CalculatePriorityResult(name,MacroPlan,GlobalOTDTable); |
| | | this.Close(); |
| | | *] |
| | | } |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | name := PriorityPolicyStringList.Text(); |
| | | PriorityResult::CalculatePriorityResult(name,MacroPlan,GlobalOTDTable); |
| | | dlg := construct( DialogChoosePriorityPolicy ); |
| | | dlg.CalculatePriorityResult(); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | |
| | | BaseType: 'WebButton' |
| | | Properties: |
| | | [ |
| | | Label: '*' |
| | | Label: '-' |
| | | Taborder: 3 |
| | | ] |
| | | } |