| | |
| | | * 1ã仿°æ®åºä¸å¤ææ¯å¦é½å¥ |
| | | * 2ãæ ¹æ®é½å¥ç»æï¼æ¨éç»PLC |
| | | */ |
| | | if (FormCC.stationView == null) |
| | | { |
| | | SystemWarningMsg._lbl_alert_DataProcess_269 = $"{rgvLocation.ToString()}-è·åPLC对象为null"; |
| | | continue; |
| | | } |
| | | var obj = FormCC.stationView.R_StationForReadCommList.Where(x => x.StationCode == rgvLocation.ToString()).FirstOrDefault(); |
| | | if (obj.R_ReqParseData) |
| | | { |
| | |
| | | var upiObj = wmsDB.mes_batchOrderUPI_new.Where(x => x.UPI == upiCode).FirstOrDefault(); |
| | | if (upiObj == null) |
| | | { |
| | | //æ¨éplc 人工æ¾è¡ |
| | | using (StationServiceClient client = new StationServiceClient()) |
| | | { |
| | | var res = await client.WriteStation_PersonAllowAsync((int)EDevice.Station, false, rgvLocation); |
| | | if (!res.result) |
| | | { |
| | | SystemWarningMsg._lbl_alert_DataProcess_269 = $"{rgvLocation.ToString()}- æ¨éplc 人工æ¾è¡ 失败,WriteStation_PersonAllowAsync è¿å:{res.resMsg}"; |
| | | continue; |
| | | } |
| | | else |
| | | { |
| | | Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-æ¨éplc 人工æ¾è¡ æå,WriteStation_PersonAllowAsyncï¼åæ°: ç«ç¹{rgvLocation}"); |
| | | } |
| | | } |
| | | |
| | | //åå
¥æ¥è¦ä¿¡æ¯ |
| | | await MyExtendHelper.WriteBoolPlcDataForWarning(PlcWarningGloble.Num_269_1); |
| | | |
| | | SystemWarningMsg._lbl_alert_DataProcess_269 = $"{rgvLocation.ToString()},æ ¹æ®UPI:{upiCode}æ²¡ææ¾å°å¯¹è±¡ "; |
| | | continue; |
| | | //*/ |
| | | } |
| | | |
| | | //æ¨éplcè§£æå®æ |
| | | using (StationServiceClient client = new StationServiceClient()) |
| | | { |
| | | var res = await client.WriteQiTaoInfoAsync((int)EDevice.Station, rgvLocation, true); |
| | | if (!res.result) |
| | | { |
| | | SystemWarningMsg._lbl_alert_DataProcess_269 = $"{rgvLocation.ToString()}- æ¨éplcè§£æå®æ 失败,WriteQiTaoInfoAsyncè¿å:{res.resMsg}"; |
| | | continue; |
| | | } |
| | | else |
| | | { |
| | | Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-æ¨éplcè§£æå®æ æå,WriteQiTaoInfoAsyncï¼åæ°: ç«ç¹{rgvLocation}"); |
| | | } |
| | | } |
| | | |
| | | upiObj.AreaCode = (int)AreaCodeEnum.å¾
ç¼å忣åº; |
| | | |
| | | //è®°å½æ¿ä»¶éå表 |
| | | var queueData = wmsDB.mes_upi_linequeue.Where(x => x.Upi == upiObj.UPI).FirstOrDefault(); |
| | | if (queueData != null) |
| | | { |
| | | wmsDB.mes_upi_linequeue.Remove(queueData); |
| | | } |
| | | mes_upi_linequeue addUpiLineQueue = ClassHelper.RotationMapping<mes_upi_linequeue, mes_batchOrderUPI_new>(upiObj); |
| | | addUpiLineQueue.Id = Yitter.IdGenerator.YitIdHelper.NextId(); |
| | | addUpiLineQueue.Location = "269"; |
| | | addUpiLineQueue.AreaCode = (int)AreaCodeEnum.å¾
ç¼å忣åº; |
| | | addUpiLineQueue.Upi = upiObj.UPI; |
| | | addUpiLineQueue.UpiFlag = (int)UpiFlagEnum.æ£å¸¸; |
| | | addUpiLineQueue.UpiStatus = (int)UpiStatusEnum.åå§; |
| | | addUpiLineQueue.CreateTime = DateTime.Now; |
| | | addUpiLineQueue.CreateUserName = SysGloble.WCSSystem; |
| | | wmsDB.mes_upi_linequeue.Add(addUpiLineQueue); |
| | | |
| | | WmsRecordUpiProcessHandler.SaveWmsRecordUpiProcess(wmsDB, upiObj, "269", "馿¬¡æ«ç "); |
| | | |
| | | wmsDB.SaveChanges(); |
| | | //*/ |
| | | } |
| | | } |
| | | } |