增加查询字段
This commit is contained in:
@@ -19,5 +19,8 @@ namespace NX.ERP.Model.Request
|
|||||||
|
|
||||||
public long? Pubufts { get; set; }
|
public long? Pubufts { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public IEnumerable<string> Status { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ namespace NX.ERP.U8
|
|||||||
if (MaterialType.Pubufts != null)
|
if (MaterialType.Pubufts != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
where.Add("CONVERT(BIGINT,pubufts) >=@Pubufts ");
|
where.Add("CONVERT(BIGINT,pubufts) > @Pubufts ");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ namespace NX.ERP.U8
|
|||||||
if (Params.Pubufts != null)
|
if (Params.Pubufts != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
where.Add("CONVERT(BIGINT,pubufts) >=@Pubufts ");
|
where.Add("CONVERT(BIGINT,pubufts) > @Pubufts ");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ namespace NX.ERP.U8.Mom
|
|||||||
if (bom.Pubufts != null)
|
if (bom.Pubufts != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
where.Add("CONVERT(BIGINT,a.Ufts) >=@Pubufts ");
|
where.Add("CONVERT(BIGINT,a.Ufts) >@Pubufts ");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,10 +30,10 @@ namespace NX.ERP.U8.Mom
|
|||||||
left join mom_orderdetail as b on a.MoId=b.MoId
|
left join mom_orderdetail as b on a.MoId=b.MoId
|
||||||
left join mom_morder as d on b.MoDId=d.MoDId
|
left join mom_morder as d on b.MoDId=d.MoDId
|
||||||
left join mom_SNDetail as e on b.MoDId=e.iVouchsID
|
left join mom_SNDetail as e on b.MoDId=e.iVouchsID
|
||||||
left join mom_moallocate as c on b.MoDId=c.MoDId where b.Status<>4";
|
left join mom_moallocate as c on b.MoDId=c.MoDId ";
|
||||||
if (!string.IsNullOrEmpty(strWhere))
|
if (!string.IsNullOrEmpty(strWhere))
|
||||||
{
|
{
|
||||||
strSQL += $" and {strWhere} ";
|
strSQL += $" where {strWhere} ";
|
||||||
}
|
}
|
||||||
var lookupDetail = new Dictionary<int, Model.MOM.MomDetail>();
|
var lookupDetail = new Dictionary<int, Model.MOM.MomDetail>();
|
||||||
var lookupOrder = new Dictionary<int, Model.MOM.MomOrder>();
|
var lookupOrder = new Dictionary<int, Model.MOM.MomOrder>();
|
||||||
@@ -107,10 +107,16 @@ namespace NX.ERP.U8.Mom
|
|||||||
|
|
||||||
if (Params.Pubufts != null)
|
if (Params.Pubufts != null)
|
||||||
{
|
{
|
||||||
where.Add("CONVERT(BIGINT,a.Ufts) >=@Pubufts ");
|
where.Add("CONVERT(BIGINT,a.Ufts) > @Pubufts ");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Params.Status!=null)
|
||||||
|
{
|
||||||
|
where.Add(" b.Status in @Status ");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return this.GetList(string.Join(" and ", where.ToArray()), new
|
return this.GetList(string.Join(" and ", where.ToArray()), new
|
||||||
{
|
{
|
||||||
@@ -118,7 +124,8 @@ namespace NX.ERP.U8.Mom
|
|||||||
ProductOrderNo = $"{Params.ProductOrderNo}",
|
ProductOrderNo = $"{Params.ProductOrderNo}",
|
||||||
Params.ProductOrderendID,
|
Params.ProductOrderendID,
|
||||||
Params.ModifyDate,
|
Params.ModifyDate,
|
||||||
Params.Pubufts
|
Params.Pubufts,
|
||||||
|
Params.Status
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,6 +73,7 @@
|
|||||||
<Compile Include="U8LoginContext.cs" />
|
<Compile Include="U8LoginContext.cs" />
|
||||||
<Compile Include="Base\UnitDAL.cs" />
|
<Compile Include="Base\UnitDAL.cs" />
|
||||||
<Compile Include="Base\WarehouseDAL.cs" />
|
<Compile Include="Base\WarehouseDAL.cs" />
|
||||||
|
<Compile Include="U8Pubufts.cs" />
|
||||||
<Compile Include="ufsoft.cs" />
|
<Compile Include="ufsoft.cs" />
|
||||||
<Compile Include="VoucherHistory.cs" />
|
<Compile Include="VoucherHistory.cs" />
|
||||||
<Compile Include="Store\STVoucherParameter.cs" />
|
<Compile Include="Store\STVoucherParameter.cs" />
|
||||||
|
|||||||
19
NX.ERP.U8/U8Pubufts.cs
Normal file
19
NX.ERP.U8/U8Pubufts.cs
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Dapper;
|
||||||
|
namespace NX.ERP.U8
|
||||||
|
{
|
||||||
|
public class U8Pubufts
|
||||||
|
{
|
||||||
|
public long GetPubufts()
|
||||||
|
{
|
||||||
|
string strSql = " select CONVERT(BIGINT,@@DBTS) ";
|
||||||
|
using (var conn=U8LoginContext.Instance.Connection)
|
||||||
|
{
|
||||||
|
return conn.ExecuteScalar<long>(strSql,null,null,30,System.Data.CommandType.Text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,12 +13,16 @@ namespace NX.ERP.WebAPi.Filters
|
|||||||
public override void OnActionExecuted(HttpActionExecutedContext actionExecutedContext)
|
public override void OnActionExecuted(HttpActionExecutedContext actionExecutedContext)
|
||||||
{
|
{
|
||||||
base.OnActionExecuted(actionExecutedContext);
|
base.OnActionExecuted(actionExecutedContext);
|
||||||
|
|
||||||
if (actionExecutedContext.Exception == null)
|
if (actionExecutedContext.Exception == null)
|
||||||
{
|
{
|
||||||
|
var uf = new U8.U8Pubufts().GetPubufts();
|
||||||
|
|
||||||
ResultModel<object> result = new ResultModel<object>
|
ResultModel<object> result = new ResultModel<object>
|
||||||
{
|
{
|
||||||
ErrCode = 0,
|
ErrCode = 0,
|
||||||
Data = actionExecutedContext.ActionContext.Response.Content.ReadAsAsync<object>().Result
|
Data = actionExecutedContext.ActionContext.Response.Content.ReadAsAsync<object>().Result,
|
||||||
|
pubufts = uf
|
||||||
};
|
};
|
||||||
actionExecutedContext.Response.Content = new ObjectContent<ResultModel<object>>(result, GlobalConfiguration.Configuration.Formatters.JsonFormatter);
|
actionExecutedContext.Response.Content = new ObjectContent<ResultModel<object>>(result, GlobalConfiguration.Configuration.Formatters.JsonFormatter);
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ namespace NX.ERP.WebAPi
|
|||||||
|
|
||||||
public int ErrCode { get; set; }
|
public int ErrCode { get; set; }
|
||||||
public string ErrMsg { get; set; } = "";
|
public string ErrMsg { get; set; } = "";
|
||||||
|
|
||||||
|
public object pubufts { get; set; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user