| | |
| | | using iWare_SCADA_BusinessLogical.BLL; |
| | | using iWare_SCADA_BusinessLogical.BLL.Important; |
| | | using iWare_SCADA_BusinessLogical.Utils; |
| | | using iWare_SCADA_Model; |
| | | using iWare_SCADA_Model.MiddleModel; |
| | |
| | | { |
| | | if (SystemValue.isStartedImitateModel) |
| | | { |
| | | /* |
| | | var plcService = PLCManger.GetSinglePLCService(_dataCaptureConfig); |
| | | WorkPieceLogMiddle wplog = new WorkPieceLogMiddle(); |
| | | wplog.Id = Yitter.IdGenerator.YitIdHelper.NextId(); |
| | |
| | | wplog.UpdatedTime = DateTimeHelper.GetDateTime(); |
| | | wplog.UpdatedUserName = DataCapturePointCode; |
| | | //更新WorkPieceInfo表以及插入WorkPieceLog表和WorkPieceInfoLog表 |
| | | WorkPieceInfoManager.WorkPieceSPCPushOff(wplog, PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure)); |
| | | |
| | | WorkPieceSPCPushOffManager.WorkPieceSPCPushOff(wplog, PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure)); |
| | | //*/ |
| | | return; |
| | | } |
| | | ThreadStatusMonitorMiddle threadStatusMonitor = new ThreadStatusMonitorMiddle(); |
| | |
| | | {//op20,op50,op60 会同时推出多件,所以特殊处理 |
| | | wplog.WorkPieceID = wplog.WorkPieceIDA; |
| | | wplog.Remarks = "SPC推出工件A"; |
| | | WorkPieceInfoManager.WorkPieceSPCPushOff(wplog, PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure)); |
| | | WorkPieceSPCPushOffManager.WorkPieceSPCPushOff(wplog, PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure)); |
| | | wplog.WorkPieceID = wplog.WorkPieceIDB; |
| | | wplog.Remarks = "SPC推出工件B"; |
| | | WorkPieceInfoManager.WorkPieceSPCPushOff(wplog, PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure)); |
| | | WorkPieceSPCPushOffManager.WorkPieceSPCPushOff(wplog, PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure)); |
| | | wplog.WorkPieceID = wplog.WorkPieceIDC; |
| | | wplog.Remarks = "SPC推出工件C"; |
| | | WorkPieceInfoManager.WorkPieceSPCPushOff(wplog, PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure)); |
| | | WorkPieceSPCPushOffManager.WorkPieceSPCPushOff(wplog, PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure)); |
| | | if (_dataCaptureConfig.WorkingProcedure.Equals("OP60")) |
| | | { |
| | | wplog.WorkPieceID = wplog.WorkPieceIDD; |
| | | wplog.Remarks = "SPC推出工件D"; |
| | | WorkPieceInfoManager.WorkPieceSPCPushOff(wplog, PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure)); |
| | | WorkPieceSPCPushOffManager.WorkPieceSPCPushOff(wplog, PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure)); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | //更新WorkPieceInfo表以及插入WorkPieceLog表和WorkPieceInfoLog表 |
| | | WorkPieceInfoManager.WorkPieceSPCPushOff(wplog, PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure)); |
| | | WorkPieceSPCPushOffManager.WorkPieceSPCPushOff(wplog, PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure)); |
| | | } |
| | | threadStatusMonitor.Threadstatue = 1; |
| | | |