| | |
| | | namespace iWareCC.ThreadService |
| | | { |
| | | /// <summary> |
| | | /// æºå¨äººç¼åå² äººå·¥å¼ºå¶åºåº å¤ç |
| | | /// æºå¨äººç¼åå² äººå·¥å¼ºå¶å¾
åºåº å¤ç |
| | | /// </summary> |
| | | public static class DataProcess_RobotBuffer_ForceOutbound |
| | | { |
| | | public static bool Handler(string packageCode, ref string alertMsg) |
| | | public static async void Handler() |
| | | { |
| | | alertMsg = ""; |
| | | LogType logType = LogType.DataProcess_RobotBuffer_AutoQiTaoOutbound; |
| | | |
| | | var alertMsg = ""; |
| | | LogType logType = LogType.DataProcess_RobotBuffer_ForceOutbound; |
| | | while (true) |
| | | { |
| | | Thread.Sleep(2000);//ä¼ç 2ç§ï¼å°ä¼ç åå°åé¢ï¼æ¯ä¸ºäºä¸é¢çcontinueæ¹æ³æ§è¡å䏿¾ç¤ºé误信æ¯çæç¤ºï¼ï¼ï¼ãEditBy shaocx,2022-05-24ã |
| | | SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ForceOutbound = string.Empty; |
| | | try |
| | | {//SystemValue.isAllowRuning_DataProcess_RobotBuffer_AutoQiTaoOutbound && |
| | | if (SystemValue.isStartedModel) |
| | | { |
| | | |
| | | var rgvLocation = StationLocationEnum.BZ39.ToString(); |
| | |
| | | if (obj.R_ForceOutboundMode == false) |
| | | { |
| | | alertMsg = "PLC䏿¯å¼ºå¶åºåºæ¨¡å¼"; |
| | | return false; |
| | | continue; |
| | | } |
| | | using (WmsDBModel wmsDB = new WmsDBModel()) |
| | | { |
| | | List<wms_stock_quan> qunList = wmsDB.wms_stock_quan.Where(x => x.StockStatus == (int)StockStatusEnum.å¨åº |
| | | && x.PackageCode == packageCode |
| | | ).ToList(); |
| | | List<wms_stock_quan> qunList = wmsDB.wms_stock_quan.Where(x => x.StockStatus == (int)StockStatusEnum.人工强å¶å¾
åºåº |
| | | ).OrderBy(x => x.PackageCode).ToList(); |
| | | |
| | | foreach (var x in qunList) |
| | | { |
| | | x.StockStatus = (int)StockStatusEnum.人工强å¶å¾
åºåº; |
| | | x.StockStatus = (int)StockStatusEnum.人工强å¶ä»»å¡å·²å建; |
| | | x.StockStatusName = StockStatusEnum.人工强å¶ä»»å¡å·²å建.ToString(); |
| | | |
| | | //çæåºåºä»»å¡ |
| | | //è®°å½ä»»å¡ |
| | |
| | | wmsDB.SaveChanges(); |
| | | } |
| | | |
| | | return true; |
| | | |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | alertMsg = " åºç°å¼å¸¸:" + ex.Message; |
| | | SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound += " åºç°å¼å¸¸:" + ex.Message + SysGloble.SPLIT_STR; |
| | | SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ForceOutbound += " åºç°å¼å¸¸:" + ex.Message + SysGloble.SPLIT_STR; |
| | | Log4NetHelper.WriteErrorLog(logType, " åºç°å¼å¸¸ï¼" + ex.Message, ex); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | } |