陈清红
2025-04-14 880f3c0257eeb8c37761d484258fdd102a369a19
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Quintiq file version 2.0
#parent: #root
StaticMethod ValidateInput (
  output String feedback_o,
  output String sanitycheckfeedback_o,
  MacroPlan macroPlan,
  String code,
  String vehicleModel,
  ThreeDigitCode selection
) declarative remote as Boolean
{
  TextBody:
  [*
    // lihongji May-14-2024 (created)
    feedback_o            := "";
    sanitycheckfeedback_o := "";
    
    if ( code.TrimBoth() = "" or vehicleModel.TrimBoth() = "" ) {
      feedback_o            := ifexpr( code.TrimBoth() = "", Translations::A_VWED_SixDigitCode_Code() + "、", "" )                 +  
                               ifexpr( vehicleModel.TrimBoth() = "", Translations::A_VWED_PR_PP_Budget_VehicleModel() + "、", "" );
      feedback_o            := Translations::A_VWED_SixDigitCode_VerificationRules1( guard( feedback_o.SubString( 0, feedback_o.Length() - 1 ), "error" ) );
      sanitycheckfeedback_o := SanityCheckCategoryLevel::GetSanityCheckCategoryPlanningWarning();
    } else if ( code.TrimBoth() <> "" and exists( macroPlan, ThreeDigitCode, tempTDC, tempTDC.Code() = code and tempTDC <> selection ) ) {
      feedback_o            := Translations::A_VWED_ThreeDigitCode_VerificationRules2();
      sanitycheckfeedback_o := SanityCheckCategoryLevel::GetSanityCheckCategoryPlanningWarning();
    } else if ( vehicleModel.TrimBoth() <> "" and not exists( macroPlan, SalesSegment_MP, tempSSMP, tempSSMP.Name() = vehicleModel ) ) {
      feedback_o            := Translations::A_VWED_SixDigitCode_VerificationRules3();
      sanitycheckfeedback_o := SanityCheckCategoryLevel::GetSanityCheckCategoryPlanningWarning();
    }
    
    return feedback_o = "";
  *]
}