This commit is contained in:
parent
2b1edf17c1
commit
2e2dd81c16
|
|
@ -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
|
||||
|
|
@ -43,6 +43,7 @@ namespace BLL
|
|||
InOutPlanMasterId = x.InOutPlanMasterId,
|
||||
PipelineComponentId = x.PipelineComponentId,
|
||||
MaterialCode = x.MaterialCode,
|
||||
HeatNo = x.HeatNo,
|
||||
PlanNum = x.PlanNum,
|
||||
ActNum = x.ActNum,
|
||||
PipelineComponentCode = y.PipelineComponentCode,
|
||||
|
|
@ -108,13 +109,27 @@ namespace BLL
|
|||
public static void AddList(IEnumerable<Model.Tw_InOutPlanDetail> list, string inoutPlanMasterId)
|
||||
{
|
||||
int sortIndex = 1;
|
||||
List<Model.Tw_InOutPlanDetail> details = new List<Model.Tw_InOutPlanDetail>();
|
||||
foreach (var item in list)
|
||||
{
|
||||
item.Id = SQLHelper.GetNewID();
|
||||
item.SortIndex = sortIndex;
|
||||
item.InOutPlanMasterId = inoutPlanMasterId;
|
||||
Add(item);
|
||||
Model.Tw_InOutPlanDetail table = new Model.Tw_InOutPlanDetail
|
||||
{
|
||||
Id = SQLHelper.GetNewID(),
|
||||
InOutPlanMasterId = inoutPlanMasterId,
|
||||
PipelineComponentId = item.PipelineComponentId,
|
||||
MaterialCode = item.MaterialCode,
|
||||
PlanNum = item.PlanNum,
|
||||
ActNum = item.ActNum,
|
||||
SortIndex = sortIndex,
|
||||
HeatNo = item.HeatNo
|
||||
};
|
||||
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)
|
||||
|
|
|
|||
|
|
@ -273,12 +273,12 @@ namespace BLL
|
|||
|
||||
if (!string.IsNullOrEmpty(errorWarehouseCode))
|
||||
{
|
||||
if (temeplateDtoIns.Count == 0)
|
||||
{
|
||||
//if (temeplateDtoIns.Count == 0)
|
||||
//{
|
||||
responeData.code = 0;
|
||||
responeData.message = errorWarehouseCode + "仓库不存在!";
|
||||
return responeData;
|
||||
}
|
||||
//}
|
||||
}
|
||||
var typeString = temeplateDtoIns.Select(x => x.TypeString).Distinct().ToList(); //获取导入文件的类型
|
||||
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 IsExitMaterialCode =
|
||||
from x in Funs.DB.HJGL_MaterialCodeLib
|
||||
where materialCodeList.Contains(x.MaterialCode)
|
||||
select x.MaterialCode;
|
||||
if (IsExitMaterialCode.Count() < materialCodeList.Count)
|
||||
{
|
||||
var errorMaterialCode = materialCodeList.Except(IsExitMaterialCode.ToList());
|
||||
if (errorMaterialCode.Count() > 0)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = string.Join(",", errorMaterialCode) + "材料不存在!";
|
||||
return responeData;
|
||||
}
|
||||
}
|
||||
//var materialCodeList = temeplateDtoIns.Select(x => x.MaterialCode).Distinct().ToList(); //获取导入文件的材料编码
|
||||
//var IsExitMaterialCode =
|
||||
// from x in Funs.DB.HJGL_MaterialCodeLib
|
||||
// where materialCodeList.Contains(x.MaterialCode)
|
||||
// select x.MaterialCode;
|
||||
//if (IsExitMaterialCode.Count() < materialCodeList.Count)
|
||||
//{
|
||||
// var errorMaterialCode = materialCodeList.Except(IsExitMaterialCode.ToList());
|
||||
// if (errorMaterialCode.Count() > 0)
|
||||
// {
|
||||
// responeData.code = 0;
|
||||
// responeData.message = string.Join(",", errorMaterialCode) + "材料不存在!";
|
||||
// return responeData;
|
||||
// }
|
||||
//}
|
||||
string cusbilcode = GetDataInCusBillCode(projectid, UnitService.GetUnitCodeByUnitId(Person_PersonsService.GetPerson_PersonsById(creatUserId).UnitId), temeplateDtoIns.FirstOrDefault().TypeString);
|
||||
foreach (var item in temeplateDtoIns)
|
||||
{
|
||||
|
|
@ -367,6 +367,7 @@ namespace BLL
|
|||
twInOutPlanMaster.CreateDate = DateTime.Now;
|
||||
twInOutPlanMaster.Remark = OriFileName;
|
||||
Add(twInOutPlanMaster);
|
||||
MaterialCodeLibService.AddList(temeplateDtoIns); //插入材料编码库
|
||||
TwInOutplandetailService.AddList(twInOutPlanDetails, twInOutPlanMaster.Id); //插入入库明细
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
Model.HJGL_MaterialCodeLib newCodeLib = new HJGL_MaterialCodeLib
|
||||
{
|
||||
MaterialCode = codeLib.MaterialCode,
|
||||
HeatNo = codeLib.HeatNo,
|
||||
MaterialName = codeLib.MaterialName,
|
||||
MaterialSpec = codeLib.MaterialSpec,
|
||||
MaterialMade = codeLib.MaterialMade,
|
||||
|
|
@ -56,6 +57,7 @@
|
|||
Model.HJGL_MaterialCodeLib newCodeLib = db.HJGL_MaterialCodeLib.FirstOrDefault(e => e.MaterialCode == codeLib.MaterialCode);
|
||||
if (newCodeLib != null)
|
||||
{
|
||||
newCodeLib.HeatNo = codeLib.HeatNo;
|
||||
newCodeLib.MaterialName = codeLib.MaterialName;
|
||||
newCodeLib.MaterialSpec = codeLib.MaterialSpec;
|
||||
newCodeLib.MaterialMade = codeLib.MaterialMade;
|
||||
|
|
@ -80,6 +82,38 @@
|
|||
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
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@
|
|||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<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"
|
||||
SortDirection="DESC" EnableColumnLines="true"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="10000" EnableTextSelection="True" >
|
||||
|
|
@ -161,12 +161,15 @@
|
|||
<f:RenderField Width="150px" ColumnID="MaterialCode" DataField="MaterialCode" SortField="MaterialCode"
|
||||
FieldType="String" HeaderText="材料编码" TextAlign="Left" HeaderTextAlign="Center" >
|
||||
</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"
|
||||
FieldType="String" HeaderText="材料名称" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</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">
|
||||
</f:RenderField>
|
||||
</f:RenderField>--%>
|
||||
<f:RenderField Width="100px" ColumnID="PlanNum" DataField="PlanNum" SortField="PlanNum"
|
||||
FieldType="String" HeaderText="数量" TextAlign="Left" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -48,6 +48,10 @@
|
|||
FieldType="String" HeaderText="材料编码" HeaderTextAlign="Center"
|
||||
TextAlign="Left" SortField="MaterialCode">
|
||||
</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"
|
||||
FieldType="String" HeaderText="类型" HeaderTextAlign="Center"
|
||||
TextAlign="Left" SortField="MaterialName">
|
||||
|
|
|
|||
|
|
@ -19,6 +19,13 @@
|
|||
Required="true" MaxLength="50" ShowRedStar="true" FocusOnPageLoad="true" LabelWidth="100px">
|
||||
</f:TextBox>
|
||||
</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>
|
||||
<Items>
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
|||
{
|
||||
this.txtMaterialCode.Text = materialCode;
|
||||
this.txtMaterialMade.Text = lib.MaterialMade;
|
||||
this.txtHeatNo.Text = lib.HeatNo;
|
||||
this.txtMaterialName.Text = lib.MaterialName;
|
||||
txtMaterialSpec.Text = lib.MaterialSpec;
|
||||
txtMaterialDef.Text = lib.MaterialDef;
|
||||
|
|
@ -62,6 +63,7 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
|||
Model.HJGL_MaterialCodeLib newLib = new Model.HJGL_MaterialCodeLib
|
||||
{
|
||||
MaterialCode = this.txtMaterialCode.Text.Trim(),
|
||||
HeatNo = this.txtHeatNo.Text.Trim(),
|
||||
MaterialName = this.txtMaterialName.Text.Trim(),
|
||||
MaterialSpec = this.txtMaterialSpec.Text.Trim(),
|
||||
MaterialMade = this.txtMaterialMade.Text.Trim(),
|
||||
|
|
|
|||
|
|
@ -48,6 +48,15 @@ namespace FineUIPro.Web.HJGL.BaseInfo {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtMaterialCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtHeatNo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtHeatNo;
|
||||
|
||||
/// <summary>
|
||||
/// txtMaterialName 控件。
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
<TreeNode id="8IDKGJE2-09B1-1234-VC6D-865CE48F0005" Text="管道等级" NavigateUrl="HJGL/BaseInfo/PipingClass.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>
|
||||
<TreeNode id="8IDKGJE2-09B1-4607-DCS2-DCC3O48F080F" Text="数据导入" NavigateUrl=""><TreeNode id="B13BFFA5-3112-4209-8562-5329B78B405C" Text="三维模型导入" NavigateUrl="HJGL/DataImport/TDMImport.aspx"></TreeNode>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,11 @@ namespace Model
|
|||
/// <summary>
|
||||
/// 预制组件代码
|
||||
/// </summary>
|
||||
public string PipelineComponentCode { get; set; }
|
||||
public string PipelineComponentCode { get; set; }
|
||||
/// <summary>
|
||||
/// 炉批号
|
||||
/// </summary>
|
||||
public string HeatNo { get; set; }
|
||||
/// <summary>
|
||||
/// 材料名称
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -17,13 +17,29 @@ namespace Model
|
|||
/// </summary>
|
||||
[ExcelColumnIndex("B")] public string MaterialCode { get; set; }
|
||||
/// <summary>
|
||||
/// 数量
|
||||
/// 炉批号
|
||||
/// </summary>
|
||||
[ExcelColumnIndex("C")] public string PlanNum { get; set; }
|
||||
[ExcelColumnIndex("C")] public string HeatNo { get; set; }
|
||||
/// <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; }
|
||||
|
||||
}
|
||||
}
|
||||
1111
SGGL/Model/Model.cs
1111
SGGL/Model/Model.cs
File diff suppressed because it is too large
Load Diff
|
|
@ -4,13 +4,13 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
|||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<DeleteExistingFiles>true</DeleteExistingFiles>
|
||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
||||
<DeleteExistingFiles>True</DeleteExistingFiles>
|
||||
<ExcludeApp_Data>False</ExcludeApp_Data>
|
||||
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<PublishProvider>FileSystem</PublishProvider>
|
||||
<PublishUrl>E:\Package\赛鼎工程有限公司\SGGLAPI</PublishUrl>
|
||||
<PublishUrl>E:\Package\陕化建</PublishUrl>
|
||||
<WebPublishMethod>FileSystem</WebPublishMethod>
|
||||
<SiteUrlToLaunchAfterPublish />
|
||||
</PropertyGroup>
|
||||
|
|
|
|||
Loading…
Reference in New Issue