Merge branch 'master' of https://gitee.com/frane-yang/SGGL_SeDin_New
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
namespace BLL
|
||||
{
|
||||
using MiniExcelLibs;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
@@ -1161,6 +1164,37 @@ namespace BLL
|
||||
dv.RowFilter = $"({filterRule})";
|
||||
return dv.ToTable();
|
||||
}
|
||||
|
||||
public static IEnumerable<dynamic> QueryWithoutEmptyRow(Stream stream, bool useHeaderRow, string sheetName, ExcelType excelType, string startCell, IConfiguration configuration)
|
||||
{
|
||||
var rows = stream.Query(useHeaderRow, sheetName, excelType, startCell, configuration);
|
||||
foreach (IDictionary<string, object> row in rows)
|
||||
{
|
||||
if (row.Keys.Any(key => row[key] != null))
|
||||
yield return row;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
/// 用于Linq的去重,扩展方法需要放到静态类中
|
||||
/// </summary>
|
||||
/// <typeparam name="TSource"></typeparam>
|
||||
/// <typeparam name="TKey"></typeparam>
|
||||
/// <param name="source"></param>
|
||||
/// <param name="keySelector"></param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector)
|
||||
{
|
||||
HashSet<TKey> seenKeys = new HashSet<TKey>();
|
||||
foreach (TSource element in source)
|
||||
{
|
||||
if (seenKeys.Add(keySelector(element)))
|
||||
{
|
||||
yield return element;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -78,6 +78,7 @@ namespace BLL
|
||||
Material2Id = weldJoint.Material2Id,
|
||||
Thickness = weldJoint.Thickness,
|
||||
Dia = weldJoint.Dia,
|
||||
DNDia=weldJoint.DNDia,
|
||||
Size = weldJoint.Size,
|
||||
DetectionTypeId = weldJoint.DetectionTypeId,
|
||||
JointArea = weldJoint.JointArea,
|
||||
@@ -107,6 +108,13 @@ namespace BLL
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
public static void AddBulkWeldJoint(List<Model.HJGL_WeldJoint> weldJoints)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
db.HJGL_WeldJoint.InsertAllOnSubmit(weldJoints);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
@@ -126,6 +134,7 @@ namespace BLL
|
||||
newWeldJoint.Material2Id = weldJoint.Material2Id;
|
||||
newWeldJoint.Thickness = weldJoint.Thickness;
|
||||
newWeldJoint.Dia = weldJoint.Dia;
|
||||
newWeldJoint.DNDia = weldJoint.DNDia;
|
||||
newWeldJoint.Size = weldJoint.Size;
|
||||
newWeldJoint.DetectionTypeId = weldJoint.DetectionTypeId;
|
||||
newWeldJoint.JointArea = weldJoint.JointArea;
|
||||
|
||||
Binary file not shown.
@@ -37,7 +37,7 @@
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<WarningLevel>3</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
<f:ListItem Text="补充导入" Value="0"/>
|
||||
<f:ListItem Text="更新导入" Value="1"/>
|
||||
</f:DropDownList>
|
||||
<f:RadioButtonList ID="rbDiaType" Label="DN公称直径/外径" runat="server">
|
||||
<f:RadioItem Text="DN公称直径" Value="0" Selected="true"/>
|
||||
<f:RadioItem Text="外径" Value="1" />
|
||||
</f:RadioButtonList>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:HiddenField ID="hdFileName" runat="server">
|
||||
</f:HiddenField>
|
||||
@@ -57,9 +61,9 @@
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="管线信息" Height="350px"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="PipelineCode" AllowCellEditing="true"
|
||||
AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="PipelineCode"
|
||||
AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="PipelineCode" EnableBigData="true"
|
||||
AllowSorting="true" SortField="PipelineCode" SortDirection="ASC"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15"
|
||||
AllowPaging="true" IsDatabasePaging="false" PageSize="300" EnableBigDataRowTip="false"
|
||||
EnableTextSelection="True" >
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -68,6 +68,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList DrpType;
|
||||
|
||||
/// <summary>
|
||||
/// rbDiaType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList rbDiaType;
|
||||
|
||||
/// <summary>
|
||||
/// hdFileName 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -221,10 +221,14 @@
|
||||
SortField="Size" FieldType="Double" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="外径(公称直径)" ColumnID="Dia"
|
||||
<f:RenderField HeaderText="外径" ColumnID="Dia"
|
||||
DataField="Dia" SortField="Dia" FieldType="Double" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="DN公称直径" ColumnID="DNDia"
|
||||
DataField="DNDia" SortField="DNDia" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="壁厚" ColumnID="Thickness"
|
||||
DataField="Thickness" SortField="Thickness" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="90px">
|
||||
|
||||
@@ -297,7 +297,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
string strSql = @"SELECT WeldJointId,JointAttribute,WeldJointCode,PipelineId,PipelineCode,JointAttribute,
|
||||
IsWelding,IsHotProessStr,Material1Code,Material2Code,WeldTypeCode,
|
||||
Specification,HeartNo1,HeartNo2,Size,Dia,Thickness,GrooveTypeCode,
|
||||
Specification,HeartNo1,HeartNo2,Size,Dia,DNDia,Thickness,GrooveTypeCode,
|
||||
WeldingMethodCode,WeldingWireCode,WeldingRodCode,WeldingDate,WeldingDailyCode,
|
||||
BackingWelderCode,CoverWelderCode,MediumCode ,PreTemperature,JointArea,WPQCode,Remark
|
||||
FROM View_HJGL_WeldJoint WHERE IsTwoJoint IS NULL ";
|
||||
|
||||
@@ -77389,6 +77389,8 @@ namespace Model
|
||||
|
||||
private string _TwoJointType;
|
||||
|
||||
private string _DNDia;
|
||||
|
||||
private EntitySet<HJGL_Batch_BatchTrustItem> _HJGL_Batch_BatchTrustItem;
|
||||
|
||||
private EntitySet<HJGL_Batch_PointBatchItem> _HJGL_Batch_PointBatchItem;
|
||||
@@ -77525,6 +77527,8 @@ namespace Model
|
||||
partial void OnMatchableWPQChanged();
|
||||
partial void OnTwoJointTypeChanging(string value);
|
||||
partial void OnTwoJointTypeChanged();
|
||||
partial void OnDNDiaChanging(string value);
|
||||
partial void OnDNDiaChanged();
|
||||
#endregion
|
||||
|
||||
public HJGL_WeldJoint()
|
||||
@@ -78494,6 +78498,26 @@ namespace Model
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DNDia", DbType="VarChar(50)")]
|
||||
public string DNDia
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._DNDia;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._DNDia != value))
|
||||
{
|
||||
this.OnDNDiaChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._DNDia = value;
|
||||
this.SendPropertyChanged("DNDia");
|
||||
this.OnDNDiaChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HJGL_Batch_BatchTrustItem_HJGL_WeldJoint", Storage="_HJGL_Batch_BatchTrustItem", ThisKey="WeldJointId", OtherKey="WeldJointId", DeleteRule="NO ACTION")]
|
||||
public EntitySet<HJGL_Batch_BatchTrustItem> HJGL_Batch_BatchTrustItem
|
||||
{
|
||||
@@ -213960,6 +213984,8 @@ namespace Model
|
||||
|
||||
private System.Nullable<decimal> _Dia;
|
||||
|
||||
private string _DNDia;
|
||||
|
||||
private System.Nullable<decimal> _Size;
|
||||
|
||||
private System.Nullable<decimal> _Thickness;
|
||||
@@ -214010,6 +214036,8 @@ namespace Model
|
||||
|
||||
private string _JointAttribute;
|
||||
|
||||
private string _TwoJointType;
|
||||
|
||||
private string _WeldingDate;
|
||||
|
||||
private string _BackingWelderCode;
|
||||
@@ -214742,6 +214770,22 @@ namespace Model
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DNDia", DbType="VarChar(50)")]
|
||||
public string DNDia
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._DNDia;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._DNDia != value))
|
||||
{
|
||||
this._DNDia = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Size", DbType="Decimal(8,3)")]
|
||||
public System.Nullable<decimal> Size
|
||||
{
|
||||
@@ -215142,6 +215186,22 @@ namespace Model
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TwoJointType", DbType="NVarChar(100)")]
|
||||
public string TwoJointType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._TwoJointType;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._TwoJointType != value))
|
||||
{
|
||||
this._TwoJointType = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldingDate", DbType="VarChar(100)")]
|
||||
public string WeldingDate
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user