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.
588 lines
19 KiB
588 lines
19 KiB
using NFine.Application;
|
|
using NFine.Application.ProductManage;
|
|
using NFine.Application.SRM;
|
|
using NFine.Code;
|
|
using NFine.Data.Extensions;
|
|
using NFine.Domain.Entity.ProductManage;
|
|
using NPOI.SS.Formula.Functions;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Data.SqlClient;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Threading;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
namespace NFine.Web.Areas.SRM.Controllers
|
|
{
|
|
public class EcharsPerFormController : ControllerBase
|
|
{
|
|
EcharsPerFormApp app = new EcharsPerFormApp();
|
|
//
|
|
// GET: /SRM/EcharsPerForm/
|
|
public ActionResult PerFormChars()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult PerFormZLChars()
|
|
{
|
|
return View();
|
|
}
|
|
/// <summary>
|
|
/// 实际采购数量
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public ActionResult PoQuantity()
|
|
{
|
|
return View();
|
|
}
|
|
/// <summary>
|
|
/// 计划达成率
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public ActionResult PoRrice()
|
|
{
|
|
return View();
|
|
}
|
|
/// <summary>
|
|
/// 采购到货数量
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public ActionResult PORQuantity()
|
|
{
|
|
return View();
|
|
}
|
|
/// <summary>
|
|
/// 采购到货数量
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public ActionResult InvoicePrice()
|
|
{
|
|
return View();
|
|
}
|
|
//采购金额(订单金额) 占比
|
|
|
|
public ActionResult PoPriceSum()
|
|
{
|
|
return View();
|
|
}
|
|
//采购周期
|
|
public ActionResult Procurementcycle()
|
|
{
|
|
return View();
|
|
}
|
|
//供应商数量
|
|
|
|
public ActionResult VendorQuantity()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
//采购降本额
|
|
public ActionResult PoJBPrice()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
//实际交期与供应商交期一致率
|
|
public ActionResult POMaintenance()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
public ActionResult VendorQualifiedQuantity()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult DeliveryNoticeType2()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult VendorSORQUOTATION()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult PoJBPriceByInvCode()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult PoJBPriceByPersonCode()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
public ActionResult PoJBPriceByVenCode()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
public ActionResult BidChartsTB()
|
|
{
|
|
return View();
|
|
}
|
|
public ActionResult BidChartsJB()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetJQDC(string Year)
|
|
{
|
|
DataTable data = app.GetJQDC(Year);
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetPoQuantity(string VenName,string InvName,string BegionDate,string EndDate,string DETP,string selectedValue, string radios)
|
|
{
|
|
DataTable data = app.GetPoQuantity(VenName, InvName, BegionDate, EndDate, DETP, selectedValue, radios);
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetPoSearcs(string VenName, string InvName, string BegionDate, string EndDate, string DETP, string selectedValue, string radios)
|
|
{
|
|
DataTable data = app.GetPoSearcs(VenName, InvName, BegionDate, EndDate, DETP, selectedValue, radios);
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetJHImplementSearcs(string VenName, string InvName, string BegionDate, string EndDate, string DETP, string selectedValue, string radios)
|
|
{
|
|
DataTable data = app.GetJHImplementSearcs(VenName, InvName, BegionDate, EndDate, DETP, selectedValue, radios);
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetPorSearcs(string VenName, string InvName, string BegionDate, string EndDate, string DETP, string selectedValue, string radios)
|
|
{
|
|
DataTable data = app.GetPorSearcs(VenName, InvName, BegionDate, EndDate, DETP, selectedValue, radios);
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetInvoicePriceSearcs(string VenName, string InvName, string BegionDate, string EndDate, string DETP, string selectedValue, string radios)
|
|
{
|
|
DataTable data = app.GetInvoicePriceSearcs(VenName, InvName, BegionDate, EndDate, DETP, selectedValue, radios);
|
|
return Content(data.ToJson());
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetPoPriceSumSearcs(string VenName, string InvName, string BegionDate, string EndDate, string DETP, string selectedValue, string radios)
|
|
{
|
|
DataTable data = app.GetPoPriceSumSearcs(VenName, InvName, BegionDate, EndDate, DETP, selectedValue, radios);
|
|
return Content(data.ToJson());
|
|
}
|
|
/// <summary>
|
|
/// 供应商数量
|
|
/// </summary>
|
|
/// <param name="VenName"></param>
|
|
/// <param name="InvName"></param>
|
|
/// <param name="BegionDate"></param>
|
|
/// <param name="EndDate"></param>
|
|
/// <param name="DETP"></param>
|
|
/// <param name="selectedValue"></param>
|
|
/// <param name="radios"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetVendorQuantitySearcs()
|
|
{
|
|
DataTable data = app.GetVendorQuantitySearcs();
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 交期一致率
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetPOMaintenanceSearcs()
|
|
{
|
|
DataTable data = app.GetPOMaintenanceSearcs();
|
|
return Content(data.ToJson());
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetVendorQualifiedQuantitySearcs(string VenName, string InvName, string BegionDate, string EndDate, string DETP, string selectedValue, string radios)
|
|
{
|
|
DataTable data = app.GetVendorQualifiedQuantitySearcs(VenName, InvName, BegionDate, EndDate, DETP, selectedValue, radios);
|
|
return Content(data.ToJson());
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetDeliveryNoticeSearcs(string VenName, string InvName, string BegionDate, string EndDate, string DETP, string selectedValue, string radios)
|
|
{
|
|
DataTable data = app.GetDeliveryNoticeSearcs(VenName, InvName, BegionDate, EndDate, DETP, selectedValue, radios);
|
|
return Content(data.ToJson());
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetDeliveryNoticeType2Searcs(string VenName, string InvName, string BegionDate, string EndDate, string DETP, string selectedValue, string radios)
|
|
{
|
|
DataTable data = app.GetDeliveryNoticeType2Searcs(VenName, InvName, BegionDate, EndDate, DETP, selectedValue, radios);
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetDeliveryNoticeType2JQSearcs(string VenName, string InvName, string BegionDate, string EndDate, string DETP, string selectedValue, string radios)
|
|
{
|
|
DataTable data = app.GetDeliveryNoticeType2JQSearcs(VenName, InvName, BegionDate, EndDate, DETP, selectedValue, radios);
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetVendorSORQUOTATIONSearcs(string VenName, string InvName, string BegionDate, string EndDate, string DETP, string selectedValue, string radios)
|
|
{
|
|
DataTable data = app.GetVendorSORQUOTATIONSearcs(VenName, InvName, BegionDate, EndDate, DETP, selectedValue, radios);
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetPoJBPriceSearcs(string VenName, string InvName, string BegionDate, string EndDate, string DETP, string selectedValue, string radios)
|
|
{
|
|
DataTable data = app.GetPoJBPriceSearcs(VenName, InvName, BegionDate, EndDate, DETP, selectedValue, radios);
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetBidChartsTBSearcs(string VenName, string InvName, string BegionDate, string EndDate, string DETP, string selectedValue, string radios)
|
|
{
|
|
DataTable data = app.GetBidChartsTBSearcs(VenName, InvName, BegionDate, EndDate, DETP, selectedValue, radios);
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetBidChartsJBSearcs(string VenName, string InvName, string BegionDate, string EndDate, string DETP, string selectedValue, string radios)
|
|
{
|
|
DataTable data = app.GetBidChartsJBSearcs(VenName, InvName, BegionDate, EndDate, DETP, selectedValue, radios);
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetProcurementcycle(string VenName, string InvName, string BegionDate, string EndDate, string DETP, string selectedValue, string radios)
|
|
{
|
|
DataTable data = app.GetProcurementcycle(VenName, InvName, BegionDate, EndDate, DETP, selectedValue, radios);
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJsonByLB(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = app.GetGridJsonByLB(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetJHImplementByLB(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = app.GetJHImplementByLB(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetPorGridJsonByLB(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = app.GetPorGridJsonByLB(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetInvoicePriceByLB(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = app.GetInvoicePriceByLB(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetPoPriceSumGridJsonByLB(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = app.GetPoPriceSumGridJsonByLB(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetProcurementcycleJsonByLB(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = app.GetProcurementcycleJsonByLB(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetVendorQualifiedQuantityByLB(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = app.GetVendorQualifiedQuantityByLB(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetDeliveryNoticeByLB(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = app.GetDeliveryNoticeByLB(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetDeliveryNoticeType2ByLB(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = app.GetDeliveryNoticeType2ByLB(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetDeliveryNoticeTypeJQ2ByLB(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = app.GetDeliveryNoticeTypeJQ2ByLB(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetVendorSORQUOTATIONByLB(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = app.GetVendorSORQUOTATIONByLB(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetPoJBPriceByLB(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = app.GetPoJBPriceByLB(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetZL(string Year)
|
|
{
|
|
DataTable data = app.GetZL(Year);
|
|
return Content(data.ToJson());
|
|
}
|
|
public ActionResult ReportCountSum()
|
|
{
|
|
return View();
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetDelayOrder(string Year)
|
|
{
|
|
DataTable data = app.GetDelayOrder(Year);
|
|
return Content(data.ToJson());
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetPoMain()
|
|
{
|
|
DataTable data = app.GetPoMain();
|
|
return Content(data.ToJson());
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGridJson(Pagination pagination, string queryJson)
|
|
{
|
|
DataTable ListData = app.GetGridJson(queryJson, ref pagination);
|
|
var JsonData = new
|
|
{
|
|
total = pagination.total,
|
|
page = pagination.page,
|
|
records = pagination.records,
|
|
rows = ListData,
|
|
};
|
|
return Content(JsonData.ToJson());
|
|
}
|
|
public ActionResult GetInvCode()
|
|
{
|
|
DataTable dt = app.GetInvCode();
|
|
return Content(dt.ToJson());
|
|
}
|
|
|
|
/// <summary>
|
|
/// 采购总金额(近四年)
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetNCGJE()
|
|
{
|
|
DataTable data = app.GetNCGJE();
|
|
return Content(data.ToJson());
|
|
}
|
|
/// <summary>
|
|
/// 采购总金额(近六月)
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetYCGJE()
|
|
{
|
|
DataTable data = app.GetYCGJE();
|
|
return Content(data.ToJson());
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetWLCGJEZB()
|
|
{
|
|
DataTable data = app.GetWLCGJEZB();
|
|
return Content(data.ToJson());
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGYSCGJEZB()
|
|
{
|
|
DataTable data = app.GetGYSCGJEZB();
|
|
return Content(data.ToJson());
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetCGJBE()
|
|
{
|
|
DataTable data = app.GetCGJBE();
|
|
return Content(data.ToJson());
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetCGSDZT()
|
|
{
|
|
DataTable data = app.GetCGSDZT();
|
|
return Content(data.ToJson());
|
|
}
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetGYSTZ()
|
|
{
|
|
DataTable data = app.GetGYSTZ();
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
[HttpGet]
|
|
[HandlerAjaxOnly]
|
|
public ActionResult GetWLCFCGBL()
|
|
{
|
|
DataTable data = app.GetWLCFCGBL();
|
|
return Content(data.ToJson());
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|