You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
380 lines
10 KiB
380 lines
10 KiB
using NFine.Code;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
using NFine.Application.KBSWMS;
|
|
|
|
namespace NFine.Web.Areas.KBSWMS.Controllers
|
|
{
|
|
public class ICSInspectionReportsController : ControllerBase
|
|
{
|
|
ICSInspectionReportsApp App = new ICSInspectionReportsApp();
|
|
public ActionResult PassFirstTime()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult ICSTransferAdd()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult ExternalImprovementReports()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult TOP3NGBatch()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult RejudicationNG()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult TOP5NGBatch()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
public ActionResult ExceptionTrackingReports() {
|
|
return View();
|
|
}
|
|
|
|
public ActionResult POUnarrivedQuantity()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult VenDeliveries()
|
|
{
|
|
return View();
|
|
}
|
|
/// <summary>
|
|
/// 获取月度一次检验合格率
|
|
/// </summary>
|
|
/// <param name="pagination"></param>
|
|
/// <param name="queryJson"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetPassFirstTime( string queryJson)
|
|
{
|
|
string ListData = App.GetPassFirstTime(queryJson);
|
|
return Content(ListData);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取月度一次检验合格率
|
|
/// </summary>
|
|
/// <param name="pagination"></param>
|
|
/// <param name="queryJson"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetPassFirstTime2(string queryJson)
|
|
{
|
|
DataTable ListData = App.GetPassFirstTime2(queryJson);
|
|
var JsonData = new
|
|
{
|
|
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
/// <summary>
|
|
/// 获取月度一次检验合格率导出
|
|
/// </summary>
|
|
/// <param name="DateNow"></param>
|
|
|
|
[HttpPost]
|
|
|
|
public void ExportAll1(string DateNow)
|
|
{
|
|
DataTable data = App.ExportAll1(DateNow);
|
|
if (data != null && data.Rows.Count > 0)
|
|
{
|
|
//MemoryStream ms = OutFileToStreamItemReplace(data);
|
|
AsposeCell.Export(data);
|
|
}
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// 对外改善异常追踪表
|
|
/// </summary>
|
|
/// <param name="pagination"></param>
|
|
/// <param name="queryJson"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetPassFirstTime4(string queryJson)
|
|
{
|
|
DataTable ListData = App.GetPassFirstTime4(queryJson);
|
|
var JsonData = new
|
|
{
|
|
|
|
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
[HttpPost]
|
|
|
|
public void ExportAll4(string DateNow)
|
|
{
|
|
DataTable data = App.ExportAll4(DateNow);
|
|
if (data != null && data.Rows.Count > 0)
|
|
{
|
|
//MemoryStream ms = OutFileToStreamItemReplace(data);
|
|
AsposeCell.Export(data);
|
|
}
|
|
|
|
}
|
|
/// <summary>
|
|
/// 复判NG对外改善
|
|
/// </summary>
|
|
/// <param name="queryJson"></param>
|
|
/// <returns></returns>
|
|
|
|
public ActionResult GetPassFirstTime3(string queryJson)
|
|
{
|
|
string ListData = App.GetPassFirstTime3(queryJson);
|
|
return Content(ListData);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 复判NG对外改善报表
|
|
/// </summary>
|
|
/// <param name="DateNow"></param>
|
|
|
|
[HttpPost]
|
|
|
|
public void ExportAll3(string DateNow)
|
|
{
|
|
DataTable data = App.ExportAll3(DateNow);
|
|
if (data != null && data.Rows.Count > 0)
|
|
{
|
|
//MemoryStream ms = OutFileToStreamItemReplace(data);
|
|
AsposeCell.Export(data);
|
|
}
|
|
|
|
}
|
|
/// <summary>
|
|
/// 对外改善异常追踪表
|
|
/// </summary>
|
|
/// <param name="pagination"></param>
|
|
/// <param name="queryJson"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetPassFirstTime6(string queryJson)
|
|
{
|
|
DataTable ListData = App.GetPassFirstTime6(queryJson);
|
|
var JsonData = new
|
|
{
|
|
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
public void ExportAll6(string DateNow)
|
|
{
|
|
DataTable data = App.ExportAll6(DateNow);
|
|
if (data != null && data.Rows.Count > 0)
|
|
{
|
|
//MemoryStream ms = OutFileToStreamItemReplace(data);
|
|
AsposeCell.Export(data);
|
|
}
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// 对外改善异常追踪表
|
|
/// </summary>
|
|
/// <param name="pagination"></param>
|
|
/// <param name="queryJson"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetPassFirstTime5(string queryJson)
|
|
{
|
|
DataTable ListData = App.GetPassFirstTime5(queryJson);
|
|
var JsonData = new
|
|
{
|
|
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
[HttpPost]
|
|
public void ExportAll(string DateNow)
|
|
{
|
|
DataTable data = App.ExportAll(DateNow);
|
|
if (data != null && data.Rows.Count > 0)
|
|
{
|
|
//MemoryStream ms = OutFileToStreamItemReplace(data);
|
|
AsposeCell.Export(data);
|
|
}
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// 详情
|
|
/// </summary>
|
|
/// <param name="RCVCode"></param>
|
|
/// <param name="pagination"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetMOIssueApplyNegDetail(string RCVCode, Pagination pagination)
|
|
{
|
|
DataTable ListData = App.GetMOIssueApplyNegDetail(RCVCode, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
public void ClearTemp()
|
|
{
|
|
App.ClearTemp();
|
|
}
|
|
/// <summary>
|
|
/// 生成调拨单
|
|
/// </summary>
|
|
/// <param name="keyValue"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult AddICSTransfer(string keyValue)
|
|
{
|
|
|
|
string msg = App.AddICSTransfer(keyValue);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("操作成功!");
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 多个产成品退库单 弃核
|
|
/// </summary>
|
|
/// <param name="keyValue"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult ICSMOIssueSendBackAuditRollback(string keyValue)
|
|
{
|
|
|
|
string msg = App.ICSMOIssueSendBackAuditRollback(keyValue);
|
|
if (!string.IsNullOrEmpty(msg))
|
|
{
|
|
return Error(msg);
|
|
}
|
|
else
|
|
{
|
|
return Success("弃审成功!");
|
|
}
|
|
}
|
|
|
|
[HttpPost]
|
|
public void ExportAll5(string DateNow)
|
|
{
|
|
DataTable data = App.ExportAll5(DateNow);
|
|
if (data != null && data.Rows.Count > 0)
|
|
{
|
|
//MemoryStream ms = OutFileToStreamItemReplace(data);
|
|
AsposeCell.Export(data);
|
|
}
|
|
|
|
}
|
|
|
|
[HttpGet]
|
|
public ActionResult SelectTableColumnName(string BeginTime, string EndTime)
|
|
{
|
|
var data = App.SelectTableColumnName(BeginTime, EndTime);
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// 订单所在的日期的订单未交货数量
|
|
/// </summary>
|
|
/// <param name="queryJson"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetPOUnarrivedQuantity(string queryJson)
|
|
{
|
|
DataTable ListData = App.GetPOUnarrivedQuantity(queryJson);
|
|
var JsonData = new
|
|
{
|
|
|
|
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 订单所在的日期的订单未交货数量(报表)
|
|
/// </summary>
|
|
/// <param name="DateNow"></param>
|
|
|
|
|
|
[HttpPost]
|
|
public void ExportAll7(string BeginTime, string EndTime)
|
|
{
|
|
DataTable data = App.ExportAll7(BeginTime,EndTime);
|
|
if (data != null && data.Rows.Count > 0)
|
|
{
|
|
//MemoryStream ms = OutFileToStreamItemReplace(data);
|
|
AsposeCell.Export(data);
|
|
}
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// 供应商交货的频率
|
|
/// </summary>
|
|
/// <param name="queryJson"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetVenDeliveries(string queryJson)
|
|
{
|
|
DataTable ListData = App.GetVenDeliveries(queryJson);
|
|
var JsonData = new
|
|
{
|
|
|
|
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
[HttpPost]
|
|
public void ExportAll8(string BeginTime, string EndTime)
|
|
{
|
|
DataTable data = App.ExportAll8(BeginTime, EndTime);
|
|
if (data != null && data.Rows.Count > 0)
|
|
{
|
|
//MemoryStream ms = OutFileToStreamItemReplace(data);
|
|
AsposeCell.Export(data);
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|