| | |
| | | using Admin.NET.Application; |
| | | using iWareCC.Common.Helper; |
| | | using iWareCC.StationService; |
| | | using iWareCommon.Common.Globle; |
| | | using iWareCommon.Utils; |
| | |
| | | { |
| | | public class DataProcess_BZ12 |
| | | { |
| | | public static void Hander() |
| | | public static async void Hander() |
| | | { |
| | | var alertMsg = ""; |
| | | LogType logType = LogType.DataProcess_BZ12; |
| | |
| | | var upiObj = wmsDB.mes_batchOrderUPI_new.Where(x => x.UPI == upiCode).FirstOrDefault(); |
| | | if (upiObj == null) |
| | | { |
| | | //åå
¥æ¥è¦ä¿¡æ¯ |
| | | await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningAddressGloble.Num_BZ12_1); |
| | | |
| | | SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},æ ¹æ®UPI:{upiCode}æ²¡ææ¾å°å¯¹è±¡ "; |
| | | continue; |
| | | } |
| | |
| | | //placeZ = (short)upiObj.MachineZCenter; |
| | | if (upiObj.UpiStatus == (int)UpiStatusEnum.å·²ç å || upiObj.UpiStatus == (int)UpiStatusEnum.ç åä¸) |
| | | { |
| | | //åå
¥æ¥è¦ä¿¡æ¯ |
| | | await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningAddressGloble.Num_BZ12_3); |
| | | |
| | | SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},æ ¹æ®UPI:{upiCode}ç¶æå·²æ¯'å·²ç å'æ'ç åä¸' "; |
| | | continue; |
| | | } |
| | |
| | | { |
| | | if (upiObj.PackageCode != wms_rbline_runmode.PalletizingUPI) |
| | | { |
| | | //åå
¥æ¥è¦ä¿¡æ¯ |
| | | await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningAddressGloble.Num_BZ12_4); |
| | | |
| | | SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},UPI:{upiCode}ç å
é¨ä»¶æ··æ¹ "; |
| | | continue; |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | //åå
¥æ¥è¦ä¿¡æ¯ |
| | | await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningAddressGloble.Num_BZ12_6); |
| | | |
| | | SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},UPI:{upiCode}æ å¯ç¨ç åç®æ ä½ "; |
| | | continue; |
| | | } |
| | |
| | | var oldupi = upiList.Where(x => x.Shelf < upiObj.Shelf && (x.UpiStatus != (int)UpiStatusEnum.å·²ç å && x.UpiStatus != (int)UpiStatusEnum.ç åä¸)).FirstOrDefault(); |
| | | if (oldupi != null) |
| | | { |
| | | //åå
¥æ¥è¦ä¿¡æ¯ |
| | | await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningAddressGloble.Num_BZ12_5); |
| | | |
| | | SystemWarningMsg._lbl_alert_DataProcess_BZ12 = $"{rgvLocation.ToString()},UPI:{upiCode}ç å
顺åºé误 "; |
| | | continue; |
| | | } |
| | |
| | | { |
| | | Id = _id, |
| | | TaskNo = plcTaskNo, |
| | | UPI = upiObj.UPI, |
| | | Upi = upiObj.UPI, |
| | | Length = upiObj.Length, |
| | | Width = upiObj.Width, |
| | | Thk = upiObj.Thk, |
| | | IssueTime = DateTime.Now, |
| | | |
| | | PlanNo = upiObj.PlanNo, |
| | | OrderId = upiObj.OrderId, |
| | | PackageCode = upiObj.PackageCode, |
| | | RbTaskType = (int)RbTaskTypeEnum.ç æ¿ä»»å¡, |
| | | RbTaskTypeEnumName = RbTaskTypeEnum.ç æ¿ä»»å¡.ToString(), |
| | | TaskStatus = (int)TaskStatusEnum.æ°å»º, |
| | | TaskStatusName = TaskStatusEnum.æ°å»º.ToString(), |
| | | TaskMsg = "ç æ¿", |
| | | CreateTime = DateTime.Now, |
| | | CreateUserName = "CC", |
| | | UpdateTime = DateTime.Now, |
| | | UpdateUserName = "CC", |
| | | PlaceCode = place, |
| | | LastNum = lastnum |
| | | LastNum = lastnum, |
| | | |
| | | Info17 = upiObj.Info17, |
| | | MachineXCenter = upiObj.MachineXCenter, |
| | | MachineYCenter = upiObj.MachineYCenter, |
| | | MachineZCenter = upiObj.MachineZCenter, |
| | | Sequence = upiObj.Sequence, |
| | | }; |
| | | |
| | | wmsDB.wms_rbline_task.Add(task); |