modified WO_REC form to select WO_MAT keys instead of relying on WO_LOG<WO_MAT_KEY> field.
refactored print cass labels to select on RDS table for list of RDSes instead of using relational column in WO_STEP table
This commit is contained in:
@ -1,16 +1,17 @@
|
||||
Compile function WO_MAT_Services(@Service, @Params)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
Declare function Database_Services, Error_Services, SRP_Json, SRP_Com, Environment_Services, Logging_Services
|
||||
Declare function Datetime, Rds_Services, GetTickCount
|
||||
Declare subroutine Error_Services, SRP_Json, SRP_Com, Wo_Mat_Services, Database_Services, Logging_Services
|
||||
Declare subroutine obj_wo_mat_log, Set_Status, Rds_Services, Signature_Services, Mona_Services
|
||||
|
||||
$insert LOGICAL
|
||||
$Insert APP_INSERTS
|
||||
$insert WO_MAT_EQUATES
|
||||
$Insert WO_LOG_EQUATES
|
||||
$Insert SERVICE_SETUP
|
||||
$Insert DICT_EQUATES
|
||||
|
||||
Declare function Database_Services, Error_Services, SRP_Json, SRP_Com, Environment_Services, Logging_Services
|
||||
Declare function Datetime, Rds_Services, GetTickCount, SRP_Array
|
||||
Declare subroutine Error_Services, SRP_Json, SRP_Com, Wo_Mat_Services, Database_Services, Logging_Services
|
||||
Declare subroutine obj_wo_mat_log, Set_Status, Rds_Services, Signature_Services, Mona_Services, Btree.Extract
|
||||
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_Mat\InvActionsSyncUp'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
@ -281,7 +282,9 @@ Service GetWaferMap(WOMatKey)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service CheckInvActionsSignatureSync()
|
||||
|
||||
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
|
||||
Lock hSysLists, ServiceKeyID then
|
||||
Script = "SELECT WO_MAT_SIG_PROFILE.WO_NO, WO_MAT_SIG_PROFILE.CASS_NO,WO_MAT_SIG_PROFILE.CASS_ID_SAP, WO_MAT_SIG_PROFILE.SIG_DTM, WO_MAT_SIG_PROFILE.SIGNATURE, WMSP.SIG_PROFILE FROM WO_MAT_SIG_PROFILE "
|
||||
@ -313,9 +316,12 @@ Service CheckInvActionsSignatureSync()
|
||||
end
|
||||
Unlock hSysLists, ServiceKeyID else Null
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service SyncWOMatInvActionsAndSigProfile(WOMatKey)
|
||||
|
||||
If RowExists('WO_MAT', WOMatKey) then
|
||||
OrigWOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
|
||||
WOMatRec = OrigWOMatRec
|
||||
@ -383,9 +389,12 @@ Service SyncWOMatInvActionsAndSigProfile(WOMatKey)
|
||||
LogData<5> = 'WO_MAT record did not exist in OpenInsight.'
|
||||
Logging_Services('AppendLog', objSyncLog, LogData, @RM, @FM)
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service CassetteIsLastInWo(WoMatKey)
|
||||
|
||||
StartTick = GetTickCount()
|
||||
MetricName = 'CassetteIsLastInWo'
|
||||
|
||||
@ -437,9 +446,12 @@ Service CassetteIsLastInWo(WoMatKey)
|
||||
|
||||
EndTick = GetTickCount()
|
||||
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service SetWoMatVoidFlag(WoMatKey, Username)
|
||||
|
||||
ErrorMessage = ''
|
||||
If RowExists('WO_MAT', WoMatKey) then
|
||||
WoMatRec = Database_Services('ReadDataRow', 'WO_MAT', WoMatKey, True$, 0, False$)
|
||||
@ -483,10 +495,10 @@ Service SetWoMatVoidFlag(WoMatKey, Username)
|
||||
If ErrorMessage NE '' then
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
|
||||
Service MakeupFlagOn(RDSNo)
|
||||
|
||||
EpiCheck = Rds_Services('IsEpiPro', RDSNo)
|
||||
@ -519,4 +531,56 @@ Service MakeupFlagOn(RDSNo)
|
||||
end service
|
||||
|
||||
|
||||
Service GetWOMatData(WOMatKeys, Columns)
|
||||
|
||||
Response = ''
|
||||
ErrorMsg = ''
|
||||
If ( (WOMatKeys NE '') and (Columns NE '') ) then
|
||||
For each Column in Columns using @VM setting ColPos
|
||||
Vals = Xlate('WO_MAT', WOMatKeys, Column, 'X')
|
||||
Conv = Xlate('DICT.WO_MAT', Column, DICT_CONV$, 'X')
|
||||
If Conv EQ '' then
|
||||
Response<ColPos> = Vals
|
||||
end else
|
||||
Response<ColPos> = OConv(Vals, Conv)
|
||||
end
|
||||
Next Column
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Null WOMatKeys or Columns passed into service'
|
||||
end
|
||||
|
||||
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetWOMatKeys(WONo)
|
||||
|
||||
Response = ''
|
||||
ErrorMsg = ''
|
||||
If (WONo NE '') then
|
||||
If RowExists('WO_LOG', WONo) then
|
||||
Open 'DICT.WO_MAT' to hDict then
|
||||
Query = 'WO_NO':@VM:WONo:@FM
|
||||
WOMatKeys = ''
|
||||
Flag = ''
|
||||
ErrCode = ''
|
||||
Btree.Extract(Query, 'WO_MAT', hDict, WOMatKeys, 'E', Flag)
|
||||
If Not(Get_Status(ErrCode)) then
|
||||
If WOMatKeys NE '' then
|
||||
Response = SRP_Array('SortRows', WOMatKeys, 'AR2', 'LIST', @VM, '*')
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error calling Btree.Extract. Error code: ':ErrCode
|
||||
end
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. WO_LOG ':WONo:' does not exist.'
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Null WONo passed into service.'
|
||||
end
|
||||
|
||||
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
|
||||
|
||||
end service
|
||||
|
Reference in New Issue
Block a user