Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev-zlg
已重命名7个文件
已复制1个文件
已修改6个文件
已添加15个文件
已删除5个文件
| | |
| | | { |
| | | DefaultText: 'All fields Required This parameter is mandatory.' |
| | | } |
| | | InfoMessage RecycleBin_DispatchShiftSchedulingDispatchCheck ( |
| | | const String factoryNameChinese, |
| | | const String factoryNameEnglish |
| | | ) |
| | | { |
| | | DefaultText: |
| | | [* |
| | | æ¯å¦ç¡®è®¤ä¸åã@factoryNameChinese@ãæ°æ®ï¼ |
| | | Do you confirm the issuance of [@factoryNameEnglish@] data? |
| | | *] |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation DispatchShiftSchedulingDetail_DispatchShiftSchedulingProduct_DispatchShiftSchedulingProduct_DispatchShiftSchedulingDetail |
| | | { |
| | | #keys: '1[414996.1.172754837]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide DispatchShiftSchedulingProduct |
| | | { |
| | | #keys: '3[414996.1.172754839][414996.1.172754838][414996.1.172754840]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: DispatchShiftSchedulingDetail |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide DispatchShiftSchedulingDetail |
| | | { |
| | | #keys: '3[414996.1.172754842][414996.1.172754841][414996.1.172754843]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: DispatchShiftSchedulingProduct |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
| ÎļþÃû´Ó _Main/BL/Relations/Relation_DispatchShiftSchedulingInformation_RecycleBin_RecycleBin_DispatchSh.qbl ÐÞ¸Ä |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation DispatchShiftSchedulingInformation_RecycleBin_RecycleBin_DispatchShiftSchedulingInformation |
| | | Relation DispatchShiftSchedulingLine_RecycleBin_RecycleBin_DispatchShiftSchedulingLine |
| | | { |
| | | #keys: '1[414996.1.67010175]' |
| | | DefaultRelationStrategy |
| | |
| | | { |
| | | #keys: '3[414996.1.67010177][414996.1.67010176][414996.1.67010178]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: DispatchShiftSchedulingInformation |
| | | ObjectDefinition: DispatchShiftSchedulingLine |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide DispatchShiftSchedulingInformation |
| | | RelationSide.RightSide DispatchShiftSchedulingLine |
| | | { |
| | | #keys: '3[414996.1.67010180][414996.1.67010179][414996.1.67010181]' |
| | | Cardinality: '1toN' |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation DispatchShiftSchedulingProduct_DispatchShiftSchedulingLine_DispatchShiftSchedulingLine_DispatchShiftSchedulingProduct |
| | | { |
| | | #keys: '1[414996.1.172754796]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide DispatchShiftSchedulingLine |
| | | { |
| | | #keys: '3[414996.1.172754798][414996.1.172754797][414996.1.172754799]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: DispatchShiftSchedulingProduct |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide DispatchShiftSchedulingProduct |
| | | { |
| | | #keys: '3[414996.1.172754801][414996.1.172754800][414996.1.172754802]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: DispatchShiftSchedulingLine |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute ProductID |
| | | { |
| | | #keys: '3[414996.1.172754823][414996.1.172754822][414996.1.172754824]' |
| | | Description: 'ç©æå·' |
| | | ValueType: String |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute ProductionQuantity |
| | | { |
| | | #keys: '3[414996.1.172754827][414996.1.172754826][414996.1.172754828]' |
| | | Description: '产å产é' |
| | | ValueType: Real |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type DispatchShiftSchedulingProduct |
| | | { |
| | | #keys: '5[414996.1.172754790][414996.1.172754788][0.0.0][414996.1.172754789][414996.1.172754791]' |
| | | BaseType: Object |
| | | Description: 'ä¸åçæ¬¡æäº§ä¿¡æ¯ -- 产å' |
| | | StructuredName: 'DispatchShiftSchedulingProducts' |
| | | } |
| ÎļþÃû´Ó _Main/BL/Type_DispatchShiftSchedulingInformation/Attribute_ProductLine.qbl ÐÞ¸Ä |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute ProductLine |
| | | Attribute LineName |
| | | { |
| | | #keys: '3[414996.1.67010068][414996.1.67010067][414996.1.67010069]' |
| | | Description: '产线' |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute LineQuantity |
| | | { |
| | | #keys: '3[414996.1.172754776][414996.1.172754775][414996.1.172754777]' |
| | | Description: '产线产é' |
| | | ValueType: Real |
| | | } |
| | |
| | | #parent: #root |
| | | Attribute ShiftDate |
| | | { |
| | | #keys: '3[414996.1.67010092][414996.1.67010091][414996.1.67010093]' |
| | | #keys: '3[414996.1.172820109][414996.1.172820108][414996.1.172820110]' |
| | | Description: 'çæ¬¡æ¥æ' |
| | | ValueType: Date |
| | | } |
| | |
| | | #parent: #root |
| | | Attribute ShiftName |
| | | { |
| | | #keys: '3[414996.1.67010106][414996.1.67010105][414996.1.67010107]' |
| | | #keys: '3[414996.1.172820106][414996.1.172820105][414996.1.172820107]' |
| | | Description: 'çæ¬¡åç§°' |
| | | ValueType: String |
| | | } |
| ÎļþÃû´Ó _Main/BL/Type_DispatchShiftSchedulingInformation/DefaultValue_ProductLine.qbl ÐÞ¸Ä |
| | |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: ProductLine |
| | | TargetAttribute: ShiftName |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcLineQuantity |
| | | { |
| | | TextBody: |
| | | [* |
| | | // Akari Oct-27-2024 (created) |
| | | |
| | | value := this.CalculateLineQuantity(); |
| | | |
| | | this.LineQuantity( value ); |
| | | *] |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method CalculateLineQuantity () const declarative remote as Real |
| | | { |
| | | TextBody: |
| | | [* |
| | | // Akari Oct-27-2024 (created) |
| | | value := sum( this,DispatchShiftSchedulingProduct,object,object.ProductionQuantity() ); |
| | | return value; |
| | | *] |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod DispatchCC ( |
| | | const RecycleBin recycleBin |
| | | ) as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // Akari Oct-28-2024 (created) |
| | | // æ¥å£å°åï¼172.18.1.12/PPPS/AddPlan ---é¿æ¥å°å |
| | | url := "http://172.18.1.12/PPPS/AddPlan"; |
| | | |
| | | datas := selectset( recycleBin,DispatchShiftSchedulingLine.DispatchShiftSchedulingProduct,object,object.DispatchShiftSchedulingLine().Fac() = "CC" ); |
| | | |
| | | datas_Json := JSON::Array(); |
| | | |
| | | traverse( datas,Elements,product ){ |
| | | line := product.DispatchShiftSchedulingLine(); |
| | | |
| | | data_Json := JSON::Object(); |
| | | datas_Json.Add( data_Json ); |
| | | |
| | | data_Json.Add( "LineName" , line.LineName() ); |
| | | data_Json.Add( "ProductionDate",line.ShiftDate().Format( "Y-M2-D2" )); |
| | | data_Json.Add( "shiftCode" , line.ShiftName() ); |
| | | details_Json := JSON::Array(); |
| | | data_Json.Add( "planItems",details_Json ); |
| | | traverse( product,DispatchShiftSchedulingDetail,detail ){ |
| | | detail_Json := JSON::Object(); |
| | | details_Json.Add( detail_Json ); |
| | | detail_Json.Add( "ShiftName",detail.SingleShiftName() ); |
| | | detail_Json.Add( "Quantity",detail.ShiftVolume() ); |
| | | detail_Json.Add( "ProductNo",detail.DispatchShiftSchedulingProduct().ProductID() ); |
| | | } |
| | | } |
| | | |
| | | info( datas_Json.AsString() ); |
| | | |
| | | i := HTTPInterface::Create( url, 80 ); |
| | | i.URL( url ); |
| | | i.PostMethod( true ); |
| | | i.MediaType( "application/json" ); |
| | | i.TimeOut( Duration::Minutes( 5 ) ); |
| | | |
| | | i.Call( datas_Json.AsString() ); |
| | | |
| | | htmlresult := i.Result(); |
| | | |
| | | respJSON := JSON::Parse( htmlresult ); |
| | | |
| | | return respJSON.Get( "Message" ).AsString(); |
| | | *] |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod DispatchDL ( |
| | | const RecycleBin recycleBin |
| | | ) as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // Akari Oct-28-2024 (created) |
| | | // æ¥å£å°åï¼172.30.9.10/PPPS/AddPlanâ大è¿å°å |
| | | url := "http://172.30.9.10/PPPS/AddPlan" |
| | | |
| | | datas := selectset( recycleBin,DispatchShiftSchedulingLine.DispatchShiftSchedulingProduct,object,object.DispatchShiftSchedulingLine().Fac() = "DL" ); |
| | | |
| | | datas_Json := JSON::Array(); |
| | | |
| | | traverse( datas,Elements,product ){ |
| | | line := product.DispatchShiftSchedulingLine(); |
| | | |
| | | data_Json := JSON::Object(); |
| | | datas_Json.Add( data_Json ); |
| | | |
| | | data_Json.Add( "LineName" , line.LineName() ); |
| | | data_Json.Add( "ProductionDate",line.ShiftDate().Format( "Y-M2-D2" )); |
| | | data_Json.Add( "shiftCode" , line.ShiftName() ); |
| | | details_Json := JSON::Array(); |
| | | data_Json.Add( "planItems",details_Json ); |
| | | traverse( product,DispatchShiftSchedulingDetail,detail ){ |
| | | detail_Json := JSON::Object(); |
| | | details_Json.Add( detail_Json ); |
| | | detail_Json.Add( "ShiftName",detail.SingleShiftName() ); |
| | | detail_Json.Add( "Quantity",detail.ShiftVolume() ); |
| | | detail_Json.Add( "ProductNo",detail.DispatchShiftSchedulingProduct().ProductID() ); |
| | | } |
| | | } |
| | | |
| | | info( datas_Json.AsString() ); |
| | | |
| | | i := HTTPInterface::Create( url, 80 ); |
| | | i.URL( url ); |
| | | i.PostMethod( true ); |
| | | i.MediaType( "application/json" ); |
| | | i.TimeOut( Duration::Minutes( 5 ) ); |
| | | |
| | | i.Call( datas_Json.AsString() ); |
| | | |
| | | htmlresult := i.Result(); |
| | | |
| | | respJSON := JSON::Parse( htmlresult ); |
| | | |
| | | return respJSON.Get( "Message" ).AsString(); |
| | | *] |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GenerateDispatchData ( |
| | | Date startDate, |
| | | Date endDate, |
| | | const NewOfflinePlanTable offlinePlan, |
| | | RecycleBin owner |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // Akari Sep-4-2024 (created) |
| | | owner.DispatchShiftSchedulingLine( relflush ); |
| | | macroPlan := offlinePlan.MacroPlan(); |
| | | now := DateTime::Now(); |
| | | |
| | | shiftPatterns := selectset( macroPlan,ShiftPattern,object,true ); |
| | | shiftPatternIndexTree := NamedValueTree::Create(); |
| | | for( i := 0; i < shiftPatterns.Size(); i++){ |
| | | shiftPattern := shiftPatterns.Element( i ); |
| | | shiftPatternHandle := shiftPatternIndexTree.GetHandle( shiftPattern.Name() ); |
| | | shiftPatternIndexTree.Root().AddChild( shiftPatternHandle,i ); |
| | | } |
| | | |
| | | units := selectset( macroPlan,Unit,object, true ); |
| | | unitIndexTree := NamedValueTree::Create(); |
| | | for( i := 0; i < units.Size(); i++){ |
| | | unit := units.Element( i ); |
| | | unitHandle := unitIndexTree.GetHandle( unit.Name() ); |
| | | unitIndexTree.Root().AddChild( unitHandle,i ); |
| | | } |
| | | |
| | | lines := construct( DispatchShiftSchedulingLines ); |
| | | lineIndexTree := NamedValueTree::Create(); |
| | | |
| | | products := construct( DispatchShiftSchedulingProducts ); |
| | | productIndexTree := NamedValueTree::Create(); |
| | | |
| | | //productionDetails := construct( DispatchShiftSchedulingDetails ); |
| | | //productionDetailIndexTree := NamedValueTree::Create(); |
| | | traverse( offlinePlan,NewOfflinePlanRow,row ,not row.ProductionLine().ToUpper().LikeUserLocale( "MOMO" )){ |
| | | line := null( DispatchShiftSchedulingLine ); |
| | | factory := constnull( Unit ); |
| | | { |
| | | unitHandle := unitIndexTree.GetHandle( row.ProductionLine() ); |
| | | unitIndex := guard( unitIndexTree.Root().Child( unitHandle ), null( NamedValue )); |
| | | if( not isnull( unitIndex )){ |
| | | unit := units.Element( unitIndex.GetValueAsNumber() ); |
| | | temp1 := unit; |
| | | temp2 := unit.Parent(); |
| | | while( not isnull( temp1.Parent())){ |
| | | temp2 := temp1; |
| | | temp1 := temp1.Parent(); |
| | | } |
| | | factory := temp2; |
| | | } |
| | | } |
| | | |
| | | traverse( row,NewOfflinePlanCell,cell, startDate <= cell.NewOfflinePlanColumn().StartDate() and endDate >= cell.NewOfflinePlanColumn().EndDate()){ |
| | | product := null( DispatchShiftSchedulingProduct ); |
| | | { |
| | | lineKey := row.ProductionLine() + cell.NewOfflinePlanColumn().StartDate().AsQUILL(); |
| | | lineHandle := lineIndexTree.GetHandle( lineKey ); |
| | | lineIndex := guard( lineIndexTree.Root().Child( lineHandle ),null( NamedValue )); |
| | | if( isnull( lineIndex )){ |
| | | line := owner.DispatchShiftSchedulingLine( relnew,ID := IDHolder::GetGUID(),LineName := row.ProductionLine(),ShiftDate := cell.NewOfflinePlanColumn().StartDate() ); |
| | | line.FactoryName( factory.Name() ); |
| | | line.InterfaceTime( now ); |
| | | line.VersionName( macroPlan.MDSMacroPlan().Description() ); |
| | | line.ShiftName( cell.ShiftPatternName() ); |
| | | lines.Add( line ); |
| | | lineIndexTree.Root().AddChild( lineHandle,lines.Size() - 1 ); |
| | | }else{ |
| | | line := lines.Element( lineIndex.GetValueAsNumber() ); |
| | | } |
| | | |
| | | productHandle := productIndexTree.GetHandle( lineKey + row.ProductID() ); |
| | | productIndex := guard( productIndexTree.Root().Child( productHandle ),null( NamedValue )); |
| | | if( isnull( productIndex )){ |
| | | product := line.DispatchShiftSchedulingProduct( relnew,ProductID := row.ProductID() ); |
| | | product.ProductionQuantity( cell.Quantity() ); |
| | | products.Add( product ); |
| | | productIndexTree.Root().AddChild( productHandle,products.Size() - 1 ); |
| | | }else{ |
| | | product := products.Element( productIndex.GetValueAsNumber() ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | traverse( macroPlan,NewAssemblyOnlinePlanRow,row , row.ProductionLine().ToUpper().LikeUserLocale( "MOMO" )){ |
| | | line := null( DispatchShiftSchedulingLine ); |
| | | factory := constnull( Unit ); |
| | | { |
| | | unitHandle := unitIndexTree.GetHandle( row.ProductionLine() ); |
| | | unitIndex := guard( unitIndexTree.Root().Child( unitHandle ), null( NamedValue )); |
| | | if( not isnull( unitIndex )){ |
| | | unit := units.Element( unitIndex.GetValueAsNumber() ); |
| | | temp1 := unit; |
| | | temp2 := unit.Parent(); |
| | | while( not isnull( temp1.Parent())){ |
| | | temp2 := temp1; |
| | | temp1 := temp1.Parent(); |
| | | } |
| | | factory := temp2; |
| | | } |
| | | } |
| | | |
| | | traverse( row,NewAssemblyOnlinePlanCell,cell, startDate <= cell.NewAssemblyOnlinePlanColumn().StartDate() and endDate >= cell.NewAssemblyOnlinePlanColumn().EndDate()){ |
| | | product := null( DispatchShiftSchedulingProduct ); |
| | | { |
| | | lineKey := row.ProductionLine() + cell.NewAssemblyOnlinePlanColumn().StartDate().AsQUILL(); |
| | | lineHandle := lineIndexTree.GetHandle( lineKey ); |
| | | lineIndex := guard( lineIndexTree.Root().Child( lineHandle ),null( NamedValue )); |
| | | if( isnull( lineIndex )){ |
| | | line := owner.DispatchShiftSchedulingLine( relnew,ID := IDHolder::GetGUID(),LineName := row.ProductionLine(),ShiftDate := cell.NewAssemblyOnlinePlanColumn().StartDate() ); |
| | | line.FactoryName( factory.Name() ); |
| | | line.InterfaceTime( now ); |
| | | line.VersionName( macroPlan.MDSMacroPlan().Description() ); |
| | | line.ShiftName( cell.ShiftPatternName() ); |
| | | lines.Add( line ); |
| | | lineIndexTree.Root().AddChild( lineHandle,lines.Size() - 1 ); |
| | | }else{ |
| | | line := lines.Element( lineIndex.GetValueAsNumber() ); |
| | | } |
| | | |
| | | productHandle := productIndexTree.GetHandle( lineKey + row.ProductID() ); |
| | | productIndex := guard( productIndexTree.Root().Child( productHandle ),null( NamedValue )); |
| | | if( isnull( productIndex )){ |
| | | product := line.DispatchShiftSchedulingProduct( relnew,ProductID := row.ProductID() ); |
| | | product.ProductionQuantity( cell.Quantity() ); |
| | | products.Add( product ); |
| | | productIndexTree.Root().AddChild( productHandle,products.Size() - 1 ); |
| | | }else{ |
| | | product := products.Element( productIndex.GetValueAsNumber() ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | traverse( lines,Elements,line ){ |
| | | line.CalcLineQuantity(); |
| | | |
| | | // 481 |
| | | lineQuantity := line.LineQuantity(); |
| | | |
| | | tempProducts := selectsortedset( line,DispatchShiftSchedulingProduct,object,object.ProductionQuantity() ); |
| | | |
| | | if( line.ShiftName() = "3" ){ |
| | | singleShiftVolume1 := lineQuantity / 3; |
| | | singleShiftVolume2 := lineQuantity / 3; |
| | | singleShiftVolume3 := lineQuantity / 3; |
| | | for( i := tempProducts.Size() - 1;i >= 0; i-- ){ |
| | | product := tempProducts.Element( i ); |
| | | productionQuantity := product.ProductionQuantity(); |
| | | |
| | | if( singleShiftVolume1 > 0 and productionQuantity > 0){ |
| | | tempProductQuantity := singleShiftVolume1 - productionQuantity; |
| | | detail := product.DispatchShiftSchedulingDetail( relnew,ShiftVolume := ifexpr( tempProductQuantity > 0 ,productionQuantity,singleShiftVolume1 ) ,SingleShiftName := "ç½ç"); |
| | | singleShiftVolume1 := singleShiftVolume1 - productionQuantity; |
| | | productionQuantity := productionQuantity - detail.ShiftVolume(); |
| | | }else if(singleShiftVolume2 > 0 and productionQuantity > 0){ |
| | | tempProductQuantity := singleShiftVolume2 - productionQuantity; |
| | | detail := product.DispatchShiftSchedulingDetail( relnew,ShiftVolume := ifexpr( tempProductQuantity > 0 ,productionQuantity,singleShiftVolume2 ) ,SingleShiftName := "äºç"); |
| | | singleShiftVolume2 := singleShiftVolume2 - productionQuantity; |
| | | productionQuantity := productionQuantity - detail.ShiftVolume(); |
| | | }else if(singleShiftVolume3 > 0 and productionQuantity > 0){ |
| | | tempProductQuantity := singleShiftVolume3 - productionQuantity; |
| | | detail := product.DispatchShiftSchedulingDetail( relnew,ShiftVolume := ifexpr( tempProductQuantity > 0 ,productionQuantity,singleShiftVolume3 ) ,SingleShiftName := "äºç"); |
| | | singleShiftVolume3 := singleShiftVolume3 - productionQuantity; |
| | | productionQuantity := productionQuantity - detail.ShiftVolume(); |
| | | } |
| | | } |
| | | |
| | | }else if( line.ShiftName() = "2" ){ |
| | | // 240.5 |
| | | singleShiftVolume1 := lineQuantity / 2; |
| | | singleShiftVolume2 := lineQuantity / 2; |
| | | for( i := tempProducts.Size() - 1;i >= 0; i-- ){ |
| | | product := tempProducts.Element( i ); |
| | | // 288 |
| | | productionQuantity := product.ProductionQuantity(); |
| | | |
| | | if( singleShiftVolume1 > 0 and productionQuantity > 0){ |
| | | // -47.5 |
| | | tempProductQuantity := singleShiftVolume1 - productionQuantity; |
| | | detail := product.DispatchShiftSchedulingDetail( relnew,ShiftVolume := ifexpr( tempProductQuantity > 0 ,productionQuantity,singleShiftVolume1 ) ,SingleShiftName := "ç½ç"); |
| | | singleShiftVolume1 := singleShiftVolume1 - productionQuantity; |
| | | productionQuantity := productionQuantity - detail.ShiftVolume(); |
| | | } |
| | | if(singleShiftVolume2 > 0 and productionQuantity > 0){ |
| | | tempProductQuantity := singleShiftVolume2 - productionQuantity; |
| | | detail := product.DispatchShiftSchedulingDetail( relnew,ShiftVolume := ifexpr( tempProductQuantity > 0 ,productionQuantity,singleShiftVolume2 ) ,SingleShiftName := "äºç"); |
| | | singleShiftVolume2 := singleShiftVolume2 - productionQuantity; |
| | | productionQuantity := productionQuantity - detail.ShiftVolume(); |
| | | } |
| | | } |
| | | |
| | | }else if( line.ShiftName() = "1" ){ |
| | | singleShiftVolume1 := lineQuantity / 1; |
| | | for( i := tempProducts.Size() - 1;i >= 0; i-- ){ |
| | | product := tempProducts.Element( i ); |
| | | productionQuantity := product.ProductionQuantity(); |
| | | if( singleShiftVolume1 > 0 and productionQuantity > 0){ |
| | | tempProductQuantity := singleShiftVolume1 - productionQuantity; |
| | | detail := product.DispatchShiftSchedulingDetail( relnew,ShiftVolume := ifexpr( tempProductQuantity > 0 ,productionQuantity,singleShiftVolume1 ) ,SingleShiftName := "ç½ç"); |
| | | singleShiftVolume1 := singleShiftVolume1 - productionQuantity; |
| | | productionQuantity := productionQuantity - detail.ShiftVolume(); |
| | | } |
| | | } |
| | | |
| | | }else{ |
| | | // singleShiftVolume := lineQuantity / 1; |
| | | } |
| | | } |
| | | info( "Success" ); |
| | | *] |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type DispatchShiftSchedulingLine |
| | | { |
| | | #keys: '5[414996.1.67010064][414996.1.67010062][0.0.0][414996.1.67010063][414996.1.67010065]' |
| | | BaseType: Object |
| | | Description: 'ä¸åçæ¬¡æäº§ä¿¡æ¯ -- 产线' |
| | | StructuredName: 'DispatchShiftSchedulingLines' |
| | | } |
| ÎļþÃû´Ó _Main/BL/Type_DispatchShiftSchedulingInformation/Attribute_ShiftEndDate.qbl ÐÞ¸Ä |
| | |
| | | #parent: #root |
| | | Attribute ShiftEndDate |
| | | { |
| | | #keys: '3[414996.1.67010149][414996.1.67010148][414996.1.67010150]' |
| | | #keys: '3[414996.1.172754762][414996.1.172754761][414996.1.172754763]' |
| | | Description: 'çæ¬¡çç»ææ¶é´' |
| | | ValueType: DateTime |
| | | } |
| ÎļþÃû´Ó _Main/BL/Type_DispatchShiftSchedulingInformation/Attribute_ShiftStartDate.qbl ÐÞ¸Ä |
| | |
| | | #parent: #root |
| | | Attribute ShiftStartDate |
| | | { |
| | | #keys: '3[414996.1.67010139][414996.1.67010138][414996.1.67010140]' |
| | | #keys: '3[414996.1.172754767][414996.1.172754766][414996.1.172754768]' |
| | | Description: 'çæ¬¡èµ·å§æ¶é´' |
| | | ValueType: DateTime |
| | | } |
| ÎļþÃû´Ó _Main/BL/Type_DispatchShiftSchedulingInformation/Attribute_ShiftVolume.qbl ÐÞ¸Ä |
| | |
| | | #parent: #root |
| | | Attribute ShiftVolume |
| | | { |
| | | #keys: '3[414996.1.67010126][414996.1.67010125][414996.1.67010127]' |
| | | #keys: '3[414996.1.172754772][414996.1.172754771][414996.1.172754773]' |
| | | Description: 'åçæ¬¡äº§é' |
| | | ValueType: Real |
| | | } |
| ÎļþÃû´Ó _Main/BL/Type_DispatchShiftSchedulingInformation/Attribute_SingleShiftName.qbl ÐÞ¸Ä |
| | |
| | | #parent: #root |
| | | Attribute SingleShiftName |
| | | { |
| | | #keys: '3[414996.1.67010116][414996.1.67010115][414996.1.67010117]' |
| | | #keys: '3[414996.1.172754757][414996.1.172754756][414996.1.172754758]' |
| | | Description: 'åçæ¬¡åç§°' |
| | | ValueType: String |
| | | } |
copy from _Main/BL/Type_DispatchShiftSchedulingInformation/DefaultValue_ProductLine.qbl
copy to _Main/BL/Type_DispatchShiftSchedulingInformationDetail/DefaultValue_SingleShiftName.qbl
| Îļþ´Ó _Main/BL/Type_DispatchShiftSchedulingInformation/DefaultValue_ProductLine.qbl ¸´ÖÆ |
| | |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: ProductLine |
| | | TargetAttribute: SingleShiftName |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type DispatchShiftSchedulingDetail |
| | | { |
| | | #keys: '5[414996.1.172754720][414996.1.172754718][0.0.0][414996.1.172754719][414996.1.172754721]' |
| | | BaseType: Object |
| | | StructuredName: 'DispatchShiftSchedulingDetails' |
| | | } |
| | |
| | | Quintiq file version 2.0 |
| | | Component pnlContent |
| | | { |
| | | #error 102458: "Class Component with id 'pnlContent' cannot find its child with id 'pnlCCFactory'. The file / folder structure might be corrupted due to integration." |
| | | #error 102458: "Class Component with id 'pnlContent' cannot find its child with id 'pnlDLFactory'. The file / folder structure might be corrupted due to integration." |
| | | #keys: '[413988.0.1292313211]' |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | #child: pnlDLFactory |
| | | #child: pnlCCFactory |
| | | ] |
| | | Properties: |
| | | [ |
| | | Orientation: 'tab' |
| | |
| | | [ |
| | | DataType: 'RecycleBin' |
| | | FilterArguments: 'checkedUnits:QMacroPlanner::FormDispatchShiftSchedulingInformation.dhFinalUnits' |
| | | FixedFilter: 'exists( checkedUnits,Elements,unit,unit.DisplayName() = object.ProductLine())' |
| | | FixedFilter: 'exists( checkedUnits,Elements,unit,unit.DisplayName() = object.DispatchShiftSchedulingProduct().DispatchShiftSchedulingLine().LineName())' |
| | | Source: 'RecycleBin' |
| | | Taborder: 0 |
| | | Transformation: 'DispatchShiftSchedulingInformation' |
| | | Transformation: 'DispatchShiftSchedulingLine.DispatchShiftSchedulingProduct.DispatchShiftSchedulingDetail' |
| | | ] |
| | | } |
| | | #child: listActionBarPageData |
| | |
| | | ] |
| | | Properties: |
| | | [ |
| | | Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ID","title":"ID","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Fac","title":"Fac","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"Fac"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"FactoryName","title":"FactoryName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"FactoryName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"InterfaceTime","title":"InterfaceTime","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"InterfaceTime"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Product","title":"Product","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Product"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ProductLine","title":"ProductLine","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ProductLine"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShiftDate","title":"ShiftDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ShiftDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShiftEndDate","title":"ShiftEndDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ShiftEndDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShiftName","title":"ShiftName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ShiftName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShiftStartDate","title":"ShiftStartDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ShiftStartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShiftVolume","title":"ShiftVolume","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ShiftVolume"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SingleShiftName","title":"SingleShiftName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SingleShiftName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Tips","title":"Tips","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Tips"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"VersionFlag","title":"VersionFlag","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"VersionFlag"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"VersionName","title":"VersionName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"VersionName"}}]' |
| | | Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DispatchShiftSchedulingProduct.DispatchShiftSchedulingLine.ID","title":"ID","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"DispatchShiftSchedulingProduct.DispatchShiftSchedulingLine.ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DispatchShiftSchedulingProduct.DispatchShiftSchedulingLine.FactoryName","title":"FactoryName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"DispatchShiftSchedulingProduct.DispatchShiftSchedulingLine.FactoryName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DispatchShiftSchedulingProduct.DispatchShiftSchedulingLine.Fac","title":"Fac","subtotals":"","tooltip":"","width":-1,"display":"shown","attribute":"DispatchShiftSchedulingProduct.DispatchShiftSchedulingLine.Fac"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DispatchShiftSchedulingProduct.DispatchShiftSchedulingLine.InterfaceTime","title":"InterfaceTime","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"DispatchShiftSchedulingProduct.DispatchShiftSchedulingLine.InterfaceTime"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DispatchShiftSchedulingProduct.DispatchShiftSchedulingLine.LineName","title":"LineName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"DispatchShiftSchedulingProduct.DispatchShiftSchedulingLine.LineName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DispatchShiftSchedulingProduct.DispatchShiftSchedulingLine.LineQuantity","title":"LineQuantity","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"DispatchShiftSchedulingProduct.DispatchShiftSchedulingLine.LineQuantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DispatchShiftSchedulingProduct.DispatchShiftSchedulingLine.ShiftDate","title":"ShiftDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"DispatchShiftSchedulingProduct.DispatchShiftSchedulingLine.ShiftDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DispatchShiftSchedulingProduct.DispatchShiftSchedulingLine.ShiftName","title":"ShiftName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"DispatchShiftSchedulingProduct.DispatchShiftSchedulingLine.ShiftName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DispatchShiftSchedulingProduct.DispatchShiftSchedulingLine.Tips","title":"Tips","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"DispatchShiftSchedulingProduct.DispatchShiftSchedulingLine.Tips"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DispatchShiftSchedulingProduct.DispatchShiftSchedulingLine.VersionFlag","title":"VersionFlag","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"DispatchShiftSchedulingProduct.DispatchShiftSchedulingLine.VersionFlag"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DispatchShiftSchedulingProduct.DispatchShiftSchedulingLine.VersionName","title":"VersionName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"DispatchShiftSchedulingProduct.DispatchShiftSchedulingLine.VersionName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DispatchShiftSchedulingProduct.ProductID","title":"ProductID","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"DispatchShiftSchedulingProduct.ProductID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"DispatchShiftSchedulingProduct.ProductionQuantity","title":"ProductionQuantity","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"DispatchShiftSchedulingProduct.ProductionQuantity"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"SingleShiftName","title":"SingleShiftName","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"SingleShiftName"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShiftVolume","title":"ShiftVolume","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ShiftVolume"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShiftStartDate","title":"ShiftStartDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ShiftStartDate"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ShiftEndDate","title":"ShiftEndDate","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"ShiftEndDate"}}]' |
| | | ContextMenu: 'listContextMenuData' |
| | | Taborder: 2 |
| | | ] |
| | |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | Component ButtonDispatch id:ButtonDispatch_715 |
| | | Component bGenerateDispatchData |
| | | { |
| | | #keys: '[414996.1.100510694]' |
| | | BaseType: 'WebButton' |
| | |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | | Component cbCC |
| | | { |
| | | #keys: '[414996.1.172950712]' |
| | | BaseType: 'WebCheckbox' |
| | | Properties: |
| | | [ |
| | | Label: 'é¿æ¥å·¥å' |
| | | Taborder: 3 |
| | | ] |
| | | } |
| | | Component cbDL |
| | | { |
| | | #keys: '[414996.1.172950725]' |
| | | BaseType: 'WebCheckbox' |
| | | Properties: |
| | | [ |
| | | Label: '大è¿å·¥å' |
| | | Taborder: 4 |
| | | ] |
| | | } |
| | | Component bDispatch |
| | | { |
| | | #keys: '[414996.1.172950741]' |
| | | BaseType: 'WebButton' |
| | | Properties: |
| | | [ |
| | | Label: 'ä¸å' |
| | | Taborder: 5 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: PanelDispatchShiftSchedulingInformation/bDispatch |
| | | Response OnClick () id:Response_PanelDispatchShiftSchedulingInformation_bDispatch_OnClick |
| | | { |
| | | #keys: '[414996.1.172931481]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebButton_OnClick' |
| | | Precondition: |
| | | [* |
| | | return cbCC.Checked() or cbDL.Checked(); |
| | | *] |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | factoryNameChinese := ""; |
| | | factoryNameEnglish := ""; |
| | | if( cbCC.Checked() ){ |
| | | factoryNameChinese := factoryNameChinese.Concat( "é¿æ¥å·¥å;" ); |
| | | factoryNameEnglish := factoryNameEnglish.Concat( "CC;" ); |
| | | } |
| | | if( cbDL.Checked() ){ |
| | | factoryNameChinese := factoryNameChinese.Concat( "大è¿å·¥å;" ); |
| | | factoryNameEnglish := factoryNameEnglish.Concat( "DL;" ); |
| | | } |
| | | if( WebMessageBox::Question( Translations::RecycleBin_DispatchShiftSchedulingDispatchCheck( factoryNameChinese,factoryNameEnglish ),Translations::MessageBox_YesNo() ) = 0 ){ |
| | | if( cbCC.Checked() ){ |
| | | message := DispatchShiftSchedulingLine::DispatchCC( RecycleBin ); |
| | | WebMessageBox::Information( message ); |
| | | } |
| | | if( cbDL.Checked() ){ |
| | | message := DispatchShiftSchedulingLine::DispatchDL( RecycleBin ); |
| | | WebMessageBox::Information( message ); |
| | | } |
| | | } |
| | | WebMessageBox::Success( "ä¸åæå" ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: PanelDispatchShiftSchedulingInformation/bGenerateDispatchData |
| | | Response OnClick () id:Response_PanelDispatchShiftSchedulingInformation_bGenerateDispatchData_OnClick_844 |
| | | { |
| | | #keys: '[414996.1.100510693]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebButton_OnClick' |
| | | GroupServerCalls: true |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | offlineTable := select( MacroPlan,NewOfflinePlanTable,table,true ); |
| | | |
| | | DispatchShiftSchedulingLine::GenerateDispatchData( dsStartDate.Date(),dsEndDate.Date(),offlineTable,RecycleBin ); |
| | | |
| | | WebMessageBox::Success( "Success" ); |
| | | *] |
| | | } |
| | | } |