using Tiger.Model;
|
using SqlSugar;
|
using System;
|
using System.Collections.Generic;
|
using System.Linq.Expressions;
|
using System.Text;
|
using System.Threading.Tasks;
|
using Rhea.Common;
|
using System.Net;
|
using System.Linq;
|
using Newtonsoft.Json;
|
using Tiger.IBusiness;
|
using static Tiger.Business.Biz;
|
using Microsoft.AspNetCore.Http;
|
using System.Collections;
|
|
namespace Tiger.Business
|
{
|
public partial class Biz
|
{
|
/// <summary>
|
/// 工具管理
|
/// </summary>
|
public partial class SmtTool : ISmtTool
|
{
|
/// <summary>
|
/// 获取未上料列表
|
/// </summary>
|
/// <param name="paras"></param>
|
/// <returns></returns>
|
public async Task<ApiAction<List<SMT_WO_TABLE>>> GetNotLoadingMaterial(SmtLoadingInput paras)
|
{
|
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);
|
}
|
}
|
}
|
}
|