This commit is contained in:
陈向学 2024-07-22 16:08:30 +08:00
parent 5881e7d9d9
commit 914cb093bf
1 changed files with 3 additions and 2 deletions

View File

@ -142,14 +142,15 @@ namespace CompetitionAPI.Controllers.api
/// </summary>
/// <returns></returns>
[HttpGet]
public JsonResult GetLastNum()
public JsonResult GetLastNum(string monitorId)
{
CompetitionAPI.Util.LogHelper.WriteLog(DateTime.Now.ToString() + " 调接口:在库总量 GetLastNum");
//在库总量
decimal num = 0;
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
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 =>
{
if (a.STOCK_BALANCE.HasValue)