| | |
| | | using Tiger.IBusiness; |
| | | using static Tiger.Business.Biz; |
| | | using Microsoft.AspNetCore.Http; |
| | | using System.Collections; |
| | | |
| | | namespace Tiger.Business |
| | | { |
| | |
| | | /// <summary> |
| | | /// 获取未上料列表 |
| | | /// </summary> |
| | | /// <param name="itemCode"></param> |
| | | /// <param name="lineCode"></param> |
| | | /// <param name="pcbSurface"></param> |
| | | /// <param name="moCode"></param> |
| | | /// <param name="machineCode"></param> |
| | | /// <param name="paras"></param> |
| | | /// <returns></returns> |
| | | /// <exception cref="NotImplementedException"></exception> |
| | | public Task<ApiAction<SMT_PROD_TABLE>> GetNotLoadingMaterial(string itemCode, string lineCode, string pcbSurface, string moCode, string machineCode = null) |
| | | public async Task<ApiAction<List<SMT_WO_TABLE>>> GetNotLoadingMaterial(SmtLoadingInput paras) |
| | | { |
| | | throw new NotImplementedException(); |
| | | var res = new ApiAction<List<SMT_WO_TABLE>>(); |
| | | List<SMT_WO_TABLE> sList = new List<SMT_WO_TABLE>(); |
| | | try |
| | | { |
| | | sList = Db.Queryable<SMT_WO_TABLE, SMT_LOADING>((t, l) => |
| | | new JoinQueryInfos( |
| | | JoinType.Left, |
| | | t.WORK_ORDER == l.WORK_ORDER |
| | | && t.PROD_CODE == l.PROD_CODE |
| | | && t.PCB_SURFACE == l.PCB_SURFACE |
| | | && t.LINE_CODE == l.LINE_CODE |
| | | && t.SLOT_NO == l.SLOT_NO |
| | | )) |
| | | .Where((t, l) => SqlFunc.IsNullOrEmpty(l.WORK_ORDER) && t.WORK_ORDER == paras.moCode && t.PROD_CODE == paras.prodCode && t.LINE_CODE == paras.lineCode && t.PCB_SURFACE == paras.pcbSurface) |
| | | .WhereIF(SqlFunc.IsNullOrEmpty(paras.machineCode), (t, l) => t.SMT_CODE == paras.machineCode) |
| | | .Select((t, l) => t) |
| | | .ToList(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | res.CatchExceptionWithLog(ex, "查询异常"); |
| | | } |
| | | res.Data = sList; |
| | | return await Task.FromResult(res); |
| | | } |
| | | } |
| | | } |