This commit is contained in:
高飞 2026-05-20 14:58:26 +08:00
parent 2b1edf17c1
commit 2e2dd81c16
15 changed files with 462 additions and 818 deletions

View File

@ -0,0 +1,7 @@
alter table HJGL_MaterialCodeLib add HeatNo nvarchar(50) null
alter table Tw_InOutPlanDetail add HeatNo nvarchar(50) null
GO
insert into Sys_Menu
values('2F027233-22EC-4063-A04F-FB9FE6A91588','第蹋累踱',null,'HJGL/BaseInfo/Warehouse.aspx',30,'60F4B988-4D1D-48D6-A959-2EA4BD2978A1','Menu_HJGL',0,1,1)
GO

View File

@ -43,6 +43,7 @@ namespace BLL
InOutPlanMasterId = x.InOutPlanMasterId, InOutPlanMasterId = x.InOutPlanMasterId,
PipelineComponentId = x.PipelineComponentId, PipelineComponentId = x.PipelineComponentId,
MaterialCode = x.MaterialCode, MaterialCode = x.MaterialCode,
HeatNo = x.HeatNo,
PlanNum = x.PlanNum, PlanNum = x.PlanNum,
ActNum = x.ActNum, ActNum = x.ActNum,
PipelineComponentCode = y.PipelineComponentCode, PipelineComponentCode = y.PipelineComponentCode,
@ -108,13 +109,27 @@ namespace BLL
public static void AddList(IEnumerable<Model.Tw_InOutPlanDetail> list, string inoutPlanMasterId) public static void AddList(IEnumerable<Model.Tw_InOutPlanDetail> list, string inoutPlanMasterId)
{ {
int sortIndex = 1; int sortIndex = 1;
List<Model.Tw_InOutPlanDetail> details = new List<Model.Tw_InOutPlanDetail>();
foreach (var item in list) foreach (var item in list)
{ {
item.Id = SQLHelper.GetNewID(); Model.Tw_InOutPlanDetail table = new Model.Tw_InOutPlanDetail
item.SortIndex = sortIndex; {
item.InOutPlanMasterId = inoutPlanMasterId; Id = SQLHelper.GetNewID(),
Add(item); InOutPlanMasterId = inoutPlanMasterId,
PipelineComponentId = item.PipelineComponentId,
MaterialCode = item.MaterialCode,
PlanNum = item.PlanNum,
ActNum = item.ActNum,
SortIndex = sortIndex,
HeatNo = item.HeatNo
};
sortIndex++; sortIndex++;
details.Add(table);
}
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
db.Tw_InOutPlanDetail.InsertAllOnSubmit(details);
db.SubmitChanges();
} }
} }
public static void Update(Model.Tw_InOutPlanDetail newtable) public static void Update(Model.Tw_InOutPlanDetail newtable)

View File

