From c48972cc6025b5b83ceb231b1d486fd7c2182f8e Mon Sep 17 00:00:00 2001
From: fei550 <1420031550@qq.com>
Date: Wed, 10 Jun 2026 10:44:13 +0800
Subject: [PATCH] =?UTF-8?q?feat(clgl):=20=E6=94=AF=E6=8C=81=E5=8E=86?=
=?UTF-8?q?=E5=8F=B2=E5=87=BA=E5=BA=93=E6=95=B0=E6=8D=AE=E5=AF=BC=E5=85=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
历史出库数据需要批量补录并同步形成出库申请单、出库单和库存扣减。
新增出库申请历史导入入口,按仓库、材料编码、炉号、批号、数量、
出库时间和领用单位校验模板数据,并按材料单位拆分管段/管件单据。
---
SGGL/BLL/CLGL/TwInOutplanmasterService.cs | 267 ++++++++++++++++++
SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx | 2 +
SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.cs | 23 +-
.../CLGL/OutPlanMaster.aspx.designer.cs | 9 +
.../CLGL/OutPlanMasterHistoryImport.aspx | 49 ++++
.../CLGL/OutPlanMasterHistoryImport.aspx.cs | 137 +++++++++
...utPlanMasterHistoryImport.aspx.designer.cs | 98 +++++++
SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 10 +-
SGGL/Model/CLGL/Tw_OutHistoryDataIn.cs | 42 +++
SGGL/Model/CLGL/Tw_OutHistoryImportRow.cs | 25 ++
SGGL/Model/Model.csproj | 2 +
11 files changed, 662 insertions(+), 2 deletions(-)
create mode 100644 SGGL/FineUIPro.Web/CLGL/OutPlanMasterHistoryImport.aspx
create mode 100644 SGGL/FineUIPro.Web/CLGL/OutPlanMasterHistoryImport.aspx.cs
create mode 100644 SGGL/FineUIPro.Web/CLGL/OutPlanMasterHistoryImport.aspx.designer.cs
create mode 100644 SGGL/Model/CLGL/Tw_OutHistoryDataIn.cs
create mode 100644 SGGL/Model/CLGL/Tw_OutHistoryImportRow.cs
diff --git a/SGGL/BLL/CLGL/TwInOutplanmasterService.cs b/SGGL/BLL/CLGL/TwInOutplanmasterService.cs
index c7a4032d..052dd234 100644
--- a/SGGL/BLL/CLGL/TwInOutplanmasterService.cs
+++ b/SGGL/BLL/CLGL/TwInOutplanmasterService.cs
@@ -6,6 +6,7 @@ using Model;
using System;
using System.Collections;
using System.Collections.Generic;
+using System.Globalization;
using System.Linq;
@@ -388,6 +389,272 @@ namespace BLL
}
+ ///
+ /// 导入历史出库数据,直接生成出库申请单和出库单并扣减库存
+ ///
+ public static ResponeData ImportOutHistoryData(string oriFileName, string path, string projectId, string createUserId, string unitWorkId)
+ {
+ var responeData = new ResponeData();
+ if (string.IsNullOrEmpty(unitWorkId))
+ {
+ responeData.code = 0;
+ responeData.message = "请选择单位工程!";
+ return responeData;
+ }
+
+ List importRows;
+ try
+ {
+ importRows = MiniExcel.Query(path, startCell: "A1").ToList();
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = "模板错误:" + ex.Message;
+ return responeData;
+ }
+
+ if (importRows == null || importRows.Count == 0)
+ {
+ responeData.code = 0;
+ responeData.message = "导入数据为空!";
+ return responeData;
+ }
+
+ var warehouseList = Base_WarehouseService.GetWarehouseList(projectId);
+ var allStock = TwMaterialstockService.GetTw_MaterialStockByModle(new Tw_MaterialStockOutput
+ {
+ ProjectId = projectId
+ });
+ var errors = new List();
+ var detailRows = new List();
+ for (int i = 0; i < importRows.Count; i++)
+ {
+ var row = importRows[i];
+ string rowWarehouseCode = CleanImportText(row.WarehouseCode);
+ string materialCode = CleanImportText(row.MaterialCode);
+ string heatNo = CleanImportText(row.HeatNo);
+ string batchNo = CleanImportText(row.BatchNo);
+ string numText = CleanImportText(row.Num);
+ string outputDateText = CleanImportDateText(row.OutputDate);
+ string reqUnitName = CleanImportText(row.ReqUnitName);
+ int rowIndex = i + 2;
+
+ if (string.IsNullOrEmpty(rowWarehouseCode) && string.IsNullOrEmpty(materialCode) && string.IsNullOrEmpty(heatNo) && string.IsNullOrEmpty(batchNo)
+ && string.IsNullOrEmpty(numText) && string.IsNullOrEmpty(outputDateText) && string.IsNullOrEmpty(reqUnitName))
+ {
+ continue;
+ }
+
+ if (string.IsNullOrEmpty(rowWarehouseCode))
+ {
+ errors.Add("第" + rowIndex + "行,仓库,此项为必填项!");
+ continue;
+ }
+ if (!warehouseList.Any(x => x.WarehouseName == rowWarehouseCode))
+ {
+ errors.Add("第" + rowIndex + "行,仓库[" + rowWarehouseCode + "]不存在!");
+ continue;
+ }
+ if (string.IsNullOrEmpty(materialCode))
+ {
+ errors.Add("第" + rowIndex + "行,材料编码,此项为必填项!");
+ continue;
+ }
+ if (string.IsNullOrEmpty(heatNo))
+ {
+ errors.Add("第" + rowIndex + "行,炉号,此项为必填项!");
+ continue;
+ }
+ if (string.IsNullOrEmpty(batchNo))
+ {
+ errors.Add("第" + rowIndex + "行,批号,此项为必填项!");
+ continue;
+ }
+
+ decimal num;
+ if (!decimal.TryParse(numText, out num) || num <= 0)
+ {
+ errors.Add("第" + rowIndex + "行,数量,请输入大于0的数字!");
+ continue;
+ }
+
+ DateTime outputDate;
+ if (!TryParseImportDate(outputDateText, out outputDate))
+ {
+ errors.Add("第" + rowIndex + "行,出库时间,格式错误!");
+ continue;
+ }
+
+ var reqUnit = UnitService.getUnitByUnitName(reqUnitName);
+ if (reqUnit == null)
+ {
+ errors.Add("第" + rowIndex + "行,领用单位[" + reqUnitName + "]不存在!");
+ continue;
+ }
+
+ var stock = allStock.FirstOrDefault(x => x.WarehouseCode == rowWarehouseCode && x.Code == materialCode && x.HeatNo == heatNo && x.BatchNo == batchNo);
+ if (stock == null)
+ {
+ errors.Add("第" + rowIndex + "行,仓库[" + rowWarehouseCode + "]库存中不存在此材料编码/炉号/批号-" + materialCode + "/" + heatNo + "/" + batchNo);
+ continue;
+ }
+
+ detailRows.Add(new Tw_OutHistoryImportRow
+ {
+ WarehouseCode = stock.WarehouseCode,
+ MaterialCode = stock.PipeLineMatCode,
+ Code = stock.Code,
+ HeatNo = stock.HeatNo,
+ BatchNo = stock.BatchNo,
+ MaterialUnit = stock.MaterialUnit,
+ Num = num,
+ OutputDate = outputDate,
+ ReqUnitId = reqUnit.UnitId
+ });
+ }
+
+ if (errors.Count > 0)
+ {
+ responeData.code = 0;
+ responeData.message = string.Join("|", errors.Distinct());
+ return responeData;
+ }
+ if (detailRows.Count == 0)
+ {
+ responeData.code = 0;
+ responeData.message = "导入数据为空!";
+ return responeData;
+ }
+
+ var stockErrors = detailRows.GroupBy(x => new { x.WarehouseCode, x.MaterialCode })
+ .Select(x => new
+ {
+ x.Key.WarehouseCode,
+ x.Key.MaterialCode,
+ Num = x.Sum(y => y.Num),
+ Stock = allStock.FirstOrDefault(y => y.WarehouseCode == x.Key.WarehouseCode && y.PipeLineMatCode == x.Key.MaterialCode)
+ })
+ .Where(x => x.Stock == null || (x.Stock.StockNum ?? 0) < x.Num)
+ .Select(x => "仓库[" + x.WarehouseCode + "]" + (x.Stock == null ? x.MaterialCode : x.Stock.Code + "/" + x.Stock.HeatNo + "/" + x.Stock.BatchNo)
+ + "库存不足,库存:" + (x.Stock?.StockNum ?? 0) + ",导入数量:" + x.Num)
+ .ToList();
+ if (stockErrors.Count > 0)
+ {
+ responeData.code = 0;
+ responeData.message = string.Join("|", stockErrors);
+ return responeData;
+ }
+
+ int planCount = 0;
+ foreach (var group in detailRows.GroupBy(x => new
+ {
+ x.WarehouseCode,
+ x.ReqUnitId,
+ OutputDate = x.OutputDate.Date,
+ Category = IsPipeSectionUnit(x.MaterialUnit) ? (int)TwConst.Category.管段 : (int)TwConst.Category.管件
+ }))
+ {
+ var planId = SQLHelper.GetNewID();
+ string cusBillCode = GetDataInCusBillCode(projectId, UnitService.GetUnitCodeByUnitId(group.Key.ReqUnitId), TwConst.TypeInt.其他出库.ToString());
+ var planMaster = new Tw_InOutPlanMaster
+ {
+ Id = planId,
+ ProjectId = projectId,
+ CusBillCode = cusBillCode,
+ WarehouseCode = group.Key.WarehouseCode,
+ WeldTaskId = unitWorkId,
+ Source = 2,
+ InOutType = (int)TwConst.InOutType.出库,
+ TypeInt = (int)TwConst.TypeInt.其他出库,
+ State = (int)TwConst.State.已审核,
+ Category = group.Key.Category,
+ CreateMan = createUserId,
+ CreateDate = group.Key.OutputDate,
+ ReqUnitId = group.Key.ReqUnitId,
+ AuditMan = createUserId,
+ AuditDate = group.Key.OutputDate,
+ AuditMan2 = createUserId,
+ AuditDate2 = group.Key.OutputDate,
+ WarehouseMan = createUserId,
+ WarehouseDate = group.Key.OutputDate,
+ Remark = oriFileName
+ };
+ Add(planMaster);
+
+ var outputDetails = new List();
+ int sortIndex = 1;
+ foreach (var detailGroup in group.GroupBy(x => x.MaterialCode))
+ {
+ decimal num = detailGroup.Sum(x => x.Num);
+ TwInOutplandetailService.Add(new Tw_InOutPlanDetail
+ {
+ Id = SQLHelper.GetNewID(),
+ InOutPlanMasterId = planId,
+ MaterialCode = detailGroup.Key,
+ PlanNum = num,
+ ActNum = num,
+ SortIndex = sortIndex
+ });
+ outputDetails.Add(new Tw_OutputDetail
+ {
+ MaterialCode = detailGroup.Key,
+ PlanNum = num,
+ ActNum = num
+ });
+ sortIndex++;
+ }
+
+ TwOutputmasterService.GenOutMasterByPlanId(planId, outputDetails);
+ planCount++;
+ }
+
+ responeData.code = 1;
+ responeData.message = "导入成功,生成出库申请单/出库单" + planCount + "张。";
+ return responeData;
+ }
+
+ private static bool IsPipeSectionUnit(string materialUnit)
+ {
+ return CleanImportText(materialUnit) == "米";
+ }
+
+ private static string CleanImportText(string value)
+ {
+ return Convert.ToString(value).Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", "").Trim();
+ }
+
+ private static string CleanImportDateText(string value)
+ {
+ return Convert.ToString(value).Replace("\n", "").Replace("\t", " ").Replace("\r", "").Trim();
+ }
+
+ private static bool TryParseImportDate(string value, out DateTime date)
+ {
+ date = default(DateTime);
+ if (string.IsNullOrEmpty(value))
+ {
+ return false;
+ }
+
+ double oaDate;
+ if (double.TryParse(value, NumberStyles.Float, CultureInfo.InvariantCulture, out oaDate) && oaDate > 0)
+ {
+ try
+ {
+ date = DateTime.FromOADate(oaDate);
+ return true;
+ }
+ catch
+ {
+ return false;
+ }
+ }
+
+ return DateTime.TryParse(value, CultureInfo.GetCultureInfo("zh-CN"), DateTimeStyles.None, out date)
+ || DateTime.TryParse(value, CultureInfo.InvariantCulture, DateTimeStyles.None, out date);
+ }
+
public static Model.Tw_InOutPlanMaster GetById(string Id)
{
return Funs.DB.Tw_InOutPlanMaster.FirstOrDefault(x => x.Id == Id);
diff --git a/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx b/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx
index 6e34cb4e..2bebeded 100644
--- a/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx
+++ b/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx
@@ -86,6 +86,8 @@
+
+
diff --git a/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.cs b/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.cs
index 66da288a..10d0e45b 100644
--- a/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.cs
+++ b/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.cs
@@ -413,6 +413,26 @@ namespace FineUIPro.Web.CLGL
}
}
+ protected void btnHistoryImport_Click(object sender, EventArgs e)
+ {
+ if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.Tw_OutPlanMasterMenuId, Const.BtnAdd))
+ {
+ if (string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
+ {
+ Alert.ShowInTop("请选择单位工程!", MessageBoxIcon.Warning);
+ return;
+ }
+ else
+ {
+ PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("OutPlanMasterHistoryImport.aspx?UnitWorkId={0}", tvControlItem.SelectedNodeID)));
+ }
+ }
+ else
+ {
+ ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
+ }
+ }
+
protected void btnMenuInOutPlanMasterDelete_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.Tw_OutPlanMasterMenuId, Const.BtnDelete))
@@ -680,6 +700,7 @@ namespace FineUIPro.Web.CLGL
if (buttonList.Contains(BLL.Const.BtnAdd))
{
this.btnNew.Hidden = false;
+ this.btnHistoryImport.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnModify))
{
@@ -703,4 +724,4 @@ namespace FineUIPro.Web.CLGL
}
-}
\ No newline at end of file
+}
diff --git a/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.designer.cs b/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.designer.cs
index ce42a0a3..deca658e 100644
--- a/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.designer.cs
@@ -185,6 +185,15 @@ namespace FineUIPro.Web.CLGL
///
protected global::FineUIPro.Button btnNew;
+ ///
+ /// btnHistoryImport 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnHistoryImport;
+
///
/// btnPassMaster 控件。
///
diff --git a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterHistoryImport.aspx b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterHistoryImport.aspx
new file mode 100644
index 00000000..8fe782f0
--- /dev/null
+++ b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterHistoryImport.aspx
@@ -0,0 +1,49 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OutPlanMasterHistoryImport.aspx.cs" Inherits="FineUIPro.Web.CLGL.OutPlanMasterHistoryImport" %>
+
+
+
+
+
+ 历史出库数据导入
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterHistoryImport.aspx.cs b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterHistoryImport.aspx.cs
new file mode 100644
index 00000000..55c81f1d
--- /dev/null
+++ b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterHistoryImport.aspx.cs
@@ -0,0 +1,137 @@
+using BLL;
+using MiniExcelLibs;
+using Model;
+using System;
+using System.Data;
+using System.IO;
+using System.Text;
+using System.Web;
+
+namespace FineUIPro.Web.CLGL
+{
+ public partial class OutPlanMasterHistoryImport : PageBase
+ {
+ private readonly string initPath = Const.ExcelUrl;
+
+ ///
+ /// 单位工程主键
+ ///
+ public string UnitWorkId
+ {
+ get
+ {
+ return (string)ViewState["UnitWorkId"];
+ }
+ set
+ {
+ ViewState["UnitWorkId"] = value;
+ }
+ }
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ UnitWorkId = Request.Params["UnitWorkId"];
+ hdFileName.Text = string.Empty;
+ }
+ }
+
+ protected void btnImport_Click(object sender, EventArgs e)
+ {
+ if (string.IsNullOrEmpty(UnitWorkId))
+ {
+ ShowNotify("请选择单位工程!", MessageBoxIcon.Warning);
+ return;
+ }
+
+ if (fuAttachUrl.HasFile == false)
+ {
+ ShowNotify("请选择Excel文件!", MessageBoxIcon.Warning);
+ return;
+ }
+
+ string isXls = Path.GetExtension(fuAttachUrl.FileName).Trim().ToLower();
+ if (isXls != ".xlsx")
+ {
+ ShowNotify("只能选择xlsx格式Excel文件!", MessageBoxIcon.Warning);
+ return;
+ }
+
+ string rootPath = Server.MapPath("~/");
+ string initFullPath = rootPath + initPath;
+ if (!Directory.Exists(initFullPath))
+ {
+ Directory.CreateDirectory(initFullPath);
+ }
+
+ hdFileName.Text = Funs.GetNewFileName() + isXls;
+ string filePath = initFullPath + hdFileName.Text;
+ fuAttachUrl.PostedFile.SaveAs(filePath);
+
+ ResponeData responeData = TwInOutplanmasterService.ImportOutHistoryData(
+ fuAttachUrl.FileName,
+ filePath,
+ this.CurrUser.LoginProjectId,
+ this.CurrUser.PersonId,
+ UnitWorkId);
+
+ if (responeData.code == 1)
+ {
+ DeleteTempFile(filePath);
+ ShowNotify(responeData.message, MessageBoxIcon.Success);
+ PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
+ }
+ else
+ {
+ Alert alert = new Alert
+ {
+ Message = responeData.message,
+ MessageBoxIcon = MessageBoxIcon.Error
+ };
+ alert.Show();
+ }
+ }
+
+ protected void btnDownLoad_Click(object sender, EventArgs e)
+ {
+ string rootPath = Server.MapPath("~/");
+ string tempDirectory = rootPath + @"File\Excel\Temp\";
+ if (!Directory.Exists(tempDirectory))
+ {
+ Directory.CreateDirectory(tempDirectory);
+ }
+
+ string tempPath = tempDirectory + "历史出库数据导入模板" + string.Format("{0:yyyyMMddHHmmss}", DateTime.Now) + ".xlsx";
+ DataTable template = new DataTable();
+ template.Columns.Add("仓库");
+ template.Columns.Add("材料编码");
+ template.Columns.Add("炉号");
+ template.Columns.Add("批号");
+ template.Columns.Add("数量");
+ template.Columns.Add("出库时间");
+ template.Columns.Add("领用单位");
+ MiniExcel.SaveAs(tempPath, template);
+
+ FileInfo info = new FileInfo(tempPath);
+ long fileSize = info.Length;
+ Response.ClearContent();
+ Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode("历史出库数据导入模板.xlsx", Encoding.UTF8));
+ Response.ContentType = "excel/plain";
+ Response.ContentEncoding = Encoding.UTF8;
+ Response.AddHeader("Content-Length", fileSize.ToString().Trim());
+ Response.TransmitFile(tempPath, 0, fileSize);
+ Response.Flush();
+ Response.Close();
+ DeleteTempFile(tempPath);
+ }
+
+ private void DeleteTempFile(string filePath)
+ {
+ if (!string.IsNullOrEmpty(filePath) && File.Exists(filePath))
+ {
+ File.Delete(filePath);
+ }
+ }
+ }
+}
diff --git a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterHistoryImport.aspx.designer.cs b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterHistoryImport.aspx.designer.cs
new file mode 100644
index 00000000..6fdba655
--- /dev/null
+++ b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterHistoryImport.aspx.designer.cs
@@ -0,0 +1,98 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.CLGL
+{
+
+
+ public partial class OutPlanMasterHistoryImport
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// hdFileName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdFileName;
+
+ ///
+ /// btnDownLoad 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnDownLoad;
+
+ ///
+ /// btnImport 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnImport;
+
+ ///
+ /// fuAttachUrl 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.FileUpload fuAttachUrl;
+
+ ///
+ /// lblTip 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label lblTip;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index fe56ad28..3a383262 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -352,6 +352,7 @@
+
@@ -8217,6 +8218,13 @@
OutPlanMasterDetailImport.aspx
+
+ OutPlanMasterHistoryImport.aspx
+ ASPXCodeBehind
+
+
+ OutPlanMasterHistoryImport.aspx
+
OutPlanMasterEdit.aspx
ASPXCodeBehind
@@ -17174,7 +17182,7 @@
-
+
diff --git a/SGGL/Model/CLGL/Tw_OutHistoryDataIn.cs b/SGGL/Model/CLGL/Tw_OutHistoryDataIn.cs
new file mode 100644
index 00000000..c9c7c612
--- /dev/null
+++ b/SGGL/Model/CLGL/Tw_OutHistoryDataIn.cs
@@ -0,0 +1,42 @@
+using MiniExcelLibs.Attributes;
+
+namespace Model
+{
+ public class Tw_OutHistoryDataIn
+ {
+ ///
+ /// 仓库
+ ///
+ [ExcelColumnIndex("A")] public string WarehouseCode { get; set; }
+
+ ///
+ /// 材料编码
+ ///
+ [ExcelColumnIndex("B")] public string MaterialCode { get; set; }
+
+ ///
+ /// 炉号
+ ///
+ [ExcelColumnIndex("C")] public string HeatNo { get; set; }
+
+ ///
+ /// 批号
+ ///
+ [ExcelColumnIndex("D")] public string BatchNo { get; set; }
+
+ ///
+ /// 数量
+ ///
+ [ExcelColumnIndex("E")] public string Num { get; set; }
+
+ ///
+ /// 出库时间
+ ///
+ [ExcelColumnIndex("F")] public string OutputDate { get; set; }
+
+ ///
+ /// 领用单位
+ ///
+ [ExcelColumnIndex("G")] public string ReqUnitName { get; set; }
+ }
+}
diff --git a/SGGL/Model/CLGL/Tw_OutHistoryImportRow.cs b/SGGL/Model/CLGL/Tw_OutHistoryImportRow.cs
new file mode 100644
index 00000000..1d67b137
--- /dev/null
+++ b/SGGL/Model/CLGL/Tw_OutHistoryImportRow.cs
@@ -0,0 +1,25 @@
+using System;
+
+namespace Model
+{
+ public class Tw_OutHistoryImportRow
+ {
+ public string WarehouseCode { get; set; }
+
+ public string MaterialCode { get; set; }
+
+ public string Code { get; set; }
+
+ public string HeatNo { get; set; }
+
+ public string BatchNo { get; set; }
+
+ public string MaterialUnit { get; set; }
+
+ public decimal Num { get; set; }
+
+ public DateTime OutputDate { get; set; }
+
+ public string ReqUnitId { get; set; }
+ }
+}
diff --git a/SGGL/Model/Model.csproj b/SGGL/Model/Model.csproj
index e125345b..0371a7f1 100644
--- a/SGGL/Model/Model.csproj
+++ b/SGGL/Model/Model.csproj
@@ -229,6 +229,8 @@
+
+