| | |
| | | return list; |
| | | } |
| | | #endregion |
| | | #region 提交前通用方法 |
| | | /// <summary> |
| | | /// 提交前检查是否岗位、工单和不良代码 |
| | | /// </summary> |
| | | /// <param name="code"></param> |
| | | /// <returns></returns> |
| | | public async Task<ApiAction<CheckCodeOutput>> CheckCode(string code) { |
| | | var action = new ApiAction<CheckCodeOutput>($"检查条码{code}成功", new CheckCodeOutput()); |
| | | try |
| | | { |
| | | action.Data.Position = DbCache.Cache.Position[code]; |
| | | action.Data.WorkOrder = await MainDB.Queryable<BIZ_MES_WO>().Where(q=>q.ORDER_NO == code).FirstAsync(); |
| | | action.Data.Defect = DbCache.Cache.Defect[code]; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | action.CatchExceptionWithLog(ex, $"检查条码{code}异常"); |
| | | } |
| | | return action; |
| | | } |
| | | #endregion |
| | | #endregion Functions |
| | | |
| | | public override bool Close(bool needSaveHistoryLog = false) |