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.
3044 lines
130 KiB
3044 lines
130 KiB
using System;
|
|
using JHReport.Common;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
using System.Data;
|
|
using System.Reflection;
|
|
using System.Text;
|
|
using JHReport.BLL;
|
|
using Warehouse.Code;
|
|
using Warehouse.DAL.ShipmentsReportDal;
|
|
using System.Collections;
|
|
using System.Text.RegularExpressions;
|
|
using System.IO;
|
|
using OfficeOpenXml;
|
|
|
|
namespace Warehouse.Controllers.Report
|
|
{
|
|
/// <summary>
|
|
/// /add by zhangxiaolong
|
|
/// </summary>
|
|
[RoutePrefix("Report")]
|
|
public class ReportController : Controller
|
|
{
|
|
static DbUtility dbhelp = new DbUtility(System.Configuration.ConfigurationManager.ConnectionStrings["mesConn"].ToString(), DbProviderType.SqlServer);
|
|
|
|
|
|
[Route("Dashboard/SiteCapacity")]
|
|
public ActionResult SiteCapacity()
|
|
{
|
|
if (Common.DBType == (int)DB.mysql)
|
|
{
|
|
return View("~/Views/Report/SiteCapacity.cshtml");
|
|
}
|
|
else
|
|
{
|
|
//return View("~/Views/Report/SiteCapacityMS.cshtml");
|
|
return View("~/Views/Report/SiteCapacityMSLine.cshtml");
|
|
}
|
|
}
|
|
|
|
|
|
[Route("Dashboard/Products")]
|
|
// GET: Report
|
|
public ActionResult Products()
|
|
{
|
|
return View("~/Views/Config/Products.cshtml");
|
|
}
|
|
//[Authorize]
|
|
//[MyFilter2Attribute]
|
|
/// <summary>
|
|
/// 生产在制
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[Route("Dashboard/ProduincReport")]
|
|
// GET: Report
|
|
public ActionResult ProduincReport()
|
|
{
|
|
return View("~/Views/Report/ProduincReport.cshtml");
|
|
}
|
|
|
|
//[Authorize]
|
|
//[MyFilter2Attribute]
|
|
/// <summary>
|
|
/// 仓库出货
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[Route("Dashboard/ShipmentsReport")]
|
|
// GET: Report
|
|
public ActionResult ShipmentsReport()
|
|
{
|
|
return View("~/Views/Report/ShipmentsReport.cshtml");
|
|
}
|
|
|
|
[Route("Runcard")]
|
|
// GET: Report
|
|
public ActionResult RunCard()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[Route("Runcard01")]
|
|
public ActionResult RunCardNew()
|
|
{
|
|
return View("~/Views/Report/RunCard01.cshtml");
|
|
}
|
|
|
|
//[Authorize]
|
|
//[MyFilter2Attribute]
|
|
/// <summary>
|
|
/// 质量评审报表
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[Route("Dashboard/QC")]
|
|
public ActionResult QC()
|
|
{
|
|
return View("~/Views/Report/QC.cshtml");
|
|
}
|
|
|
|
/// <summary>
|
|
/// 组件班组产量
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[Route("Dashboard/ShiftProduction")]
|
|
public ActionResult ShiftProduction()
|
|
{
|
|
return View("~/Views/Report/YL/ShiftProduction.cshtml");
|
|
}
|
|
|
|
/// <summary>
|
|
/// 分档机组件查询
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[Route("Dashboard/StepperComponents")]
|
|
public ActionResult StepperComponents()
|
|
{
|
|
return View("~/Views/Report/YL/StepperComponents.cshtml");
|
|
}
|
|
/// <summary>
|
|
/// 最终测试数据
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[Route("Dashboard/TestDataDetail")]
|
|
|
|
public ActionResult TestDataDetail()
|
|
{
|
|
return View("~/Views/Report/TestDataDetail.cshtml");
|
|
}
|
|
|
|
/// <summary>
|
|
/// 耐压测试
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[Route("Dashboard/PressureResistant")]
|
|
|
|
public ActionResult PressureResistant()
|
|
{
|
|
return View("~/Views/Report/PressureResistant.cshtml");
|
|
}
|
|
|
|
/// <summary>
|
|
/// 最终测试数据(衰减数据)
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[Route("Dashboard/TestDataDetailFake")]
|
|
|
|
public ActionResult TestDataDetailFake()
|
|
{
|
|
return View("~/Views/Report/TestDataDetailFake.cshtml");
|
|
}
|
|
/// <summary>
|
|
/// 多次测试数据
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[Route("Dashboard/MultipleTestDetail")]
|
|
public ActionResult MultipleTestDetail()
|
|
{
|
|
return View("~/Views/Report/MultipleTestDetail.cshtml");
|
|
}
|
|
/// <summary>
|
|
/// 包装删除记录
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[Route("Dashboard/PackDelHistory")]
|
|
public ActionResult PackDelHistory()
|
|
{
|
|
return View("~/Views/Report/PackDelHistory.cshtml");
|
|
}
|
|
/// <summary>
|
|
/// 工单各站点在制
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[Route("Dashboard/WOprocess")]
|
|
public ActionResult WOprocess()
|
|
{
|
|
return View("~/Views/Report/WOprocess.cshtml");
|
|
}
|
|
/// <summary>
|
|
/// 包装详细报表
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[Route("Dashboard/PackOutput")]
|
|
public ActionResult PackOutput()
|
|
{
|
|
return View("~/Views/Report/PackOutput.cshtml");
|
|
}
|
|
/// <summary>
|
|
/// 新包装详细报表
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[Route("Dashboard/PackOutputDetail")]
|
|
public ActionResult PackOutputDetail()
|
|
{
|
|
return View("~/Views/Report/YL/PackOutputDetail.cshtml");
|
|
}
|
|
|
|
[Route("JK")]
|
|
public ActionResult JK()
|
|
{
|
|
return View();
|
|
}
|
|
/// <summary>
|
|
/// 工单达成情况
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[Route("Dashboard/WOFinishStatus")]
|
|
public ActionResult WOFinishStatus()
|
|
{
|
|
return View("~/Views/Report/WOFinishStatus.cshtml");
|
|
}
|
|
//订单良率
|
|
[Route("Dashboard/SpecifiedChanLiangrate")]
|
|
public ActionResult SpecifiedChanLiangrate()
|
|
{
|
|
return View("~/Views/Report/SpecifiedChanLiangrate.cshtml");
|
|
}
|
|
|
|
|
|
//综合良率
|
|
[Route("Dashboard/ComprehensiveYield")]
|
|
public ActionResult ComprehensiveYield()
|
|
{
|
|
return View("~/Views/Report/ComprehensiveYield.cshtml");
|
|
}
|
|
|
|
//echarts视图
|
|
[Route("Dashboard/EchartsView")]
|
|
public ActionResult EchartsView()
|
|
{
|
|
return View("~/Views/Report/EchartsView.cshtml");
|
|
}
|
|
/// <summary>
|
|
/// 库存报表
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[Route("Dashboard/Inventory")]
|
|
public ActionResult Inventory()
|
|
{
|
|
return View("~/Views/Report/Inventory.cshtml");
|
|
}
|
|
|
|
[Route("Dashboard/DogownEntry")]
|
|
public ActionResult DogownEntry()
|
|
{
|
|
return View("~/Views/Report/DogownEntry.cshtml");
|
|
}
|
|
//工单条码登记
|
|
[Route("Dashboard/WorkOrderLotQty")]
|
|
public ActionResult WorkOrderLotQty()
|
|
{
|
|
return View("~/Views/Report/WorkOrderLotQty.cshtml");
|
|
}
|
|
//破片率登记
|
|
[Route("Dashboard/FragmentRegister")]
|
|
public ActionResult FragmentRegister()
|
|
{
|
|
return View("~/Views/Report/FragmentRegister.cshtml");
|
|
}
|
|
//材料追溯
|
|
[Route("Dashboard/MaterialTraceability")]
|
|
public ActionResult MaterialTraceability()
|
|
{
|
|
return View("~/Views/Report/MaterialTraceability.cshtml");
|
|
}
|
|
//收发存报表
|
|
[Route("Dashboard/ReceivedAndDepositController")]
|
|
public ActionResult ReceivedAndDepositController()
|
|
{
|
|
return View("~/Views/Report/ReceivedAndDepositController.cshtml");
|
|
}
|
|
//CTM报表
|
|
[Route("Dashboard/FinalTestRoomData")]
|
|
public ActionResult FinalTestRoomData()
|
|
{
|
|
return View("~/Views/Report/FinalTestRoomData.cshtml");
|
|
}
|
|
//返修报表
|
|
[Route("Dashboard/Repair")]
|
|
public ActionResult Repair()
|
|
{
|
|
return View("~/Views/Report/Repair.cshtml");
|
|
}
|
|
/// <summary>
|
|
/// 订单达成率
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[Route("Dashboard/BarCodeAndQualityRate")]
|
|
public ActionResult BarCodeAndQualityRate()
|
|
{
|
|
return View("~/Views/Report/BarCodeAndQualityRate.cshtml");
|
|
}
|
|
/// <summary>
|
|
/// 结批率
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[Route("Dashboard/BatchRate")]
|
|
public ActionResult BatchRate()
|
|
{
|
|
return View("~/Views/Report/BatchRate.cshtml");
|
|
}
|
|
/// <summary>
|
|
/// 工单状态
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[Route("Dashboard/WOStatus")]
|
|
public ActionResult WOStatus()
|
|
{
|
|
return View("~/Views/Report/WOStatus.cshtml");
|
|
}
|
|
|
|
|
|
[Route("Dashboard/SuppliesConsumed")]
|
|
public ActionResult SuppliesConsumed()
|
|
{
|
|
return View("~/Views/Report/SuppliesConsumed.cshtml");
|
|
}
|
|
|
|
[Route("Dashboard/BatchDataOfCell")]
|
|
public ActionResult BatchDataOfCell()
|
|
{
|
|
return View("~/Views/Report/BatchDataOfCell.cshtml");
|
|
}
|
|
|
|
[Route("Dashboard/LinePositions")]
|
|
public ActionResult LinePositions()
|
|
{
|
|
return View("~/Views/Report/LinePositions.cshtml");
|
|
}
|
|
|
|
[Route("Dashboard/FinishProductLinePositions")]
|
|
public ActionResult FinishProductLinePositions()
|
|
{
|
|
return View("~/Views/Report/FinishProductLinePositions.cshtml");
|
|
}
|
|
//原料仓收货
|
|
[Route("Dashboard/Receiving")]
|
|
public ActionResult Receiving()
|
|
{
|
|
return View("~/Views/MaterialSilo/Receiving.cshtml");
|
|
}
|
|
//产量报表
|
|
[Route("Dashboard/YieldForm")]
|
|
public ActionResult YieldForm()
|
|
{
|
|
return View("~/Views/Report/YieldForm.cshtml");
|
|
}
|
|
|
|
//包装产能统计
|
|
[Route("Dashboard/PackCapacity")]
|
|
public ActionResult PackCapacity()
|
|
{
|
|
return View("~/Views/Report/PackCapacity.cshtml");
|
|
}
|
|
|
|
//每日投产包装完成率
|
|
[Route("Dashboard/DayPackComplete")]
|
|
public ActionResult DayPackComplete()
|
|
{
|
|
return View("~/Views/Report/DayPackComplete.cshtml");
|
|
}
|
|
|
|
//生码未包装组件查询
|
|
[Route("Dashboard/UnPackComponent")]
|
|
public ActionResult UnPackComponent()
|
|
{
|
|
return View("~/Views/Report/UnPackComponent.cshtml");
|
|
}
|
|
|
|
//材料批号查询
|
|
[Route("Dashboard/MaterialBatchNumber")]
|
|
public ActionResult MaterialBatchNumber()
|
|
{
|
|
return View("~/Views/Report/MaterialBatchNumber.cshtml");
|
|
}
|
|
|
|
//本月每天各工位产能
|
|
[Route("Dashboard/CurEverydayStationCapacity")]
|
|
public ActionResult CurEverydayStationCapacity()
|
|
{
|
|
return View("~/Views/Report/CurEverydayStationCapacity.cshtml");
|
|
}
|
|
|
|
//本月每天各工位产能
|
|
[Route("Dashboard/StationClassYield")]
|
|
public ActionResult StationClassYield()
|
|
{
|
|
return View("~/Views/Report/StationClassYield.cshtml");
|
|
}
|
|
|
|
//前道产能看板
|
|
[Route("Dashboard/BeforeCapacity")]
|
|
public ActionResult BeforeCapacity()
|
|
{
|
|
return View("~/Views/Report/BeforeCapacity.cshtml");
|
|
}
|
|
|
|
//前道产能看板
|
|
[Route("Dashboard/AfterCapacity")]
|
|
public ActionResult AfterCapacity()
|
|
{
|
|
return View("~/Views/Report/AfterCapacity.cshtml");
|
|
}
|
|
|
|
//包装产能看板
|
|
[Route("Dashboard/TotalCapacity")]
|
|
public ActionResult TotalCapacity()
|
|
{
|
|
return View("~/Views/Report/TotalCapacity.cshtml");
|
|
}
|
|
|
|
//永臻晶科报表
|
|
[Route("Dashboard/YongzhenJinke")]
|
|
public ActionResult YongzhenJinke()
|
|
{
|
|
return View("~/Views/Report/YongzhenJinke.cshtml");
|
|
}
|
|
|
|
//一次碎片率
|
|
[Route("Dashboard/FragmentationRate")]
|
|
public ActionResult FragmentationRate()
|
|
{
|
|
return View("~/Views/Report/YL/FragmentationRate.cshtml");
|
|
}
|
|
|
|
|
|
//一次成型率
|
|
[Route("Dashboard/OnceMoldingRate")]
|
|
public ActionResult OnceMoldingRate()
|
|
{
|
|
return View("~/Views/Report/YL/OnceMoldingRate.cshtml");
|
|
}
|
|
|
|
//数据查询
|
|
[Route("Dashboard/DataQuery")]
|
|
public ActionResult DataQuery()
|
|
{
|
|
return View("~/Views/Report/YL/Dataquery.cshtml");
|
|
}
|
|
|
|
//上档率
|
|
[Route("Dashboard/UpshiftRate")]
|
|
public ActionResult UpshiftRate()
|
|
{
|
|
return View("~/Views/Report/YL/UpshiftRate.cshtml");
|
|
}
|
|
|
|
|
|
//车间质量问题统计
|
|
[Route("Dashboard/QualityStatistics")]
|
|
public ActionResult QualityStatistics()
|
|
{
|
|
return View("~/Views/Report/YL/QualityStatistics.cshtml");
|
|
}
|
|
|
|
//在制品
|
|
[Route("Dashboard/WIPStatistics")]
|
|
public ActionResult WIPStatistics()
|
|
{
|
|
return View("~/Views/Report/YL/WIPStatistics.cshtml");
|
|
}
|
|
|
|
//条码补打报表
|
|
[Route("Dashboard/BarcodeReprint")]
|
|
public ActionResult BarcodeReprint()
|
|
{
|
|
return View("~/Views/Report/BarcodeReprint.cshtml");
|
|
}
|
|
|
|
//泛海CTM报表
|
|
[Route("Dashboard/CTMReport")]
|
|
public ActionResult CTMReport()
|
|
{
|
|
return View("~/Views/Report/CTMReport.cshtml");
|
|
}
|
|
|
|
//泛海材料批号报表
|
|
[Route("Dashboard/MaterialLotReport")]
|
|
public ActionResult MaterialLotReport()
|
|
{
|
|
return View("~/Views/Report/MaterialLotReport.cshtml");
|
|
}
|
|
|
|
|
|
[Route("Sitecapacity")]
|
|
public ActionResult Sitecapacity()
|
|
{
|
|
return View();
|
|
}
|
|
//[Route("WOStatusExcel/{wo=}/{sales=}")]
|
|
//[HttpGet]
|
|
//public FileContentResult WOStatusToExcel(string wo, string sales)
|
|
//{
|
|
// DataTable dt = new ReportService().WOStatusInfoDT(wo == "Null" ? "" : wo, sales == "Null" ? "" : sales);
|
|
// //string[] AryColnameChinese = { "工单号","订单号","组件条码","投产时间","当前站别","组件等级","实测功率" };
|
|
|
|
// dt.Columns[0].ColumnName = "组件条码";
|
|
// dt.Columns[1].ColumnName = "工单号";
|
|
// dt.Columns[2].ColumnName = "订单号";
|
|
// dt.Columns[3].ColumnName = "投产时间";
|
|
// dt.Columns[4].ColumnName = "当前站别";
|
|
// dt.Columns[5].ColumnName = "EL等级";
|
|
// dt.Columns[6].ColumnName = "组件等级";
|
|
// dt.Columns[7].ColumnName = "实测功率";
|
|
|
|
|
|
|
|
// return ExportExcel(dt, "WOStatus");
|
|
//}
|
|
|
|
[Route("WOStatusExcel")]
|
|
[HttpPost]
|
|
public FileContentResult WOStatusToExcel(List<string> para)
|
|
{
|
|
string wo = para[0];
|
|
string sales = para[1];
|
|
//仓库 库位号 客户订单 功率/W 栅数 铭牌型号 单托/片 托数 合计块数 合计MW 型 材 接线盒类型 等 级 柜 号
|
|
DataTable dt = new ReportService().WOStatusInfoDT(wo == "Null" ? "" : wo, sales == "Null" ? "" : sales);
|
|
|
|
dt.Columns[0].ColumnName = "组件条码";
|
|
dt.Columns[1].ColumnName = "工单号";
|
|
dt.Columns[2].ColumnName = "订单号";
|
|
dt.Columns[3].ColumnName = "投产时间";
|
|
dt.Columns[4].ColumnName = "当前站别";
|
|
dt.Columns[5].ColumnName = "EL等级";
|
|
dt.Columns[6].ColumnName = "组件等级";
|
|
dt.Columns[7].ColumnName = "实测功率";
|
|
|
|
return ExportExcel(dt, "WOStatus");
|
|
|
|
}
|
|
|
|
|
|
|
|
//质量报表导出excel
|
|
[Route("QCExcel/{bt}/{et=}/{lot=}/{workshop=}/{workorder=}/{station=}")]
|
|
[HttpGet]
|
|
public FileContentResult QCExportToExcel(string bt, string et, string lot, string workshop, string workorder, string station)
|
|
{
|
|
DataTable dt = new ReportService().QCQueryInfo(bt == "Null" ? "" : bt
|
|
, et == "Null" ? "" : et
|
|
, lot == "Null" ? "" : lot
|
|
, workshop == "Null" ? "" : workshop
|
|
//, status == "Null" ? "" : status
|
|
, workorder == "Null" ? "" : workorder
|
|
, station == "Null" ? "" : station);
|
|
//dt.Columns[0].ColumnName = "序号";
|
|
dt.Columns[0].ColumnName = "组件序列号";
|
|
dt.Columns[1].ColumnName = "订单号";
|
|
dt.Columns[2].ColumnName = "工单号";
|
|
dt.Columns[3].ColumnName = "组件状态";
|
|
dt.Columns[4].ColumnName = "等级";
|
|
//dt.Columns[5].ColumnName = "扣留时间";
|
|
dt.Columns[5].ColumnName = "不良站点";
|
|
dt.Columns[6].ColumnName = "不良类型";
|
|
dt.Columns[7].ColumnName = "不良位置";
|
|
dt.Columns[8].ColumnName = "不良描述";
|
|
dt.Columns[9].ColumnName = "不良标准";
|
|
dt.Columns[10].ColumnName = "扣留状态";
|
|
dt.Columns[11].ColumnName = "扣留人";
|
|
dt.Columns[12].ColumnName = "扣留时间";
|
|
dt.Columns[13].ColumnName = "最终操作状态";
|
|
dt.Columns[14].ColumnName = "最终操作人";
|
|
dt.Columns[15].ColumnName = "最终操作时间";
|
|
return ExportExcel(dt, "QCReport");
|
|
}
|
|
|
|
//晶科报表导出excel
|
|
[Route("JKExcel/{salesorder=}/{lot=}")]
|
|
[HttpGet]
|
|
public FileContentResult JKExportExcel(string salesorder, string lot)
|
|
{
|
|
DataTable dt = new ReportService().JKQueryInfo(salesorder == "Null" ? "" : salesorder, lot == "Null" ? "" : lot);
|
|
return ExportExcel(dt, "JKReport");
|
|
}
|
|
//包装删除报表导出excel
|
|
[Route("PackDelHistoryExcel/{lot=}")]
|
|
[HttpGet]
|
|
public FileContentResult PackDelHistoryExportExcel(string lot)
|
|
{
|
|
DataTable dt = new ReportService().PackDelHistoryQueryInfoDT(lot == "Null" ? "" : lot);
|
|
return ExportExcel(dt, "PackDelHistoryReport");
|
|
}
|
|
//工单各站点在制excel
|
|
[Route("WOprocessExcel/{wo=}")]
|
|
[HttpGet]
|
|
public FileContentResult WOprocessExportExcel(string wo)
|
|
{
|
|
DataTable dt = new ReportService().WOprocessQueryInfoDT(wo == "Null" ? "" : wo);
|
|
return ExportExcel(dt, "WOprocessReport");
|
|
}
|
|
|
|
////工单达成情况excel
|
|
//[Route("WOFinishStatusExcel/{wo=}/{et=}/{customer=}/{bt =}/{sales=}")]
|
|
//[HttpGet]
|
|
//public FileContentResult WOFinishStatusExcel(string wo, string sales, string customer, string bt, string et)
|
|
//{
|
|
// DataTable dt = new ReportService().WOFinishStatusDT(wo == "Null" ? "" : wo,
|
|
// sales == "Null" ? "" : sales,
|
|
// customer == "Null" ? "" : customer,
|
|
// bt == "Null" ? "" : bt,
|
|
// et == "Null" ? "" : et);
|
|
// return ExportExcel(dt, "WOFinishStatus");
|
|
//}
|
|
|
|
[Route("WOFinishStatusExcel")]
|
|
[HttpPost]
|
|
public FileContentResult WOFinishStatusExcel(List<string> para)
|
|
{
|
|
string wo = para[0];
|
|
string sales = para[1];
|
|
string customer = para[2];
|
|
string bt = para[3];
|
|
string et = para[4];
|
|
//仓库 库位号 客户订单 功率/W 栅数 铭牌型号 单托/片 托数 合计块数 合计MW 型 材 接线盒类型 等 级 柜 号
|
|
DataTable dt = new ReportService().WOFinishStatusDT(wo == "Null" ? "" : wo,
|
|
sales == "Null" ? "" : sales,
|
|
customer == "Null" ? "" : customer,
|
|
bt == "Null" ? "" : bt,
|
|
et == "Null" ? "" : et);
|
|
dt.Columns[0].ColumnName = "工单日期";
|
|
dt.Columns[1].ColumnName = "生码日期";
|
|
dt.Columns[2].ColumnName = "客户";
|
|
dt.Columns[3].ColumnName = "订单号";
|
|
dt.Columns[4].ColumnName = "工单号";
|
|
dt.Columns[5].ColumnName = "生产批次";
|
|
dt.Columns[6].ColumnName = "组件功率";
|
|
dt.Columns[7].ColumnName = "工单数量";
|
|
dt.Columns[8].ColumnName = "叠层数量";
|
|
dt.Columns[9].ColumnName = "装框数量";
|
|
dt.Columns[10].ColumnName = "清洗数量";
|
|
dt.Columns[11].ColumnName = "电池片厂家";
|
|
dt.Columns[12].ColumnName = "电池片档位";
|
|
dt.Columns[13].ColumnName = "组件等级分布";
|
|
dt.Columns[14].ColumnName = "测试功率";
|
|
return ExportExcel(dt, "WOFinishStatusReport");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
|
|
//测试数据明细导出excel 旧版本
|
|
[Route("TestDataDetail2Excel/{lot=}/{wo=}/{bt=}/{et=}/{workshop=}/{pallet_nbr=}/{sale_order=}/{containerno=}/{check_nbr=}")]
|
|
|
|
[HttpGet]
|
|
public FileContentResult TestDataDetailExport2Excel(string lot, string wo, string bt, string et, string workshop, string pallet_nbr, string sale_order, string containerno, string check_nbr)
|
|
{
|
|
DataTable dt = new ReportService().TestDataDetailQueryInfo(lot == "Null" ? "" : lot
|
|
, wo == "Null" ? "" : wo
|
|
, bt == "Null" ? "" : bt
|
|
, et == "Null" ? "" : et
|
|
, workshop == "Null" ? "" : workshop
|
|
, pallet_nbr == "Null" ? "" : pallet_nbr
|
|
, sale_order == "Null" ? "" : sale_order
|
|
, containerno == "Null" ? "" : containerno
|
|
, check_nbr == "Null" ? "" : check_nbr
|
|
);
|
|
dt.Columns[0].ColumnName = "产品类型";
|
|
dt.Columns[1].ColumnName = "功率档位";
|
|
dt.Columns[2].ColumnName = "测试时间";
|
|
dt.Columns[3].ColumnName = "测试机台号";
|
|
dt.Columns[4].ColumnName = "柜号";
|
|
dt.Columns[5].ColumnName = "托盘号";
|
|
dt.Columns[6].ColumnName = "组件序列号";
|
|
dt.Columns[7].ColumnName = "Pmax";
|
|
dt.Columns[8].ColumnName = "Isc";
|
|
dt.Columns[9].ColumnName = "Voc";
|
|
dt.Columns[10].ColumnName = "Ipm";
|
|
dt.Columns[11].ColumnName = "Vpm";
|
|
dt.Columns[12].ColumnName = "FF";
|
|
dt.Columns[13].ColumnName = "电流档位";
|
|
return ExportExcel(dt, "TestDataDetailReport");
|
|
}
|
|
|
|
//测试数据明细导出excel (山东客户)
|
|
[Route("TestDataDetailExcel")]
|
|
[HttpPost]
|
|
public FileContentResult TestDataDetailExportExcel(List<string> para)
|
|
{
|
|
string lot = para[0];
|
|
string wo = para[1];
|
|
string bt = para[2];
|
|
string et = para[3];
|
|
string workshop = para[4];
|
|
string pallet_nbr = para[5];
|
|
string sale_order = para[6];
|
|
string containerno = para[7];
|
|
string check_nbr = para[8];
|
|
if (workshop.ToUpper() == "NULL")
|
|
{
|
|
workshop = "";
|
|
}
|
|
DataTable dt = new ReportService().TestDataDetailQueryInfo(lot,
|
|
wo,
|
|
bt,
|
|
et,
|
|
workshop,
|
|
pallet_nbr,
|
|
sale_order,
|
|
containerno,
|
|
check_nbr
|
|
);
|
|
int i = 0;
|
|
dt.Columns[i++].ColumnName = "柜号";
|
|
dt.Columns[i++].ColumnName = "托盘号";
|
|
dt.Columns[i++].ColumnName = "包装顺序";
|
|
dt.Columns[i++].ColumnName = "工单号";
|
|
dt.Columns[i++].ColumnName = "订单号";
|
|
dt.Columns[i++].ColumnName = "组件序列号";
|
|
dt.Columns[i++].ColumnName = "测试日期时间";
|
|
dt.Columns[i++].ColumnName = "测试机台";
|
|
dt.Columns[i++].ColumnName = "功率档位";
|
|
dt.Columns[i++].ColumnName = "电流档位";
|
|
dt.Columns[i++].ColumnName = "外观等级";
|
|
dt.Columns[i++].ColumnName = "EL等级";
|
|
dt.Columns[i++].ColumnName = "最终等级";
|
|
dt.Columns[i++].ColumnName = "VOC";
|
|
dt.Columns[i++].ColumnName = "ISC";
|
|
dt.Columns[i++].ColumnName = "Pmax";
|
|
dt.Columns[i++].ColumnName = "VPM";
|
|
dt.Columns[i++].ColumnName = "IPM";
|
|
dt.Columns[i++].ColumnName = "FF";
|
|
dt.Columns[i++].ColumnName = "RS";
|
|
dt.Columns[i++].ColumnName = "RSH";
|
|
dt.Columns[i++].ColumnName = "EFF";
|
|
dt.Columns[i++].ColumnName = "ENV_TEMP";
|
|
dt.Columns[i++].ColumnName = "Tmod";
|
|
dt.Columns[i++].ColumnName = "电池片厂家";
|
|
dt.Columns[i++].ColumnName = "单片功率";
|
|
dt.Columns[i++].ColumnName = "电池片颜色";
|
|
dt.Columns[i++].ColumnName = "电池片等级";
|
|
dt.Columns[i++].ColumnName = "电池片类型";
|
|
dt.Columns[i++].ColumnName = "电池片效率档";
|
|
//dt.Columns[i++].ColumnName = "转换效率";
|
|
dt.Columns[i++].ColumnName = "托盘状态";
|
|
dt.Columns[i++].ColumnName = "片源用量";
|
|
dt.Columns[i++].ColumnName = "额定功率";
|
|
dt.Columns[i++].ColumnName = "投入产出比";
|
|
dt.Columns[i++].ColumnName = "晶体类型";
|
|
dt.Columns[i++].ColumnName = "片源规格";
|
|
dt.Columns[i++].ColumnName = "焊接机台号";
|
|
return ExportExcel(dt, "TestDataDetailReport");
|
|
}
|
|
|
|
//九江正泰最终数据导出(衰减数据)
|
|
[Route("TestDataDetailFakeExcel/{lot=}/{wo=}/{bt=}/{et=}/{workshop=}/{pallet_nbr=}/{sale_order=}/{containerno=}/{check_nbr=}")]
|
|
|
|
[HttpGet]
|
|
public FileContentResult TestDataDetailExportFakeExcel(string lot, string wo, string bt, string et, string workshop, string pallet_nbr, string sale_order, string containerno, string check_nbr)
|
|
{
|
|
DataTable dt = new ReportService().TestDataDetailQueryInfoFake(lot == "Null" ? "" : lot
|
|
, wo == "Null" ? "" : wo
|
|
, bt == "Null" ? "" : bt
|
|
, et == "Null" ? "" : et
|
|
, workshop == "Null" ? "" : workshop
|
|
, pallet_nbr == "Null" ? "" : pallet_nbr
|
|
, sale_order == "Null" ? "" : sale_order
|
|
, containerno == "Null" ? "" : containerno
|
|
, check_nbr == "Null" ? "" : check_nbr
|
|
);
|
|
dt.Columns[0].ColumnName = "产品类型";
|
|
dt.Columns[1].ColumnName = "功率档位";
|
|
dt.Columns[2].ColumnName = "测试时间";
|
|
dt.Columns[3].ColumnName = "测试机台号";
|
|
dt.Columns[4].ColumnName = "柜号";
|
|
dt.Columns[5].ColumnName = "托盘号";
|
|
dt.Columns[6].ColumnName = "组件序列号";
|
|
dt.Columns[7].ColumnName = "Pmax";
|
|
dt.Columns[8].ColumnName = "Isc";
|
|
dt.Columns[9].ColumnName = "Voc";
|
|
dt.Columns[10].ColumnName = "Ipm";
|
|
dt.Columns[11].ColumnName = "Vpm";
|
|
dt.Columns[12].ColumnName = "FF";
|
|
dt.Columns[13].ColumnName = "电流档位";
|
|
return ExportExcel(dt, "TestDataDetailReportFake(衰减数据)");
|
|
}
|
|
|
|
|
|
//多次测试数据明细导出excel
|
|
[Route("MultipleTestDetailExcel/{lot=}/{wo=}/{bt=}/{et=}/{workshop=}")]
|
|
|
|
[HttpGet]
|
|
public FileContentResult MultipleTestDetailExportExcel(string lot, string wo, string bt, string et, string workshop)
|
|
{
|
|
DataTable dt = new ReportService().MultipleTestDetailQueryInfo(lot == "Null" ? "" : lot
|
|
, wo == "Null" ? "" : wo
|
|
, bt == "Null" ? "" : bt
|
|
, et == "Null" ? "" : et
|
|
, workshop == "Null" ? "" : workshop
|
|
);
|
|
//, pallet == "Null" ? "" : pallet
|
|
return ExportExcel(dt, "MultipleTestDetailReport");
|
|
}
|
|
|
|
////包装产量报表导出excel
|
|
//[Route("PackoutputExcel/{workshop}/{bt}/{et}/{lot}/{container}/{pallet}/{check}")]
|
|
//[HttpGet]
|
|
//public FileContentResult PackOutputExportExcel(string workshop, string bt, string et, string lot, string container, string pallet, string check)
|
|
//{
|
|
// DataTable dt = new ReportService().PackOutputQueryInfo(workshop == "Null" ? "" : workshop
|
|
// , bt == "Null" ? "" : bt
|
|
// , et == "Null" ? "" : et
|
|
// , lot == "Null" ? "" : lot
|
|
// , container == "Null" ? "" : container
|
|
// , pallet == "Null" ? "" : pallet
|
|
// , check == "Null" ? "" : check);
|
|
// return ExportExcel(dt, "PackOutputReport");
|
|
//}
|
|
|
|
//修改#问题 add bby zhangxiaolong
|
|
//包装产量报表导出excel(旧版本)
|
|
[Route("PackoutputS2Excel")]
|
|
[HttpPost]
|
|
public FileContentResult PackOutputExportS2Excel(List<string> para)
|
|
{
|
|
|
|
string bt = para[0];
|
|
string et = para[1];
|
|
//string containerno = para.containerno;
|
|
//string pallet = para.palletno;
|
|
//string lot = para.lotno;
|
|
string check = para[6];
|
|
string workshop = para[2];
|
|
|
|
string containerno_old = para[3];
|
|
string trim = Regex.Replace(containerno_old, @"\s", " ");
|
|
string container = "'" + trim.Replace(" ", "','") + "'";
|
|
|
|
string lot_old = para[4];
|
|
string trim1 = Regex.Replace(lot_old, @"\s", " ");
|
|
string lot = "'" + trim1.Replace(" ", "','") + "'";
|
|
|
|
string pallet_old = para[5];
|
|
string trim2 = Regex.Replace(pallet_old, @"\s", " ");
|
|
string pallet = "'" + trim2.Replace(" ", "','") + "'";
|
|
string workorder = para[7];
|
|
DataTable dt = new ReportService().PackOutputQueryInfo(workshop.ToUpper() == "Null" ? "" : workshop
|
|
, bt.ToUpper() == "Null" ? "" : bt
|
|
, et.ToUpper() == "Null" ? "" : et
|
|
, lot.ToUpper() == "Null" ? "" : lot
|
|
, container.ToUpper() == "Null" ? "" : container
|
|
, pallet.ToUpper() == "Null" ? "" : pallet
|
|
, check.ToUpper() == "Null" ? "" : check
|
|
, workorder.ToUpper() == "Null" ? "" : workorder);
|
|
int i = 0;
|
|
dt.Columns[i++].ColumnName = "托盘号";
|
|
dt.Columns[i++].ColumnName = "柜号";
|
|
dt.Columns[i++].ColumnName = "组件序列号";
|
|
dt.Columns[i++].ColumnName = "工单号";
|
|
dt.Columns[i++].ColumnName = "订单号";
|
|
dt.Columns[i++].ColumnName = "功率档位";
|
|
dt.Columns[i++].ColumnName = "电流档位";
|
|
dt.Columns[i++].ColumnName = "装配件号";
|
|
dt.Columns[i++].ColumnName = "EL等级";
|
|
dt.Columns[i++].ColumnName = "外观等级";
|
|
dt.Columns[i++].ColumnName = "最终等级";
|
|
dt.Columns[i++].ColumnName = "测试机台";
|
|
dt.Columns[i++].ColumnName = "封箱时间";
|
|
dt.Columns[i++].ColumnName = "功率组";
|
|
dt.Columns[i++].ColumnName = "是否入库";
|
|
dt.Columns[i++].ColumnName = "班次";
|
|
dt.Columns[i++].ColumnName = "Pmax";
|
|
dt.Columns[i++].ColumnName = "VOC";
|
|
dt.Columns[i++].ColumnName = "ISC";
|
|
dt.Columns[i++].ColumnName = "FF";
|
|
dt.Columns[i++].ColumnName = "VPM";
|
|
dt.Columns[i++].ColumnName = "IPM";
|
|
dt.Columns[i++].ColumnName = "RS";
|
|
dt.Columns[i++].ColumnName = "RSH";
|
|
dt.Columns[i++].ColumnName = "EFF";
|
|
dt.Columns[i++].ColumnName = "ENV_TEMP";
|
|
dt.Columns[i++].ColumnName = "SURF_TEMP";
|
|
dt.Columns[i++].ColumnName = "TEMP";
|
|
dt.Columns[i++].ColumnName = "IVFILE_PATH";
|
|
dt.Columns[i++].ColumnName = "包装顺序";
|
|
dt.Columns[i++].ColumnName = "报检单号";
|
|
dt.Columns[i++].ColumnName = "电池片厂商";
|
|
dt.Columns[i++].ColumnName = "电池片颜色";
|
|
dt.Columns[i++].ColumnName = "电池片类型";
|
|
dt.Columns[i++].ColumnName = "电池片档位";
|
|
dt.Columns[i++].ColumnName = "单片功率";
|
|
dt.Columns[i++].ColumnName = "转换效率";
|
|
dt.Columns[i++].ColumnName = "EVA厂商";
|
|
dt.Columns[i++].ColumnName = "普通EVA规格";
|
|
dt.Columns[i++].ColumnName = "普通EVA批号";
|
|
dt.Columns[i++].ColumnName = "背板厂商";
|
|
dt.Columns[i++].ColumnName = "背板规格";
|
|
dt.Columns[i++].ColumnName = "背板批号";
|
|
dt.Columns[i++].ColumnName = "玻璃供应商";
|
|
dt.Columns[i++].ColumnName = "玻璃规格";
|
|
dt.Columns[i++].ColumnName = "玻璃批号";
|
|
dt.Columns[i++].ColumnName = "接线盒供应商";
|
|
dt.Columns[i++].ColumnName = "接线盒规格";
|
|
dt.Columns[i++].ColumnName = "接线盒批号";
|
|
dt.Columns[i++].ColumnName = "型材供应商";
|
|
dt.Columns[i++].ColumnName = "型材规格";
|
|
dt.Columns[i++].ColumnName = "型材批号";
|
|
dt.Columns[i++].ColumnName = "客户";
|
|
dt.Columns[i++].ColumnName = "产品组";
|
|
//dt.Columns[49].ColumnName = "料号";
|
|
dt.Columns[i++].ColumnName = "测试时间";
|
|
return ExportExcel(dt, "PackOutputReport");
|
|
}
|
|
|
|
|
|
//包装产量报表导出excel(山东客户版本)
|
|
[Route("PackoutputSExcel")]
|
|
[HttpPost]
|
|
public FileContentResult PackOutputExportSExcel(List<string> para)
|
|
{
|
|
|
|
string bt = para[0];
|
|
string et = para[1];
|
|
//string containerno = para.containerno;
|
|
//string pallet = para.palletno;
|
|
//string lot = para.lotno;
|
|
string check = para[6];
|
|
string workshop = para[2];
|
|
|
|
string containerno_old = para[3];
|
|
string trim = Regex.Replace(containerno_old, @"\s", " ");
|
|
string container = "'" + trim.Replace(" ", "','") + "'";
|
|
|
|
string lot_old = para[4];
|
|
string trim1 = Regex.Replace(lot_old, @"\s", " ");
|
|
string lot = "'" + trim1.Replace(" ", "','") + "'";
|
|
|
|
string pallet_old = para[5];
|
|
string trim2 = Regex.Replace(pallet_old, @"\s", " ");
|
|
string pallet = "'" + trim2.Replace(" ", "','") + "'";
|
|
string workorder = para[7];
|
|
DataTable dt = new ReportService().PackOutputQueryInfo(workshop.ToUpper() == "Null" ? "" : workshop
|
|
, bt.ToUpper() == "Null" ? "" : bt
|
|
, et.ToUpper() == "Null" ? "" : et
|
|
, lot.ToUpper() == "Null" ? "" : lot
|
|
, container.ToUpper() == "Null" ? "" : container
|
|
, pallet.ToUpper() == "Null" ? "" : pallet
|
|
, check.ToUpper() == "Null" ? "" : check
|
|
, workorder.ToUpper() == "Null" ? "" : workorder);
|
|
int i = 0;
|
|
dt.Columns[i++].ColumnName = "柜号";
|
|
dt.Columns[i++].ColumnName = "托盘号";
|
|
dt.Columns[i++].ColumnName = "包装顺序";
|
|
dt.Columns[i++].ColumnName = "工单号";
|
|
dt.Columns[i++].ColumnName = "订单号";
|
|
dt.Columns[i++].ColumnName = "组件序列号";
|
|
dt.Columns[i++].ColumnName = "包装时间";
|
|
dt.Columns[i++].ColumnName = "测试日期时间";
|
|
dt.Columns[i++].ColumnName = "测试机台";
|
|
dt.Columns[i++].ColumnName = "功率档位";
|
|
dt.Columns[i++].ColumnName = "电流档位";
|
|
dt.Columns[i++].ColumnName = "外观等级";
|
|
dt.Columns[i++].ColumnName = "EL等级";
|
|
dt.Columns[i++].ColumnName = "最终等级";
|
|
dt.Columns[i++].ColumnName = "Pmax";
|
|
dt.Columns[i++].ColumnName = "FF";
|
|
dt.Columns[i++].ColumnName = "VOC";
|
|
dt.Columns[i++].ColumnName = "ISC";
|
|
dt.Columns[i++].ColumnName = "VPM";
|
|
dt.Columns[i++].ColumnName = "IPM";
|
|
dt.Columns[i++].ColumnName = "RS";
|
|
dt.Columns[i++].ColumnName = "RSH";
|
|
dt.Columns[i++].ColumnName = "EFF";
|
|
dt.Columns[i++].ColumnName = "ENV_TEMP";
|
|
dt.Columns[i++].ColumnName = "Tmod";
|
|
dt.Columns[i++].ColumnName = "电池片厂家";
|
|
dt.Columns[i++].ColumnName = "单片功率";
|
|
dt.Columns[i++].ColumnName = "电池片颜色";
|
|
dt.Columns[i++].ColumnName = "电池片等级";
|
|
dt.Columns[i++].ColumnName = "电池片类型";
|
|
dt.Columns[i++].ColumnName = "电池片效率档";
|
|
//dt.Columns[i++].ColumnName = "转换效率";
|
|
dt.Columns[i++].ColumnName = "托盘状态";
|
|
|
|
return ExportExcel(dt, "PackOutputReport");
|
|
}
|
|
|
|
|
|
//组件班组产量表
|
|
[Route("ShiftProductionExcel")]
|
|
[HttpPost]
|
|
public FileContentResult ShiftProductionExcel(List<string> para)
|
|
{
|
|
string workshop = para[0];
|
|
string begintime = para[1];
|
|
string endtime = para[2];
|
|
string station = para[3];
|
|
string wks_id = para[4];
|
|
string workorder = para[5];
|
|
DataTable dt = new ReportService().ShiftProduction(workshop.ToUpper() == "Null" ? "" : workshop
|
|
, begintime.ToUpper() == "Null" ? "" : begintime
|
|
, endtime.ToUpper() == "Null" ? "" : endtime
|
|
, station.ToUpper() == "Null" ? "" : station
|
|
, workorder.ToUpper() == "Null" ? "" : workorder);
|
|
int i = 0;
|
|
dt.Columns[i++].ColumnName = "柜号";
|
|
dt.Columns[i++].ColumnName = "托盘号";
|
|
dt.Columns[i++].ColumnName = "包装顺序";
|
|
dt.Columns[i++].ColumnName = "工单号";
|
|
dt.Columns[i++].ColumnName = "订单号";
|
|
dt.Columns[i++].ColumnName = "组件序列号";
|
|
dt.Columns[i++].ColumnName = "包装时间";
|
|
dt.Columns[i++].ColumnName = "测试日期时间";
|
|
dt.Columns[i++].ColumnName = "测试机台";
|
|
dt.Columns[i++].ColumnName = "功率档位";
|
|
dt.Columns[i++].ColumnName = "电流档位";
|
|
dt.Columns[i++].ColumnName = "外观等级";
|
|
dt.Columns[i++].ColumnName = "EL等级";
|
|
dt.Columns[i++].ColumnName = "最终等级";
|
|
dt.Columns[i++].ColumnName = "Pmax";
|
|
dt.Columns[i++].ColumnName = "FF";
|
|
dt.Columns[i++].ColumnName = "VOC";
|
|
dt.Columns[i++].ColumnName = "ISC";
|
|
dt.Columns[i++].ColumnName = "VPM";
|
|
dt.Columns[i++].ColumnName = "IPM";
|
|
dt.Columns[i++].ColumnName = "RS";
|
|
dt.Columns[i++].ColumnName = "RSH";
|
|
dt.Columns[i++].ColumnName = "EFF";
|
|
dt.Columns[i++].ColumnName = "ENV_TEMP";
|
|
dt.Columns[i++].ColumnName = "Tmod";
|
|
dt.Columns[i++].ColumnName = "电池片厂家";
|
|
dt.Columns[i++].ColumnName = "单片功率";
|
|
dt.Columns[i++].ColumnName = "电池片颜色";
|
|
dt.Columns[i++].ColumnName = "电池片等级";
|
|
dt.Columns[i++].ColumnName = "电池片类型";
|
|
dt.Columns[i++].ColumnName = "电池片效率档";
|
|
//dt.Columns[i++].ColumnName = "转换效率";
|
|
dt.Columns[i++].ColumnName = "托盘状态";
|
|
|
|
return ExportExcel(dt, "PackOutputReport");
|
|
}
|
|
|
|
|
|
// //包装产量报表导出excel(英利客户版本)
|
|
[Route("PackoutputDetailExcel")]
|
|
[HttpPost]
|
|
public FileContentResult PackOutputDetailExcel(List<string> para)
|
|
{
|
|
|
|
string bt = para[0];
|
|
string et = para[1];
|
|
//string containerno = para.containerno;
|
|
//string pallet = para.palletno;
|
|
//string lot = para.lotno;
|
|
string check = para[6];
|
|
string workshop = para[2];
|
|
|
|
string containerno_old = para[3];
|
|
string trim = Regex.Replace(containerno_old, @"\s", " ");
|
|
string container = "'" + trim.Replace(" ", "','") + "'";
|
|
|
|
string lot_old = para[4];
|
|
string trim1 = Regex.Replace(lot_old, @"\s", " ");
|
|
string lot = "'" + trim1.Replace(" ", "','") + "'";
|
|
|
|
string pallet_old = para[5];
|
|
string trim2 = Regex.Replace(pallet_old, @"\s", " ");
|
|
string pallet = "'" + trim2.Replace(" ", "','") + "'";
|
|
string workorder = para[7];
|
|
DataTable dt = new ReportService().PackOutputDetailQueryInfo(workshop.ToUpper() == "Null" ? "" : workshop
|
|
, bt.ToUpper() == "Null" ? "" : bt
|
|
, et.ToUpper() == "Null" ? "" : et
|
|
, lot.ToUpper() == "Null" ? "" : lot
|
|
, container.ToUpper() == "Null" ? "" : container
|
|
, pallet.ToUpper() == "Null" ? "" : pallet
|
|
, check.ToUpper() == "Null" ? "" : check
|
|
, workorder.ToUpper() == "Null" ? "" : workorder);
|
|
int i = 0;
|
|
dt.Columns[i++].ColumnName = "托盘号";
|
|
dt.Columns[i++].ColumnName = "组件序列号";
|
|
dt.Columns[i++].ColumnName = "VOC";
|
|
dt.Columns[i++].ColumnName = "ISC";
|
|
dt.Columns[i++].ColumnName = "Pmax";
|
|
dt.Columns[i++].ColumnName = "VPM";
|
|
dt.Columns[i++].ColumnName = "IPM";
|
|
dt.Columns[i++].ColumnName = "FF";
|
|
dt.Columns[i++].ColumnName = "测试日期时间";
|
|
return ExportExcel(dt, "PackOutputDetailReport");
|
|
}
|
|
/// <summary>
|
|
/// 库存报表excel导出
|
|
/// </summary>
|
|
/// <param name="para"></param>
|
|
/// <returns></returns>
|
|
[Route("InventoryReportExcel")]
|
|
[HttpPost]
|
|
public FileContentResult InventoryReportExcel(List<string> para)
|
|
{
|
|
string locationname = para[1];
|
|
string name = para[0];
|
|
//仓库 库位号 客户订单 功率/W 栅数 铭牌型号 单托/片 托数 合计块数 合计MW 型 材 接线盒类型 等 级 柜 号
|
|
DataTable dt = new ReportService().InventoryDT(locationname,name);
|
|
dt.Columns[0].ColumnName = "仓库";
|
|
dt.Columns[1].ColumnName = "库位号";
|
|
dt.Columns[2].ColumnName = "类型";
|
|
dt.Columns[3].ColumnName = "客户订单";
|
|
dt.Columns[4].ColumnName = "功率/W";
|
|
dt.Columns[5].ColumnName = "栅数";
|
|
dt.Columns[6].ColumnName = "铭牌型号";
|
|
dt.Columns[7].ColumnName = "单拖/片";
|
|
dt.Columns[8].ColumnName = "托数";
|
|
dt.Columns[9].ColumnName = "合计块数";
|
|
dt.Columns[10].ColumnName = "合计MW";
|
|
dt.Columns[11].ColumnName = "型材";
|
|
dt.Columns[12].ColumnName = "接线盒类型";
|
|
dt.Columns[13].ColumnName = "等级";
|
|
dt.Columns[14].ColumnName = "柜号";
|
|
return ExportExcel(dt, "InventoryReport");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// 库存JY报表excel导出
|
|
/// </summary>
|
|
/// <param name="para"></param>
|
|
/// <returns></returns>
|
|
[Route("InventoryJYReportExcel")]
|
|
[HttpPost]
|
|
public FileContentResult InventoryJYReportExcel(List<string> para)
|
|
{
|
|
string locationname = para[1];
|
|
string name = para[0];
|
|
//仓库 库位号 客户订单 功率/W 栅数 铭牌型号 单托/片 托数 合计块数 合计MW 型 材 接线盒类型 等 级 柜 号
|
|
DataTable dt = new ReportService().InventoryJYDT(locationname, name);
|
|
dt.Columns[0].ColumnName = "仓库";
|
|
dt.Columns[1].ColumnName = "库位号";
|
|
dt.Columns[2].ColumnName = "客户订单";
|
|
dt.Columns[3].ColumnName = "柜号";
|
|
dt.Columns[4].ColumnName = "拼柜状态";
|
|
dt.Columns[5].ColumnName = "功率档";
|
|
dt.Columns[6].ColumnName = "栅数";
|
|
dt.Columns[7].ColumnName = "产品类型";
|
|
dt.Columns[8].ColumnName = "组件数量";
|
|
dt.Columns[9].ColumnName = "合计MW";
|
|
dt.Columns[10].ColumnName = "型材";
|
|
dt.Columns[11].ColumnName = "接线盒类型";
|
|
dt.Columns[12].ColumnName = "等级";
|
|
dt.Columns[13].ColumnName = "报检状态";
|
|
return ExportExcel(dt, "InventoryJYReport");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
|
|
#region 库存详细
|
|
[Route("InventoryDetailedJYExcel")]
|
|
[HttpPost]
|
|
public FileContentResult InventoryDetailedJYExcel(List<string> para)
|
|
{
|
|
|
|
string locationname = para[0];
|
|
string name = para[1];
|
|
//string containerno = para.containerno;
|
|
//string pallet = para.palletno;
|
|
//string lot = para.lotno;
|
|
//string check = para[6];
|
|
//string workshop = para[2];
|
|
|
|
//string containerno_old = para[3];
|
|
//string trim = Regex.Replace(containerno_old, @"\s", " ");
|
|
//string container = "'" + trim.Replace(" ", "','") + "'";
|
|
|
|
//string lot_old = para[4];
|
|
//string trim1 = Regex.Replace(lot_old, @"\s", " ");
|
|
//string lot = "'" + trim1.Replace(" ", "','") + "'";
|
|
|
|
//string pallet_old = para[5];
|
|
//string trim2 = Regex.Replace(pallet_old, @"\s", " ");
|
|
//string pallet = "'" + trim2.Replace(" ", "','") + "'";
|
|
//locationname,name
|
|
DataTable dt = new ReportService().InventoryDetailedJYDT(locationname.ToUpper() == "Null" ? "" : locationname
|
|
, name.ToUpper() == "Null" ? "" : name);
|
|
dt.Columns[0].ColumnName = "托盘号";
|
|
dt.Columns[1].ColumnName = "柜号";
|
|
dt.Columns[2].ColumnName = "组件序列号";
|
|
dt.Columns[3].ColumnName = "工单号";
|
|
dt.Columns[4].ColumnName = "功率档位";
|
|
dt.Columns[5].ColumnName = "电流档位";
|
|
dt.Columns[6].ColumnName = "装配件号";
|
|
dt.Columns[7].ColumnName = "EL等级";
|
|
dt.Columns[8].ColumnName = "外观等级";
|
|
dt.Columns[9].ColumnName = "封箱时间";
|
|
dt.Columns[10].ColumnName = "功率组";
|
|
dt.Columns[11].ColumnName = "是否入库";
|
|
dt.Columns[12].ColumnName = "班次";
|
|
dt.Columns[13].ColumnName = "Pmax";
|
|
dt.Columns[14].ColumnName = "VOC";
|
|
dt.Columns[15].ColumnName = "ISC";
|
|
dt.Columns[16].ColumnName = "FF";
|
|
dt.Columns[17].ColumnName = "VPM";
|
|
dt.Columns[18].ColumnName = "IPM";
|
|
dt.Columns[19].ColumnName = "RS";
|
|
dt.Columns[20].ColumnName = "RSH";
|
|
dt.Columns[21].ColumnName = "RSH";
|
|
dt.Columns[22].ColumnName = "EFF";
|
|
dt.Columns[23].ColumnName = "ENV_TEMP";
|
|
dt.Columns[24].ColumnName = "SURF_TEMP";
|
|
dt.Columns[25].ColumnName = "TEMP";
|
|
dt.Columns[26].ColumnName = "IVFILE_PATH";
|
|
dt.Columns[27].ColumnName = "包装顺序";
|
|
dt.Columns[28].ColumnName = "报检单号";
|
|
dt.Columns[29].ColumnName = "电池片厂商";
|
|
dt.Columns[30].ColumnName = "电池片档位";
|
|
dt.Columns[31].ColumnName = "单片功率";
|
|
dt.Columns[32].ColumnName = "转换效率";
|
|
dt.Columns[33].ColumnName = "EVA厂商";
|
|
dt.Columns[34].ColumnName = "普通EVA规格";
|
|
dt.Columns[35].ColumnName = "普通EVA批号";
|
|
dt.Columns[36].ColumnName = "背板厂商";
|
|
dt.Columns[37].ColumnName = "背板规格";
|
|
dt.Columns[38].ColumnName = "背板批号";
|
|
dt.Columns[39].ColumnName = "玻璃供应商";
|
|
dt.Columns[40].ColumnName = "玻璃规格";
|
|
dt.Columns[41].ColumnName = "玻璃批号";
|
|
dt.Columns[42].ColumnName = "接线盒供应商";
|
|
dt.Columns[43].ColumnName = "接线盒规格";
|
|
dt.Columns[44].ColumnName = "接线盒批号";
|
|
dt.Columns[45].ColumnName = "型材供应商";
|
|
dt.Columns[46].ColumnName = "型材规格";
|
|
dt.Columns[47].ColumnName = "型材批号";
|
|
dt.Columns[48].ColumnName = "客户";
|
|
dt.Columns[49].ColumnName = "产品组";
|
|
//dt.Columns[49].ColumnName = "批次料号";
|
|
dt.Columns[50].ColumnName = "测试时间";
|
|
|
|
return ExportExcel(dt, "InventoryDetailed");
|
|
}
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// 入库报表excel导出
|
|
/// </summary>
|
|
/// <param name="para"></param>
|
|
/// <returns></returns>
|
|
[Route("StorageReportExcel")]
|
|
[HttpPost]
|
|
public FileContentResult StorageReportExcel(List<string> para)
|
|
{
|
|
string bt = para[0];
|
|
string et = para[1];
|
|
string name = para[2];
|
|
string locationname = para[3];
|
|
string final_grade = para[4];
|
|
string power_grade = para[5];
|
|
string containerno_old = para[6];
|
|
string trim = Regex.Replace(containerno_old, @"\s", " ");
|
|
string containerno = "'" + trim.Replace(" ", "','") + "'";
|
|
|
|
string palletno_old = para[7];
|
|
string trim1 = Regex.Replace(palletno_old, @"\s", " ");
|
|
string palletno = "'" + trim1.Replace(" ", "','") + "'";
|
|
string workorder = para[8];
|
|
string saleorder = para[9];
|
|
string area_code = para[10];
|
|
string serial = para[11];
|
|
if (containerno.ToUpper() == "NULL")
|
|
containerno = "";
|
|
if (palletno.ToUpper() == "NULL")
|
|
palletno = "";
|
|
if (bt.ToUpper() == "UNDEFINED")
|
|
bt = "";
|
|
if (et.ToUpper() == "UNDEFINED")
|
|
et = "";
|
|
if (area_code.ToUpper() == "NULL")
|
|
area_code = "";
|
|
if (saleorder.ToUpper() == "UNDEFINED")
|
|
saleorder = "";
|
|
//日期 仓库 库位 订单 柜号 托盘号 铭牌类型 功率分档 栅数 入库数量 等级 组件尺寸 接线盒类型 组件所属部门
|
|
DataTable dt = new ReportService().StorageDT(bt, et, name, locationname, containerno, palletno, final_grade, power_grade,workorder,saleorder,area_code,serial);
|
|
dt.Columns[0].ColumnName = "序号";
|
|
dt.Columns[1].ColumnName = "入库时间";
|
|
dt.Columns[2].ColumnName = "仓库";
|
|
dt.Columns[3].ColumnName = "库位";
|
|
dt.Columns[4].ColumnName = "订单";
|
|
dt.Columns[5].ColumnName = "工单";
|
|
dt.Columns[6].ColumnName = "柜号";
|
|
dt.Columns[7].ColumnName = "托盘号";
|
|
dt.Columns[8].ColumnName = "组件序列号";
|
|
dt.Columns[9].ColumnName = "开路电压Voc(V)";
|
|
dt.Columns[10].ColumnName = "短路电流Isc(A)";
|
|
dt.Columns[11].ColumnName = "工作电压Vpm(V)";
|
|
dt.Columns[12].ColumnName = "工作电流Ipm(A)";
|
|
dt.Columns[13].ColumnName = "实测功率Pmp(W)";
|
|
dt.Columns[14].ColumnName = "填充因子FF";
|
|
dt.Columns[15].ColumnName = "电流档";
|
|
dt.Columns[16].ColumnName = "产品类型";
|
|
dt.Columns[17].ColumnName = "功率档";
|
|
dt.Columns[18].ColumnName = "栅数";
|
|
//dt.Columns[19].ColumnName = "入库数量";
|
|
dt.Columns[19].ColumnName = "等级";
|
|
dt.Columns[20].ColumnName = "组件尺寸";
|
|
dt.Columns[21].ColumnName = "接线盒类型";
|
|
dt.Columns[22].ColumnName = "托盘状态";
|
|
dt.Columns[23].ColumnName = "组件所属部门";
|
|
return ExportExcel(dt, "StorageReport");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 入库报表excel导出
|
|
/// </summary>
|
|
/// <param name="para"></param>
|
|
/// <returns></returns>
|
|
[Route("StoreIssueExcel")]
|
|
[HttpPost]
|
|
public FileContentResult StoreIssueExcel(List<string> para)
|
|
{
|
|
string bt = para[0];
|
|
string et = para[1];
|
|
string part_nbr = para[2];
|
|
string workorder = para[3];
|
|
string lot_nbr = para[4];
|
|
if (bt.ToUpper() == "UNDEFINED")
|
|
bt = "";
|
|
if (et.ToUpper() == "UNDEFINED")
|
|
et = "";
|
|
//日期 仓库 库位 订单 柜号 托盘号 铭牌类型 功率分档 栅数 入库数量 等级 组件尺寸 接线盒类型 组件所属部门
|
|
DataTable dt = new ReportService().StoreIssueDT(bt, et, part_nbr, workorder, lot_nbr);
|
|
dt.Columns[0].ColumnName = "日期";
|
|
dt.Columns[1].ColumnName = "部门";
|
|
dt.Columns[2].ColumnName = "工单号";
|
|
dt.Columns[3].ColumnName = "客户名称";
|
|
dt.Columns[4].ColumnName = "料号";
|
|
dt.Columns[5].ColumnName = "存货规格";
|
|
dt.Columns[6].ColumnName = "批号";
|
|
dt.Columns[7].ColumnName = "上期结存";
|
|
dt.Columns[8].ColumnName = "发出数量";
|
|
dt.Columns[9].ColumnName = "订单消耗数量";
|
|
dt.Columns[10].ColumnName = "现场结余";
|
|
return ExportExcel(dt, "StoreIssue");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 材料追溯excel导出
|
|
/// </summary>
|
|
/// <param name="para"></param>
|
|
/// <returns></returns>
|
|
[Route("MaterialTraceabilityExcel")]
|
|
[HttpPost]
|
|
public FileContentResult MaterialTraceabilityExcel(List<string> para)
|
|
{
|
|
string lot_nbr = para[0];
|
|
string orig_batch_nbr = para[1];
|
|
string serial_nbr = para[2];
|
|
string bt = para[3];
|
|
string et = para[4];
|
|
string wks_desc = para[5];
|
|
string area_code = para[6];
|
|
//序列 子批次 母批次 组件序列号 组件等级 组件站点 组件托盘号 组件柜号 是否入库 是否出货
|
|
DataTable dt = new ReportService().MaterialTraceabilityDT(lot_nbr, orig_batch_nbr, serial_nbr,bt,et,wks_desc,area_code);
|
|
dt.Columns[0].ColumnName = "序号";
|
|
dt.Columns[1].ColumnName = "物料类别";
|
|
dt.Columns[2].ColumnName = "供应商批次号";
|
|
dt.Columns[3].ColumnName = "子批次";
|
|
dt.Columns[4].ColumnName = "母批次";
|
|
dt.Columns[5].ColumnName = "组件序列号";
|
|
dt.Columns[6].ColumnName = "站点机台";
|
|
dt.Columns[7].ColumnName = "组件等级";
|
|
dt.Columns[8].ColumnName = "组件站点";
|
|
dt.Columns[9].ColumnName = "组件托盘号";
|
|
dt.Columns[10].ColumnName = "组件柜号";
|
|
dt.Columns[11].ColumnName = "是否入库";
|
|
dt.Columns[12].ColumnName = "是否出货";
|
|
dt.Columns[13].ColumnName = "过站时间";
|
|
return ExportExcel(dt, "MaterialTraceability");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// CTMexcel导出
|
|
/// </summary>
|
|
/// <param name="para"></param>
|
|
/// <returns></returns>
|
|
[Route("FinalTestRoomDataExcel")]
|
|
[HttpPost]
|
|
public FileContentResult FinalTestRoomDataExcel(List<string> para)
|
|
{
|
|
string bt = para[0];
|
|
string et = para[1];
|
|
string workshop = para[2];
|
|
string workorder = para[3];
|
|
//工单 片源 额定功率 平均功率 CTM 数量
|
|
DataTable dt = new ReportService().FinalTestRoomDataDT( bt, et, workshop, workorder);
|
|
dt.Columns[0].ColumnName = "工单";
|
|
dt.Columns[1].ColumnName = "片源";
|
|
dt.Columns[2].ColumnName = "额定功率";
|
|
dt.Columns[3].ColumnName = "平均功率";
|
|
dt.Columns[4].ColumnName = "CTM";
|
|
dt.Columns[5].ColumnName = "数量";
|
|
//dt.Columns[6].ColumnName = "组件站点";
|
|
//dt.Columns[7].ColumnName = "组件托盘号";
|
|
//dt.Columns[8].ColumnName = "组件柜号";
|
|
//dt.Columns[9].ColumnName = "是否入库";
|
|
//dt.Columns[10].ColumnName = "是否出货";
|
|
return ExportExcel(dt, "FinalTestRoomData");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
|
|
/// <summary>
|
|
/// 工单条码报表excel导出
|
|
/// </summary>
|
|
/// <param name="para"></param>
|
|
/// <returns></returns>
|
|
#region 工单条码登记(原始版)
|
|
[Route("WorkLot2Excel")]
|
|
[HttpPost]
|
|
public FileContentResult WorkLot2Excel(List<string> para)
|
|
{
|
|
string bt = para[0];
|
|
string et = para[1];
|
|
string workshop = para[2];
|
|
string sale_order = para[3];
|
|
string workorder = para[4];
|
|
if (bt.ToUpper() == "UNDEFINED")
|
|
bt = "";
|
|
if (et.ToUpper() == "UNDEFINED")
|
|
et = "";
|
|
//序列 子批次 母批次 组件序列号 组件等级 组件站点 组件托盘号 组件柜号 是否入库 是否出货
|
|
DataTable dt = new ReportService().WorkLotDT(bt, et, workshop,sale_order, workorder);
|
|
dt.Columns[0].ColumnName = "订单";
|
|
dt.Columns[1].ColumnName = "工单";
|
|
dt.Columns[2].ColumnName = "生码日期";
|
|
dt.Columns[3].ColumnName = "工单创建时间";
|
|
dt.Columns[4].ColumnName = "投产数量";
|
|
dt.Columns[5].ColumnName = "生码数量";
|
|
dt.Columns[6].ColumnName = "剩余数量";
|
|
dt.Columns[7].ColumnName = "客户";
|
|
dt.Columns[8].ColumnName = "产品族";
|
|
dt.Columns[9].ColumnName = "产生条码段号";
|
|
//dt.Columns[7].ColumnName = "产生条码段号";
|
|
//dt.Columns[8].ColumnName = "是否入库";
|
|
//dt.Columns[9].ColumnName = "是否出货";
|
|
return ExportExcel(dt, "WorkLot");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region 工单条码登记(山东客户)
|
|
[Route("WorkLotExcel")]
|
|
[HttpPost]
|
|
public FileContentResult WorkLotExcel(List<string> para)
|
|
{
|
|
string bt = para[0];
|
|
string et = para[1];
|
|
string workshop = para[2];
|
|
string sale_order = para[3];
|
|
string workorder = para[4];
|
|
if (bt.ToUpper() == "UNDEFINED")
|
|
bt = "";
|
|
if (et.ToUpper() == "UNDEFINED")
|
|
et = "";
|
|
if (workshop == "null")
|
|
workshop = "";
|
|
//序列 子批次 母批次 组件序列号 组件等级 组件站点 组件托盘号 组件柜号 是否入库 是否出货
|
|
DataTable dt = new ReportService().WorkLotDT(bt, et, workshop, sale_order, workorder);
|
|
dt.Columns[0].ColumnName = "车间";
|
|
dt.Columns[1].ColumnName = "订单号";
|
|
dt.Columns[2].ColumnName = "工单号";
|
|
dt.Columns[3].ColumnName = "工单总数量";
|
|
dt.Columns[4].ColumnName = "生码数量";
|
|
dt.Columns[5].ColumnName = "起始序列号";
|
|
dt.Columns[6].ColumnName = "最终序列号";
|
|
dt.Columns[7].ColumnName = "客户";
|
|
dt.Columns[8].ColumnName = "生码时间";
|
|
dt.Columns[9].ColumnName = "工单创建时间";
|
|
dt.Columns[10].ColumnName = "产品族";
|
|
|
|
//dt.Columns[7].ColumnName = "产生条码段号";
|
|
//dt.Columns[8].ColumnName = "是否入库";
|
|
//dt.Columns[9].ColumnName = "是否出货";
|
|
return ExportExcel(dt, "WorkLot");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
#endregion
|
|
|
|
#region 条码管理及优质品率
|
|
[Route("BarCodeAndQualityRateExcel")]
|
|
[HttpPost]
|
|
public FileContentResult BarCodeAndQualityRateExcel(List<string> para)
|
|
{
|
|
string sale_order = para[0];
|
|
string workorder = para[1];
|
|
string station = para[2];
|
|
// 车间 订单号 客户 工单号 客户订单数量 实际投产 优质率 Q0 Q1 Q2 Q3 B 报废
|
|
DataTable dt = new ReportService().BarCodeAndQualityRateDT(sale_order, workorder,station);
|
|
dt.Columns[0].ColumnName = "车间";
|
|
dt.Columns[1].ColumnName = "订单号";
|
|
dt.Columns[2].ColumnName = "客户";
|
|
dt.Columns[3].ColumnName = "工单号";
|
|
dt.Columns[4].ColumnName = "客户订单数量";
|
|
dt.Columns[5].ColumnName = "生码数量";
|
|
dt.Columns[6].ColumnName = "站点总数";
|
|
dt.Columns[7].ColumnName = "优质率";
|
|
//dt.Columns[8].ColumnName = "A";
|
|
//dt.Columns[9].ColumnName = "A1";
|
|
//dt.Columns[10].ColumnName = "A2";
|
|
//dt.Columns[7].ColumnName = "Q0";
|
|
//dt.Columns[8].ColumnName = "Q1";
|
|
//dt.Columns[9].ColumnName = "Q2";
|
|
//dt.Columns[10].ColumnName = "Q3";
|
|
//dt.Columns[11].ColumnName = "B";
|
|
dt.Columns[13].ColumnName = "报废";
|
|
return ExportExcel(dt, "BarCodeAndQualityRate");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region 结批率
|
|
[Route("BatchRateExcel")]
|
|
[HttpPost]
|
|
public FileContentResult BatchRateExcel(List<string> para)
|
|
{
|
|
string sale_order = para[0];
|
|
string workorder = para[1];
|
|
string workshop = para[2];
|
|
// 车间 订单号 客户 层压 装框 清洗 包装 入库率 工单开始时间 工单要求完成时间 实际结单时间
|
|
DataTable dt = new ReportService().BatchRateDT(sale_order, workorder,workshop);
|
|
int i = 0;
|
|
dt.Columns[i++].ColumnName = "车间";
|
|
dt.Columns[i++].ColumnName = "订单号";
|
|
dt.Columns[i++].ColumnName = "客户";
|
|
dt.Columns[i++].ColumnName = "工单号";
|
|
dt.Columns[i++].ColumnName = "客户订单数量";
|
|
dt.Columns[i++].ColumnName = "实际投产";
|
|
dt.Columns[i++].ColumnName = "入库数量";
|
|
dt.Columns[i++].ColumnName = "组件报废";
|
|
dt.Columns[i++].ColumnName = "条码报废";
|
|
dt.Columns[i++].ColumnName = "生码";
|
|
dt.Columns[i++].ColumnName = "焊接";
|
|
dt.Columns[i++].ColumnName = "叠层";
|
|
dt.Columns[i++].ColumnName = "层压";
|
|
dt.Columns[i++].ColumnName = "层压后检验";
|
|
dt.Columns[i++].ColumnName = "装框";
|
|
dt.Columns[i++].ColumnName = "清洗";
|
|
dt.Columns[i++].ColumnName = "全检";
|
|
dt.Columns[i++].ColumnName = "包装";
|
|
dt.Columns[i++].ColumnName = "入库率";
|
|
dt.Columns[i++].ColumnName = "工单开始时间";
|
|
dt.Columns[i++].ColumnName = "工单完成时间";
|
|
dt.Columns[i++].ColumnName = "实际结单时间";
|
|
return ExportExcel(dt, "BatchRate");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
#endregion
|
|
|
|
#region 结批率详细导出
|
|
[Route("PopoutDataExcel")]
|
|
[HttpPost]
|
|
public FileContentResult PopoutDataExcel(List<string> para)
|
|
{
|
|
string workshop = para[0];
|
|
string workorder = para[1];
|
|
string field = para[2];
|
|
// 车间 订单号 客户 层压 装框 清洗 包装 入库率 工单开始时间 工单要求完成时间 实际结单时间
|
|
DataTable dt = new ReportService().PopoutDataDT(workshop, workorder, field);
|
|
dt.Columns[0].ColumnName = "订单";
|
|
dt.Columns[1].ColumnName = "工单";
|
|
dt.Columns[2].ColumnName = "组件序列号";
|
|
dt.Columns[3].ColumnName = "当前站点";
|
|
dt.Columns[4].ColumnName = "等级";
|
|
return ExportExcel(dt, "PopoutData");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
#endregion
|
|
|
|
#region 各站点数详情导出
|
|
[Route("StationDataExcel")]
|
|
[HttpPost]
|
|
public FileContentResult StationDataExcel(List<string> para)
|
|
{
|
|
string workshop = para[0];
|
|
string workorder = para[1];
|
|
string saleorder = para[2];
|
|
string station = para[3];
|
|
//string wksid = para[4];
|
|
string bt = para[4];
|
|
string et = para[5];
|
|
string field = para[6];
|
|
string worktime = para[7];
|
|
if (worktime.ToUpper() == "NULL")
|
|
{
|
|
worktime = "";
|
|
}
|
|
// 车间 订单号 客户 层压 装框 清洗 包装 入库率 工单开始时间 工单要求完成时间 实际结单时间
|
|
DataTable dt = new ReportService().ProduincStationDT(workshop, workorder, saleorder, station,bt, et, field,worktime);
|
|
dt.Columns[0].ColumnName = "站点";
|
|
dt.Columns[1].ColumnName = "组件序列号";
|
|
dt.Columns[2].ColumnName = "操作人员";
|
|
dt.Columns[3].ColumnName = "班次";
|
|
dt.Columns[4].ColumnName = "设备";
|
|
dt.Columns[5].ColumnName = "工单";
|
|
dt.Columns[6].ColumnName = "订单";
|
|
dt.Columns[7].ColumnName = "过站时间";
|
|
return ExportExcel(dt, "StationData");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
#endregion
|
|
|
|
#region 站点产能详情导出
|
|
[Route("ShiftDataExcel")]
|
|
[HttpPost]
|
|
public FileContentResult ShiftDataExcel(List<string> para)
|
|
{
|
|
string workshop = para[0];
|
|
string workorder = para[1];
|
|
|
|
string station = para[2];
|
|
//string wksid = para[4];
|
|
string bt = para[3];
|
|
string et = para[4];
|
|
string type = para[5];
|
|
string mod = para[6];
|
|
if (station.ToUpper() == "NULL")
|
|
{
|
|
station = "";
|
|
}
|
|
// 车间 订单号 客户 层压 装框 清洗 包装 入库率 工单开始时间 工单要求完成时间 实际结单时间
|
|
DataTable dt = new ReportService().ShiftProductionDT(workshop, bt,et,station, workorder, type,mod);
|
|
dt.Columns[0].ColumnName = "车间";
|
|
dt.Columns[1].ColumnName = "班组";
|
|
dt.Columns[2].ColumnName = "序列号";
|
|
dt.Columns[3].ColumnName = "版型";
|
|
dt.Columns[4].ColumnName = "站点";
|
|
dt.Columns[5].ColumnName = "机台号";
|
|
dt.Columns[6].ColumnName = "过站时间";
|
|
dt.Columns[7].ColumnName = "工单号";
|
|
dt.Columns[8].ColumnName = "产品型号";
|
|
dt.Columns[9].ColumnName = "批号";
|
|
dt.Columns[10].ColumnName = "供应商编号";
|
|
dt.Columns[11].ColumnName = "供应商名称";
|
|
dt.Columns[12].ColumnName = "最终等级";
|
|
return ExportExcel(dt, "ShiftData");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
#endregion
|
|
|
|
#region 各站点机台过站数详情导出
|
|
[Route("WksDataExcel")]
|
|
[HttpPost]
|
|
public FileContentResult WksDataExcel(List<string> para)
|
|
{
|
|
string workshop = para[0];
|
|
string workorder = para[1];
|
|
string saleorder = para[2];
|
|
string station = para[3];
|
|
string wksid = para[4];
|
|
string bt = para[5];
|
|
string et = para[6];
|
|
string field = para[7];
|
|
string worktime = para[8];
|
|
// 车间 订单号 客户 层压 装框 清洗 包装 入库率 工单开始时间 工单要求完成时间 实际结单时间
|
|
DataTable dt = new ReportService().ProduincDT(workshop, workorder, saleorder, station,wksid, bt, et, field,worktime);
|
|
dt.Columns[0].ColumnName = "组件序列号";
|
|
dt.Columns[1].ColumnName = "操作人员";
|
|
dt.Columns[2].ColumnName = "班次";
|
|
dt.Columns[3].ColumnName = "过站时间";
|
|
return ExportExcel(dt, "WksData");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region 线边仓物料损耗
|
|
[Route("SuppliesConsumedExcel")]
|
|
[HttpPost]
|
|
public FileContentResult SuppliesConsumedExcel(List<string> para)
|
|
{
|
|
string sale_order = para[0];
|
|
string workorder = para[1];
|
|
string station = para[2];
|
|
// 订单号 组件数量 工单 物料名称 单位 料号 规格 *母批次号* 单耗
|
|
//核定用量 损耗率 损耗用量 标准用量 仓库实发量 产线领用量 订单结余量 超出/结约 报废物料
|
|
DataTable dt = new ReportService().SuppliesConsumedDT(sale_order, workorder,station);
|
|
dt.Columns[0].ColumnName = "车间";
|
|
dt.Columns[1].ColumnName = "OEM客户";
|
|
dt.Columns[2].ColumnName = "工单";
|
|
dt.Columns[3].ColumnName = "料号";
|
|
dt.Columns[4].ColumnName = "物料类别";
|
|
dt.Columns[5].ColumnName = "描述";
|
|
dt.Columns[6].ColumnName = "是否主料";
|
|
dt.Columns[7].ColumnName = "主料号";
|
|
dt.Columns[8].ColumnName = "单耗";
|
|
dt.Columns[9].ColumnName = "单位";
|
|
dt.Columns[10].ColumnName = "来料批号";
|
|
dt.Columns[11].ColumnName = "上期结存";
|
|
dt.Columns[12].ColumnName = "实发数量";
|
|
dt.Columns[13].ColumnName = "工序消耗量";
|
|
dt.Columns[14].ColumnName = "来料不良";
|
|
dt.Columns[15].ColumnName = "制程不良";
|
|
dt.Columns[16].ColumnName = "报废不良";
|
|
dt.Columns[17].ColumnName = "现场结余";
|
|
return ExportExcel(dt, "SuppliesConsumed");
|
|
|
|
|
|
}
|
|
#endregion
|
|
|
|
#region 原料线边仓报表
|
|
[Route("LinePositionsExcel")]
|
|
[HttpPost]
|
|
public FileContentResult LinePositionsExcel(List<string> para)
|
|
{
|
|
string sale_order = para[0];
|
|
string workorder = para[1];
|
|
// 订单号 组件数量 工单 物料名称 单位 料号 规格 *母批次号* 单耗
|
|
//核定用量 损耗率 损耗用量 标准用量 仓库实发量 产线领用量 订单结余量 超出/结约 报废物料
|
|
DataTable dt = new ReportService().LinePositionsDT(sale_order, workorder);
|
|
dt.Columns[0].ColumnName = "订单号";
|
|
dt.Columns[1].ColumnName = "组件数量";
|
|
dt.Columns[2].ColumnName = "工单";
|
|
dt.Columns[3].ColumnName = "物料名称";
|
|
dt.Columns[4].ColumnName = "单位";
|
|
dt.Columns[5].ColumnName = "料号";
|
|
dt.Columns[6].ColumnName = "规格";
|
|
dt.Columns[7].ColumnName = "单耗";
|
|
dt.Columns[8].ColumnName = "核定用量";
|
|
dt.Columns[9].ColumnName = "损耗率";
|
|
dt.Columns[10].ColumnName = "损耗用量";
|
|
dt.Columns[11].ColumnName = "标准用量";
|
|
dt.Columns[12].ColumnName = "仓库实发量";
|
|
dt.Columns[13].ColumnName = "产线领用量";
|
|
dt.Columns[14].ColumnName = "订单结余量";
|
|
dt.Columns[15].ColumnName = "超出/结约";
|
|
dt.Columns[16].ColumnName = "报废物料";
|
|
return ExportExcel(dt, "LinePositions");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
#endregion
|
|
|
|
#region 成品线边仓导出
|
|
[Route("FinishProductLinePositionsExcel")]
|
|
[HttpPost]
|
|
public FileContentResult FinishProductLinePositionsExcel(List<string> para)
|
|
{
|
|
string area_code = para[0];
|
|
string saleorder = para[1];
|
|
string status = para[2];
|
|
string WorkOrder = para[3];
|
|
string Container = para[4];
|
|
string Palletnbr = para[5];
|
|
string Serialnbr = para[6];
|
|
// 车间 焊接机台 来料批号 供应商 电池片类型 栅数 单片功率 来料数量 封装片数 来料 串返修 叠返修 不良率
|
|
DataTable dt = new ReportService().FinishProductLinePositionsDT(area_code, saleorder, status, WorkOrder, Container, Palletnbr, Serialnbr);
|
|
dt.Columns[0].ColumnName = "车间";
|
|
dt.Columns[1].ColumnName = "订单";
|
|
dt.Columns[2].ColumnName = "托盘号";
|
|
dt.Columns[3].ColumnName = "序列号";
|
|
dt.Columns[4].ColumnName = "功率档";
|
|
dt.Columns[5].ColumnName = "栅数";
|
|
dt.Columns[6].ColumnName = "产品类型";
|
|
dt.Columns[7].ColumnName = "型材";
|
|
dt.Columns[8].ColumnName = "接线盒";
|
|
dt.Columns[9].ColumnName = "电流档";
|
|
dt.Columns[10].ColumnName = "等级";
|
|
dt.Columns[11].ColumnName = "柜号";
|
|
dt.Columns[12].ColumnName = "报检状态";
|
|
return ExportExcel(dt, "FinishProductLinePositions");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
#endregion
|
|
|
|
#region 电池片结批率
|
|
[Route("CellBatchRateExcel")]
|
|
[HttpPost]
|
|
public FileContentResult CellBatchRateExcel(List<string> para)
|
|
{
|
|
string sale_order = para[0];
|
|
string workorder = para[1];
|
|
string area_code = para[2];
|
|
// 车间 焊接机台 来料批号 供应商 电池片类型 栅数 单片功率 来料数量 封装片数 来料 串返修 叠返修 不良率
|
|
DataTable dt = new ReportService().CellBatchRateDT(sale_order, workorder,area_code);
|
|
dt.Columns[0].ColumnName = "车间";
|
|
dt.Columns[1].ColumnName = "焊接机台";
|
|
dt.Columns[2].ColumnName = "来料批号";
|
|
dt.Columns[3].ColumnName = "供应商";
|
|
dt.Columns[4].ColumnName = "电池片类型";
|
|
dt.Columns[5].ColumnName = "栅数";
|
|
dt.Columns[6].ColumnName = "单片功率";
|
|
dt.Columns[7].ColumnName = "实发数量";
|
|
dt.Columns[8].ColumnName = "封装片数";
|
|
dt.Columns[9].ColumnName = "来料";
|
|
dt.Columns[10].ColumnName = "串返修";
|
|
dt.Columns[11].ColumnName = "叠返修";
|
|
dt.Columns[12].ColumnName = "不良率";
|
|
return ExportExcel(dt, "CellBatchRate");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// 永臻晶科报表excel导出
|
|
/// </summary>
|
|
/// <param name="para"></param>
|
|
/// <returns></returns>
|
|
[Route("YongzhenJinkeExcel")]
|
|
[HttpPost]
|
|
public FileContentResult YongzhenJinkeExcel(List<string> para)
|
|
{
|
|
string bt = para[0];
|
|
string et = para[1];
|
|
string PalletLot = para[2];
|
|
//string sale_order = para[2];
|
|
//string workorder = para[3];
|
|
//不良位置 换片数量 操作人 操作人姓名 备注 分选时间 焊接机 叠层机
|
|
DataTable dt = new ReportService().YongzhenJinkeDT(bt, et,PalletLot);
|
|
|
|
dt.Columns[0].ColumnName = "TTIME";
|
|
dt.Columns[1].ColumnName = "LOT_NUM";
|
|
dt.Columns[2].ColumnName = "WORK_ORDER_NO";
|
|
dt.Columns[3].ColumnName = "DEVICENUM";
|
|
dt.Columns[4].ColumnName = "AMBIENTTEMP";
|
|
dt.Columns[5].ColumnName = "INTENSITY";
|
|
dt.Columns[6].ColumnName = "FF";
|
|
dt.Columns[7].ColumnName = "EFF";
|
|
dt.Columns[8].ColumnName = "PM";
|
|
dt.Columns[9].ColumnName = "ISC";
|
|
dt.Columns[10].ColumnName = "IPM";
|
|
dt.Columns[11].ColumnName = "VOC";
|
|
dt.Columns[12].ColumnName = "VPM";
|
|
dt.Columns[13].ColumnName = "SENSORTEMP";
|
|
dt.Columns[14].ColumnName = "VC_CELLEFF";
|
|
dt.Columns[15].ColumnName = "DEC_CTM";
|
|
dt.Columns[16].ColumnName = "RS";
|
|
dt.Columns[17].ColumnName = "RSH";
|
|
dt.Columns[18].ColumnName = "SUPPLIER_NAME";
|
|
dt.Columns[19].ColumnName = "RESULT";
|
|
dt.Columns[20].ColumnName = "TYPE";
|
|
dt.Columns[21].ColumnName = "IV_TEST_KEY";
|
|
dt.Columns[22].ColumnName = "PALLET_NO";
|
|
dt.Columns[23].ColumnName = "PRO_LEVEL";
|
|
dt.Columns[24].ColumnName = "CIR_NO";
|
|
dt.Columns[25].ColumnName = "SALE_ORDER_NO";
|
|
dt.Columns[26].ColumnName = "MODEL_NAME";
|
|
dt.Columns[27].ColumnName = "CONTRACT_NO";
|
|
dt.Columns[28].ColumnName = "CUSTOMER_NAME";
|
|
return ExportExcel(dt, "YongzhenJinke");
|
|
}
|
|
//
|
|
|
|
|
|
/// <summary>
|
|
/// 返修换片excel导出
|
|
/// </summary>
|
|
/// <param name="para"></param>
|
|
/// <returns></returns>
|
|
[Route("RepairExcel")]
|
|
[HttpPost]
|
|
public FileContentResult RepairExcel(List<string> para)
|
|
{
|
|
string bt = para[0];
|
|
string et = para[1];
|
|
string sale_order = para[2];
|
|
string workorder = para[3];
|
|
//不良位置 换片数量 操作人 操作人姓名 备注 分选时间 焊接机 叠层机
|
|
DataTable dt = new ReportService().RepairDT(bt, et, sale_order, workorder);
|
|
|
|
dt.Columns[0].ColumnName = "订单号";
|
|
dt.Columns[1].ColumnName = "工单号";
|
|
//dt.Columns[2].ColumnName = "不良类型";
|
|
dt.Columns[2].ColumnName = "组件序列号";
|
|
dt.Columns[3].ColumnName = "组件电池片数";
|
|
dt.Columns[4].ColumnName = "组件颜色";
|
|
dt.Columns[5].ColumnName = "原电池片料号";
|
|
dt.Columns[6].ColumnName = "原电池片厂家";
|
|
dt.Columns[7].ColumnName = "原电池片功率";
|
|
dt.Columns[8].ColumnName = "原电池片批号";
|
|
dt.Columns[9].ColumnName = "新电池片料号";
|
|
dt.Columns[10].ColumnName = "新电池片厂家";
|
|
dt.Columns[11].ColumnName = "新电池片功率";
|
|
dt.Columns[12].ColumnName = "新电池片批号";
|
|
dt.Columns[13].ColumnName = "不良站点";
|
|
dt.Columns[14].ColumnName = "不良项";
|
|
dt.Columns[15].ColumnName = "不良原因";
|
|
dt.Columns[16].ColumnName = "不良位置";
|
|
dt.Columns[17].ColumnName = "换片数量";
|
|
dt.Columns[18].ColumnName = "操作人";
|
|
dt.Columns[19].ColumnName = "操作人姓名";
|
|
dt.Columns[20].ColumnName = "备注";
|
|
dt.Columns[21].ColumnName = "分选时间";
|
|
dt.Columns[22].ColumnName = "焊接机";
|
|
dt.Columns[23].ColumnName = "叠层机";
|
|
return ExportExcel(dt, "Repair");
|
|
}
|
|
|
|
/// <summary>
|
|
/// 收发存报表excel导出
|
|
/// </summary>
|
|
/// <param name="para"></param>
|
|
/// <returns></returns>
|
|
[Route("ReceivedAndDepositExcel")]
|
|
[HttpPost]
|
|
public FileContentResult ReceivedAndDepositExcel(List<string> para)
|
|
{
|
|
string bt = para[0];
|
|
string et = para[1];
|
|
string locationname = para[2];
|
|
string name = para[3];
|
|
string sale_order = para[4];
|
|
//序列 子批次 母批次 组件序列号 组件等级 组件站点 组件托盘号 组件柜号 是否入库 是否出货
|
|
DataTable dt = new ReportService().ReceivedAndDepositDT(bt, et, name, locationname, sale_order);
|
|
dt.Columns[0].ColumnName = "仓库";
|
|
dt.Columns[1].ColumnName = "库位";
|
|
dt.Columns[2].ColumnName = "订单号";
|
|
dt.Columns[3].ColumnName = "柜号";
|
|
dt.Columns[4].ColumnName = "铭牌类型";
|
|
dt.Columns[5].ColumnName = "功率等级";
|
|
dt.Columns[6].ColumnName = "组件等级";
|
|
dt.Columns[7].ColumnName = "组件尺寸";
|
|
dt.Columns[8].ColumnName = "接线盒类型";
|
|
dt.Columns[9].ColumnName = "入库数量";
|
|
dt.Columns[10].ColumnName = "移入数量";
|
|
dt.Columns[11].ColumnName = "移出数量";
|
|
dt.Columns[12].ColumnName = "退库数量";
|
|
dt.Columns[13].ColumnName = "出货数量";
|
|
return ExportExcel(dt, "ReceivedAndDeposit");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
|
|
////test
|
|
//[Route("ShipmentsReportsssExcel")]
|
|
//[HttpPost]
|
|
//public ActionResult ShipmentsReportsssExcel(dynamic para)
|
|
//{
|
|
// //this.ValueProvider
|
|
// string STR=this.Request.Form.ToString();
|
|
// string containerno_old = String.Empty;
|
|
// string[] sArray = STR.Split('&');
|
|
// string bt = String.Empty;
|
|
// string[] bt1 = sArray[0].Trim().Split('=');
|
|
// string[] bt2 = sArray[1].Trim().Split('=');
|
|
// string[] bt3 = sArray[2].Trim().Split('=');
|
|
// string[] bt4 = sArray[3].Trim().Split('=');
|
|
// string[] bt5 = sArray[4].Trim().Split('=');
|
|
// string[] bt6 = sArray[5].Trim().Split('=');
|
|
// //if (bt1.Count()==3)
|
|
// bt = bt1[1];
|
|
// string et = String.Empty;
|
|
// //if (bt2.Count() == 3)
|
|
// et = bt2[1];
|
|
// string workshop = String.Empty;
|
|
// //if (bt3.Count() == 3)
|
|
// workshop = bt3[1];
|
|
// string product_code = String.Empty;
|
|
// //if (bt4.Count() == 3)
|
|
// product_code = bt4[1];
|
|
// string power_grade = String.Empty;
|
|
// //if (bt5.Count() == 3)
|
|
// power_grade = bt5[1];
|
|
// string containerno = String.Empty;
|
|
// //if (bt6.Count() == 3)
|
|
// containerno_old = bt6[1];
|
|
|
|
// //containerno_old = para.containerno;
|
|
// string old = containerno_old.Replace("+"," ");
|
|
// string trim = Regex.Replace(old, @"\s", " ");
|
|
// containerno = "'" + trim.Replace(" ", "','") + "'";
|
|
// containerno=containerno.Replace("%23", "#");
|
|
// //if (para.containerno != null)
|
|
// //{
|
|
// // string containerno_old = para.containerno;
|
|
// // string trim = Regex.Replace(containerno_old, @"\s", " ");
|
|
// // para.containerno = "'" + trim.Replace(" ", "','") + "'";
|
|
// //}
|
|
// DataTable dt = new ReportService().ShipmentsReportDT(bt, et, workshop, product_code, power_grade, containerno);
|
|
// dt.Columns[0].ColumnName = "车间";
|
|
// dt.Columns[1].ColumnName = "类型";
|
|
// dt.Columns[2].ColumnName = "功率档";
|
|
// dt.Columns[3].ColumnName = "包装日期";
|
|
// dt.Columns[4].ColumnName = "内部柜号";
|
|
// dt.Columns[5].ColumnName = "托盘号";
|
|
// dt.Columns[6].ColumnName = "序列号";
|
|
|
|
// EXCEL(dt, "ShipmentsReports");
|
|
|
|
// return ExportExcel(dt, "ShipmentsReports");
|
|
|
|
//}
|
|
|
|
|
|
//出货报表导出excel
|
|
|
|
[Route("ShipmentsReportssExcel")]
|
|
[HttpPost]
|
|
public FileContentResult ShipmentsReportssExcel(List<string> para)
|
|
{
|
|
string behintime = para[0];
|
|
string endtime = para[1];
|
|
string workshop = para[2];
|
|
string product_code = para[3];
|
|
string power_grade = para[4];
|
|
string containerno_old = para[5];
|
|
string trim = Regex.Replace(containerno_old, @"\s", " ");
|
|
string containerno = "'" + trim.Replace(" ", "','") + "'";
|
|
|
|
if (workshop.ToUpper() == "NULL")
|
|
{
|
|
workshop = "";
|
|
}
|
|
|
|
if (endtime.ToUpper() == "NULL"|| endtime.ToUpper() == "UNDEFINED")
|
|
{
|
|
endtime = "";
|
|
}
|
|
if (product_code.ToUpper() == "NULL")
|
|
{
|
|
product_code = "";
|
|
}
|
|
|
|
if (containerno.ToUpper() == "NULL")
|
|
{
|
|
containerno = "";
|
|
}
|
|
if (power_grade.ToUpper() == "NULL")
|
|
{
|
|
power_grade = "";
|
|
}
|
|
|
|
//if (para.containerno != null)
|
|
//{
|
|
// string containerno_old = para.containerno;
|
|
// string trim = Regex.Replace(containerno_old, @"\s", " ");
|
|
// para.containerno = "'" + trim.Replace(" ", "','") + "'";
|
|
//}
|
|
////DataTable dt = new ReportService().ShipmentsReportDT(behintime, endtime, workshop, product_code, power_grade, containerno);
|
|
DataTable dt = new ReportService().ShipmentsReportDT(behintime, endtime, workshop, product_code, power_grade, containerno);
|
|
//NO. 发货时间 订单 车间号/Workshop 型号/Type 功率档/Pnom[W] 内部柜号/Internal Container 物流公司 提单号 集装箱号 集装箱锁号 托号/Pallet No.
|
|
//序列号S /N 开路电压Voc[V] 短路电流Isc[A] 工作电压Vmp[V] 工作电流Imp[A] 实测功率Pmp[W] 填充因子FF 电流档Current[A]
|
|
dt.Columns[0].ColumnName = "发货时间";
|
|
dt.Columns[1].ColumnName = "订单";
|
|
dt.Columns[2].ColumnName = "车间号/Workshop";
|
|
dt.Columns[3].ColumnName = "产品类型/Type";
|
|
dt.Columns[4].ColumnName = "功率档/Pnom[W]";
|
|
dt.Columns[5].ColumnName = "内部柜号/Internal Container";
|
|
dt.Columns[6].ColumnName = "物流公司";
|
|
dt.Columns[7].ColumnName = "提单号";
|
|
dt.Columns[8].ColumnName = "集装箱号";
|
|
dt.Columns[9].ColumnName = "集装箱锁号";
|
|
dt.Columns[10].ColumnName = "包装时间";
|
|
dt.Columns[11].ColumnName = "托号/Pallet No.";
|
|
dt.Columns[12].ColumnName = "序列号S /N";
|
|
//dt.Columns[13].ColumnName = "序列号S /N";
|
|
dt.Columns[13].ColumnName = "开路电压Voc[V]";
|
|
dt.Columns[14].ColumnName = "短路电流Isc[A]";
|
|
dt.Columns[15].ColumnName = "工作电压Vmp[V]";
|
|
dt.Columns[16].ColumnName = "工作电流Imp[A]";
|
|
dt.Columns[17].ColumnName = "实测功率Pmp[W]";
|
|
dt.Columns[18].ColumnName = "填充因子FF";
|
|
dt.Columns[19].ColumnName = "电流档Current[A]";
|
|
return ExportExcel(dt, "ShipmentsReports");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
|
|
//包装产能统计excel
|
|
#region 包装产能统计excel
|
|
[Route("PackCapacityExcel")]
|
|
[HttpPost]
|
|
public FileContentResult PackCapacityExcel(List<string> para)
|
|
{
|
|
string workshop = para[0];
|
|
string workorder= para[1];
|
|
string saleorder = para[2];
|
|
|
|
if (workshop.ToUpper() == "NULL")
|
|
{
|
|
workshop = "";
|
|
}
|
|
if (workorder.ToUpper() == "NULL")
|
|
{
|
|
workorder = "";
|
|
}
|
|
if (saleorder.ToUpper() == "NULL")
|
|
{
|
|
saleorder = "";
|
|
}
|
|
|
|
//if (para.containerno != null)
|
|
//{
|
|
// string containerno_old = para.containerno;
|
|
// string trim = Regex.Replace(containerno_old, @"\s", " ");
|
|
// para.containerno = "'" + trim.Replace(" ", "','") + "'";
|
|
//}
|
|
////DataTable dt = new ReportService().ShipmentsReportDT(behintime, endtime, workshop, product_code, power_grade, containerno);
|
|
DataTable dt = new ReportService().PackCapacityDT(workshop, workorder, saleorder);
|
|
//NO. 发货时间 订单 车间号/Workshop 型号/Type 功率档/Pnom[W] 内部柜号/Internal Container 物流公司 提单号 集装箱号 集装箱锁号 托号/Pallet No.
|
|
//序列号S /N 开路电压Voc[V] 短路电流Isc[A] 工作电压Vmp[V] 工作电流Imp[A] 实测功率Pmp[W] 填充因子FF 电流档Current[A]
|
|
dt.Columns[0].ColumnName = "车间";
|
|
dt.Columns[1].ColumnName = "工单号";
|
|
dt.Columns[2].ColumnName = "订单号";
|
|
dt.Columns[3].ColumnName = "工单总数量";
|
|
dt.Columns[4].ColumnName = "包装数量";
|
|
dt.Columns[5].ColumnName = "功率档位";
|
|
dt.Columns[6].ColumnName = "电流档位";
|
|
dt.Columns[7].ColumnName = "等级";
|
|
dt.Columns[8].ColumnName = "功率下限";
|
|
dt.Columns[9].ColumnName = "功率上限";
|
|
dt.Columns[10].ColumnName = "工单类型";
|
|
return ExportExcel(dt, "PackCapacity");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region 一次碎片率看板excel
|
|
[Route("FragmentationExcel")]
|
|
[HttpPost]
|
|
public FileContentResult FragmentationExcel(List<string> para)
|
|
{
|
|
string workshop = para[0];
|
|
string machine = para[1];
|
|
string bt = para[2];
|
|
string et = para[3];
|
|
if (workshop.ToUpper() == "NULL")
|
|
{
|
|
workshop = "";
|
|
}
|
|
if (machine.ToUpper() == "NULL")
|
|
{
|
|
machine = "";
|
|
}
|
|
if (bt.ToUpper() == "NULL")
|
|
{
|
|
bt = "";
|
|
}
|
|
if (et.ToUpper() == "NULL")
|
|
{
|
|
et= "";
|
|
}
|
|
//if (para.containerno != null)
|
|
//{
|
|
// string containerno_old = para.containerno;
|
|
// string trim = Regex.Replace(containerno_old, @"\s", " ");
|
|
// para.containerno = "'" + trim.Replace(" ", "','") + "'";
|
|
//}
|
|
////DataTable dt = new ReportService().ShipmentsReportDT(behintime, endtime, workshop, product_code, power_grade, containerno);
|
|
DataTable dt = new ReportService().FragmentationDT(machine, workshop,bt,et);
|
|
|
|
return ExportExcel(dt, "Fragmentation");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region 一次成型率excel
|
|
[Route("MoldingExcel")]
|
|
[HttpPost]
|
|
public FileContentResult MoldingExcel(List<string> para)
|
|
{
|
|
string machine = para[0];
|
|
string workshop = para[1];
|
|
string bt = para[2];
|
|
string et = para[3];
|
|
if (machine.ToUpper() == "NULL")
|
|
{
|
|
machine = "";
|
|
}
|
|
if (workshop.ToUpper() == "NULL")
|
|
{
|
|
workshop= "";
|
|
}
|
|
if (bt.ToUpper() == "NULL")
|
|
{
|
|
bt = "";
|
|
}
|
|
if (et.ToUpper() == "NULL")
|
|
{
|
|
et = "";
|
|
}
|
|
//if (para.containerno != null)
|
|
//{
|
|
// string containerno_old = para.containerno;
|
|
// string trim = Regex.Replace(containerno_old, @"\s", " ");
|
|
// para.containerno = "'" + trim.Replace(" ", "','") + "'";
|
|
//}
|
|
////DataTable dt = new ReportService().ShipmentsReportDT(behintime, endtime, workshop, product_code, power_grade, containerno);
|
|
DataTable dt = new ReportService().MoldingDT(machine,workshop,bt,et);
|
|
|
|
return ExportExcel(dt, "OnceMoldingRate");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
#endregion
|
|
|
|
#region 数据查询excel
|
|
[Route("DataQueryExcel")]
|
|
[HttpPost]
|
|
public FileContentResult DataQueryExcel(List<string> para)
|
|
{
|
|
string wo = para[0];
|
|
string bt = para[1];
|
|
string et = para[2];
|
|
string text = para[3];
|
|
//string text = string.empty;
|
|
//if (para.containerno != null)
|
|
//{
|
|
// string containerno_old = para.containerno;
|
|
// string trim = regex.replace(containerno_old, @"\s", " ");
|
|
// para.containerno = "'" + trim.replace(" ", "','") + "'";
|
|
//}
|
|
////DataTable dt = new ReportService().ShipmentsReportDT(behintime, endtime, workshop, product_code, power_grade, containerno);
|
|
///
|
|
|
|
DataTable dt = new ReportService().QueryDT(wo,bt,et,text);
|
|
|
|
return ExportExcel(dt, "DataQuery");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region 上档率excel
|
|
[Route("UpshiftRateExcel")]
|
|
[HttpPost]
|
|
public FileContentResult UpshiftRateExcel(List<string> para)
|
|
{
|
|
string wo = para[0];
|
|
string bt = para[1];
|
|
string et = para[2];
|
|
if (wo.ToUpper() == "NULL")
|
|
{
|
|
wo = "";
|
|
}
|
|
if (bt.ToUpper() == "NULL")
|
|
{
|
|
bt = "";
|
|
}
|
|
if (et.ToUpper() == "NULL")
|
|
{
|
|
et = "";
|
|
}
|
|
//if (para.containerno != null)
|
|
//{
|
|
// string containerno_old = para.containerno;
|
|
// string trim = Regex.Replace(containerno_old, @"\s", " ");
|
|
// para.containerno = "'" + trim.Replace(" ", "','") + "'";
|
|
//}
|
|
////DataTable dt = new ReportService().ShipmentsReportDT(behintime, endtime, workshop, product_code, power_grade, containerno);
|
|
DataTable dt = new ReportService().UpshiftDT(wo, bt, et);
|
|
dt.Columns[0].ColumnName = "标准功率";
|
|
dt.Columns[1].ColumnName = "功率等级";
|
|
dt.Columns[2].ColumnName = "数量";
|
|
return ExportExcel(dt, "UpshiftRate");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
#endregion
|
|
|
|
#region 分档机组件查询excel
|
|
[Route("StepperComponentsExcel")]
|
|
[HttpPost]
|
|
public FileContentResult StepperComponentsExcel(List<string> para)
|
|
{
|
|
string wo = para[0];
|
|
string bt = para[1];
|
|
string et = para[2];
|
|
if (wo.ToUpper() == "NULL")
|
|
{
|
|
wo = "";
|
|
}
|
|
if (bt.ToUpper() == "NULL")
|
|
{
|
|
bt = "";
|
|
}
|
|
if (et.ToUpper() == "NULL")
|
|
{
|
|
et = "";
|
|
}
|
|
//if (para.containerno != null)
|
|
//{
|
|
// string containerno_old = para.containerno;
|
|
// string trim = Regex.Replace(containerno_old, @"\s", " ");
|
|
// para.containerno = "'" + trim.Replace(" ", "','") + "'";
|
|
//}
|
|
////DataTable dt = new ReportService().ShipmentsReportDT(behintime, endtime, workshop, product_code, power_grade, containerno);
|
|
DataTable dt = new ReportService().StepperDT(wo, bt, et);
|
|
dt.Columns[0].ColumnName = "组件序列号";
|
|
dt.Columns[1].ColumnName = "线别";
|
|
dt.Columns[2].ColumnName = "位置";
|
|
dt.Columns[3].ColumnName = "时间";
|
|
dt.Columns[4].ColumnName = "错误信息";
|
|
return ExportExcel(dt, "StepperComponent");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
#endregion
|
|
|
|
#region 车间质量问题统计excel
|
|
[Route("QualityStatisticsExcel")]
|
|
[HttpPost]
|
|
public FileContentResult QualityStatisticsExcel(List<string> para)
|
|
{
|
|
string wo= para[0];
|
|
string bt= para[1];
|
|
string et = para[2];
|
|
if (wo.ToUpper() == "NULL")
|
|
{
|
|
wo = "";
|
|
}
|
|
if (bt.ToUpper() == "NULL")
|
|
{
|
|
bt = "";
|
|
}
|
|
if (et.ToUpper() == "NULL")
|
|
{
|
|
et = "";
|
|
}
|
|
//if (para.containerno != null)
|
|
//{
|
|
// string containerno_old = para.containerno;
|
|
// string trim = Regex.Replace(containerno_old, @"\s", " ");
|
|
// para.containerno = "'" + trim.Replace(" ", "','") + "'";
|
|
//}
|
|
////DataTable dt = new ReportService().ShipmentsReportDT(behintime, endtime, workshop, product_code, power_grade, containerno);
|
|
DataTable dt = new ReportService().QualityDT(wo,bt,et);
|
|
|
|
return ExportExcel(dt, "QualityStatistics");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
#endregion
|
|
|
|
#region 条码补打excel
|
|
[Route("BarcodeReprintExcel")]
|
|
[HttpPost]
|
|
public FileContentResult BarcodeReprintExcel(List<string> para)
|
|
{
|
|
string wo = para[0];
|
|
string sn = para[1];
|
|
string bt = para[2];
|
|
string et = para[3];
|
|
if (wo.ToUpper() == "NULL")
|
|
{
|
|
wo = "";
|
|
}
|
|
if (sn.ToUpper() == "NULL")
|
|
{
|
|
sn = "";
|
|
}
|
|
if (bt.ToUpper() == "NULL")
|
|
{
|
|
bt = "";
|
|
}
|
|
if (et.ToUpper() == "NULL")
|
|
{
|
|
et = "";
|
|
}
|
|
//if (para.containerno != null)
|
|
//{
|
|
// string containerno_old = para.containerno;
|
|
// string trim = Regex.Replace(containerno_old, @"\s", " ");
|
|
// para.containerno = "'" + trim.Replace(" ", "','") + "'";
|
|
//}
|
|
////DataTable dt = new ReportService().ShipmentsReportDT(behintime, endtime, workshop, product_code, power_grade, containerno);
|
|
DataTable dt = new ReportService().ReprintDT(wo,sn, bt, et);
|
|
dt.Columns[0].ColumnName = "序列号";
|
|
dt.Columns[1].ColumnName = "工单号";
|
|
dt.Columns[2].ColumnName = "补打时间";
|
|
dt.Columns[3].ColumnName = "操作人";
|
|
dt.Columns[4].ColumnName = "操作机台";
|
|
dt.Columns[5].ColumnName = "补打原因";
|
|
return ExportExcel(dt, "BarcodeReprint");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// /在制品导出
|
|
/// </summary>
|
|
/// <param name="StartDateTime"></param>
|
|
/// <param name="EndDateTime"></param>
|
|
/// <param name="WorkShop"></param>
|
|
|
|
/// <param name="wks"></param>
|
|
/// <returns></returns>
|
|
|
|
|
|
|
|
|
|
#region 每日投产包装完成率excel
|
|
[Route("DayPackCompleteExcel")]
|
|
[HttpPost]
|
|
public FileContentResult DayPackCompleteExcel(List<string> para)
|
|
{
|
|
string workshop = para[0];
|
|
string workorder = para[1];
|
|
string saleorder = para[2];
|
|
|
|
if (workshop.ToUpper() == "NULL")
|
|
{
|
|
workshop = "";
|
|
}
|
|
if (workorder.ToUpper() == "NULL")
|
|
{
|
|
workorder = "";
|
|
}
|
|
if (saleorder.ToUpper() == "NULL")
|
|
{
|
|
saleorder = "";
|
|
}
|
|
|
|
//if (para.containerno != null)
|
|
//{
|
|
// string containerno_old = para.containerno;
|
|
// string trim = Regex.Replace(containerno_old, @"\s", " ");
|
|
// para.containerno = "'" + trim.Replace(" ", "','") + "'";
|
|
//}
|
|
////DataTable dt = new ReportService().ShipmentsReportDT(behintime, endtime, workshop, product_code, power_grade, containerno);
|
|
DataTable dt = new ReportService().DayPackCompleteDT(workshop, workorder, saleorder);
|
|
dt.Columns[0].ColumnName = "车间";
|
|
dt.Columns[1].ColumnName = "工单号";
|
|
dt.Columns[2].ColumnName = "订单号";
|
|
dt.Columns[3].ColumnName = "投产数量";
|
|
dt.Columns[4].ColumnName = "包装数量";
|
|
dt.Columns[5].ColumnName = "包装完工率";
|
|
return ExportExcel(dt, "PackCapacity");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
#endregion
|
|
|
|
|
|
|
|
#region 生码未包装组件查询excel
|
|
[Route("UnPackComponentExcel")]
|
|
[HttpPost]
|
|
public FileContentResult UnPackComponentExcel(List<string> para)
|
|
{
|
|
string workshop = para[0];
|
|
string workorder = para[1];
|
|
string saleorder = para[2];
|
|
|
|
if (workshop.ToUpper() == "NULL")
|
|
{
|
|
workshop = "";
|
|
}
|
|
if (workorder.ToUpper() == "NULL")
|
|
{
|
|
workorder = "";
|
|
}
|
|
if (saleorder.ToUpper() == "NULL")
|
|
{
|
|
saleorder = "";
|
|
}
|
|
|
|
//if (para.containerno != null)
|
|
//{
|
|
// string containerno_old = para.containerno;
|
|
// string trim = Regex.Replace(containerno_old, @"\s", " ");
|
|
// para.containerno = "'" + trim.Replace(" ", "','") + "'";
|
|
//}
|
|
////DataTable dt = new ReportService().ShipmentsReportDT(behintime, endtime, workshop, product_code, power_grade, containerno);
|
|
DataTable dt = new ReportService().UnPackComponentDT(workshop, workorder, saleorder);
|
|
dt.Columns[0].ColumnName = "车间";
|
|
dt.Columns[1].ColumnName = "工单号";
|
|
dt.Columns[2].ColumnName = "订单号";
|
|
dt.Columns[3].ColumnName = "当前站点";
|
|
dt.Columns[4].ColumnName = "组件序列号";
|
|
dt.Columns[5].ColumnName = "生码时间";
|
|
dt.Columns[6].ColumnName = "呆滞时间";
|
|
//dt.Columns[7].ColumnName = "生码人员";
|
|
return ExportExcel(dt, "UnPackComponent");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
#endregion
|
|
|
|
|
|
|
|
#region 材料批号查询excel
|
|
[Route("MaterialBatchNumberExcel")]
|
|
[HttpPost]
|
|
public FileContentResult MaterialBatchNumberExcel(List<string> para)
|
|
{
|
|
//string workshop = para[0];
|
|
string workorder = para[0];
|
|
//string saleorder = para[2];
|
|
|
|
//if (workshop.ToUpper() == "NULL")
|
|
//{
|
|
// workshop = "";
|
|
//}
|
|
if (workorder.ToUpper() == "NULL")
|
|
{
|
|
workorder = "";
|
|
}
|
|
//if (saleorder.ToUpper() == "NULL")
|
|
//{
|
|
// saleorder = "";
|
|
//}
|
|
|
|
//if (para.containerno != null)
|
|
//{
|
|
// string containerno_old = para.containerno;
|
|
// string trim = Regex.Replace(containerno_old, @"\s", " ");
|
|
// para.containerno = "'" + trim.Replace(" ", "','") + "'";
|
|
//}
|
|
////DataTable dt = new ReportService().ShipmentsReportDT(behintime, endtime, workshop, product_code, power_grade, containerno);
|
|
DataTable dt = new ReportService().MaterialBatchNumberDT(workorder);
|
|
dt.Columns[0].ColumnName = "材料名称";
|
|
dt.Columns[1].ColumnName = "母批次";
|
|
dt.Columns[2].ColumnName = "子批次";
|
|
dt.Columns[3].ColumnName = "子批次剩余数量";
|
|
dt.Columns[4].ColumnName = "子批次原数量";
|
|
dt.Columns[5].ColumnName = "母批次剩余数量";
|
|
dt.Columns[6].ColumnName = "单位";
|
|
dt.Columns[7].ColumnName = "厂商";
|
|
dt.Columns[8].ColumnName = "规格";
|
|
return ExportExcel(dt, "UnPackComponent");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
#endregion
|
|
|
|
#region 泛海材料用量查询excel
|
|
[Route("MaterialLotExcel")]
|
|
[HttpPost]
|
|
public FileContentResult MaterialLotExcel(List<string> para)
|
|
{
|
|
string workorder = para[0];
|
|
string orignbr = para[1];
|
|
string lotnbr = para[2];
|
|
string wo = string.Empty;
|
|
if (workorder == "")
|
|
{
|
|
wo = "";
|
|
}
|
|
else
|
|
{
|
|
string trim1 = Regex.Replace(workorder, @"\s", " ");
|
|
wo = "'" + trim1.Replace(" ", "','") + "'";
|
|
}
|
|
////DataTable dt = new ReportService().ShipmentsReportDT(behintime, endtime, workshop, product_code, power_grade, containerno);
|
|
DataTable dt = new ReportService().MaterialLotDT(wo, orignbr, lotnbr);
|
|
dt.Columns[0].ColumnName = "材料名称";
|
|
dt.Columns[1].ColumnName = "母批次";
|
|
dt.Columns[2].ColumnName = "子批次";
|
|
dt.Columns[3].ColumnName = "子批次剩余数量";
|
|
dt.Columns[4].ColumnName = "子批次原数量";
|
|
dt.Columns[5].ColumnName = "母批次剩余数量";
|
|
dt.Columns[6].ColumnName = "单位";
|
|
dt.Columns[7].ColumnName = "厂商";
|
|
dt.Columns[8].ColumnName = "规格";
|
|
return ExportExcel(dt, "MaterialLotReport");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
#endregion
|
|
|
|
#region 泛海CTM报表查询excel
|
|
[Route("CTMReportExcel")]
|
|
[HttpPost]
|
|
public FileContentResult CTMReportExcel(List<string> para)
|
|
{
|
|
string serial = para[0];
|
|
string workorder = para[1];
|
|
string bt = para[2];
|
|
string et = para[3];
|
|
string pallet = para[4];
|
|
string serialnbr = string.Empty;
|
|
//if (serial == "")
|
|
//{
|
|
// serialnbr = "";
|
|
//}
|
|
//else
|
|
//{
|
|
// string trim1 = Regex.Replace(serial, @"\s", " ");
|
|
// serialnbr = "'" + trim1.Replace(" ", "','") + "'";
|
|
//}
|
|
////DataTable dt = new ReportService().ShipmentsReportDT(behintime, endtime, workshop, product_code, power_grade, containerno);
|
|
DataTable dt = new ReportService().CTMReportDT(serial, workorder, bt, et, pallet);
|
|
dt.Columns[0].ColumnName = "测试时间";
|
|
dt.Columns[1].ColumnName = "组建序列号";
|
|
dt.Columns[2].ColumnName = "电池片厂家";
|
|
dt.Columns[3].ColumnName = "电池效率";
|
|
dt.Columns[4].ColumnName = "单片功率";
|
|
dt.Columns[5].ColumnName = "理论功率";
|
|
dt.Columns[6].ColumnName = "CTM";
|
|
dt.Columns[7].ColumnName = "Pmax";
|
|
dt.Columns[8].ColumnName = "Rsh";
|
|
dt.Columns[9].ColumnName = "Rs";
|
|
dt.Columns[10].ColumnName = "FF";
|
|
dt.Columns[11].ColumnName = "Isc";
|
|
dt.Columns[12].ColumnName = "Voc";
|
|
dt.Columns[13].ColumnName = "Imax";
|
|
dt.Columns[14].ColumnName = "Vmax";
|
|
dt.Columns[15].ColumnName = "车间";
|
|
dt.Columns[16].ColumnName = "机台";
|
|
dt.Columns[17].ColumnName = "表面温度";
|
|
dt.Columns[18].ColumnName = "环境温度";
|
|
dt.Columns[19].ColumnName = "背板厚度";
|
|
dt.Columns[20].ColumnName = "电池片厚度";
|
|
dt.Columns[21].ColumnName = "电池规格";
|
|
dt.Columns[22].ColumnName = "电池数量";
|
|
dt.Columns[23].ColumnName = "组件颜色";
|
|
dt.Columns[24].ColumnName = "eva厂商";
|
|
dt.Columns[25].ColumnName = "背板厂商";
|
|
dt.Columns[26].ColumnName = "玻璃厂商";
|
|
dt.Columns[27].ColumnName = "焊带";
|
|
dt.Columns[28].ColumnName = "电池片批号";
|
|
dt.Columns[29].ColumnName = "接线盒批号";
|
|
return ExportExcel(dt, "CTMReport");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region 本月每天各工位产能excel
|
|
[Route("CurEverydayStationCapacityExcel")]
|
|
[HttpPost]
|
|
public FileContentResult CurEverydayStationCapacityExcel(List<string> para)
|
|
{
|
|
string workshop = para[0];
|
|
string year = para[1];
|
|
string month = para[2];
|
|
string station = para[3];
|
|
//string saleorder = para[2];
|
|
|
|
if (workshop.ToUpper() == "NULL")
|
|
{
|
|
workshop = "";
|
|
}
|
|
if (year.ToUpper() == "NULL")
|
|
{
|
|
year = "";
|
|
}
|
|
if (month.ToUpper() == "NULL")
|
|
{
|
|
month = "";
|
|
}
|
|
if (station.ToUpper() == "NULL")
|
|
{
|
|
station = "";
|
|
}
|
|
//if (saleorder.ToUpper() == "NULL")
|
|
//{
|
|
// saleorder = "";
|
|
//}
|
|
|
|
//if (para.containerno != null)
|
|
//{
|
|
// string containerno_old = para.containerno;
|
|
// string trim = Regex.Replace(containerno_old, @"\s", " ");
|
|
// para.containerno = "'" + trim.Replace(" ", "','") + "'";
|
|
//}
|
|
////DataTable dt = new ReportService().ShipmentsReportDT(behintime, endtime, workshop, product_code, power_grade, containerno);
|
|
DataTable dt = new ReportService().CurEverydayStationCapacityDT(workshop, station, year,month );
|
|
dynamic counts = dt.Columns.Count;
|
|
dt.Columns[0].ColumnName = "车间";
|
|
dt.Columns[1].ColumnName = "站点";
|
|
dt.Columns[2].ColumnName = "机台";
|
|
dt.Columns[3].ColumnName = "班次";
|
|
for (var i = 4; i < counts; i++)
|
|
{
|
|
dt.Columns[i].ColumnName = dt.Columns[i].ColumnName;
|
|
}
|
|
|
|
return ExportExcel(dt, "UnPackComponent");
|
|
|
|
//return ExportExcel(dt, "ShipmentsReports");
|
|
}
|
|
#endregion
|
|
|
|
////出货报表导出excel
|
|
//[Route("ShipmentsReportsExcel/{workshop}/{behintime}/{endtime}/{product_code}/{power_grade}/{containerno}")]
|
|
//[HttpGet]
|
|
//public FileContentResult ShipmentsReportsExcel(string workshop, string behintime, string endtime, string product_code, string power_grade, string containerno)
|
|
//{
|
|
// //ShipmentsReportDal DT = new ShipmentsReportDal();
|
|
// //var res = DT.ShipmentsReport(behintime, endtime, workshop, product_code, power_grade, containerno);
|
|
// if (containerno != null)
|
|
// {
|
|
// string containerno_old = containerno;
|
|
// string trim = Regex.Replace(containerno_old, @"\s", " ");
|
|
// containerno = "'" + trim.Replace(" ", "','") + "'";
|
|
// }
|
|
// DataTable dt = new ReportService().ShipmentsReportDT( behintime == "Null" ? "" : behintime
|
|
// , endtime == "Null" ? "" : endtime
|
|
// ,workshop == "Null" ? "" : workshop
|
|
// , product_code == "Null" ? "" : product_code
|
|
// , power_grade == "Null" ? "" : power_grade
|
|
// , containerno == "Null" ? "" : containerno);
|
|
// dt.Columns[0].ColumnName = "车间";
|
|
// dt.Columns[1].ColumnName = "类型";
|
|
// dt.Columns[2].ColumnName = "功率档";
|
|
// dt.Columns[3].ColumnName = "包装日期";
|
|
// dt.Columns[4].ColumnName = "内部柜号";
|
|
// dt.Columns[5].ColumnName = "托盘号";
|
|
// dt.Columns[6].ColumnName = "序列号";
|
|
// //dt.Columns[7].ColumnName = "组件等级";
|
|
// //dt.Columns[8].ColumnName = "过战时间";
|
|
// //dt.Columns[9].ColumnName = "操作员工";
|
|
// //dt.Columns[10].ColumnName = "组件状态";
|
|
// return ExportExcel(dt, "ShipmentsReports");
|
|
//}
|
|
|
|
|
|
//生产在制报表统计导出excel
|
|
|
|
|
|
/// <summary>
|
|
/// /生产在制导出
|
|
/// </summary>
|
|
/// <param name="StartDateTime"></param>
|
|
/// <param name="EndDateTime"></param>
|
|
/// <param name="WorkShop"></param>
|
|
/// <param name="station"></param>
|
|
/// <param name="wks"></param>
|
|
/// <returns></returns>
|
|
[Route("StationNbrAndGoingExcel/{StartDateTime}/{EndDateTime}/{WorkShop}/{Station}/{Workorder}/{SaleOrder}/{WorkTime}")]
|
|
[HttpGet]
|
|
public FileContentResult StationNbrAndGoingExcel(string StartDateTime, string EndDateTime, string WorkShop, string Station, string WorkOrder, string SaleOrder,string WorkTime)
|
|
{
|
|
//ShipmentsReportDal DT = new ShipmentsReportDal();
|
|
//var res = DT.ShipmentsReport(behintime, endtime, workshop, product_code, power_grade, containerno);
|
|
//if (containerno != null)
|
|
//{
|
|
// string containerno_old = containerno;
|
|
// string trim = Regex.Replace(containerno_old, @"\s", " ");
|
|
// containerno = "'" + trim.Replace(" ", "','") + "'";
|
|
//}
|
|
DataTable dt = new ReportService().StationNbrAndGoingDT(StartDateTime == "Null" ? "" : StartDateTime
|
|
, EndDateTime == "Null" ? "" : EndDateTime
|
|
, WorkShop == "Null" ? "" : WorkShop
|
|
, Station == "Null" ? "" : Station
|
|
, WorkOrder == "Null" ? "" : WorkOrder
|
|
, SaleOrder == "Null" ? "" : SaleOrder
|
|
,WorkTime == "Null" ? "" : WorkTime
|
|
);
|
|
dt.Columns[0].ColumnName = "站点编码";
|
|
dt.Columns[1].ColumnName = "站点";
|
|
dt.Columns[2].ColumnName = "车间";
|
|
dt.Columns[3].ColumnName = "过站数量";
|
|
dt.Columns[4].ColumnName = "在制数量";
|
|
//dt.Columns[5].ColumnName = "组件车间";
|
|
//dt.Columns[6].ColumnName = "EL等级";
|
|
//dt.Columns[7].ColumnName = "组件等级";
|
|
//dt.Columns[8].ColumnName = "过战时间";
|
|
//dt.Columns[9].ColumnName = "操作员工";
|
|
//dt.Columns[10].ColumnName = "组件状态";
|
|
return ExportExcel(dt, "StationNbrAndGoing");
|
|
}
|
|
|
|
//组件车间产能
|
|
[Route("ShiftProductionExcel/{WorkShop}/{StartDateTime}/{EndDateTime}/{Station}/{Workorder}")]
|
|
[HttpGet]
|
|
public FileContentResult ShiftProductionExcel(string WorkShop, string StartDateTime, string EndDateTime,string Station, string WorkOrder,string type,string mod)
|
|
{
|
|
|
|
DataTable dt = new ReportService().ShiftProductionDT( WorkShop == "Null" ? "" : WorkShop
|
|
, StartDateTime == "Null" ? "" : StartDateTime
|
|
, EndDateTime == "Null" ? "" : EndDateTime
|
|
, Station == "Null" ? "" : Station
|
|
, WorkOrder == "Null" ? "" : WorkOrder
|
|
, type == "Null" ? "":type
|
|
, mod == "Null" ? "" : mod
|
|
) ;
|
|
dt.Columns[0].ColumnName = "班组编号";
|
|
dt.Columns[1].ColumnName = "班组名称";
|
|
dt.Columns[2].ColumnName = "计划规格";
|
|
dt.Columns[3].ColumnName = "数量";
|
|
|
|
return ExportExcel(dt, "ShiftProduction");
|
|
}
|
|
//生产在制报表详细导出excel
|
|
[Route("StationDetailedExcel/{StartDateTime}/{EndDateTime}/{WorkShop}/{Station}/{Workorder}/{Machine}/{Saleorder}/{WorkTime}")]
|
|
[HttpGet]
|
|
public FileContentResult StationDetailedExcel(string StartDateTime, string EndDateTime, string WorkShop, string Station, string Workorder,string Machine, string Saleorder,string WorkTime)
|
|
{
|
|
//ShipmentsReportDal DT = new ShipmentsReportDal();
|
|
//var res = DT.ShipmentsReport(behintime, endtime, workshop, product_code, power_grade, containerno);
|
|
//if (containerno != null)
|
|
//{
|
|
// string containerno_old = containerno;
|
|
// string trim = Regex.Replace(containerno_old, @"\s", " ");
|
|
// containerno = "'" + trim.Replace(" ", "','") + "'";
|
|
//}
|
|
|
|
DataTable dt = new ReportService().StationDetailedDT(StartDateTime == "Null" ? "" : StartDateTime
|
|
, EndDateTime == "Null" ? "" : EndDateTime
|
|
, WorkShop == "Null" ? "" : WorkShop
|
|
, Station == "Null" ? "" : Station
|
|
, Workorder == "Null" ? "" : Workorder
|
|
, Machine=="Null" ? "": Machine
|
|
, Saleorder == "Null" ? "" : Saleorder
|
|
, WorkTime == "Null" ? "" : WorkTime
|
|
);
|
|
dt.Columns[0].ColumnName = "组件条码";
|
|
dt.Columns[1].ColumnName = "工单号";
|
|
dt.Columns[2].ColumnName = "过站机台";
|
|
dt.Columns[3].ColumnName = "车间编码";
|
|
dt.Columns[4].ColumnName = "站点编码";
|
|
dt.Columns[5].ColumnName = "组件车间";
|
|
dt.Columns[6].ColumnName = "EL等级";
|
|
dt.Columns[7].ColumnName = "组件等级";
|
|
dt.Columns[8].ColumnName = "过站时间";
|
|
dt.Columns[9].ColumnName = "操作员工";
|
|
dt.Columns[10].ColumnName = "组件状态";
|
|
dt.Columns[11].ColumnName = "不良描述";
|
|
return ExportExcel(dt, "StationDetailed");
|
|
}
|
|
|
|
//testexcel
|
|
[Route("testExcel")]
|
|
[HttpPost]
|
|
public FileContentResult testExcel(List<string> para)
|
|
{
|
|
DataTable dt = new ReportService().PackOutputQueryInfo("","2009-10-10","2020-10-10","","","","","");
|
|
return ExportExcel(dt, "PackOutputReport");
|
|
}
|
|
|
|
|
|
|
|
public FileContentResult ExportExcel01(DataTable dt, string filename, string[] colname)
|
|
{
|
|
byte[] content = ExcelExportHelper.ExportExcel(dt, "", false, colname);
|
|
return File(content, ExcelExportHelper.ExcelContentType, filename + DateTime.Now.ToString("yyyyMMdd") + ".xlsx");
|
|
}
|
|
public FileContentResult ExportExcel(DataTable dt, string filename)
|
|
{
|
|
List<string> listColName = new List<string>();
|
|
foreach (DataColumn item in dt.Columns)
|
|
{
|
|
listColName.Add(item.ColumnName.ToString());
|
|
}
|
|
|
|
byte[] content = ExcelExportHelper.ExportExcel(dt, "", false, listColName.ToArray());
|
|
return File(content, ExcelExportHelper.ExcelContentType, filename + DateTime.Now.ToString("yyyyMMdd") + ".xlsx");
|
|
}
|
|
|
|
public void EXCEL(DataTable DT,string str)
|
|
{
|
|
FileInfo newFile = new FileInfo(@"d:\"+str + DateTime.Now.ToString("yyyyMMdd") + ".xlsx");
|
|
if (newFile.Exists)
|
|
{
|
|
newFile.Delete();
|
|
newFile = new FileInfo(@"d:\" + str + DateTime.Now.ToString("yyyyMMdd") + ".xlsx");
|
|
}
|
|
using (ExcelPackage package = new ExcelPackage(newFile))
|
|
{
|
|
ExcelWorksheet worksheet = package.Workbook.Worksheets.Add(str);
|
|
int rows = DT.Rows.Count;
|
|
int count = DT.Columns.Count;
|
|
|
|
for (int i = 0;i < rows; i++)
|
|
{
|
|
for (int j = 0; j < count; j++)
|
|
{
|
|
worksheet.Cells[i+1, j+1].Value = DT.Rows[i][j].ToString();
|
|
}
|
|
}
|
|
|
|
//worksheet.Cells[1, 2].Value = "价格";
|
|
//worksheet.Cells[1, 3].Value = "销量";
|
|
|
|
//worksheet.Cells[2, 1].Value = "大米";
|
|
//worksheet.Cells[2, 2].Value = 56;
|
|
//worksheet.Cells[2, 3].Value = 100;
|
|
|
|
//worksheet.Cells[3, 1].Value = "玉米";
|
|
//worksheet.Cells[3, 2].Value = 45;
|
|
//worksheet.Cells[3, 3].Value = 150;
|
|
|
|
//worksheet.Cells[4, 1].Value = "小米";
|
|
//worksheet.Cells[4, 2].Value = 38;
|
|
//worksheet.Cells[4, 3].Value = 130;
|
|
|
|
//worksheet.Cells[5, 1].Value = "糯米";
|
|
//worksheet.Cells[5, 2].Value = 22;
|
|
//worksheet.Cells[5, 3].Value = 200;
|
|
|
|
package.Save();
|
|
}
|
|
return ;
|
|
}
|
|
|
|
public static DataTable ToDataTable<T>(IEnumerable<T> collection)
|
|
{
|
|
var props = typeof(T).GetProperties();
|
|
var dt = new DataTable();
|
|
dt.Columns.AddRange(props.Select(p => new DataColumn(p.Name, p.PropertyType)).ToArray());
|
|
if (collection.Count() > 0)
|
|
{
|
|
for (int i = 0; i < collection.Count(); i++)
|
|
{
|
|
ArrayList tempList = new ArrayList();
|
|
foreach (PropertyInfo pi in props)
|
|
{
|
|
object obj = pi.GetValue(collection.ElementAt(i), null);
|
|
tempList.Add(obj);
|
|
}
|
|
object[] array = tempList.ToArray();
|
|
dt.LoadDataRow(array, true);
|
|
}
|
|
}
|
|
return dt;
|
|
}
|
|
|
|
/// <summary>
|
|
/// DataTable 转换为List 集合
|
|
/// </summary>
|
|
/// <typeparam name="TResult">类型</typeparam>
|
|
/// <param name="dt">DataTable</param>
|
|
/// <returns></returns>
|
|
public static List<TResult> ToList<TResult>(DataTable dt) where TResult : class, new()
|
|
{
|
|
//创建一个属性的列表
|
|
List<PropertyInfo> prlist = new List<PropertyInfo>();
|
|
//获取TResult的类型实例 反射的入口
|
|
Type t = typeof(TResult);
|
|
//获得TResult 的所有的Public 属性 并找出TResult属性和DataTable的列名称相同的属性(PropertyInfo) 并加入到属性列表
|
|
Array.ForEach<PropertyInfo>(t.GetProperties(), p => { if (dt.Columns.IndexOf(p.Name) != -1) prlist.Add(p); });
|
|
//创建返回的集合
|
|
List<TResult> oblist = new List<TResult>();
|
|
|
|
foreach (DataRow row in dt.Rows)
|
|
{
|
|
//创建TResult的实例
|
|
TResult ob = new TResult();
|
|
//找到对应的数据 并赋值
|
|
prlist.ForEach(p => { if (row[p.Name] != DBNull.Value) p.SetValue(ob, row[p.Name], null); });
|
|
//放入到返回的集合中.
|
|
oblist.Add(ob);
|
|
}
|
|
return oblist;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 转换为一个DataTable
|
|
/// </summary>
|
|
/// <typeparam name="TResult"></typeparam>
|
|
///// <param name="value"></param>
|
|
/// <returns></returns>
|
|
public static DataTable ToDataTable(IEnumerable list)
|
|
{
|
|
//创建属性的集合
|
|
List<PropertyInfo> pList = new List<PropertyInfo>();
|
|
//获得反射的入口
|
|
Type type = list.AsQueryable().ElementType;
|
|
DataTable dt = new DataTable();
|
|
//把所有的public属性加入到集合 并添加DataTable的列
|
|
Array.ForEach<PropertyInfo>(type.GetProperties(), p => { pList.Add(p); dt.Columns.Add(p.Name, p.PropertyType); });
|
|
foreach (var item in list)
|
|
{
|
|
//创建一个DataRow实例
|
|
DataRow row = dt.NewRow();
|
|
//给row 赋值
|
|
pList.ForEach(p => row[p.Name] = p.GetValue(item, null));
|
|
//加入到DataTable
|
|
dt.Rows.Add(row);
|
|
}
|
|
return dt;
|
|
}
|
|
|
|
[Route("PressureResistantExcel")]
|
|
[HttpPost]
|
|
public FileContentResult PressureResistantExcel(List<string> para)
|
|
{
|
|
string lot = para[0];
|
|
string bt = para[1];
|
|
string et = para[2];
|
|
if (lot.ToUpper() == "NULL")
|
|
{
|
|
lot = "";
|
|
}
|
|
DataTable dt = new ReportService().PressureResistantInfo(lot,
|
|
bt,
|
|
et
|
|
);
|
|
int i = 0;
|
|
dt.Columns[i++].ColumnName = "产品条码";
|
|
dt.Columns[i++].ColumnName = "位号";
|
|
dt.Columns[i++].ColumnName = "步号";
|
|
dt.Columns[i++].ColumnName = "用户Id";
|
|
dt.Columns[i++].ColumnName = "模式名称";
|
|
dt.Columns[i++].ColumnName = "源值";
|
|
dt.Columns[i++].ColumnName = "读值1";
|
|
dt.Columns[i++].ColumnName = "上限";
|
|
dt.Columns[i++].ColumnName = "读值2";
|
|
dt.Columns[i++].ColumnName = "耗时";
|
|
dt.Columns[i++].ColumnName = "结束时间";
|
|
return ExportExcel(dt, "PressureResistantReport");
|
|
}
|
|
|
|
/// <summary>
|
|
/// 转换为一个DataTable
|
|
/// </summary>
|
|
/// <typeparam name="TResult"></typeparam>
|
|
///// <param name="value"></param>
|
|
/// <returns></returns>
|
|
//public static DataTable ToDataTable<TResult>(IEnumerable<TResult> value) where TResult : class
|
|
//{
|
|
// //创建属性的集合
|
|
// List<PropertyInfo> pList = new List<PropertyInfo>();
|
|
// //获得反射的入口
|
|
// Type type = typeof(TResult);
|
|
// DataTable dt = new DataTable();
|
|
// //把所有的public属性加入到集合 并添加DataTable的列
|
|
// Array.ForEach<PropertyInfo>(type.GetProperties(), p => { pList.Add(p); dt.Columns.Add(p.Name, p.PropertyType); });
|
|
// foreach (var item in value)
|
|
// {
|
|
// //创建一个DataRow实例
|
|
// DataRow row = dt.NewRow();
|
|
// //给row 赋值
|
|
// pList.ForEach(p => row[p.Name] = p.GetValue(item, null));
|
|
// //加入到DataTable
|
|
// dt.Rows.Add(row);
|
|
// }
|
|
// return dt;
|
|
//}
|
|
|
|
|
|
}
|
|
}
|