@ -273,12 +273,12 @@ namespace BLL
if (!string.IsNullOrEmpty(errorWarehouseCode)) if (!string.IsNullOrEmpty(errorWarehouseCode))
{ {
if (temeplateDtoIns.Count == 0) //if (temeplateDtoIns.Count == 0)
{ //{
responeData.code = 0; responeData.code = 0;
responeData.message = errorWarehouseCode + "仓库不存在!"; responeData.message = errorWarehouseCode + "仓库不存在!";
return responeData; return responeData;
} //}
} }
var typeString = temeplateDtoIns.Select(x => x.TypeString).Distinct().ToList(); //获取导入文件的类型 var typeString = temeplateDtoIns.Select(x => x.TypeString).Distinct().ToList(); //获取导入文件的类型
if (typeString.Where(x => string.IsNullOrEmpty(x)).Count() > 0) if (typeString.Where(x => string.IsNullOrEmpty(x)).Count() > 0)
@ -295,21 +295,21 @@ namespace BLL
} }
var materialCodeList = temeplateDtoIns.Select(x => x.MaterialCode).Distinct().ToList(); //获取导入文件的材料编码 //var materialCodeList = temeplateDtoIns.Select(x => x.MaterialCode).Distinct().ToList(); //获取导入文件的材料编码
var IsExitMaterialCode = //var IsExitMaterialCode =
from x in Funs.DB.HJGL_MaterialCodeLib // from x in Funs.DB.HJGL_MaterialCodeLib
where materialCodeList.Contains(x.MaterialCode) // where materialCodeList.Contains(x.MaterialCode)
select x.MaterialCode; // select x.MaterialCode;
if (IsExitMaterialCode.Count() < materialCodeList.Count) //if (IsExitMaterialCode.Count() < materialCodeList.Count)
{ //{
var errorMaterialCode = materialCodeList.Except(IsExitMaterialCode.ToList()); // var errorMaterialCode = materialCodeList.Except(IsExitMaterialCode.ToList());
if (errorMaterialCode.Count() > 0) // if (errorMaterialCode.Count() > 0)
{ // {
responeData.code = 0; // responeData.code = 0;
responeData.message = string.Join(",", errorMaterialCode) + "材料不存在!"; // responeData.message = string.Join(",", errorMaterialCode) + "材料不存在!";
return responeData; // return responeData;
} // }
} //}
string cusbilcode = GetDataInCusBillCode(projectid, UnitService.GetUnitCodeByUnitId(Person_PersonsService.GetPerson_PersonsById(creatUserId).UnitId), temeplateDtoIns.FirstOrDefault().TypeString); string cusbilcode = GetDataInCusBillCode(projectid, UnitService.GetUnitCodeByUnitId(Person_PersonsService.GetPerson_PersonsById(creatUserId).UnitId), temeplateDtoIns.FirstOrDefault().TypeString);
foreach (var item in temeplateDtoIns) foreach (var item in temeplateDtoIns)
{ {
@ -367,6 +367,7 @@ namespace BLL
twInOutPlanMaster.CreateDate = DateTime.Now; twInOutPlanMaster.CreateDate = DateTime.Now;
twInOutPlanMaster.Remark = OriFileName; twInOutPlanMaster.Remark = OriFileName;
Add(twInOutPlanMaster); Add(twInOutPlanMaster);
MaterialCodeLibService.AddList(temeplateDtoIns); //插入材料编码库
TwInOutplandetailService.AddList(twInOutPlanDetails, twInOutPlanMaster.Id); //插入入库明细 TwInOutplandetailService.AddList(twInOutPlanDetails, twInOutPlanMaster.Id); //插入入库明细
} }

View File

@ -29,6 +29,7 @@
Model.HJGL_MaterialCodeLib newCodeLib = new HJGL_MaterialCodeLib Model.HJGL_MaterialCodeLib newCodeLib = new HJGL_MaterialCodeLib
{ {
MaterialCode = codeLib.MaterialCode, MaterialCode = codeLib.MaterialCode,
HeatNo = codeLib.HeatNo,
MaterialName = codeLib.MaterialName, MaterialName = codeLib.MaterialName,
MaterialSpec = codeLib.MaterialSpec, MaterialSpec = codeLib.MaterialSpec,
MaterialMade = codeLib.MaterialMade, MaterialMade = codeLib.MaterialMade,
@ -56,6 +57,7 @@
Model.HJGL_MaterialCodeLib newCodeLib = db.HJGL_MaterialCodeLib.FirstOrDefault(e => e.MaterialCode == codeLib.MaterialCode); Model.HJGL_MaterialCodeLib newCodeLib = db.HJGL_MaterialCodeLib.FirstOrDefault(e => e.MaterialCode == codeLib.MaterialCode);
if (newCodeLib != null) if (newCodeLib != null)
{ {
newCodeLib.HeatNo = codeLib.HeatNo;
newCodeLib.MaterialName = codeLib.MaterialName; newCodeLib.MaterialName = codeLib.MaterialName;
newCodeLib.MaterialSpec = codeLib.MaterialSpec; newCodeLib.MaterialSpec = codeLib.MaterialSpec;
newCodeLib.MaterialMade = codeLib.MaterialMade; newCodeLib.MaterialMade = codeLib.MaterialMade;
@ -80,6 +82,38 @@
db.SubmitChanges(); db.SubmitChanges();
} }
} }
/// <summary>
/// 批量添加材料库
/// </summary>
/// <param name="list"></param>
/// <param name="inoutPlanMasterId"></param>
public static void AddList(List<Tw_InputDataIn> list)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var materialCodes = from x in db.HJGL_MaterialCodeLib select x.MaterialCode;
var ls = from x in list
where !materialCodes.Contains(x.MaterialCode)
select x;
List<Model.HJGL_MaterialCodeLib> details = new List<Model.HJGL_MaterialCodeLib>();
foreach (var item in ls)
{
Model.HJGL_MaterialCodeLib table = new Model.HJGL_MaterialCodeLib
{
MaterialCode = item.MaterialCode,
HeatNo = item.HeatNo,
MaterialName = item.MaterialName,
MaterialSpec = item.MaterialSpec,
MaterialUnit = item.MaterialUnit
};
details.Add(table);
}
db.HJGL_MaterialCodeLib.InsertAllOnSubmit(details);
db.SubmitChanges();
}
}
} }
public class MaterialCodeLibDtoIn public class MaterialCodeLibDtoIn

