This commit is contained in:
parent
5881e7d9d9
commit
914cb093bf
|
|
@ -142,14 +142,15 @@ namespace CompetitionAPI.Controllers.api
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
public JsonResult GetLastNum()
|
public JsonResult GetLastNum(string monitorId)
|
||||||
{
|
{
|
||||||
CompetitionAPI.Util.LogHelper.WriteLog(DateTime.Now.ToString() + " 调接口:在库总量 GetLastNum");
|
CompetitionAPI.Util.LogHelper.WriteLog(DateTime.Now.ToString() + " 调接口:在库总量 GetLastNum");
|
||||||
//在库总量
|
//在库总量
|
||||||
decimal num = 0;
|
decimal num = 0;
|
||||||
var mysql = Configuration.GetConnectionString("MySQL").ToString();
|
var mysql = Configuration.GetConnectionString("MySQL").ToString();
|
||||||
|
string sql = string.IsNullOrEmpty(monitorId) ? "STOCK_BALANCE > 0" : string.Format("STOCK_BALANCE > 0 AND MONITOR_ID = '{0}'", monitorId);
|
||||||
//库存字段大于0
|
//库存字段大于0
|
||||||
var list = bll_storage.GetModelList("STOCK_BALANCE > 0").FindAll(a => Tool.IsFuZhouCustom(a.CUSTOMS_CODE));
|
var list = bll_storage.GetModelList(sql).FindAll(a => Tool.IsFuZhouCustom(a.CUSTOMS_CODE));
|
||||||
list.ForEach(a =>
|
list.ForEach(a =>
|
||||||
{
|
{
|
||||||
if (a.STOCK_BALANCE.HasValue)
|
if (a.STOCK_BALANCE.HasValue)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue