no message

parent 438e9075
Quintiq file version 2.0
#parent: #root
Relation MPSync_ExportPlan_ExportPlan_MPSync
{
#keys: '1[413182.1.476046497]'
DefaultRelationStrategy
{
}
RelationSide.LeftSide ExportPlan
{
#keys: '3[413182.1.476046499][413182.1.476046498][413182.1.476046500]'
Cardinality: '0to1'
ObjectDefinition: MPSync
OwningSide: 'Owned'
InterfaceProperties { Accessibility: 'Module' }
}
RelationSide.RightSide MPSync
{
#keys: '3[413182.1.476046502][413182.1.476046501][413182.1.476046503]'
Cardinality: '0to1'
ObjectDefinition: ExportPlan
OwningSide: 'Reference'
InterfaceProperties { Accessibility: 'Module' }
}
}
Quintiq file version 2.0
#parent: #root
Attribute MacroPlanDatasetName
{
#keys: '3[413182.1.473326416][413182.1.473326415][413182.1.473326417]'
ValueType: String
}
Quintiq file version 2.0
#parent: #root
Attribute SessionID
{
#keys: '3[413182.1.473326419][413182.1.473326418][413182.1.473326420]'
ValueType: String
}
Quintiq file version 2.0
#parent: #root
Attribute Status
{
#keys: '3[413182.1.473326422][413182.1.473326421][413182.1.473326423]'
ValueType: String
}
Quintiq file version 2.0
#parent: #root
DefaultValue
{
TargetAttribute: MacroPlanDatasetName
}
Quintiq file version 2.0
#parent: #root
DefaultValue
{
TargetAttribute: SessionID
}
Quintiq file version 2.0
#parent: #root
DefaultValue
{
TargetAttribute: Status
}
Quintiq file version 2.0
#parent: #root
Method OnException (
Exception exception
)
{
TextBody: 'this.SetStatusError()'
}
Quintiq file version 2.0
#parent: #root
Method SetStatusDone
{
TextBody: 'this.Status( LibSOPImpExp_ImportExportBase::Status_Done() );'
}
Quintiq file version 2.0
#parent: #root
Method SetStatusError
{
TextBody: 'this.Status( LibSOPImpExp_ImportExportBase::Status_Error() );'
}
Quintiq file version 2.0
#parent: #root
Method SetStatusIdle
{
TextBody: 'this.Status( LibSOPImpExp_ImportExportBase::Status_Idle() );'
}
Quintiq file version 2.0
#parent: #root
Method SetStatusInProgress
{
TextBody: 'this.Status( LibSOPImpExp_ImportExportBase::Status_InProgress() );'
}
Quintiq file version 2.0
#parent: #root
Method UserDelete (
UserImportProfile user
)
{
TextBody:
[*
// Administration Jun-5-2023 (created)
user.Delete()
*]
}
Quintiq file version 2.0
#parent: #root
StaticMethod FindCreate (
MPSync owner_i,
String username_i,
String macroPlanDatasetName_i
) as ExportPlan
{
TextBody:
[*
importObj := owner_i.ExportPlan( relnew, SessionID := username_i );
// Always set idle (in case re-using import object for the user)
importObj.Status( ExportPlan::Status_Idle() );
importObj.MacroPlanDatasetName( macroPlanDatasetName_i );
return importObj;
*]
}
Quintiq file version 2.0
#parent: #root
StaticMethod Status_Done () remote as String
{
Description: 'Export completed'
TextBody: 'return "Done";'
}
Quintiq file version 2.0
#parent: #root
StaticMethod Status_Error () remote as String
{
TextBody: "return 'Error';"
}
Quintiq file version 2.0
#parent: #root
StaticMethod Status_Idle () remote as String
{
Description: 'Initial state of export, before moving to In progress'
TextBody: 'return "Idle";'
}
Quintiq file version 2.0
#parent: #root
StaticMethod Status_InProgress () remote as String
{
Description: 'Export executing state'
TextBody: 'return "In progress";'
}
Quintiq file version 2.0
#root
#parent: #DomainModel
Type ExportPlan
{
#keys: '5[413182.1.473326413][413182.1.473326411][0.0.0][413182.1.473326412][413182.1.473326414]'
BaseType: Object
StructuredName: 'ExportPlans'
}
......@@ -9,6 +9,7 @@ MethodOverride Execute
opt := DatasetFindOptions::Construct( this.MacroPlanDatasetName() );
mp := MDSMacroPlan::Find( opt );
opt := DatasetFindOptions::Construct();
dr := MDSLibDEF_DataRepository::Find( opt );
......
Quintiq file version 2.0
#parent: #root
Attribute ID
{
#keys: '3[413182.1.307528253][413182.1.307528252][413182.1.307528254]'
Description: '唯一订单id'
IsReadOnly: true
ValueType: String
}
......@@ -7,7 +7,8 @@ MethodOverride MessageFindIOObject (
{
TextBody:
[*
object := IOMPSPlannedOrder::FindIOMPSPlannedOrderTypeIndex( this.RoutingID(), this.DueDate() );
object := IOMPSPlannedOrder::FindIOMPSPlannedOrderTypeIndex( this.RoutingID(), this.DueDate(),this.ID());
//object := IOMPSPlannedOrder::FindSJZSYTypeIndex( this.ID(), this.DueDate(), this.RoutingID());
return object;
*]
......
......@@ -7,19 +7,22 @@ StaticMethod Create (
String mpsplanid,
Real quantity,
DateTime mpsperiodstart,
DateTime mpsperiodend
DateTime mpsperiodend,
String id
) as IOMPSPlannedOrder
{
Description: 'Create IO planned order.'
TextBody:
[*
ioplannedorder := IOMPSPlannedOrder::FindIOMPSPlannedOrderTypeIndex( routingid, duedate );
ioplannedorder := IOMPSPlannedOrder::FindIOMPSPlannedOrderTypeIndex( routingid, duedate,id);
if( isnull( ioplannedorder ) )
{
ioplannedorder := owner.IOMPSPlannedOrder( relnew,
RoutingID := routingid,
DueDate := duedate );
DueDate := duedate ,ID :=id);
ioplannedorder.Update( mpsplanid, quantity, mpsperiodstart, mpsperiodend );
}
......
Quintiq file version 2.0
#parent: #root
StaticMethod CreateSjzsy (
MPSync owner,
String routingid,
DateTime duedate,
String mpsplanid,
Real quantity,
DateTime mpsperiodstart,
DateTime mpsperiodend,
String id
) as IOMPSPlannedOrder
{
Description: 'Create IO planned order.'
TextBody:
[*
ioplannedorder := IOMPSPlannedOrder::FindSJZSYTypeIndex( id,duedate,routingid);
if( isnull( ioplannedorder ) )
{
ioplannedorder := owner.IOMPSPlannedOrder( relnew,
RoutingID := routingid,
DueDate := duedate,ID := id );
ioplannedorder.Update( mpsplanid, quantity, mpsperiodstart, mpsperiodend );
}
else
{
ioplannedorder.Update( mpsplanid, quantity, mpsperiodstart, mpsperiodend );
}
return ioplannedorder;
*]
}
......@@ -13,5 +13,9 @@ TypeIndex IOMPSPlannedOrderTypeIndex
{
ModelElement: DueDate
}
TypeIndexAttribute
{
ModelElement: ID
}
]
}
Quintiq file version 2.0
#parent: #root
TypeIndex SJZSYTypeIndex
{
InterfaceProperties { Accessibility: 'Module' }
Attributes:
[
TypeIndexAttribute
{
ModelElement: ID
}
TypeIndexAttribute
{
ModelElement: DueDate
}
TypeIndexAttribute
{
ModelElement: RoutingID
}
]
}
......@@ -30,7 +30,8 @@ Method SyncPlannedOrdersFromMacroPlan (
if( qty > 0.0 )
{
ioplannedorder := IOMPSPlannedOrder::Create( this, ls.RoutingID(), p.End(), mpsplanid, qty, p.Start(), p.End() );
cc:=OS::GenerateGUIDAsString()
ioplannedorder := IOMPSPlannedOrder::Create( this, ls.RoutingID(), p.End(), mpsplanid, qty, p.Start(), p.End(),cc );
updates.Add( ioplannedorder );
}
......
Quintiq file version 2.0
#parent: #root
Method test
{
TextBody:
[*
// Administration May-26-2023 (created)
string:="99/9";
if(string.LikeUserLocale("/") ){
strings:=string.Tokenize("/")
traverse( strings,Elements,st){
info( st)
}
}
*]
InterfaceProperties { Accessibility: 'Module' }
}
Quintiq file version 2.0
#root
#parent: #DomainModel
Type MacroPlan #extension
{
}
Quintiq file version 2.0
#parent: #root
Method Test_routing
{
TextBody:
[*
// Administration May-26-2023 (created)
*]
InterfaceProperties { Accessibility: 'Module' }
}
Quintiq file version 2.0
#parent: #root
Method NewMethod
{
TextBody:
[*
// Administration May-26-2023 (created)
*]
InterfaceProperties { Accessibility: 'Module' }
}
Quintiq file version 2.0
#parent: #root
Method Test_
{
TextBody:
[*
// Administration May-26-2023 (created)
*]
InterfaceProperties { Accessibility: 'Module' }
}
Quintiq file version 2.0
#parent: #root
Method Test_0003_UpstreamSmartPlanNoUserSupply0 (
MacroPlan macroplan
)
{
Description: 'Smartplan on pispip with no total supply smart plan direction= upstream'
TextBody:
[*
productid := 'Lowfat Strawberry 12 pk';
stockingpointid := 'DC - Bulgaria';
//
//string:="99/9";
//
//if(string.LikeUserLocale("/") ){
//
//strings:=string.Tokenize("/")
//
//
//traverse( strings,Elements,st){
// info( "88888")
// info( 200 div 3)
//
//
//}
//
//}
quantitys:=construct(Reals);
quantitys.Add( 1.0)
quantitys.Add( 2.0)
quantitys.Add( 3.0)
quantitys.Add( 4.0)
quantitys.Add( 5.0)
quantitys.Reverse();
quantitys.Delete( 0)
traverse( quantitys,Elements,qu){
info( qu)
}
sopyear := macroplan.StartOfPlanning().Year();
startdate := this.GetDateTimeSOP( sopyear, 1, 1 );
sopyear := macroplan.StartOfPlanning().Year();
startdate := this.GetDateTimeSOP( sopyear, 1, 1 );
this->ResetOptimizerPlan( macroplan ) // unplan all
->| this -> ( utf )
{
pispip := UI_ProductInStockingPointInPeriodPlanningLeaf::FindSingle( this.Run(), macroplan, true, productid, stockingpointid, startdate );
smartplanpispips := construct( ProductInStockingPointInPeriodPlanningLeafs );
smartplanpispips.Add( pispip );
smartplansetting := macroplan.SmartPlanSetting();
smartplansetting.HasUserSetting( true );
smartplansetting.UserSmartPlanDirection( SmartPlanSetting::Upstream() );
this->RunSmartPlanPlanning( macroplan, smartplanpispips ) // run smart plan without setting total supply user
->|this->VerifyPlanNoTotalSupply( macroplan, pispip )
}
*]
InterfaceProperties { Accessibility: 'Module' }
}
......@@ -2,5 +2,8 @@ Quintiq file version 2.0
#parent: #root
Method SetStatusDone
{
TextBody: 'this.Status( LibSOPImpExp_ImportExportBase::Status_Done() );'
TextBody:
[*
this.Status( LibSOPImpExp_ImportExportBase::Status_Done() );
*]
}
......@@ -52,6 +52,8 @@ domainmodel.ediremotedatasourcedefinition.remotestorage.inputunitofmeasuresfrome
domainmodel.ediremotedatasourcedefinition.remotestorage.inputunitofmeasuresfrommodel=template:domainmodel.ediremotedatasourcedefinition
domainmodel.ediremotedatasourcedefinition.remotestorage.inputunitsfromexcel=template:domainmodel.ediremotedatasourcedefinition
domainmodel.ediremotedatasourcedefinition.remotestorage.inputunitsfrommodel=template:domainmodel.ediremotedatasourcedefinition
domainmodel.ediremotedatasourcedefinition.remotestorage.kf102=template:domainmodel.ediremotedatasourcedefinition
domainmodel.ediremotedatasourcedefinition.remotestorage.kf207=template:domainmodel.ediremotedatasourcedefinition
domainmodel.ediremotedatasourcedefinition.remotestorage.oracle=template:domainmodel.ediremotedatasourcedefinition
domainmodel.ediremotedatasourcedefinition.remotestorage.outputcampaignsfrommodel=template:domainmodel.ediremotedatasourcedefinition
domainmodel.ediremotedatasourcedefinition.remotestorage.outputcampaignstoexcel=template:domainmodel.ediremotedatasourcedefinition
......@@ -108,6 +110,7 @@ domainmodel.ediremotedatasourcedefinition.remotestorage.outputunitofmeasurestoex
domainmodel.ediremotedatasourcedefinition.remotestorage.outputunitofmeasurestomodel=template:domainmodel.ediremotedatasourcedefinition
domainmodel.ediremotedatasourcedefinition.remotestorage.outputunitstoexcel=template:domainmodel.ediremotedatasourcedefinition
domainmodel.ediremotedatasourcedefinition.remotestorage.outputunitstomodel=template:domainmodel.ediremotedatasourcedefinition
domainmodel.ediremotedatasourcedefinition.remotestorage.shuye=template:domainmodel.ediremotedatasourcedefinition
domainmodel.ediremotedatasourcedefinition.remotestorage.syncobject=template:domainmodel.ediremotedatasourcedefinition
domainmodel.fileprovider.qdrive=template:domainmodel.fileprovider.qdrive
domainmodel.gisdefinition.osm=template:domainmodel.gisdefinition
......
......@@ -29,14 +29,14 @@ EDIBroker A_MPSync_ImportForecastsFromDBBroker0
{
DataIntegrityStrategy: 'Disabled'
SettingsEngineLink: 'domainmodel.ediremotedatasourcedefinition.remotestorage.oracle'
EDIODBCLinkTable QUINTIQ_FORECATS
EDIODBCLinkTable QUINTIQ_FORECSATS
{
OthersMayCreateTable: true
OthersMayDeleteRow: true
OthersMayDropTable: true
OthersMayFlushTable: true
OthersMayInsertRow: true
Parameters: '/owner="SJZSY_MO"'
Parameters: '/owner="MES"'
PrimaryKeyColumns: ID
RecordModificationHintStrategy: 'None'
EDIODBCLinkColumn CURRENCYID
......@@ -82,7 +82,7 @@ EDIBroker A_MPSync_ImportForecastsFromDBBroker0
EDIODBCLinkColumn QUANTITY
{
OthersMayUpdateColumn: true
ValueType: String
ValueType: Real
}
EDIODBCLinkColumn SALESSEGMENTNAME
{
......@@ -110,7 +110,7 @@ EDIBroker A_MPSync_ImportForecastsFromDBBroker0
{
EDITableTransformation
{
InputTable: QUINTIQ_FORECATS
InputTable: QUINTIQ_FORECSATS
OutputTable: IOForecast
EDIColumnMatch { InputColumn: CURRENCYID OutputColumn: CurrencyID }
EDIColumnMatch { InputColumn: DEMAND OutputColumn: DemandUncertaintyPercentage }
......@@ -137,28 +137,7 @@ EDIBroker A_MPSync_ImportForecastsFromDBBroker0
EDIColumnMatch { InputColumn: PRICE OutputColumn: Price }
EDIColumnMatch { InputColumn: PRIORITYNAME OutputColumn: PriorityName }
EDIColumnMatch { InputColumn: PRODUCTID OutputColumn: ProductID }
EDIColumnMatch
{
InputColumn: QUANTITY
OutputColumn: Quantity
Converter
{
XMLDefinition:
[*
<?xml version="1.0" encoding="UTF-16"?>
<StringToReal xmlns="http://www.quintiq.com/GEB/StringToReal" Key="@1">
<IsStandard>true</IsStandard>
<IsISO>false</IsISO>
<IsCustom>false</IsCustom>
<ConversionType>0</ConversionType>
<NumericFormatString>Standard</NumericFormatString>
<LocaleString>Chinese (China)</LocaleString>
<CurrencyString></CurrencyString>
<CustomFormatString></CustomFormatString>
</StringToReal>
*]
}
}
EDIColumnMatch { InputColumn: QUANTITY OutputColumn: Quantity }
EDIColumnMatch { InputColumn: SALESSEGMENTNAME OutputColumn: SalesSegmentName }
EDIColumnMatch
{
......
......@@ -8,19 +8,26 @@ EDIBroker A_MPSync_ImportRoutingsFromDBBroker0
EDIMLTable IOOperation
{
PrimaryKeyColumns: ID
SoftDeleteAttribute: IsSoftDeleted
TargetType: IOOperation
TypeIndex: IOOperationTypeIndex
WithSoftDelete: true
EDIMLColumn CO2Emission { Attribute: CO2Emission ValueType: Real }
EDIMLColumn DataSource { Attribute: DataSource ValueType: String }
EDIMLColumn End { Attribute: End ValueType: Date }
EDIMLColumn ExcelPath { Attribute: ExcelPath ValueType: String }
EDIMLColumn HasUserLotSize { Attribute: HasUserLotSize ValueType: Boolean }
EDIMLColumn HasUserMaximumQuantity { Attribute: HasUserMaximumQuantity ValueType: Boolean }
EDIMLColumn ID { Attribute: ID ValueType: String }
EDIMLColumn IsEnabled { Attribute: IsEnabled ValueType: Boolean }
EDIMLColumn IsSoftDeleted { Attribute: IsSoftDeleted ValueType: Boolean }
EDIMLColumn Mode { Attribute: Mode ValueType: String }
EDIMLColumn Name { Attribute: Name ValueType: String }
EDIMLColumn PreferenceBonus { Attribute: PreferenceBonus ValueType: Real }
EDIMLColumn RoutingID { Attribute: RoutingID ValueType: String }
EDIMLColumn RoutingStepName { Attribute: RoutingStepName ValueType: String }
EDIMLColumn StandardDeviationLeadTimeOperation { Attribute: StandardDeviationLeadTimeOperation ValueType: Duration }
EDIMLColumn Start { Attribute: Start ValueType: Date }
EDIMLColumn Throughput { Attribute: Throughput ValueType: Real }
EDIMLColumn Timestamp { Attribute: Timestamp ValueType: DateTime }
EDIMLColumn UnitID { Attribute: UnitID ValueType: String }
EDIMLColumn UserLeadTime { Attribute: UserLeadTime ValueType: Duration }
EDIMLColumn UserLotSize { Attribute: UserLotSize ValueType: Real }
......@@ -95,16 +102,21 @@ EDIBroker A_MPSync_ImportRoutingsFromDBBroker0
EDIMLTable IORouting
{
PrimaryKeyColumns: ID
SoftDeleteAttribute: IsSoftDeleted
TargetType: IORouting
TypeIndex: IORoutingTypeIndex
WithSoftDelete: true
EDIMLColumn AllowWIPInventory { Attribute: AllowWIPInventory ValueType: Boolean }
EDIMLColumn Batch { Attribute: Batch ValueType: String }
EDIMLColumn DataSource { Attribute: DataSource ValueType: String }
EDIMLColumn End { Attribute: End ValueType: Date }
EDIMLColumn ExcelPath { Attribute: ExcelPath ValueType: String }
EDIMLColumn ID { Attribute: ID ValueType: String }
EDIMLColumn IsEnabled { Attribute: IsEnabled ValueType: Boolean }
EDIMLColumn IsSoftDeleted { Attribute: IsSoftDeleted ValueType: Boolean }
EDIMLColumn Mode { Attribute: Mode ValueType: String }
EDIMLColumn Name { Attribute: Name ValueType: String }
EDIMLColumn ProductType { Attribute: ProductType ValueType: String }
EDIMLColumn Start { Attribute: Start ValueType: Date }
EDIMLColumn Timestamp { Attribute: Timestamp ValueType: DateTime }
}
EDIMLTable IORoutingStep
{
......@@ -134,7 +146,7 @@ EDIBroker A_MPSync_ImportRoutingsFromDBBroker0
OthersMayDropTable: true
OthersMayFlushTable: true
OthersMayInsertRow: true
Parameters: '/owner="SJZSY_MO"'
Parameters: '/owner="MES"'
PrimaryKeyColumns: ID
RecordModificationHintStrategy: 'None'
EDIODBCLinkColumn DETAIL_ID
......@@ -205,7 +217,7 @@ EDIBroker A_MPSync_ImportRoutingsFromDBBroker0
OthersMayDropTable: true
OthersMayFlushTable: true
OthersMayInsertRow: true
Parameters: '/owner="SJZSY_MO"'
Parameters: '/owner="MES"'
PrimaryKeyColumns: DESTOPERATIONID
PrimaryKeyColumns: SOURCEOPERATIONID
RecordModificationHintStrategy: 'None'
......@@ -250,14 +262,14 @@ EDIBroker A_MPSync_ImportRoutingsFromDBBroker0
ValueType: Real
}
}
EDIODBCLinkTable QUINTIQ_ROUTINGGRUOP
EDIODBCLinkTable QUINTIQ_ROUTINGGROUP
{
OthersMayCreateTable: true
OthersMayDeleteRow: true
OthersMayDropTable: true
OthersMayFlushTable: true
OthersMayInsertRow: true
Parameters: '/owner="SJZSY_MO"'
Parameters: '/owner="MES"'
PrimaryKeyColumns: INPUTGROUPID
PrimaryKeyColumns: OPERATIONID
RecordModificationHintStrategy: 'None'
......@@ -284,9 +296,14 @@ EDIBroker A_MPSync_ImportRoutingsFromDBBroker0
OthersMayDropTable: true
OthersMayFlushTable: true
OthersMayInsertRow: true
Parameters: '/owner="SJZSY_MO"'
Parameters: '/owner="MES"'
PrimaryKeyColumns: ID
RecordModificationHintStrategy: 'None'
EDIODBCLinkColumn BATCH
{
OthersMayUpdateColumn: true
ValueType: String
}
EDIODBCLinkColumn END
{
OthersMayUpdateColumn: true
......@@ -307,6 +324,11 @@ EDIBroker A_MPSync_ImportRoutingsFromDBBroker0
OthersMayUpdateColumn: true
ValueType: String
}
EDIODBCLinkColumn PRODUCTTYPE
{
OthersMayUpdateColumn: true
ValueType: String
}
EDIODBCLinkColumn SID
{
OthersMayUpdateColumn: true
......@@ -325,7 +347,7 @@ EDIBroker A_MPSync_ImportRoutingsFromDBBroker0
OthersMayDropTable: true
OthersMayFlushTable: true
OthersMayInsertRow: true
Parameters: '/owner="SJZSY_MO"'
Parameters: '/owner="MES"'
PrimaryKeyColumns: ISINPUT
PrimaryKeyColumns: OPERATIONID
PrimaryKeyColumns: PRODUCTID
......@@ -377,14 +399,14 @@ EDIBroker A_MPSync_ImportRoutingsFromDBBroker0
ValueType: String
}
}
EDIODBCLinkTable QUINTIQ_ROUTINGSTEPS
EDIODBCLinkTable QUINTIQ_ROUTINGSETPS
{
OthersMayCreateTable: true
OthersMayDeleteRow: true
OthersMayDropTable: true
OthersMayFlushTable: true
OthersMayInsertRow: true
Parameters: '/owner="SJZSY_MO"'
Parameters: '/owner="MES"'
PrimaryKeyColumns: NAME
PrimaryKeyColumns: ROUTINGID
RecordModificationHintStrategy: 'None'
......@@ -433,6 +455,11 @@ EDIBroker A_MPSync_ImportRoutingsFromDBBroker0
OthersMayUpdateColumn: true
ValueType: String
}
EDIODBCLinkColumn SID
{
OthersMayUpdateColumn: true
ValueType: String
}
EDIODBCLinkColumn TOOL
{
OthersMayUpdateColumn: true
......@@ -488,7 +515,7 @@ EDIBroker A_MPSync_ImportRoutingsFromDBBroker0
}
EDITableTransformation
{
InputTable: QUINTIQ_ROUTINGGRUOP
InputTable: QUINTIQ_ROUTINGGROUP
OutputTable: IOOperationInputGroup
EDIColumnMatch
{
......@@ -519,6 +546,7 @@ EDIBroker A_MPSync_ImportRoutingsFromDBBroker0
{
InputTable: QUINTIQ_ROUTINGS
OutputTable: IORouting
EDIColumnMatch { InputColumn: BATCH OutputColumn: Batch }
EDIColumnMatch
{
InputColumn: END
......@@ -543,6 +571,7 @@ EDIBroker A_MPSync_ImportRoutingsFromDBBroker0
EDIColumnMatch { InputColumn: ID OutputColumn: ID }
EDIColumnMatch { InputColumn: ISENABLED OutputColumn: IsEnabled }
EDIColumnMatch { InputColumn: NAME OutputColumn: Name }
EDIColumnMatch { InputColumn: PRODUCTTYPE OutputColumn: ProductType }
EDIColumnMatch
{
InputColumn: START
......@@ -601,7 +630,7 @@ EDIBroker A_MPSync_ImportRoutingsFromDBBroker0
}
EDITableTransformation
{
InputTable: QUINTIQ_ROUTINGSTEPS
InputTable: QUINTIQ_ROUTINGSETPS
OutputTable: IORoutingStep
EDIColumnMatch { InputColumn: NAME OutputColumn: Name }
EDIColumnMatch { InputColumn: ROUTINGID OutputColumn: RoutingID }
......
This diff is collapsed.
This diff is collapsed.
......@@ -3,42 +3,55 @@ Quintiq file version 2.0
EDIBroker A_MP_ExportMPSPlanBroker0
{
MDSDefinition: MPSync
EDIModelLink.Source OutputPlannedOrdersFromModel0
EDIModelLink.Source Source
{
EDIMLTable IOMPSPlan
{
PrimaryKeyColumns: MPSPlanID
TargetType: IOMPSPlan
TypeIndex: IOMPSPlanTypeIndex
EDIMLColumn DataSource { Attribute: DataSource ValueType: String }
EDIMLColumn ExcelPath { Attribute: ExcelPath ValueType: String }
EDIMLColumn IsSoftDeleted { Attribute: IsSoftDeleted ValueType: Boolean }
EDIMLColumn IsValid { Attribute: IsValid ValueType: Boolean }
EDIMLColumn MPSPlanID { Attribute: MPSPlanID ValueType: String }
EDIMLColumn Mode { Attribute: Mode ValueType: String }
EDIMLColumn Timestamp { Attribute: Timestamp ValueType: DateTime }
}
EDIMLTable IOMPSPlannedOrder
{
PrimaryKeyColumns: DueDate
PrimaryKeyColumns: ID
PrimaryKeyColumns: RoutingID
TargetType: IOMPSPlannedOrder
TypeIndex: IOMPSPlannedOrderTypeIndex
TypeIndex: SJZSYTypeIndex
EDIMLColumn DataSource { Attribute: DataSource ValueType: String }
EDIMLColumn DueDate { Attribute: DueDate ValueType: DateTime }
EDIMLColumn ExcelPath { Attribute: ExcelPath ValueType: String }
EDIMLColumn ID { Attribute: ID ValueType: String }
EDIMLColumn IsSoftDeleted { Attribute: IsSoftDeleted ValueType: Boolean }
EDIMLColumn IsValid { Attribute: IsValid ValueType: Boolean }
EDIMLColumn MPSPeriodEnd { Attribute: MPSPeriodEnd ValueType: DateTime }
EDIMLColumn MPSPeriodStart { Attribute: MPSPeriodStart ValueType: DateTime }
EDIMLColumn MPSPlanID { Attribute: MPSPlanID ValueType: String }
EDIMLColumn Mode { Attribute: Mode ValueType: String }
EDIMLColumn Quantity { Attribute: Quantity ValueType: Real }
EDIMLColumn RoutingID { Attribute: RoutingID ValueType: String }
EDIMLColumn Timestamp { Attribute: Timestamp ValueType: DateTime }
}
}
EDIODBCLink.Destination Destination0
{
DataIntegrityStrategy: 'Disabled'
SettingsEngineLink: 'domainmodel.ediremotedatasourcedefinition.remotestorage.oracle'
EDIODBCLinkTable IOMPSPLAN
EDIODBCLinkTable IOMPPLAN
{
MayCreateTable: true
MayDeleteRow: true
MayDropTable: true
MayFlushTable: true
MayInsertRow: true
Parameters: '/owner="SJZSY_MO"'
Parameters: '/owner="MES"'
PrimaryKeyColumns: MPSPLANID
RecordModificationHintStrategy: 'None'
EDIODBCLinkColumn MPSPLANID
......@@ -52,15 +65,16 @@ EDIBroker A_MP_ExportMPSPlanBroker0
ValueType: DateTime
}
}
EDIODBCLinkTable ORDERS
EDIODBCLinkTable MPSPLANNEDORDER
{
MayCreateTable: true
MayDeleteRow: true
MayDropTable: true
MayFlushTable: true
MayInsertRow: true
Parameters: '/owner="SJZSY_MO"'
Parameters: '/owner="MES"'
PrimaryKeyColumns: DUADATE
PrimaryKeyColumns: ID
PrimaryKeyColumns: ROUTINGID
RecordModificationHintStrategy: 'None'
EDIODBCLinkColumn DUADATE
......@@ -73,11 +87,21 @@ EDIBroker A_MP_ExportMPSPlanBroker0
MayUpdateColumn: true
ValueType: DateTime
}
EDIODBCLinkColumn MPSPlanID
EDIODBCLinkColumn ID
{
MayUpdateColumn: true
ValueType: String
}
EDIODBCLinkColumn MPPLANID
{
MayUpdateColumn: true
ValueType: String
}
EDIODBCLinkColumn ORDERID
{
MayUpdateColumn: true
ValueType: Real
}
EDIODBCLinkColumn QUANTITY
{
MayUpdateColumn: true
......@@ -100,18 +124,19 @@ EDIBroker A_MP_ExportMPSPlanBroker0
EDITableTransformation
{
InputTable: IOMPSPlan
OutputTable: IOMPSPLAN
OutputTable: IOMPPLAN
EDIColumnMatch { InputColumn: MPSPlanID OutputColumn: MPSPLANID }
EDIColumnMatch { InputColumn: Timestamp OutputColumn: TIMESTAPE }
}
EDITableTransformation
{
InputTable: IOMPSPlannedOrder
OutputTable: ORDERS
OutputTable: MPSPLANNEDORDER
EDIColumnMatch { InputColumn: DueDate OutputColumn: DUADATE }
EDIColumnMatch { InputColumn: ID OutputColumn: ID }
EDIColumnMatch { InputColumn: MPSPeriodEnd OutputColumn: END }
EDIColumnMatch { InputColumn: MPSPeriodStart OutputColumn: STARTDATE }
EDIColumnMatch { InputColumn: MPSPlanID OutputColumn: MPSPlanID }
EDIColumnMatch { InputColumn: MPSPlanID OutputColumn: MPPLANID }
EDIColumnMatch { InputColumn: Quantity OutputColumn: QUANTITY }
EDIColumnMatch { InputColumn: RoutingID OutputColumn: ROUTINGID }
}
......
This diff is collapsed.
Quintiq file version 2.0
#root
#parent: #DomainModel
Relations id:#Relations #extension
{
}
Quintiq file version 2.0
#parent: #root
Method Plan
{
TextBody:
[*
// Administration Jun-6-2023 (created)
// Administration Jun-5-2023 (created)
opt := DatasetFindOptions::Construct( this.MacroPlanDatasetName() );
mp := MDSMacroPlan::Find( opt );
opt := DatasetFindOptions::Construct();
mpsync := MDSMPSync::Find( opt );
o := this
->SetStatusInProgress()
->|mp->ExportToMPSync0( mpsync)
->|this->SetStatusDone()
->|mp->SetLastImportTime()
->Exception();
this->OnException(o);
*]
}
Quintiq file version 2.0
#root
#parent: #DomainModel
Type ExportPlan #extension
{
}
Quintiq file version 2.0
#root
#parent: #DomainModel
TypeSpecialization IOMPSPlannedOrder #extension
{
}
Quintiq file version 2.0
#parent: #root
Attribute Batch
{
#keys: '3[413182.1.275754603][413182.1.275754602][413182.1.275754604]'
ValueType: String
}
Quintiq file version 2.0
#parent: #root
Attribute ProductType
{
#keys: '3[413182.1.379394953][413182.1.379394952][413182.1.379394954]'
ValueType: String
}
Quintiq file version 2.0
#root
#parent: #DomainModel
TypeSpecialization IORouting #extension
{
}
......@@ -27,6 +27,6 @@ MethodOverride ExecuteDB (
->|this->deleteuserimportfile(userprofile)
->Exception();
this->OnException(o);
this->ImportException( o,userprofile)
*]
}
Quintiq file version 2.0
#parent: #root
MethodOverride ExportPlan
{
TextBody:
[*
opt := DatasetFindOptions::Construct( this.MacroPlanDatasetName() );
mp := MDSMacroPlan::Find( opt );
opt := DatasetFindOptions::Construct();
mpsync := MDSMPSync::Find( opt );
o := this
->SetStatusInProgress()
->|mp->ExportToMPSync0( mpsync)
->|this->SetStatusDone()
->|mp->SetLastImportTime()
->Exception();
this->OnException(o);
*]
}
Quintiq file version 2.0
#parent: #root
Method ImportException (
Exception exception,
UserImportProfile userpiofile
)
{
TextBody:
[*
// Administration Jun-5-2023 (created)
info( "导入异常")
this.deleteuserimportfile( userpiofile)
this.SetStatusError();
*]
}
Quintiq file version 2.0
#parent: #root
Method ExportPlan
{
TextBody:
[*
// Administration May-31-2023 (created)
*]
}
Quintiq file version 2.0
#parent: #root
Method AllQuantity (
Reals shuzu,
Real quantity,
Reals shuchu,
Number number,
String ProductType
) as Reals
{
TextBody:
[*
// Administration May-29-2023 (created)
//
mi:= min( shuzu,Elements,qu,qu)
ma:=max(shuzu,Elements,qu,qu)
while(quantity>=mi/2 and shuzu.Size()>=1){
if( (mi/2<=quantity and quantity<mi) and ProductType='PF'){
shuchu.Add( mi)
}else if(0<quantity and quantity<mi and ProductType='SF' ){
shuchu.Add( mi)
}
if(quantity>=ma){
shuzu.Reverse();
quantity:=quantity-ma
shuchu.Add( ma)
this.AllQuantity( shuzu,quantity,shuchu,number,ProductType);
}else{
tr:=max(shuzu,Elements,qu,qu)
if( quantity>=tr){
shuchu.Add(tr)
quantity:=quantity - tr
}
shuzu.Sort()
shuzu.Delete( shuzu.Size()-1)
this.AllQuantity( shuzu,quantity,shuchu,number,ProductType);
}
}
return shuchu;
*]
}
......@@ -51,8 +51,10 @@ Method ExecuteDBUserImportProfiles (
if( not isnull( macroplan ) )
{
//单位
macroplan.A_MPSync_ImportGeneral_Sjzsy( this,true)
// //单位
//
//
macroplan.A_MPSync_ImportGeneral_Sjzsy( this,true)
//unit和库存
......@@ -71,6 +73,16 @@ Method ExecuteDBUserImportProfiles (
macroplan.A_MPSync_ImportEntityCosts_Sjzsy( this,true)
//
// this.ImportAllData( macroplan,
// MPSync::GetImportObjectGroupInProfileIncludeExclude( uniqueimportobjectgroupinprofiles, MPSyncUtility::ID_ObjectGroup_SupplyChainParameters() ),
// MPSync::GetImportObjectGroupInProfileIncludeExclude( uniqueimportobjectgroupinprofiles, MPSyncUtility::ID_ObjectGroup_Entities() ),
// MPSync::GetImportObjectGroupInProfileIncludeExclude( uniqueimportobjectgroupinprofiles, MPSyncUtility::ID_ObjectGroup_Products() ),
// MPSync::GetImportObjectGroupInProfileIncludeExclude( uniqueimportobjectgroupinprofiles, MPSyncUtility::ID_ObjectGroup_Routings() ),
// MPSync::GetImportObjectGroupInProfileIncludeExclude( uniqueimportobjectgroupinprofiles, MPSyncUtility::ID_ObjectGroup_Capacities() ),
// MPSync::GetImportObjectGroupInProfileIncludeExclude( uniqueimportobjectgroupinprofiles, MPSyncUtility::ID_ObjectGroup_Costs() ),
// MPSync::GetImportObjectGroupInProfileIncludeExclude( uniqueimportobjectgroupinprofiles, MPSyncUtility::ID_ObjectGroup_Forecast() ),
// MPSync::GetImportObjectGroupInProfileIncludeExclude( uniqueimportobjectgroupinprofiles, MPSyncUtility::ID_ObjectGroup_Feedback() ))
//同步后处理
macroplan.SynchronizeFromMPSync0();
......
Quintiq file version 2.0
#parent: #root
Method ImportAllData (
MacroPlan macroplan,
Boolean issupplypara,
Boolean isentities,
Boolean isproduct,
Boolean isrouting,
Boolean iscapacities,
Boolean iscosts,
Boolean isforcats,
Boolean isfeedback
)
{
TextBody:
[*
// Administration Jun-5-2023 (created)
//单位
if( issupplypara){
macroplan.A_MPSync_ImportGeneral_Sjzsy( this,true)
}
//unit和库存
if( isentities){
macroplan.A_MPSync_ImportEntities_Sjzsy( this,true);
}
//产品
if( isproduct){
macroplan.A_MPSync_ImportProductsSjzsy( this,true);
}
//工艺
if( isrouting){
macroplan.A_MPSync_ImportRoutingsSjzsy( this,true);
}
//日历
if(iscapacities){
macroplan.A_MPSync_ImportUnitCapacities_Sjzsy(this,true)
}
//需求
if( isforcats){
macroplan.A_MPSync_ImportSalesDemands_Sjzsy( this,true )
}
if( isfeedback){
//反馈
macroplan.A_MPSync_ImportFeedbacks_Sjzsy( this,true)
}
//成本
if( iscosts){
macroplan.A_MPSync_ImportEntityCosts_Sjzsy( this,true)
}
*]
}
......@@ -12,43 +12,104 @@ Method SyncPlannedOrdersFromMacroPlan0 (
updates := construct( IOMPSPlannedOrders );
// Get periods within the planning horizon
end := macroplan.LastPlanningPeriod().End();
if( macroplan.GlobalParameters_MP().ExportHorizon().IsFinite() )
{
end := macroplan.StartOfPlanning() + macroplan.GlobalParameters_MP().ExportHorizon();
}
periods := selectset( macroplan, PlanningPeriod, pp, pp.IsInPeriod( macroplan.StartOfPlanning(), end ) );
periods := selectset(macroplan,UnitPeriod.PeriodTask_MP,ui,true)
routings := selectset( macroplan, Routing, r, r.IsEnabled() );
//ofof:=selectset( macroplan,Unit.UnitPeriod.PeriodTask_MP,yu,true)
//qwq:=selectset( macroplan,UnitPeriod.PeriodTask_MP,ui,true)
//rt:=selectset( macroplan,ProductInStockingPointInPeriodPlanningLeafNonZeroEIS.astype(ProductInStockingPointInPeriodPlanningLeaf).NewSupply.PeriodTask_MP,yi,true)
// Group by Period, RoutingID
traverse( periods, Elements, p )
{
traverse( routings, Elements.LastStep, ls )
{
qty := sum( ls, Operation.PeriodTaskOperation, pto, pto.Quantity() > 0.0 and pto.UnitPeriod().Period_MP() = p, pto.Quantity() );
if( qty > 0.0 )
{
traverse( routings,Elements,ro){
ls:=p.astype( PeriodTaskOperation ).Operation().RoutingStep()
if( p.astype( PeriodTaskOperation ).Operation().ID()=ro.FirstStep().FirstOperation().ID()){
ioplannedorder := IOMPSPlannedOrder::Create( this,ls.RoutingID(),p.End(),mpsplanid,qty,p.Start(),p.End());
updates.Add( ioplannedorder );
//info(ls.Routing())
//qty := sum( ls, Operation.PeriodTaskOperation, pto, pto.Quantity() > 0.0 and pto.UnitPeriod().Period_MP() = p, pto.Quantity() );
qty:=p.QuantityToProcess()
if( ls.Routing().Batch().Length()>0){
quantitys:=construct(Reals);
c:=StringToReal::StandardConverter()
if(ls.Routing().Batch().LikeUserLocale(";") ){
strings:=ls.Routing().Batch().Tokenize(";")
traverse( strings,Elements,st){
if( not st=""){
quantitys.Add( c.Convert( st))
}
}
}else{
quantitys.Add(c.Convert(ls.Routing().Batch()))
}
d:=RealToNumber::StandardConverter()
value:=sum( quantitys,Elements,qu,qu)
a:=guard( d.Convert( qty*10000) div d.Convert( value*10000),1)
rs:=construct(Reals);
difference:=qty-(value*a)
}
for( i:=a;i>0;i:=i - 1){
traverse( quantitys,Elements,s){
rs.Add( s)
}
}
all:= this.AllQuantity( quantitys,difference,rs,a,ls.Routing().ProductType())
traverse( all,Elements,qua){
if( qua > 0.0 )
{
cc:=OS::GenerateGUIDAsString()
ioplannedorder := IOMPSPlannedOrder::CreateSjzsy( this,ls.RoutingID(),p.UnitPeriod().End(),mpsplanid,qua,p.UnitPeriod().Start(),p.UnitPeriod().End(),cc);
updates.Add( ioplannedorder );
}
}
}else{
if( qty > 0.0 )
{
cc:=OS::GenerateGUIDAsString()
ioplannedorder := IOMPSPlannedOrder::CreateSjzsy(this,ls.RoutingID(),p.UnitPeriod().End(),mpsplanid,qty,p.UnitPeriod().Start(),p.UnitPeriod().End(),cc);
updates.Add( ioplannedorder );
}}
}
}
}
// Get the set of old PlannedOrder to be deleted
tobedeleteset := existing.Difference( updates );
traverse( tobedeleteset, Elements, ele )
{
ele.Delete();
}
*]
......
......@@ -21,7 +21,7 @@ Method A_MPSyncOperationBOM_Sjzsy (
isinput := io.IsInput();
info(operationid)
//info(operationid)
// Find existing OperationBOM
objectinstance := OperationBOM::FindOperationBOMTypeIndex( operationid, productid, spid, isinput );
......@@ -35,8 +35,6 @@ Method A_MPSyncOperationBOM_Sjzsy (
if( not ( isnull( operation ) ) )
{
info( "222")
objectinstance := OperationBOM::Create( operation,
productid,
spid,
......
......@@ -17,7 +17,7 @@ Method A_MPSyncOperation_Sjzsy (
traverse( iooperations , Elements, io, true )
{
indexkey := io.ID();
info( indexkey )
//info( indexkey )
// Find existing Operation
objectinstance := Operation::FindOperationTypeIndex( indexkey );
// Find existing Unit
......
......@@ -20,7 +20,7 @@ Method A_MPSyncProduct_Sjzsy (
{
indexkey := io.ID();
info( indexkey )
//info( indexkey )
// Find existing Product_MP
objectinstance := Product_MP::FindProductTypeIndex( indexkey );
......
......@@ -28,28 +28,31 @@ Method A_MPSyncRouting_Sjzsy (
// If no existing Routing is found, create one
if( isnull( objectinstance ) )
{
objectinstance := Routing::Create( this,
objectinstance := Routing::Create0( this,
indexkey,
io.Name(),
io.Start(),
io.End(),
io.AllowWIPInventory(),
true // isfromdb
true,
io.Batch() // isfromdb
);
}
// Else if the Routing is not manually configured or the imported instance should overwrite manual configuration,
// update the existing Routing
else if( not objectinstance.IsManuallyConfigured() or isoverwritemanualconfig )
{
// Update Routing
objectinstance.Update( io.ID(), io.Name(), io.Start(), io.End(), io.AllowWIPInventory(), true );
objectinstance.Update0( io.ID(), io.Name(), io.Start(), io.End(), io.AllowWIPInventory(), true ,io.Batch());
updates.Add( objectinstance );
}
// If Routing is created or found, synchronize RoutingStep
if( not isnull( objectinstance ) )
{
info( io.ID())
//info( io.ID())
// CustomUpdate method is extended
objectinstance.CustomUpdate( io, isoverwritemanualconfig );
......
......@@ -16,6 +16,7 @@ Method A_MPSyncUnit_Sjzsy (
traverse( iounits , Elements, io, true )
{
indexkey := io.ID();
//info( indexkey)
// Find existing Unit
objectinstance := Unit::FindUnitTypeIndex( indexkey );
// Find existing UnitOfMeasure_MP
......@@ -25,11 +26,13 @@ Method A_MPSyncUnit_Sjzsy (
// If no existing Unit is found, create one
if( isnull( objectinstance ) )
{
{
// Check if there's valid UnitOfMeasure_MP and Currency_MP
if( not ( isnull( uom ) or isnull( currency ) ) )
{
objectinstance:=Unit::Create( this,
io.ID(),
io.ParentUnitID(),
......
......@@ -19,7 +19,7 @@ Method A_MPSync_ImportProductsSjzsy (
this.MPSyncProductLevel_MP( isoverwritemanualconfig, productlevels );
this.MPSyncPISPSpecification_MP( isoverwritemanualconfig, pispspecs );
info( "123")
this.InitializeProductsAfterImport();
*]
}
......@@ -13,5 +13,11 @@ Method ExportToMPSync0 (
mpsync.SyncDataFromMacroPlan0( this)
mpsync.A_MP_ExportMPSPlanBroker0().Execute();
mpsync.A_MP_ExportMPSPlan102().Execute();
mpsync.A_MP_ExportMPSPlan207().Execute();
mpsync.A_MP_ExportMPSPlanSY().Execute();
//mpsync.A_MP_ExportMPSPlanBroker00().Execute();
*]
}
Quintiq file version 2.0
#parent: #root
Attribute BatchNumber
{
#keys: '3[413182.1.287312061][413182.1.287312060][413182.1.287312062]'
ValueType: Real
}
Quintiq file version 2.0
#parent: #root
Attribute ProductType
{
#keys: '3[413182.1.379394966][413182.1.379394965][413182.1.379394967]'
ValueType: String
}
Quintiq file version 2.0
#parent: #root
Attribute Batch
{
#keys: '3[413182.1.272826251][413182.1.272826250][413182.1.272826252]'
ValueType: String
}
Quintiq file version 2.0
#parent: #root
DefaultValue
{
ISOValue: '1'
TargetAttribute: BatchNumber
}
Quintiq file version 2.0
#parent: #root
Method Update0 (
String id,
String name,
Date start,
Date end,
Boolean allowwipinventory,
Boolean isfromdb,
String batch
)
{
Description: 'Update routing'
TextBody:
[*
// DWE2 Jan-28-2016 (created)
this.UpdateTypeIndex( id );
this.Name( name );
this.Start( start );
this.End( end );
this.AllowWIPInventory( allowwipinventory );
this.IsManuallyConfigured( not isfromdb );
this.Batch(batch);
this.SynchronizePeriodTask();
this.SynchronizeStockingPointAllowedWIPInventory();
*]
}
Quintiq file version 2.0
#parent: #root
StaticMethod Create0 (
MacroPlan owner,
String id,
String name,
Date start,
Date end,
Boolean allowwipinventory,
Boolean isfromdb,
String batch
) as Routing
{
Description: 'Create routing'
TextBody:
[*
// DWE2 Jan-28-2016 (created)
routing := owner.Routing( relnew,
ID := id );
routing.Update0( id,
name,
start,
end,
allowwipinventory,
isfromdb,
batch
);
return routing;
*]
}
Quintiq file version 2.0
#root
#parent: #DomainModel
Type Routing #extension
{
}
Quintiq file version 2.0
#root
#parent: #DomainModel
TypeSpecialization UTF_UnitTestSmartPlanUpstreamUserTotalSupplyInvPastScope #extension
{
}
Quintiq file version 2.0
Component ActionBarGroupDataViews #extension
{
Children:
[
Component ButtonDataFinances #extension
{
Children:
[
#child: ContextMenuFinances
]
}
Component ButtonCapacities #extension
{
Children:
[
#child: ContextMenuCapacities
]
}
]
}
......@@ -9,6 +9,10 @@ Component ActionBarGroupImportExportData #extension
[
#child: LibSOPImpExp_ContextMenuImport
]
Properties:
[
Taborder: 0
]
}
Component LibSOPImpExp_ButtonExport #extension
{
......@@ -16,21 +20,26 @@ Component ActionBarGroupImportExportData #extension
[
#child: LibSOPImpExp_ContextMenuExport
]
Properties:
[
Taborder: 1
]
}
Component LibSOPImpExp_DataHolderExportBase #extension
{
Properties:
[
Taborder: 1
Taborder: 2
]
}
Component LibSOPImpExp_DataHolderImportBase #extension
{
Properties:
[
Taborder: 2
Taborder: 3
]
}
#child: LibSCIExportKeepTrackExportStatus
#child: PanelImportExportLabelTrackStatus
]
}
......@@ -14,5 +14,13 @@ Component ActionBarGroupPlanViews #extension
Tooltip: ''
]
}
#child: PanelImportExportLabelTrackStatus151
Component ButtonFeedback #extension
{
Properties:
[
Taborder: 8
]
}
]
}
......@@ -4,5 +4,6 @@ Component ActionBarPageData #extension
Children:
[
#child: ActionBarGroupImportExportData
#child: ActionBarGroupDataViews
]
}
Quintiq file version 2.0
Component ContextMenuCapacities #extension
{
Children:
[
Component MenuTransport #extension
{
Properties:
[
Title: 'Transport'
]
}
Component MenuSupplyTargets #extension
{
Properties:
[
Tooltip: 'Supply Targets'
]
}
Component MenuStockingPoints #extension
{
Properties:
[
Title: 'Stocking Point'
Tooltip: ''
]
}
]
}
Quintiq file version 2.0
Component ContextMenuFinances #extension
{
Children:
[
Component MenuSupplyCosts #extension
{
Properties:
[
Title: 'Supply Costs'
]
}
Component MenuUnitCosts #extension
{
Properties:
[
Title: 'Unit Costs'
]
}
]
}
......@@ -5,6 +5,6 @@ Component LibSCIExportKeepTrackExportStatus
BaseType: 'LibSCIExportKeepTrackExportStatus'
Properties:
[
Taborder: 3
Taborder: 4
]
}
Quintiq file version 2.0
Component PanelImportExportLabelTrackStatus #extension
{
Properties:
[
Taborder: 5
]
}
Quintiq file version 2.0
Component PanelImportExportLabelTrackStatus151
{
#keys: '[413182.1.365648595]'
BaseType: 'WebPanel'
Children:
[
Component LibSOPImpExp_LabelExportStatus967
{
#keys: '[413182.1.365648596]'
BaseType: 'WebLabel'
Properties:
[
DataBinding: 'ExportPlanHolder.Data.Status'
Taborder: 0
Visible: false
]
}
Component LibSOPImpExp_LabelLastExportTime345
{
#keys: '[413182.1.365648597]'
BaseType: 'WebLabel'
Properties:
[
Taborder: 1
Visible: false
]
}
]
Properties:
[
Taborder: 9
]
}
Quintiq file version 2.0
#parent: ExportPlanHolder
Response OnDataChanged () id:Response_MacroPlanner_ApplicationMacroPlanner_ExportPlanHolder_OnDataChanged
{
#keys: '[413182.1.415489577]'
CanBindMultiple: false
DefinitionID: 'Responsedef_WebComponent_OnDataChanged'
QuillAction
{
Body:
[*
PlanOrder.UpdateImportStatus( '',false)
*]
GroupServerCalls: false
}
}
Quintiq file version 2.0
#parent: PanelImportExportLabelTrackStatus151/LibSOPImpExp_LabelLastExportTime345
Response OnTextChanged () id:Response_MacroPlanner_PanelImportExportLabelTrackStatus151_LibSOPImpExp_LabelLastExportTime345_OnTextChanged
{
#keys: '[413182.1.365648593]'
CanBindMultiple: false
DefinitionID: 'Responsedef_WebLabel_OnTextChanged'
QuillAction
{
Body:
[*
// On last export time update, update Export button status
PlanOrder.UpdateImportStatus( '',false)
*]
GroupServerCalls: false
}
}
Quintiq file version 2.0
#parent: PanelImportExportLabelTrackStatus151/LibSOPImpExp_LabelExportStatus967
Response OnTextChanged () id:Response_MacroPlanner_PanelImportExportLabelTrackStatus151_LibSOPImpExp_LabelExportStatus967_OnTextChanged
{
#keys: '[413182.1.365648594]'
CanBindMultiple: false
DefinitionID: 'Responsedef_WebLabel_OnTextChanged'
QuillAction
{
Body:
[*
// On export status change, call method to refresh Export button status
PlanOrder.UpdateImportStatus( this.Text(),true);
*]
GroupServerCalls: false
}
}
......@@ -13,5 +13,15 @@ OrphanComponent ApplicationMacroPlanner #extension
#child: ActionBarPagePlan
]
}
Component ExportPlanHolder
{
#keys: '[413182.1.415489579]'
BaseType: 'WebDataHolder'
Databinding: 'ExportPlan'
Properties:
[
Taborder: 40
]
}
]
}
Quintiq file version 2.0
#parent: #root
Method Intilize () id:Method_Button_Intilize
{
#keys: '[413182.1.420830744]'
Body:
[*
importObj := ExportPlan::FindCreate( MPSync, ApplicationScope.UserName(), guard( MacroPlan.MDSMacroPlan().Name(), '' ) );
// Set Import object into application dataholder (so that labels that depend on the dataholders are notified)
ApplicationMacroPlanner.ExportPlanHolder().Data(importObj)
*]
}
Quintiq file version 2.0
#parent: #root
Method O_GetImportBase () as ExportPlan id:Method_Button_O_GetImportBase
{
#keys: '[413182.1.365649282]'
Body:
[*
// TO OVERRIDE. Returns the current import object (Excel, DEF, etc).
// Uncomment to use the DataHolder as return type.
// In library development, no access to DataHolder as it's contained in ActionBarGroup
return ExportPlanHolder.Data()
*]
}
Quintiq file version 2.0
#parent: #root
Method O_GetLastImportTime () as DateTime id:Method_Button_O_GetLastImportTime
{
#keys: '[413182.1.369640609]'
Body:
[*
// TO OVERRIDE. The last successful import date time
return guard( MacroPlan.LastImportTime(), DateTime::MinDateTime() );
*]
}
Quintiq file version 2.0
#parent: #root
Method UpdateImportStatus (
String textchangedstatus,
Boolean checkIfDisplayMessageBox
) id:Method_Button_UpdateImportStatus
{
#keys: '[413182.1.365649167]'
Body:
[*
// Update button enabled state, image and tooltip
importObj := this.O_GetImportBase();
// No import object means no import executing (get last imported time & button should be enabled)
if( isnull( importObj ) )
{
this.Enabled( true, '' );
this.Image( 'IMPORT1' );
this.Tooltip( Translations::LibSOPImpExp_Import_LastImportTime( this.O_GetLastImportTime() ) );
}
else if( importObj.Status() = ExportPlan::Status_InProgress() )
{
// Even if another user performed a successful import, as long as this current user's
// import still executing, we display 'in progress'
this.Enabled( false, '' );
this.Image( 'PROGRESS_BAR' );
this.Tooltip( Translations::LibSOPImpExp_Import_InProgress() );
}
else if( importObj.Status() = ExportPlan::Status_Done() and textchangedstatus = importObj.Status() )
{
this.Enabled( true, '' );
this.Image( 'IMPORT1' );
this.Tooltip( Translations::LibSOPImpExp_Import_LastImportTime( this.O_GetLastImportTime()) );
// On sucess, display notification
if( checkIfDisplayMessageBox )
{
WebMessageBox::Success('导出订单成功');
}
}
else if( importObj.Status() = ExportPlan::Status_Error() )
{
this.Enabled( true, '' );
this.Image( 'IMPORT1' );
this.Tooltip( Translations::LibSOPImpExp_Import_LastImportTime( this.O_GetLastImportTime() ) );
// If this method triggered by changes to last imported time (either by current user or other users), we skip display error message
if( checkIfDisplayMessageBox )
{
WebMessageBox::Error( '导出订单异常');
}
}
*]
}
......@@ -5,9 +5,10 @@ Method export () id:Method_Button_export
#keys: '[413182.1.58928436]'
Body:
[*
MacroPlan.ExportToMPSync0( MPSync)
//MacroPlan.ExportToMPSync0( MPSync)
impoject:=this.get()
WebMessageBox::Success( "导出订单成功")
impoject.Plan();
*]
}
Quintiq file version 2.0
#parent: #root
Method get () as ExportPlan id:Method_Button_get
{
#keys: '[413182.1.355887531]'
Body:
[*
return ApplicationMacroPlanner.ExportPlanHolder().Data()
*]
}
......@@ -9,6 +9,7 @@ Response OnClick () id:Response_Button_OnClick
{
Body:
[*
this.Intilize();
this.export();
*]
GroupServerCalls: false
......
Quintiq file version 2.0
#parent: #root
Response OnCreated () id:Response_Button_OnCreated
{
#keys: '[413182.1.415437430]'
CanBindMultiple: false
DefinitionID: 'Responsedef_WebComponent_OnCreated'
GroupServerCalls: true
QuillAction
{
Body:
[*
this.UpdateImportStatus( '',false)
*]
}
}
Quintiq file version 2.0
Component PanelGeneral #extension
{
Children:
[
Component EditFieldBatch
{
#keys: '[413182.1.319266301]'
BaseType: 'WebEditField'
Properties:
[
DataBinding: 'DataHolderDialogData.Data.Batch'
Label: 'Batch'
Taborder: 2
]
}
]
}
Quintiq file version 2.0
Component pnlContent #extension
{
Children:
[
#child: PanelGeneral
]
}
Quintiq file version 2.0
#parent: #root
Method OnOK () id:Method_DialogCreateEditRouting_OnOK #extension
{
Body:
[*
// When the user clicks ok,
// we either create or edit the data
this.ApplyChanges();
data := DataHolderDialogData.Data();
if( isnull( data.WrappedInstance() ) )
{
data.Commit();
// Access the form, select the new routing
DataHolderForm.Data().ListRoutings().SelectByKey( data.WrappedInstance().Key() );
}
else
{
data.WrappedInstance().Update0( EditFieldID.Text(), // ID is read only, the changes wont be applied
EditFieldName.Text(),
dsStart.Date(),
dsEnd.Date(),
CheckboxAllowWIP.Checked(),
false /*isfromdb*/,
EditFieldBatch.Text()
);
}
this.Close();
*]
}
Quintiq file version 2.0
#root
#parent: LibMacroPlannerWebUI
OrphanComponent DialogCreateEditRouting #extension
{
Children:
[
#child: pnlContent
]
}
......@@ -16,7 +16,7 @@ Component List681
[*
object.astype( PeriodTaskOperation ).Operation().RoutingStepName() ~ "检验"
object.astype( PeriodTaskOperation ).Operation().RoutingStepName()~ "检验"
*]
Source: 'MacroPlan'
Taborder: 0
......@@ -34,7 +34,7 @@ Component List681
]
Properties:
[
Columns: '[]'
Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"astype(PeriodTaskOperation).Operation.RoutingForPlanningMatrix.ID","title":"ID","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"astype(PeriodTaskOperation).Operation.RoutingForPlanningMatrix.ID"}}]'
ContextMenu: 'listContextMenu902'
Taborder: 2
]
......
Quintiq file version 2.0
Component List681
{
#keys: '[413182.1.216938189]'
BaseType: 'WebList'
Children:
[
Component DataExtractor445
{
#keys: '[413182.1.216938190]'
BaseType: 'WebDataExtractor'
Properties:
[
DataType: 'MacroPlan'
Source: 'MacroPlan'
Taborder: 0
Transformation: 'Process_MP.PeriodTask_MP'
]
}
#child: listActionBarPage493
Component DataSetLevel367
{
#keys: '[413182.1.216938196]'
BaseType: 'WebDataSetLevel'
Children:
[
#child: listContextMenu902
]
Properties:
[
Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Quantity","title":"Quantity","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"Quantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Start","title":"Start","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"Start"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"astype(PeriodTaskOperation).Operation.RoutingForPlanningMatrix.ID","title":"ID","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"astype(PeriodTaskOperation).Operation.RoutingForPlanningMatrix.ID"}}]'
ContextMenu: 'listContextMenu902'
Taborder: 2
]
}
]
Properties:
[
Taborder: 0
]
}
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment