| | |
| | | shiftStartDateOPRs := selectset( opt, OfflinePlanRow, tempOPR, tempOPR.Type() = "5" ); |
| | | shiftEndDateOPRs := selectset( opt, OfflinePlanRow, tempOPR, tempOPR.Type() = "6" ); |
| | | traverse ( opt, OfflinePlanColumn, opc, opc.OfflinePlanCell( relsize ) > 0 and opc.ColumnDate() >= macroPlan.StartOfPlanning().Date() ) { |
| | | // 补全总量 |
| | | traverse ( totalOPRs, Elements, totalOPR ) { |
| | | total := sum( opc, OfflinePlanCell, tempOPC, tempOPC.OfflinePlanRow().ProductionLine() = totalOPR.ProductionLine() and tempOPC.OfflinePlanRow().Type() = "1", [Real]tempOPC.Value() ); |
| | | totalCell := opc.OfflinePlanCell( relnew, Value := [String]total ); |
| | | totalCell.OfflinePlanRow( relset, totalOPR ); |
| | | } |
| | | |
| | | // &班次 |
| | | traverse ( shiftOPRs, Elements, shiftOPR ) { |
| | | shift := select( opc, OfflinePlanCell, tempOPC, tempOPC.OfflinePlanRow().ProductionLine() = shiftOPR.ProductionLine() and tempOPC.OfflinePlanRow().Type() = "1" ); |
| | | if ( not isnull( shift ) ) { |
| | |
| | | } |
| | | } |
| | | |
| | | // 班次开始时间 |
| | | traverse ( shiftStartDateOPRs, Elements, ssdOPR ) { |
| | | shift := select( opc, OfflinePlanCell, tempOPC, tempOPC.OfflinePlanRow().ProductionLine() = ssdOPR.ProductionLine() and tempOPC.OfflinePlanRow().Type() = "1" ); |
| | | if ( not isnull( shift ) ) { |
| | |
| | | } |
| | | } |
| | | |
| | | // 班次结束时间 |
| | | traverse ( shiftEndDateOPRs, Elements, sedOPR ) { |
| | | shift := select( opc, OfflinePlanCell, tempOPC, tempOPC.OfflinePlanRow().ProductionLine() = sedOPR.ProductionLine() and tempOPC.OfflinePlanRow().Type() = "1" ); |
| | | if ( not isnull( shift ) ) { |
| | |
| | | indexDate := indexDate + 1; |
| | | } |
| | | |
| | | // 补全空格子 |
| | | traverse ( opt, OfflinePlanRow, opr ) { |
| | | traverse ( opt, OfflinePlanColumn, opc ) { |
| | | cell := select( opr, OfflinePlanCell, tempOPC, tempOPC.OfflinePlanColumn() = opc ); |
| | | if ( isnull( cell ) ) { |
| | | cell := opc.OfflinePlanCell( relnew, Value := "" ); |
| | | cell.OfflinePlanRow( relset, opr ); |
| | | } |
| | | } |
| | | } |
| | | |
| | | Transaction::Transaction().PropagateAll(); |
| | | |
| | | // 设置生产顺序 |