haorenhui
2023-10-30 6d6cc10d9e8e242661da7fd655dec155a09d676c
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
Quintiq file version 2.0
#parent: #root
Method GetHasTianmaNonSupplierOperationWithNoInput (
  output Strings feedback_o,
  output Strings sanitycheckfeedback_o
) declarative remote as Boolean
{
  TextBody:
  [*
    // Tianma change 20230925: If the unit is not a supplier, raise a data issue if there's no input
    value := forall( this, RoutingStep.Operation, operation,
                     guard( operation.Unit().IsSupplier(), false )
                     or operation.OperationInput( relsize ) > 0 );
    
    if( not value )
    {
      // Add instance text
      routingname := MacroPlan::GetSubstituteName( this.Name() );
      instance := Translations::MP_Routing_Instance( routingname );
      feedback := SanityCheckMessage::GetFormattedMessage( instance,
                                                           "非供应商操作没有投入料。" );
      feedback_o.Add( feedback );
      sanitycheckfeedback_o.Add( SanityCheckCategoryLevel::GetSanityCheckCategoryDataWarning() );
    }
    
    return value;
  *]
}