View File

@ -140,7 +140,7 @@
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch"> ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Items> <Items>
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="true" Title="入库申请明细表" EnableCollapse="true" <f:Grid ID="Grid2" ShowBorder="true" ShowHeader="true" Title="入库申请明细表" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true" runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true" ForceFit="true"
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="MaterialCode" ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="MaterialCode"
SortDirection="DESC" EnableColumnLines="true" SortDirection="DESC" EnableColumnLines="true"
AllowPaging="true" IsDatabasePaging="true" PageSize="10000" EnableTextSelection="True" > AllowPaging="true" IsDatabasePaging="true" PageSize="10000" EnableTextSelection="True" >
@ -161,12 +161,15 @@
<f:RenderField Width="150px" ColumnID="MaterialCode" DataField="MaterialCode" SortField="MaterialCode" <f:RenderField Width="150px" ColumnID="MaterialCode" DataField="MaterialCode" SortField="MaterialCode"
FieldType="String" HeaderText="材料编码" TextAlign="Left" HeaderTextAlign="Center" > FieldType="String" HeaderText="材料编码" TextAlign="Left" HeaderTextAlign="Center" >
</f:RenderField> </f:RenderField>
<f:RenderField Width="150px" ColumnID="HeatNo" DataField="HeatNo" SortField="HeatNo"
FieldType="String" HeaderText="炉批号" TextAlign="Left" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="150px" ColumnID="MaterialName" DataField="MaterialName" SortField="MaterialName" <f:RenderField Width="150px" ColumnID="MaterialName" DataField="MaterialName" SortField="MaterialName"
FieldType="String" HeaderText="材料名称" TextAlign="Left" HeaderTextAlign="Center"> FieldType="String" HeaderText="材料名称" TextAlign="Left" HeaderTextAlign="Center">
</f:RenderField> </f:RenderField>
<f:RenderField Width="300px" ColumnID="MaterialDef" DataField="MaterialDef" SortField="MaterialDef" <%--<f:RenderField Width="300px" ColumnID="MaterialDef" DataField="MaterialDef" SortField="MaterialDef"
FieldType="String" HeaderText="材料描述" TextAlign="Left" HeaderTextAlign="Center" ExpandUnusedSpace="True"> FieldType="String" HeaderText="材料描述" TextAlign="Left" HeaderTextAlign="Center" ExpandUnusedSpace="True">
</f:RenderField> </f:RenderField>--%>
<f:RenderField Width="100px" ColumnID="PlanNum" DataField="PlanNum" SortField="PlanNum" <f:RenderField Width="100px" ColumnID="PlanNum" DataField="PlanNum" SortField="PlanNum"
FieldType="String" HeaderText="数量" TextAlign="Left" HeaderTextAlign="Center"> FieldType="String" HeaderText="数量" TextAlign="Left" HeaderTextAlign="Center">
</f:RenderField> </f:RenderField>

View File

@ -48,6 +48,10 @@
FieldType="String" HeaderText="材料编码" HeaderTextAlign="Center" FieldType="String" HeaderText="材料编码" HeaderTextAlign="Center"
TextAlign="Left" SortField="MaterialCode"> TextAlign="Left" SortField="MaterialCode">
</f:RenderField> </f:RenderField>
<f:RenderField Width="200px" ColumnID="HeatNo" DataField="HeatNo"
FieldType="String" HeaderText="炉批号" HeaderTextAlign="Center"
TextAlign="Left" SortField="HeatNo">
</f:RenderField>
<f:RenderField Width="200px" ColumnID="MaterialName" DataField="MaterialName" <f:RenderField Width="200px" ColumnID="MaterialName" DataField="MaterialName"
FieldType="String" HeaderText="类型" HeaderTextAlign="Center" FieldType="String" HeaderText="类型" HeaderTextAlign="Center"
TextAlign="Left" SortField="MaterialName"> TextAlign="Left" SortField="MaterialName">

View File

@ -19,6 +19,13 @@
Required="true" MaxLength="50" ShowRedStar="true" FocusOnPageLoad="true" LabelWidth="100px"> Required="true" MaxLength="50" ShowRedStar="true" FocusOnPageLoad="true" LabelWidth="100px">
</f:TextBox> </f:TextBox>
</Items> </Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtHeatNo" runat="server" Label="炉批号"
Required="true" MaxLength="50" ShowRedStar="true" LabelWidth="100px">
</f:TextBox>
</Items>
</f:FormRow> </f:FormRow>
<f:FormRow> <f:FormRow>
<Items> <Items>

View File

