migrated from OI 9
This commit is contained in:
@ -62,7 +62,7 @@ Declare function Logging_Services, Environment_Services, Datetime, obj_WO_Ste
|
||||
Declare function SRP_Rotate_Array, SRP_DateTime, obj_WO_Log, obj_Shipment, SRP_Date
|
||||
Declare subroutine Material_Services, Memory_Services, Database_Services, SRP_Array, Btree.Extract, Logging_Services
|
||||
Declare subroutine SRP_Stopwatch, Set_Status, RList, Work_Order_Services, SQL_Services, obj_WO_Mat, obj_Notes
|
||||
Declare subroutine SRP_Rotate_Array, SRP_DateTime, obj_WO_Log
|
||||
Declare subroutine SRP_Rotate_Array, SRP_DateTime, obj_WO_Log, Hold_Services
|
||||
|
||||
UseMakeupWafersTable = Database_Services('ReadDataRow', 'APP_INFO', 'USE_MAKEUP_WAFERS_TABLE')
|
||||
If UseMakeupWafersTable EQ '' then UseMakeupWafersTable = False$
|
||||
@ -133,19 +133,39 @@ Service GetLotHistory(IDType=IDType, LotID, StartDate, EndDate)
|
||||
RDSNo = WOMatRow<WO_MAT_RDS_NO$>
|
||||
RDSRow = Database_Services('ReadDataRow', 'RDS', RDSNo)
|
||||
|
||||
// Get RDS Comments
|
||||
CommentDates = RDSRow<RDS_COMMENT_DATE$>
|
||||
CommentUsers = RDSRow<RDS_COMMENT_USER$>
|
||||
Comments = RDSRow<RDS_COMMENT_NOTE$>
|
||||
CommentList = CommentDates :@FM: CommentUsers :@FM:@FM: Comments
|
||||
CommentArray = SRP_Rotate_Array(CommentList)
|
||||
|
||||
CommentCount = DCount(CommentArray, @FM)
|
||||
For I = 1 to CommentCount
|
||||
ThisComment = CommentArray<I, 4>
|
||||
Begin Case
|
||||
Case IndexC(ThisComment, 'Material Taken off Hold', 1)
|
||||
CommentArray<I,3> = 'HOLD_OFF'
|
||||
|
||||
Case IndexC(ThisComment, 'Material Placed on Hold', 1)
|
||||
CommentArray<I,3> = 'HOLD_ON'
|
||||
End Case
|
||||
Next I
|
||||
|
||||
// WO_MAT Actions
|
||||
INVDTMs = WOMatRow<WO_MAT_INV_DTM$>
|
||||
INVUsers = WOMatRow<WO_MAT_INV_USER$>
|
||||
INVActions = WOMatRow<WO_MAT_INV_ACTION$>
|
||||
ActionList = INVDTMs :@FM: INVUsers :@FM: INVActions :@FM:@FM
|
||||
ActionArray = SRP_Rotate_Array(ActionList)
|
||||
|
||||
// Get RDS Comments
|
||||
CommentDates = RDSRow<RDS_COMMENT_DATE$>
|
||||
CommentUsers = RDSRow<RDS_COMMENT_USER$>
|
||||
Comments = RDSRow<RDS_COMMENT_NOTE$>
|
||||
CommentList = CommentDates :@FM: CommentUsers :@FM:@FM: Comments
|
||||
CommentArray = SRP_Rotate_Array(CommentList)
|
||||
// Remove Hold Inventory actions from array because they are populated from RDS commments.
|
||||
Locate 'HOLD_OFF' in InvActions Using @VM Setting POS then
|
||||
ActionArray = Delete(ActionArray, POS, 0, 0)
|
||||
end
|
||||
Locate 'HOLD_ON' in InvActions Using @VM Setting POS then
|
||||
ActionArray = Delete(ActionArray, POS, 0, 0)
|
||||
end
|
||||
|
||||
end else
|
||||
// RDS is default IDType
|
||||
// Open RDS and WO_MAT records
|
||||
@ -153,19 +173,38 @@ Service GetLotHistory(IDType=IDType, LotID, StartDate, EndDate)
|
||||
WOMatKey = Xlate('RDS', LotID, 'WO_MAT_KEY', 'X')
|
||||
WOMatRow = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
|
||||
|
||||
// WO_MAT Actions
|
||||
INVDTMs = WOMatRow<WO_MAT_INV_DTM$>
|
||||
INVUsers = WOMatRow<WO_MAT_INV_USER$>
|
||||
INVActions = WOMatRow<WO_MAT_INV_ACTION$>
|
||||
ActionList = INVDTMs :@FM: INVUsers :@FM: INVActions :@FM:@FM
|
||||
ActionArray = SRP_Rotate_Array(ActionList)
|
||||
|
||||
// Get RDS Comments
|
||||
CommentDates = RDSRow<RDS_COMMENT_DATE$>
|
||||
CommentUsers = RDSRow<RDS_COMMENT_USER$>
|
||||
Comments = RDSRow<RDS_COMMENT_NOTE$>
|
||||
CommentList = CommentDates :@FM: CommentUsers :@FM:@FM: Comments
|
||||
CommentArray = SRP_Rotate_Array(CommentList)
|
||||
|
||||
CommentCount = DCount(CommentArray, @FM)
|
||||
For I = 1 to CommentCount
|
||||
ThisComment = CommentArray<I, 4>
|
||||
Begin Case
|
||||
Case IndexC(ThisComment, 'Material Taken off Hold', 1)
|
||||
CommentArray<I,3> = 'HOLD_OFF'
|
||||
|
||||
Case IndexC(ThisComment, 'Material Placed on Hold', 1)
|
||||
CommentArray<I,3> = 'HOLD_ON'
|
||||
End Case
|
||||
Next I
|
||||
|
||||
// WO_MAT Actions
|
||||
INVDTMs = WOMatRow<WO_MAT_INV_DTM$>
|
||||
INVUsers = WOMatRow<WO_MAT_INV_USER$>
|
||||
INVActions = WOMatRow<WO_MAT_INV_ACTION$>
|
||||
ActionList = INVDTMs :@FM: INVUsers :@FM: INVActions :@FM:@FM
|
||||
ActionArray = SRP_Rotate_Array(ActionList)
|
||||
// Remove Hold Inventory actions from array because they are populated from RDS commments.
|
||||
Locate 'HOLD_OFF' in InvActions Using @VM Setting POS then
|
||||
ActionArray = Delete(ActionArray, POS, 0, 0)
|
||||
end
|
||||
Locate 'HOLD_ON' in InvActions Using @VM Setting POS then
|
||||
ActionArray = Delete(ActionArray, POS, 0, 0)
|
||||
end
|
||||
end
|
||||
// Add Comments if present
|
||||
If CommentArray NE '' then
|
||||
@ -176,7 +215,6 @@ Service GetLotHistory(IDType=IDType, LotID, StartDate, EndDate)
|
||||
// Sort by Date
|
||||
SortedLotArray = SRP_Array('SortRows', LotArray, 'D1', 'LIST')
|
||||
|
||||
|
||||
// Convert DateTimes to External
|
||||
RowCount = Dcount(SortedLotArray, @FM)
|
||||
If StartDate NE '' AND EndDate NE '' then
|
||||
@ -248,7 +286,8 @@ Service ProcessAutoHold()
|
||||
HoldList<-1> = ReactType:TAB$:HoldEntityID
|
||||
OnHold = Xlate(HoldEntity, HoldEntityID, 'HOLD', 'X')
|
||||
If OnHold NE True$ then
|
||||
obj_WO_Mat('ToggleHold',WOMatKey:@RM:HoldEntity:@RM:HoldEntityID:@RM:'':@RM:'H':@RM:'SYSTEM')
|
||||
//obj_WO_Mat('ToggleHold',WOMatKey:@RM:HoldEntity:@RM:HoldEntityID:@RM:'':@RM:'H':@RM:'SYSTEM')
|
||||
Hold_Services('ToggleHold', WOMatKey, HoldEntity, HoldEntityID, '', 'H', '', 'SYSTEM')
|
||||
end
|
||||
|
||||
LogData = ''
|
||||
@ -1291,3 +1330,4 @@ ClearCursors:
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user