| | |
| | | { |
| | | try |
| | | { |
| | | LogHelper.Info($" 无菌出库 查工单"); |
| | | var yuworders = LocationHelper.GetList<YWLWorkOrder>(x => x.SQL_PLineNo == "无菌标签出库" && x.WorkType == 6 && x.SQL_State == "执行中").FindAll(x => x.OutNum > 0 && DateTime.Now.Subtract(x.SQL_Modify_TIme ?? DateTime.Now).TotalSeconds > 10).OrderBy(x => !string.IsNullOrEmpty(x.TagOver) ? 1 : 2).ThenBy(x => x.TagOverTime).ToList(); |
| | | var yuworders = LocationHelper.GetList<YWLWorkOrder>(x => x.SQL_PLineNo == "无菌标签出库" && x.WorkType == 6 && x.SQL_State == "执行中").FindAll(x => DateTime.Now.Subtract(x.SQL_Modify_TIme ?? DateTime.Now).TotalSeconds > 10).OrderBy(x => !string.IsNullOrEmpty(x.TagOver) ? 1 : 2).ThenBy(x => x.TagOverTime).ToList(); |
| | | if (!yuworders.Any()) |
| | | { |
| | | YwlBQ_CreInwork(locsFirst, WJ_BQ.RK_BQDDQ, WJ_BQ.RK_BBHJQ); |
| | |
| | | try |
| | | { |
| | | string pline = "T2提升机-标签"; |
| | | var Syuworders = LocationHelper.GetList<YWLWorkOrder>(x => x.SQL_PLineNo == pline && x.WorkType == 6 && x.SQL_State == "执行中").FindAll(x => x.OutNum > 0 && DateTime.Now.Subtract(x.SQL_Modify_TIme ?? DateTime.Now).TotalSeconds > 10).OrderBy(x => !string.IsNullOrEmpty(x.TagOver) ? 1 : 2).ThenBy(x => x.TagOverTime).ToList(); |
| | | var Syuworders = LocationHelper.GetList<YWLWorkOrder>(x => x.SQL_PLineNo == pline && x.WorkType == 6 && x.SQL_State == "执行中").FindAll(x => DateTime.Now.Subtract(x.SQL_Modify_TIme ?? DateTime.Now).TotalSeconds > 10).OrderBy(x => !string.IsNullOrEmpty(x.TagOver) ? 1 : 2).ThenBy(x => x.TagOverTime).ToList(); |
| | | //yuworders = LocationHelper.GetList<YWLWorkOrder>(x => x.SQL_PLineNo == plc.deviceName && x.WorkType == 6 && x.SQL_State == "执行中").FindAll(x => DateTime.Now.Subtract(x.SQL_Modify_TIme ?? DateTime.Now).TotalSeconds > 10).OrderBy(x => !string.IsNullOrEmpty(x.TagOver) ? 1 : 2).ThenBy(x => x.TagOverTime).ToList(); |
| | | |
| | | var tklist = LocationHelper.GetList<YWLWorkOrder>(x => x.SQL_PLineNo == pline && x.WorkType == 1 && x.SQL_State == "执行中"); |
| | |
| | | } |
| | | else if (Syuworders.Any()) |
| | | { |
| | | YwlBQ_CreSXOutOrder(plc, Syuworders); |
| | | YwlBQ_CreSXOutOrder(plc, Syuworders.FindAll(x => x.OutNum > 0)); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | } |
| | | } |
| | | ///第一段:出库 -到拆垛或者 接驳。 |
| | | var yuworders = LocationHelper.GetList<YWLWorkOrder>(x => x.SQL_PLineNo == "无菌标签出库" && x.WorkType == 6 && x.SQL_State == "执行中").FindAll(x => DateTime.Now.Subtract(x.SQL_Modify_TIme ?? DateTime.Now).TotalSeconds > 10).OrderBy(x => !string.IsNullOrEmpty(x.TagOver) ? 1 : 2).ThenBy(x => x.TagOverTime).ToList(); |
| | | var yuworders = LocationHelper.GetList<YWLWorkOrder>(x => x.SQL_PLineNo == "无菌标签出库" && x.WorkType == 6 && x.SQL_State == "执行中").FindAll(x => x.OutNum > 0 && DateTime.Now.Subtract(x.SQL_Modify_TIme ?? DateTime.Now).TotalSeconds > 10).OrderBy(x => !string.IsNullOrEmpty(x.TagOver) ? 1 : 2).ThenBy(x => x.TagOverTime).ToList(); |
| | | |
| | | //foreach (var order in yuworders) |
| | | retuse: |