@ -25,6 +25,7 @@ namespace FineUIPro.Web.HJGL.BaseInfo
{ {
this.txtMaterialCode.Text = materialCode; this.txtMaterialCode.Text = materialCode;
this.txtMaterialMade.Text = lib.MaterialMade; this.txtMaterialMade.Text = lib.MaterialMade;
this.txtHeatNo.Text = lib.HeatNo;
this.txtMaterialName.Text = lib.MaterialName; this.txtMaterialName.Text = lib.MaterialName;
txtMaterialSpec.Text = lib.MaterialSpec; txtMaterialSpec.Text = lib.MaterialSpec;
txtMaterialDef.Text = lib.MaterialDef; txtMaterialDef.Text = lib.MaterialDef;
@ -62,6 +63,7 @@ namespace FineUIPro.Web.HJGL.BaseInfo
Model.HJGL_MaterialCodeLib newLib = new Model.HJGL_MaterialCodeLib Model.HJGL_MaterialCodeLib newLib = new Model.HJGL_MaterialCodeLib
{ {
MaterialCode = this.txtMaterialCode.Text.Trim(), MaterialCode = this.txtMaterialCode.Text.Trim(),
HeatNo = this.txtHeatNo.Text.Trim(),
MaterialName = this.txtMaterialName.Text.Trim(), MaterialName = this.txtMaterialName.Text.Trim(),
MaterialSpec = this.txtMaterialSpec.Text.Trim(), MaterialSpec = this.txtMaterialSpec.Text.Trim(),
MaterialMade = this.txtMaterialMade.Text.Trim(), MaterialMade = this.txtMaterialMade.Text.Trim(),

View File

@ -48,6 +48,15 @@ namespace FineUIPro.Web.HJGL.BaseInfo {
/// </remarks> /// </remarks>
protected global::FineUIPro.TextBox txtMaterialCode; protected global::FineUIPro.TextBox txtMaterialCode;
/// <summary>
/// txtHeatNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtHeatNo;
/// <summary> /// <summary>
/// txtMaterialName 控件。 /// txtMaterialName 控件。
/// </summary> /// </summary>

View File

@ -4,6 +4,7 @@
<TreeNode id="8IDKGJE2-09B1-1234-VC6D-865CE48F0005" Text="管道等级" NavigateUrl="HJGL/BaseInfo/PipingClass.aspx"> <TreeNode id="8IDKGJE2-09B1-1234-VC6D-865CE48F0005" Text="管道等级" NavigateUrl="HJGL/BaseInfo/PipingClass.aspx">
</TreeNode> </TreeNode>
<TreeNode id="8IDKGJE2-09B1-4607-BC6D-865CE48F0014" Text="管道介质" NavigateUrl="HJGL/BaseInfo/Medium.aspx"></TreeNode> <TreeNode id="8IDKGJE2-09B1-4607-BC6D-865CE48F0014" Text="管道介质" NavigateUrl="HJGL/BaseInfo/Medium.aspx"></TreeNode>
<TreeNode id="2F027233-22EC-4063-A04F-FB9FE6A91588" Text="材料仓库" NavigateUrl="HJGL/BaseInfo/Warehouse.aspx"></TreeNode>
<TreeNode id="F6194C00-D256-485D-9056-171FAB75928A" Text="管道颜色标识库" NavigateUrl="HJGL/BaseInfo/MaterialColor.aspx"></TreeNode> <TreeNode id="F6194C00-D256-485D-9056-171FAB75928A" Text="管道颜色标识库" NavigateUrl="HJGL/BaseInfo/MaterialColor.aspx"></TreeNode>
</TreeNode> </TreeNode>
<TreeNode id="8IDKGJE2-09B1-4607-DCS2-DCC3O48F080F" Text="数据导入" NavigateUrl=""><TreeNode id="B13BFFA5-3112-4209-8562-5329B78B405C" Text="三维模型导入" NavigateUrl="HJGL/DataImport/TDMImport.aspx"></TreeNode> <TreeNode id="8IDKGJE2-09B1-4607-DCS2-DCC3O48F080F" Text="数据导入" NavigateUrl=""><TreeNode id="B13BFFA5-3112-4209-8562-5329B78B405C" Text="三维模型导入" NavigateUrl="HJGL/DataImport/TDMImport.aspx"></TreeNode>

View File

@ -13,6 +13,10 @@ namespace Model
/// </summary> /// </summary>
public string PipelineComponentCode { get; set; } public string PipelineComponentCode { get; set; }
/// <summary> /// <summary>
/// 炉批号
/// </summary>
public string HeatNo { get; set; }
/// <summary>
/// 材料名称 /// 材料名称
/// </summary> /// </summary>
public string MaterialName { get; set; } public string MaterialName { get; set; }

View File

@ -17,13 +17,29 @@ namespace Model
/// </summary> /// </summary>
[ExcelColumnIndex("B")] public string MaterialCode { get; set; } [ExcelColumnIndex("B")] public string MaterialCode { get; set; }
/// <summary> /// <summary>
/// 数量 /// 炉批号
/// </summary> /// </summary>
[ExcelColumnIndex("C")] public string PlanNum { get; set; } [ExcelColumnIndex("C")] public string HeatNo { get; set; }
/// <summary> /// <summary>
/// 类型 /// 类型
/// </summary> /// </summary>
[ExcelColumnIndex("D")] public string TypeString { get; set; } [ExcelColumnIndex("D")] public string MaterialName { get; set; }
/// <summary>
/// 规格
/// </summary>
[ExcelColumnIndex("E")] public string MaterialSpec { get; set; }
/// <summary>
/// 单位
/// </summary>
[ExcelColumnIndex("F")] public string MaterialUnit { get; set; }
/// <summary>
/// 数量
/// </summary>
[ExcelColumnIndex("G")] public string PlanNum { get; set; }
/// <summary>
/// 类型
/// </summary>
[ExcelColumnIndex("H")] public string TypeString { get; set; }
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -4,13 +4,13 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
--> -->
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<DeleteExistingFiles>true</DeleteExistingFiles> <DeleteExistingFiles>True</DeleteExistingFiles>
<ExcludeApp_Data>false</ExcludeApp_Data> <ExcludeApp_Data>False</ExcludeApp_Data>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish> <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform> <LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider> <PublishProvider>FileSystem</PublishProvider>
<PublishUrl>E:\Package\赛鼎工程有限公司\SGGLAPI</PublishUrl> <PublishUrl>E:\Package\陕化建</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod> <WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish /> <SiteUrlToLaunchAfterPublish />
</PropertyGroup> </PropertyGroup>