Commit fa9835a7 by 泽锋 李

fix

parent 94db0b06
...@@ -1614,6 +1614,15 @@ and start_date<=@end_date and end_date>=@start_date ...@@ -1614,6 +1614,15 @@ and start_date<=@end_date and end_date>=@start_date
return data; return data;
} }
/// <summary>
/// 作废
/// </summary>
/// <param name="id"></param>
public static void DelSalesForecastConfig(int id)
{
_connection.Execute(" update dc_auto_sales_forecast_config set is_delete=1,delete_time=now() where id=@id and is_delete=0 ", new { id = id});
}
#endregion #endregion
} }
} }
...@@ -33,6 +33,10 @@ namespace AutoTurnOver.Models ...@@ -33,6 +33,10 @@ namespace AutoTurnOver.Models
public string category { get; set; } public string category { get; set; }
public DateTime create_date { get; set; } public DateTime create_date { get; set; }
/// <summary>
/// 作废时间
/// </summary>
public DateTime? delete_time { get; set; }
public int level { get; set; } public int level { get; set; }
public int is_delete { get; set; } public int is_delete { get; set; }
......
...@@ -810,6 +810,10 @@ namespace AutoTurnOver.Services ...@@ -810,6 +810,10 @@ namespace AutoTurnOver.Services
{ {
return DB.db_config.GetSalesForecastConfigById(id); return DB.db_config.GetSalesForecastConfigById(id);
} }
public void DelSalesForecastConfig(int id)
{
DB.db_config.DelSalesForecastConfig(id);
}
#endregion #endregion
} }
......
...@@ -778,6 +778,27 @@ namespace AutoTurnOver.Controllers ...@@ -778,6 +778,27 @@ namespace AutoTurnOver.Controllers
{ {
var m = new Services.ConfigServices().GetSalesForecastConfigById(id); var m = new Services.ConfigServices().GetSalesForecastConfigById(id);
return new JsonResult(m); return new JsonResult(m);
}
/// <summary>
/// 删除数据
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
public JsonResult DelSalesForecastConfig(int id)
{
try
{
new Services.ConfigServices().DelSalesForecastConfig(id);
return Json(new { success = true });
}
catch (Exception ex)
{
new Services.ConfigServices().DelSalesForecastConfig(id);
return Json(new { success = true, message = ex.Message });
}
} }
#endregion #endregion
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment