This commit is contained in:
2026-08-07 17:27:41 +08:00
43 changed files with 3528 additions and 288 deletions
+64
View File
@@ -222,6 +222,70 @@ namespace BLL.API
return respone;
}
public static Model.ResponeData weldMethodList()
{
Model.ResponeData respone = new ResponeData();
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var q = BLL.HJGL_WeldingMethodService.GetWeldMethodNameList();
List<WeldMethodItem> res = new List<WeldMethodItem>();
foreach (var p in q)
{
WeldMethodItem item = new WeldMethodItem();
item.WME_ID = p.WME_ID;
item.WME_Name = p.WME_Name;
res.Add(item);
}
respone.data = res;
}
return respone;
}
public static Model.ResponeData weldSilkList()
{
Model.ResponeData respone = new ResponeData();
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var q = from x in db.View_WeldInfoDropDownLists
where x.WeldTypeName.Contains("焊丝")
select x;
List<WeldInfoItem> res = new List<WeldInfoItem>();
foreach (var p in q)
{
WeldInfoItem item = new WeldInfoItem();
item.WeldId = p.WeldId;
item.WeldName = p.WeldName;
res.Add(item);
}
respone.data = res;
}
return respone;
}
public static Model.ResponeData weldMatList()
{
Model.ResponeData respone = new ResponeData();
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var q = from x in db.View_WeldInfoDropDownLists
where x.WeldTypeName.Contains("焊条")
select x;
List<WeldInfoItem> res = new List<WeldInfoItem>();
foreach (var p in q)
{
WeldInfoItem item = new WeldInfoItem();
item.WeldId = p.WeldId;
item.WeldName = p.WeldName;
res.Add(item);
}
respone.data = res;
}
return respone;
}
public static Model.ResponeData getWeldInfo(string weldId)
{
Model.ResponeData respone = new ResponeData();
+141 -2
View File
@@ -25,7 +25,7 @@ namespace BLL.API
projectids.AddRange(wpids);
if (userId == BLL.Const.GlyId)
{
projectids = (from x in db.Base_Project where x.ProjectSoft == "1" select x.ProjectId).ToList();
projectids = (from x in db.Base_Project where x.ProjectSoft == "1" select x.ProjectId).Take(2000).ToList();
}
var q = from x in db.Weld_UsingPlan where projectids.Contains(x.ProjectId) && (x.UsingManOne == userId || x.InPutMan == userId) select x;
@@ -312,6 +312,104 @@ namespace BLL.API
return respone;
}
public static Model.ResponeData getUsingPlanTempByUserId(string userId)
{
Model.ResponeData respone = new ResponeData();
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
Weld_UsingPlan_Temp usingPlan = (from x in db.Weld_UsingPlan_Temp where x.InPutMan == userId select x).FirstOrDefault();
UsingPlanItem planItem = new UsingPlanItem();
planItem.UsingPlanId = usingPlan.UsingPlanTempId;
planItem.WeldId = usingPlan.WeldId;
planItem.ProjectId = usingPlan.ProjectId;
planItem.UsePosition = usingPlan.UsePosition;
planItem.Amount = usingPlan.Amount;
planItem.UsingManOne = usingPlan.UsingManOne;
planItem.UsingManTwo = usingPlan.UsingManTwo;
if (usingPlan.InPutDate != null)
{
planItem.InPutDate = string.Format("{0:yyyy-MM-dd}", usingPlan.InPutDate);
}
if (usingPlan.CancelDate != null)
{
planItem.CancelDate = string.Format("{0:yyyy-MM-dd}", usingPlan.CancelDate);
}
planItem.IsCancel = usingPlan.IsCancel;
planItem.FinishMan = usingPlan.FinishMan;
planItem.OrderTime = usingPlan.OrderTime;
if (usingPlan.OrderDate != null)
{
planItem.OrderDate = string.Format("{0:yyyy-MM-dd}", usingPlan.OrderDate);
}
planItem.CancelResult = usingPlan.CancelResult;
planItem.IsSubmit = usingPlan.IsSubmit;
planItem.UsingUnit = usingPlan.UsingUnit;
planItem.IsNeedConfirm = usingPlan.IsNeedConfirm;
planItem.InPutMan = usingPlan.InPutMan;
planItem.IsSteelStru = usingPlan.IsSteelStru;
planItem.TeamGroupId = usingPlan.TeamGroupId;
planItem.STE_ID = usingPlan.STE_ID;
planItem.IsFinish = usingPlan.IsFinish;
planItem.STE_Name = usingPlan.STE_Name;
planItem.UnitStoreId = BLL.UnitStoreService.GetUnitStoreNameById(usingPlan.UnitStoreId);
if (!string.IsNullOrEmpty(planItem.ProjectId))
{
var project = db.Base_Project.Where(x => x.ProjectId == planItem.ProjectId).FirstOrDefault();
if (project != null)
{
planItem.ProjectName = project.ProjectName;
planItem.ProjectCode = project.ProjectCode;
}
}
if (!string.IsNullOrEmpty(planItem.WeldId))
{
var weldInfo = db.Weld_WeldInfo.Where(x => x.WeldId == planItem.WeldId).FirstOrDefault();
if (weldInfo != null)
{
planItem.WeldName = weldInfo.WeldName;
planItem.WeldSpec = weldInfo.WeldSpec;
planItem.WeldCode = weldInfo.WeldCode;
}
if (weldInfo != null && !string.IsNullOrEmpty(weldInfo.WeldTypeId))
{
var weldType = db.Weld_WeldType.Where(x => x.WeldTypeId == weldInfo.WeldTypeId).FirstOrDefault();
if (weldType != null)
{
}
}
}
if (!string.IsNullOrEmpty(planItem.UsingManOne))
{
planItem.UsingManOneName = db.HJGL_BS_Welder.Where(x => x.WED_ID == planItem.UsingManOne).Select(x => x.WED_Name).FirstOrDefault();
}
if (!string.IsNullOrEmpty(planItem.UsingManTwo))
{
planItem.UsingManTwoName = db.HJGL_BS_Welder.Where(x => x.WED_ID == planItem.UsingManTwo).Select(x => x.WED_Name).FirstOrDefault();
}
if (!string.IsNullOrEmpty(planItem.UsingUnit))
{
planItem.UsingUnitName = db.Base_Unit.Where(x => x.UnitId == planItem.UsingUnit).Select(x => x.UnitName).FirstOrDefault();
}
if (!string.IsNullOrEmpty(planItem.InPutMan))
{
planItem.InPutManName = db.Sys_User.Where(x => x.UserId == planItem.InPutMan).Select(x => x.UserName).FirstOrDefault();
}
if (!string.IsNullOrEmpty(planItem.TeamGroupId))
{
planItem.TeamGroupName = db.Base_TeamGroup.Where(x => x.TeamGroupId == planItem.TeamGroupId).Select(x => x.TeamGroupName).FirstOrDefault();
}
respone.data = planItem;
}
return respone;
}
public static Model.ResponeData welderQueIsPass(string welderId, string steelType, bool isSteelStru)
{
Model.ResponeData respone = new ResponeData();
@@ -523,11 +621,12 @@ namespace BLL.API
where x.ProjectId == projectId
select new
{
WED_ID = y.WED_ID,
WED_Code = y.WED_Code,
WED_Name = y.WED_Name,
};
responeData.data = res.Skip(page * pageSize).Take(pageSize);
responeData.data = res.Skip(page * pageSize).Take(pageSize).ToList();
}
}
catch (Exception ex)
@@ -540,5 +639,45 @@ namespace BLL.API
}
#endregion
#region id获取可选择的焊工信息列表
/// <summary>
/// 根据项目id获取可选择的焊工信息列表
/// </summary>
/// <param name="personId">人员ID</param>
/// <param name="type">交换类型</param>
/// <returns></returns>
public static Model.ResponeData getProjectWelderSelectList(string projectId, string str, int page, int pageSize)
{
var responeData = new Model.ResponeData();
try
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var res = db.HJGL_BS_Welder
.Where(w => w.IsOAM == true) // 对应 AND IsOAM=1
.Where(w => !db.Project_Welder
.Any(pw => pw.ProjectId == projectId && pw.WED_ID == w.WED_ID)) // 对应 NOT IN 子查询
.Select(w => new
{
WED_ID = w.WED_ID,
WED_Code = w.WED_Code,
WED_Name = w.WED_Name + "(" + w.WED_Code + ")",
});
if (!string.IsNullOrEmpty(str))
{
res = res.Where(w => w.WED_Code.Contains(str) || w.WED_Name.Contains(str));
}
responeData.data = res.Skip(page * pageSize).Take(pageSize).ToList();
}
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
ErrLogInfo.WriteLog(ex, "根据项目id获取可选择的焊工信息列表", "WeldController.getProjectWelderSelectList");
}
return responeData;
}
#endregion
}
}
+4
View File
@@ -112,6 +112,9 @@
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="ThoughtWorks.QRCode, Version=1.0.4778.30637, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ThoughtWorks.QRCode.1.1.0\lib\ThoughtWorks.QRCode.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="API\APIBaseServices.cs" />
@@ -135,6 +138,7 @@
<Compile Include="Common\CacheHelper.cs" />
<Compile Include="Common\ChartControlService.cs" />
<Compile Include="Common\ConstValue.cs" />
<Compile Include="Common\CreateQRCodeService.cs" />
<Compile Include="Common\FastReportService.cs" />
<Compile Include="Common\FileManage\Common_FileManageService.cs" />
<Compile Include="Common\JsonHelper.cs" />
+85
View File
@@ -0,0 +1,85 @@
using System;
using System.IO;
using System.Text;
using ThoughtWorks.QRCode.Codec;
using System.Web.UI;
namespace BLL
{
/// <summary>
/// 上传附件相关
/// </summary>
public class CreateQRCodeService
{
/// <summary>
/// 生成二维码方法一
/// </summary>
public static string CreateCode_Simple(string nr)
{
string imageUrl = string.Empty;
if (!string.IsNullOrEmpty(nr))
{
QRCodeEncoder qrCodeEncoder = new QRCodeEncoder
{
QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.BYTE,
QRCodeScale = nr.Length,
QRCodeVersion = 0,
QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.M
};
System.Drawing.Image image = qrCodeEncoder.Encode(nr, Encoding.UTF8);
string filepath = Funs.RootPath + UploadFileService.QRCodeImageFilePath;
//如果文件夹不存在,则创建
if (!Directory.Exists(filepath))
{
Directory.CreateDirectory(filepath);
}
string filename = DateTime.Now.ToString("yyyymmddhhmmssfff").ToString() + ".jpg";
FileStream fs = new FileStream(filepath + filename, FileMode.OpenOrCreate, FileAccess.Write);
image.Save(fs, System.Drawing.Imaging.ImageFormat.Jpeg);
fs.Close();
image.Dispose();
imageUrl= UploadFileService.QRCodeImageFilePath + filename;
}
return imageUrl;
}
//public static string CreateCode_Simple2(string nr)
//{
// string imageUrl = string.Empty;
// if (!string.IsNullOrEmpty(nr))
// {
// QRCodeEncoder qrCodeEncoder = new QRCodeEncoder
// {
// QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.BYTE,
// QRCodeScale = nr.Length,
// QRCodeVersion = 0,
// QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.M
// };
// System.Drawing.Image image = qrCodeEncoder.Encode(nr, Encoding.UTF8);
// string filepath = Funs.RootPath + UploadFileService.WelderQRCodeImageFilePath;
// //如果文件夹不存在,则创建
// if (!Directory.Exists(filepath))
// {
// Directory.CreateDirectory(filepath);
// }
// string filename = DateTime.Now.ToString("yyyymmddhhmmssfff").ToString() + ".jpg";
// FileStream fs = new FileStream(filepath + filename, FileMode.OpenOrCreate, FileAccess.Write);
// image.Save(fs, System.Drawing.Imaging.ImageFormat.Jpeg);
// fs.Close();
// image.Dispose();
// imageUrl = UploadFileService.WelderQRCodeImageFilePath + filename;
// }
// return imageUrl;
//}
/// <summary>
///
/// </summary>
/// <returns></returns>
public static bool isHaveImage(string url)
{
string filepath = Funs.RootPath + url;
return File.Exists(filepath);
}
}
}
+1 -1
View File
@@ -14,7 +14,7 @@ namespace BLL.Common
{
public class OpenAIhelper
{
private const string ApiKey = "sk-a5014a22a49049d1b2179a6c0d8eec1c";
private const string ApiKey = "sk-8bfd57eaf2c7438388ec584ac86dfb34";
private const string AIURL = "https://api.deepseek.com/chat/completions";
public static string ChatCompletion(string content)
@@ -1358,5 +1358,163 @@ namespace BLL
&& (y.JOTY_Name.Contains("支管连接焊缝") || y.JOTY_Name.Contains("角焊缝"))
select x).ToList();
}
public static string ConvertJointCodeString(string jotIdList)
{
string name = string.Empty;
string[] list = jotIdList.Split(',');
foreach (var item in list)
{
if (!string.IsNullOrEmpty(item))
{
name += GetJointInfoByJotID(item).JOT_JointNo + ",";
}
}
if (!string.IsNullOrEmpty(name))
{
name = name.Substring(0, name.LastIndexOf(","));
}
return name;
}
/// <summary>
/// 根据焊口Id获取焊口信息
/// </summary>
/// <param name="jot_id"></param>
/// <returns></returns>
public static Model.HJGL_SpRpWeldReportItem GetJointItemByJotID(string jot_id)
{
Model.HJGL_SpRpWeldReportItem newWeldReportItem = new Model.HJGL_SpRpWeldReportItem();
Model.SGGLDB db = Funs.DB;
var jotInfo = db.HJGL_PW_JointInfo.FirstOrDefault(e => e.JOT_ID == jot_id);
var jotView = db.HJGL_View_JointInfo.FirstOrDefault(e => e.JOT_ID == jot_id);
newWeldReportItem.JOT_ID = jotInfo.JOT_ID;
newWeldReportItem.JOT_JointNo = jotInfo.JOT_JointNo;
newWeldReportItem.ProjectId = jotInfo.ProjectId;
var isoInfo = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByIsoInfoId(jotInfo.ISO_ID);
if (isoInfo != null)
{
newWeldReportItem.ISO_IsoNo = isoInfo.ISO_IsoNo;
newWeldReportItem.ISO_Id = isoInfo.ISO_ID;
}
if (jotInfo.WLO_Code == "F")
{
newWeldReportItem.WLO_CodeName = "现场安装";
newWeldReportItem.WLO_CodeID = "F";
}
else
{
newWeldReportItem.WLO_CodeName = "预制";
newWeldReportItem.WLO_CodeID = "S";
}
newWeldReportItem.JOT_JointAttribute = jotInfo.JOT_JointAttribute;
string steName = string.Empty;
if (jotView.STE_Name1 != null && jotView.STE_Name2 != null && jotView.STE_Name1 != jotView.STE_Name2)
{
steName = jotView.STE_Name1 + "/" + jotView.STE_Name2;
}
else if (jotView.STE_Name1 != null)
{
steName = jotView.STE_Name1;
}
else if (jotView.STE_Name2 != null)
{
steName = jotView.STE_Name2;
}
newWeldReportItem.STE_Code = steName;
var joty = BLL.HJGL_WeldService.GetJointTypeByID(jotInfo.JOTY_ID);
newWeldReportItem.JOTY_Group = joty.JOTY_Group;
if (jotInfo.JOT_JointAttribute == "固定")
{
if (joty != null && (joty.JOTY_Group == "2" || joty.JOTY_Group == "3"))
{
newWeldReportItem.JOT_Location = "5F";
}
else if (joty != null && joty.JOTY_Group == "1")
{
newWeldReportItem.JOT_Location = "2G";
}
else
{
newWeldReportItem.JOT_Location = "5G";
}
}
else
{
if (joty != null && (joty.JOTY_Group == "2" || joty.JOTY_Group == "3"))
{
newWeldReportItem.JOT_Location = "1F";
}
else
{
newWeldReportItem.JOT_Location = "1G";
}
}
newWeldReportItem.JOT_Size = jotInfo.JOT_Size;
newWeldReportItem.JOT_DoneDin = jotInfo.JOT_Size;
newWeldReportItem.JOT_Dia = jotInfo.JOT_Dia;
newWeldReportItem.JOT_Sch = jotInfo.JOT_Sch;
if (!string.IsNullOrEmpty(jotInfo.JOT_CellWelder)) //盖面焊工
{
var cellWelder = BLL.HJGL_PersonManageService.GetWelderByWenId(jotInfo.JOT_CellWelder);
if (cellWelder != null)
{
newWeldReportItem.JOT_CellWelderID = cellWelder.WED_ID;
newWeldReportItem.JOT_CellWelderCode = cellWelder.WED_Name + "(" + cellWelder.WED_Code + ")";
}
}
if (!string.IsNullOrEmpty(jotInfo.JOT_FloorWelder)) //打底焊工
{
var floorWelder = BLL.HJGL_PersonManageService.GetWelderByWenId(jotInfo.JOT_FloorWelder);
if (floorWelder != null)
{
newWeldReportItem.JOT_FloorWelderID = floorWelder.WED_ID;
newWeldReportItem.JOT_FloorWelderCode = floorWelder.WED_Name + "(" + floorWelder.WED_Code + ")";
}
}
if (!string.IsNullOrEmpty(jotInfo.WME_ID))
{
var weldingMethod = BLL.HJGL_WeldingMethodService.GetWeldMethodByWMEID(jotInfo.WME_ID);
if (weldingMethod != null)
{
newWeldReportItem.WME_ID = weldingMethod.WME_ID;
newWeldReportItem.WME_Name = weldingMethod.WME_Name;
}
}
if (!string.IsNullOrEmpty(jotInfo.JOT_WeldMat))
{
//var weldMat = BLL.HJGL_ConsumablesService.getConsumablesByConsumablesId(jotInfo.JOT_WeldMat);
//if (weldMat != null)
//{
// newWeldReportItem.JOT_WeldMat = weldMat.WMT_ID;
// newWeldReportItem.WeldMatCode = weldMat.WMT_MatCode;
//}
var weldMat = (from x in Funs.DB.View_WeldInfoDropDownLists where x.WeldId == jotInfo.JOT_WeldMat select x).FirstOrDefault();
if (weldMat != null)
{
newWeldReportItem.JOT_WeldMat = weldMat.WeldId;
newWeldReportItem.WeldMatCode = weldMat.WeldName;
}
}
if (!string.IsNullOrEmpty(jotInfo.JOT_WeldSilk))
{
//var weldSilk = BLL.HJGL_ConsumablesService.getConsumablesByConsumablesId(jotInfo.JOT_WeldSilk);
//if (weldSilk != null)
//{
// newWeldReportItem.JOT_WeldSilk = weldSilk.WMT_ID;
// newWeldReportItem.WeldSilkCode = weldSilk.WMT_MatCode;
//}
var weldSilk = Funs.DB.View_WeldInfoDropDownLists.FirstOrDefault(x => x.WeldId == jotInfo.JOT_WeldSilk);
if (weldSilk != null)
{
newWeldReportItem.JOT_WeldSilk = weldSilk.WeldId;
newWeldReportItem.WeldSilkCode = weldSilk.WeldName;
}
}
return newWeldReportItem;
}
}
}
+1
View File
@@ -5,4 +5,5 @@
<package id="Portable.BouncyCastle" version="1.8.9" targetFramework="net461" />
<package id="SharpZipLib" version="1.3.2" targetFramework="net461" />
<package id="System.Runtime.Caching" version="4.7.0" targetFramework="net461" />
<package id="ThoughtWorks.QRCode" version="1.1.0" targetFramework="net461" />
</packages>
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="11/19/2024 10:28:42" ReportInfo.Modified="04/22/2026 23:14:16" ReportInfo.CreatorVersion="2017.1.16.0">
<Report ScriptLanguage="CSharp" ReportInfo.Created="11/19/2024 10:28:42" ReportInfo.Modified="07/23/2026 19:28:42" ReportInfo.CreatorVersion="2017.1.16.0">
<ScriptText>using System;
using System.Collections;
using System.Collections.Generic;
@@ -50,7 +50,7 @@ namespace FastReport
}
</ScriptText>
<Dictionary>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqtRsOalcXxDhVt62rPEPNYjaATUoMqziRYvJtgNsyJKYAG7kXKvNAMI/qBkgJNPccFsWrhiII6oyX1HS+uwN7YigxVjqUq3vIet2zpPnmWhwvYEvWOOCZZGx6EC4BfGfWX8aPj6bmoF52Z0fnUA9g71duxa/gvChTW/nzu9qsYVuvlVHliMnnu6jEIF9n+/QFRLE3fVb1N0D74ri9q0f0Mg==">
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqIE9zJk/8ULeif4RkZkc80GGytRKlih6tUb0L9Ix0XxfOkXblDHhJG+c8otk7BlkSXigt3h2g8s66LhIA2ej5V44GYDoQsZgDhuvJvrZR+uQhqC/56EHhLH7CmIDKiHpAT83DQaORI7+jJbMhSO9ZCfX4/FxSqRvztAdyM/nMHc8AZlzGidIBKhyWKxYvdUb4uxzlKFoLiFIBFlnPfQ8yK+Exc+GofX+VLIPk0qmGxwQ=">
<TableDataSource Name="Data" DataType="System.Int32" PropName="Attach_Image" Enabled="true" TableName="Data">
<Column Name="ISO_IsoNo" DataType="System.String" PropName="attach_image_id"/>
<Column Name="JOT_JointNo" DataType="System.String" PropName="image_series"/>
@@ -84,7 +84,7 @@ namespace FastReport
<TableRow Name="Row1" Height="67.28">
<TableCell Name="Cell1" Border.Lines="All" Text="SH/T 3503-J415-1" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt" ColSpan="2" RowSpan="2"/>
<TableCell Name="Cell2" Border.Lines="All"/>
<TableCell Name="Cell3" Border.Lines="All" BeforePrintEvent="Cell3_BeforePrint" Text="管道焊接工作记录[header]" HorzAlign="Center" VertAlign="Center" Font="思源宋体 CN, 16pt, style=Bold" ColSpan="6" RowSpan="2"/>
<TableCell Name="Cell3" Border.Lines="All" BeforePrintEvent="Cell3_BeforePrint" Text="管道焊接工作记录[header]" HorzAlign="Center" VertAlign="Center" Font="Microsoft Sans Serif, 16pt, style=Bold" ColSpan="6" RowSpan="2"/>
<TableCell Name="Cell4" Border.Lines="All"/>
<TableCell Name="Cell5" Border.Lines="All"/>
<TableCell Name="Cell26" Border.Lines="All"/>
File diff suppressed because one or more lines are too long
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 879 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

@@ -58,6 +58,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
<PreferNativeArm64>false</PreferNativeArm64>
</PropertyGroup>
<ItemGroup>
<Reference Include="Aspose.Words, Version=21.8.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56, processorArchitecture=MSIL">
@@ -1304,6 +1305,7 @@
<Content Include="HJGL\TrustManage\TrustManageItemEdit.aspx" />
<Content Include="HJGL\WeldingManage\CompleteReportDateEdit.aspx" />
<Content Include="HJGL\WeldingManage\DetectionPoint.aspx" />
<Content Include="HJGL\WeldingManage\JointInfoBatchModity.aspx" />
<Content Include="HJGL\WeldingManage\JointInfoBatchUpdate.aspx" />
<Content Include="HJGL\WeldingManage\JointInfoCopy.aspx" />
<Content Include="HJGL\WeldingManage\JointInfoOut.aspx" />
@@ -6476,6 +6478,13 @@
<Compile Include="HJGL\WeldingManage\DetectionPoint.aspx.designer.cs">
<DependentUpon>DetectionPoint.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\WeldingManage\JointInfoBatchModity.aspx.cs">
<DependentUpon>JointInfoBatchModity.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="HJGL\WeldingManage\JointInfoBatchModity.aspx.designer.cs">
<DependentUpon>JointInfoBatchModity.aspx</DependentUpon>
</Compile>
<Compile Include="HJGL\WeldingManage\JointInfoBatchUpdate.aspx.cs">
<DependentUpon>JointInfoBatchUpdate.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<UseIISExpress>true</UseIISExpress>
@@ -36,6 +36,7 @@
<f:FileUpload ID="FileExcel" runat="server" Label="数据文件" EmptyText="请上传EXCEl格式文件" Width="400px" LabelWidth="70px"></f:FileUpload>
<f:Button ID="btnAudit" runat="server" Text="审核" ToolTip="文件审核!" OnClick="btnAudit_Click"></f:Button>
<f:Button ID="imgbtnImport" runat="server" Text="上传" ToolTip="文件上传!" OnClick="imgbtnImport_Click"></f:Button>
<f:CheckBox ID="cbUpdateIn" runat="server" Text="更新导入"></f:CheckBox>
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
<f:Button ID="imgbtnUpload" runat="server" Icon="DiskDownload" Text="模板下载" OnClick="imgbtnUpload_Click" EnableAjaxLoading="false"></f:Button>
<f:HiddenField ID="hdFileName" runat="server">
@@ -1,4 +1,8 @@
using System;
using BLL;
using FastReport.Utils;
using NPOI.POIFS.Crypt.Dsig;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
@@ -8,7 +12,6 @@ using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
namespace FineUIPro.Web.HJGL.DataIn
{
public partial class JointIn : PageBase
@@ -607,7 +610,7 @@ namespace FineUIPro.Web.HJGL.DataIn
if (getProject != null && getPWisInfo != null)
{
var getJoint = Funs.DB.HJGL_PW_JointInfo.FirstOrDefault(x => x.ProjectId == getProject.ProjectId && x.ISO_ID == getPWisInfo.ISO_ID && x.JOT_JointNo == col2);
if (getJoint != null)
if (getJoint != null && this.cbUpdateIn.Checked == false)
{
result += "第" + (i + 2).ToString() + "行," + "该焊口已存在" + "\n";
}
@@ -940,7 +943,56 @@ namespace FineUIPro.Web.HJGL.DataIn
}
else
{
result += "第" + (i + 2).ToString() + "行," + "该焊口已存在" + "\n";
if (this.cbUpdateIn.Checked)
{
newJointInfo.JOT_JointNo = col2;
if (col8 == "固定")
{
if (newJointInfo.JOT_JointNo.Last() != 'G')
{
newJointInfo.JOT_JointNo = newJointInfo.JOT_JointNo + "G";
}
}
if (newJointInfo.IsGold == true)
{
if (newJointInfo.JOT_JointNo.Last() != 'H')
{
newJointInfo.JOT_JointNo = newJointInfo.JOT_JointNo + "H";
}
}
newJointInfo.JOT_ID = getJoint.JOT_ID;
BLL.HJGL_PW_JointInfoService.UpdateJointInfo(newJointInfo);
// 更新排序字段
string strSort = @"UPDATE dbo.HJGL_PW_JointInfo SET
Sort1=(case when PATINDEX('[A-Z]%',JOT_JointNo)>0 THEN 'B'
WHEN ISNUMERIC(JOT_JointNo)=1 then 'C' ELSE 'C' END),
Sort2=(CASE WHEN ISNUMERIC(JOT_JointNo)=1 then try_cast(REPLACE(JOT_JointNo,'.','') AS INT)
WHEN ISNUMERIC(SUBSTRING(JOT_JointNo,0,CHARINDEX('Z',JOT_JointNo)))=1
THEN TRY_CAST(SUBSTRING(JOT_JointNo,0,CHARINDEX('Z',JOT_JointNo)) as int)
WHEN PATINDEX('[0-9]%',JOT_JointNo)>0 then
TRY_CAST(left(JOT_JointNo,PATINDEX('%[^0-9]%',JOT_JointNo)-1) as int)
ELSE 0 END),
Sort3= SUBSTRING(JOT_JointNo,1,1),
Sort4=(CASE WHEN CHARINDEX('Z',JOT_JointNo)>0 and SUBSTRING(JOT_JointNo,1,1)<>'Z'
THEN ISNULL(TRY_CAST(SUBSTRING(replace(JOT_JointNo,'#',''),2,CHARINDEX('Z',JOT_JointNo)-2) as int),0)
WHEN PATINDEX('%[A-G]%',SUBSTRING(replace(JOT_JointNo,'#',''),2,len(JOT_JointNo)))>0
THEN ISNULL(TRY_CAST(SUBSTRING(JOT_JointNo,2,len(JOT_JointNo)-2) as int),0)
ELSE ISNULL(TRY_CAST(SUBSTRING(replace(JOT_JointNo,'#',''),2,len(JOT_JointNo)) as int),0) END),
Sort5=(CASE WHEN CHARINDEX('Z',JOT_JointNo)>0
THEN ISNULL(TRY_CAST(SUBSTRING(JOT_JointNo,charindex('Z',JOT_JointNo)+1,len(JOT_JointNo)) AS INT),0)
WHEN PATINDEX('%[A-Y]',SUBSTRING(replace(JOT_JointNo,'#',''),2,len(JOT_JointNo)))>0
THEN ISNULL(TRY_CAST(SUBSTRING(JOT_JointNo,2,len(JOT_JointNo)-1) as int),0) ELSE 0 END)
WHERE JOT_ID='" + newJointInfo.JOT_ID + "'";
SQLHelper.ExecutSql(strSort);
//JOT_IDStr += Funs.DB.HJGL_PW_JointInfo.FirstOrDefault(x => x.ProjectId == getProject.ProjectId && x.ISO_ID == getPWisInfo.ISO_ID && x.JOT_JointNo == col2).JOT_ID + ",";
JOT_IDStr += newJointInfo.JOT_ID + ",";
}
else
{
result += "第" + (i + 2).ToString() + "行," + "该焊口已存在" + "\n";
}
}
}
errorInfos += result;
+34 -23
View File
@@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.DataIn {
public partial class JointIn {
namespace FineUIPro.Web.HJGL.DataIn
{
public partial class JointIn
{
/// <summary>
/// Head1 控件。
/// </summary>
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
/// <summary>
/// form1 控件。
/// </summary>
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Toolbar2 控件。
/// </summary>
@@ -65,7 +67,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// FileExcel 控件。
/// </summary>
@@ -74,7 +76,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FileUpload FileExcel;
/// <summary>
/// btnAudit 控件。
/// </summary>
@@ -83,7 +85,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAudit;
/// <summary>
/// imgbtnImport 控件。
/// </summary>
@@ -92,7 +94,16 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button imgbtnImport;
/// <summary>
/// cbUpdateIn 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox cbUpdateIn;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@@ -101,7 +112,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// imgbtnUpload 控件。
/// </summary>
@@ -110,7 +121,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button imgbtnUpload;
/// <summary>
/// hdFileName 控件。
/// </summary>
@@ -119,7 +130,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdFileName;
/// <summary>
/// Grid1 控件。
/// </summary>
@@ -128,7 +139,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
@@ -137,7 +148,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
@@ -146,7 +157,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
@@ -155,7 +166,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
@@ -164,7 +175,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Menu1 控件。
/// </summary>
@@ -173,7 +184,7 @@ namespace FineUIPro.Web.HJGL.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>
@@ -71,15 +71,12 @@
</f:Button>
<f:Button ID="btnBatchAdd" Text="批量增加" ToolTip="批量增加" Icon="TableAdd" runat="server" OnClick="btnBatchAdd_Click">
</f:Button>
<f:Button ID="btnBatchModify" Text="批量修改" ToolTip="批量修改焊口属性" Icon="TableAdd" runat="server" OnClick="btnBatchModify_Click">
<f:Button ID="btnBatchUpdate" Text="批量修改" ToolTip="批量修改焊口信息" Icon="TableAdd" runat="server" OnClick="btnBatchModity_Click">
</f:Button>
<f:Button ID="btnBatchDel" Text="批量删除" ToolTip="批量删除" Icon="Delete" runat="server" OnClick="btnBatchDel_Click">
</f:Button>
<f:Button ID="btnOut" runat="server" Text="导出" ToolTip="导出" Icon="FolderUp" OnClick="btnOut_Click">
</f:Button>
<f:Button ID="btnFileName" Text="文档名" ToolTip="文档名" Icon="TableEdit" runat="server" OnClick="btnFileName_Click">
</f:Button>
<f:HiddenField ID="hdColumn" runat="server"></f:HiddenField>
</Items>
</f:Toolbar>
@@ -95,6 +92,8 @@
<f:Label runat="server" Width="60px"></f:Label>
<f:ToolbarFill ID="ToolbarFill2" runat="server">
</f:ToolbarFill>
<f:Button ID="btnBatchModify" Text="修改焊口属性" ToolTip="批量修改焊口属性" Icon="TableAdd" runat="server" OnClick="btnBatchModify_Click">
</f:Button>
<f:Button ID="btnPrint" Text="焊接记录打印" EnableAjax="false" Icon="Printer" Hidden="true" runat="server" OnClick="btnPrint_Click">
</f:Button>
<f:Button ID="btnPrintNew" Text="焊接记录打印" Icon="Printer" runat="server" OnClick="btnPrintNew_Click">
@@ -102,6 +101,8 @@
<f:Button ID="btnSelectColumn" Text="选择显示列" Icon="ShapesManySelect"
runat="server" OnClick="btnSelectColumn_Click">
</f:Button>
<f:Button ID="btnFileName" Text="文档名" ToolTip="文档名" Icon="TableEdit" runat="server" OnClick="btnFileName_Click">
</f:Button>
<%-- <f:CheckBox ID="ckALL" runat="server" Label="全部" LabelAlign="right" AutoPostBack="true"
OnCheckedChanged="TextBox_TextChanged" Width="100px" LabelWidth="50px">
</f:CheckBox>--%>
@@ -123,6 +124,12 @@
<f:RadioItem Text="全部" Value="0" Selected="true" />
<f:RadioItem Text="合格" Value="1" />
</f:RadioButtonList>
<f:ToolbarFill ID="ToolbarFill3" runat="server"></f:ToolbarFill>
<f:Button ID="btnQR" ToolTip="批量生成二维码" Text="批量生成二维码" Icon="TableRefresh" runat="server" OnClick="btnQR_Click">
</f:Button>
<f:Button ID="btnPrintJoint" Text="打印二维码" Icon="Printer" runat="server"
OnClick="btnPrintJoint_Click">
</f:Button>
</Items>
</f:Toolbar>
<f:Toolbar ID="Toolbar5" Position="Top" runat="server" ToolbarAlign="Left">
@@ -172,8 +179,8 @@
<%--<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center"
TextAlign="Center" />--%>
<f:CheckBoxField ColumnID="ckbIsSelected" Width="80px" RenderAsStaticField="false" TextAlign="Center"
AutoPostBack="true" CommandName="IsSelected" DataField="JOT_ID" HeaderText="选择删除" HeaderTextAlign="Center" Locked="true" />
<f:WindowField ColumnID="JOT_JointNo" HeaderTextAlign="Center" TextAlign="Left" Width="100px"
AutoPostBack="true" CommandName="IsSelected" DataField="JOT_ID" HeaderText="选择修改/删除" HeaderTextAlign="Center" Locked="true" />
<f:WindowField ColumnID="JOT_JointNo" HeaderTextAlign="Center" TextAlign="Left" Width="100px"
WindowID="Window1" HeaderText="焊口代号" DataTextField="JOT_JointNo" DataIFrameUrlFields="JOT_ID"
DataIFrameUrlFormatString="JointInfoEdit.aspx?JOT_ID={0}" Title="焊口代号" ToolTip="着色表示该焊口已热处理或所在批已封,不能删除和修改!"
SortField="JOT_JointNo" Locked="true">
@@ -384,6 +391,10 @@
Target="top" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
Width="800px" Height="650px">
</f:Window>
<f:Window ID="Window10" Title="批量修改焊口信息" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="top" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
Width="1200px" Height="650px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
@@ -28,6 +28,18 @@ namespace FineUIPro.Web.HJGL.WeldingManage
ViewState["ProjectId"] = value;
}
}
public string SelectedType
{
get
{
return (string)ViewState["SelectedType"];
}
set
{
ViewState["SelectedType"] = value;
}
}
/// <summary>
/// 定义集合
@@ -115,6 +127,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
this.Grid1.Columns[35].Hidden = true;
this.Grid1.Columns[36].Hidden = true;
this.Grid1.Columns[37].Hidden = true;
//this.Grid1.Columns[38].Hidden = true;
List<string> columns = column.Split(',').ToList();
foreach (var item in columns)
@@ -1350,7 +1363,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
list.Remove(rowID);
}
}
}
}
}
#endregion
@@ -1364,113 +1377,77 @@ namespace FineUIPro.Web.HJGL.WeldingManage
if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_JointInfoMenuId, Const.BtnDelete))
{
// 第一次点击:只打开复选框
if (this.Grid1.Columns[0].Hidden)
if (this.Grid1.Columns[0].Hidden || SelectedType == "BatchModity")
{
list.Clear();
SelectedType = "Delete";
this.Grid1.Columns[0].Hidden = false;
this.Grid1.Columns[0].HeaderText = "选择删除";
this.BindGrid();
return;
}
if (list.Count == 0)
{
Alert.ShowInTop("请勾选一条记录!", MessageBoxIcon.Warning);
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
bool isShow = true;
if (list.Count > 1)
if (SelectedType == "Delete")
{
isShow = false;
}
string err = string.Empty;
for (int i = 0; i < list.Count; i++)
{
string rowID = list[i];
string content = judgementDelete(rowID, isShow);
if (string.IsNullOrEmpty(content))
bool isShow = true;
if (list.Count > 1)
{
Model.SGGLDB db = Funs.DB;
var hotProessTrustItem = db.HJGL_CH_HotProessTrustItem.FirstOrDefault(x => x.JOT_ID == rowID);
if (hotProessTrustItem != null)
isShow = false;
}
string err = string.Empty;
for (int i = 0; i < list.Count; i++)
{
string rowID = list[i];
string content = judgementDelete(rowID, isShow);
if (string.IsNullOrEmpty(content))
{
db.HJGL_CH_HotProessTrustItem.DeleteOnSubmit(hotProessTrustItem);
Model.SGGLDB db = Funs.DB;
var hotProessTrustItem = db.HJGL_CH_HotProessTrustItem.FirstOrDefault(x => x.JOT_ID == rowID);
if (hotProessTrustItem != null)
{
db.HJGL_CH_HotProessTrustItem.DeleteOnSubmit(hotProessTrustItem);
}
var hotProessItem = db.HJGL_HotProessItem.FirstOrDefault(x => x.JOT_ID == rowID);
if (hotProessItem != null)
{
db.HJGL_HotProessItem.DeleteOnSubmit(hotProessItem);
}
var hotProessResult = db.HJGL_CH_HotProessResult.FirstOrDefault(x => x.JOT_ID == rowID);
if (hotProessResult != null)
{
db.HJGL_CH_HotProessResult.DeleteOnSubmit(hotProessResult);
}
db.SubmitChanges();
BLL.HJGL_BO_BatchDetailService.DeleteBatchDetail(rowID); //删除批明细
BLL.HJGL_PW_JointInfoService.DeleteJointInfo(rowID);
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.ProjectId, this.CurrUser.UserId, "删除焊口信息");
}
var hotProessItem = db.HJGL_HotProessItem.FirstOrDefault(x => x.JOT_ID == rowID);
if (hotProessItem != null)
else
{
db.HJGL_HotProessItem.DeleteOnSubmit(hotProessItem);
err += content;
}
var hotProessResult = db.HJGL_CH_HotProessResult.FirstOrDefault(x => x.JOT_ID == rowID);
if (hotProessResult != null)
{
db.HJGL_CH_HotProessResult.DeleteOnSubmit(hotProessResult);
}
db.SubmitChanges();
BLL.HJGL_BO_BatchDetailService.DeleteBatchDetail(rowID); //删除批明细
BLL.HJGL_PW_JointInfoService.DeleteJointInfo(rowID);
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.ProjectId, this.CurrUser.UserId, "删除焊口信息");
}
list.Clear();
if (string.IsNullOrEmpty(err))
{
Alert.ShowInTop("删除成功!", MessageBoxIcon.Success);
// 删除完成后,恢复按钮状态
this.Grid1.Columns[0].Hidden = true;
SelectedType = string.Empty;
}
else
{
err += content;
Alert.ShowInTop(err, MessageBoxIcon.Warning);
}
}
//if (Grid1.SelectedRowIndexArray.Length == 0)
//{
// Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
// return;
//}
//bool isShow = true;
//if (Grid1.SelectedRowIndexArray.Length > 1)
//{
// isShow = false;
//}
//string err = string.Empty;
//foreach (int rowIndex in Grid1.SelectedRowIndexArray)
//{
// string rowID = Grid1.DataKeys[rowIndex][0].ToString();
// string content = judgementDelete(rowID, isShow);
// if (string.IsNullOrEmpty(content))
// {
// Model.SGGLDB db = Funs.DB;
// var hotProessTrustItem = db.HJGL_CH_HotProessTrustItem.FirstOrDefault(x => x.JOT_ID == rowID);
// if (hotProessTrustItem != null)
// {
// db.HJGL_CH_HotProessTrustItem.DeleteOnSubmit(hotProessTrustItem);
// }
// var hotProessItem = db.HJGL_HotProessItem.FirstOrDefault(x => x.JOT_ID == rowID);
// if (hotProessItem != null)
// {
// db.HJGL_HotProessItem.DeleteOnSubmit(hotProessItem);
// }
// var hotProessResult = db.HJGL_CH_HotProessResult.FirstOrDefault(x => x.JOT_ID == rowID);
// if (hotProessResult != null)
// {
// db.HJGL_CH_HotProessResult.DeleteOnSubmit(hotProessResult);
// }
// db.SubmitChanges();
// BLL.HJGL_BO_BatchDetailService.DeleteBatchDetail(rowID); //删除批明细
// BLL.HJGL_PW_JointInfoService.DeleteJointInfo(rowID);
// BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除焊口信息");
// }
// else
// {
// err += content;
// }
//}
// 删除完成后,恢复按钮状态
this.Grid1.Columns[0].Hidden = true;
list.Clear();
if (string.IsNullOrEmpty(err))
{
Alert.ShowInTop("删除成功!", MessageBoxIcon.Success);
this.BindGrid();
}
else
{
Alert.ShowInTop(err, MessageBoxIcon.Warning);
}
this.BindGrid();
}
else
{
@@ -1503,5 +1480,166 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
}
/// <summary>
/// 批量修改焊口信息
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnBatchModity_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_JointInfoMenuId, Const.BtnModify))
{
// 第一次点击:只打开复选框
if (this.Grid1.Columns[0].Hidden || SelectedType == "Delete")
{
list.Clear();
SelectedType = "BatchModity";
this.Grid1.Columns[0].Hidden = false;
this.Grid1.Columns[0].HeaderText = "选择修改";
this.BindGrid();
return;
}
if (SelectedType == "BatchModity")
{
if (list.Count == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
string jotIdList = string.Join(",", list);
PageContext.RegisterStartupScript(Window10.GetShowReference(String.Format("JointInfoBatchModity.aspx?jotIdList={0}", jotIdList, "批量修改 - ")));
}
//bool isShow = true;
//if (list.Count > 1)
//{
// isShow = false;
//}
//string err = string.Empty;
//for (int i = 0; i < list.Count; i++)
//{
// string rowID = list[i];
// string content = judgementDelete(rowID, isShow);
// if (string.IsNullOrEmpty(content))
// {
// }
//}
//if (Grid1.SelectedRowIndexArray.Length == 0)
//{
// Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning);
// return;
//}
//string jotIdList = string.Join(",", Grid1.SelectedRowIDArray);
//PageContext.RegisterStartupScript(Window10.GetShowReference(String.Format("JointInfoBatchModity.aspx?jotIdList={0}", jotIdList, "批量修改 - ")));
}
else
{
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
/// <summary>
/// 批量生成二维码
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnQR_Click(object sender, EventArgs e)
{
Model.SGGLDB db = Funs.DB;
var p = db.HJGL_PW_IsoInfo.Where(x => x.ISO_ID == this.tvControlItem.SelectedNodeID).FirstOrDefault();
if (p != null)
{
var getJoints = from x in db.HJGL_PW_JointInfo
where x.ProjectId == this.ProjectId && x.ISO_ID == this.tvControlItem.SelectedNodeID
select x;
int num = 0;
if (getJoints.Any())
{
foreach (var item in getJoints)
{
string url = CreateQRCodeService.CreateCode_Simple(item.JOT_ID);
if (!string.IsNullOrEmpty(url))
{
item.QRCodeAttachUrl = url;
num++;
}
}
db.SubmitChanges();
}
ShowNotify("操作完成,新生成二维码" + num.ToString() + "条", MessageBoxIcon.Success);
}
else
{
Alert.ShowInTop("请选择一条管线!", MessageBoxIcon.Warning);
return;
}
}
#region
protected void btnPrintJoint_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
BLL.Common.FastReportService.ResetData();
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
//keyValuePairs.Add("ProjectName", projectName);
BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs);
string strSql = "select * from View_PrintJointInfo where ProjectId=@projectId and ISO_ID =@isoId";
List<SqlParameter> listStr = new List<SqlParameter>
{
new SqlParameter("@projectId", this.CurrUser.LoginProjectId),
new SqlParameter("@isoId", this.tvControlItem.SelectedNodeID),
};
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
DataTable dt = new DataTable();
dt.TableName = "Table1";
dt.Columns.Add("UnitName");
dt.Columns.Add("WorkAreaCode");
dt.Columns.Add("ISO_IsoNo");
dt.Columns.Add("JOT_JointNo");
dt.Columns.Add("JOT_JointDesc");
dt.Columns.Add("STE_Code");
dt.Columns.Add("QRCodeAttachUrl");
DataView dv = tb.DefaultView;//获取表视图
dv.Sort = "JOT_JointNo ASC";//按照ID排序
tb = dv.ToTable();//转为表
DataRow[] rows = tb.DefaultView.ToTable().Select();
foreach (var row in rows)
{
var newRow = dt.NewRow();
newRow["ISO_IsoNo"] = row["ISO_IsoNo"].ToString();
newRow["UnitName"] = row["UnitName"].ToString();
newRow["WorkAreaCode"] = row["InstallationName"].ToString();
newRow["JOT_JointNo"] = row["JOT_JointNo"].ToString();
newRow["JOT_JointDesc"] = row["JOT_JointDesc"].ToString();
newRow["STE_Code"] = row["STE_Code"].ToString();
newRow["QRCodeAttachUrl"] = Funs.RootPath + row["QRCodeAttachUrl"].ToString();
dt.Rows.Add(newRow);
}
BLL.Common.FastReportService.AddFastreportTable(dt);
initTemplatePath = "File\\Fastreport\\焊口打印.frx";
if (File.Exists(rootPath + initTemplatePath))
{
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("../../common/ReportPrint/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
}
}
else
{
Alert.ShowInTop("请选择要打印的管线!", MessageBoxIcon.Warning);
return;
}
}
#endregion
}
}
@@ -195,13 +195,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage
protected global::FineUIPro.Button btnBatchAdd;
/// <summary>
/// btnBatchModify 控件。
/// btnBatchUpdate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnBatchModify;
protected global::FineUIPro.Button btnBatchUpdate;
/// <summary>
/// btnBatchDel 控件。
@@ -221,15 +221,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// </remarks>
protected global::FineUIPro.Button btnOut;
/// <summary>
/// btnFileName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnFileName;
/// <summary>
/// hdColumn 控件。
/// </summary>
@@ -293,6 +284,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill2;
/// <summary>
/// btnBatchModify 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnBatchModify;
/// <summary>
/// btnPrint 控件。
/// </summary>
@@ -320,6 +320,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// </remarks>
protected global::FineUIPro.Button btnSelectColumn;
/// <summary>
/// btnFileName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnFileName;
/// <summary>
/// Toolbar4 控件。
/// </summary>
@@ -356,6 +365,33 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// </remarks>
protected global::FineUIPro.RadioButtonList rbHotProessResult;
/// <summary>
/// ToolbarFill3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill3;
/// <summary>
/// btnQR 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnQR;
/// <summary>
/// btnPrintJoint 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnPrintJoint;
/// <summary>
/// Toolbar5 控件。
/// </summary>
@@ -536,6 +572,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
/// </remarks>
protected global::FineUIPro.Window Window9;
/// <summary>
/// Window10 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window10;
/// <summary>
/// Menu1 控件。
/// </summary>
@@ -0,0 +1,172 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JointInfoBatchModity.aspx.cs" Inherits="FineUIPro.Web.HJGL.WeldingManage.JointInfoBatchModity" %>
<!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>
<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:Form ID="SimpleForm1" ShowBorder="true" ShowHeader="false" AutoScroll="true" BodyPadding="10px"
runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Right">
<Items>
<f:Label ID="txtJointNoS" runat="server" Label="修改的焊口" LabelAlign="Right">
</f:Label>
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="提交" ValidateForms="SimpleForm1"
OnClick="btnSave_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Rows>
<f:FormRow>
<Items>
<f:DropDownList ID="drpInstallationId" Label="装置" runat="server" ShowRedStar="true"
Required="true" EnableEdit="true" LabelWidth="100px">
</f:DropDownList>
<f:DropDownList ID="ddlSTE1" Label="材质1" runat="server" ShowRedStar="true" Required="true"
EnableEdit="true" LabelWidth="100px" AutoPostBack="true" OnSelectedIndexChanged="ddlSTE1_SelectedIndexChanged">
</f:DropDownList>
<f:DropDownList ID="ddlSTE2" Label="材质2" runat="server" EnableEdit="true" LabelWidth="100px">
</f:DropDownList>
<f:DropDownList ID="ddlJOTY_ID" Label="焊缝类型" runat="server" ShowRedStar="true" Required="true"
EnableEdit="true" LabelWidth="100px" AutoPostBack="true" OnSelectedIndexChanged="ddlJOTY_ID_SelectedIndexChanged">
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="ddlJST_ID" Label="坡口类型" runat="server" ShowRedStar="true" Required="true"
EnableEdit="true" LabelWidth="100px">
</f:DropDownList>
<f:DropDownList ID="ddlJointAttribute" Label="焊口属性" runat="server" ShowRedStar="true"
Required="true" EnableEdit="true" LabelWidth="100px" AutoPostBack="true" OnSelectedIndexChanged="ddlJointAttribute_SelectedIndexChanged">
</f:DropDownList>
<f:DropDownList ID="ddlWME_ID" Label="焊接方法" runat="server" ShowRedStar="true" Required="true"
EnableEdit="true" LabelWidth="100px">
</f:DropDownList>
<f:DropDownList ID="ddlWLO_CODE" Label="焊接区域" runat="server" EnableEdit="true" LabelWidth="100px">
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtJointDesc" Label="焊口规格" ShowRedStar="true" Required="true" runat="server"
LabelWidth="100px">
</f:TextBox>
<f:TextBox ID="txtDial" Label="外径" runat="server" LabelWidth="100px" ShowRedStar="true" Required="true" AutoPostBack="true" OnTextChanged="txtDial_TextChanged">
</f:TextBox>
<f:NumberBox ID="txtSch" Label="壁厚" runat="server" LabelWidth="100px" DecimalPrecision="2"
NoNegative="true" ShowRedStar="true" Required="true" AutoPostBack="true" OnTextChanged="txtText_TextChanged">
</f:NumberBox>
<f:NumberBox ID="txtSize" Label="寸径" runat="server" LabelWidth="100px" DecimalPrecision="2"
NoNegative="true" ShowRedStar="true" Required="true">
</f:NumberBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="ddlComponent1" Label="组件1号" runat="server" EnableEdit="true"
LabelWidth="100px">
</f:DropDownList>
<f:DropDownList ID="ddlComponent2" Label="组件2号" runat="server" EnableEdit="true"
LabelWidth="100px">
</f:DropDownList>
<f:NumberBox ID="txtLastTemp" Label="后热温度" runat="server" LabelWidth="100px" DecimalPrecision="4"
NoNegative="true">
</f:NumberBox>
<f:NumberBox ID="txtCellTemp" Label="层间温度" runat="server" LabelWidth="100px" DecimalPrecision="4"
NoNegative="true">
</f:NumberBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:NumberBox ID="txtPrepareTemp" Label="预热温度" runat="server" LabelWidth="100px" DecimalPrecision="4"
NoNegative="true">
</f:NumberBox>
<f:DropDownList ID="ddlWeldSilk" Label="焊丝牌号" runat="server" EnableEdit="true" LabelWidth="100px">
</f:DropDownList>
<f:DropDownList ID="ddlWeldMat" Label="焊条牌号" runat="server" EnableEdit="true" LabelWidth="100px">
</f:DropDownList>
<f:TextBox ID="txtElectricity" Label="焊接电流" runat="server" LabelWidth="100px">
</f:TextBox>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="25% 25% 25% 25%">
<Items>
<f:TextBox ID="txtVoltage" Label="焊接电压" runat="server" LabelWidth="100px">
</f:TextBox>
<f:TextBox ID="txtPressureTestPackageNo" Label="试压包号" runat="server" LabelWidth="100px">
</f:TextBox>
<f:DropDownList ID="drpIS_Proess" Label="是否热处理" runat="server" LabelWidth="100px"
AutoPostBack="true" OnSelectedIndexChanged="drpIS_Proess_SelectedIndexChanged">
<f:ListItem Value="0" Text="否" />
<f:ListItem Value="1" Text="是" />
</f:DropDownList>
<f:DropDownBox runat="server" Label="热处理类型" ID="drpProessTypes" DataControlID="RadioButtonList1"
EnableMultiSelect="true" ShowRedStar="true" LabelAlign="Right"
LabelWidth="100px" Hidden="true">
<PopPanel>
<f:SimpleForm ID="SimpleForm3" BodyPadding="10px" runat="server" AutoScroll="true"
ShowBorder="True" ShowHeader="false" Hidden="true">
<Items>
<f:Label ID="Label10" runat="server" Text="请选择热处理类型:">
</f:Label>
<f:CheckBoxList ID="RadioButtonList1" ColumnNumber="1" runat="server" AutoPostBack="true" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged">
<f:CheckItem Value="1" Text="预热" />
<f:CheckItem Value="2" Text="消氢" />
<f:CheckItem Value="3" Text="后热" />
<f:CheckItem Value="4" Text="消应力热处理" />
<f:CheckItem Value="5" Text="稳定化处理" />
</f:CheckBoxList>
</Items>
</f:SimpleForm>
</PopPanel>
</f:DropDownBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpNDTR_ID" runat="server" Label="探伤比例" LabelWidth="100px" EnableEdit="true" Required="true" ShowRedStar="true">
</f:DropDownList>
<f:DropDownList ID="drpJOT_QualifiedLevel" runat="server" Label="合格等级" LabelWidth="100px" EnableEdit="true" Required="true" ShowRedStar="true">
</f:DropDownList>
<f:DropDownList ID="drpIsGold" Label="是否黄金口" runat="server" LabelWidth="100px"
AutoPostBack="true" OnSelectedIndexChanged="drpIsGold_SelectedIndexChanged">
<f:ListItem Value="0" Text="否" />
<f:ListItem Value="1" Text="是" />
</f:DropDownList>
<f:DropDownList ID="drpIsSpecial" Label="是否特殊" runat="server" LabelWidth="100px">
<f:ListItem Value="0" Text="否" />
<f:ListItem Value="1" Text="是" />
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow ColumnWidths="25% 25% 50%">
<Items>
<f:TextBox ID="txtHardQuaStandard" runat="server" Label="硬度合格标准" LabelWidth="100px"></f:TextBox>
<f:NumberBox ID="txtWeldL" Label="非常规焊缝:L(mm)" runat="server"
AutoPostBack="true" OnTextChanged="txtWeldL_TextChanged" LabelWidth="100px" NoDecimal="true" NoNegative="true">
</f:NumberBox>
<f:Label ID="lbDef" runat="server" Label="备注" Text="非常规焊缝:仅限于支架、横缝、纵缝、环缝等焊口。非上述焊口请保持空白"></f:Label>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtRemark" Label="备注" runat="server" LabelWidth="100px"></f:TextBox>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</form>
</body>
</html>
@@ -0,0 +1,899 @@
using BLL;
using FineUIPro.Web.HJGL.DataIn;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.HJGL.WeldingManage
{
public partial class JointInfoBatchModity : PageBase
{
#region
/// <summary>
/// 管线主键
/// </summary>
private string ISO_ID
{
get
{
return (string)ViewState["ISO_ID"];
}
set
{
ViewState["ISO_ID"] = value;
}
}
#endregion
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
///初始化下拉框
this.LoadDropDownList();
///初始化显示信息
this.LoadShowInfo();
}
}
#region
/// <summary>
/// 加载下拉框
/// </summary>
private void LoadDropDownList()
{
///材质1
this.ddlSTE1.DataTextField = "STE_Code";
this.ddlSTE1.DataValueField = "STE_ID";
this.ddlSTE1.DataSource = BLL.HJGL_MaterialService.GetSteelList();
this.ddlSTE1.DataBind();
Funs.FineUIPleaseSelect(this.ddlSTE1);
///材质2
this.ddlSTE2.DataTextField = "STE_Code";
this.ddlSTE2.DataValueField = "STE_ID";
this.ddlSTE2.DataSource = BLL.HJGL_MaterialService.GetSteelList();
this.ddlSTE2.DataBind();
Funs.FineUIPleaseSelect(this.ddlSTE2);
///焊缝类型
this.ddlJOTY_ID.DataTextField = "JOTY_Name";
this.ddlJOTY_ID.DataValueField = "JOTY_ID";
this.ddlJOTY_ID.DataSource = BLL.HJGL_WeldService.GetJointTypeNameList("2");
this.ddlJOTY_ID.DataBind();
Funs.FineUIPleaseSelect(this.ddlJOTY_ID);
///坡口类型
this.ddlJST_ID.DataTextField = "JST_Name";
this.ddlJST_ID.DataValueField = "JST_ID";
this.ddlJST_ID.DataSource = BLL.HJGL_GrooveService.GetSlopeTypeNameList();
this.ddlJST_ID.DataBind();
Funs.FineUIPleaseSelect(this.ddlJST_ID);
///焊口属性
this.ddlJointAttribute.DataTextField = "Text";
this.ddlJointAttribute.DataValueField = "Value";
this.ddlJointAttribute.DataSource = BLL.DropListService.HJGL_JointAttributeItem();
this.ddlJointAttribute.DataBind();
Funs.FineUIPleaseSelect(this.ddlJointAttribute);
///焊接方法
this.ddlWME_ID.DataTextField = "WME_Name";
this.ddlWME_ID.DataValueField = "WME_ID";
this.ddlWME_ID.DataSource = BLL.HJGL_WeldingMethodService.GetWeldMethodNameList();
this.ddlWME_ID.DataBind();
Funs.FineUIPleaseSelect(this.ddlWME_ID);
///焊接区域
this.ddlWLO_CODE.DataTextField = "Text";
this.ddlWLO_CODE.DataValueField = "Value";
this.ddlWLO_CODE.DataSource = BLL.DropListService.HJGL_WLO_CODEItem();
this.ddlWLO_CODE.DataBind();
Funs.FineUIPleaseSelect(this.ddlWLO_CODE);
///组件1号
this.ddlComponent1.DataTextField = "COM_Name";
this.ddlComponent1.DataValueField = "COM_ID";
this.ddlComponent1.DataSource = BLL.HJGL_ComponentsService.GetComponentNameList();
this.ddlComponent1.DataBind();
Funs.FineUIPleaseSelect(this.ddlComponent1);
///组件2号
this.ddlComponent2.DataTextField = "COM_Name";
this.ddlComponent2.DataValueField = "COM_ID";
this.ddlComponent2.DataSource = BLL.HJGL_ComponentsService.GetComponentNameList();
this.ddlComponent2.DataBind();
Funs.FineUIPleaseSelect(this.ddlComponent2);
///焊丝
this.ddlWeldSilk.DataTextField = "WeldName";
this.ddlWeldSilk.DataValueField = "WeldId";
this.ddlWeldSilk.DataSource = from x in Funs.DB.View_WeldInfoDropDownLists
where x.WeldTypeName.Contains("焊丝")
select x; // BLL.HJGL_ConsumablesService.GetMaterialList("1");
this.ddlWeldSilk.DataBind();
Funs.FineUIPleaseSelect(this.ddlWeldSilk);
///焊条
this.ddlWeldMat.DataTextField = "WeldName";
this.ddlWeldMat.DataValueField = "WeldId";
this.ddlWeldMat.DataSource = from x in Funs.DB.View_WeldInfoDropDownLists
where x.WeldTypeName.Contains("焊条")
select x; //BLL.HJGL_ConsumablesService.GetMaterialList("2");
this.ddlWeldMat.DataBind();
Funs.FineUIPleaseSelect(this.ddlWeldMat);
List<Model.HandleStep> myList = new List<Model.HandleStep>();
myList = BLL.HJGL_PW_JointInfoService.GetProessTypes();
RadioButtonList1.DataTextField = "Name";
RadioButtonList1.DataValueField = "Id";
RadioButtonList1.DataSource = myList;
RadioButtonList1.DataBind();
this.drpInstallationId.DataTextField = "Text";
this.drpInstallationId.DataValueField = "Value";
this.drpInstallationId.DataSource = BLL.Project_InstallationService.GetInstallationList(this.CurrUser.LoginProjectId);
this.drpInstallationId.DataBind();
Funs.FineUIPleaseSelect(this.drpInstallationId);
//探伤比例
this.drpNDTR_ID.DataTextField = "NDTR_Name";
this.drpNDTR_ID.DataValueField = "NDTR_ID";
this.drpNDTR_ID.DataSource = BLL.HJGL_DetectionService.GetNDTRateNameList();
this.drpNDTR_ID.DataBind();
Funs.FineUIPleaseSelect(this.drpNDTR_ID);
//合格等级
this.drpJOT_QualifiedLevel.DataTextField = "Text";
this.drpJOT_QualifiedLevel.DataValueField = "Value";
this.drpJOT_QualifiedLevel.DataSource = BLL.DropListService.HJGL_NDTClassItem();
this.drpJOT_QualifiedLevel.DataBind();
Funs.FineUIPleaseSelect(this.drpJOT_QualifiedLevel);
}
#endregion
#region
/// <summary>
/// 加载页面显示信息
/// </summary>
private void LoadShowInfo()
{
string jotIdStr = Request.Params["jotIdList"];
if (!string.IsNullOrEmpty(jotIdStr))
{
var jotIdList = jotIdStr.Split(',');
txtJointNoS.Text = BLL.HJGL_PW_JointInfoService.ConvertJointCodeString(jotIdStr);
var jointInfo = BLL.HJGL_PW_JointInfoService.GetJointInfoByJotID(jotIdList[0]);
this.ISO_ID = jointInfo.ISO_ID;
if (jointInfo != null)
{
this.txtJointDesc.Text = jointInfo.JOT_JointDesc;
if (!string.IsNullOrEmpty(jointInfo.DReportID))
{
this.drpNDTR_ID.Enabled = false;
this.drpIsGold.Enabled = false;
}
if (!string.IsNullOrEmpty(jointInfo.STE_ID))
{
this.ddlSTE1.SelectedValue = jointInfo.STE_ID;
var ste = BLL.HJGL_MaterialService.GetSteelBySteID(jointInfo.STE_ID);
if (ste != null)
{
this.txtHardQuaStandard.Text = ste.HardQuaStandard;
}
}
if (!string.IsNullOrEmpty(jointInfo.STE_ID2))
{
this.ddlSTE2.SelectedValue = jointInfo.STE_ID2;
}
if (!string.IsNullOrEmpty(jointInfo.JOTY_ID))
{
this.ddlJOTY_ID.SelectedValue = jointInfo.JOTY_ID;
}
if (!string.IsNullOrEmpty(jointInfo.JST_ID))
{
this.ddlJST_ID.SelectedValue = jointInfo.JST_ID;
}
if (!string.IsNullOrEmpty(jointInfo.JOT_JointAttribute))
{
this.ddlJointAttribute.SelectedValue = jointInfo.JOT_JointAttribute;
//if (this.ddlJointAttribute.SelectedValue == "固定")
//{
// if (this.txtJointNo.Text.Trim().Last() != 'G')
// {
// this.txtJointNo.Text = this.txtJointNo.Text.Trim() + "G";
// }
//}
//else
//{
// if (this.txtJointNo.Text.Trim().Last() == 'G')
// {
// this.txtJointNo.Text = this.txtJointNo.Text.Trim().Replace("G", "");
// }
//}
}
if (!string.IsNullOrEmpty(jointInfo.WME_ID))
{
this.ddlWME_ID.SelectedValue = jointInfo.WME_ID;
}
this.txtSize.Text = Convert.ToString(jointInfo.JOT_Size);
this.txtDial.Text = (jointInfo.JOT_Dia ?? 0).ToString("N2");
this.txtSch.Text = jointInfo.JOT_Sch;
if (!string.IsNullOrEmpty(jointInfo.WLO_Code))
{
this.ddlWLO_CODE.SelectedValue = jointInfo.WLO_Code;
}
if (!string.IsNullOrEmpty(jointInfo.JOT_Component1))
{
this.ddlComponent1.SelectedValue = jointInfo.JOT_Component1;
}
if (!string.IsNullOrEmpty(jointInfo.JOT_Component2))
{
this.ddlComponent2.SelectedValue = jointInfo.JOT_Component2;
}
this.txtLastTemp.Text = Convert.ToString(jointInfo.JOT_LastTemp);
this.txtCellTemp.Text = Convert.ToString(jointInfo.JOT_CellTemp);
this.txtPrepareTemp.Text = Convert.ToString(jointInfo.JOT_PrepareTemp);
if (!string.IsNullOrEmpty(jointInfo.JOT_WeldSilk))
{
this.ddlWeldSilk.SelectedValue = jointInfo.JOT_WeldSilk;
}
if (jointInfo.WeldL != null)
{
this.txtWeldL.Text = jointInfo.WeldL.ToString();
}
if (!string.IsNullOrEmpty(jointInfo.JOT_WeldMat))
{
this.ddlWeldMat.SelectedValue = jointInfo.JOT_WeldMat;
}
this.txtElectricity.Text = jointInfo.JOT_Electricity;
this.txtVoltage.Text = jointInfo.JOT_Voltage;
if (!string.IsNullOrEmpty(jointInfo.IS_Proess))
{
this.drpIS_Proess.SelectedValue = jointInfo.IS_Proess;
if (jointInfo.IS_Proess == "1")
{
this.drpProessTypes.Hidden = false;
if (!string.IsNullOrEmpty(jointInfo.ProessTypes))
{
string[] proessTypes = jointInfo.ProessTypes.Split('|');
this.drpProessTypes.Values = proessTypes;
}
}
}
if (jointInfo.IsSpecial == true)
{
this.drpIsSpecial.SelectedValue = "1";
}
else
{
this.drpIsSpecial.SelectedValue = "0";
}
this.txtRemark.Text = jointInfo.JOT_Remark;
if (!string.IsNullOrEmpty(jointInfo.InstallationId))
{
this.drpInstallationId.Items.Clear();
this.drpInstallationId.DataTextField = "Text";
this.drpInstallationId.DataValueField = "Value";
this.drpInstallationId.DataSource = BLL.Project_InstallationService.GetInstallationList(jointInfo.ProjectId);
this.drpInstallationId.DataBind();
Funs.FineUIPleaseSelect(this.drpInstallationId);
this.drpInstallationId.SelectedValue = jointInfo.InstallationId;
}
if (!string.IsNullOrEmpty(jointInfo.NDTR_ID))
{
this.drpNDTR_ID.SelectedValue = jointInfo.NDTR_ID;
}
if (!string.IsNullOrEmpty(jointInfo.JOT_QualifiedLevel))
{
this.drpJOT_QualifiedLevel.SelectedValue = jointInfo.JOT_QualifiedLevel;
}
this.txtPressureTestPackageNo.Text = jointInfo.PressureTestPackageNo;
if (jointInfo.IsGold == true)
{
this.drpIsGold.SelectedValue = "1";
this.drpNDTR_ID.Enabled = false;
}
else
{
this.drpIsGold.SelectedValue = "0";
}
}
}
}
#endregion
#region
/// <summary>
/// 文本框是否可编辑
/// </summary>
/// <param name="readOnly"></param>
private void TextIsReadOnly(bool readOnly)
{
//this.btnSave.Hidden = readOnly;
//this.txtJointNo.Readonly = readOnly;
this.ddlWLO_CODE.Enabled = !readOnly;
this.ddlSTE1.Enabled = !readOnly;
this.ddlSTE2.Enabled = !readOnly;
this.ddlComponent1.Enabled = !readOnly;
this.ddlComponent2.Enabled = !readOnly;
this.txtJointDesc.Readonly = readOnly;
this.ddlJOTY_ID.Enabled = !readOnly;
this.txtSize.Readonly = readOnly;
this.txtDial.Readonly = readOnly;
this.ddlJST_ID.Enabled = !readOnly;
this.txtSch.Readonly = readOnly;
this.txtLastTemp.Readonly = readOnly;
this.txtCellTemp.Readonly = readOnly;
//this.txtPrepareTemp.Readonly = readOnly;
this.ddlJointAttribute.Enabled = !readOnly;
this.ddlWME_ID.Enabled = !readOnly;
this.ddlWeldSilk.Enabled = !readOnly;
this.ddlWeldMat.Enabled = !readOnly;
this.txtElectricity.Readonly = readOnly;
this.txtVoltage.Readonly = readOnly;
this.txtRemark.Readonly = readOnly;
this.drpInstallationId.Enabled = !readOnly;
this.drpNDTR_ID.Enabled = !readOnly;
this.drpJOT_QualifiedLevel.Enabled = !readOnly;
this.drpIsSpecial.Enabled = !readOnly;
this.txtHardQuaStandard.Readonly = readOnly;
this.txtWeldL.Readonly = readOnly;
}
#endregion
#region
/// <summary>
/// 提交按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_JointInfoMenuId, Const.BtnSave))
{
if (this.drpInstallationId.SelectedValue == BLL.Const._Null||string.IsNullOrEmpty(this.drpInstallationId.SelectedValue))
{
Alert.ShowInTop("请选择装置!", MessageBoxIcon.Warning);
return;
}
if (this.ddlSTE1.SelectedValue == BLL.Const._Null || string.IsNullOrEmpty(this.ddlSTE1.SelectedValue))
{
Alert.ShowInTop("请选择材质1", MessageBoxIcon.Warning);
return;
}
if (this.ddlJOTY_ID.SelectedValue == BLL.Const._Null||string.IsNullOrEmpty(this.ddlJOTY_ID.SelectedValue))
{
Alert.ShowInTop("请选择焊缝类型!", MessageBoxIcon.Warning);
return;
}
if (this.ddlJST_ID.SelectedValue == BLL.Const._Null||string.IsNullOrEmpty(this.ddlJST_ID.SelectedValue))
{
Alert.ShowInTop("请选择坡口类型!", MessageBoxIcon.Warning);
return;
}
if (this.ddlJointAttribute.SelectedValue == BLL.Const._Null||string.IsNullOrEmpty(this.ddlJointAttribute.SelectedValue))
{
Alert.ShowInTop("请选择焊口属性!", MessageBoxIcon.Warning);
return;
}
if (this.ddlWME_ID.SelectedValue == BLL.Const._Null||string.IsNullOrEmpty(this.ddlWME_ID.SelectedValue))
{
Alert.ShowInTop("请选择焊接方法!", MessageBoxIcon.Warning);
return;
}
if (this.drpNDTR_ID.SelectedValue == BLL.Const._Null||string.IsNullOrEmpty(this.drpNDTR_ID.SelectedValue))
{
Alert.ShowInTop("请选择探伤比例!", MessageBoxIcon.Warning);
return;
}
if (this.drpJOT_QualifiedLevel.SelectedValue == BLL.Const._Null||string.IsNullOrEmpty(this.drpJOT_QualifiedLevel.SelectedValue))
{
Alert.ShowInTop("请选择合格等级!", MessageBoxIcon.Warning);
return;
}
string jotIdStr = Request.Params["jotIdList"];
if (!string.IsNullOrEmpty(jotIdStr))
{
Model.SGGLDB db = Funs.DB;
var jotIdList = jotIdStr.Split(',');
foreach (var jotId in jotIdList)
{
Model.HJGL_PW_JointInfo newJointInfo = db.HJGL_PW_JointInfo.FirstOrDefault(x => x.JOT_ID == jotId);
var hotItems = from x in BLL.Funs.DB.HJGL_CH_HotProessTrustItem where x.JOT_ID == jotId select x;
var batchDetail = BLL.HJGL_BO_BatchDetailService.GetBatchDetailByJotId(jotId);
if ((batchDetail != null || hotItems.Count() > 0) && this.CurrUser.UserId != BLL.Const.GlyId)
{
newJointInfo.JOT_PrepareTemp = Funs.GetNewDecimal(this.txtPrepareTemp.Text);
newJointInfo.PressureTestPackageNo = this.txtPressureTestPackageNo.Text;
if (this.drpIS_Proess.SelectedValue != BLL.Const._Null)
{
newJointInfo.IS_Proess = this.drpIS_Proess.SelectedValue;
if (this.drpIS_Proess.SelectedValue == "1")
{
if (drpProessTypes.Values.Length > 0)
{
newJointInfo.ProessTypes = String.Join("|", drpProessTypes.Values);
}
else
{
Alert.ShowInTop("请选择热处理类型!", MessageBoxIcon.Warning);
return;
}
}
}
BLL.HJGL_PW_JointInfoService.UpdateJointInfo(newJointInfo);
}
else
{
newJointInfo.JOT_JointDesc = this.txtJointDesc.Text.Trim();
newJointInfo.STE_ID = this.ddlSTE1.SelectedValue;
if (this.ddlSTE2.SelectedValue != BLL.Const._Null)
{
newJointInfo.STE_ID2 = this.ddlSTE2.SelectedValue;
}
newJointInfo.JOTY_ID = this.ddlJOTY_ID.SelectedValue;
newJointInfo.JST_ID = this.ddlJST_ID.SelectedValue;
newJointInfo.JOT_JointAttribute = this.ddlJointAttribute.SelectedValue;
newJointInfo.WME_ID = this.ddlWME_ID.SelectedValue;
newJointInfo.JOT_Size = Funs.GetNewDecimal(this.txtSize.Text);
newJointInfo.JOT_Dia = Funs.GetNewDecimal(this.txtDial.Text);
newJointInfo.JOT_Sch = this.txtSch.Text.Trim();
if (this.ddlWLO_CODE.SelectedValue != BLL.Const._Null)
{
newJointInfo.WLO_Code = this.ddlWLO_CODE.SelectedValue;
}
if (this.ddlComponent1.SelectedValue != BLL.Const._Null)
{
newJointInfo.JOT_Component1 = this.ddlComponent1.SelectedValue;
}
if (this.ddlComponent2.SelectedValue != BLL.Const._Null)
{
newJointInfo.JOT_Component2 = this.ddlComponent2.SelectedValue;
}
newJointInfo.JOT_LastTemp = Funs.GetNewDecimal(this.txtLastTemp.Text);
newJointInfo.JOT_CellTemp = Funs.GetNewDecimal(this.txtCellTemp.Text);
newJointInfo.JOT_PrepareTemp = Funs.GetNewDecimal(this.txtPrepareTemp.Text);
if (this.ddlWeldSilk.SelectedValue != BLL.Const._Null)
{
newJointInfo.JOT_WeldSilk = this.ddlWeldSilk.SelectedValue;
}
if (this.ddlWeldMat.SelectedValue != BLL.Const._Null)
{
newJointInfo.JOT_WeldMat = this.ddlWeldMat.SelectedValue;
}
newJointInfo.JOT_Electricity = this.txtElectricity.Text.Trim();
newJointInfo.JOT_Voltage = this.txtVoltage.Text.Trim();
if (this.drpIS_Proess.SelectedValue != BLL.Const._Null)
{
newJointInfo.IS_Proess = this.drpIS_Proess.SelectedValue;
if (this.drpIS_Proess.SelectedValue == "1")
{
if (drpProessTypes.Values.Length > 0)
{
newJointInfo.ProessTypes = String.Join("|", drpProessTypes.Values);
}
else
{
Alert.ShowInTop("请选择热处理类型!", MessageBoxIcon.Warning);
return;
}
}
}
newJointInfo.JOT_Remark = this.txtRemark.Text;
newJointInfo.PressureTestPackageNo = this.txtPressureTestPackageNo.Text;
newJointInfo.InstallationId = this.drpInstallationId.SelectedValue;
newJointInfo.NDTR_ID = this.drpNDTR_ID.SelectedValue;
newJointInfo.JOT_QualifiedLevel = this.drpJOT_QualifiedLevel.SelectedValue;
if (this.drpIsSpecial.SelectedValue == "1")
{
newJointInfo.IsSpecial = true;
}
else
{
newJointInfo.IsSpecial = false;
}
if (this.drpIsGold.SelectedValue == "1")
{
newJointInfo.IsGold = true;
}
else
{
newJointInfo.IsGold = false;
}
if (!string.IsNullOrEmpty(this.txtWeldL.Text))
{
newJointInfo.WeldL = Convert.ToInt32(this.txtWeldL.Text);
}
newJointInfo.JOT_JointStatus = "100";
newJointInfo.JOT_TrustFlag = "00";
newJointInfo.JOT_CheckFlag = "00";
if (newJointInfo.DReportID != null)
{
BLL.HJGL_PW_JointInfoService.UpdateJointNoAddG(jotId, this.ddlJointAttribute.SelectedValue, Const.BtnModify);
}
var joty = BLL.HJGL_WeldService.GetJointTypeByID(newJointInfo.JOTY_ID);
if (joty != null)
{
var jot = BLL.HJGL_PW_JointInfoService.GetJointInfoByJotID(jotId);
if (jot != null)
{
if (!string.IsNullOrEmpty(jot.JOT_JointNo))
{
if (joty.JOTY_Group == "2")//角焊缝(承插)
{
if (char.IsDigit(jot.JOT_JointNo[0]))
{
newJointInfo.JOT_JointNo = "C" + jot.JOT_JointNo;
}
else
{
newJointInfo.JOT_JointNo = "C" + jot.JOT_JointNo.Substring(1);
}
}
else if (joty.JOTY_Group == "3")//支管连接焊缝
{
if (char.IsDigit(jot.JOT_JointNo[0]))
{
newJointInfo.JOT_JointNo = "D" + jot.JOT_JointNo;
}
else
{
newJointInfo.JOT_JointNo = "D" + jot.JOT_JointNo.Substring(1);
}
}
}
}
}
BLL.HJGL_PW_JointInfoService.UpdateJointInfo(newJointInfo);
//// 更新排序字段
string strSort = @"UPDATE dbo.HJGL_PW_JointInfo SET
Sort1=(case when PATINDEX('[A-Z]%',JOT_JointNo)>0 THEN 'B'
WHEN ISNUMERIC(JOT_JointNo)=1 then 'C' ELSE 'C' END),
Sort2=(CASE WHEN ISNUMERIC(JOT_JointNo)=1 then try_cast(REPLACE(JOT_JointNo,'.','') AS INT)
WHEN ISNUMERIC(SUBSTRING(JOT_JointNo,0,CHARINDEX('Z',JOT_JointNo)))=1
THEN TRY_CAST(SUBSTRING(JOT_JointNo,0,CHARINDEX('Z',JOT_JointNo)) as int)
WHEN PATINDEX('[0-9]%',JOT_JointNo)>0 then
TRY_CAST(left(JOT_JointNo,PATINDEX('%[^0-9]%',JOT_JointNo)-1) as int)
ELSE 0 END),
Sort3= SUBSTRING(JOT_JointNo,1,1),
Sort4=(CASE WHEN CHARINDEX('Z',JOT_JointNo)>0 and SUBSTRING(JOT_JointNo,1,1)<>'Z'
THEN ISNULL(TRY_CAST(SUBSTRING(replace(JOT_JointNo,'#',''),2,CHARINDEX('Z',JOT_JointNo)-2) as int),0)
WHEN PATINDEX('%[A-G]%',SUBSTRING(replace(JOT_JointNo,'#',''),2,len(JOT_JointNo)))>0
THEN ISNULL(TRY_CAST(SUBSTRING(JOT_JointNo,2,len(JOT_JointNo)-2) as int),0)
ELSE ISNULL(TRY_CAST(SUBSTRING(replace(JOT_JointNo,'#',''),2,len(JOT_JointNo)) as int),0) END),
Sort5=(CASE WHEN CHARINDEX('Z',JOT_JointNo)>0
THEN ISNULL(TRY_CAST(SUBSTRING(JOT_JointNo,charindex('Z',JOT_JointNo)+1,len(JOT_JointNo)) AS INT),0)
WHEN PATINDEX('%[A-Y]',SUBSTRING(replace(JOT_JointNo,'#',''),2,len(JOT_JointNo)))>0
THEN ISNULL(TRY_CAST(SUBSTRING(JOT_JointNo,2,len(JOT_JointNo)-1) as int),0) ELSE 0 END)
WHERE JOT_ID='" + jotId+ "'";
SQLHelper.ExecutSql(strSort);
}
}
}
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
ShowNotify("提交成功!", MessageBoxIcon.Success);
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
}
#endregion
#region
/// <summary>
/// 材质1下拉选择事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlSTE1_SelectedIndexChanged(object sender, EventArgs e)
{
if (this.ddlSTE1.SelectedValue != BLL.Const._Null)
{
var ste = BLL.HJGL_MaterialService.GetSteelBySteID(this.ddlSTE1.SelectedValue);
if (ste != null)
{
this.txtHardQuaStandard.Text = ste.HardQuaStandard;
}
else
{
this.txtHardQuaStandard.Text = string.Empty;
}
this.ddlSTE2.SelectedValue = ddlSTE1.SelectedValue;
}
else
{
this.txtHardQuaStandard.Text = string.Empty;
}
}
/// <summary>
/// 焊缝类型下拉选择事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlJOTY_ID_SelectedIndexChanged(object sender, EventArgs e)
{
if (this.ddlJOTY_ID.SelectedValue != BLL.Const._Null)
{
var joty = BLL.HJGL_WeldService.GetJointTypeByID(this.ddlJOTY_ID.SelectedValue);
if (joty != null)
{
var isoInfo = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByIsoInfoId(this.ISO_ID);
if (isoInfo != null)
{
if (joty.JOTY_Group == "1")//对接
{
if (!string.IsNullOrEmpty(isoInfo.Joty_B_Rate))
{
this.drpNDTR_ID.SelectedValue = isoInfo.Joty_B_Rate;
}
else
{
this.drpNDTR_ID.SelectedValue = BLL.Const._Null;
}
if (!string.IsNullOrEmpty(isoInfo.Joty_B_Level))
{
this.drpJOT_QualifiedLevel.SelectedValue = isoInfo.Joty_B_Level;
}
else
{
this.drpJOT_QualifiedLevel.SelectedValue = BLL.Const._Null;
}
}
else if (joty.JOTY_Group == "2")//角焊缝(承插)
{
if (!string.IsNullOrEmpty(isoInfo.Joty_C_Rate))
{
this.drpNDTR_ID.SelectedValue = isoInfo.Joty_C_Rate;
}
else
{
this.drpNDTR_ID.SelectedValue = BLL.Const._Null;
}
if (!string.IsNullOrEmpty(isoInfo.Joty_C_Level))
{
this.drpJOT_QualifiedLevel.SelectedValue = isoInfo.Joty_C_Level;
}
else
{
this.drpJOT_QualifiedLevel.SelectedValue = BLL.Const._Null;
}
//焊口号前自动加C
//string jointNo = this.txtJointNo.Text.Trim();
//if (!string.IsNullOrEmpty(jointNo))
//{
// if (char.IsDigit(jointNo[0]))
// {
// this.txtJointNo.Text = "C" + jointNo;
// }
// else
// {
// this.txtJointNo.Text = "C" + jointNo.Substring(1);
// }
//}
//else
//{
// this.txtJointNo.Text = "C";
//}
}
else if (joty.JOTY_Group == "3")//支管连接焊缝
{
if (!string.IsNullOrEmpty(isoInfo.Joty_D_Rate))
{
this.drpNDTR_ID.SelectedValue = isoInfo.Joty_D_Rate;
}
else
{
this.drpNDTR_ID.SelectedValue = BLL.Const._Null;
}
if (!string.IsNullOrEmpty(isoInfo.Joty_D_Level))
{
this.drpJOT_QualifiedLevel.SelectedValue = isoInfo.Joty_D_Level;
}
else
{
this.drpJOT_QualifiedLevel.SelectedValue = BLL.Const._Null;
}
////焊口号前自动加D
//string jointNo = this.txtJointNo.Text.Trim();
//if (!string.IsNullOrEmpty(jointNo))
//{
// if (char.IsDigit(jointNo[0]))
// {
// this.txtJointNo.Text = "D" + jointNo;
// }
// else
// {
// this.txtJointNo.Text = "D" + jointNo.Substring(1);
// }
//}
//else
//{
// this.txtJointNo.Text = "D";
//}
}
}
}
else
{
this.drpNDTR_ID.SelectedValue = BLL.Const._Null;
this.drpJOT_QualifiedLevel.SelectedValue = BLL.Const._Null;
}
}
else
{
this.drpNDTR_ID.SelectedValue = BLL.Const._Null;
this.drpJOT_QualifiedLevel.SelectedValue = BLL.Const._Null;
}
}
/// <summary>
/// 焊工属性下拉选择事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlJointAttribute_SelectedIndexChanged(object sender, EventArgs e)
{
//if (this.ddlJointAttribute.SelectedValue == "固定")
//{
//if (this.txtJointNo.Text.Trim().Last() != 'G')
//{
// this.txtJointNo.Text = this.txtJointNo.Text.Trim() + "G";
//}
//}
//else
//{
//if (this.txtJointNo.Text.Trim().Last() == 'G')
//{
// this.txtJointNo.Text = this.txtJointNo.Text.Trim().Replace("G", "");
//}
//}
}
/// <summary>
/// 根据寸经外径对照表,输入外径是自动得到寸径;焊口规格:Φ外径*壁厚
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void txtText_TextChanged(object sender, EventArgs e)
{
//根据寸经外径对照表,输入外径是自动得到寸径
if (!string.IsNullOrEmpty(this.txtDial.Text.Trim()))
{
decimal dia = Funs.GetNewDecimalOrZero(this.txtDial.Text.Trim());
if (dia >= 500)
{
this.drpIsSpecial.SelectedValue = "1";
}
var inch = HJGL_ControlService.GetSizeByDia(dia);
if (inch != null)
{
this.txtSize.Text = Convert.ToString(inch);
}
}
//焊口规格:Φ外径*壁厚
if (!string.IsNullOrEmpty(this.txtDial.Text.Trim()) && !string.IsNullOrEmpty(this.txtSch.Text.Trim()))
{
this.txtJointDesc.Text = "Φ" + this.txtDial.Text.Trim() + "×" + this.txtSch.Text.Trim();
}
}
/// <summary>
/// 是否显示热处理类型
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void drpIS_Proess_SelectedIndexChanged(object sender, EventArgs e)
{
if (this.drpIS_Proess.SelectedValue == "1")
{
this.drpProessTypes.Hidden = false;
}
else
{
this.drpProessTypes.Hidden = true;
}
}
/// <summary>
/// 热处理类型选择变化事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
{
string jotIdStr = Request.Params["jotIdList"];
var jotIdList = jotIdStr.Split(',');
//已委托的热处理类型
var isTrustProessTypes = from x in BLL.Funs.DB.HJGL_CH_HotProessTrustItem where x.JOT_ID == jotIdList[0] select x.ProessTypes;
if (drpProessTypes.Values.Length > 0)
{
List<string> strs = this.RadioButtonList1.SelectedValueArray.ToList();
foreach (var isTrustProessType in isTrustProessTypes) //已委托的热处理类型不能去除
{
if (!strs.Contains(isTrustProessType))
{
strs.Add(isTrustProessType);
}
}
this.RadioButtonList1.SelectedValueArray = strs.ToArray();
this.drpProessTypes.Values = strs.ToArray();
string proessTypes = String.Join("|", drpProessTypes.Values);
this.drpProessTypes.Text = BLL.HJGL_PW_JointInfoService.ConvertProessTypes(proessTypes);
}
else
{
Alert.ShowInTop("请选择热处理类型!", MessageBoxIcon.Warning);
return;
}
}
protected void drpIsGold_SelectedIndexChanged(object sender, EventArgs e)
{
//var jotIdList = jotIdStr.Split(',');
//foreach (var item in jotIdList)
//{
if (this.drpIsGold.SelectedValue == "1")
{
this.drpNDTR_ID.SelectedValue = "e2612188-fc99-492a-937c-74c7a0151656"; //黄金口检测比例100%
this.drpNDTR_ID.Enabled = false;
//this.txtJointNoPrix.Text =BLL.HJGL_PW_JointInfoService.GetJointInfoByJotID(item).JOT_JointNo + "H";
}
else
{
this.drpNDTR_ID.SelectedValue = BLL.Const._Null;
this.drpNDTR_ID.Enabled = true;
//string jotNo= BLL.HJGL_PW_JointInfoService.GetJointInfoByJotID(item).JOT_JointNo;
//this.txtJointNo.Text = this.txtJointNo.Text.Trim().Substring(0, this.txtJointNo.Text.Trim().Length - 1);
}
//}
}
/// <summary>
/// 外径输入事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void txtDial_TextChanged(object sender, EventArgs e)
{
//根据寸经外径对照表,输入外径是自动得到寸径
if (!string.IsNullOrEmpty(this.txtDial.Text.Trim()))
{
decimal dia = Funs.GetNewDecimalOrZero(this.txtDial.Text.Trim());
if (dia >= 500)
{
this.drpIsSpecial.SelectedValue = "1";
}
var inch = HJGL_ControlService.GetSizeByDia(dia);
if (inch != null)
{
this.txtSize.Text = Convert.ToString(inch);
}
}
//焊口规格:Φ外径*壁厚
if (!string.IsNullOrEmpty(this.txtDial.Text.Trim()) && !string.IsNullOrEmpty(this.txtSch.Text.Trim()))
{
this.txtJointDesc.Text = "Φ" + this.txtDial.Text.Trim() + "×" + this.txtSch.Text.Trim();
}
}
// 非常规焊缝
protected void txtWeldL_TextChanged(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.txtWeldL.Text.Trim()))
{
this.txtJointDesc.Text = "L=" + this.txtWeldL.Text.Trim() + "×" + this.txtSch.Text.Trim();
}
}
#endregion
}
}
@@ -0,0 +1,395 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.WeldingManage
{
public partial class JointInfoBatchModity
{
/// <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>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtJointNoS 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label txtJointNoS;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// drpInstallationId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpInstallationId;
/// <summary>
/// ddlSTE1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlSTE1;
/// <summary>
/// ddlSTE2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlSTE2;
/// <summary>
/// ddlJOTY_ID 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlJOTY_ID;
/// <summary>
/// ddlJST_ID 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlJST_ID;
/// <summary>
/// ddlJointAttribute 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlJointAttribute;
/// <summary>
/// ddlWME_ID 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlWME_ID;
/// <summary>
/// ddlWLO_CODE 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlWLO_CODE;
/// <summary>
/// txtJointDesc 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtJointDesc;
/// <summary>
/// txtDial 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtDial;
/// <summary>
/// txtSch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtSch;
/// <summary>
/// txtSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtSize;
/// <summary>
/// ddlComponent1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlComponent1;
/// <summary>
/// ddlComponent2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlComponent2;
/// <summary>
/// txtLastTemp 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtLastTemp;
/// <summary>
/// txtCellTemp 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtCellTemp;
/// <summary>
/// txtPrepareTemp 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtPrepareTemp;
/// <summary>
/// ddlWeldSilk 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlWeldSilk;
/// <summary>
/// ddlWeldMat 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlWeldMat;
/// <summary>
/// txtElectricity 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtElectricity;
/// <summary>
/// txtVoltage 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtVoltage;
/// <summary>
/// txtPressureTestPackageNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPressureTestPackageNo;
/// <summary>
/// drpIS_Proess 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpIS_Proess;
/// <summary>
/// drpProessTypes 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownBox drpProessTypes;
/// <summary>
/// SimpleForm3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.SimpleForm SimpleForm3;
/// <summary>
/// Label10 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label10;
/// <summary>
/// RadioButtonList1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBoxList RadioButtonList1;
/// <summary>
/// drpNDTR_ID 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpNDTR_ID;
/// <summary>
/// drpJOT_QualifiedLevel 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpJOT_QualifiedLevel;
/// <summary>
/// drpIsGold 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpIsGold;
/// <summary>
/// drpIsSpecial 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpIsSpecial;
/// <summary>
/// txtHardQuaStandard 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtHardQuaStandard;
/// <summary>
/// txtWeldL 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtWeldL;
/// <summary>
/// lbDef 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label lbDef;
/// <summary>
/// txtRemark 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtRemark;
}
}
@@ -22,6 +22,9 @@
<Items>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnOut2" OnClick="btnOut2_Click" runat="server" Text="按导入模板导出" Icon="Accept"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出EXCEL" Icon="Accept"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
@@ -1,11 +1,16 @@
namespace FineUIPro.Web.HJGL.WeldingManage
{
using BLL;
using FastReport.DevComponents.DotNetBar;
using Model;
using NPOI.SS.UserModel;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Text;
using BLL;
using AspNet = System.Web.UI.WebControls;
public partial class JointInfoOut : PageBase
@@ -19,7 +24,7 @@
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
{
this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格
this.BindGrid();
@@ -43,14 +48,14 @@
// strSql += " AND COM_Code LIKE @COM_Code";
// listStr.Add(new SqlParameter("@COM_Code", "%" + this.txtCode.Text.Trim() + "%"));
//}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
// 2.获取当前分页数据
//var table = this.GetPagedDataTable(Grid1, tb1);
Grid1.RecordCount = tb.Rows.Count;
tb = GetFilteredTable(Grid1.FilteredData, tb);
//tb = GetFilteredTable(Grid1.FilteredData, tb);
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
@@ -168,6 +173,259 @@
return sb.ToString();
}
#endregion
#endregion
#region
/// <summary>
/// 按导入模板导出
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnOut2_Click(object sender, EventArgs e)
{
string rootPath = Server.MapPath("~/");
string initTemplatePath = Const.JointInTemplateUrl;
string uploadfilepath = string.Empty;
string newUrl = string.Empty;
uploadfilepath = rootPath + initTemplatePath;
string isoId = Request.QueryString["ISO_ID"] ?? string.Empty;
if (!string.IsNullOrEmpty(isoId))
{
var lists = from x in Funs.DB.HJGL_View_JointInfo
where x.ISO_ID == isoId
select x;
lists = lists.OrderBy(x => x.JOTY_Group).OrderBy(x => x.Sort1).OrderBy(x => x.Sort2).OrderBy(x => x.Sort3).OrderBy(x => x.Sort4).OrderBy(x => x.Sort5);
if (lists != null)
{
newUrl = uploadfilepath.Replace("焊口信息导入模板", "焊口信息");
if (File.Exists(newUrl))
{
File.Delete(newUrl);
}
File.Copy(uploadfilepath, newUrl);
// 第一步:读取文件流
NPOI.SS.UserModel.IWorkbook workbook;
using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
{
//workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream);
}
// 创建单元格样式
NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle();
cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
cellStyle.WrapText = true;//自动换行
var font = workbook.CreateFont();
font.FontHeightInPoints = 11;
cellStyle.SetFont(font);
// 第二步:创建新数据行
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
NPOI.SS.UserModel.ICell cell;
int i = 1;
foreach (var item in lists)
{
// 第二步:创建新数据行
row = sheet.CreateRow(i);
// 添加数据
//施工号
cell = row.CreateCell(0);
cell.CellStyle = cellStyle;
string proCode = string.Empty;
var pro = BLL.Base_ProjectService.GetProjectByProjectId(item.ProjectId);
if (pro != null)
{
proCode = pro.ProjectCode;
}
cell.SetCellValue(proCode);
//管线号
cell = row.CreateCell(1);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.ISO_IsoNo);
//焊口号
cell = row.CreateCell(2);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.JOT_JointNo);
//装置
cell = row.CreateCell(3);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.InstallationName);
//材质一
cell = row.CreateCell(4);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.STE_Name1);
//材质二
cell = row.CreateCell(5);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.STE_Name2);
//焊缝类型
cell = row.CreateCell(6);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.JOTY_Name);
//坡口类型
cell = row.CreateCell(7);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.JST_Name);
//焊口属性
cell = row.CreateCell(8);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.JOT_JointAttribute);
//焊接方法
cell = row.CreateCell(9);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.WME_Name);
//外径
cell = row.CreateCell(10);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.JOT_Dia.HasValue ? item.JOT_Dia.ToString() : "");
//壁厚
cell = row.CreateCell(11);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.JOT_Sch);
//寸径
cell = row.CreateCell(12);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.JOT_Size.HasValue?item.JOT_Size.ToString():"");
//焊接区域
cell = row.CreateCell(13);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.WLO_Code == "F" ? "安装" : "预制");
//组件一
cell = row.CreateCell(14);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.Component1);
//组件二
cell = row.CreateCell(15);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.Component2);
//后热温度
cell = row.CreateCell(16);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.JOT_LastTemp.HasValue ? item.JOT_LastTemp.ToString() : "");
//层间温度
cell = row.CreateCell(17);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.JOT_CellTemp.HasValue ? item.JOT_CellTemp.ToString() : "");
//预热温度
cell = row.CreateCell(18);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.JOT_PrepareTemp.HasValue ? item.JOT_PrepareTemp.ToString() : "");
//焊丝
cell = row.CreateCell(19);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.WeldSilk);
//焊条
cell = row.CreateCell(20);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.WeldMat);
//焊接电流
cell = row.CreateCell(21);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.JOT_Electricity);
//焊接电压
cell = row.CreateCell(22);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.JOT_Voltage);
//是否热处理
cell = row.CreateCell(23);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.IS_Proess == "1" ? "是" : "否");
//热处理类型(是否热处理为‘是’时填写 分别为:预热, 消氢, 后热, 消应力热处理,稳定化处理 填写时请用英文逗号隔开)
cell = row.CreateCell(24);
cell.CellStyle = cellStyle;
string proessTypes = string.Empty;
if (!string.IsNullOrEmpty(item.ProessTypes))
{
foreach (var t in item.ProessTypes.Split('|'))
{
if (t == "1")
{
proessTypes += "预热,";
}
else if (t == "2")
{
proessTypes += "消氢,";
}
else if (t == "3")
{
proessTypes += "后热,";
}
else if (t == "4")
{
proessTypes += "消应力热处理,";
}
else if (t == "5")
{
proessTypes += "稳定化处理,";
}
}
if (!string.IsNullOrEmpty(proessTypes))
{
proessTypes = proessTypes.Substring(0, proessTypes.LastIndexOf(","));
}
}
cell.SetCellValue(proessTypes);
//是否特殊
cell = row.CreateCell(25);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.IsSpecial == true ? "是" : "否");
//探伤比例
cell = row.CreateCell(26);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.NDTR_Name);
//合格等级
cell = row.CreateCell(27);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.JOT_QualifiedLevel);
//硬度合格标准
cell = row.CreateCell(28);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.HardQuaStandard);
//非常焊缝
cell = row.CreateCell(29);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.WeldL.HasValue ? item.WeldL.ToString() : "");
//黄金口(是 / 否)
cell = row.CreateCell(30);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.IsGold == true ? "是" : "否");
//备注
cell = row.CreateCell(31);
cell.CellStyle = cellStyle;
cell.SetCellValue(item.JOT_Remark);
i++;
}
// 第三步:写入文件流
using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write))
{
workbook.Write(stream);
workbook.Close();
}
string fileName = Path.GetFileName(newUrl);
FileInfo info = new FileInfo(newUrl);
long fileSize = info.Length;
Response.Clear();
Response.ContentType = "application/x-zip-compressed";
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
Response.AddHeader("Content-Length", fileSize.ToString());
Response.TransmitFile(newUrl, 0, fileSize);
Response.Flush();
Response.Close();
File.Delete(newUrl);
}
else
{
Alert.ShowInTop("当前无记录,无法导出!", MessageBoxIcon.Warning);
}
}
}
#endregion
}
}
@@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.WeldingManage {
public partial class JointInfoOut {
namespace FineUIPro.Web.HJGL.WeldingManage
{
public partial class JointInfoOut
{
/// <summary>
/// form1 控件。
/// </summary>
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Grid1 控件。
/// </summary>
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar3 控件。
/// </summary>
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar3;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@@ -65,7 +67,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnOut2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnOut2;
/// <summary>
/// btnOut 控件。
/// </summary>
@@ -74,7 +85,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnOut;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
@@ -83,7 +94,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
@@ -92,7 +103,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
@@ -4,107 +4,109 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>焊工焊接检测统计表</title>
<title>焊工焊接检测统计表</title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="RegionPanel1" />
<f:RegionPanel ID="RegionPanel1" ShowBorder="false" runat="server" Margin="5px">
<Regions>
<f:Region ID="Region1" ShowBorder="false" ShowHeader="false" RegionPosition="Top"
BodyPadding="0 5 0 0" Layout="VBox" runat="server" EnableCollapse="true">
<Items>
<f:Form ID="Form2" ShowHeader="false" ShowBorder="false" runat="server" LabelAlign="Right">
<Rows>
<f:FormRow ColumnWidths="30% 30% 24% 8% 8%">
<Items>
<f:DropDownList ID="drpProject" runat="server" LabelWidth="80px" Label="项目" EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="drpProject_OnSelectedIndexChanged">
</f:DropDownList>
<f:DropDownList ID="drpUnit" runat="server" LabelWidth="80px" Label="单位名称" EnableEdit="true"
AutoPostBack="true" OnSelectedIndexChanged="drpUnit_OnSelectedIndexChanged">
</f:DropDownList>
<f:DropDownList ID="drpWloName" runat="server" LabelWidth="80px" Label="焊工" EnableEdit="true">
</f:DropDownList>
<f:Button ID="BtnAnalyse" Text="统计" Icon="ChartPie" runat="server" OnClick="BtnAnalyse_Click"></f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" Icon="TableGo"
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="RegionPanel1" />
<f:RegionPanel ID="RegionPanel1" ShowBorder="false" runat="server" Margin="5px">
<Regions>
<f:Region ID="Region1" ShowBorder="false" ShowHeader="false" RegionPosition="Top"
BodyPadding="0 5 0 0" Layout="VBox" runat="server" EnableCollapse="true">
<Items>
<f:Form ID="Form2" ShowHeader="false" ShowBorder="false" runat="server" LabelAlign="Right">
<Rows>
<f:FormRow ColumnWidths="30% 30% 24% 8% 8%">
<Items>
<f:DropDownList ID="drpProject" runat="server" LabelWidth="80px" Label="项目" EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="drpProject_OnSelectedIndexChanged">
</f:DropDownList>
<f:DropDownList ID="drpUnit" runat="server" LabelWidth="80px" Label="单位名称" EnableEdit="true"
AutoPostBack="true" OnSelectedIndexChanged="drpUnit_OnSelectedIndexChanged">
</f:DropDownList>
<f:DropDownList ID="drpWloName" runat="server" LabelWidth="80px" Label="焊工" EnableEdit="true">
</f:DropDownList>
<f:Button ID="BtnAnalyse" Text="统计" Icon="ChartPie" runat="server" OnClick="BtnAnalyse_Click"></f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" Icon="TableGo"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
</f:Region>
<f:Region ID="Region2" ShowBorder="false" ShowHeader="false" Position="Center" Layout="VBox"
BoxConfigAlign="Stretch" BoxConfigPosition="Left" runat="server">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="焊工焊接检测统计表" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="wed_code" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="wed_code" AllowSorting="true" SortField="wed_code"
SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="15"
OnPageIndexChange="Grid1_PageIndexChange">
<Columns>
<f:TemplateField ColumnID="tfNumber" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center">
<ItemTemplate>
<asp:Label ID="labNumber" runat="server" Text=' <%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1%>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField HeaderText="施工号" ColumnID="ProjectCode" DataField="ProjectCode" SortField="ProjectCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
</f:RenderField>
<f:RenderField HeaderText="焊工代码" ColumnID="wed_code" DataField="wed_code" SortField="wed_code"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
</f:RenderField>
<f:RenderField HeaderText="焊工名称" ColumnID="wed_name" DataField="wed_name" SortField="wed_name"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
</f:RenderField>
<f:RenderField HeaderText="已焊对接焊缝数" ColumnID="ButtJoint" DataField="ButtJoint" SortField="ButtJoint"
FieldType="Int" HeaderTextAlign="Center" TextAlign="Right" Width="140px">
</f:RenderField>
<f:RenderField HeaderText="已委托对接焊缝数" ColumnID="TrustButtJoint" DataField="TrustButtJoint" SortField="TrustButtJoint"
FieldType="Int" HeaderTextAlign="Center" TextAlign="Right" Width="140px">
</f:RenderField>
<f:RenderField HeaderText="对接焊缝检测比例" ColumnID="ButtJointCheckRate" DataField="ButtJointCheckRate" SortField="ButtJointCheckRate"
FieldType="String" HeaderTextAlign="Center" TextAlign="Right" Width="120px" RendererFunction="renderGender">
</f:RenderField>
<f:RenderField HeaderText="已焊固定口数" ColumnID="FixedJoint" DataField="FixedJoint" SortField="FixedJoint"
FieldType="Int" HeaderTextAlign="Center" TextAlign="Right" Width="100px">
</f:RenderField>
<f:RenderField HeaderText="已委托固定口数" ColumnID="TrustFixedJoint" DataField="TrustFixedJoint" SortField="TrustFixedJoint"
FieldType="Int" HeaderTextAlign="Center" TextAlign="Right" Width="120px">
</f:RenderField>
<f:RenderField HeaderText="固定口检测比例" ColumnID="FixedJointCheckRate" DataField="FixedJointCheckRate" SortField="FixedJointCheckRate"
FieldType="String" HeaderTextAlign="Center" TextAlign="Right" Width="140px" RendererFunction="renderGender">
</f:RenderField>
<f:RenderField HeaderText="已焊角焊缝数" ColumnID="FilletJoint" DataField="FilletJoint" SortField="FilletJoint"
FieldType="Int" HeaderTextAlign="Center" TextAlign="Right" Width="120px">
</f:RenderField>
<f:RenderField HeaderText="已委托角焊缝数" ColumnID="TrustFilletJoint" DataField="TrustFilletJoint" SortField="TrustFilletJoint"
FieldType="Int" HeaderTextAlign="Center" TextAlign="Right" Width="140px">
</f:RenderField>
<f:RenderField HeaderText="角焊缝检测比例" ColumnID="FilletJointCheckRate" DataField="FilletJointCheckRate" SortField="FilletJointCheckRate"
FieldType="String" HeaderTextAlign="Center" TextAlign="Right" Width="140px" RendererFunction="renderGender">
</f:RenderField>
</Columns>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="15" Value="15" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
<f:ListItem Text="所有行" Value="1000000" />
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Region>
</Regions>
</f:RegionPanel>
</f:Button>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
</f:Region>
<f:Region ID="Region2" ShowBorder="false" ShowHeader="false" Position="Center" Layout="VBox"
BoxConfigAlign="Stretch" BoxConfigPosition="Left" runat="server">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="焊工焊接检测统计表" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="ProjectWelderId" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="ProjectWelderId" AllowSorting="true" SortField="ProjectCode,wed_code"
SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="15"
OnPageIndexChange="Grid1_PageIndexChange">
<Columns>
<f:TemplateField ColumnID="tfNumber" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center">
<ItemTemplate>
<asp:Label ID="labNumber" runat="server" Text=' <%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1%>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField HeaderText="施工号" ColumnID="ProjectCode" DataField="ProjectCode" SortField="ProjectCode"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
</f:RenderField>
<f:TemplateField ColumnID="tfWelderCode" HeaderText="焊工代码" Width="100px" HeaderTextAlign="Center" TextAlign="Center">
<ItemTemplate>
<asp:Label ID="lblWelderCode" runat="server" Text=' <%# Bind("wed_code") %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField HeaderText="焊工名称" ColumnID="wed_name" DataField="wed_name" SortField="wed_name"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
</f:RenderField>
<f:RenderField HeaderText="已焊对接焊缝数" ColumnID="ButtJoint" DataField="ButtJoint" SortField="ButtJoint"
FieldType="Int" HeaderTextAlign="Center" TextAlign="Right" Width="140px">
</f:RenderField>
<f:RenderField HeaderText="已委托对接焊缝数" ColumnID="TrustButtJoint" DataField="TrustButtJoint" SortField="TrustButtJoint"
FieldType="Int" HeaderTextAlign="Center" TextAlign="Right" Width="140px">
</f:RenderField>
<f:RenderField HeaderText="对接焊缝检测比例" ColumnID="ButtJointCheckRate" DataField="ButtJointCheckRate" SortField="ButtJointCheckRate"
FieldType="String" HeaderTextAlign="Center" TextAlign="Right" Width="120px" RendererFunction="renderGender">
</f:RenderField>
<f:RenderField HeaderText="已焊固定口数" ColumnID="FixedJoint" DataField="FixedJoint" SortField="FixedJoint"
FieldType="Int" HeaderTextAlign="Center" TextAlign="Right" Width="100px">
</f:RenderField>
<f:RenderField HeaderText="已委托固定口数" ColumnID="TrustFixedJoint" DataField="TrustFixedJoint" SortField="TrustFixedJoint"
FieldType="Int" HeaderTextAlign="Center" TextAlign="Right" Width="120px">
</f:RenderField>
<f:RenderField HeaderText="固定口检测比例" ColumnID="FixedJointCheckRate" DataField="FixedJointCheckRate" SortField="FixedJointCheckRate"
FieldType="String" HeaderTextAlign="Center" TextAlign="Right" Width="140px" RendererFunction="renderGender">
</f:RenderField>
<f:RenderField HeaderText="已焊角焊缝数" ColumnID="FilletJoint" DataField="FilletJoint" SortField="FilletJoint"
FieldType="Int" HeaderTextAlign="Center" TextAlign="Right" Width="120px">
</f:RenderField>
<f:RenderField HeaderText="已委托角焊缝数" ColumnID="TrustFilletJoint" DataField="TrustFilletJoint" SortField="TrustFilletJoint"
FieldType="Int" HeaderTextAlign="Center" TextAlign="Right" Width="140px">
</f:RenderField>
<f:RenderField HeaderText="角焊缝检测比例" ColumnID="FilletJointCheckRate" DataField="FilletJointCheckRate" SortField="FilletJointCheckRate"
FieldType="String" HeaderTextAlign="Center" TextAlign="Right" Width="140px" RendererFunction="renderGender">
</f:RenderField>
</Columns>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="15" Value="15" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
<f:ListItem Text="所有行" Value="1000000" />
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Region>
</Regions>
</f:RegionPanel>
</form>
<script type="text/javascript">
function renderGender(value) {
@@ -117,7 +119,7 @@
function renderGenderSex(value) {
return value == "2" ? "女" : "男";
}
}
</script>
</body>
</html>
@@ -86,7 +86,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunProc("HJGL_sp_rpt_welderStatistics", parameter);
this.Grid1.RecordCount = tb.Rows.Count;
tb = GetFilteredTable(Grid1.FilteredData, tb);
//tb = GetFilteredTable(Grid1.FilteredData, tb);
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
@@ -151,6 +151,8 @@ namespace FineUIPro.Web.HJGL.WeldingReport
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("焊工焊接检测统计表" + filename, System.Text.Encoding.UTF8) + ".xls");
Response.ContentType = "application/excel";
Response.ContentEncoding = System.Text.Encoding.UTF8;
this.Grid1.PageSize = 100000;
this.BindGrid();
Response.Write(GetGridTableHtml(Grid1));
Response.End();
}
@@ -181,7 +183,12 @@ namespace FineUIPro.Web.HJGL.WeldingReport
{
html = (row.FindControl("labNumber") as AspNet.Label).Text;
}
sb.AppendFormat("<td>{0}</td>", html);
if (column.ColumnID == "tfWelderCode")
{
html = (row.FindControl("lblWelderCode") as AspNet.Label).Text;
}
//sb.AppendFormat("<td>{0}</td>", html);
sb.AppendFormat("<td style='vnd.ms-excel.numberformat:@;'>{0}</td>", html);
}
sb.Append("</tr>");
@@ -2,16 +2,18 @@
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,并且如果
// 重新生成代码,这些更改将丢失。
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HJGL.WeldingReport {
public partial class WelderCheckStatistic {
namespace FineUIPro.Web.HJGL.WeldingReport
{
public partial class WelderCheckStatistic
{
/// <summary>
/// form1 控件。
/// </summary>
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// RegionPanel1 控件。
/// </summary>
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RegionPanel RegionPanel1;
/// <summary>
/// Region1 控件。
/// </summary>
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Region Region1;
/// <summary>
/// Form2 控件。
/// </summary>
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form Form2;
/// <summary>
/// drpProject 控件。
/// </summary>
@@ -65,7 +67,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpProject;
/// <summary>
/// drpUnit 控件。
/// </summary>
@@ -74,7 +76,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpUnit;
/// <summary>
/// drpWloName 控件。
/// </summary>
@@ -83,7 +85,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpWloName;
/// <summary>
/// BtnAnalyse 控件。
/// </summary>
@@ -92,7 +94,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button BtnAnalyse;
/// <summary>
/// btnOut 控件。
/// </summary>
@@ -101,7 +103,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnOut;
/// <summary>
/// Region2 控件。
/// </summary>
@@ -110,7 +112,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Region Region2;
/// <summary>
/// Grid1 控件。
/// </summary>
@@ -119,7 +121,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// labNumber 控件。
/// </summary>
@@ -128,7 +130,16 @@ namespace FineUIPro.Web.HJGL.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label labNumber;
/// <summary>
/// lblWelderCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblWelderCode;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
@@ -137,7 +148,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
@@ -146,7 +157,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
+24
View File
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
{
public class WeldMethodItem
{
public string WME_ID { get; set; }
/**
* id
*/
public string WME_Name { get; set; }
/**
* 名称
*/
}
}
@@ -27,6 +27,14 @@ namespace Model
set;
}
/// <summary>
/// 项目id
/// </summary>
public string ProjectId
{
get;
set;
}
/// <summary>
/// 索引
/// </summary>
public int SortIndex
+132
View File
@@ -48941,6 +48941,8 @@ namespace Model
private string _Y2;
private string _QRCodeAttachUrl;
private EntityRef<HJGL_BO_BatchDetail> _HJGL_BO_BatchDetail;
private EntitySet<HJGL_BO_PreWeldReportMain> _HJGL_BO_PreWeldReportMain;
@@ -49201,6 +49203,8 @@ namespace Model
partial void OnX2Changed();
partial void OnY2Changing(string value);
partial void OnY2Changed();
partial void OnQRCodeAttachUrlChanging(string value);
partial void OnQRCodeAttachUrlChanged();
#endregion
public HJGL_PW_JointInfo()
@@ -51303,6 +51307,26 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QRCodeAttachUrl", DbType="NVarChar(200)")]
public string QRCodeAttachUrl
{
get
{
return this._QRCodeAttachUrl;
}
set
{
if ((this._QRCodeAttachUrl != value))
{
this.OnQRCodeAttachUrlChanging(value);
this.SendPropertyChanging();
this._QRCodeAttachUrl = value;
this.SendPropertyChanged("QRCodeAttachUrl");
this.OnQRCodeAttachUrlChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HJGL_BO_BatchDetail_HJGL_PW_JointInfo", Storage="_HJGL_BO_BatchDetail", ThisKey="JOT_ID", OtherKey="JOT_ID", IsUnique=true, IsForeignKey=false, DeleteRule="NO ACTION")]
public HJGL_BO_BatchDetail HJGL_BO_BatchDetail
{
@@ -66384,6 +66408,18 @@ namespace Model
private string _JOTY_Group;
private string _JOT_Electricity;
private string _JOT_Voltage;
private System.Nullable<int> _WeldL;
private System.Nullable<bool> _IsGold;
private string _JOT_QualifiedLevel;
private string _HardQuaStandard;
public HJGL_View_JointInfo()
{
}
@@ -67731,6 +67767,102 @@ namespace Model
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JOT_Electricity", DbType="VarChar(40)")]
public string JOT_Electricity
{
get
{
return this._JOT_Electricity;
}
set
{
if ((this._JOT_Electricity != value))
{
this._JOT_Electricity = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JOT_Voltage", DbType="VarChar(40)")]
public string JOT_Voltage
{
get
{
return this._JOT_Voltage;
}
set
{
if ((this._JOT_Voltage != value))
{
this._JOT_Voltage = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldL", DbType="Int")]
public System.Nullable<int> WeldL
{
get
{
return this._WeldL;
}
set
{
if ((this._WeldL != value))
{
this._WeldL = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsGold", DbType="Bit")]
public System.Nullable<bool> IsGold
{
get
{
return this._IsGold;
}
set
{
if ((this._IsGold != value))
{
this._IsGold = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JOT_QualifiedLevel", DbType="NVarChar(10)")]
public string JOT_QualifiedLevel
{
get
{
return this._JOT_QualifiedLevel;
}
set
{
if ((this._JOT_QualifiedLevel != value))
{
this._JOT_QualifiedLevel = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HardQuaStandard", DbType="NVarChar(50)")]
public string HardQuaStandard
{
get
{
return this._HardQuaStandard;
}
set
{
if ((this._HardQuaStandard != value))
{
this._HardQuaStandard = value;
}
}
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.HJGL_View_JointInfoAndIsoInfo")]
+1
View File
@@ -72,6 +72,7 @@
<Compile Include="APIItem\JointInfoItem.cs" />
<Compile Include="APIItem\ResponeData.cs" />
<Compile Include="APIItem\UnitInfoItem.cs" />
<Compile Include="APIItem\WeldMethodItem.cs" />
<Compile Include="BlowingCleaningItem.cs" />
<Compile Include="Chart\DataSourceChart.cs" />
<Compile Include="Chart\DataSourcePoint.cs" />
@@ -201,6 +201,57 @@ namespace WebAPI.Controllers
return respone;
}
[HttpGet]
public Model.ResponeData weldMethodList()
{
Model.ResponeData respone = new ResponeData();
try
{
return APIBaseServices.weldMethodList();
}
catch (Exception e)
{
respone.code = 0;
respone.message = e.Message;
}
return respone;
}
[HttpGet]
public Model.ResponeData weldSilkList()
{
Model.ResponeData respone = new ResponeData();
try
{
return APIBaseServices.weldSilkList();
}
catch (Exception e)
{
respone.code = 0;
respone.message = e.Message;
}
return respone;
}
[HttpGet]
public Model.ResponeData weldMatList()
{
Model.ResponeData respone = new ResponeData();
try
{
return APIBaseServices.weldMatList();
}
catch (Exception e)
{
respone.code = 0;
respone.message = e.Message;
}
return respone;
}
[HttpGet]
public Model.ResponeData getVersion()
{
@@ -431,5 +431,31 @@ namespace WebAPI.Controllers
return isok;
}
#endregion
#region ID获取焊口信息
/// <summary>
/// 根据焊口ID获取焊口信息
/// </summary>
/// <param name="jotId"></param>
/// <returns></returns>
[HttpGet]
public Model.ResponeData getJointInfoById(string jotId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = HJGL_PW_JointInfoService.GetJointItemByJotID(jotId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
}
}
@@ -60,6 +60,22 @@ namespace WebAPI.Controllers
return respone;
}
[HttpGet]
public Model.ResponeData getUsingPlanTempByUserId(string userId)
{
Model.ResponeData respone = new ResponeData();
try
{
return APIWeldServices.getUsingPlanTempByUserId(userId);
}
catch (Exception e)
{
respone.code = 0;
respone.message = e.Message;
}
return respone;
}
[HttpGet]
public Model.ResponeData welderQueIsPass(string welderId, string steelType, bool isSteelStru)
{
Model.ResponeData respone = new ResponeData();
@@ -168,6 +184,32 @@ namespace WebAPI.Controllers
}
}
}
#region
BLL.UsingPlanTempService.DeleteUsingPlanTempByUserId(usingPlan.InPutMan);
Model.Weld_UsingPlan_Temp newTemp = new Model.Weld_UsingPlan_Temp();
newTemp.UsingPlanTempId = BLL.SQLHelper.GetNewID(typeof(Model.Weld_UsingPlan_Temp));
newTemp.UnitStoreId = usingPlan.UnitStoreId;
newTemp.WeldId = usingPlan.WeldId;
newTemp.ProjectId = usingPlan.ProjectId;
newTemp.UsePosition = usingPlan.UsePosition;
newTemp.UsingUnit = usingPlan.UsingUnit;
newTemp.STE_ID = usingPlan.STE_ID;
newTemp.STE_Name = usingPlan.STE_Name;
newTemp.Amount = usingPlan.Amount;
newTemp.UsingManOne = usingPlan.UsingManOne;
newTemp.InPutDate = DateTime.Now;
newTemp.OrderDate = DateTime.Now;
newTemp.OrderTime = usingPlan.OrderTime;
newTemp.TeamGroupId = usingPlan.TeamGroupId;
newTemp.CancelDate = BLL.Funs.GetNewDateTime(usingPlan.CancelDate);
newTemp.IsCancel = usingPlan.IsCancel;
newTemp.CancelResult = usingPlan.CancelResult;
newTemp.IsSubmit = usingPlan.IsSubmit;
newTemp.InPutMan = usingPlan.InPutMan;
newTemp.Type = "1";
newTemp.IsSteelStru = usingPlan.IsSteelStru;
BLL.UsingPlanTempService.AddUsingPlan(newTemp);
#endregion
return APIWeldServices.addUsingPlan(usingPlan);
}
catch (Exception e)
@@ -229,5 +271,54 @@ namespace WebAPI.Controllers
}
return respone;
}
[HttpGet]
public Model.ResponeData getProjectWelderSelectList(string projectId, string str, int page, int pageSize)
{
Model.ResponeData respone = new ResponeData();
try
{
return APIWeldServices.getProjectWelderSelectList(projectId, str, page, pageSize);
}
catch (Exception e)
{
respone.code = 0;
respone.message = e.Message;
}
return respone;
}
[HttpGet]
public Model.ResponeData saveProjectWelderSelectList(string projectId, string wed_ids)
{
Model.ResponeData respone = new ResponeData();
try
{
using (Model.SGGLDB db = new Model.SGGLDB(BLL.Funs.ConnString))
{
string[] ids = wed_ids.Split(',');
List<Model.Project_Welder> list = new List<Project_Welder>();
foreach (string id in ids)
{
Model.Project_Welder newProjectWelder = new Model.Project_Welder();
newProjectWelder.WED_ID = id;
newProjectWelder.ProjectId = projectId;
newProjectWelder.IsSelected = true;
newProjectWelder.IsApprove = true;
newProjectWelder.ProjectWelderId = BLL.SQLHelper.GetNewID(typeof(Model.Project_Welder));
list.Add(newProjectWelder);
}
db.Project_Welder.InsertAllOnSubmit(list);
db.SubmitChanges();
}
}
catch (Exception e)
{
respone.code = 0;
respone.message = e.Message;
}
return respone;
}
}
}
@@ -72,20 +72,26 @@
<File Include="Areas/HelpPage/Views/_ViewStart.cshtml">
<publishTime>07/03/2024 11:01:07</publishTime>
</File>
<File Include="bin/AipSdk.dll">
<publishTime>04/12/2024 09:54:20</publishTime>
</File>
<File Include="bin/Antlr3.Runtime.dll">
<publishTime>09/10/2013 16:29:20</publishTime>
</File>
<File Include="bin/Antlr3.Runtime.pdb">
<publishTime>09/10/2013 16:29:20</publishTime>
</File>
<File Include="bin/AOP.Common.dll">
<publishTime>04/12/2024 09:54:20</publishTime>
</File>
<File Include="bin/BLL.dll">
<publishTime>12/19/2025 10:46:46</publishTime>
<publishTime>08/07/2026 10:46:18</publishTime>
</File>
<File Include="bin/BLL.dll.config">
<publishTime>07/28/2025 20:15:00</publishTime>
<publishTime>12/31/2025 16:32:37</publishTime>
</File>
<File Include="bin/BLL.pdb">
<publishTime>12/19/2025 10:46:46</publishTime>
<publishTime>08/07/2026 10:46:18</publishTime>
</File>
<File Include="bin/BouncyCastle.Crypto.dll">
<publishTime>12/17/2020 21:32:28</publishTime>
@@ -115,13 +121,13 @@
<publishTime>07/25/2012 11:48:56</publishTime>
</File>
<File Include="bin/Model.dll">
<publishTime>12/19/2025 10:46:45</publishTime>
<publishTime>08/07/2026 10:46:10</publishTime>
</File>
<File Include="bin/Model.pdb">
<publishTime>12/19/2025 10:46:45</publishTime>
<publishTime>08/07/2026 10:46:10</publishTime>
</File>
<File Include="bin/Newtonsoft.Json.dll">
<publishTime>03/17/2021 20:03:36</publishTime>
<publishTime>11/28/2018 02:07:34</publishTime>
</File>
<File Include="bin/Newtonsoft.Json.pdb">
<publishTime>11/27/2018 17:59:08</publishTime>
@@ -288,6 +294,15 @@
<File Include="bin/roslyn/VBCSCompiler.exe.config">
<publishTime>05/24/2018 13:38:24</publishTime>
</File>
<File Include="bin/SgManager.AI.dll">
<publishTime>08/07/2026 10:46:25</publishTime>
</File>
<File Include="bin/SgManager.AI.dll.config">
<publishTime>07/28/2025 11:00:31</publishTime>
</File>
<File Include="bin/SgManager.AI.pdb">
<publishTime>08/07/2026 10:46:25</publishTime>
</File>
<File Include="bin/System.Net.Http.Formatting.dll">
<publishTime>02/01/2018 12:17:18</publishTime>
</File>
@@ -319,10 +334,10 @@
<publishTime>02/01/2018 12:20:56</publishTime>
</File>
<File Include="bin/WebAPI.dll">
<publishTime>12/19/2025 10:46:46</publishTime>
<publishTime>08/07/2026 10:46:32</publishTime>
</File>
<File Include="bin/WebAPI.pdb">
<publishTime>12/19/2025 10:46:46</publishTime>
<publishTime>08/07/2026 10:46:32</publishTime>
</File>
<File Include="bin/WebGrease.dll">
<publishTime>01/23/2014 13:57:34</publishTime>
@@ -448,7 +463,7 @@
<publishTime>07/03/2024 11:01:07</publishTime>
</File>
<File Include="Web.config">
<publishTime>12/19/2025 10:47:09</publishTime>
<publishTime>08/07/2026 10:46:51</publishTime>
</File>
</ItemGroup>
</Project>