11
This commit is contained in:
+2
-1
@@ -10,7 +10,7 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>BLL</RootNamespace>
|
||||
<AssemblyName>BLL</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
@@ -119,6 +119,7 @@
|
||||
<Compile Include="Common\Const.cs" />
|
||||
<Compile Include="NPOIHelper.cs" />
|
||||
<Compile Include="PublicInfo\BaseInfo\Base_PIPClassService.cs" />
|
||||
<Compile Include="PublicInfo\BaseInfo\MaterialCoodeService.cs" />
|
||||
<Compile Include="WelderManage\WelderQualifiedService.cs" />
|
||||
<Compile Include="WelderManage\WelderService.cs" />
|
||||
<Compile Include="DropListService.cs" />
|
||||
|
||||
@@ -243,6 +243,11 @@ namespace BLL
|
||||
/// </summary>
|
||||
public const string WelderQueTemplateUrl = "File\\Excel\\WelderQue.xlsx";
|
||||
|
||||
/// <summary>
|
||||
/// 委托单导入模板
|
||||
/// </summary>
|
||||
public const string HJGL_TrustInTemplateUrl = "File\\Excel\\HJGL_DataIn\\TrustIn.xlsx";
|
||||
|
||||
/// <summary>
|
||||
/// 检测单导入模版文件原始的虚拟路径
|
||||
/// </summary>
|
||||
@@ -506,6 +511,10 @@ namespace BLL
|
||||
|
||||
#region 焊接管理
|
||||
/// <summary>
|
||||
/// 物料码信息
|
||||
/// </summary>
|
||||
public const string MaterialCoodeMenuId = "482AFB2F-12AC-4B78-859E-25088AD767FB";
|
||||
/// <summary>
|
||||
/// 管线管理
|
||||
/// </summary>
|
||||
public const string HJGL_PipelineManageMenuId = "8IDKGJE2-09B1-6UIO-3EFM-5TGED48F0001";
|
||||
|
||||
@@ -122,8 +122,8 @@
|
||||
public static ListItem[] HJGL_JointAttributeItem()
|
||||
{
|
||||
ListItem[] list = new ListItem[2];
|
||||
list[0] = new ListItem("活动S", "活动S");
|
||||
list[1] = new ListItem("固定G", "固定G");
|
||||
list[0] = new ListItem("S", "S");
|
||||
list[1] = new ListItem("G", "G");
|
||||
return list;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace BLL
|
||||
|
||||
public static ListItem[] GetDNCompareList()
|
||||
{
|
||||
ListItem[] list = new ListItem[18];
|
||||
ListItem[] list = new ListItem[19];
|
||||
list[0] = new ListItem("5", "5");
|
||||
list[1] = new ListItem("5S", "5S");
|
||||
list[2] = new ListItem("10", "10");
|
||||
@@ -127,7 +127,7 @@ namespace BLL
|
||||
list[15] = new ListItem("140", "140");
|
||||
list[16] = new ListItem("160", "160");
|
||||
list[17] = new ListItem("XXS", "XXS");
|
||||
|
||||
list[18] = new ListItem("FB", "FB");
|
||||
return list;
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
using Model;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class MaterialCoodeService
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
///获取物料码信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static Model.Base_MaterialCoode GetMaterialCoode(string materialCoodeId, string projectId)
|
||||
{
|
||||
return Funs.DB.Base_MaterialCoode.FirstOrDefault(e => e.MaterialCoodeId == materialCoodeId && e.ProjectId == projectId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加物料码信息
|
||||
/// </summary>
|
||||
/// <param name="newCoode"></param>
|
||||
public static void AddMaterialCoode(Model.Base_MaterialCoode coode)
|
||||
{
|
||||
Model.HJGLDB db = Funs.DB;
|
||||
Model.Base_MaterialCoode newCoode = new Base_MaterialCoode
|
||||
{
|
||||
MaterialCoodeId = coode.MaterialCoodeId,
|
||||
ProjectId = coode.ProjectId,
|
||||
Coode = coode.Coode,
|
||||
HeartNo = coode.HeartNo,
|
||||
Amount = coode.Amount
|
||||
};
|
||||
db.Base_MaterialCoode.InsertOnSubmit(newCoode);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改物料码信息
|
||||
/// </summary>
|
||||
/// <param name="medium"></param>
|
||||
public static void UpdateMaterialCoode(Model.Base_MaterialCoode coode)
|
||||
{
|
||||
Model.HJGLDB db = Funs.DB;
|
||||
Model.Base_MaterialCoode NewCoode = db.Base_MaterialCoode.FirstOrDefault(e => e.MaterialCoodeId == coode.MaterialCoodeId);
|
||||
if (NewCoode != null)
|
||||
{
|
||||
NewCoode.ProjectId = coode.ProjectId;
|
||||
NewCoode.Coode = coode.Coode;
|
||||
NewCoode.HeartNo = coode.HeartNo;
|
||||
NewCoode.Amount = coode.Amount;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据物料码Id删除一个物料码信息
|
||||
/// </summary>
|
||||
/// <param name="materialCoodeId"></param>
|
||||
public static void DeleteMaterialCoode(string materialCoodeId)
|
||||
{
|
||||
Model.HJGLDB db = Funs.DB;
|
||||
Model.Base_MaterialCoode delCoode = db.Base_MaterialCoode.FirstOrDefault(e => e.MaterialCoodeId == materialCoodeId);
|
||||
if (delCoode != null)
|
||||
{
|
||||
db.Base_MaterialCoode.DeleteOnSubmit(delCoode);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断物料码是否已存在
|
||||
/// </summary>
|
||||
/// <param name="isoNo"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsExistMaterialCoode(string projectId, string heartNo, string Coode, string materialCoodeId)
|
||||
{
|
||||
Model.HJGLDB db = Funs.DB;
|
||||
var q = Funs.DB.Base_MaterialCoode.FirstOrDefault(x => x.ProjectId == projectId && x.HeartNo == heartNo && x.Coode == Coode && (x.MaterialCoodeId != materialCoodeId || (materialCoodeId == null && x.MaterialCoodeId != null)));
|
||||
if (q != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#region 物料码下拉项
|
||||
/// <summary>
|
||||
/// 安装组件下拉项
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名称</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
/// <param name="MediumType">耗材类型</param>
|
||||
public static void InitMaterialCoodeDropDownList(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease, string itemText)
|
||||
{
|
||||
dropName.DataValueField = "MaterialCoode";
|
||||
dropName.DataTextField = "MaterialCoode";
|
||||
var sql = from x in Funs.DB.Base_MaterialCoode
|
||||
where x.ProjectId == projectId
|
||||
orderby x.Coode, x.HeartNo
|
||||
select new { x.MaterialCoodeId, MaterialCoode = x.Coode + ":" + x.HeartNo};
|
||||
dropName.DataSource = sql.ToList();
|
||||
dropName.DataBind();
|
||||
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName, itemText);
|
||||
}
|
||||
}
|
||||
|
||||
public static void InitCoodeDropDownList(FineUIPro.DropDownList dropName, string projectId, bool isShowPlease, string itemText)
|
||||
{
|
||||
dropName.DataValueField = "Coode";
|
||||
dropName.DataTextField = "Coode";
|
||||
var sql = (from x in Funs.DB.Base_MaterialCoode
|
||||
where x.ProjectId == projectId select x.Coode).Distinct();
|
||||
dropName.DataSource = sql;
|
||||
dropName.DataBind();
|
||||
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName, itemText);
|
||||
}
|
||||
}
|
||||
|
||||
public static void InitHeartNoDropDownList(FineUIPro.DropDownList dropName, string coode, bool isShowPlease, string itemText)
|
||||
{
|
||||
dropName.DataValueField = "HeartNo";
|
||||
dropName.DataTextField = "HeartNo";
|
||||
var sql = (from x in Funs.DB.Base_MaterialCoode
|
||||
where x.Coode == coode
|
||||
select x.HeartNo).ToList();
|
||||
dropName.DataSource = sql;
|
||||
dropName.DataBind();
|
||||
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName, itemText);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -971,7 +971,7 @@ namespace BLL
|
||||
return maxId;
|
||||
}
|
||||
|
||||
public static int getIntValue(string sql)
|
||||
public static int getIntValue(string sql, SqlParameter[] param = null)
|
||||
{
|
||||
int i = 0;
|
||||
using (SqlConnection Connection = new SqlConnection(connectionString))
|
||||
@@ -981,7 +981,10 @@ namespace BLL
|
||||
Connection.Open();
|
||||
SqlCommand command = new SqlCommand(sql, Connection);
|
||||
command.CommandType = CommandType.Text;
|
||||
|
||||
if (param != null)
|
||||
{
|
||||
AddParameterToCommand(command, param);
|
||||
}
|
||||
i = Convert.ToInt32(command.ExecuteScalar());
|
||||
}
|
||||
finally
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace BLL
|
||||
public static List<Model.Batch_PointBatchItem> GetExportItem(string repairRecordId)
|
||||
{
|
||||
Model.HJGLDB db = Funs.DB;
|
||||
var exp =from x in db.Batch_PointBatchItem where x.RepairRecordId == repairRecordId select x;
|
||||
var exp = from x in db.Batch_PointBatchItem where x.RepairRecordId == repairRecordId && x.PointState == "2" select x;
|
||||
if (exp.Count() > 0)
|
||||
{
|
||||
return exp.ToList();
|
||||
|
||||
@@ -169,6 +169,9 @@ namespace BLL
|
||||
newPipelineList.PTP_ID = IsoList.PTP_ID;
|
||||
newPipelineList.PipelineId = IsoList.PipelineId;
|
||||
newPipelineList.PT_DataType = IsoList.PT_DataType;
|
||||
newPipelineList.IsAll = IsoList.IsAll;
|
||||
newPipelineList.WorkAreaId= IsoList.WorkAreaId;
|
||||
newPipelineList.WeldJonintCode = IsoList.WeldJonintCode;
|
||||
db.PTP_PipelineList.InsertOnSubmit(newPipelineList);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
@@ -205,6 +205,7 @@ namespace BLL
|
||||
{
|
||||
newWeldJoint.WeldingLocationId = weldJoint.WeldingLocationId;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(weldJoint.WeldMatId))
|
||||
{
|
||||
newWeldJoint.WeldMatId = weldJoint.WeldMatId;
|
||||
|
||||
@@ -61,13 +61,16 @@ namespace BLL
|
||||
newWeldReportItem.JointArea = item.JointArea;
|
||||
newWeldReportItem.WeldingLocationId = item.WeldingLocationId;
|
||||
newWeldReportItem.WeldingLocationCode = item.WeldingLocationCode;
|
||||
|
||||
newWeldReportItem.JointAttribute = item.JointAttribute;
|
||||
newWeldReportItem.DoneDin = item.DoneDin;
|
||||
newWeldReportItem.Dia = item.Dia;
|
||||
newWeldReportItem.Thickness = item.Thickness;
|
||||
newWeldReportItem.WeldingMethodCode = item.WeldingMethodCode;
|
||||
newWeldReportItem.HeartNo1 = item.HeartNo1;
|
||||
newWeldReportItem.HeartNo2 = item.HeartNo2;
|
||||
newWeldReportItem.CoodeHeartNo1 = item.Coode1 + ":" + item.HeartNo1;
|
||||
newWeldReportItem.CoodeHeartNo2 = item.Coode2 + ":" + item.HeartNo2;
|
||||
//newWeldReportItem.HeartNo1 = item.HeartNo1;
|
||||
//newWeldReportItem.HeartNo2 = item.HeartNo2;
|
||||
newWeldReportItem.Components1Code = item.ComponentsCode1;
|
||||
newWeldReportItem.Components2Code = item.ComponentsCode2;
|
||||
newWeldReportItem.Material1Code = item.Material1Code;
|
||||
@@ -141,9 +144,10 @@ namespace BLL
|
||||
newWeldReportItem.WeldingLocationId = weldline.WeldingLocationId;
|
||||
newWeldReportItem.WeldingLocationCode = weldline.WeldingLocationCode;
|
||||
newWeldReportItem.JointAttribute = weldline.JointAttribute;
|
||||
|
||||
newWeldReportItem.HeartNo1 = weldline.HeartNo1;
|
||||
newWeldReportItem.HeartNo2 = weldline.HeartNo2;
|
||||
newWeldReportItem.CoodeHeartNo1 = weldline.Coode1 + ":" + weldline.HeartNo1;
|
||||
newWeldReportItem.CoodeHeartNo2 = weldline.Coode2 + ":" + weldline.HeartNo2;
|
||||
//newWeldReportItem.HeartNo1 = weldline.HeartNo1;
|
||||
//newWeldReportItem.HeartNo2 = weldline.HeartNo2;
|
||||
newWeldReportItem.Components1Code = weldline.ComponentsCode1;
|
||||
newWeldReportItem.Components2Code = weldline.ComponentsCode2;
|
||||
newWeldReportItem.Material1Code = weldline.Material1Code;
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
@@ -8,4 +8,4 @@
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup></configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>
|
||||
|
||||
File diff suppressed because one or more lines are too long
+6
-6
@@ -13,13 +13,13 @@ namespace Resources {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 强类型资源类,用于查找本地化字符串等。
|
||||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 Visual Studio 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Web.Application.StronglyTypedResourceProxyBuilder", "15.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Web.Application.StronglyTypedResourceProxyBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Lan {
|
||||
@@ -33,7 +33,7 @@ namespace Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存 ResourceManager 实例。
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
@@ -47,8 +47,8 @@ namespace Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 覆盖当前线程的 CurrentUICulture 属性
|
||||
/// 使用此强类型的资源类的资源查找。
|
||||
/// 重写当前线程的 CurrentUICulture 属性,对
|
||||
/// 使用此强类型资源类的所有资源查找执行重写。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -12,7 +12,7 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>FineUIPro.Web</RootNamespace>
|
||||
<AssemblyName>FineUIPro.Web</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
@@ -231,6 +231,7 @@
|
||||
<Content Include="common\ReportPrint\SaveTabFile.aspx" />
|
||||
<Content Include="common\ReportPrint\upload\636745907126050098_scs.png" />
|
||||
<Content Include="common\SysManage\LogList.aspx" />
|
||||
<Content Include="WeldingProcess\WeldingManage\MaterialCoode.aspx" />
|
||||
<Content Include="PublicInfo\BaseInfo\PIPClass.aspx" />
|
||||
<Content Include="PublicInfo\BaseInfo\PIPClassEdit.aspx" />
|
||||
<Content Include="res\DataInTable.js" />
|
||||
@@ -401,6 +402,7 @@
|
||||
<Content Include="WeldingProcess\DataIn\DataInEdit.aspx" />
|
||||
<Content Include="WeldingProcess\TestPackageManage\AItemEndCheck.aspx" />
|
||||
<Content Include="WeldingProcess\TestPackageManage\BItemEndCheck.aspx" />
|
||||
<Content Include="WeldingProcess\TestPackageManage\selectJointCode.aspx" />
|
||||
<Content Include="WeldingProcess\TestPackageManage\TestPackageManageAudit.aspx" />
|
||||
<Content Include="WeldingProcess\TestPackageManage\TestPackageManageEdit.aspx" />
|
||||
<Content Include="WeldingProcess\TestPackageManage\TestPackageManageItemEdit.aspx" />
|
||||
@@ -413,6 +415,7 @@
|
||||
<Content Include="WeldingProcess\TrustManage\RTTrustReplace.aspx" />
|
||||
<Content Include="WeldingProcess\TrustManage\SelectExpandPoint.aspx" />
|
||||
<Content Include="WeldingProcess\TrustManage\PointAudit.aspx" />
|
||||
<Content Include="WeldingProcess\TrustManage\TrustBatchIn.aspx" />
|
||||
<Content Include="WeldingProcess\TrustManage\TrustBatchManage.aspx" />
|
||||
<Content Include="WeldingProcess\TrustManage\TrustBatchOut.aspx" />
|
||||
<Content Include="WeldingProcess\TrustManage\TrustBatchSelect.aspx" />
|
||||
@@ -421,6 +424,7 @@
|
||||
<Content Include="WeldingProcess\WeldingManage\JointInfoCopy.aspx" />
|
||||
<Content Include="WeldingProcess\WeldingManage\JointInfoEdit.aspx" />
|
||||
<Content Include="WeldingProcess\WeldingManage\JointShowColumn.aspx" />
|
||||
<Content Include="WeldingProcess\WeldingManage\MaterialCoodeEdit.aspx" />
|
||||
<Content Include="WeldingProcess\WeldingManage\PipelineDetectionTypeEdit.aspx" />
|
||||
<Content Include="WeldingProcess\WeldingManage\PipelineManage.aspx" />
|
||||
<Content Include="WeldingProcess\WeldingManage\PipelineManageEdit.aspx" />
|
||||
@@ -3414,6 +3418,13 @@
|
||||
<Compile Include="common\SysManage\LogList.aspx.designer.cs">
|
||||
<DependentUpon>LogList.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WeldingProcess\WeldingManage\MaterialCoode.aspx.cs">
|
||||
<DependentUpon>MaterialCoode.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WeldingProcess\WeldingManage\MaterialCoode.aspx.designer.cs">
|
||||
<DependentUpon>MaterialCoode.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="PublicInfo\BaseInfo\PIPClass.aspx.cs">
|
||||
<DependentUpon>PIPClass.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -4518,6 +4529,13 @@
|
||||
<Compile Include="WeldingProcess\TestPackageManage\BItemEndCheck.aspx.designer.cs">
|
||||
<DependentUpon>BItemEndCheck.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WeldingProcess\TestPackageManage\selectJointCode.aspx.cs">
|
||||
<DependentUpon>selectJointCode.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WeldingProcess\TestPackageManage\selectJointCode.aspx.designer.cs">
|
||||
<DependentUpon>selectJointCode.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WeldingProcess\TestPackageManage\TestPackageManageAudit.aspx.cs">
|
||||
<DependentUpon>TestPackageManageAudit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -4602,6 +4620,13 @@
|
||||
<Compile Include="WeldingProcess\TrustManage\PointAudit.aspx.designer.cs">
|
||||
<DependentUpon>PointAudit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WeldingProcess\TrustManage\TrustBatchIn.aspx.cs">
|
||||
<DependentUpon>TrustBatchIn.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WeldingProcess\TrustManage\TrustBatchIn.aspx.designer.cs">
|
||||
<DependentUpon>TrustBatchIn.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WeldingProcess\TrustManage\TrustBatchManage.aspx.cs">
|
||||
<DependentUpon>TrustBatchManage.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -4661,6 +4686,13 @@
|
||||
<Compile Include="WeldingProcess\WeldingManage\JointShowColumn.aspx.designer.cs">
|
||||
<DependentUpon>JointShowColumn.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WeldingProcess\WeldingManage\MaterialCoodeEdit.aspx.cs">
|
||||
<DependentUpon>MaterialCoodeEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WeldingProcess\WeldingManage\MaterialCoodeEdit.aspx.designer.cs">
|
||||
<DependentUpon>MaterialCoodeEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WeldingProcess\WeldingManage\PipelineDetectionTypeEdit.aspx.cs">
|
||||
<DependentUpon>PipelineDetectionTypeEdit.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
@@ -401,12 +401,23 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage
|
||||
if (batchItem != null)
|
||||
{
|
||||
batchItem.RepairDate = Convert.ToDateTime(this.txtRepairDate.Text);
|
||||
batchItem.RepairRecordId = repairRecordId;
|
||||
if (ckbIsCut.Checked)
|
||||
{
|
||||
batchItem.CutDate = DateTime.Now.Date;
|
||||
}
|
||||
}
|
||||
db.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
var updatebatchItem = db.Batch_PointBatchItem.FirstOrDefault(x => x.WeldJointId == repair.WeldJointId && x.RepairRecordId== repairRecordId);
|
||||
if (updatebatchItem != null)
|
||||
{
|
||||
updatebatchItem.RepairDate = Convert.ToDateTime(this.txtRepairDate.Text);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var exp = BLL.RepairRecordService.GetExportItem(repairRecordId);
|
||||
if (exp != null)
|
||||
@@ -444,7 +455,7 @@ namespace FineUIPro.Web.WeldingProcess.CheckManage
|
||||
// 大于500的焊口扩透口是自身,这时要增加批明细
|
||||
else
|
||||
{
|
||||
Model.Batch_PointBatchItem pointItem = db.Batch_PointBatchItem.FirstOrDefault(x => x.RepairRecordId == repairRecordId);
|
||||
Model.Batch_PointBatchItem pointItem = db.Batch_PointBatchItem.FirstOrDefault(x => x.RepairRecordId == repairRecordId && x.PointState=="2");
|
||||
// 大于500的焊口扩透口是自身,保存后不能再次增加
|
||||
if (pointItem == null)
|
||||
{
|
||||
|
||||
@@ -535,6 +535,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn
|
||||
var ndtType = from x in Funs.DB.Base_DetectionType select x;
|
||||
var wpsList = from x in Funs.DB.WPQ_WPQList select x;
|
||||
var DNCompareList = BLL.Base_DNCompareService.GetDNCompareList();
|
||||
var coodeList= from x in Funs.DB.Base_MaterialCoode where x.ProjectId == this.CurrUser.LoginProjectId select x; //coode
|
||||
|
||||
var dataInTemp = from x in Funs.DB.Sys_DataInTemp
|
||||
where x.UserId == this.CurrUser.UserId && x.ProjectId == this.CurrUser.LoginProjectId
|
||||
@@ -955,8 +956,6 @@ namespace FineUIPro.Web.WeldingProcess.DataIn
|
||||
errInfo += "焊接方法为必填项;";
|
||||
}
|
||||
|
||||
weldJoint.HeartNo1 = tempData.Value25;
|
||||
weldJoint.HeartNo2 = tempData.Value26;
|
||||
if (!string.IsNullOrEmpty(tempData.Value27))
|
||||
{
|
||||
var grooveType = grooveTypes.FirstOrDefault(x => x.GrooveTypeCode == tempData.Value27);
|
||||
@@ -982,16 +981,18 @@ namespace FineUIPro.Web.WeldingProcess.DataIn
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tempData.Value28 == "S")
|
||||
{
|
||||
weldJoint.JointAttribute = "活动S";
|
||||
weldJoint.JointArea = "S";
|
||||
}
|
||||
else
|
||||
{
|
||||
weldJoint.JointAttribute = "固定F";
|
||||
weldJoint.JointArea = "F";
|
||||
}
|
||||
weldJoint.JointAttribute = tempData.Value28;
|
||||
weldJoint.JointArea = tempData.Value28;
|
||||
//if (tempData.Value28 == "S")
|
||||
//{
|
||||
// weldJoint.JointAttribute = "活动S";
|
||||
// weldJoint.JointArea = "S";
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// weldJoint.JointAttribute = "固定F";
|
||||
// weldJoint.JointArea = "F";
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1073,6 +1074,10 @@ namespace FineUIPro.Web.WeldingProcess.DataIn
|
||||
pipeline.DetectionRateId = rate.DetectionRateId;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errInfo += "探伤比例为必填项;";
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(tempData.Value35))
|
||||
{
|
||||
@@ -1189,8 +1194,56 @@ namespace FineUIPro.Web.WeldingProcess.DataIn
|
||||
}
|
||||
}
|
||||
|
||||
weldJoint.Coode1 = tempData.Value39;
|
||||
weldJoint.Coode2 = tempData.Value40;
|
||||
if (!string.IsNullOrEmpty(tempData.Value39))
|
||||
{
|
||||
var cood = coodeList.FirstOrDefault(x => x.Coode == tempData.Value39);
|
||||
if (cood == null)
|
||||
{
|
||||
errInfo += "Coode1:[" + tempData.Value39 + "]不存在;";
|
||||
}
|
||||
else
|
||||
{
|
||||
weldJoint.Coode1 = cood.Coode;
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(tempData.Value40))
|
||||
{
|
||||
var cood = coodeList.FirstOrDefault(x => x.Coode == tempData.Value40);
|
||||
if (cood == null)
|
||||
{
|
||||
errInfo += "Coode2:[" + tempData.Value40 + "]不存在;";
|
||||
}
|
||||
else
|
||||
{
|
||||
weldJoint.Coode2 = cood.Coode;
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(tempData.Value25))
|
||||
{
|
||||
var cood = coodeList.FirstOrDefault(x => x.Coode == tempData.Value39 && x.HeartNo== tempData.Value25);
|
||||
if (cood == null)
|
||||
{
|
||||
errInfo += "炉批号1:[" + tempData.Value25 + "]或对应的Coode码不存在;";
|
||||
}
|
||||
else
|
||||
{
|
||||
weldJoint.HeartNo1 = tempData.Value25;
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tempData.Value26))
|
||||
{
|
||||
var cood = coodeList.FirstOrDefault(x => x.Coode == tempData.Value40 && x.HeartNo == tempData.Value26);
|
||||
if (cood == null)
|
||||
{
|
||||
errInfo += "炉批号2:[" + tempData.Value26 + "]或对应的Coode码不存在;";
|
||||
}
|
||||
else
|
||||
{
|
||||
weldJoint.HeartNo2 = tempData.Value26;
|
||||
}
|
||||
}
|
||||
|
||||
//if (!string.IsNullOrEmpty(tempData.Value22) && !string.IsNullOrEmpty(tempData.Value23))
|
||||
//{
|
||||
|
||||
+711
-4
@@ -758,7 +758,8 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
#region 表格部分
|
||||
ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 15, rowIndex + 65, style, 0, 18, true);
|
||||
|
||||
for (int i = 15; i < 66; i++) {
|
||||
for (int i = 15; i < 66; i++)
|
||||
{
|
||||
ws.GetRow(rowIndex + i).Height = 28 * 20;
|
||||
}
|
||||
|
||||
@@ -2594,7 +2595,8 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
for (int i = 5; i < 18; i++)
|
||||
{
|
||||
|
||||
if (i == 6) {
|
||||
if (i == 6)
|
||||
{
|
||||
ws.GetRow(rowIndex + i).Height = 60 * 20;
|
||||
continue;
|
||||
}
|
||||
@@ -2791,7 +2793,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
}
|
||||
|
||||
//21-管道焊接工作记录SHT 3503-J415
|
||||
private void template21(XSSFWorkbook hssfworkbook, XSSFSheet ws)
|
||||
private void template21_old(XSSFWorkbook hssfworkbook, XSSFSheet ws)
|
||||
{
|
||||
#region 头部
|
||||
var style = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 11, true, false, "宋体");
|
||||
@@ -2940,8 +2942,194 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
ws.SetMargin(MarginType.FooterMargin, 0);
|
||||
}
|
||||
|
||||
//21-管道焊接工作记录SHT 3503-J415
|
||||
private void template21(XSSFWorkbook hssfworkbook, XSSFSheet ws)
|
||||
{
|
||||
#region 头部
|
||||
var style = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 15, true, false, "宋体");
|
||||
var styleTwo = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Left, 9.5, true, false, "宋体");
|
||||
var styleThree = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 9.5, true, false, "宋体");
|
||||
var style4 = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 10.5, true, false, "宋体");
|
||||
int rowIndex = 0;
|
||||
ws = ExcelCreateRow(ws, hssfworkbook, rowIndex, rowIndex + 3, style, 0, 14, true);
|
||||
|
||||
//设置列宽
|
||||
ws.SetColumnWidth(0, 18 * 256);
|
||||
ws.SetColumnWidth(1, 9 * 256);
|
||||
ws.SetColumnWidth(2, 6 * 256);
|
||||
ws.SetColumnWidth(3, 12 * 256);
|
||||
ws.SetColumnWidth(4, 18 * 256);
|
||||
ws.SetColumnWidth(5, 19 * 256);
|
||||
ws.SetColumnWidth(6, 13 * 256);
|
||||
ws.SetColumnWidth(7, 13 * 256);
|
||||
ws.SetColumnWidth(8, 14 * 256);
|
||||
ws.SetColumnWidth(9, 13 * 256);
|
||||
ws.SetColumnWidth(10, 13 * 256);
|
||||
ws.SetColumnWidth(11, 10 * 256);
|
||||
ws.SetColumnWidth(12, 16 * 256);
|
||||
ws.SetColumnWidth(13, 14 * 256);
|
||||
ws.SetColumnWidth(14, 19 * 256);
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(0, 3, 0, 1));
|
||||
ws.GetRow(rowIndex).GetCell(0).SetCellValue("SH/T 3503-J415-1");
|
||||
ws.GetRow(rowIndex).GetCell(0).CellStyle = styleThree;
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(0, 3, 2, 10));
|
||||
ws.GetRow(rowIndex).GetCell(2).SetCellValue("管道焊接工作记录\r\nPiping Welding Record");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(0, 0, 11, 14));
|
||||
ws.AddMergedRegion(new CellRangeAddress(1, 1, 11, 14));
|
||||
ws.AddMergedRegion(new CellRangeAddress(2, 2, 11, 14));
|
||||
ws.AddMergedRegion(new CellRangeAddress(3, 3, 11, 14));
|
||||
|
||||
ws.GetRow(rowIndex).GetCell(11).SetCellValue("工程名称:巴斯夫(广东)一体化项目专用化学品二区");
|
||||
ws.GetRow(rowIndex + 1).GetCell(11).SetCellValue("Project Name:BASF (Guangdong) Integrated Project");
|
||||
ws.GetRow(rowIndex + 2).GetCell(11).SetCellValue("单位工程名称:埋地消防系统");
|
||||
ws.GetRow(rowIndex + 3).GetCell(11).SetCellValue("Unit Name:FW");
|
||||
ws.GetRow(rowIndex).GetCell(11).CellStyle = ws.GetRow(rowIndex + 1).GetCell(11).CellStyle = ws.GetRow(rowIndex + 2).GetCell(11).CellStyle = ws.GetRow(rowIndex + 3).GetCell(11).CellStyle = styleTwo;
|
||||
|
||||
ws.GetRow(rowIndex).Height = ws.GetRow(rowIndex + 1).Height = ws.GetRow(rowIndex + 2).Height = ws.GetRow(rowIndex + 3).Height = 25 * 20;
|
||||
|
||||
|
||||
//画线
|
||||
RegionUtil.SetBorderBottom(0, new CellRangeAddress(rowIndex, rowIndex, 11, 14), ws);
|
||||
RegionUtil.SetBorderTop(0, new CellRangeAddress(rowIndex + 1, rowIndex + 1, 11, 14), ws);
|
||||
RegionUtil.SetBorderBottom(0, new CellRangeAddress(rowIndex + 1, rowIndex + 1, 11, 14), ws);
|
||||
RegionUtil.SetBorderTop(0, new CellRangeAddress(rowIndex + 2, rowIndex + 2, 11, 14), ws);
|
||||
RegionUtil.SetBorderBottom(0, new CellRangeAddress(rowIndex + 2, rowIndex + 2, 11, 14), ws);
|
||||
RegionUtil.SetBorderTop(0, new CellRangeAddress(rowIndex + 3, rowIndex + 3, 11, 14), ws);
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region 表格部分
|
||||
ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 4, rowIndex + 5, style4, 0, 14, true);
|
||||
|
||||
ws.GetRow(rowIndex + 4).Height = 25 * 20;
|
||||
ws.GetRow(rowIndex + 5).Height = 25 * 20;
|
||||
//设置表头部分
|
||||
ws.AddMergedRegion(new CellRangeAddress(4, 5, 0, 0));
|
||||
ws.GetRow(rowIndex + 4).GetCell(0).SetCellValue("管道编号/单线号\r\nPiping No./Line No");
|
||||
ws.AddMergedRegion(new CellRangeAddress(4, 5, 1, 2));
|
||||
ws.GetRow(rowIndex + 4).GetCell(1).SetCellValue("焊口编号\r\nWeld No.");
|
||||
ws.AddMergedRegion(new CellRangeAddress(4, 5, 3, 3));
|
||||
ws.GetRow(rowIndex + 4).GetCell(3).SetCellValue("焊接形式\r\nWeld Type.");
|
||||
ws.AddMergedRegion(new CellRangeAddress(4, 5, 4, 4));
|
||||
ws.GetRow(rowIndex + 4).GetCell(4).SetCellValue("焊工代号\r\nWelder's Stamp No.");
|
||||
ws.AddMergedRegion(new CellRangeAddress(4, 5, 5, 5));
|
||||
ws.GetRow(rowIndex + 4).GetCell(5).SetCellValue("规格mm\r\nSpecification mm");
|
||||
ws.AddMergedRegion(new CellRangeAddress(4, 5, 6, 6));
|
||||
ws.GetRow(rowIndex + 4).GetCell(6).SetCellValue("材质\r\nMaterial");
|
||||
ws.AddMergedRegion(new CellRangeAddress(4, 5, 7, 7));
|
||||
ws.GetRow(rowIndex + 4).GetCell(7).SetCellValue("焊接位置\r\nWelding\r\nPosition");
|
||||
ws.AddMergedRegion(new CellRangeAddress(4, 5, 8, 9));
|
||||
ws.GetRow(rowIndex + 4).GetCell(8).SetCellValue("焊接方法\r\nWelding Process");
|
||||
ws.AddMergedRegion(new CellRangeAddress(4, 5, 10, 11));
|
||||
ws.GetRow(rowIndex + 4).GetCell(10).SetCellValue("焊材牌号\r\nWelding Material Designation");
|
||||
ws.AddMergedRegion(new CellRangeAddress(4, 5, 12, 12));
|
||||
ws.GetRow(rowIndex + 4).GetCell(12).SetCellValue("实际预热温度℃\r\nActual Preheating Temperature ℃");
|
||||
ws.AddMergedRegion(new CellRangeAddress(4, 5, 13, 13));
|
||||
ws.GetRow(rowIndex + 4).GetCell(13).SetCellValue("焊接日期\r\nWelding Date");
|
||||
ws.AddMergedRegion(new CellRangeAddress(4, 5, 14, 14));
|
||||
ws.GetRow(rowIndex + 4).GetCell(14).SetCellValue("无损检查报告\r\nNDE Report.");
|
||||
|
||||
ws.GetRow(rowIndex + 4).GetCell(0).CellStyle = ws.GetRow(rowIndex + 4).GetCell(1).CellStyle
|
||||
= ws.GetRow(rowIndex + 4).GetCell(3).CellStyle = ws.GetRow(rowIndex + 4).GetCell(4).CellStyle
|
||||
= ws.GetRow(rowIndex + 4).GetCell(5).CellStyle = ws.GetRow(rowIndex + 4).GetCell(6).CellStyle
|
||||
= ws.GetRow(rowIndex + 4).GetCell(7).CellStyle = ws.GetRow(rowIndex + 4).GetCell(8).CellStyle
|
||||
= ws.GetRow(rowIndex + 4).GetCell(10).CellStyle = ws.GetRow(rowIndex + 4).GetCell(12).CellStyle
|
||||
= ws.GetRow(rowIndex + 4).GetCell(13).CellStyle = ws.GetRow(rowIndex + 4).GetCell(14).CellStyle = styleThree;
|
||||
|
||||
//这里创建行数据
|
||||
ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 6, rowIndex + 23, style, 0, 14, true);
|
||||
for (int i = 6; i < 24; i++)
|
||||
{
|
||||
ws.GetRow(rowIndex + i).Height = 19 * 20;
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 1, 2));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 8, 9));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 10, 11));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 尾部
|
||||
style = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.None, BorderStyle.None, BorderStyle.None, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Left, 11, true, false);
|
||||
var style1 = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.None, BorderStyle.None, BorderStyle.None, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 11, true, false);
|
||||
ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 24, rowIndex + 30, style, 0, 14, true);
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 24, rowIndex + 24, 0, 4));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 24, rowIndex + 24, 5, 9));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 24, rowIndex + 24, 10, 14));
|
||||
ws.GetRow(rowIndex + 24).GetCell(0).SetCellValue("建设/监理单位\r\nOwner/Supervision Contractor");
|
||||
ws.GetRow(rowIndex + 24).GetCell(0).CellStyle = style1;
|
||||
ws.GetRow(rowIndex + 24).GetCell(5).SetCellValue("总承包单位\r\nGeneral Contractor");
|
||||
ws.GetRow(rowIndex + 24).GetCell(5).CellStyle = style1;
|
||||
ws.GetRow(rowIndex + 24).GetCell(10).SetCellValue("施工单位\r\nConstruction Contractor");
|
||||
ws.GetRow(rowIndex + 24).GetCell(10).CellStyle = style1;
|
||||
RegionUtil.SetBorderBottom(1, new CellRangeAddress(rowIndex + 24, rowIndex + 24, 0, 14), ws);
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 25, rowIndex + 25, 0, 1));
|
||||
ws.GetRow(rowIndex + 25).GetCell(0).SetCellValue("专业工程师\r\nDiscipline Engineer:");
|
||||
ws.GetRow(rowIndex + 25).Height = 31 * 20;
|
||||
ws.GetRow(rowIndex + 27).Height = 31 * 20;
|
||||
ws.GetRow(rowIndex + 29).Height = 31 * 20;
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 25, rowIndex + 25, 5, 6));
|
||||
ws.GetRow(rowIndex + 25).GetCell(5).SetCellValue("专业工程师\r\nDiscipline Engineer:");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 25, rowIndex + 25, 10, 14));
|
||||
ws.GetRow(rowIndex + 25).GetCell(10).SetCellValue("记录人 :\r\nRecord Prepared by:");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 27, rowIndex + 27, 10, 14));
|
||||
ws.GetRow(rowIndex + 27).GetCell(10).SetCellValue("质量检查员:\r\nQuality Inspector:");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 29, rowIndex + 29, 10, 14));
|
||||
ws.GetRow(rowIndex + 29).GetCell(10).SetCellValue("焊接责任工程师:\r\nWelding Engineer:");
|
||||
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 30, rowIndex + 30, 0, 4));
|
||||
ws.GetRow(rowIndex + 30).GetCell(0).SetCellValue("日期Date: 年 月 日");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 30, rowIndex + 30, 5, 9));
|
||||
ws.GetRow(rowIndex + 30).GetCell(5).SetCellValue("日期Date: 年 月 日");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 30, rowIndex + 30, 10, 14));
|
||||
ws.GetRow(rowIndex + 30).GetCell(10).SetCellValue("日期Date: 年 月 日");
|
||||
|
||||
RegionUtil.SetBorderTop(1, new CellRangeAddress(rowIndex + 24, rowIndex + 24, 0, 14), ws);
|
||||
RegionUtil.SetBorderLeft(1, new CellRangeAddress(rowIndex + 24, rowIndex + 30, 0, 0), ws);
|
||||
RegionUtil.SetBorderRight(1, new CellRangeAddress(rowIndex + 24, rowIndex + 30, 14, 14), ws);
|
||||
RegionUtil.SetBorderBottom(1, new CellRangeAddress(rowIndex + 30, rowIndex + 30, 0, 14), ws);
|
||||
|
||||
RegionUtil.SetBorderRight(1, new CellRangeAddress(rowIndex + 24, rowIndex + 30, 4, 4), ws);
|
||||
RegionUtil.SetBorderRight(1, new CellRangeAddress(rowIndex + 24, rowIndex + 30, 9, 9), ws);
|
||||
|
||||
ws.GetRow(rowIndex + 26).Height = ws.GetRow(rowIndex + 28).Height = 5 * 20;
|
||||
#endregion
|
||||
|
||||
ws.PrintSetup.FitWidth = 1;
|
||||
ws.PrintSetup.FitHeight = 0;
|
||||
ws.PrintSetup.PaperSize = (int)PaperSize.A4_Small;
|
||||
|
||||
ws.FitToPage = true;
|
||||
|
||||
//横向打印
|
||||
ws.PrintSetup.Landscape = true;
|
||||
//垂直水平居中
|
||||
ws.VerticallyCenter = true;
|
||||
ws.HorizontallyCenter = true;
|
||||
//打印边距设置 厘米/3
|
||||
ws.SetMargin(MarginType.RightMargin, (double)2.4 / 3);
|
||||
ws.SetMargin(MarginType.LeftMargin, (double)2.4 / 3);
|
||||
ws.SetMargin(MarginType.TopMargin, (double)2.9 / 3);
|
||||
ws.SetMargin(MarginType.BottomMargin, (double)2.4 / 3);
|
||||
|
||||
//页眉页脚间距
|
||||
ws.SetMargin(MarginType.HeaderMargin, 0);
|
||||
ws.SetMargin(MarginType.FooterMargin, 0);
|
||||
}
|
||||
//22-射线检测比例确认表SHT 3503-J412-2007
|
||||
private void template22(XSSFWorkbook hssfworkbook, XSSFSheet ws)
|
||||
private void template22_old(XSSFWorkbook hssfworkbook, XSSFSheet ws)
|
||||
{
|
||||
#region 头部
|
||||
var style = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 11, true, false, "宋体");
|
||||
@@ -3154,6 +3342,314 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
ws.SetMargin(MarginType.FooterMargin, 0);
|
||||
}
|
||||
|
||||
//22-射线检测比例确认表SHT 3503-J412-2007
|
||||
private void template22(XSSFWorkbook hssfworkbook, XSSFSheet ws)
|
||||
{
|
||||
#region 头部
|
||||
var style = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 10.5, true, false, "宋体");
|
||||
int rowIndex = 0;
|
||||
ws = ExcelCreateRow(ws, hssfworkbook, rowIndex, rowIndex + 4, style, 0, 20, true);
|
||||
|
||||
//设置列宽
|
||||
ws.SetColumnWidth(0, 13 * 256);
|
||||
ws.SetColumnWidth(1, 6 * 256);
|
||||
ws.SetColumnWidth(2, 10 * 256);
|
||||
ws.SetColumnWidth(3, 5 * 256);
|
||||
ws.SetColumnWidth(4, 5 * 256);
|
||||
ws.SetColumnWidth(5, 7 * 256);
|
||||
ws.SetColumnWidth(6, 7 * 256);
|
||||
ws.SetColumnWidth(7, 7 * 256);
|
||||
ws.SetColumnWidth(8, 7 * 256);
|
||||
ws.SetColumnWidth(9, 7 * 256);
|
||||
ws.SetColumnWidth(10, 7 * 256);
|
||||
ws.SetColumnWidth(11, 7 * 256);
|
||||
ws.SetColumnWidth(12, 7 * 256);
|
||||
ws.SetColumnWidth(13, 7 * 256);
|
||||
ws.SetColumnWidth(14, 7 * 256);
|
||||
ws.SetColumnWidth(15, 7 * 256);
|
||||
ws.SetColumnWidth(16, 7 * 256);
|
||||
ws.SetColumnWidth(17, 5 * 256);
|
||||
ws.SetColumnWidth(18, 7 * 256);
|
||||
ws.SetColumnWidth(19, 7 * 256);
|
||||
ws.SetColumnWidth(20, 25 * 256);
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex, rowIndex + 3, 0, 2));
|
||||
ws.GetRow(rowIndex).GetCell(0).SetCellValue("SH/T 3503-J412-1-2007");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex, rowIndex, 3, 17));
|
||||
ws.GetRow(rowIndex).GetCell(3).SetCellValue("管道焊接接头射线检测比例确认表(一)");
|
||||
ws.GetRow(rowIndex).GetCell(3).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 16, true, true);
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 1, rowIndex + 2, 3, 17));
|
||||
ws.GetRow(rowIndex + 1).GetCell(3).SetCellValue("Pipeline Welding Joints Radiographic Examination Rate Confirmation Form(I)");
|
||||
ws.GetRow(rowIndex + 1).GetCell(3).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 14, true, true);
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex, rowIndex, 18, 20));
|
||||
ws.GetRow(rowIndex).GetCell(18).SetCellValue("工程名称:巴斯夫(广东)一体化项目专用化学品二区");
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex+1, rowIndex+1, 18, 20));
|
||||
ws.GetRow(rowIndex+1).GetCell(18).SetCellValue("Project Name:BASF (Guangdong) Integrated Project");
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 2, rowIndex + 2, 18, 20));
|
||||
ws.GetRow(rowIndex + 2).GetCell(18).SetCellValue("单元名称:Citral");
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 3, rowIndex + 3, 18, 20));
|
||||
ws.GetRow(rowIndex + 3).GetCell(18).SetCellValue("Unit Name:Citral");
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 3, rowIndex + 3, 3, 17));
|
||||
|
||||
ws.GetRow(rowIndex).GetCell(18).CellStyle = ws.GetRow(rowIndex + 1).GetCell(18).CellStyle = ws.GetRow(rowIndex + 2).GetCell(18).CellStyle = ws.GetRow(rowIndex + 3).GetCell(18).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Left, 10.5, true, false);
|
||||
RegionUtil.SetBorderBottom(0, new CellRangeAddress(rowIndex , rowIndex, 18, 20), ws);
|
||||
RegionUtil.SetBorderTop(0, new CellRangeAddress(rowIndex + 1, rowIndex + 1, 18, 20), ws);
|
||||
RegionUtil.SetBorderBottom(0, new CellRangeAddress(rowIndex + 1, rowIndex + 1, 18, 20), ws);
|
||||
RegionUtil.SetBorderTop(0, new CellRangeAddress(rowIndex + 2, rowIndex + 2, 18, 20), ws);
|
||||
RegionUtil.SetBorderBottom(0, new CellRangeAddress(rowIndex + 2, rowIndex + 2, 18, 20), ws);
|
||||
RegionUtil.SetBorderTop(0, new CellRangeAddress(rowIndex + 3, rowIndex + 3, 18, 20), ws);
|
||||
|
||||
|
||||
ws.GetRow(rowIndex + 3).GetCell(3).SetCellValue("共 1 页 第 1 页");
|
||||
|
||||
ws.GetRow(rowIndex + 4).GetCell(0).SetCellValue("执行标准\r\nApplicable code");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(4, 4, 1, 5));
|
||||
ws.AddMergedRegion(new CellRangeAddress(4, 4, 6, 7));
|
||||
ws.AddMergedRegion(new CellRangeAddress(4, 4, 8, 15));
|
||||
ws.AddMergedRegion(new CellRangeAddress(4, 4, 16, 17));
|
||||
ws.AddMergedRegion(new CellRangeAddress(4, 4, 18, 20));
|
||||
ws.GetRow(rowIndex + 4).GetCell(1).SetCellValue("NB/T47013.2-2015");
|
||||
ws.GetRow(rowIndex + 4).GetCell(6).SetCellValue("检测方法\r\nExam. Method");
|
||||
ws.GetRow(rowIndex + 4).GetCell(8).SetCellValue("射线检测\r\nRT");
|
||||
ws.GetRow(rowIndex + 4).GetCell(16).SetCellValue("检测比例\r\nExam. Rate");
|
||||
ws.GetRow(rowIndex + 4).GetCell(18).SetCellValue("5%");
|
||||
|
||||
ws.GetRow(rowIndex).Height = 27 * 20;
|
||||
ws.GetRow(rowIndex + 1).Height = 27 * 20;
|
||||
ws.GetRow(rowIndex + 2).Height = 15 * 20;
|
||||
ws.GetRow(rowIndex + 3).Height = 20 * 20;
|
||||
ws.GetRow(rowIndex + 4).Height = 40 * 20;
|
||||
|
||||
#endregion
|
||||
|
||||
#region 表格部分
|
||||
ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 5, rowIndex + 6, style, 0, 20, true);
|
||||
|
||||
ws.GetRow(rowIndex + 5).Height = 29 * 20;
|
||||
ws.GetRow(rowIndex + 6).Height = 43 * 20;
|
||||
|
||||
//设置表头部分
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 5, rowIndex + 6, 0, 1));
|
||||
ws.GetRow(rowIndex + 5).GetCell(0).SetCellValue("管道编号\r\nPipeline No.");
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 5, rowIndex + 6, 2, 2));
|
||||
ws.GetRow(rowIndex + 5).GetCell(2).SetCellValue("材质\r\nMaterial");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 5, rowIndex + 5, 3, 4));
|
||||
ws.GetRow(rowIndex + 5).GetCell(3).SetCellValue("规 格/Size");
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 6, rowIndex + 6, 3, 4));
|
||||
ws.GetRow(rowIndex + 6).GetCell(3).SetCellValue("mm");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 5, rowIndex + 5, 5, 8));
|
||||
ws.GetRow(rowIndex + 5).GetCell(5).SetCellValue("管道焊接接头\r\nWelding Joints");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 5, rowIndex + 5, 9, 12));
|
||||
ws.GetRow(rowIndex + 5).GetCell(9).SetCellValue("施焊焊工\r\nWelder");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 5, rowIndex + 5, 13, 16));
|
||||
ws.GetRow(rowIndex + 5).GetCell(13).SetCellValue("检测焊接接头\r\nExanined Joints");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 5, rowIndex + 5, 17, 19));
|
||||
ws.GetRow(rowIndex + 5).GetCell(17).SetCellValue("实际检测比例");
|
||||
|
||||
ws.GetRow(rowIndex + 5).GetCell(20).SetCellValue("检测报告编号");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 6, rowIndex + 6, 5, 6));
|
||||
ws.GetRow(rowIndex + 6).GetCell(5).SetCellValue("总数\r\nTotal");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 6, rowIndex + 6, 7, 8));
|
||||
ws.GetRow(rowIndex + 6).GetCell(7).SetCellValue("固定口数\r\nField Joints");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 6, rowIndex + 6, 9, 10));
|
||||
ws.GetRow(rowIndex + 6).GetCell(9).SetCellValue("焊工代号\r\nWelder No.");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 6, rowIndex + 6, 11, 12));
|
||||
ws.GetRow(rowIndex + 6).GetCell(11).SetCellValue("施焊数量\r\nWelded Joints");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 6, rowIndex + 6, 13, 14));
|
||||
ws.GetRow(rowIndex + 6).GetCell(13).SetCellValue("总数\r\nTotal Joints");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 6, rowIndex + 6, 15, 16));
|
||||
ws.GetRow(rowIndex + 6).GetCell(15).SetCellValue("固定口数\r\nField Joints");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 6, rowIndex + 6, 17, 19));
|
||||
ws.GetRow(rowIndex + 6).GetCell(17).SetCellValue("Actual exam. Rate");
|
||||
|
||||
ws.GetRow(rowIndex + 6).GetCell(20).SetCellValue("Examination Report No.");
|
||||
RegionUtil.SetBorderBottom(0, new CellRangeAddress(rowIndex+5, rowIndex+5, 17, 20), ws);
|
||||
RegionUtil.SetBorderTop(0, new CellRangeAddress(rowIndex + 6, rowIndex + 6, 17, 20), ws);
|
||||
|
||||
//这里创建行数据 17-16
|
||||
ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 7, rowIndex + 16, style, 0, 20, true);
|
||||
for (int i = 7; i < 16; i++)
|
||||
{
|
||||
ws.GetRow(rowIndex + i).Height = 28 * 20;
|
||||
if (i == 7)
|
||||
{
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + 10, 0, 1));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + 10, 2, 2));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + 10, 3, 4));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + 10, 5, 6));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + 10, 7, 8));
|
||||
}
|
||||
if (i > 10)
|
||||
{
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 0, 1));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 3, 4));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 5, 6));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 7, 8));
|
||||
}
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 9, 10));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 11, 12));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 13, 14));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 15, 16));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 17, 19));
|
||||
|
||||
}
|
||||
//这里循环数据
|
||||
ws.GetRow(rowIndex + 15).GetCell(0).SetCellValue("小计\r\nTotal");
|
||||
|
||||
//模拟数据
|
||||
ws.GetRow(rowIndex + 7).GetCell(0).SetCellValue("1701-130-9062.058-0000");
|
||||
ws.GetRow(rowIndex + 7).GetCell(2).SetCellValue("A53-B");
|
||||
ws.GetRow(rowIndex + 7).GetCell(3).SetCellValue("114");
|
||||
ws.GetRow(rowIndex + 7).GetCell(5).SetCellValue("18");
|
||||
ws.GetRow(rowIndex + 7).GetCell(7).SetCellValue("1");
|
||||
ws.GetRow(rowIndex + 7).GetCell(9).SetCellValue("W7004");
|
||||
ws.GetRow(rowIndex + 8).GetCell(9).SetCellValue("W7010");
|
||||
ws.GetRow(rowIndex + 9).GetCell(9).SetCellValue("W7011");
|
||||
ws.GetRow(rowIndex + 10).GetCell(9).SetCellValue("W7013");
|
||||
|
||||
ws.GetRow(rowIndex + 7).GetCell(11).SetCellValue("6");
|
||||
ws.GetRow(rowIndex + 8).GetCell(11).SetCellValue("3");
|
||||
ws.GetRow(rowIndex + 9).GetCell(11).SetCellValue("6");
|
||||
ws.GetRow(rowIndex + 10).GetCell(11).SetCellValue("1");
|
||||
|
||||
ws.GetRow(rowIndex + 7).GetCell(13).SetCellValue("1");
|
||||
ws.GetRow(rowIndex + 8).GetCell(13).SetCellValue("3");
|
||||
ws.GetRow(rowIndex + 9).GetCell(13).SetCellValue("6");
|
||||
ws.GetRow(rowIndex + 10).GetCell(13).SetCellValue("1");
|
||||
|
||||
ws.GetRow(rowIndex + 7).GetCell(15).SetCellValue("0");
|
||||
ws.GetRow(rowIndex + 8).GetCell(15).SetCellValue("0");
|
||||
ws.GetRow(rowIndex + 9).GetCell(15).SetCellValue("0");
|
||||
ws.GetRow(rowIndex + 10).GetCell(15).SetCellValue("1");
|
||||
|
||||
ws.GetRow(rowIndex + 7).GetCell(17).SetCellValue("16.87%");
|
||||
ws.GetRow(rowIndex + 8).GetCell(17).SetCellValue("100.00%");
|
||||
ws.GetRow(rowIndex + 9).GetCell(17).SetCellValue("100.00%");
|
||||
ws.GetRow(rowIndex + 10).GetCell(17).SetCellValue("50.00%");
|
||||
|
||||
ws.GetRow(rowIndex + 7).GetCell(20).SetCellValue("RT-0010");
|
||||
ws.GetRow(rowIndex + 8).GetCell(20).SetCellValue("RT-009\r\nRT-0010");
|
||||
ws.GetRow(rowIndex + 9).GetCell(20).SetCellValue("RT-0010");
|
||||
ws.GetRow(rowIndex + 10).GetCell(20).SetCellValue("RT-037");
|
||||
|
||||
#endregion
|
||||
|
||||
#region 尾部
|
||||
|
||||
ws.GetRow(rowIndex + 16).GetCell(0).SetCellValue("备注\r\nRemark");
|
||||
ws.GetRow(rowIndex + 16).GetCell(1).SetCellValue("焊口位置与检测焊口见管道单线图与无损检测报告。\r\nPlease refer to Pipeline Iso-drawing and NDE Report for joints position and examined joints.");
|
||||
ws.GetRow(rowIndex + 16).GetCell(1).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Left, 10.5, true, false);
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 16, rowIndex + 16, 1, 20));
|
||||
ws.GetRow(rowIndex + 16).Height = 29 * 20;
|
||||
|
||||
|
||||
style = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.None, BorderStyle.None, BorderStyle.None, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Left, 10.5, true, false);
|
||||
var style1 = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 10.5, true, false);
|
||||
var style2 = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.None, BorderStyle.None, BorderStyle.None, VerticalAlignment.Bottom, NPOI.SS.UserModel.HorizontalAlignment.Left, 10.5, true, false);
|
||||
|
||||
ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 17, rowIndex + 23, style, 0, 20, true);
|
||||
|
||||
ws.GetRow(rowIndex + 17).GetCell(20).CellStyle = style1;
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 17, rowIndex + 17, 0, 3));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 17, rowIndex + 17, 4, 9));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 17, rowIndex + 17, 10, 16));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 17, rowIndex + 17, 17, 20));
|
||||
|
||||
ws.GetRow(rowIndex + 17).GetCell(0).SetCellValue("建设/监理单位\r\nOwner/Supervision Contractor");
|
||||
ws.GetRow(rowIndex + 17).GetCell(4).SetCellValue("总承包单位\r\nGeneral Contractor");
|
||||
ws.GetRow(rowIndex + 17).GetCell(10).SetCellValue("检 测 单 位\r\nExamination Contractor");
|
||||
ws.GetRow(rowIndex + 17).GetCell(17).SetCellValue("施 工 单 位\r\nConstruction Company");
|
||||
ws.GetRow(rowIndex + 17).GetCell(0).CellStyle = ws.GetRow(rowIndex + 17).GetCell(4).CellStyle = ws.GetRow(rowIndex + 17).GetCell(10).CellStyle = ws.GetRow(rowIndex + 17).GetCell(17).CellStyle = style1;
|
||||
ws.GetRow(rowIndex + 17).Height = 33 * 20;
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 18, rowIndex + 18, 0, 3));
|
||||
ws.GetRow(rowIndex + 18).GetCell(0).SetCellValue("专业工程师\r\nDiscipline Engineer:");
|
||||
ws.GetRow(rowIndex + 18).Height = 31 * 20;
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 18, rowIndex + 18, 4, 9));
|
||||
ws.GetRow(rowIndex + 18).GetCell(4).SetCellValue("专业工程师\r\nDiscipline Engineer:");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 18, rowIndex + 18, 10, 16));
|
||||
ws.GetRow(rowIndex + 18).GetCell(10).SetCellValue("专业工程师\r\nDiscipline Engineer:");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 18, rowIndex + 18, 17, 20));
|
||||
ws.GetRow(rowIndex + 18).GetCell(17).SetCellValue("专业工程师\r\nDiscipline Engineer:");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 20, rowIndex + 20, 17, 20));
|
||||
ws.GetRow(rowIndex + 20).GetCell(17).SetCellValue("质量检查员:\r\nQuality Inspector:");
|
||||
ws.GetRow(rowIndex + 20).Height = 31 * 20;
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 22, rowIndex + 22, 17, 20));
|
||||
ws.GetRow(rowIndex + 22).GetCell(17).SetCellValue("制表:\r\nPrepared:");
|
||||
ws.GetRow(rowIndex + 22).Height = 31 * 20;
|
||||
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 23, rowIndex + 23, 0, 3));
|
||||
ws.GetRow(rowIndex + 23).GetCell(0).SetCellValue("日期Date: 年 月 日");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 23, rowIndex + 23, 4, 9));
|
||||
ws.GetRow(rowIndex + 23).GetCell(4).SetCellValue("日期Date: 年 月 日");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 23, rowIndex + 23, 10, 16));
|
||||
ws.GetRow(rowIndex + 23).GetCell(10).SetCellValue("日期Date: 年 月 日");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 23, rowIndex + 23, 17, 20));
|
||||
ws.GetRow(rowIndex + 23).GetCell(17).SetCellValue("日期Date: 年 月 日");
|
||||
ws.GetRow(rowIndex + 23).Height = 29 * 20;
|
||||
|
||||
ws.GetRow(rowIndex + 23).GetCell(0).CellStyle = ws.GetRow(rowIndex + 23).GetCell(4).CellStyle = ws.GetRow(rowIndex + 23).GetCell(10).CellStyle = ws.GetRow(rowIndex + 23).GetCell(17).CellStyle = style2;
|
||||
|
||||
ws.GetRow(rowIndex + 19).Height = ws.GetRow(rowIndex + 21).Height = 14 * 20;
|
||||
|
||||
|
||||
RegionUtil.SetBorderTop(1, new CellRangeAddress(rowIndex + 18, rowIndex + 18, 0, 20), ws);
|
||||
RegionUtil.SetBorderLeft(1, new CellRangeAddress(rowIndex + 18, rowIndex + 23, 0, 0), ws);
|
||||
RegionUtil.SetBorderRight(1, new CellRangeAddress(rowIndex + 18, rowIndex + 23, 20, 20), ws);
|
||||
RegionUtil.SetBorderBottom(1, new CellRangeAddress(rowIndex + 18, rowIndex + 23, 0, 20), ws);
|
||||
|
||||
RegionUtil.SetBorderRight(1, new CellRangeAddress(rowIndex + 18, rowIndex + 23, 3, 3), ws);
|
||||
RegionUtil.SetBorderRight(1, new CellRangeAddress(rowIndex + 18, rowIndex + 23, 9, 9), ws);
|
||||
RegionUtil.SetBorderRight(1, new CellRangeAddress(rowIndex + 18, rowIndex + 23, 16, 16), ws);
|
||||
|
||||
#endregion
|
||||
|
||||
ws.PrintSetup.FitWidth = 1;
|
||||
ws.PrintSetup.FitHeight = 0;
|
||||
ws.PrintSetup.PaperSize = (int)PaperSize.A4_Small;
|
||||
|
||||
ws.FitToPage = true;
|
||||
|
||||
//横向打印
|
||||
ws.PrintSetup.Landscape = true;
|
||||
//垂直水平居中
|
||||
ws.VerticallyCenter = true;
|
||||
ws.HorizontallyCenter = true;
|
||||
//打印边距设置 厘米/3
|
||||
ws.SetMargin(MarginType.RightMargin, (double)2.4 / 3);
|
||||
ws.SetMargin(MarginType.LeftMargin, (double)2.4 / 3);
|
||||
ws.SetMargin(MarginType.TopMargin, (double)2.9 / 3);
|
||||
ws.SetMargin(MarginType.BottomMargin, (double)2.4 / 3);
|
||||
|
||||
//页眉页脚间距
|
||||
ws.SetMargin(MarginType.HeaderMargin, 0);
|
||||
ws.SetMargin(MarginType.FooterMargin, 0);
|
||||
}
|
||||
|
||||
//23-TP-09-超声&PAUT&TOFD检测比例确认表
|
||||
private void template23(XSSFWorkbook hssfworkbook, XSSFSheet ws)
|
||||
{
|
||||
@@ -3598,6 +4094,212 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
|
||||
}
|
||||
|
||||
//24-TP-10-渗透&MT检测比例确认表
|
||||
private void template25_1(XSSFWorkbook hssfworkbook, XSSFSheet ws)
|
||||
{
|
||||
int rowIndex = 0;
|
||||
var style = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 10, true, false, "Arial Unicode MS");
|
||||
#region 头部
|
||||
var style1 = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.None, BorderStyle.None, BorderStyle.None, BorderStyle.None, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Right, 10, true, false, "Arial Unicode MS");
|
||||
ws = ExcelCreateRow(ws, hssfworkbook, rowIndex, rowIndex, style1, 0, 20, true);
|
||||
|
||||
//设置行宽度
|
||||
ws.SetColumnWidth(0, 13 * 256);
|
||||
ws.SetColumnWidth(1, 3 * 256);
|
||||
ws.SetColumnWidth(2, 10 * 256);
|
||||
for (int i = 3; i < 20; i++)
|
||||
{
|
||||
ws.SetColumnWidth(1, 3 * 256);
|
||||
}
|
||||
ws.SetColumnWidth(20, 23 * 256);
|
||||
|
||||
//设置行高度
|
||||
ws.GetRow(rowIndex).Height = 10 * 20;
|
||||
ws.GetRow(rowIndex).GetCell(20).CellStyle = style1;
|
||||
ws.GetRow(rowIndex).GetCell(20).SetCellValue("Form No. TP-10");
|
||||
|
||||
ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 1, rowIndex + 2, style, 0, 20, true);
|
||||
//设置行高度
|
||||
ws.GetRow(rowIndex + 1).Height = 10 * 20 * 9;
|
||||
ws.GetRow(rowIndex + 2).Height = 10 * 20 * 3;
|
||||
|
||||
//合并单元格和填充文本
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 1, rowIndex + 1, 0, 2));
|
||||
ws.GetRow(rowIndex + 1).GetCell(0).SetCellValue("");
|
||||
|
||||
var style3 = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, NPOI.SS.UserModel.HorizontalAlignment.Center, 14, true, true, "Arial Unicode MS");
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 1, rowIndex + 1, 3, 17));
|
||||
ws.GetRow(rowIndex + 1).GetCell(3).CellStyle = style3;
|
||||
ws.GetRow(rowIndex + 1).GetCell(3).SetCellValue("管道焊接接头PMI检测比例确认表(一)\nPipeline Welding Joints PMI Examination Rate Confirmation Form(I)\n共 1 页 第 1 页");
|
||||
|
||||
var style2 = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Top, NPOI.SS.UserModel.HorizontalAlignment.Left, 10, true, false, "Arial Unicode MS");
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 1, rowIndex + 1, 18, 20));
|
||||
ws.GetRow(rowIndex + 1).GetCell(18).CellStyle = style2;
|
||||
ws.GetRow(rowIndex + 1).GetCell(18).SetCellValue("\n 工程名称:巴斯夫(广东)一体化项目\n Project Name:BASF (Guangdong) Integrated Project\n 单元名称:Citral\n Unit Name:Citral");
|
||||
|
||||
ws.GetRow(rowIndex + 2).GetCell(0).SetCellValue("执行标准\nApplicable code");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 2, rowIndex + 2, 1, 5));
|
||||
ws.GetRow(rowIndex + 2).GetCell(1).SetCellValue("");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 2, rowIndex + 2, 6, 7));
|
||||
ws.GetRow(rowIndex + 2).GetCell(6).SetCellValue("检测方法\nExam. Method");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 2, rowIndex + 2, 8, 15));
|
||||
ws.GetRow(rowIndex + 2).GetCell(8).SetCellValue("PMI检测");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 2, rowIndex + 2, 16, 17));
|
||||
ws.GetRow(rowIndex + 2).GetCell(16).SetCellValue("检测比例\nExam. Rate");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 2, rowIndex + 2, 18, 20));
|
||||
ws.GetRow(rowIndex + 2).GetCell(18).SetCellValue("2%");
|
||||
|
||||
#endregion
|
||||
|
||||
#region 表格部分
|
||||
|
||||
ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 3, rowIndex + 13, style, 0, 20, true);
|
||||
//设置高度和合并列填充文本
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 3, rowIndex + 4, 0, 1));
|
||||
ws.GetRow(rowIndex + 3).GetCell(0).SetCellValue("管道编号\nPipeline No.");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 3, rowIndex + 4, 2, 2));
|
||||
ws.GetRow(rowIndex + 3).GetCell(2).SetCellValue("材质\nMaterial");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 3, rowIndex + 4, 3, 4));
|
||||
ws.GetRow(rowIndex + 3).GetCell(3).SetCellValue("规 格/Size\n mm");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 3, rowIndex + 3, 5, 8));
|
||||
ws.GetRow(rowIndex + 3).GetCell(5).SetCellValue("管道焊接接头\nWelding Joints");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 3, rowIndex + 3, 9, 12));
|
||||
ws.GetRow(rowIndex + 3).GetCell(9).SetCellValue("施焊焊工\nWelder");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 3, rowIndex + 3, 13, 16));
|
||||
ws.GetRow(rowIndex + 3).GetCell(13).SetCellValue("检测焊接接头\nExanined Joints");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 4, rowIndex + 4, 5, 6));
|
||||
ws.GetRow(rowIndex + 4).GetCell(5).SetCellValue("总数\nTotal");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 4, rowIndex + 4, 7, 8));
|
||||
ws.GetRow(rowIndex + 4).GetCell(7).SetCellValue("固定口数\nField Joints");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 4, rowIndex + 4, 9, 10));
|
||||
ws.GetRow(rowIndex + 4).GetCell(9).SetCellValue("焊工代号\nWelder No.");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 4, rowIndex + 4, 11, 12));
|
||||
ws.GetRow(rowIndex + 4).GetCell(11).SetCellValue("施焊数量\nWelded Joints");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 4, rowIndex + 4, 13, 14));
|
||||
ws.GetRow(rowIndex + 4).GetCell(13).SetCellValue("总数\nTotal Joints");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 4, rowIndex + 4, 15, 16));
|
||||
ws.GetRow(rowIndex + 4).GetCell(15).SetCellValue("固定口数\nField Joints");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 3, rowIndex + 4, 17, 19));
|
||||
ws.GetRow(rowIndex + 3).GetCell(17).SetCellValue("实际检测比例\nActual exam. Rate");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 3, rowIndex + 4, 20, 20));
|
||||
ws.GetRow(rowIndex + 3).GetCell(20).SetCellValue("检测报告编号\nExamination Report No.");
|
||||
|
||||
|
||||
for (int i = 3; i < 14; i++)
|
||||
{
|
||||
if (i == 3 || i == 4)
|
||||
{
|
||||
ws.GetRow(rowIndex + i).Height = 30 * 20;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (i == 13)
|
||||
ws.GetRow(rowIndex + i).Height = 30 * 20;
|
||||
else
|
||||
ws.GetRow(rowIndex + i).Height = 19 * 20;
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 0, 1));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 3, 4));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 5, 6));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 7, 8));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 9, 10));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 11, 12));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 13, 14));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 15, 16));
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + i, rowIndex + i, 17, 19));
|
||||
}
|
||||
ws.GetRow(rowIndex + 13).GetCell(0).SetCellValue("小计\nTotal");
|
||||
#endregion
|
||||
|
||||
#region 尾部
|
||||
|
||||
ws = ExcelCreateRow(ws, hssfworkbook, rowIndex + 14, rowIndex + 16, style, 0, 20, true);
|
||||
//设置行高
|
||||
ws.GetRow(rowIndex + 14).Height = 20 * 20 * 2;
|
||||
ws.GetRow(rowIndex + 15).Height = 20 * 20 * 2;
|
||||
ws.GetRow(rowIndex + 16).Height = 20 * 20 * 7;
|
||||
|
||||
ws.GetRow(rowIndex + 14).GetCell(0).SetCellValue("备注\nRemark");
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 14, rowIndex + 14, 1, 20));
|
||||
|
||||
ws.GetRow(rowIndex + 14).GetCell(1).CellStyle = style2;
|
||||
ws.GetRow(rowIndex + 14).GetCell(1).SetCellValue("焊口位置与检测焊口见管道单线图与无损检测报告。\nPlease refer to Pipeline Iso-drawing and NDE Report for joints position and examined joints.");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 15, rowIndex + 15, 0, 3));
|
||||
ws.GetRow(rowIndex + 15).GetCell(0).SetCellValue("建 设 / 监 理 单 位\nOwner/JianLi Company");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 15, rowIndex + 15, 4, 9));
|
||||
ws.GetRow(rowIndex + 15).GetCell(4).SetCellValue("总 承 包 单 位\nGeneral Contractor");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 15, rowIndex + 15, 10, 16));
|
||||
ws.GetRow(rowIndex + 15).GetCell(10).SetCellValue("检 测 单 位\nExamination Contractor");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 15, rowIndex + 15, 17, 20));
|
||||
ws.GetRow(rowIndex + 15).GetCell(17).SetCellValue("施 工 单 位\nConstruction Company");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 16, rowIndex + 16, 0, 3));
|
||||
ws.GetRow(rowIndex + 16).GetCell(0).CellStyle = style2;
|
||||
ws.GetRow(rowIndex + 16).GetCell(0).SetCellValue("专业工程师\n Discipline Engineer: \n\n\n\n\n\n\n\n 日期Date: 年 月 日");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 16, rowIndex + 16, 4, 9));
|
||||
ws.GetRow(rowIndex + 16).GetCell(4).CellStyle = style2;
|
||||
ws.GetRow(rowIndex + 16).GetCell(4).SetCellValue("专业工程师\n Discipline Engineer: \n\n\n\n\n\n\n\n 日期Date: 年 月 日");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 16, rowIndex + 16, 10, 16));
|
||||
ws.GetRow(rowIndex + 16).GetCell(10).CellStyle = style2;
|
||||
ws.GetRow(rowIndex + 16).GetCell(10).SetCellValue("专业工程师\n Discipline Engineer: \n\n\n\n\n\n\n\n 日期Date: 年 月 日");
|
||||
|
||||
ws.AddMergedRegion(new CellRangeAddress(rowIndex + 16, rowIndex + 16, 17, 20));
|
||||
ws.GetRow(rowIndex + 16).GetCell(17).CellStyle = style2;
|
||||
ws.GetRow(rowIndex + 16).GetCell(17).SetCellValue("专业工程师\n Discipline Engineer: \n\n 质量检查员:\n Quality Inspector:\n\n 制表:\n Prepared:\n\n 日期Date: 年 月 日");
|
||||
|
||||
#endregion
|
||||
|
||||
ws.PrintSetup.FitWidth = 1;
|
||||
ws.PrintSetup.FitHeight = 0;
|
||||
ws.PrintSetup.PaperSize = (int)PaperSize.A4_Small;
|
||||
|
||||
ws.FitToPage = true;
|
||||
|
||||
//水平垂直居中
|
||||
ws.HorizontallyCenter = true;
|
||||
ws.VerticallyCenter = true;
|
||||
|
||||
//横向打印
|
||||
ws.PrintSetup.Landscape = true;
|
||||
//垂直水平居中
|
||||
ws.VerticallyCenter = true;
|
||||
ws.HorizontallyCenter = true;
|
||||
//打印边距设置 厘米/3
|
||||
ws.SetMargin(MarginType.RightMargin, (double)2.4 / 3);
|
||||
ws.SetMargin(MarginType.LeftMargin, (double)2.4 / 3);
|
||||
ws.SetMargin(MarginType.TopMargin, (double)2.9 / 3);
|
||||
ws.SetMargin(MarginType.BottomMargin, (double)2.4 / 3);
|
||||
|
||||
//页眉页脚间距
|
||||
ws.SetMargin(MarginType.HeaderMargin, 0);
|
||||
ws.SetMargin(MarginType.FooterMargin, 0);
|
||||
|
||||
}
|
||||
|
||||
//25-管道无损检测结果汇总表SHT 3503-J412-2017
|
||||
private void template25(XSSFWorkbook hssfworkbook, XSSFSheet ws)
|
||||
{
|
||||
@@ -5542,6 +6244,11 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
XSSFSheet sheet24 = (XSSFSheet)hssfworkbook.CreateSheet(oneTemp.Title);
|
||||
template24(hssfworkbook, sheet24);
|
||||
break;
|
||||
//25-1-管道无损检测结果汇总表SHT 3503-J412-2017
|
||||
case "95125974-3DD4-4E16-B4F0-A9D9C9A1406D":
|
||||
XSSFSheet sheet25_1 = (XSSFSheet)hssfworkbook.CreateSheet(oneTemp.Title);
|
||||
template25_1(hssfworkbook, sheet25_1);
|
||||
break;
|
||||
//25-管道无损检测结果汇总表SHT 3503-J412-2017
|
||||
case "4C45ABAB-89E9-4874-8F55-5050CDE98DFC":
|
||||
XSSFSheet sheet25 = (XSSFSheet)hssfworkbook.CreateSheet(oneTemp.Title);
|
||||
|
||||
@@ -169,7 +169,10 @@
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="管线编号" ColumnID="PipelineCode" DataField="PipelineCode" SortField="PipelineCode"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="220px" ExpandUnusedSpace="true">
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="部分/全部焊口" ColumnID="WeldJonintCode" DataField="WeldJonintCode" SortField="PipelineCode"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="设计压力" ColumnID="DesignPressure" DataField="DesignPressure" SortField="DesignPressure"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
|
||||
|
||||
@@ -230,7 +230,8 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
this.SetTextTemp();
|
||||
this.PageInfoLoad(); ///页面输入保存信息
|
||||
string strSql = @"SELECT ptp.ProjectId, ptp.PTP_ID,ptpPipe.PT_PipeId, WorkArea.WorkAreaCode,IsoInfo.PipelineCode,
|
||||
IsoInfo.DesignPressure,IsoInfo.DesignTemperature,ser.MediumName
|
||||
IsoInfo.DesignPressure,IsoInfo.DesignTemperature,ser.MediumName,
|
||||
ptpPipe.isAll,(case when (isnull(ptpPipe.WeldJonintCode,'')='') then '全部' else ptpPipe.WeldJonintCode end) as WeldJonintCode
|
||||
FROM dbo.PTP_TestPackage AS ptp
|
||||
LEFT JOIN dbo.PTP_PipelineList AS ptpPipe ON ptp.PTP_ID=ptpPipe.PTP_ID
|
||||
LEFT JOIN dbo.Pipeline_Pipeline AS IsoInfo ON IsoInfo.PipelineId = ptpPipe.PipelineId
|
||||
@@ -751,8 +752,8 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
protected void btnDownLoad_Click(object sender, EventArgs e)
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string uploadfilepath = rootPath + Const.HJGL_DataInTemplateUrl;
|
||||
string filePath = Const.HJGL_DataInTemplateUrl;
|
||||
string uploadfilepath = rootPath + Const.HJGL_TestTemplateUrl;
|
||||
string filePath = Const.HJGL_TestTemplateUrl;
|
||||
string fileName = Path.GetFileName(filePath);
|
||||
FileInfo info = new FileInfo(uploadfilepath);
|
||||
long fileSize = info.Length;
|
||||
|
||||
@@ -110,7 +110,8 @@
|
||||
<f:DatePicker ID="txtTableDate" Label="建档日期" runat="server" DateFormatString="yyyy-MM-dd" LabelWidth="120px" ShowRedStar="true" Required="true">
|
||||
</f:DatePicker>
|
||||
<f:CheckBox runat="server" ID="ckSelect" Label="只显示选中项" LabelWidth="120px" AutoPostBack="true"
|
||||
OnCheckedChanged="ckSelect_OnCheckedChanged"></f:CheckBox>
|
||||
OnCheckedChanged="ckSelect_OnCheckedChanged">
|
||||
</f:CheckBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
@@ -118,7 +119,7 @@
|
||||
</Items>
|
||||
<Items>
|
||||
<f:Form ID="Form2" ShowBorder="true" ShowHeader="true" AutoScroll="true" Title="查询条件" EnableCollapse="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" Collapsed="true">
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right" Collapsed="false">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
@@ -154,9 +155,19 @@
|
||||
<f:RenderField HeaderText="工作区" ColumnID="WorkAreaCode" DataField="WorkAreaCode" SortField="WorkAreaCode"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField ID="WorkAreaId" ColumnID="WorkAreaId" DataField="WorkAreaId" runat="server" Hidden="true"></f:RenderField>
|
||||
<f:RenderField HeaderText="管线编号" ColumnID="PipelineCode" DataField="PipelineCode" SortField="PipelineCode"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="220px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="部分/全部焊口" Width="200" ColumnID="WeldJointCode" DataField="WeldJointCode" >
|
||||
<Editor>
|
||||
<f:TriggerBox ID="txtisALL" EmptyText="全部" Text="全部" TriggerIcon="Search" EnablePostBack="false" runat="server">
|
||||
<Listeners>
|
||||
<f:Listener Event="triggerclick" Handler="onNameSearchTriggerClick" />
|
||||
</Listeners>
|
||||
</f:TriggerBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="设计压力" ColumnID="DesignPressure" DataField="DesignPressure" SortField="DesignPressure"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="80px">
|
||||
</f:RenderField>
|
||||
@@ -181,6 +192,7 @@
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
|
||||
</Listeners>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
@@ -208,9 +220,16 @@
|
||||
runat="server" Text="全不选" Icon="Cancel">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
<f:Window ID="Window1" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
EnableResize="true" Target="Top" runat="server" Height="350px" Width="700px"
|
||||
Title="选择焊口">
|
||||
</f:Window>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
var grid1ClientID = '<%=Grid1.ClientID%>'
|
||||
var window1ClientID = '<%= Window1.ClientID %>';
|
||||
var ptpId = '<%=this.PTP_ID%>';
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
@@ -219,6 +238,38 @@
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
function updateGridRow(rowId, values) {
|
||||
|
||||
var allCode = "";
|
||||
var grid = F(grid1ClientID);
|
||||
var selectedCell = grid.getSelectedCell();
|
||||
var selStrCode = grid.getCellValue(selectedCell[0], "WeldJointCode");
|
||||
if (values) {
|
||||
allCode = values["WeldJointCode"];
|
||||
}
|
||||
if (selStrCode && selStrCode != "全部")
|
||||
{
|
||||
allCode +=","+selStrCode;
|
||||
}
|
||||
values["WeldJointCode"] = allCode;
|
||||
// cancelEdit用来取消编辑
|
||||
grid.cancelEdit();
|
||||
|
||||
grid.updateCellValue(rowId, values);
|
||||
}
|
||||
|
||||
function onNameSearchTriggerClick(event) {
|
||||
var grid = F(grid1ClientID);
|
||||
var selectedCell = grid.getSelectedCell();
|
||||
var selStrCode = grid.getCellValue(selectedCell[0], "WeldJointCode");
|
||||
if (selectedCell) {
|
||||
var wnd = F(window1ClientID);
|
||||
// 由于需要在顶层页面中弹出,所以不能设置 ./grideditor_selectfromwindow_clientscript_iframe.aspx,必须通过 baseUrl 来绝对定位
|
||||
wnd.show(F.baseUrl + "WeldingProcess/TestPackageManage/selectJointCode.aspx?rowId=" + selectedCell[0] + "&jointcode=" + selStrCode + "&ptpId=" + ptpId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+142
-9
@@ -3,7 +3,11 @@ using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Web.ModelBinding;
|
||||
using System.Web.UI.DataVisualization.Charting;
|
||||
using System.Windows.Forms;
|
||||
using BLL;
|
||||
using Model;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
@@ -103,6 +107,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
}
|
||||
}
|
||||
this.PageInfoLoad(); ///加载页面
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -170,6 +175,14 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
}
|
||||
this.txtRemark.Text = testPackageManage.Remark;
|
||||
|
||||
var items = Funs.DB.PTP_PipelineList.Where(t => t.PTP_ID == testPackageManage.PTP_ID)
|
||||
.Select(t=>t.WorkAreaId).FirstOrDefault();
|
||||
|
||||
if (items != null)
|
||||
{
|
||||
drpWorkArea.SelectedValue = items;
|
||||
}
|
||||
|
||||
this.BindGrid(); ////初始化页面
|
||||
this.ShowGridItem();
|
||||
}
|
||||
@@ -192,22 +205,51 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT IsoInfo.ProjectId,IsoInfo.WorkAreaId,WorkArea.WorkAreaCode,IsoInfo.PipelineId,IsoInfo.PipelineCode,
|
||||
string strSql = string.Empty;
|
||||
if (string.IsNullOrEmpty(this.PTP_ID))
|
||||
{
|
||||
strSql = @"SELECT
|
||||
IsoInfo.ProjectId,IsoInfo.WorkAreaId,WorkArea.WorkAreaCode,IsoInfo.PipelineId,IsoInfo.PipelineCode,
|
||||
IsoInfo.DesignPressure,IsoInfo.DesignTemperature, WorkArea.InstallationId,IsoInfo.UnitId,
|
||||
IsoInfo.TestPressure,IsoInfo.TestTemperature,bs.MediumName,IsoInfo.SingleNumber,
|
||||
IsoInfo.Specification,IsoInfo.PipingClassId,IsoInfo.MainMaterialId,IsoList.PT_PipeId,IsoList.PTP_ID
|
||||
'全部' as WeldJointCode
|
||||
FROM dbo.Pipeline_Pipeline AS IsoInfo
|
||||
LEFT JOIN DBO.Project_WorkArea AS WorkArea ON IsoInfo.WorkAreaId =WorkArea.WorkAreaId
|
||||
LEFT JOIN dbo.Base_Medium AS bs ON bs.MediumId = IsoInfo.MediumId
|
||||
WHERE IsoInfo.ProjectId= @ProjectId AND IsoInfo.UnitId= @UnitId
|
||||
AND WorkArea.InstallationId= @InstallationId AND
|
||||
IsoInfo.PipelineId not in(
|
||||
select PipelineId from PTP_PipelineList where PipelineId=IsoInfo.PipelineId and
|
||||
WorkAreaId=IsoInfo.WorkAreaId and isAll=1
|
||||
)
|
||||
";
|
||||
}
|
||||
else
|
||||
{
|
||||
strSql = @"SELECT
|
||||
IsoInfo.ProjectId,IsoInfo.WorkAreaId,WorkArea.WorkAreaCode,IsoInfo.PipelineId,IsoInfo.PipelineCode,
|
||||
IsoInfo.DesignPressure,IsoInfo.DesignTemperature, WorkArea.InstallationId,IsoInfo.UnitId,
|
||||
IsoInfo.TestPressure,IsoInfo.TestTemperature,bs.MediumName,IsoInfo.SingleNumber,
|
||||
IsoList.isAll,(case when (isnull(IsoList.WeldJonintCode,'')='') then '全部' else IsoList.WeldJonintCode end) as WeldJointCode
|
||||
FROM dbo.Pipeline_Pipeline AS IsoInfo
|
||||
LEFT JOIN DBO.Project_WorkArea AS WorkArea ON IsoInfo.WorkAreaId =WorkArea.WorkAreaId
|
||||
LEFT JOIN dbo.Base_Medium AS bs ON bs.MediumId = IsoInfo.MediumId
|
||||
LEFT JOIN dbo.PTP_PipelineList AS IsoList ON IsoList.PipelineId = IsoInfo.PipelineId
|
||||
and IsoInfo.WorkAreaId=IsoList.WorkAreaId and IsoList.PTP_ID=@PTP_ID
|
||||
WHERE IsoInfo.ProjectId= @ProjectId AND IsoInfo.UnitId= @UnitId
|
||||
AND WorkArea.InstallationId= @InstallationId AND (IsoList.PTP_ID IS NULL OR IsoList.PTP_ID = @PTP_ID)";
|
||||
AND WorkArea.InstallationId= @InstallationId ";
|
||||
}
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
listStr.Add(new SqlParameter("@PTP_ID", this.PTP_ID));
|
||||
|
||||
listStr.Add(new SqlParameter("@UnitId", this.drpUnit.SelectedValue));
|
||||
listStr.Add(new SqlParameter("@InstallationId", this.drpInstallation.SelectedValue));
|
||||
|
||||
if (!string.IsNullOrEmpty(this.PTP_ID))
|
||||
{
|
||||
listStr.Add(new SqlParameter("@PTP_ID", this.PTP_ID));
|
||||
}
|
||||
|
||||
if (this.drpWorkArea.SelectedValue != Const._Null && drpWorkArea.SelectedValue!=null)
|
||||
{
|
||||
strSql += " AND IsoInfo.WorkAreaId = @WorkAreaId";
|
||||
@@ -276,6 +318,20 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
//}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
if (string.IsNullOrEmpty(this.PTP_ID))
|
||||
{
|
||||
foreach (DataRow dr in tb.Rows)
|
||||
{
|
||||
string pipelineId = dr["PipelineId"].ToString();
|
||||
string joinCodeList = dr["WeldJointCode"].ToString();
|
||||
int count = countWeldJointCode(pipelineId);
|
||||
int baseCount = countBaseWeldJointCode(pipelineId);
|
||||
if (count == baseCount)
|
||||
{
|
||||
dr.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
// 2.获取当前分页数据
|
||||
//var table = this.GetPagedDataTable(Grid1, tb1);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
@@ -283,8 +339,34 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
}
|
||||
private int countBaseWeldJointCode(string pipelineId)
|
||||
{
|
||||
string sql = "select count(1) from Pipeline_WeldJoint where PipelineId=@PipelineId";
|
||||
SqlParameter[] parameters = new SqlParameter[] {
|
||||
new SqlParameter("@PipelineId",pipelineId)
|
||||
};
|
||||
int count = SQLHelper.getIntValue(sql, parameters);
|
||||
return count;
|
||||
}
|
||||
private int countWeldJointCode(string pipelineId)
|
||||
{
|
||||
string sql = @"select WeldJointCode=(stuff((select ','+ WeldJonintCode from PTP_PipelineList where PipelineId=@PipelineId and isALL=0 for xml path('')),1,1,''))";
|
||||
SqlParameter[] parameters = new SqlParameter[] {
|
||||
new SqlParameter("@PipelineId",pipelineId)
|
||||
};
|
||||
string strCode = SQLHelper.GetStr(sql, parameters);
|
||||
if(!string.IsNullOrEmpty(strCode) )
|
||||
{
|
||||
string[] arr=strCode.Split(',');
|
||||
return arr==null?0:arr.Length;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 对GV 赋值
|
||||
/// </summary>
|
||||
@@ -347,6 +429,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
this.CollectGridJointInfo();
|
||||
this.BindGrid();
|
||||
this.ShowGridItem();
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -491,15 +574,53 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
BLL.TestPackageManageEditService.AddTestPackage(testPackage);
|
||||
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.TestPackageManageEditMenuId, Const.BtnAdd, this.PTP_ID);
|
||||
}
|
||||
|
||||
foreach (var item in listSelects)
|
||||
JArray teamGroupData = Grid1.GetMergedData();
|
||||
if (listSelects.Count > 0)
|
||||
{
|
||||
BLL.TestPackageManageEditService.DeletePipelineListByPTP_ID(testPackage.PTP_ID);
|
||||
}
|
||||
foreach (JObject teamGroupRow in teamGroupData)
|
||||
{
|
||||
string PipelineId = teamGroupRow["id"].ToString();
|
||||
string status = teamGroupRow.Value<string>("status");
|
||||
|
||||
if (listSelects.Contains(PipelineId))
|
||||
{
|
||||
JObject values = teamGroupRow.Value<JObject>("values");
|
||||
string WeldJonintCodes = values.Value<string>("WeldJointCode");
|
||||
string workAreaId = values.Value<string>("WorkAreaId");
|
||||
if (string.IsNullOrEmpty(WeldJonintCodes))
|
||||
WeldJonintCodes = "全部";
|
||||
|
||||
//处理剩下来的口
|
||||
List<string> listJointCode = new List<string>();
|
||||
var tempData = Funs.DB.PTP_PipelineList.Where(t=>t.PipelineId== PipelineId && t.IsAll==false).Select(t => t.WeldJonintCode).ToList();
|
||||
foreach (var item in tempData)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item))
|
||||
{
|
||||
string[] arr=item.Split(',');
|
||||
for (int i = 0; i < arr.Length; i++)
|
||||
{
|
||||
listJointCode.Add(arr[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(WeldJonintCodes=="全部" && listJointCode.Count > 0)
|
||||
{
|
||||
var nextJointCode = Funs.DB.Pipeline_WeldJoint.Where(t => t.PipelineId == PipelineId && !listJointCode.Contains(t.WeldJointCode))
|
||||
.Select(t => t.WeldJointCode).ToList().ToArray();
|
||||
WeldJonintCodes = String.Join(",", nextJointCode.ToArray());
|
||||
}
|
||||
Model.PTP_PipelineList newitem = new Model.PTP_PipelineList();
|
||||
newitem.PTP_ID = this.PTP_ID;
|
||||
newitem.PipelineId = item;
|
||||
newitem.PipelineId = PipelineId;
|
||||
newitem.IsAll = WeldJonintCodes=="全部" ? true : false;
|
||||
newitem.WeldJonintCode = WeldJonintCodes;
|
||||
newitem.WorkAreaId = workAreaId;
|
||||
BLL.TestPackageManageEditService.AddPipelineList(newitem);
|
||||
}
|
||||
|
||||
}
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(this.PTP_ID)
|
||||
+ ActiveWindow.GetHidePostBackReference());
|
||||
@@ -512,6 +633,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 收集Grid页面信息
|
||||
/// <summary>
|
||||
/// 收集Grid页面信息
|
||||
@@ -532,7 +654,15 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
listSelects.Add(rowID);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 绑定焊口信息Grid2列表
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Grid 明细操作事件
|
||||
@@ -599,6 +729,9 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
this.BindGrid();
|
||||
this.ShowGridItem();
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
Generated
+31
-2
@@ -7,10 +7,12 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.TestPackageManage {
|
||||
namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
{
|
||||
|
||||
|
||||
public partial class TestPackageManageItemEdit {
|
||||
public partial class TestPackageManageItemEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Head1 控件。
|
||||
@@ -426,6 +428,24 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// WorkAreaId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RenderField WorkAreaId;
|
||||
|
||||
/// <summary>
|
||||
/// txtisALL 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TriggerBox txtisALL;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
@@ -479,5 +499,14 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnNoSelect;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="selectJointCode.aspx.cs" Inherits="FineUIPro.Web.WeldingProcess.TestPackageManage.selectJointCode" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Grid1" runat="server" />
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="焊口信息列表" runat="server" EnableCollapse="false"
|
||||
DataKeyNames="WeldJointCode" EnableCheckBoxSelect="true" EnableMultiSelect="true" PageSize="100" AllowPaging="true" >
|
||||
<Columns>
|
||||
<f:RowNumberField />
|
||||
<f:RenderField ColumnID="WeldJointCode" MinWidth="200px" DataField="WeldJointCode" HeaderText="焊口编号" />
|
||||
</Columns>
|
||||
<Toolbars>
|
||||
<f:Toolbar runat="server" Position="Top">
|
||||
<Items>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" Text="关闭" runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
<f:Button ID="btnSaveClose" Text="保存选中行" runat="server" Icon="SystemSaveClose" EnablePostBack="false">
|
||||
<Listeners>
|
||||
<f:Listener Event="click" Handler="onGridRowSelect" />
|
||||
</Listeners>
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Listeners>
|
||||
<f:Listener Event="rowdblclick" Handler="onGridRowSelect" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</form>
|
||||
<script>
|
||||
|
||||
var gridClientID = '<%= Grid1.ClientID %>';
|
||||
|
||||
function renderGender(value) {
|
||||
return value == 1 ? '男' : '女';
|
||||
}
|
||||
|
||||
function onGridRowSelect() {
|
||||
|
||||
// 返回当前活动Window对象(浏览器窗口对象通过F.getActiveWindow().window获取)
|
||||
var activeWindow = F.getActiveWindow();
|
||||
// 选中行数据
|
||||
var rowData = F(gridClientID).getSelectedRows(true);
|
||||
var strCode = "";
|
||||
for (var i = 0; i < rowData.length; i++) {
|
||||
var rowValue = rowData[i];
|
||||
strCode += rowValue.values["WeldJointCode"] + ",";
|
||||
}
|
||||
if (strCode) {
|
||||
strCode = strCode.substring(0, strCode.length - 1);
|
||||
}
|
||||
|
||||
var queryRowId = F.queryString('rowId');
|
||||
|
||||
var selectedValues = {
|
||||
"WeldJointCode": strCode
|
||||
};
|
||||
// 隐藏弹出窗体
|
||||
activeWindow.hide();
|
||||
|
||||
// 调用父页面的 updateGridRow 函数
|
||||
activeWindow.window.updateGridRow(queryRowId, selectedValues);
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,95 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
{
|
||||
public partial class selectJointCode : PageBase
|
||||
{
|
||||
private string rowId=string.Empty;
|
||||
private string jointcode=string.Empty;
|
||||
private string ptpId=string.Empty;
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
this.rowId = Request.Params["rowId"];
|
||||
this.jointcode = Request.Params["jointcode"];
|
||||
this.ptpId = Request.Params["ptpId"];
|
||||
if (string.IsNullOrEmpty(this.rowId))
|
||||
{
|
||||
ShowNotify("请先选择某条管线信息!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (!IsPostBack)
|
||||
{
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
this.BindGridDataSource();
|
||||
this.InitGridDataChecked();
|
||||
}
|
||||
}
|
||||
void InitGridDataChecked()
|
||||
{
|
||||
List<int> list = new List<int>();
|
||||
if (!string.IsNullOrEmpty(this.jointcode))
|
||||
{
|
||||
string[] arr=this.jointcode.Split(',');
|
||||
for (int i = 0;i<Grid1.Rows.Count;i++)
|
||||
{
|
||||
string key = Grid1.DataKeys[i][0].ToString();
|
||||
if (arr.Contains(key))
|
||||
{
|
||||
list.Add(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
Grid1.SelectedRowIndexArray = list.ToArray();
|
||||
}
|
||||
void BindGridDataSource()
|
||||
{
|
||||
this.Grid1.DataSource = GetDataJointGrid2(this.rowId);
|
||||
this.Grid1.DataBind();
|
||||
}
|
||||
private List<Pipeline_WeldJoint> GetDataJointGrid2(string PipelineID)
|
||||
{
|
||||
List<string> listData = new List<string>();
|
||||
var tempData = Funs.DB.PTP_PipelineList.Where(t => t.PipelineId == PipelineID && t.IsAll == false)
|
||||
.AsQueryable();
|
||||
|
||||
if (!string.IsNullOrEmpty(this.ptpId))
|
||||
{
|
||||
tempData = tempData.Where(t => t.PTP_ID != this.ptpId);
|
||||
}
|
||||
var newData = tempData.Select(t => t.WeldJonintCode).ToList();
|
||||
foreach (var item in newData)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item))
|
||||
{
|
||||
string[] strcode = item.Split(',');
|
||||
for (int i = 0; i < strcode.Length; i++)
|
||||
{
|
||||
if (!listData.Contains(strcode[i]))
|
||||
{
|
||||
listData.Add(strcode[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
var query = Funs.DB.Pipeline_WeldJoint.Where(t => t.PipelineId == PipelineID)
|
||||
.OrderBy(t => t.WeldJointCode).AsQueryable();
|
||||
if (listData.Count>0 )
|
||||
{
|
||||
query = query.Where(t => !listData.Contains(t.WeldJointCode));
|
||||
}
|
||||
return query.ToList();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.TestPackageManage
|
||||
{
|
||||
|
||||
|
||||
public partial class selectJointCode
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// btnClose 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnClose;
|
||||
|
||||
/// <summary>
|
||||
/// btnSaveClose 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSaveClose;
|
||||
}
|
||||
}
|
||||
@@ -190,7 +190,7 @@
|
||||
<f:RenderField HeaderText="点口类型" ColumnID="PointState" DataField="PointState" SortField="PointState"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="80px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="是否首三口" ColumnID="IsWelderFirst" DataField="IsWelderFirst"
|
||||
<f:RenderField HeaderText="是否首二口" ColumnID="IsWelderFirst" DataField="IsWelderFirst"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="95px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="点口日期" ColumnID="PointDate" DataField="PointDate" SortField="PointDate"
|
||||
|
||||
@@ -581,8 +581,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||
{
|
||||
this.PageInfoLoad();
|
||||
string strSql = @" SELECT PointBatchItemId,PointBatchId,WeldJointId,PointState,PointDate,RepairDate,CutDate,WorkAreaCode,
|
||||
(CASE WHEN JointAttribute='固定F' THEN 'F'+WeldJointCode ELSE 'S'+WeldJointCode END) AS WeldJointCode,
|
||||
JointArea,Size,WelderCode,WeldingDate,PipelineCode,PipingClassName,
|
||||
WeldJointCode, JointArea,Size,WelderCode,WeldingDate,PipelineCode,PipingClassName,
|
||||
CONVERT(INT,dbo.Fun_GetParseInt(WeldJointCode)) AS ConvertJoint,
|
||||
(CASE WHEN IsWelderFirst=1 THEN '是' ELSE '否' END) AS IsWelderFirst,
|
||||
(CASE WHEN IsCompletedPoint=1 THEN '已处理' ELSE '待处理' END) CompletedState,
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TrustBatchIn.aspx.cs" Inherits="FineUIPro.Web.WeldingProcess.TrustManage.TrustBatchIn" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>委托单导入</title>
|
||||
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style>
|
||||
.f-grid-row .f-grid-cell-inner {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" OnCustomEvent="PageManager1_CustomEvent" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnAudit" Icon="ApplicationEdit" Text="审核" runat="server" ToolTip="审核" ValidateForms="SimpleForm1"
|
||||
OnClick="btnAudit_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnImport" Icon="ApplicationGet" Text="导入" runat="server" ToolTip="导入" ValidateForms="SimpleForm1"
|
||||
OnClick="btnImport_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnDownLoad" runat="server" Text="下载模板" Icon="ApplicationGo" ToolTip="下载模板" OnClick="btnDownLoad_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" Icon="Pencil" runat="server" Text="导出" ToolTip="导出错误列表"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false" OnClick="btnOut_Click" ></f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:FileUpload runat="server" ID="fuAttachUrl" EmptyText="选择要导入的文件" Label="选择要导入的文件"
|
||||
LabelWidth="150px">
|
||||
</f:FileUpload>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:HiddenField ID="hdFileName" runat="server">
|
||||
</f:HiddenField>
|
||||
<f:HiddenField ID="hdCheckResult" runat="server">
|
||||
</f:HiddenField>
|
||||
<f:Label ID="lbResult" runat="server" Label="审核结果"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<%--<f:Label ID="lblBottom" runat="server" Text="说明:规则是">
|
||||
</f:Label>--%>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" Hidden="true" ShowHeader="false" Title="委托单导入错误日志" runat="server" EnableCollapse="false"
|
||||
DataKeyNames="ID" PageSize="100" AllowPaging="true" Height="560px">
|
||||
<Columns>
|
||||
<f:RowNumberField />
|
||||
<f:RenderField ColumnID="RowID" Width="80px" DataField="RowID" HeaderText="行号" />
|
||||
<f:RenderField ColumnID="TrustBatchCode" MinWidth="80" DataField="TrustBatchCode" HeaderText="委托单编号" />
|
||||
<f:RenderField ColumnID="InstallCode" MinWidth="80" DataField="InstallCode" HeaderText="装置编号" />
|
||||
<f:RenderField ColumnID="AreaCode" MinWidth="80" DataField="AreaCode" HeaderText="区域编号" />
|
||||
<f:RenderField ColumnID="PipelineCode" MinWidth="80" DataField="PipelineCode" HeaderText="管线号" />
|
||||
<f:RenderField ColumnID="WeldJointCode" MinWidth="80" DataField="WeldJointCode" HeaderText="焊口号" />
|
||||
<f:RenderField ColumnID="DetectionType" MinWidth="80" DataField="DetectionType" HeaderText="探伤类型" />
|
||||
<f:RenderField ColumnID="TrustDate" MinWidth="80" DataField="TrustDate" HeaderText="委托日期" />
|
||||
<f:RenderField ColumnID="UnitCode" MinWidth="80" DataField="UnitCode" HeaderText="检测单位编号" />
|
||||
<f:RenderField ColumnID="SurfaceState" MinWidth="80" DataField="SurfaceState" HeaderText="表面状态" />
|
||||
<f:RenderField ColumnID="Opportunity" MinWidth="80" DataField="Opportunity" HeaderText="检测时机" />
|
||||
<f:TemplateField HeaderText="错误原因" MinWidth="500" ColumnID="Remark">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lablRemark" runat="server" Text='<%#Eval("Remark") %>' ForeColor="Red"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField ColumnID="CreatedTime" MinWidth="150" DataField="CreatedTime" HeaderText="导入时间" />
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,816 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.OleDb;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web.UI;
|
||||
using BLL;
|
||||
using AspNet = System.Web.UI.WebControls;
|
||||
using Model;
|
||||
using NPOI.HSSF.Util;
|
||||
using NPOI.SS.UserModel;
|
||||
using NPOI.XSSF.UserModel;
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||
{
|
||||
public partial class TrustBatchIn : PageBase
|
||||
{
|
||||
#region 定义变量
|
||||
/// <summary>
|
||||
/// 上传预设的虚拟路径
|
||||
/// </summary>
|
||||
private string initPath = Const.ExcelUrl;
|
||||
|
||||
/// <summary>
|
||||
/// 错误集合
|
||||
/// </summary>
|
||||
public static string errorInfos = string.Empty;
|
||||
|
||||
public string BatchCode
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["BatchCode"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["BatchCode"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 加载页面
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.hdFileName.Text = string.Empty;
|
||||
this.hdCheckResult.Text = string.Empty;
|
||||
errorInfos = string.Empty;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 审核
|
||||
/// <summary>
|
||||
/// 审核
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAudit_Click(object sender, EventArgs e)
|
||||
{
|
||||
errorInfos = string.Empty;
|
||||
if (this.fuAttachUrl.HasFile == false)
|
||||
{
|
||||
ShowNotify("请选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower();
|
||||
if (IsXls != ".xls" && IsXls != ".xlsx")
|
||||
{
|
||||
ShowNotify("只能选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string initFullPath = rootPath + initPath;
|
||||
if (!Directory.Exists(initFullPath))
|
||||
{
|
||||
Directory.CreateDirectory(initFullPath);
|
||||
}
|
||||
//指定上传文件名称
|
||||
this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls;
|
||||
//上传文件路径
|
||||
string filePath = initFullPath + this.hdFileName.Text;
|
||||
//文件上传服务器
|
||||
this.fuAttachUrl.PostedFile.SaveAs(filePath);
|
||||
//文件上传服务器后的名称
|
||||
string fileName = rootPath + initPath + this.hdFileName.Text;
|
||||
//读取Excel
|
||||
DataSet ds = NPOIHelper.ExcelToDataSet(fileName, out errorInfos, true);
|
||||
//验证Excel读取是否有误
|
||||
if (!string.IsNullOrEmpty(errorInfos))
|
||||
{
|
||||
ShowNotify(errorInfos, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ds.Tables.Count > 0)
|
||||
{
|
||||
|
||||
List<Model.Batch_BatchTrust> trustList = new List<Model.Batch_BatchTrust>();
|
||||
var units = from x in Funs.DB.Base_Unit select x;
|
||||
var area = from x in Funs.DB.Project_WorkArea where x.ProjectId == this.CurrUser.LoginProjectId select x;
|
||||
var installation = from x in Funs.DB.Project_Installation where x.ProjectId == this.CurrUser.LoginProjectId select x;
|
||||
var trustIn = from x in Funs.DB.View_TrustBathcIn where x.ProjectId == this.CurrUser.LoginProjectId select x;
|
||||
var pipeList = from x in Funs.DB.Pipeline_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId select x;
|
||||
List<Model.TrustBatchImportErrorLog> logListData = new List<Model.TrustBatchImportErrorLog>();
|
||||
string BatchNo = DateTime.Now.ToString("yyyyMMddHHmmss");
|
||||
BatchCode = BatchNo;
|
||||
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
|
||||
{
|
||||
string result = string.Empty;
|
||||
var log = new Model.TrustBatchImportErrorLog();
|
||||
string col0 = ds.Tables[0].Rows[i][0].ToString().Trim();
|
||||
string col1 = ds.Tables[0].Rows[i][1].ToString().Trim();
|
||||
string col2 = ds.Tables[0].Rows[i][2].ToString().Trim();
|
||||
string col3 = ds.Tables[0].Rows[i][3].ToString().Trim();
|
||||
string col4 = ds.Tables[0].Rows[i][4].ToString().Trim();
|
||||
string col5 = ds.Tables[0].Rows[i][5].ToString().Trim();
|
||||
string col6 = ds.Tables[0].Rows[i][6].ToString().Trim();
|
||||
string col7 = ds.Tables[0].Rows[i][7].ToString().Trim();
|
||||
string col8 = ds.Tables[0].Rows[i][8].ToString().Trim();
|
||||
string col9 = ds.Tables[0].Rows[i][9].ToString().Trim();
|
||||
log.Id = SQLHelper.GetNewID(typeof(TrustBatchImportErrorLog));
|
||||
log.RowID = (i + 2);
|
||||
log.BatchNo = BatchNo;
|
||||
log.TrustBatchCode = col0;
|
||||
log.InstallCode = col1;
|
||||
log.AreaCode = col2;
|
||||
log.PipelineCode = col3;
|
||||
log.WeldJointCode = col4;
|
||||
log.DetectionType = col5;
|
||||
log.TrustDate = col6;
|
||||
log.UnitCode = col7;
|
||||
log.SurfaceState = col8;
|
||||
log.Opportunity = col9;
|
||||
log.CreatedTime = DateTime.Now;
|
||||
|
||||
Model.Batch_BatchTrust t = new Model.Batch_BatchTrust();
|
||||
|
||||
if (string.IsNullOrEmpty(col0))
|
||||
{
|
||||
result += "委托单号此项为必填项!" + "|";
|
||||
}
|
||||
else
|
||||
{
|
||||
var oldTrust = Funs.DB.Batch_BatchTrust.FirstOrDefault(x => x.TrustBatchCode == col0);
|
||||
if (oldTrust != null)
|
||||
{
|
||||
result += "委托单号 [" + col0 + "]已存在!" + "|";
|
||||
}
|
||||
else
|
||||
{
|
||||
t.TrustBatchCode = col0;
|
||||
}
|
||||
}
|
||||
|
||||
string installationId = string.Empty;
|
||||
if (!string.IsNullOrEmpty(col1))
|
||||
{
|
||||
Model.Project_Installation ins = installation.FirstOrDefault(x => x.InstallationCode == col1);
|
||||
if (ins == null)
|
||||
{
|
||||
result += "装置编号 [" + col1 + "]不存在!" + "|";
|
||||
}
|
||||
else
|
||||
{
|
||||
installationId = ins.InstallationId;
|
||||
t.InstallationId = installationId;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result += "装置编号此项为必填项!" + "|";
|
||||
}
|
||||
|
||||
string workAreaId = string.Empty;
|
||||
if (!string.IsNullOrEmpty(col2))
|
||||
{
|
||||
Model.Project_WorkArea workArea = area.FirstOrDefault(x => x.WorkAreaCode == col2 && x.InstallationId == installationId);
|
||||
if (workArea == null)
|
||||
{
|
||||
result += "区域编号 [" + col2 + "]不存在!" + "|";
|
||||
}
|
||||
else
|
||||
{
|
||||
workAreaId = workArea.WorkAreaId;
|
||||
t.WorkAreaId = workAreaId;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result += "区域编号此项为必填项!" + "|";
|
||||
}
|
||||
|
||||
string pipelineId = string.Empty;
|
||||
if (!string.IsNullOrEmpty(col3))
|
||||
{
|
||||
var pipe = pipeList.FirstOrDefault(x => x.PipelineCode == col3 && x.WorkAreaId == workAreaId);
|
||||
if (pipe == null)
|
||||
{
|
||||
result += "该区域管线号 [" + col3 + "]不存在!" + "|";
|
||||
}
|
||||
else
|
||||
{
|
||||
pipelineId = pipe.PipelineId;
|
||||
t.PipelineId = pipelineId;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result += "管线号此项为必填项!" + "|";
|
||||
}
|
||||
|
||||
string weldJointId = string.Empty;
|
||||
if (!string.IsNullOrEmpty(col4))
|
||||
{
|
||||
var weldJoint = from x in Funs.DB.Pipeline_WeldJoint where x.PipelineId == pipelineId && x.WeldJointCode == col4 select x;
|
||||
if (weldJoint.Count() == 0)
|
||||
{
|
||||
result += "焊口号 [" + col4 + "]不存在!" + "|";
|
||||
}
|
||||
|
||||
else if (weldJoint.Count() == 1)
|
||||
{
|
||||
weldJointId = weldJoint.First().WeldJointId;
|
||||
t.WeldingMethodId = weldJoint.First().WeldingMethodId;
|
||||
t.GrooveTypeId = weldJoint.First().GrooveTypeId;
|
||||
}
|
||||
else
|
||||
{
|
||||
result += "焊口号 [" + col4 + "]重复!" + "|";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result += "焊口号此项为必填项!" + "|";
|
||||
}
|
||||
|
||||
string ndeId = string.Empty;
|
||||
if (!string.IsNullOrEmpty(col5))
|
||||
{
|
||||
var nde = Funs.DB.Base_DetectionType.FirstOrDefault(x => x.DetectionTypeCode == col5);
|
||||
if (nde == null)
|
||||
{
|
||||
result += "探伤类型[" + col5 + "]错误!" + "|";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
ndeId = nde.DetectionTypeId;
|
||||
t.DetectionTypeId = nde.DetectionTypeId;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result += "探伤类型此项为必填项!" + "|";
|
||||
}
|
||||
|
||||
var pointBatchItem = trustIn.FirstOrDefault(x => x.InstallationId == installationId && x.WorkAreaId == workAreaId && x.PipelineId == pipelineId && x.WeldJointId == weldJointId && x.DetectionTypeId == ndeId);
|
||||
if (pointBatchItem == null)
|
||||
{
|
||||
result += "检验批中不存在对应焊口信息" + "|";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pointBatchItem.TrustBatchItemId != null)
|
||||
{
|
||||
result += "焊口已委托" + "|";
|
||||
}
|
||||
else
|
||||
{
|
||||
t.IsWelderFirst = pointBatchItem.IsWelderFirst;
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(col6))
|
||||
{
|
||||
try
|
||||
{
|
||||
DateTime d = Convert.ToDateTime(col6);
|
||||
t.TrustDate = d.Date;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += "委托日期 [" + col6 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result += "委托日期此项为必填项!" + "|";
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(col7))
|
||||
{
|
||||
Model.Base_Unit unit = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitCode == col7);
|
||||
if (unit == null)
|
||||
{
|
||||
result += "检测单位编号[" + col7 + "]错误!" + "|";
|
||||
}
|
||||
else
|
||||
{
|
||||
t.NDEUuit = unit.UnitId;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result += "检测单位此项为必填项!" + "|";
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(col8))
|
||||
{
|
||||
if (col8 != "打磨" && col8 != "机加工" && col8 != "喷砂" && col8 != "漆面")
|
||||
{
|
||||
result += "表面检测需录入:打磨、机加工、喷砂、漆面" + "|";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(col9))
|
||||
{
|
||||
if (col9 != "焊后" && col9 != "打磨后" && col9 != "热处理后" && col9 != "坡口准备" && col9 != "清根后" && col9 != "压力试验后" && col9 != "其他")
|
||||
{
|
||||
result += "检测时机需录入:焊后、打磨后、热处理后、坡口准备、清根后、压力试验后、其他" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
log.Remark = result;
|
||||
logListData.Add(log);
|
||||
trustList.Add(t);
|
||||
}
|
||||
|
||||
var trustCodeList = trustList.Select(p => p.TrustBatchCode).Distinct();
|
||||
foreach (var trustCode in trustCodeList)
|
||||
{
|
||||
string result = string.Empty;
|
||||
var t = from x in trustList where x.TrustBatchCode == trustCode select x;
|
||||
var logInfo = logListData.FirstOrDefault(x => x.TrustBatchCode == trustCode);
|
||||
if (t.Select(x => x.InstallationId).Distinct().Count() > 1)
|
||||
{
|
||||
result += "委托单" + trustCode + "装置不一至" + "|";
|
||||
}
|
||||
if (t.Select(x => x.WorkAreaId).Distinct().Count() > 1)
|
||||
{
|
||||
result += "委托单" + trustCode + "区域不一至" + "|";
|
||||
}
|
||||
if (t.Select(x => x.PipelineId).Distinct().Count() > 1)
|
||||
{
|
||||
result += "委托单" + trustCode + "管线不一至" + "|";
|
||||
}
|
||||
if (t.Select(x => x.WeldingMethodId).Distinct().Count() > 1)
|
||||
{
|
||||
result += "委托单" + trustCode + "焊接方法不一至" + "|";
|
||||
}
|
||||
if (t.Select(x => x.GrooveTypeId).Distinct().Count() > 1)
|
||||
{
|
||||
result += "委托单" + trustCode + "坡口类型不一至" + "|";
|
||||
}
|
||||
if (t.Select(x => x.DetectionTypeId).Distinct().Count() > 1)
|
||||
{
|
||||
result += "委托单" + trustCode + "探伤类型不一至" + "|";
|
||||
}
|
||||
if (t.Select(x => x.TrustDate).Distinct().Count() > 1)
|
||||
{
|
||||
result += "委托单" + trustCode + "委托日期不一至" + "|";
|
||||
}
|
||||
if (logInfo != null)
|
||||
{
|
||||
logInfo.Remark += result;
|
||||
}
|
||||
}
|
||||
|
||||
if (logListData.Where(t => t.Remark != "").Any())
|
||||
{
|
||||
Funs.DB.TrustBatchImportErrorLog.InsertAllOnSubmit(logListData);
|
||||
Funs.DB.SubmitChanges();
|
||||
this.Grid1.Hidden = false;
|
||||
this.BindGrid1(BatchNo);
|
||||
}
|
||||
else
|
||||
{
|
||||
errorInfos = string.Empty;
|
||||
lbResult.Text = "审核数据正确,请点击导入!";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
private void BindGrid1(string batchNo)
|
||||
{
|
||||
var result = Funs.DB.TrustBatchImportErrorLog.Where(t => t.BatchNo == batchNo).OrderBy(t => t.RowID).ToList();
|
||||
this.Grid1.DataSource = result;
|
||||
this.Grid1.DataBind();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 导入
|
||||
/// <summary>
|
||||
/// 导入
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (!string.IsNullOrEmpty(this.hdFileName.Text))
|
||||
{
|
||||
if (errorInfos == string.Empty)
|
||||
{
|
||||
string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower();
|
||||
if (IsXls != ".xls" && IsXls != ".xlsx")
|
||||
{
|
||||
ShowNotify("只能选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string initFullPath = rootPath + initPath;
|
||||
if (!Directory.Exists(initFullPath))
|
||||
{
|
||||
Directory.CreateDirectory(initFullPath);
|
||||
}
|
||||
//指定上传文件名称
|
||||
this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls;
|
||||
//上传文件路径
|
||||
string filePath = initFullPath + this.hdFileName.Text;
|
||||
//文件上传服务器
|
||||
this.fuAttachUrl.PostedFile.SaveAs(filePath);
|
||||
//文件上传服务器后的名称
|
||||
string fileName = rootPath + initPath + this.hdFileName.Text;
|
||||
//读取Excel
|
||||
DataSet ds = NPOIHelper.ExcelToDataSet(fileName, out errorInfos, true);
|
||||
|
||||
if (ds.Tables.Count > 0)
|
||||
{
|
||||
|
||||
string result = string.Empty;
|
||||
List<Model.Batch_BatchTrust> trustList = new List<Model.Batch_BatchTrust>();
|
||||
|
||||
var units = from x in Funs.DB.Base_Unit select x;
|
||||
var area = from x in Funs.DB.Project_WorkArea where x.ProjectId == this.CurrUser.LoginProjectId select x;
|
||||
var installation = from x in Funs.DB.Project_Installation where x.ProjectId == this.CurrUser.LoginProjectId select x;
|
||||
var trustIn = from x in Funs.DB.View_TrustBathcIn where x.ProjectId == this.CurrUser.LoginProjectId select x;
|
||||
var pipeList = from x in Funs.DB.Pipeline_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId select x;
|
||||
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
|
||||
{
|
||||
string col0 = ds.Tables[0].Rows[i][0].ToString().Trim();
|
||||
string col1 = ds.Tables[0].Rows[i][1].ToString().Trim();
|
||||
string col2 = ds.Tables[0].Rows[i][2].ToString().Trim();
|
||||
string col3 = ds.Tables[0].Rows[i][3].ToString().Trim();
|
||||
string col4 = ds.Tables[0].Rows[i][4].ToString().Trim();
|
||||
string col5 = ds.Tables[0].Rows[i][5].ToString().Trim();
|
||||
string col6 = ds.Tables[0].Rows[i][6].ToString().Trim();
|
||||
string col7 = ds.Tables[0].Rows[i][7].ToString().Trim();
|
||||
string col8 = ds.Tables[0].Rows[i][8].ToString().Trim();
|
||||
string col9 = ds.Tables[0].Rows[i][9].ToString().Trim();
|
||||
|
||||
Model.Batch_BatchTrust t = new Model.Batch_BatchTrust();
|
||||
|
||||
t.TrustBatchCode = col0;
|
||||
Model.Project_Installation ins = installation.FirstOrDefault(x => x.InstallationCode == col1);
|
||||
t.InstallationId = ins.InstallationId;
|
||||
|
||||
Model.Project_WorkArea workArea = area.FirstOrDefault(x => x.WorkAreaCode == col2 && x.InstallationId == ins.InstallationId);
|
||||
t.WorkAreaId = workArea.WorkAreaId;
|
||||
|
||||
var pipe = pipeList.FirstOrDefault(x => x.PipelineCode == col3 && x.WorkAreaId == workArea.WorkAreaId);
|
||||
t.PipelineId = pipe.PipelineId;
|
||||
t.UnitId = pipe.UnitId;
|
||||
|
||||
var jot = Funs.DB.Pipeline_WeldJoint.FirstOrDefault(x => x.PipelineId == pipe.PipelineId && x.WeldJointCode == col4);
|
||||
t.QuaCertFile = jot.WeldJointId; // 作为焊口ID
|
||||
t.WeldingMethodId = jot.WeldingMethodId;
|
||||
t.GrooveTypeId = jot.GrooveTypeId;
|
||||
|
||||
var nde = Funs.DB.Base_DetectionType.FirstOrDefault(x => x.DetectionTypeCode == col5);
|
||||
t.DetectionTypeId = nde.DetectionTypeId;
|
||||
|
||||
var pointBatchItem = trustIn.FirstOrDefault(x => x.WorkAreaId == workArea.WorkAreaId && x.PipelineId == pipe.PipelineId && x.WeldJointId == jot.WeldJointId && x.DetectionTypeId == nde.DetectionTypeId);
|
||||
t.IsWelderFirst = pointBatchItem.IsWelderFirst;
|
||||
t.AcceptStandard = pointBatchItem.PointBatchItemId; // 作为点口明细ID
|
||||
t.TopointBatch = pointBatchItem.PointBatchId;
|
||||
|
||||
t.TrustDate = Convert.ToDateTime(col6).Date;
|
||||
|
||||
Model.Base_Unit unit = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitCode == col7);
|
||||
t.NDEUuit = unit.UnitId;
|
||||
|
||||
if (!string.IsNullOrEmpty(col8))
|
||||
{
|
||||
t.SurfaceState = col8;
|
||||
}
|
||||
else
|
||||
{
|
||||
t.SurfaceState = "打磨";
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(col9))
|
||||
{
|
||||
t.DetectionTiming = col9;
|
||||
}
|
||||
else
|
||||
{
|
||||
t.DetectionTiming = "焊后";
|
||||
}
|
||||
|
||||
trustList.Add(t);
|
||||
|
||||
}
|
||||
|
||||
var trustCodeList = trustList.Select(p => p.TrustBatchCode).Distinct();
|
||||
foreach (var trustCode in trustCodeList)
|
||||
{
|
||||
var t = from x in trustList where x.TrustBatchCode == trustCode select x;
|
||||
Model.Batch_BatchTrust newBatchTrust = new Model.Batch_BatchTrust();
|
||||
string trustBatchId = SQLHelper.GetNewID(typeof(Model.Batch_BatchTrust));
|
||||
newBatchTrust.TrustBatchId = trustBatchId;
|
||||
newBatchTrust.TrustBatchCode = trustCode;
|
||||
newBatchTrust.TrustDate = t.First().TrustDate;
|
||||
newBatchTrust.ProjectId = CurrUser.LoginProjectId;
|
||||
newBatchTrust.UnitId = t.First().UnitId;
|
||||
newBatchTrust.InstallationId = t.First().InstallationId;
|
||||
newBatchTrust.WorkAreaId = t.First().WorkAreaId;
|
||||
newBatchTrust.WeldingMethodId = t.First().WeldingMethodId;
|
||||
newBatchTrust.GrooveTypeId = t.First().GrooveTypeId;
|
||||
newBatchTrust.IsWelderFirst = t.First().IsWelderFirst;
|
||||
newBatchTrust.DetectionTypeId = t.First().DetectionTypeId;
|
||||
newBatchTrust.PipelineId = t.First().PipelineId;
|
||||
newBatchTrust.TopointBatch = t.First().TopointBatch;
|
||||
BLL.Batch_BatchTrustService.AddBatchTrust(newBatchTrust); // 新增委托单
|
||||
|
||||
// 生成委托明细,并回写点口明细信息
|
||||
foreach (var p in t)
|
||||
{
|
||||
Model.Batch_BatchTrustItem trustItem = new Model.Batch_BatchTrustItem
|
||||
{
|
||||
TrustBatchItemId = SQLHelper.GetNewID(typeof(Model.Batch_BatchTrustItem)),
|
||||
TrustBatchId = trustBatchId,
|
||||
PointBatchItemId = p.AcceptStandard,
|
||||
WeldJointId = p.QuaCertFile,
|
||||
//FilmNum = fileNum,
|
||||
CreateDate = p.TrustDate
|
||||
};
|
||||
Batch_BatchTrustItemService.AddBatchTrustItem(trustItem);
|
||||
|
||||
var pointItem = BLL.Batch_PointBatchItemService.GetPointBatchItemByPointBatchItemId(p.AcceptStandard);
|
||||
pointItem.PointDate = p.TrustDate;
|
||||
pointItem.PointState = "1";
|
||||
pointItem.IsBuildTrust = true;
|
||||
pointItem.GLGSAudit = Const.GlyId; // 导入时默认为管理员
|
||||
pointItem.JLAudit = Const.GlyId;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
ShowNotify("导入成功!", MessageBoxIcon.Success);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("无记录!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请修正错误数据后再导入!", MessageBoxIcon.Warning);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 导出错误提示
|
||||
/// <summary>
|
||||
/// 导出错误提示
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
string rootPath = Server.MapPath("~/") + Const.ExcelUrl;
|
||||
//模板文件
|
||||
string TempletFileName = rootPath + "TrustErrorOut.xlsx";
|
||||
//导出文件
|
||||
string filePath = rootPath + DateTime.Now.ToString("yyyyMMddhhmmss") + "\\";
|
||||
if (!Directory.Exists(filePath))
|
||||
{
|
||||
Directory.CreateDirectory(filePath);
|
||||
}
|
||||
string ReportFileName = filePath + "out.xlsx";
|
||||
|
||||
FileStream file = new FileStream(TempletFileName, FileMode.Open, FileAccess.Read);
|
||||
XSSFWorkbook hssfworkbook = new XSSFWorkbook(file);
|
||||
|
||||
#region JointComprehensive
|
||||
XSSFSheet reportModel = (XSSFSheet)hssfworkbook.GetSheet("Sheet1");
|
||||
|
||||
XSSFFont cs_content_Font1 = (XSSFFont)hssfworkbook.CreateFont(); //创建字体
|
||||
cs_content_Font1.FontName = "sans-serif";//字体
|
||||
cs_content_Font1.FontHeightInPoints = 9; //字体大小
|
||||
|
||||
ICellStyle style = hssfworkbook.CreateCellStyle();
|
||||
style.SetFont(cs_content_Font1);
|
||||
|
||||
XSSFFont cs_content_Font = (XSSFFont)hssfworkbook.CreateFont(); //创建字体
|
||||
cs_content_Font.FontName = "sans-serif";//字体
|
||||
cs_content_Font.FontHeightInPoints = 10; //字体大小
|
||||
cs_content_Font.Color = HSSFColor.Red.Index;
|
||||
|
||||
IDataFormat dataformat = hssfworkbook.CreateDataFormat();
|
||||
ICellStyle styleDate = hssfworkbook.CreateCellStyle();
|
||||
styleDate.SetFont(cs_content_Font1);
|
||||
styleDate.DataFormat = dataformat.GetFormat("yyyy-mm-dd");
|
||||
|
||||
// 排序
|
||||
var result = Funs.DB.TrustBatchImportErrorLog.Where(t => t.BatchNo == this.BatchCode).OrderBy(t => t.RowID).ToList();
|
||||
|
||||
if (result.Count > 0)
|
||||
{
|
||||
var rowIndex = 1;
|
||||
foreach (var itemOver in result)
|
||||
{
|
||||
if (reportModel.GetRow(rowIndex) == null) reportModel.CreateRow(rowIndex);
|
||||
|
||||
#region 列赋值
|
||||
//行号
|
||||
if (reportModel.GetRow(rowIndex).GetCell(0) == null) reportModel.GetRow(rowIndex).CreateCell(0);
|
||||
reportModel.GetRow(rowIndex).GetCell(0).SetCellValue(itemOver.RowID.ToString());
|
||||
reportModel.GetRow(rowIndex).GetCell(0).CellStyle = style; //将字体绑定到样式
|
||||
|
||||
//委托单
|
||||
if (reportModel.GetRow(rowIndex).GetCell(1) == null) reportModel.GetRow(rowIndex).CreateCell(1);
|
||||
reportModel.GetRow(rowIndex).GetCell(1).SetCellValue(itemOver.TrustBatchCode);
|
||||
reportModel.GetRow(rowIndex).GetCell(1).CellStyle = style;
|
||||
//装置
|
||||
if (reportModel.GetRow(rowIndex).GetCell(2) == null) reportModel.GetRow(rowIndex).CreateCell(2);
|
||||
reportModel.GetRow(rowIndex).GetCell(2).SetCellValue(itemOver.InstallCode);
|
||||
reportModel.GetRow(rowIndex).GetCell(2).CellStyle = style;
|
||||
//区域
|
||||
if (reportModel.GetRow(rowIndex).GetCell(3) == null) reportModel.GetRow(rowIndex).CreateCell(3);
|
||||
reportModel.GetRow(rowIndex).GetCell(3).SetCellValue(itemOver.AreaCode);
|
||||
reportModel.GetRow(rowIndex).GetCell(3).CellStyle = style;
|
||||
//管线号
|
||||
if (reportModel.GetRow(rowIndex).GetCell(4) == null) reportModel.GetRow(rowIndex).CreateCell(4);
|
||||
reportModel.GetRow(rowIndex).GetCell(4).SetCellValue(itemOver.PipelineCode);
|
||||
reportModel.GetRow(rowIndex).GetCell(4).CellStyle = style;
|
||||
|
||||
//焊口号
|
||||
if (reportModel.GetRow(rowIndex).GetCell(5) == null) reportModel.GetRow(rowIndex).CreateCell(5);
|
||||
reportModel.GetRow(rowIndex).GetCell(5).SetCellValue(itemOver.WeldJointCode);
|
||||
reportModel.GetRow(rowIndex).GetCell(5).CellStyle = style;
|
||||
|
||||
//探伤类型
|
||||
if (reportModel.GetRow(rowIndex).GetCell(6) == null) reportModel.GetRow(rowIndex).CreateCell(6);
|
||||
reportModel.GetRow(rowIndex).GetCell(6).SetCellValue(itemOver.DetectionType);
|
||||
reportModel.GetRow(rowIndex).GetCell(6).CellStyle = style;
|
||||
|
||||
//委托日期
|
||||
if (reportModel.GetRow(rowIndex).GetCell(7) == null) reportModel.GetRow(rowIndex).CreateCell(7);
|
||||
reportModel.GetRow(rowIndex).GetCell(7).SetCellValue(itemOver.TrustDate);
|
||||
reportModel.GetRow(rowIndex).GetCell(7).CellStyle = style;
|
||||
|
||||
//检测单位
|
||||
if (reportModel.GetRow(rowIndex).GetCell(8) == null) reportModel.GetRow(rowIndex).CreateCell(8);
|
||||
reportModel.GetRow(rowIndex).GetCell(8).SetCellValue(itemOver.UnitCode);
|
||||
reportModel.GetRow(rowIndex).GetCell(8).CellStyle = style;
|
||||
//表面
|
||||
if (reportModel.GetRow(rowIndex).GetCell(9) == null) reportModel.GetRow(rowIndex).CreateCell(9);
|
||||
reportModel.GetRow(rowIndex).GetCell(9).SetCellValue(itemOver.SurfaceState);
|
||||
reportModel.GetRow(rowIndex).GetCell(9).CellStyle = style;
|
||||
|
||||
//检测时机
|
||||
if (reportModel.GetRow(rowIndex).GetCell(10) == null) reportModel.GetRow(rowIndex).CreateCell(10);
|
||||
reportModel.GetRow(rowIndex).GetCell(10).SetCellValue(itemOver.Opportunity);
|
||||
reportModel.GetRow(rowIndex).GetCell(10).CellStyle = style;
|
||||
//错误
|
||||
if (reportModel.GetRow(rowIndex).GetCell(11) == null) reportModel.GetRow(rowIndex).CreateCell(11);
|
||||
reportModel.GetRow(rowIndex).GetCell(11).SetCellValue(itemOver.Remark.Replace("|",","));
|
||||
reportModel.GetRow(rowIndex).GetCell(11).CellStyle = style;
|
||||
|
||||
#endregion
|
||||
|
||||
rowIndex++;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
reportModel.ForceFormulaRecalculation = true;
|
||||
|
||||
using (FileStream filess = System.IO.File.OpenWrite(ReportFileName))
|
||||
{
|
||||
hssfworkbook.Write(filess);
|
||||
}
|
||||
FileInfo filet = new FileInfo(ReportFileName);
|
||||
Response.Clear();
|
||||
Response.Charset = "GB2312";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
// 添加头信息,为"文件下载/另存为"对话框指定默认文件名
|
||||
Response.AddHeader("Content-Disposition", "attachment; filename=委托单错误日志_" + Server.UrlEncode(DateTime.Now.ToString("yyyyMMddhhmmss") + ".xlsx"));
|
||||
// 添加头信息,指定文件大小,让浏览器能够显示下载进度
|
||||
Response.AddHeader("Content-Length", filet.Length.ToString());
|
||||
// 指定返回的是一个不能被客户端读取的流,必须被下载
|
||||
Response.ContentType = "application/ms-excel";
|
||||
// 把文件流发送到客户端
|
||||
Response.WriteFile(filet.FullName);
|
||||
// 停止页面的执行
|
||||
Response.End();
|
||||
|
||||
//Response.ClearContent();
|
||||
//string filename = Funs.GetNewFileName();
|
||||
//Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode(Resources.Lan.JointComprehensive + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
//Response.ContentType = "application/excel";
|
||||
//Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
//Response.Write(GetGridTableHtml(Grid1));
|
||||
//Response.End();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导出方法
|
||||
/// </summary>
|
||||
/// <param name="grid"></param>
|
||||
/// <returns></returns>
|
||||
private string GetGridTableHtml(Grid grid)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
grid.PageSize = 10000;
|
||||
BindGrid1(this.BatchCode);
|
||||
sb.Append("<meta http-equiv=\"content-type\" content=\"application/excel; charset=UTF-8\"/>");
|
||||
sb.Append("<table cellspacing=\"0\" rules=\"all\" border=\"1\" style=\"border-collapse:collapse;\">");
|
||||
sb.Append("<tr>");
|
||||
foreach (GridColumn column in grid.Columns)
|
||||
{
|
||||
sb.AppendFormat("<td>{0}</td>", column.HeaderText);
|
||||
}
|
||||
sb.Append("</tr>");
|
||||
foreach (GridRow row in grid.Rows)
|
||||
{
|
||||
sb.Append("<tr>");
|
||||
foreach (GridColumn column in grid.Columns)
|
||||
{
|
||||
string html = row.Values[column.ColumnIndex].ToString();
|
||||
if (column.ColumnID == "Remark")
|
||||
{
|
||||
html = (row.FindControl("lablRemark") as AspNet.Label).Text;
|
||||
}
|
||||
sb.AppendFormat("<td>{0}</td>", html);
|
||||
}
|
||||
|
||||
sb.Append("</tr>");
|
||||
}
|
||||
|
||||
sb.Append("</table>");
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重载VerifyRenderingInServerForm方法,否则运行的时候会出现如下错误提示:“类型“GridView”的控件“GridView1”必须放在具有 runat=server 的窗体标记内”
|
||||
/// </summary>
|
||||
/// <param name="control"></param>
|
||||
public override void VerifyRenderingInServerForm(Control control)
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 下载模板
|
||||
/// <summary>
|
||||
/// 下载模板按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDownLoad_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下载导入模板
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void PageManager1_CustomEvent(object sender, CustomEventArgs e)
|
||||
{
|
||||
if (e.EventArgument == "Confirm_OK")
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string uploadfilepath = rootPath + Const.HJGL_TrustInTemplateUrl;
|
||||
//string filePath = Const.HJGL_TrustInTemplateUrl;
|
||||
//string fileName = Path.GetFileName(filePath);
|
||||
FileInfo info = new FileInfo(uploadfilepath);
|
||||
long fileSize = info.Length;
|
||||
Response.ClearContent();
|
||||
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode("委托单模板.xlsx", System.Text.Encoding.UTF8));
|
||||
Response.ContentType = "excel/plain";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
Response.AddHeader("Content-Length", fileSize.ToString().Trim());
|
||||
Response.TransmitFile(uploadfilepath, 0, fileSize);
|
||||
Response.End();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+143
@@ -0,0 +1,143 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||
{
|
||||
|
||||
|
||||
public partial class TrustBatchIn
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// btnAudit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAudit;
|
||||
|
||||
/// <summary>
|
||||
/// btnImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnImport;
|
||||
|
||||
/// <summary>
|
||||
/// btnDownLoad 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDownLoad;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// fuAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FileUpload fuAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// hdFileName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdFileName;
|
||||
|
||||
/// <summary>
|
||||
/// hdCheckResult 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdCheckResult;
|
||||
|
||||
/// <summary>
|
||||
/// lbResult 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbResult;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// lablRemark 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lablRemark;
|
||||
}
|
||||
}
|
||||
@@ -55,23 +55,23 @@
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
|
||||
<f:TextBox ID="txtTrustCode" runat="server" EmptyText="录入要修改的委托单号" Width="200px"
|
||||
ShowRedStar="true" Required="true"></f:TextBox>
|
||||
ShowRedStar="true" Required="true">
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="drpNDEUnit" EmptyText="请选择检测单位" runat="server"
|
||||
ShowRedStar="true" Required="true" EnableEdit="true" Width="210px">
|
||||
</f:DropDownList>
|
||||
<f:DatePicker ID="txtTrustDate" EmptyText="修改委托日期" runat="server" DateFormatString="yyyy-MM-dd"
|
||||
ShowRedStar="true" Required="true" Width="130px" LabelAlign="Right">
|
||||
</f:DatePicker>
|
||||
<f:DropDownList ID="drpSurfaceState" runat="server" EmptyText="请选择表面状态" Hidden="true" Width="135px">
|
||||
<f:DropDownList ID="drpSurfaceState" runat="server" EmptyText="请选择表面状态" Width="135px">
|
||||
<f:ListItem Value="打磨" Text="打磨" />
|
||||
<f:ListItem Value="机加工" Text="机加工" />
|
||||
<f:ListItem Value="喷砂" Text="喷砂" />
|
||||
<f:ListItem Value="漆面" Text="漆面" />
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpDetectionTiming" runat="server" EmptyText="请选择检测时机" Hidden="true" Width="135px">
|
||||
<f:DropDownList ID="drpDetectionTiming" runat="server" EmptyText="请选择检测时机" Width="135px">
|
||||
<f:ListItem Value="焊后" Text="焊后" />
|
||||
<f:ListItem Value="打磨后" Text="打磨后" />
|
||||
<f:ListItem Value="热处理后" Text="热处理后" />
|
||||
@@ -80,11 +80,23 @@
|
||||
<f:ListItem Value="压力试验后" Text="压力试验后" />
|
||||
<f:ListItem Value="其他" Text="其他" />
|
||||
</f:DropDownList>
|
||||
<f:TextBox ID="txtQuaCertFile" runat="server" EmptyText="请录入质量证明文件编号" Width="180px" Hidden="true"></f:TextBox>
|
||||
<f:TextBox ID="txtAcceptStandard" runat="server" EmptyText="请录入制造/验收标准" Width="180px" Hidden="true"></f:TextBox>
|
||||
|
||||
<f:Button ID="btnSave" Text="<%$ Resources:Lan,Save %>" ToolTip="<%$ Resources:Lan,Save %>" Icon="SystemSave" runat="server"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
|
||||
<f:ToolbarFill ID="ToolbarFill2" runat="server">
|
||||
</f:ToolbarFill>
|
||||
|
||||
<f:Button ID="btnImport" Text="导入" ToolTip="导入" Icon="ApplicationGet" runat="server"
|
||||
OnClick="btnImport_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnPrint" Text="<%$ Resources:Lan,Print %>" Icon="Printer" runat="server"
|
||||
OnClick="btnPrint_Click" Hidden="true">
|
||||
</f:Button>
|
||||
@@ -213,6 +225,10 @@
|
||||
EnableMaximize="true" Target="Top" EnableResize="true" runat="server" OnClose="Window1_Close"
|
||||
IsModal="true" Width="720px" Height="400px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window4" Title="委托单导入" Hidden="true" EnableIFrame="true"
|
||||
EnableMaximize="true" Target="Parent" EnableResize="true" runat="server" IsModal="false" OnClose="Window4_Close"
|
||||
CloseAction="HidePostBack" Width="1200px" Height="720px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuCancel" OnClick="btnMenuCancel_Click" EnablePostBack="true"
|
||||
ConfirmText="确定要取消此焊口的委托吗?" ConfirmTarget="Top" runat="server"
|
||||
|
||||
@@ -194,25 +194,11 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||
|
||||
protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
|
||||
{
|
||||
txtQuaCertFile.Hidden = true;
|
||||
txtAcceptStandard.Hidden = true;
|
||||
drpDetectionTiming.Hidden = true;
|
||||
drpSurfaceState.Hidden = true;
|
||||
|
||||
if (e.Node.ToolTip == "DetectionType")
|
||||
{
|
||||
if (e.Node.Text == "PMI")
|
||||
{
|
||||
txtQuaCertFile.Hidden = false;
|
||||
txtAcceptStandard.Hidden = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
drpDetectionTiming.Hidden = false;
|
||||
drpSurfaceState.Hidden = false;
|
||||
}
|
||||
|
||||
|
||||
e.Node.Nodes.Clear();
|
||||
// 单号
|
||||
var trusts = from x in Funs.DB.Batch_BatchTrust
|
||||
@@ -268,22 +254,6 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||
/// <param name="e"></param>
|
||||
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
txtQuaCertFile.Hidden = true;
|
||||
txtAcceptStandard.Hidden = true;
|
||||
drpDetectionTiming.Hidden = true;
|
||||
drpSurfaceState.Hidden = true;
|
||||
|
||||
if (e.Node.ParentNode.Text == "PMI")
|
||||
{
|
||||
txtQuaCertFile.Hidden = false;
|
||||
txtAcceptStandard.Hidden = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
drpDetectionTiming.Hidden = false;
|
||||
drpSurfaceState.Hidden = false;
|
||||
}
|
||||
|
||||
Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewById(this.tvControlItem.SelectedNodeID);
|
||||
if (trust != null)
|
||||
{
|
||||
@@ -319,8 +289,6 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||
this.txtDetectionTypeCode.Text = trust.DetectionTypeCode;
|
||||
drpNDEUnit.SelectedValue = trust.NDEUuit;
|
||||
txtTrustDate.Text = string.Format("{0:yyyy-MM-dd}", trust.TrustDate);
|
||||
txtAcceptStandard.Text = trust.AcceptStandard;
|
||||
txtQuaCertFile.Text = trust.QuaCertFile;
|
||||
if (!string.IsNullOrEmpty(trust.SurfaceState))
|
||||
{
|
||||
drpSurfaceState.SelectedValue = trust.SurfaceState;
|
||||
@@ -480,10 +448,9 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||
string trustCode = txtTrustCode.Text.Trim();
|
||||
string surfaceState = drpSurfaceState.SelectedValue;
|
||||
string detectionTiming = drpDetectionTiming.SelectedValue;
|
||||
string quaCertFile = txtQuaCertFile.Text.Trim();
|
||||
string acceptStandard = txtAcceptStandard.Text.Trim();
|
||||
|
||||
DateTime? trustDate= Funs.GetNewDateTime(this.txtTrustDate.Text);
|
||||
BLL.Batch_BatchTrustService.BatchTrustNDEUnit(trustBatchId, ndtUnit, trustCode, surfaceState, detectionTiming,quaCertFile, acceptStandard, trustDate);
|
||||
BLL.Batch_BatchTrustService.BatchTrustNDEUnit(trustBatchId, ndtUnit, trustCode, surfaceState, detectionTiming, null, null, trustDate);
|
||||
txtTrustBatchCode.Text = trustCode;
|
||||
ShowNotify(Resources.Lan.SaveSuccessfully, MessageBoxIcon.Success);
|
||||
}
|
||||
@@ -673,6 +640,34 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||
}
|
||||
}
|
||||
|
||||
#region 导入
|
||||
/// <summary>
|
||||
/// 导入按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_CheckManageMenuId, Const.BtnAdd))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("TrustBatchIn.aspx", "导入 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify(Resources.Lan.NoPrivilegePrompt, MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭导入弹出窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window4_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
InitTreeMenu();
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void btnPrint_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
+40
-29
@@ -7,10 +7,12 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.TrustManage {
|
||||
namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||
{
|
||||
|
||||
|
||||
public partial class TrustBatchManage {
|
||||
public partial class TrustBatchManage
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -129,15 +131,6 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar3;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// txtTrustCode 控件。
|
||||
/// </summary>
|
||||
@@ -183,24 +176,6 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpDetectionTiming;
|
||||
|
||||
/// <summary>
|
||||
/// txtQuaCertFile 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtQuaCertFile;
|
||||
|
||||
/// <summary>
|
||||
/// txtAcceptStandard 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtAcceptStandard;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
@@ -210,6 +185,33 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill2;
|
||||
|
||||
/// <summary>
|
||||
/// btnImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnImport;
|
||||
|
||||
/// <summary>
|
||||
/// btnPrint 控件。
|
||||
/// </summary>
|
||||
@@ -399,6 +401,15 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window3;
|
||||
|
||||
/// <summary>
|
||||
/// Window4 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window4;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<f:TextBox ID="txtWelderCode" runat="server" Label="焊工号"
|
||||
LabelAlign="Right" Width="150px" LabelWidth="80">
|
||||
</f:TextBox>
|
||||
<f:CheckBox ID="ckbFirstTwo" runat="server" Label="是否首三口" LabelAlign="Right" Width="130px" LabelWidth="100"></f:CheckBox>
|
||||
<f:CheckBox ID="ckbFirstTwo" runat="server" Label="是否首二口" LabelAlign="Right" Width="130px" LabelWidth="100"></f:CheckBox>
|
||||
<f:Label runat="server" Width="100px"></f:Label>
|
||||
<f:Button ID="BtnAnalyse" Text="<%$ Resources:Lan,Statistics %>" Icon="ChartPie"
|
||||
runat="server" OnClick="BtnAnalyse_Click">
|
||||
@@ -121,7 +121,7 @@
|
||||
HeaderText="<%$ Resources:Lan,TrustDate %>" HeaderTextAlign="Center" TextAlign="Left"
|
||||
SortField="TrustDate" FieldType="String">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="是否首三口" ColumnID="IsWelderFirst" DataField="IsWelderFirst"
|
||||
<f:RenderField HeaderText="是否首二口" ColumnID="IsWelderFirst" DataField="IsWelderFirst"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="IsCancelTrust" DataField="IsCancelTrust" HeaderText="取消委托"
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
viewWeldlines[i].WeldTypeCode,
|
||||
viewWeldlines[i].JointAttribute,
|
||||
viewWeldlines[i].WeldingLocationCode,
|
||||
viewWeldlines[i].DoneDin,
|
||||
viewWeldlines[i].Size,
|
||||
viewWeldlines[i].Dia,
|
||||
viewWeldlines[i].Thickness,
|
||||
viewWeldlines[i].WeldingMethodCode,
|
||||
@@ -38,7 +38,9 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
viewWeldlines[i].Material2Code,
|
||||
viewWeldlines[i].ComponentsCode1,
|
||||
viewWeldlines[i].ComponentsCode2,
|
||||
viewWeldlines[i].Coode1,
|
||||
viewWeldlines[i].HeartNo1,
|
||||
viewWeldlines[i].Coode2,
|
||||
viewWeldlines[i].HeartNo2,
|
||||
weldSilkCodes,
|
||||
viewWeldlines[i].WeldMatCode,
|
||||
|
||||
@@ -139,10 +139,10 @@
|
||||
DataField="Thickness" SortField="Thickness" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="<%$ Resources:Lan,CompletedDI %>" ColumnID="DoneDin" DataField="DoneDin"
|
||||
<%-- <f:RenderField HeaderText="<%$ Resources:Lan,CompletedDI %>" ColumnID="DoneDin" DataField="DoneDin"
|
||||
SortField="DoneDin" FieldType="Double" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="90px">
|
||||
</f:RenderField>
|
||||
</f:RenderField>--%>
|
||||
<f:RenderField HeaderText="<%$ Resources:Lan,Component1 %>" ColumnID="ComponentsCode1"
|
||||
DataField="ComponentsCode1" SortField="ComponentsCode1" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="90px">
|
||||
|
||||
@@ -69,11 +69,11 @@
|
||||
</f:DropDownList>
|
||||
<f:NumberBox ID="txtDia" Label="<%$ Resources:Lan,ExternalDiameter %>" runat="server"
|
||||
LabelWidth="130px" DecimalPrecision="4" NoNegative="true" ShowRedStar="true"
|
||||
Required="true" Readonly="true">
|
||||
AutoPostBack="true" OnTextChanged="txtText_TextChanged" Required="true" Readonly="true">
|
||||
</f:NumberBox>
|
||||
<f:NumberBox ID="txtThickness" Label="<%$ Resources:Lan,WallThickness %>" runat="server"
|
||||
LabelWidth="130px" DecimalPrecision="4" NoNegative="true" ShowRedStar="true"
|
||||
Required="true" Readonly="true">
|
||||
AutoPostBack="true" OnTextChanged="txtText_TextChanged" Required="true" Readonly="true">
|
||||
</f:NumberBox>
|
||||
|
||||
|
||||
|
||||
@@ -95,7 +95,6 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
this.drpWeldingLocation.DataSource = from x in Funs.DB.Base_WeldingLocation orderby x.WeldingLocationCode select x;
|
||||
this.drpWeldingLocation.DataBind();
|
||||
|
||||
|
||||
///是否热处理
|
||||
this.drpIsHotProess.DataValueField = "Value";
|
||||
this.drpIsHotProess.DataTextField = "Text";
|
||||
@@ -192,7 +191,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
if (this.drpJointAttribute.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
newJointInfo.JointAttribute = this.drpJointAttribute.SelectedValue;
|
||||
if (this.drpJointAttribute.SelectedValue == "活动S")
|
||||
if (this.drpJointAttribute.SelectedValue == "S")
|
||||
{
|
||||
newJointInfo.JointArea = "S";
|
||||
}
|
||||
@@ -331,6 +330,10 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
|
||||
if (dn.Count() > 0)
|
||||
{
|
||||
if (ansi != "FB")
|
||||
{
|
||||
txtDia.Readonly = true;
|
||||
txtThickness.Readonly = true;
|
||||
if (dn.First().OutSizeDia != null)
|
||||
{
|
||||
dia = dn.First().OutSizeDia.ToString();
|
||||
@@ -462,6 +465,21 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
sch = dn.First().XXS.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
else // 非美标FB
|
||||
{
|
||||
txtDia.Readonly = false;
|
||||
txtThickness.Readonly = false;
|
||||
|
||||
//if (dn.First().OutSize_FB != null)
|
||||
//{
|
||||
// dia = dn.First().OutSize_FB.ToString();
|
||||
//}
|
||||
//if (dn.First().SCH_FB != null)
|
||||
//{
|
||||
// sch = dn.First().SCH_FB.ToString();
|
||||
//}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(dia))
|
||||
{
|
||||
@@ -478,6 +496,26 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 选择外径和壁厚自动获取规格
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtText_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
string dn = string.Empty;
|
||||
string s = string.Empty;
|
||||
if (!string.IsNullOrEmpty(this.txtDia.Text.Trim()))
|
||||
{
|
||||
dn = this.txtDia.Text.Trim();
|
||||
if (!string.IsNullOrEmpty(this.txtThickness.Text.Trim()))
|
||||
{
|
||||
this.txtSpecification.Text = "Φ" + dn + "×" + this.txtThickness.Text.Trim();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -63,10 +63,10 @@
|
||||
<f:DropDownList ID="drpANSISCH" Label="美标壁厚" AutoPostBack="true" OnSelectedIndexChanged="drpANSISCH_OnSelectedIndexChanged"
|
||||
runat="server" ShowRedStar="true" Required="true" EnableEdit="true" LabelWidth="130px">
|
||||
</f:DropDownList>
|
||||
<f:NumberBox ID="txtDia" Label="<%$ Resources:Lan,ExternalDiameter %>" runat="server"
|
||||
<f:NumberBox ID="txtDia" Label="<%$ Resources:Lan,ExternalDiameter %>" runat="server" AutoPostBack="true" OnTextChanged="txtText_TextChanged"
|
||||
LabelWidth="130px" DecimalPrecision="4" NoNegative="true" ShowRedStar="true" Required="true" Readonly="true">
|
||||
</f:NumberBox>
|
||||
<f:NumberBox ID="txtThickness" Label="<%$ Resources:Lan,WallThickness %>" runat="server"
|
||||
<f:NumberBox ID="txtThickness" Label="<%$ Resources:Lan,WallThickness %>" runat="server" AutoPostBack="true" OnTextChanged="txtText_TextChanged"
|
||||
LabelWidth="130px" DecimalPrecision="4" NoNegative="true" ShowRedStar="true" Required="true"
|
||||
Readonly="true">
|
||||
</f:NumberBox>
|
||||
@@ -110,50 +110,53 @@
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtHeartNo1" Label="<%$ Resources:Lan,BatchNumber1 %>" runat="server"
|
||||
LabelWidth="130px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtHeartNo2" Label="<%$ Resources:Lan,BatchNumber2 %>" runat="server"
|
||||
LabelWidth="130px">
|
||||
</f:TextBox>
|
||||
<f:DropDownList ID="drpCoode1" Label="Coode1" runat="server"
|
||||
EnableEdit="true" LabelWidth="130px" AutoPostBack="true" OnSelectedIndexChanged="drpCoode1_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpHeartNo1" Label="<%$ Resources:Lan,BatchNumber1 %>" runat="server"
|
||||
LabelWidth="130px" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpCoode2" Label="Coode2" runat="server"
|
||||
EnableEdit="true" LabelWidth="130px" AutoPostBack="true" OnSelectedIndexChanged="drpCoode2_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpHeartNo2" Label="<%$ Resources:Lan,BatchNumber2 %>" runat="server"
|
||||
LabelWidth="130px" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpPipeAssembly1" Label="<%$ Resources:Lan,Component1 %>" runat="server"
|
||||
EnableEdit="true" LabelWidth="130px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpPipeAssembly2" Label="<%$ Resources:Lan,Component2 %>" runat="server"
|
||||
EnableEdit="true" LabelWidth="130px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpWeldSilk" Label="<%$ Resources:Lan,WeldingWire %>" runat="server"
|
||||
EnableEdit="true" EnableMultiSelect="true" LabelWidth="130px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpWeldMat" Label="<%$ Resources:Lan,Electrode %>" runat="server"
|
||||
EnableEdit="true" LabelWidth="130px">
|
||||
</f:DropDownList>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpWeldSilk" Label="<%$ Resources:Lan,WeldingWire %>" runat="server"
|
||||
EnableEdit="true" EnableMultiSelect="true" LabelWidth="130px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpWeldMat" Label="<%$ Resources:Lan,Electrode %>" runat="server"
|
||||
EnableEdit="true" LabelWidth="130px">
|
||||
</f:DropDownList>
|
||||
<f:TextBox ID="txtPrepareTemp" Label="预热温度" runat="server" LabelWidth="130px" ></f:TextBox>
|
||||
<f:CheckBox ID="ckbIsGoldJoint" runat="server" Label="是否黄金口" LabelWidth="130px"></f:CheckBox>
|
||||
<f:DropDownList ID="drpNDTType" runat="server" Label="可能探伤类型" LabelWidth="130px" EnableMultiSelect="true" ShowRedStar="true" Required="true"></f:DropDownList>
|
||||
<f:CheckBox ID="ckbIsCancel" runat="server" Label="是否取消" LabelWidth="130px" ></f:CheckBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ColumnWidths="25% 25% 50% ">
|
||||
<f:FormRow ColumnWidths="45% 5% 50% ">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpNDTType" runat="server" Label="可能探伤类型" LabelWidth="130px" EnableMultiSelect="true" ShowRedStar="true" Required="true"></f:DropDownList>
|
||||
|
||||
<f:CheckBox ID="ckbIsCancel" runat="server" Label="是否取消" LabelWidth="130px" ></f:CheckBox>
|
||||
<f:TextBox ID="txtCancelResult" runat="server" Label="取消原因" LabelWidth="130px" Width="160px"></f:TextBox>
|
||||
<f:Button ID="btnCancel" Text="取消" ToolTip="如已发生业务可取消,取消时请说明原因,如未发生业务可直接删除!" runat="server"
|
||||
OnClick="btnCancel_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ColumnWidths="25% 25% 50% ">
|
||||
<Items>
|
||||
<f:TextBox ID="txtCoode1" Label="Coode1" runat="server" LabelWidth="130px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtCoode2" Label="Coode2" runat="server" LabelWidth="130px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtRemark" Label="<%$ Resources:Lan,Remark %>" runat="server" LabelWidth="130px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using BLL;
|
||||
using System.Linq;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Header;
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
{
|
||||
@@ -125,6 +126,10 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
this.drpJointAttribute.DataSource = BLL.DropListService.HJGL_JointAttributeItem();
|
||||
this.drpJointAttribute.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpJointAttribute,Resources.Lan.PleaseSelect);
|
||||
|
||||
// 物料码
|
||||
BLL.MaterialCoodeService.InitCoodeDropDownList(this.drpCoode1, this.CurrUser.LoginProjectId, true, Resources.Lan.PleaseSelect);//Coode1
|
||||
BLL.MaterialCoodeService.InitCoodeDropDownList(this.drpCoode2, this.CurrUser.LoginProjectId, true, Resources.Lan.PleaseSelect);//Coode2
|
||||
///组件1号
|
||||
Base_ComponentsService.InitComponentsDropDownList(this.drpPipeAssembly1, true,Resources.Lan.PleaseSelect);
|
||||
///组件2号
|
||||
@@ -285,8 +290,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
{
|
||||
this.drpWeldingMethod.SelectedValue = jointInfo.WeldingMethodId;
|
||||
}
|
||||
this.txtHeartNo1.Text = jointInfo.HeartNo1;
|
||||
this.txtHeartNo2.Text = jointInfo.HeartNo2;
|
||||
|
||||
if (!string.IsNullOrEmpty(jointInfo.GrooveTypeId))
|
||||
{
|
||||
this.drpGrooveType.SelectedValue = jointInfo.GrooveTypeId;
|
||||
@@ -349,8 +353,19 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
this.txtTestPackageNo.Text = jointInfo.TestPackageNo;
|
||||
this.txtPrepareTemp.Text = jointInfo.PrepareTemp;
|
||||
txtPageNum.Text = jointInfo.PageNum;
|
||||
txtCoode1.Text = jointInfo.Coode1;
|
||||
txtCoode2.Text = jointInfo.Coode2;
|
||||
if (!string.IsNullOrEmpty(jointInfo.Coode1))
|
||||
{
|
||||
drpCoode1.SelectedValue = jointInfo.Coode1;
|
||||
BLL.MaterialCoodeService.InitHeartNoDropDownList(this.drpHeartNo1, drpCoode1.SelectedValue, true, Resources.Lan.PleaseSelect);
|
||||
drpHeartNo1.SelectedValue = jointInfo.Coode1;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(jointInfo.Coode2))
|
||||
{
|
||||
drpCoode2.SelectedValue = jointInfo.Coode2;
|
||||
BLL.MaterialCoodeService.InitHeartNoDropDownList(this.drpHeartNo2, drpCoode2.SelectedValue, true, Resources.Lan.PleaseSelect);
|
||||
drpHeartNo2.SelectedValue = jointInfo.Coode2;
|
||||
}
|
||||
|
||||
this.txtRemark.Text = jointInfo.Remark;
|
||||
}
|
||||
}
|
||||
@@ -429,7 +444,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
if (this.drpJointAttribute.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
newJointInfo.JointAttribute = this.drpJointAttribute.SelectedValue;
|
||||
if (this.drpJointAttribute.SelectedValue == "活动S")
|
||||
if (this.drpJointAttribute.SelectedValue == "S")
|
||||
{
|
||||
newJointInfo.JointArea = "S";
|
||||
}
|
||||
@@ -468,8 +483,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
{
|
||||
newJointInfo.WeldingMethodId = this.drpWeldingMethod.SelectedValue;
|
||||
}
|
||||
newJointInfo.HeartNo1 = this.txtHeartNo1.Text.Trim();
|
||||
newJointInfo.HeartNo2 = this.txtHeartNo2.Text.Trim();
|
||||
|
||||
if (this.drpGrooveType.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
newJointInfo.GrooveTypeId = this.drpGrooveType.SelectedValue;
|
||||
@@ -503,8 +517,24 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
newJointInfo.TestPackageNo = this.txtTestPackageNo.Text.Trim();
|
||||
newJointInfo.PrepareTemp = this.txtPrepareTemp.Text.Trim();
|
||||
newJointInfo.PageNum = txtPageNum.Text.Trim();
|
||||
newJointInfo.Coode1 = txtCoode1.Text.Trim();
|
||||
newJointInfo.Coode2 = txtCoode2.Text.Trim();
|
||||
if (drpCoode1.SelectedValue != Const._Null)
|
||||
{
|
||||
newJointInfo.Coode1 = drpCoode1.SelectedValue;
|
||||
}
|
||||
if (drpHeartNo1.SelectedValue != Const._Null)
|
||||
{
|
||||
newJointInfo.HeartNo1 = drpHeartNo1.SelectedValue;
|
||||
}
|
||||
|
||||
if (drpCoode2.SelectedValue != Const._Null)
|
||||
{
|
||||
newJointInfo.Coode2=drpCoode2.SelectedValue;
|
||||
}
|
||||
if (drpHeartNo2.SelectedValue != Const._Null)
|
||||
{
|
||||
newJointInfo.HeartNo2 = drpHeartNo2.SelectedValue;
|
||||
}
|
||||
|
||||
newJointInfo.Remark = this.txtRemark.Text.Trim();
|
||||
newJointInfo.WPQId = drpWPS.SelectedValue;
|
||||
newJointInfo.DetectionType = string.Join("|", drpNDTType.SelectedValueArray);
|
||||
@@ -628,6 +658,24 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
|
||||
}
|
||||
|
||||
protected void drpCoode1_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (drpCoode1.SelectedValue != Const._Null)
|
||||
{
|
||||
drpHeartNo1.Items.Clear();
|
||||
BLL.MaterialCoodeService.InitHeartNoDropDownList(this.drpHeartNo1, drpCoode1.SelectedValue, true, Resources.Lan.PleaseSelect);//HeartNo1
|
||||
}
|
||||
}
|
||||
|
||||
protected void drpCoode2_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (drpCoode2.SelectedValue != Const._Null)
|
||||
{
|
||||
drpHeartNo2.Items.Clear();
|
||||
BLL.MaterialCoodeService.InitHeartNoDropDownList(this.drpHeartNo2, drpCoode2.SelectedValue, true, Resources.Lan.PleaseSelect);//HeartNo2
|
||||
}
|
||||
}
|
||||
|
||||
#region 外径、壁厚输入框事件
|
||||
/// <summary>
|
||||
/// 选择外径和壁厚自动获取规格
|
||||
@@ -645,6 +693,11 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
|
||||
if (dn.Count()>0)
|
||||
{
|
||||
if (ansi != "FB")
|
||||
{
|
||||
txtDia.Readonly = true;
|
||||
txtThickness.Readonly = true;
|
||||
|
||||
if (dn.First().OutSizeDia != null)
|
||||
{
|
||||
dia = dn.First().OutSizeDia.ToString();
|
||||
@@ -776,6 +829,22 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
sch = dn.First().XXS.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else // 非美标FB
|
||||
{
|
||||
txtDia.Readonly = false;
|
||||
txtThickness.Readonly = false;
|
||||
|
||||
//if (dn.First().OutSize_FB != null)
|
||||
//{
|
||||
// dia = dn.First().OutSize_FB.ToString();
|
||||
//}
|
||||
//if (dn.First().SCH_FB != null)
|
||||
//{
|
||||
// sch = dn.First().SCH_FB.ToString();
|
||||
//}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(dia))
|
||||
{
|
||||
@@ -792,6 +861,26 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 选择外径和壁厚自动获取规格
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtText_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
string dn = string.Empty;
|
||||
string s = string.Empty;
|
||||
if (!string.IsNullOrEmpty(this.txtDia.Text.Trim()))
|
||||
{
|
||||
dn = this.txtDia.Text.Trim();
|
||||
if (!string.IsNullOrEmpty(this.txtThickness.Text.Trim()))
|
||||
{
|
||||
this.txtSpecification.Text = "Φ" + dn + "×" + this.txtThickness.Text.Trim();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+26
-24
@@ -7,10 +7,12 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.WeldingManage {
|
||||
namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
{
|
||||
|
||||
|
||||
public partial class JointInfoEdit {
|
||||
public partial class JointInfoEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -247,22 +249,40 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
|
||||
protected global::FineUIPro.TextBox txtSystemNumber;
|
||||
|
||||
/// <summary>
|
||||
/// txtHeartNo1 控件。
|
||||
/// drpCoode1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtHeartNo1;
|
||||
protected global::FineUIPro.DropDownList drpCoode1;
|
||||
|
||||
/// <summary>
|
||||
/// txtHeartNo2 控件。
|
||||
/// drpHeartNo1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtHeartNo2;
|
||||
protected global::FineUIPro.DropDownList drpHeartNo1;
|
||||
|
||||
/// <summary>
|
||||
/// drpCoode2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpCoode2;
|
||||
|
||||
/// <summary>
|
||||
/// drpHeartNo2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpHeartNo2;
|
||||
|
||||
/// <summary>
|
||||
/// drpPipeAssembly1 控件。
|
||||
@@ -354,24 +374,6 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnCancel;
|
||||
|
||||
/// <summary>
|
||||
/// txtCoode1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCoode1;
|
||||
|
||||
/// <summary>
|
||||
/// txtCoode2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCoode2;
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
ListItem[] list = new ListItem[32];
|
||||
ListItem[] list = new ListItem[33];
|
||||
list[0] = new ListItem(Resources.Lan.WeldingJointNumber, "1");
|
||||
list[1] = new ListItem(Resources.Lan.WeldedOrNot, "2");
|
||||
list[2] = new ListItem("焊接工艺(WPS)", "3");
|
||||
@@ -30,27 +30,27 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
list[10] = new ListItem(Resources.Lan.InchDiameter, "11");
|
||||
list[11] = new ListItem(Resources.Lan.ExternalDiameter, "12");
|
||||
list[12] = new ListItem(Resources.Lan.WallThickness, "13");
|
||||
list[13] = new ListItem(Resources.Lan.CompletedDI, "14");
|
||||
list[14] = new ListItem(Resources.Lan.Component1, "15");
|
||||
list[15] = new ListItem(Resources.Lan.Component2, "16");
|
||||
list[16] = new ListItem(Resources.Lan.Specifications, "17");
|
||||
list[17] = new ListItem(Resources.Lan.BatchNumber1, "18");
|
||||
list[18] = new ListItem(Resources.Lan.BatchNumber2, "19");
|
||||
list[19] = new ListItem(Resources.Lan.BevelType, "20");
|
||||
list[20] = new ListItem(Resources.Lan.WeldingMethod, "21");
|
||||
list[21] = new ListItem(Resources.Lan.WeldingWire, "22");
|
||||
list[22] = new ListItem(Resources.Lan.Electrode, "23");
|
||||
list[23] = new ListItem(Resources.Lan.WeldingDate, "24");
|
||||
list[24] = new ListItem(Resources.Lan.DailyNumber, "25");
|
||||
list[25] = new ListItem(Resources.Lan.FloorWelder, "26");
|
||||
list[26] = new ListItem(Resources.Lan.CoveringWelder, "27");
|
||||
list[27] = new ListItem(Resources.Lan.IsHot, "28");
|
||||
list[28] = new ListItem(Resources.Lan.SystemNumber, "29");
|
||||
list[29] = new ListItem(Resources.Lan.PressureTestPackageNumber, "30");
|
||||
list[30] = new ListItem(Resources.Lan.TotalPages, "31");
|
||||
list[31] = new ListItem(Resources.Lan.Remark, "32");
|
||||
list[32] = new ListItem("Coode1", "33");
|
||||
list[33] = new ListItem("Coode2", "34");
|
||||
//list[13] = new ListItem(Resources.Lan.CompletedDI, "14");
|
||||
list[13] = new ListItem(Resources.Lan.Component1, "14");
|
||||
list[14] = new ListItem(Resources.Lan.Component2, "15");
|
||||
list[15] = new ListItem(Resources.Lan.Specifications, "16");
|
||||
list[16] = new ListItem(Resources.Lan.BatchNumber1, "17");
|
||||
list[17] = new ListItem(Resources.Lan.BatchNumber2, "18");
|
||||
list[18] = new ListItem(Resources.Lan.BevelType, "19");
|
||||
list[19] = new ListItem(Resources.Lan.WeldingMethod, "20");
|
||||
list[20] = new ListItem(Resources.Lan.WeldingWire, "21");
|
||||
list[21] = new ListItem(Resources.Lan.Electrode, "22");
|
||||
list[22] = new ListItem(Resources.Lan.WeldingDate, "23");
|
||||
list[23] = new ListItem(Resources.Lan.DailyNumber, "24");
|
||||
list[24] = new ListItem(Resources.Lan.FloorWelder, "25");
|
||||
list[25] = new ListItem(Resources.Lan.CoveringWelder, "26");
|
||||
list[26] = new ListItem(Resources.Lan.IsHot, "27");
|
||||
list[27] = new ListItem(Resources.Lan.SystemNumber, "28");
|
||||
list[28] = new ListItem(Resources.Lan.PressureTestPackageNumber, "29");
|
||||
list[29] = new ListItem(Resources.Lan.TotalPages, "30");
|
||||
list[30] = new ListItem(Resources.Lan.Remark, "31");
|
||||
list[31] = new ListItem("Coode1", "32");
|
||||
list[32] = new ListItem("Coode2", "33");
|
||||
|
||||
this.cblColumn.DataSource = list;
|
||||
this.cblColumn.DataBind();
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MaterialCoode.aspx.cs" Inherits="FineUIPro.Web.WeldingProcess.WeldingManage.MaterialCoode" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>物料码</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="物料码"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="MaterialCoodeId"
|
||||
AllowCellEditing="true" ClicksToEdit="2" DataIDField="MaterialCoodeId" AllowSorting="true"
|
||||
SortField="Coode" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true"
|
||||
IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox ID="txtCoode" runat="server" Label="物料码"
|
||||
EmptyText="<%$ Resources:Lan,EnterQueryConditions %>" Width="250px" LabelWidth="120px" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
<f:Button ID="btnQuery" ToolTip="<%$ Resources:Lan,Inquiry %>" Icon="SystemSearch"
|
||||
EnablePostBack="true" OnClick="btnQuery_Click" runat="server">
|
||||
</f:Button>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnNew" ToolTip="<%$ Resources:Lan,Add %>" Icon="Add" EnablePostBack="true"
|
||||
runat="server" OnClick="btnNew_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RenderField Width="150px" ColumnID="Coode" DataField="Coode" FieldType="String"
|
||||
HeaderText="物料码" HeaderTextAlign="Center" TextAlign="Left"
|
||||
SortField="MediumCode">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="200px" ColumnID="HeartNo" DataField="HeartNo" FieldType="String"
|
||||
HeaderText="炉批号" HeaderTextAlign="Center"
|
||||
TextAlign="Left" SortField="HeartNo">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="200px" ColumnID="Amount" DataField="Amount"
|
||||
FieldType="String" HeaderText="数量" HeaderTextAlign="Center"
|
||||
TextAlign="Left" SortField="MediumAbbreviation">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</Listeners>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="<%$ Resources:Lan,NumberOfRecordsPerPage %>">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
<f:ListItem Text="10" Value="10" />
|
||||
<f:ListItem Text="15" Value="15" />
|
||||
<f:ListItem Text="20" Value="20" />
|
||||
<f:ListItem Text="25" Value="25" />
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="<%$ Resources:Lan,PopForm %>" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Top" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="700px" Height="330px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" Icon="BulletEdit" EnablePostBack="true"
|
||||
runat="server" Text="<%$ Resources:Lan,Edit %>">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
|
||||
Icon="Delete" ConfirmText="<%$ Resources:Lan,DeleteReminder %>" ConfirmTarget="Top"
|
||||
runat="server" Text="<%$ Resources:Lan,Delete %>">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnView" OnClick="btnView_Click" Icon="Find" EnablePostBack="true"
|
||||
runat="server" Text="<%$ Resources:Lan,View %>">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,270 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
{
|
||||
public partial class MaterialCoode : PageBase
|
||||
{
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
||||
// 绑定表格
|
||||
this.BindGrid();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 绑定数据
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT * FROM dbo.Base_MaterialCoode WHERE 1=1 ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtCoode.Text.Trim()))
|
||||
{
|
||||
strSql += " AND Coode LIKE @Coode";
|
||||
listStr.Add(new SqlParameter("@Coode", "%" + this.txtCoode.Text.Trim() + "%"));
|
||||
}
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 改变索引事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页下拉选择事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭弹出窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 增加按钮事件
|
||||
/// <summary>
|
||||
/// 增加按钮事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (GetButtonPower(Const.BtnAdd))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MaterialCoodeEdit.aspx", "新增 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop(Resources.Lan.NoPrivilegePrompt, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 编辑
|
||||
/// <summary>
|
||||
/// 双击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
this.EditData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 右键编辑事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.EditData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编辑数据方法
|
||||
/// </summary>
|
||||
private void EditData()
|
||||
{
|
||||
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop(Resources.Lan.SelectLeastOneRecord, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
|
||||
if (GetButtonPower(Const.BtnModify))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MaterialCoodeEdit.aspx?MaterialCoodeId={0}&flag=edit", Grid1.SelectedRowID, "编辑 - ")));
|
||||
}
|
||||
else if (GetButtonPower(Const.BtnSee))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MaterialCoodeEdit.aspx?MaterialCoodeId={0}&flag=view", Grid1.SelectedRowID, "查看 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop(Resources.Lan.NoPrivilegePrompt, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 删除
|
||||
/// <summary>
|
||||
/// 右键删除事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (GetButtonPower(Const.BtnDelete))
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length > 0)
|
||||
{
|
||||
string strShowNotify = string.Empty;
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
var getMedium = BLL.Base_MediumService.GetMediumByMediumId(rowID);
|
||||
if (getMedium != null)
|
||||
{
|
||||
string cont = judgementDelete(rowID);
|
||||
if (string.IsNullOrEmpty(cont))
|
||||
{
|
||||
BLL.Base_MediumService.DeleteMediumByMediumId(rowID);
|
||||
BLL.Sys_LogService.AddLog(Const.System_2, this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.MediumMenuId, Const.BtnDelete, rowID);
|
||||
}
|
||||
else
|
||||
{
|
||||
strShowNotify += Resources.Lan.MediumDefinition + ":" + getMedium.MediumCode + cont;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BindGrid();
|
||||
if (!string.IsNullOrEmpty(strShowNotify))
|
||||
{
|
||||
Alert.ShowInTop(strShowNotify, MessageBoxIcon.Warning);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify(Resources.Lan.DeletedSuccessfully, MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop(Resources.Lan.NoPrivilegePrompt, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#region 判断是否可删除
|
||||
/// <summary>
|
||||
/// 判断是否可以删除
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private string judgementDelete(string id)
|
||||
{
|
||||
string content = string.Empty;
|
||||
//if (Funs.DB.Pipeline_WeldJoint.FirstOrDefault(x => x.Coode1 == id) != null)
|
||||
//{
|
||||
// content += "已在【管线信息】中使用,不能删除!";
|
||||
//}
|
||||
|
||||
return content;
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 查询
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnQuery_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查看按钮
|
||||
/// <summary>
|
||||
/// 查看按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnView_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MaterialCoodeEdit.aspx?MaterialCoodeId={0}&flag=view", Grid1.SelectedRowID, "查看 - ")));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private bool GetButtonPower(string button)
|
||||
{
|
||||
return BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.MaterialCoodeMenuId, button);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
{
|
||||
|
||||
|
||||
public partial class MaterialCoode
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// txtCoode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCoode;
|
||||
|
||||
/// <summary>
|
||||
/// btnQuery 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnQuery;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDelete;
|
||||
|
||||
/// <summary>
|
||||
/// btnView 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnView;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MaterialCoodeEdit.aspx.cs" Inherits="FineUIPro.Web.WeldingProcess.WeldingManage.MaterialCoodeEdit" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>编辑物料码信息</title>
|
||||
<base target="_self" />
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtCoode" runat="server" Label="Coode码"
|
||||
Required="true" MaxLength="50" ShowRedStar="true" FocusOnPageLoad="true" LabelWidth="200px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtHeartNo" runat="server" Label="炉批号"
|
||||
MaxLength="50" LabelWidth="200px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox ID="txtAmount" runat="server" Label="数量" LabelWidth="200px"></f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="<%$ Resources:Lan,Close %>"
|
||||
runat="server" Icon="SystemClose">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,109 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
{
|
||||
public partial class MaterialCoodeEdit : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string MaterialCoodeId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["MaterialCoodeId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["MaterialCoodeId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.txtCoode.Focus();
|
||||
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
||||
this.MaterialCoodeId = Request.Params["MaterialCoodeId"];
|
||||
string flag = Request.Params["flag"];
|
||||
if (flag == "view")
|
||||
{
|
||||
this.btnSave.Hidden = true;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.MaterialCoodeId))
|
||||
{
|
||||
Model.Base_MaterialCoode Material = BLL.MaterialCoodeService.GetMaterialCoode(this.MaterialCoodeId, this.CurrUser.LoginProjectId);
|
||||
if (Material != null)
|
||||
{
|
||||
this.txtCoode.Text = Material.Coode;
|
||||
this.txtHeartNo.Text = Material.HeartNo;
|
||||
if (Material.Amount.HasValue)
|
||||
{
|
||||
txtAmount.Text = Material.Amount.Value.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 保存
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (BLL.MaterialCoodeService.IsExistMaterialCoode(this.CurrUser.LoginProjectId, txtHeartNo.Text.Trim(), txtCoode.Text.Trim(), this.MaterialCoodeId))
|
||||
{
|
||||
Alert.ShowInTop("此物料码对应的炉批号已存在", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
Model.Base_MaterialCoode newCoode = new Model.Base_MaterialCoode
|
||||
{
|
||||
ProjectId = this.CurrUser.LoginProjectId,
|
||||
Coode = this.txtCoode.Text.Trim(),
|
||||
HeartNo = this.txtHeartNo.Text.Trim(),
|
||||
};
|
||||
if (this.txtAmount.Text != "")
|
||||
{
|
||||
newCoode.Amount = Convert.ToInt32(this.txtAmount.Text);
|
||||
}
|
||||
else
|
||||
{
|
||||
newCoode.Amount=null;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.MaterialCoodeId))
|
||||
{
|
||||
newCoode.MaterialCoodeId= this.MaterialCoodeId;
|
||||
BLL.MaterialCoodeService.UpdateMaterialCoode(newCoode);
|
||||
BLL.Sys_LogService.AddLog(Const.System_2, this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.MaterialCoodeMenuId, Const.BtnModify, this.MaterialCoodeId);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.MaterialCoodeId = SQLHelper.GetNewID(typeof(Model.Base_MaterialCoode));
|
||||
newCoode.MaterialCoodeId = this.MaterialCoodeId;
|
||||
BLL.MaterialCoodeService.AddMaterialCoode(newCoode);
|
||||
BLL.Sys_LogService.AddLog(Const.System_2, this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.MaterialCoodeMenuId, Const.BtnAdd, this.MaterialCoodeId);
|
||||
}
|
||||
|
||||
ShowNotify(Resources.Lan.SaveSuccessfully, MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
{
|
||||
|
||||
|
||||
public partial class MaterialCoodeEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// txtCoode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCoode;
|
||||
|
||||
/// <summary>
|
||||
/// txtHeartNo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtHeartNo;
|
||||
|
||||
/// <summary>
|
||||
/// txtAmount 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtAmount;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnClose 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnClose;
|
||||
}
|
||||
}
|
||||
@@ -188,7 +188,7 @@
|
||||
columnMenu: false,
|
||||
columnResizing: false,
|
||||
cls: 'gridinrowexpander',
|
||||
fields: ['Num', 'PipelineCode', 'WeldJointCode', 'BackingWelderCode', 'CoverWelderCode', 'WeldTypeCode', 'JointAttribute', 'WeldingLocationCode', 'DoneDin', 'Dia', 'Thickness', 'WeldingMethodCode', 'Material1Code', 'Material2Code', 'ComponentsCode1', 'ComponentsCode2', 'HeartNo1', 'HeartNo2', 'WeldSilkCode','WeldMatCode','PipeSegment','WPQCode'],
|
||||
fields: ['Num', 'PipelineCode', 'WeldJointCode', 'BackingWelderCode', 'CoverWelderCode', 'WeldTypeCode', 'JointAttribute', 'WeldingLocationCode', 'Size', 'Dia', 'Thickness', 'WeldingMethodCode', 'Material1Code', 'Material2Code', 'ComponentsCode1', 'ComponentsCode2', 'Coode1', 'HeartNo1', 'Coode2', 'HeartNo2', 'WeldSilkCode','WeldMatCode','PipeSegment','WPQCode'],
|
||||
columns: [{
|
||||
text: '序号', field: 'Num', width: 50
|
||||
}, {
|
||||
@@ -206,7 +206,7 @@
|
||||
}, {
|
||||
text: '焊接位置', field: 'WeldingLocationCode', width: 80
|
||||
}, {
|
||||
text: '管径', field: 'DoneDin', width: 65
|
||||
text: '管径', field: 'Size', width: 65
|
||||
}, {
|
||||
text: '外径', field: 'Dia', width: 65
|
||||
}, {
|
||||
@@ -222,9 +222,13 @@
|
||||
}, {
|
||||
text: '组件2', field: 'ComponentsCode2', width: 90
|
||||
}, {
|
||||
text: '炉批号1', field: 'HeartNo1', width: 100
|
||||
text: 'Coode1', field: 'Coode1', width: 90
|
||||
}, {
|
||||
text: '炉批号2', field: 'HeartNo2', width: 100
|
||||
text: '炉批号1', field: 'HeartNo1', width: 120
|
||||
}, {
|
||||
text: 'Coode2', field: 'Coode2', width: 90
|
||||
}, {
|
||||
text: '炉批号2', field: 'HeartNo2', width: 120
|
||||
}, {
|
||||
text: '焊丝', field: 'WeldSilkCode', width: 150
|
||||
}, {
|
||||
|
||||
@@ -10,6 +10,8 @@ using NPOI.XSSF.UserModel;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using BLL;
|
||||
using Org.BouncyCastle.Ocsp;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
{
|
||||
@@ -499,6 +501,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
var componentss = from x in Funs.DB.Base_Components select x;//安装组件
|
||||
var consumabless = from x in Funs.DB.Base_Consumables select x;//焊接耗材(焊丝、焊条)
|
||||
var wpsList = from x in Funs.DB.WPQ_WPQList select x;
|
||||
var coodeList = from x in Funs.DB.Base_MaterialCoode where x.ProjectId == this.CurrUser.LoginProjectId select x; //coode
|
||||
|
||||
List<Model.SpWeldingDaily> dayList = new List<Model.SpWeldingDaily>();
|
||||
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
|
||||
@@ -579,7 +582,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
{
|
||||
var pipeline = from x in Funs.DB.Pipeline_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkAreaId == areaId
|
||||
&& x.InstallationId == insId && x.PipelineCode == ds.Tables[0].Rows[i]["管线号"].ToString()
|
||||
&& x.InstallationId == insId && x.WorkAreaId==areaId && x.PipelineCode == ds.Tables[0].Rows[i]["管线号"].ToString()
|
||||
select x;
|
||||
|
||||
if (pipeline.Count() > 0)
|
||||
@@ -630,6 +633,8 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
d.Material2Id = jot.First().Material2Id;
|
||||
d.PipeAssembly1Id = jot.First().PipeAssembly1Id;
|
||||
d.PipeAssembly2Id = jot.First().PipeAssembly2Id;
|
||||
d.Coode1 = jot.First().Coode1;
|
||||
d.Coode2 = jot.First().Coode2;
|
||||
d.HeartNo1 = jot.First().HeartNo1;
|
||||
d.HeartNo2 = jot.First().HeartNo2;
|
||||
d.WeldSilkId = jot.First().WeldSilkId;
|
||||
@@ -750,14 +755,13 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
}
|
||||
else
|
||||
{
|
||||
d.JointAttribute = att;
|
||||
if (att == "S")
|
||||
{
|
||||
d.JointAttribute = "活动S";
|
||||
d.JointArea = "S";
|
||||
}
|
||||
else
|
||||
{
|
||||
d.JointAttribute = "固定G";
|
||||
d.JointArea = "F";
|
||||
}
|
||||
}
|
||||
@@ -1014,15 +1018,72 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
d.PipeAssembly2Id = com.ComponentsId;
|
||||
}
|
||||
}
|
||||
if (ds.Tables[0].Rows[i]["Coode1"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["Coode1"].ToString()))
|
||||
{
|
||||
var cood = coodeList.FirstOrDefault(x => x.Coode == ds.Tables[0].Rows[i]["Coode1"].ToString());
|
||||
if (cood == null)
|
||||
{
|
||||
errorInfos += "Coode1:[" + ds.Tables[0].Rows[i]["Coode1"].ToString() + "]不存在;";
|
||||
}
|
||||
else
|
||||
{
|
||||
d.Coode1 = cood.Coode;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errorInfos += (i + 2) + "行,Coode1不能为空!</br>";
|
||||
}
|
||||
if (ds.Tables[0].Rows[i]["Coode2"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["Coode2"].ToString()))
|
||||
{
|
||||
var cood = coodeList.FirstOrDefault(x => x.Coode == ds.Tables[0].Rows[i]["Coode2"].ToString());
|
||||
if (cood == null)
|
||||
{
|
||||
errorInfos += "Coode2:[" + ds.Tables[0].Rows[i]["Coode2"].ToString() + "]不存在;";
|
||||
}
|
||||
else
|
||||
{
|
||||
d.Coode1 = cood.Coode;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errorInfos += (i + 2) + "行,Coode2不能为空!</br>";
|
||||
}
|
||||
|
||||
if (ds.Tables[0].Rows[i]["炉批号1"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["炉批号1"].ToString()))
|
||||
{
|
||||
var cood = coodeList.FirstOrDefault(x => x.Coode == d.Coode1 && x.HeartNo == ds.Tables[0].Rows[i]["炉批号1"].ToString());
|
||||
if (cood == null)
|
||||
{
|
||||
errorInfos += "炉批号1:[" + ds.Tables[0].Rows[i]["炉批号1"].ToString() + "]或对应的Coode1不存在;";
|
||||
}
|
||||
else
|
||||
{
|
||||
d.HeartNo1 = ds.Tables[0].Rows[i]["炉批号1"].ToString();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errorInfos += (i + 2) + "行,炉批号1不能为空!</br>";
|
||||
}
|
||||
|
||||
if (ds.Tables[0].Rows[i]["炉批号2"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["炉批号2"].ToString()))
|
||||
{
|
||||
var cood = coodeList.FirstOrDefault(x => x.Coode == d.Coode2 && x.HeartNo == ds.Tables[0].Rows[i]["炉批号2"].ToString());
|
||||
if (cood == null)
|
||||
{
|
||||
errorInfos += "炉批号2:[" + ds.Tables[0].Rows[i]["炉批号2"].ToString() + "]或对应的Coode2不存在;";
|
||||
}
|
||||
else
|
||||
{
|
||||
d.HeartNo2 = ds.Tables[0].Rows[i]["炉批号2"].ToString();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errorInfos += (i + 2) + "行,炉批号2不能为空!</br>";
|
||||
}
|
||||
|
||||
//if (ds.Tables[0].Rows[i]["焊丝"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["焊丝"].ToString()))
|
||||
//{
|
||||
@@ -1237,12 +1298,55 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
#endregion
|
||||
}
|
||||
|
||||
// 判断Coode数量
|
||||
string coodeNumError=string.Empty;
|
||||
var coode1Group = dayList.GroupBy(x => new { x.Coode1, x.HeartNo1 }).Select(g => new { Coode = g.Key.Coode1, HeartNo = g.Key.HeartNo1 });
|
||||
var coode2Group = dayList.GroupBy(x => new { x.Coode2, x.HeartNo2 }).Select(g => new { Coode = g.Key.Coode2, HeartNo = g.Key.HeartNo2 });
|
||||
var coodeListGroup= coode1Group.Union(coode2Group).Distinct();
|
||||
string[] jotList = dayList.Select(x => x.WeldJointId).ToArray();
|
||||
foreach (var c in coodeListGroup)
|
||||
{
|
||||
var coodeNum = from x in Funs.DB.Base_MaterialCoode
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.Coode == c.Coode && x.HeartNo == c.HeartNo
|
||||
select x;
|
||||
int daily1 = (from x in dayList where x.Coode1 == c.Coode && x.HeartNo1 == c.HeartNo select x).Count();
|
||||
int daily2 = (from x in dayList where x.Coode2== c.Coode && x.HeartNo2 == c.HeartNo select x).Count();
|
||||
int jotCoode1 = (from x in Funs.DB.Pipeline_WeldJoint
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.Coode1 == c.Coode && x.HeartNo1 == c.HeartNo
|
||||
&& !jotList.Contains(x.WeldJointId)
|
||||
select x).Count();
|
||||
int jotCoode2 = (from x in Funs.DB.Pipeline_WeldJoint
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.Coode2 == c.Coode && x.HeartNo2 == c.HeartNo
|
||||
&& !jotList.Contains(x.WeldJointId)
|
||||
select x).Count();
|
||||
if (coodeNum.Count() > 0 && coodeNum.First().Amount != null)
|
||||
{
|
||||
if (daily1 + daily2 + jotCoode1 + jotCoode2 > coodeNum.First().Amount.Value)
|
||||
{
|
||||
coodeNumError += "Coode:" + c.Coode + "对应的炉批号:" + c.HeartNo + "的数量已超出,";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(coodeNumError))
|
||||
{
|
||||
coodeNumError = coodeNumError + "请检查后再导入";
|
||||
}
|
||||
|
||||
// 数据验证错误,返回
|
||||
if (!string.IsNullOrEmpty(errorInfos))
|
||||
{
|
||||
ShowNotify(errorInfos, MessageBoxIcon.Warning, 10000);
|
||||
return;
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(coodeNumError))
|
||||
{
|
||||
ShowNotify(coodeNumError, MessageBoxIcon.Warning, 10000);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
// 焊工资质符全条件
|
||||
@@ -1282,6 +1386,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
newWeldJoint.WeldTypeId = item.WeldTypeId;
|
||||
newWeldJoint.JointAttribute = item.JointAttribute;
|
||||
newWeldJoint.WeldingLocationId = item.WeldingLocationId;
|
||||
|
||||
newWeldJoint.Size = item.Size;
|
||||
newWeldJoint.ANSISCH = item.ANSISCH;
|
||||
newWeldJoint.Dia = item.Dia;
|
||||
|
||||
@@ -208,7 +208,23 @@
|
||||
</f:DropDownList>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="炉批号1" ColumnID="HeartNo1"
|
||||
<f:RenderField HeaderText="Coode1-炉批号1" ColumnID="CoodeHeartNo1"
|
||||
DataField="CoodeHeartNo1" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="200px">
|
||||
<Editor>
|
||||
<f:DropDownList ID="drpCoode1" Required="true" runat="server" ShowRedStar="true">
|
||||
</f:DropDownList>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="Coode2-炉批号2" ColumnID="CoodeHeartNo2"
|
||||
DataField="CoodeHeartNo2" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="200px">
|
||||
<Editor>
|
||||
<f:DropDownList ID="drpCoode2" Required="true" runat="server" ShowRedStar="true">
|
||||
</f:DropDownList>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<%--<f:RenderField HeaderText="炉批号1" ColumnID="HeartNo1"
|
||||
DataField="HeartNo1" SortField="HeartNo1" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="120px">
|
||||
<Editor>
|
||||
@@ -223,7 +239,7 @@
|
||||
<f:TextBox ID="txtHeartNo2" runat="server" >
|
||||
</f:TextBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
</f:RenderField>--%>
|
||||
|
||||
<f:RenderField HeaderText="焊丝" ColumnID="WeldSilkCode"
|
||||
DataField="WeldSilkCode" FieldType="String"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
@@ -123,6 +124,10 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
drpWPS.DataBind();
|
||||
Funs.FineUIPleaseSelect(drpWPS);
|
||||
|
||||
// 物料码
|
||||
BLL.MaterialCoodeService.InitMaterialCoodeDropDownList(this.drpCoode1, this.CurrUser.LoginProjectId, true, Resources.Lan.PleaseSelect);//Coode1
|
||||
BLL.MaterialCoodeService.InitMaterialCoodeDropDownList(this.drpCoode2, this.CurrUser.LoginProjectId, true, Resources.Lan.PleaseSelect);//Coode2
|
||||
|
||||
|
||||
List<Model.SpWeldingDailyItem> GetWeldingDailyItem = BLL.Pipeline_WeldingDailyService.GetWeldingDailyItem(this.WeldingDailyId);
|
||||
this.BindGrid(GetWeldingDailyItem); // 初始化页面
|
||||
@@ -325,6 +330,50 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
string eventArg = string.Empty;
|
||||
List<Model.SpWeldingDailyItem> GetWeldingDailyItem = this.CollectGridJointInfo();
|
||||
|
||||
|
||||
// 判断Coode数量
|
||||
string coodeNumError = string.Empty;
|
||||
var coode1Group = GetWeldingDailyItem.GroupBy(x => x.CoodeHeartNo1).Select(g => g.Key);
|
||||
var coode2Group = GetWeldingDailyItem.GroupBy(x => x.CoodeHeartNo2).Select(g => g.Key);
|
||||
var coodeListGroup = coode1Group.Union(coode2Group).Distinct();
|
||||
string[] jotList= GetWeldingDailyItem.Select(x=>x.WeldJointId).ToArray();
|
||||
foreach (var c in coodeListGroup)
|
||||
{
|
||||
if (c.Contains(":"))
|
||||
{
|
||||
string coode = c.Split(':')[0];
|
||||
string heartNo = c.Split(':')[1];
|
||||
var coodeNum = from x in Funs.DB.Base_MaterialCoode
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.Coode == coode && x.HeartNo == heartNo
|
||||
select x;
|
||||
int daily1 = (from x in GetWeldingDailyItem where x.CoodeHeartNo1 == c select x).Count();
|
||||
int daily2 = (from x in GetWeldingDailyItem where x.CoodeHeartNo2 == c select x).Count();
|
||||
int jotCoode1 = (from x in Funs.DB.Pipeline_WeldJoint
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.Coode1 == coode && x.HeartNo1 == heartNo
|
||||
&& !jotList.Contains(x.WeldJointId)
|
||||
select x).Count();
|
||||
int jotCoode2 = (from x in Funs.DB.Pipeline_WeldJoint
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.Coode2 == coode && x.HeartNo2 == heartNo
|
||||
&& !jotList.Contains(x.WeldJointId)
|
||||
select x).Count();
|
||||
if (coodeNum.Count() > 0 && coodeNum.First().Amount != null)
|
||||
{
|
||||
if (daily1 + daily2 + jotCoode1 + jotCoode2 > coodeNum.First().Amount.Value)
|
||||
{
|
||||
coodeNumError += "Coode:" + coode + "对应的炉批号:" + heartNo + "的数量已超出,";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(coodeNumError))
|
||||
{
|
||||
coodeNumError = coodeNumError + "请检查后再导入";
|
||||
}
|
||||
|
||||
#region 焊工资质判断,暂不用
|
||||
//// 焊工资质
|
||||
//foreach (var item in GetWeldingDailyItem)
|
||||
@@ -621,8 +670,13 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
//}
|
||||
#endregion
|
||||
|
||||
if (!string.IsNullOrEmpty(coodeNumError))
|
||||
{
|
||||
ShowNotify(coodeNumError, MessageBoxIcon.Warning, 10000);
|
||||
return;
|
||||
}
|
||||
// 焊工资质都符合条件
|
||||
if (eventArg == string.Empty)
|
||||
else if (eventArg == string.Empty)
|
||||
{
|
||||
Model.Pipeline_WeldingDaily newWeldingDaily = new Model.Pipeline_WeldingDaily();
|
||||
newWeldingDaily.WeldingDailyCode = this.txtWeldingDailyCode.Text.Trim();
|
||||
@@ -681,11 +735,18 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
newWeldJoint.JointAttribute = item.JointAttribute;
|
||||
newWeldJoint.JointArea = item.JointArea;
|
||||
newWeldJoint.WeldingLocationId = item.WeldingLocationId;
|
||||
|
||||
newWeldJoint.Material1Id = item.MaterialId1;
|
||||
newWeldJoint.Material2Id = item.MaterialId2;
|
||||
newWeldJoint.HeartNo1 = item.HeartNo1;
|
||||
newWeldJoint.HeartNo2 = item.HeartNo2;
|
||||
if (item.CoodeHeartNo1.Contains(":"))
|
||||
{
|
||||
newWeldJoint.Coode1 = item.CoodeHeartNo1.Split(':')[0];
|
||||
newWeldJoint.HeartNo1 = item.CoodeHeartNo1.Split(':')[1];
|
||||
}
|
||||
if (item.CoodeHeartNo2.Contains(":"))
|
||||
{
|
||||
newWeldJoint.Coode2 = item.CoodeHeartNo2.Split(':')[0];
|
||||
newWeldJoint.HeartNo2 = item.CoodeHeartNo2.Split(':')[1];
|
||||
}
|
||||
newWeldJoint.PipeAssembly1Id = item.Components1Id;
|
||||
newWeldJoint.PipeAssembly2Id = item.Components2Id;
|
||||
newWeldJoint.WeldingMethodId = item.WeldingMethodId;
|
||||
@@ -938,7 +999,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
if (!string.IsNullOrEmpty(values.Value<string>("JointAttribute")))
|
||||
{
|
||||
item.JointAttribute = values.Value<string>("JointAttribute").ToString();
|
||||
if (item.JointAttribute == "活动S")
|
||||
if (item.JointAttribute == "S")
|
||||
{
|
||||
item.JointArea = "S";
|
||||
}
|
||||
@@ -947,6 +1008,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
item.JointArea = "F";
|
||||
}
|
||||
}
|
||||
|
||||
var weldingLocation = (from x in Funs.DB.Base_WeldingLocation
|
||||
where x.WeldingLocationCode == values.Value<string>("WeldingLocationId")
|
||||
select x).FirstOrDefault();
|
||||
@@ -956,8 +1018,9 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
}
|
||||
item.Size = Funs.GetNewDecimalOrZero(values.Value<string>("DoneDin").ToString());
|
||||
item.DoneDin = Funs.GetNewDecimalOrZero(values.Value<string>("DoneDin").ToString());
|
||||
item.HeartNo1= values.Value<string>("HeartNo1").ToString();
|
||||
item.HeartNo2 = values.Value<string>("HeartNo2").ToString();
|
||||
|
||||
item.CoodeHeartNo1 = values.Value<string>("CoodeHeartNo1").ToString();
|
||||
item.CoodeHeartNo2 = values.Value<string>("CoodeHeartNo2").ToString();
|
||||
|
||||
var wmt = (from x in Funs.DB.Base_WeldingMethod
|
||||
where x.WeldingMethodCode == values.Value<string>("WeldingMethodCode")
|
||||
|
||||
+8
-6
@@ -7,10 +7,12 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.WeldingProcess.WeldingManage {
|
||||
namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
||||
{
|
||||
|
||||
|
||||
public partial class WeldReportEdit {
|
||||
public partial class WeldReportEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -301,22 +303,22 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage {
|
||||
protected global::FineUIPro.DropDownList drpComponents2;
|
||||
|
||||
/// <summary>
|
||||
/// txtHeartNo1 控件。
|
||||
/// drpCoode1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtHeartNo1;
|
||||
protected global::FineUIPro.DropDownList drpCoode1;
|
||||
|
||||
/// <summary>
|
||||
/// txtHeartNo2 控件。
|
||||
/// drpCoode2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtHeartNo2;
|
||||
protected global::FineUIPro.DropDownList drpCoode2;
|
||||
|
||||
/// <summary>
|
||||
/// drpWeldSilkCode 控件。
|
||||
|
||||
@@ -91,8 +91,8 @@
|
||||
Width="80px">
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField HeaderText="焊接位置" ColumnID="WeldingLocationCode"
|
||||
DataField="WeldingLocationCode" SortField="WeldingLocationCode" FieldType="String" HeaderTextAlign="Center"
|
||||
<f:RenderField HeaderText="焊接位置" ColumnID="WeldingLocationR"
|
||||
DataField="WeldingLocationR" SortField="WeldingLocationR" FieldType="String" HeaderTextAlign="Center"
|
||||
Width="80px">
|
||||
</f:RenderField>
|
||||
|
||||
|
||||
@@ -248,7 +248,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||
reportModel.GetRow(rowIndex).GetCell(10).CellStyle = style;
|
||||
//焊接位置
|
||||
if (reportModel.GetRow(rowIndex).GetCell(11) == null) reportModel.GetRow(rowIndex).CreateCell(11);
|
||||
reportModel.GetRow(rowIndex).GetCell(11).SetCellValue(itemOver["WeldingLocationCode"].ToString());
|
||||
reportModel.GetRow(rowIndex).GetCell(11).SetCellValue(itemOver["WeldingLocationR"].ToString());
|
||||
reportModel.GetRow(rowIndex).GetCell(11).CellStyle = style;
|
||||
//管径
|
||||
if (reportModel.GetRow(rowIndex).GetCell(12) == null) reportModel.GetRow(rowIndex).CreateCell(12);
|
||||
|
||||
@@ -79,8 +79,8 @@
|
||||
DataField="WeldTypeCode" SortField="WeldTypeCode" FieldType="String" HeaderTextAlign="Center"
|
||||
Width="120px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊接位置<br>Welding Location" ColumnID="WeldingLocationCode"
|
||||
DataField="WeldingLocationCode" FieldType="String" HeaderTextAlign="Center"
|
||||
<f:RenderField HeaderText="焊接位置<br>Welding Location" ColumnID="WeldingLocationR"
|
||||
DataField="WeldingLocationR" FieldType="String" HeaderTextAlign="Center"
|
||||
Width="100px">
|
||||
</f:RenderField>
|
||||
|
||||
|
||||
@@ -37,10 +37,9 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||
/// </summary>
|
||||
private DataTable GetDataTable()
|
||||
{
|
||||
string strSql = @"SELECT weldJoint.WeldJointId,weldJoint.ProjectId,ins.InstallationCode,unit.UnitName,pipeline.PipelineCode,
|
||||
string strSql = @"SELECT weldJoint.WeldJointId,weldJoint.ProjectId,ins.InstallationCode,unit.UnitName,pipeline.PipelineCode,weldJoint.WeldingLocationR,
|
||||
(CASE WHEN weldJoint.PageNum IS NOT NULL AND weldJoint.PageNum<>'' THEN pipeline.SingleNumber+'-'+weldJoint.PageNum ELSE pipeline.SingleNumber END) AS SingleNumber,
|
||||
pipeline.DrawingsNum,CONVERT(NVARCHAR(10),weldingDaily.WeldingDate,120) AS WeldingDate,rate.DetectionRateCode,
|
||||
(CASE WHEN weldJoint.JointAttribute='固定F' THEN 'F'+weldJoint.WeldJointCode ELSE 'S'+weldJoint.WeldJointCode END) AS WeldJointCode,
|
||||
pipeline.DrawingsNum,CONVERT(NVARCHAR(10),weldingDaily.WeldingDate,120) AS WeldingDate,rate.DetectionRateCode, weldJoint.WeldJointCode,
|
||||
CAST(ISNULL(weldJoint.Size,0) AS REAL) AS Size,(CAST(ISNULL(weldJoint.Thickness,0) AS REAL)) AS Thickness,weldJoint.Specification,
|
||||
weldType.WeldTypeCode,com1.ComponentsCode AS ComponentsName1,mat1.MaterialCode AS MaterialCode1,weldJoint.HeartNo1,
|
||||
com2.ComponentsCode AS ComponentsName2,mat2.MaterialCode AS MaterialCode2,weldJoint.HeartNo2, WeldMethod.WeldingMethodName,
|
||||
@@ -284,7 +283,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||
//}
|
||||
//焊接位置
|
||||
if (reportModel.GetRow(rowIndex).GetCell(5) == null) reportModel.GetRow(rowIndex).CreateCell(5);
|
||||
reportModel.GetRow(rowIndex).GetCell(5).SetCellValue(itemOver["WeldingLocationCode"].ToString());
|
||||
reportModel.GetRow(rowIndex).GetCell(5).SetCellValue(itemOver["WeldingLocationR"].ToString());
|
||||
reportModel.GetRow(rowIndex).GetCell(5).CellStyle = style;
|
||||
//寸径
|
||||
if (reportModel.GetRow(rowIndex).GetCell(6) == null) reportModel.GetRow(rowIndex).CreateCell(6);
|
||||
|
||||
@@ -35,14 +35,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||
{
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId));
|
||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
listStr.Add(new SqlParameter("@unitId", this.drpUnitId.SelectedValue));
|
||||
}
|
||||
else
|
||||
{
|
||||
listStr.Add(new SqlParameter("@unitId", null));
|
||||
}
|
||||
|
||||
if (this.drpInstallationId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
listStr.Add(new SqlParameter("@installationId", this.drpInstallationId.SelectedValue));
|
||||
@@ -51,6 +44,15 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||
{
|
||||
listStr.Add(new SqlParameter("@installationId", null));
|
||||
}
|
||||
|
||||
if (this.drpUnitId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
listStr.Add(new SqlParameter("@unitId", this.drpUnitId.SelectedValue));
|
||||
}
|
||||
else
|
||||
{
|
||||
listStr.Add(new SqlParameter("@unitId", null));
|
||||
}
|
||||
if (this.drpWorkAreaId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
listStr.Add(new SqlParameter("@workAreaId", this.drpWorkAreaId.SelectedValue));
|
||||
@@ -61,7 +63,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||
}
|
||||
if (this.drpPipingClassId.SelectedValue!=BLL.Const._Null)
|
||||
{
|
||||
listStr.Add(new SqlParameter("@pipingClassId", this.drpWorkAreaId.SelectedValue));
|
||||
listStr.Add(new SqlParameter("@pipingClassId", this.drpPipingClassId.SelectedValue));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -71,6 +73,10 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
|
||||
{
|
||||
listStr.Add(new SqlParameter("@ndeCode", this.txtNDECode.Text.Trim()));
|
||||
}
|
||||
else
|
||||
{
|
||||
listStr.Add(new SqlParameter("@ndeCode", null));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunProc("sp_rpt_WeldSummary", parameter);
|
||||
this.Grid1.RecordCount = tb.Rows.Count;
|
||||
|
||||
+1454
-4
File diff suppressed because it is too large
Load Diff
@@ -10,7 +10,7 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Model</RootNamespace>
|
||||
<AssemblyName>Model</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
|
||||
@@ -132,6 +132,12 @@ namespace Model
|
||||
set;
|
||||
}
|
||||
|
||||
public string WeldingLocationR
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 焊口属性
|
||||
/// </summary>
|
||||
@@ -178,6 +184,19 @@ namespace Model
|
||||
set;
|
||||
}
|
||||
|
||||
// Coode1
|
||||
public string Coode1
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
// Coode2
|
||||
public string Coode2
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
// 炉批号1
|
||||
public string HeartNo1
|
||||
{
|
||||
|
||||
@@ -124,6 +124,11 @@ namespace Model
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public string WeldingLocationR
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// 焊口属性
|
||||
/// </summary>
|
||||
@@ -246,6 +251,33 @@ namespace Model
|
||||
set;
|
||||
}
|
||||
|
||||
// Coode1
|
||||
public string Coode1
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
// Coode2
|
||||
public string Coode2
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
|
||||
// CoodeHeartNo1
|
||||
public string CoodeHeartNo1
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
// CoodeHeartNo2
|
||||
public string CoodeHeartNo2
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
|
||||
// 焊丝ID
|
||||
public string WeldSilkId
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -14,7 +14,7 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>WebApi</RootNamespace>
|
||||
<AssemblyName>WebApi</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<MvcBuildViews>false</MvcBuildViews>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<Use64BitIISExpress />
|
||||
@@ -25,6 +25,7 @@
|
||||
<UseGlobalApplicationHostFile />
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -48,13 +49,13 @@
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Entity" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Web.Abstractions" />
|
||||
<Reference Include="System.Web.Routing" />
|
||||
@@ -108,6 +109,7 @@
|
||||
<Private>True</Private>
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.4\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="WebGrease">
|
||||
<Private>True</Private>
|
||||
<HintPath>..\packages\WebGrease.1.6.0\lib\WebGrease.dll</HintPath>
|
||||
|
||||
Reference in New Issue
Block a user