This commit is contained in:
佘春生 2024-07-01 09:29:35 +08:00
parent 3990f747ce
commit 26d1774fb1
35 changed files with 1432 additions and 488 deletions

View File

@ -243,6 +243,11 @@ namespace BLL
/// </summary>
public const string WelderQueTemplateUrl = "File\\Excel\\WelderQue.xlsx";
/// <summary>
/// Coode导入模板
/// </summary>
public const string CoodeInTemplateUrl = "File\\Excel\\CoodeIn.xlsx";
/// <summary>
/// 委托单导入模板
/// </summary>
@ -564,6 +569,12 @@ namespace BLL
/// </summary>
public const string HJGL_PointManageMenuId = "3ACE25CE-C5CE-4CEC-AD27-0D5CF1DF2F01";
/// <summary>
/// 点口待审核
/// </summary>
public const string HJGL_PointForAuditMenuId = "7C4BD351-630C-4E2A-B9AD-F91C042ED7A0";
/// <summary>
/// 无损委托单
/// </summary>

View File

@ -29,8 +29,9 @@ namespace BLL
ProjectId = coode.ProjectId,
Coode = coode.Coode,
HeartNo = coode.HeartNo,
Amount = coode.Amount
};
Amount = coode.Amount,
IsUse = coode.IsUse
};
db.Base_MaterialCoode.InsertOnSubmit(newCoode);
db.SubmitChanges();
}
@ -49,6 +50,7 @@ namespace BLL
NewCoode.Coode = coode.Coode;
NewCoode.HeartNo = coode.HeartNo;
NewCoode.Amount = coode.Amount;
NewCoode.IsUse=coode.IsUse;
db.SubmitChanges();
}
}
@ -99,7 +101,7 @@ namespace BLL
dropName.DataValueField = "MaterialCoode";
dropName.DataTextField = "MaterialCoode";
var sql = from x in Funs.DB.Base_MaterialCoode
where x.ProjectId == projectId
where x.ProjectId == projectId & x.IsUse == true
orderby x.Coode, x.HeartNo
select new { x.MaterialCoodeId, MaterialCoode = x.Coode + ":" + x.HeartNo};
dropName.DataSource = sql.ToList();
@ -116,7 +118,7 @@ namespace BLL
dropName.DataValueField = "Coode";
dropName.DataTextField = "Coode";
var sql = (from x in Funs.DB.Base_MaterialCoode
where x.ProjectId == projectId select x.Coode).Distinct();
where x.ProjectId == projectId && x.IsUse==true select x.Coode).Distinct();
dropName.DataSource = sql;
dropName.DataBind();

View File

@ -69,6 +69,7 @@ namespace BLL
newDataInTemp.Value37 = dataInTemp.Value37;
newDataInTemp.Value38 = dataInTemp.Value38;
newDataInTemp.Value39 = dataInTemp.Value39;
newDataInTemp.Value40 = dataInTemp.Value40;
newDataInTemp.ToopValue = dataInTemp.ToopValue;
db.Sys_DataInTemp.InsertOnSubmit(newDataInTemp);
db.SubmitChanges();
@ -124,6 +125,8 @@ namespace BLL
newDataInTemp.Value36 = dataInTemp.Value36;
newDataInTemp.Value37 = dataInTemp.Value37;
newDataInTemp.Value38 = dataInTemp.Value38;
newDataInTemp.Value39 = dataInTemp.Value39;
newDataInTemp.Value40 = dataInTemp.Value40;
newDataInTemp.ToopValue = dataInTemp.ToopValue;
try
{

Binary file not shown.

View File

@ -231,6 +231,7 @@
<Content Include="common\ReportPrint\SaveTabFile.aspx" />
<Content Include="common\ReportPrint\upload\636745907126050098_scs.png" />
<Content Include="common\SysManage\LogList.aspx" />
<Content Include="WeldingProcess\TrustManage\PointForAudit.aspx" />
<Content Include="WeldingProcess\WeldingManage\MaterialCoode.aspx" />
<Content Include="PublicInfo\BaseInfo\PIPClass.aspx" />
<Content Include="PublicInfo\BaseInfo\PIPClassEdit.aspx" />
@ -3418,6 +3419,13 @@
<Compile Include="common\SysManage\LogList.aspx.designer.cs">
<DependentUpon>LogList.aspx</DependentUpon>
</Compile>
<Compile Include="WeldingProcess\TrustManage\PointForAudit.aspx.cs">
<DependentUpon>PointForAudit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="WeldingProcess\TrustManage\PointForAudit.aspx.designer.cs">
<DependentUpon>PointForAudit.aspx</DependentUpon>
</Compile>
<Compile Include="WeldingProcess\WeldingManage\MaterialCoode.aspx.cs">
<DependentUpon>MaterialCoode.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>

View File

@ -22,7 +22,7 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpMaterialType" Label="<%$ Resources:Lan,SteelMaterialType %>"
<f:DropDownList ID="drpMaterialType" Label="<%$ Resources:Lan,MaterialSpecificationType %>"
runat="server" LabelAlign="right" LabelWidth="200px">
</f:DropDownList>
</Items>

View File

@ -527,6 +527,7 @@ namespace FineUIPro.Web.WelderManage
updateQue.SizesMin = sizesMin;
updateQue.MaterialTypeName = materialTypeName;
updateQue.WeldType = weldType;
updateQue.IsPass = q.IsPass;
BLL.WelderQualifiedService.UpdateWelderQualifiedProject(updateQue);
}
@ -710,6 +711,7 @@ namespace FineUIPro.Web.WelderManage
}
welderQue.IsPass = true;
#endregion
welderQueList.Add(welderQue);

View File

@ -379,7 +379,7 @@ namespace FineUIPro.Web.WelderManage
string strSql = @"SELECT Welder.WelderId, Welder.WelderCode, Welder.WelderName, Welder.UnitId,
Welder.Birthday,(CASE WHEN Welder.Sex=1 THEN '男' ELSE '女' END) AS Sex,
Welder.IdentityCard,Welder.IdentityCard, Welder.CertificateNum, Welder.CertificateValidity,
Welder.IdentityCard, Welder.CertificateNum, Welder.CertificateValidity,
Welder.WelderLevel, Welder.Remark,Unit.UnitName,Welder.IsOnDuty
FROM Welder_Welder AS Welder LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = Welder.UnitId
WHERE 1=1 ";
@ -416,7 +416,7 @@ namespace FineUIPro.Web.WelderManage
//行0
CellRangeAddress region = new CellRangeAddress(rowIndex, rowIndex, 0, 11);
ws.AddMergedRegion(region);
ws.GetRow(rowIndex).GetCell(0).SetCellValue("巴斯夫(广东)一体化项目专用化学品二区\r\n焊工信息登记表");
ws.GetRow(rowIndex).GetCell(0).SetCellValue("巴斯夫(广东)一体化丁辛醇OXO\r\n焊工信息登记表");
ws.GetRow(rowIndex).GetCell(0).CellStyle = CommonPrint.SetExcelStyle(hssfworkbook, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, BorderStyle.Thin, VerticalAlignment.Center, HorizontalAlignment.Center, 16);
//行1
@ -429,7 +429,7 @@ namespace FineUIPro.Web.WelderManage
ws.GetRow(rowIndex + 2).GetCell(0).SetCellValue("序号");
ws.GetRow(rowIndex + 2).GetCell(1).SetCellValue("焊工姓名");
ws.GetRow(rowIndex + 2).GetCell(2).SetCellValue("考试中心焊工号");
ws.GetRow(rowIndex + 2).GetCell(3).SetCellValue("CC7焊工号");
ws.GetRow(rowIndex + 2).GetCell(3).SetCellValue("CC11焊工号");
ws.GetRow(rowIndex + 2).GetCell(4).SetCellValue("身份证号");
ws.GetRow(rowIndex + 2).GetCell(5).SetCellValue("焊工证号");
ws.GetRow(rowIndex + 2).GetCell(6).SetCellValue("合格项目");
@ -456,23 +456,26 @@ namespace FineUIPro.Web.WelderManage
{
num = itemWelders.Count - 1;
ws = ExcelCreateRow(ws, hssfworkbook, rowIndex, rowIndex + num, style, 0, 11);
//合并单元格
region = new CellRangeAddress(rowIndex, rowIndex + num, 0, 0);
ws.AddMergedRegion(region);
region = new CellRangeAddress(rowIndex, rowIndex + num, 1, 1);
ws.AddMergedRegion(region);
region = new CellRangeAddress(rowIndex, rowIndex + num, 2, 2);
ws.AddMergedRegion(region);
region = new CellRangeAddress(rowIndex, rowIndex + num, 3, 3);
ws.AddMergedRegion(region);
region = new CellRangeAddress(rowIndex, rowIndex + num, 4, 4);
ws.AddMergedRegion(region);
region = new CellRangeAddress(rowIndex, rowIndex + num, 5, 5);
ws.AddMergedRegion(region);
region = new CellRangeAddress(rowIndex, rowIndex + num, 10, 10);
ws.AddMergedRegion(region);
region = new CellRangeAddress(rowIndex, rowIndex + num, 11, 11);
ws.AddMergedRegion(region);
if (num > 0)
{
//合并单元格
region = new CellRangeAddress(rowIndex, rowIndex + num, 0, 0);
ws.AddMergedRegion(region);
region = new CellRangeAddress(rowIndex, rowIndex + num, 1, 1);
ws.AddMergedRegion(region);
region = new CellRangeAddress(rowIndex, rowIndex + num, 2, 2);
ws.AddMergedRegion(region);
region = new CellRangeAddress(rowIndex, rowIndex + num, 3, 3);
ws.AddMergedRegion(region);
region = new CellRangeAddress(rowIndex, rowIndex + num, 4, 4);
ws.AddMergedRegion(region);
region = new CellRangeAddress(rowIndex, rowIndex + num, 5, 5);
ws.AddMergedRegion(region);
region = new CellRangeAddress(rowIndex, rowIndex + num, 10, 10);
ws.AddMergedRegion(region);
region = new CellRangeAddress(rowIndex, rowIndex + num, 11, 11);
ws.AddMergedRegion(region);
}
int j = 0;
foreach (var item in itemWelders)
{

View File

@ -65,7 +65,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn
string strSql = @"SELECT TempId,ProjectId,UserId,Time,RowNo,ToopValue,Value1,Value2,Value3,Value4,Value5,Value6,Value7,
Value8,Value9,Value10,Value11,Value12,Value13,Value14,Value15,Value16,Value17,Value18,Value19,
Value20,Value21,Value22,Value23,Value24,Value25,Value26,Value27,Value28,Value29,Value30,Value31,
Value32,Value33,Value34,Value35,Value36,Value37,Value38
Value32,Value33,Value34,Value35,Value36,Value37,Value38,Value39,Value40
FROM Sys_DataInTemp
WHERE UserId=@UserId";
List<SqlParameter> listStr = new List<SqlParameter>();
@ -1194,31 +1194,8 @@ namespace FineUIPro.Web.WeldingProcess.DataIn
}
}
if (!string.IsNullOrEmpty(tempData.Value39))
{
var cood = coodeList.FirstOrDefault(x => x.Coode == tempData.Value39);
if (cood == null)
{
errInfo += "Coode1:[" + tempData.Value39 + "]不存在;";
}
else
{
weldJoint.Coode1 = cood.Coode;
}
}
if (!string.IsNullOrEmpty(tempData.Value40))
{
var cood = coodeList.FirstOrDefault(x => x.Coode == tempData.Value40);
if (cood == null)
{
errInfo += "Coode2:[" + tempData.Value40 + "]不存在;";
}
else
{
weldJoint.Coode2 = cood.Coode;
}
}
weldJoint.Coode1 = tempData.Value39;
weldJoint.Coode2 = tempData.Value40;
if (!string.IsNullOrEmpty(tempData.Value25))
{

View File

@ -149,8 +149,6 @@
<f:TextBox ID="txtValue33" Label="焊接位置" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtValue34" Label="检测比例" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtValue35" Label="探伤类型" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtValue36" Label="焊丝" runat="server" LabelWidth="120px">
</f:TextBox>
@ -160,13 +158,14 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtValue35" Label="探伤类型" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtValue38" Label="WPS编号" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtValue39" Label="Coode1" runat="server" LabelWidth="120px">
</f:TextBox>
<f:TextBox ID="txtValue40" Label="Coode2" runat="server" LabelWidth="120px">
</f:TextBox>
<f:Label runat="server"></f:Label>
</Items>
</f:FormRow>
</Rows>

View File

@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.WeldingProcess.DataIn {
public partial class DataInEdit {
namespace FineUIPro.Web.WeldingProcess.DataIn
{
public partial class DataInEdit
{
/// <summary>
/// form1 控件。
/// </summary>
@ -20,7 +22,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@ -29,7 +31,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
@ -38,7 +40,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form SimpleForm1;
/// <summary>
/// Toolbar1 控件。
/// </summary>
@ -47,7 +49,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@ -56,7 +58,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// ckAll 控件。
/// </summary>
@ -65,7 +67,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckAll;
/// <summary>
/// btnSave 控件。
/// </summary>
@ -74,7 +76,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// lbErrCout 控件。
/// </summary>
@ -83,7 +85,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea lbErrCout;
/// <summary>
/// txtValue1 控件。
/// </summary>
@ -92,7 +94,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue1;
/// <summary>
/// txtValue2 控件。
/// </summary>
@ -101,7 +103,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue2;
/// <summary>
/// txtValue3 控件。
/// </summary>
@ -110,7 +112,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue3;
/// <summary>
/// txtValue4 控件。
/// </summary>
@ -119,7 +121,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue4;
/// <summary>
/// txtValue5 控件。
/// </summary>
@ -128,7 +130,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue5;
/// <summary>
/// txtValue6 控件。
/// </summary>
@ -137,7 +139,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue6;
/// <summary>
/// txtValue7 控件。
/// </summary>
@ -146,7 +148,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue7;
/// <summary>
/// txtValue8 控件。
/// </summary>
@ -155,7 +157,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue8;
/// <summary>
/// txtValue9 控件。
/// </summary>
@ -164,7 +166,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue9;
/// <summary>
/// txtValue10 控件。
/// </summary>
@ -173,7 +175,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue10;
/// <summary>
/// txtValue11 控件。
/// </summary>
@ -182,7 +184,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue11;
/// <summary>
/// txtValue12 控件。
/// </summary>
@ -191,7 +193,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue12;
/// <summary>
/// txtValue13 控件。
/// </summary>
@ -200,7 +202,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue13;
/// <summary>
/// txtValue14 控件。
/// </summary>
@ -209,7 +211,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue14;
/// <summary>
/// txtValue15 控件。
/// </summary>
@ -218,7 +220,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue15;
/// <summary>
/// txtValue16 控件。
/// </summary>
@ -227,7 +229,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue16;
/// <summary>
/// txtValue17 控件。
/// </summary>
@ -236,7 +238,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue17;
/// <summary>
/// txtValue18 控件。
/// </summary>
@ -245,7 +247,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue18;
/// <summary>
/// txtValue19 控件。
/// </summary>
@ -254,7 +256,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue19;
/// <summary>
/// txtValue20 控件。
/// </summary>
@ -263,7 +265,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue20;
/// <summary>
/// txtValue21 控件。
/// </summary>
@ -272,7 +274,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue21;
/// <summary>
/// txtValue22 控件。
/// </summary>
@ -281,7 +283,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox txtValue22;
/// <summary>
/// txtValue23 控件。
/// </summary>
@ -290,7 +292,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue23;
/// <summary>
/// txtValue24 控件。
/// </summary>
@ -299,7 +301,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue24;
/// <summary>
/// txtValue25 控件。
/// </summary>
@ -308,7 +310,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue25;
/// <summary>
/// txtValue26 控件。
/// </summary>
@ -317,7 +319,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue26;
/// <summary>
/// txtValue27 控件。
/// </summary>
@ -326,7 +328,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue27;
/// <summary>
/// txtValue28 控件。
/// </summary>
@ -335,7 +337,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue28;
/// <summary>
/// txtValue29 控件。
/// </summary>
@ -344,7 +346,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue29;
/// <summary>
/// txtValue30 控件。
/// </summary>
@ -353,7 +355,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue30;
/// <summary>
/// txtValue31 控件。
/// </summary>
@ -362,7 +364,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue31;
/// <summary>
/// txtValue32 控件。
/// </summary>
@ -371,7 +373,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue32;
/// <summary>
/// txtValue33 控件。
/// </summary>
@ -380,7 +382,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue33;
/// <summary>
/// txtValue34 控件。
/// </summary>
@ -389,16 +391,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue34;
/// <summary>
/// txtValue35 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue35;
/// <summary>
/// txtValue36 控件。
/// </summary>
@ -407,7 +400,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue36;
/// <summary>
/// txtValue37 控件。
/// </summary>
@ -416,7 +409,16 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue37;
/// <summary>
/// txtValue35 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue35;
/// <summary>
/// txtValue38 控件。
/// </summary>
@ -425,7 +427,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue38;
/// <summary>
/// txtValue39 控件。
/// </summary>
@ -434,7 +436,7 @@ namespace FineUIPro.Web.WeldingProcess.DataIn {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtValue39;
/// <summary>
/// txtValue40 控件。
/// </summary>

View File

@ -0,0 +1,138 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PointForAudit.aspx.cs" Inherits="FineUIPro.Web.WeldingProcess.TrustManage.PointForAudit" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>点口待审核</title>
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="点口待审核"
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="PointBatchItemId"
AllowColumnLocking="true" EnableColumnLines="true" DataIDField="PointBatchItemId"
AllowSorting="true" SortField="PointDate,PipelineCode,WeldJointCode"
SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true"
PageSize="25" OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True"
EnableCheckBoxSelect="true">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DropDownList ID="drpNoAudit" runat="server" Label="未审核" LabelAlign="Right" Width="160" LabelWidth="70px">
<f:ListItem Text="-请选择-" Value="0" />
<f:ListItem Text="监理" Value="1" />
<f:ListItem Text="管理公司" Value="2" />
<f:ListItem Text="其它" Value="3" />
</f:DropDownList>
<f:TextBox ID="txtPipeCode" runat="server" Label="管线" LabelAlign="Right" Width="180" LabelWidth="65px"></f:TextBox>
<f:DropDownList ID="drpNde" runat="server" Label="检测方法"
LabelAlign="Right" EnableEdit="true" Width="170" LabelWidth="90px">
</f:DropDownList>
<f:DatePicker runat="server" ID="txtPointStartDate" LabelAlign="Right" LabelWidth="90px"
Label="点口日期" Width="195px">
</f:DatePicker>
<f:DatePicker runat="server" ID="txtPointEndDate" LabelAlign="Right" LabelWidth="30px"
Label="至" Width="135px">
</f:DatePicker>
<f:Button ID="BtnAnalyse" Icon="Find"
runat="server" OnClick="BtnAnalyse_Click">
</f:Button>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnJLAudit" Text="监理审核"
runat="server" OnClick="btnJLAudit_Click">
</f:Button>
<f:Button ID="btnGLGSAudit" Text="管理公司审核" Icon="ChartPie"
runat="server" OnClick="btnGLGSAudit_Click">
</f:Button>
<f:Button ID="btnOtherAudit" Text="其它审核" Icon="ChartPie"
runat="server" OnClick="btnOtherAudit_Click">
</f:Button>
<f:Button ID="btnHandGenerate" Text="生成委托单" ToolTip="勾选需要生成委托单的焊口手动生成委托单" Icon="TableEdit" runat="server"
OnClick="btnHandGenerate_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:RenderField HeaderText="批次号" ColumnID="PointBatchCode" DataField="PointBatchCode"
SortField="PointBatchCode" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="220px" Locked="true">
</f:RenderField>
<f:RenderField HeaderText="<%$ Resources:Lan,ConstructionArea %>" ColumnID="WorkAreaCode" DataField="WorkAreaCode"
SortField="WorkAreaCode" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="80px" Locked="true">
</f:RenderField>
<f:RenderField HeaderText="管线号" ColumnID="PipelineCode" DataField="PipelineCode"
SortField="PipelineCode" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="160px" Locked="true">
</f:RenderField>
<f:RenderField HeaderText="焊口代号" ColumnID="WeldJointCode" DataField="WeldJointCode"
SortField="WeldJointCode" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="80px" Locked="true">
</f:RenderField>
<f:RenderField HeaderText="焊工号" ColumnID="WelderCode" DataField="WelderCode"
SortField="WelderCode" FieldType="String" HeaderTextAlign="Center" TextAlign="Center"
Width="100px">
</f:RenderField>
<f:RenderField HeaderText="焊接日期" ColumnID="WeldingDate" DataField="WeldingDate" SortField="WeldingDate"
FieldType="Date" Renderer="Date" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
</f:RenderField>
<f:RenderField HeaderText="点口类型" ColumnID="PointState" DataField="PointState" SortField="PointState"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="80px">
</f:RenderField>
<f:RenderField HeaderText="是否首二口" ColumnID="IsWelderFirst" DataField="IsWelderFirst"
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="95px">
</f:RenderField>
<f:RenderField HeaderText="点口日期" ColumnID="PointDate" DataField="PointDate" SortField="PointDate"
FieldType="Date" Renderer="Date" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
</f:RenderField>
<f:RenderField HeaderText="实际寸径" ColumnID="Size" DataField="Size" SortField="Size"
FieldType="Double" HeaderTextAlign="Center" TextAlign="Left" Width="80px">
</f:RenderField>
<f:RenderField HeaderText="管道等级" ColumnID="PipingClassName" DataField="PipingClassName"
SortField="PipingClassName" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="80px">
</f:RenderField>
<f:RenderField HeaderText="监理审核" ColumnID="JLAudit" DataField="JLAudit"
SortField="JLAudit" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="80px">
</f:RenderField>
<f:RenderField HeaderText="管理公司审核" ColumnID="GLGSAudit" DataField="GLGSAudit"
SortField="GLGSAudit" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="110px">
</f:RenderField>
<f:RenderField HeaderText="其他审核" ColumnID="QTAudit" DataField="QTAudit"
SortField="QTAudit" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
Width="80px">
</f:RenderField>
<f:RenderField ColumnID="IsPointAudit" DataField="IsPointAudit"
FieldType="String" Hidden="true">
</f:RenderField>
</Columns>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="<%$ Resources:Lan,NumberOfRecordsPerPage %>">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="50" Value="50" />
<f:ListItem Text="100" Value="100" />
<f:ListItem Text="500" Value="500" />
<f:ListItem Text="<%$ Resources:Lan,AllLines %>" Value="10000" />
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
</form>
</body>
</html>

View File

@ -0,0 +1,352 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Reflection;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.WeldingProcess.TrustManage
{
public partial class PointForAudit : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
BLL.Base_DetectionTypeService.InitDetectionTypeDropDownList(drpNde, "", false, "");
drpNde.SelectedValue = "296add43-e979-4cf3-b13e-a68bb00a75d2"; // 默认RT
BindGrid();
}
}
private void BindGrid()
{
string strSql = @"SELECT PointBatchItemId,PointBatchId,PointBatchCode,WeldJointId,PointState,PointDate,WorkAreaCode,
WeldJointCode,JointArea,Size,WelderCode,WeldingDate,PipelineCode,PipingClassName,
(CASE WHEN IsWelderFirst=1 THEN '是' ELSE '否' END) AS IsWelderFirst,
JLAudit,GLGSAudit,QTAudit,IsPointAudit
FROM dbo.View_Batch_PointBatchItem
WHERE PointState IS NOT NULL AND TrustBatchItemId IS NULL";
List<SqlParameter> listStr = new List<SqlParameter>();
if (!string.IsNullOrEmpty(this.txtPipeCode.Text))
{
strSql += " AND PipelineCode LIKE @PipelineCode";
listStr.Add(new SqlParameter("@PipelineCode", "%" + this.txtPipeCode.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(this.txtPointStartDate.Text))
{
strSql += " AND PointDate >= @PointStartDate";
listStr.Add(new SqlParameter("@PointStartDate", Convert.ToDateTime(this.txtPointStartDate.Text)));
}
if (!string.IsNullOrEmpty(this.txtPointEndDate.Text))
{
strSql += " AND PointDate < @PointEndDate";
listStr.Add(new SqlParameter("@PointEndDate", Convert.ToDateTime(this.txtPointEndDate.Text).AddDays(1)));
}
if (drpNoAudit.SelectedValue != "0")
{
if (drpNoAudit.SelectedValue == "1")
{
strSql += " AND JLAudit='未审核'";
}
if (drpNoAudit.SelectedValue == "2")
{
strSql += " AND GLGSAudit='未审核'";
}
if (drpNoAudit.SelectedValue == "3")
{
strSql += " AND QTAudit='未审核'";
}
}
else
{
strSql += " AND (JLAudit='未审核' OR GLGSAudit='未审核' OR QTAudit='未审核')";
}
if (drpNde.SelectedValue != null)
{
strSql += " AND DetectionTypeId=@DetectionTypeId";
listStr.Add(new SqlParameter("@DetectionTypeId", drpNde.SelectedValue));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
// tb = GetFilteredTable(Grid1.FilteredData, tb);
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
#region
/// <summary>
/// 改变索引事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
/// <summary>
/// 分页下拉选择事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
{
this.BindGrid();
}
#endregion
protected void BtnAnalyse_Click(object sender, EventArgs e)
{
BindGrid();
}
protected void Window2_Close(object sender, WindowCloseEventArgs e)
{
this.BindGrid();
}
protected void btnJLAudit_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_PointForAuditMenuId, Const.BtnJLAudit))
{
if (Grid1.SelectedRowIndexArray.Length <= 0)
{
Alert.ShowInTop("最少选中一行!", MessageBoxIcon.Warning);
return;
}
string userId = CurrUser.UserId;
foreach (string pointBatchItemId in Grid1.SelectedRowIDArray)
{
var pointBatchItem = BLL.Batch_PointBatchItemService.GetPointBatchItemByPointBatchItemId(pointBatchItemId);
pointBatchItem.JLAudit = userId;
BLL.Funs.DB.SubmitChanges();
}
Alert.ShowInTop("所选项审核完成!", MessageBoxIcon.Warning);
BindGrid();
}
else
{
ShowNotify(Resources.Lan.NoPrivilegePrompt, MessageBoxIcon.Warning);
return;
}
}
protected void btnGLGSAudit_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_PointForAuditMenuId, Const.BtnGLGSAudit))
{
if (Grid1.SelectedRowIndexArray.Length <= 0)
{
Alert.ShowInTop("最少选中一行!", MessageBoxIcon.Warning);
return;
}
string userId = CurrUser.UserId;
foreach (string pointBatchItemId in Grid1.SelectedRowIDArray)
{
var pointBatchItem = BLL.Batch_PointBatchItemService.GetPointBatchItemByPointBatchItemId(pointBatchItemId);
pointBatchItem.GLGSAudit = userId;
BLL.Funs.DB.SubmitChanges();
}
Alert.ShowInTop("所选项审核完成!", MessageBoxIcon.Warning);
BindGrid();
}
else
{
ShowNotify(Resources.Lan.NoPrivilegePrompt, MessageBoxIcon.Warning);
return;
}
}
protected void btnOtherAudit_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_PointForAuditMenuId, Const.BtnQTAudit))
{
if (Grid1.SelectedRowIndexArray.Length <= 0)
{
Alert.ShowInTop("最少选中一行!", MessageBoxIcon.Warning);
return;
}
string userId = CurrUser.UserId;
foreach (string pointBatchItemId in Grid1.SelectedRowIDArray)
{
var pointBatchItem = BLL.Batch_PointBatchItemService.GetPointBatchItemByPointBatchItemId(pointBatchItemId);
pointBatchItem.QTAudit = userId;
BLL.Funs.DB.SubmitChanges();
}
Alert.ShowInTop("所选项审核完成!", MessageBoxIcon.Warning);
BindGrid();
}
else
{
ShowNotify(Resources.Lan.NoPrivilegePrompt, MessageBoxIcon.Warning);
return;
}
}
/// <summary>
/// 手动生成委托单
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnHandGenerate_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_PointManageMenuId, Const.BtnHandGenerate))
{
List<string> selectRow = new List<string>();
foreach (string pitem in Grid1.SelectedRowIDArray)
{
selectRow.Add(pitem);
}
if (selectRow.Count() > 0)
{
List<string> weldMot = new List<string>();
List<string> grooveType = new List<string>();
List<bool> IsFist = new List<bool>();
List<string> pointBatchIds = new List<string>();
string error = string.Empty;
foreach (string pointItemId in selectRow)
{
var pointItem = BLL.Batch_PointBatchItemService.GetPointBatchItemByPointBatchItemId(pointItemId);
var jot = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(pointItem.WeldJointId);
weldMot.Add(jot.WeldingMethodId);
grooveType.Add(jot.GrooveTypeId);
IsFist.Add(pointItem.IsWelderFirst == true ? true : false);
pointBatchIds.Add(pointItem.PointBatchId);
}
if (pointBatchIds.Distinct().Count() > 1)
{
error = "勾选的焊口不在一个批次中,";
}
if (weldMot.Distinct().Count() > 1)
{
error = "勾选的焊口焊接方法不一至,";
}
if (grooveType.Distinct().Count() > 1)
{
error = error + "勾选的焊口坡口类型不一至,";
}
if (IsFist.Distinct().Count() > 1)
{
error = error + "勾选的焊口是否首三不一至,";
}
if (error == string.Empty)
{
var point = BLL.Batch_PointBatchService.GetPointBatchById(pointBatchIds[0]);
var iso = BLL.Pipeline_PipelineService.GetPipelineByPipelineId(point.PipelineId);
var project = BLL.Base_ProjectService.GetProjectByProjectId(point.ProjectId);
var unit = BLL.Base_UnitService.GetUnit(point.UnitId);
var ndt = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(point.DetectionTypeId);
var work = BLL.Project_WorkAreaService.GetProject_WorkAreaByWorkAreaId(iso.WorkAreaId);
Model.Batch_BatchTrust newBatchTrust = new Model.Batch_BatchTrust();
string perfix = string.Empty;
//perfix = unit.UnitCode + "-" + ins.InstallationCode + "-GD-" + ndt.DetectionTypeCode + "-";
perfix = ndt.DetectionTypeCode + "-" + unit.UnitCode + "-" + work.WorkAreaCode + "-PI" + "-";
newBatchTrust.TrustBatchCode = BLL.SQLHelper.RunProcNewId("SpGetNewCode", "dbo.Batch_BatchTrust", "TrustBatchCode", project.ProjectId, perfix);
string trustBatchId = SQLHelper.GetNewID(typeof(Model.Batch_BatchTrust));
newBatchTrust.TrustBatchId = trustBatchId;
newBatchTrust.TrustDate = DateTime.Now;
newBatchTrust.ProjectId = point.ProjectId;
newBatchTrust.UnitId = point.UnitId;
newBatchTrust.InstallationId = point.InstallationId;
newBatchTrust.WorkAreaId = iso.WorkAreaId;
newBatchTrust.WeldingMethodId = weldMot[0];
newBatchTrust.GrooveTypeId = grooveType[0];
newBatchTrust.IsWelderFirst = IsFist[0];
newBatchTrust.DetectionTypeId = point.DetectionTypeId;
newBatchTrust.PipelineId = point.PipelineId;
BLL.Batch_BatchTrustService.AddBatchTrust(newBatchTrust); // 新增委托单
// 生成委托明细,并回写点口明细信息
string toPointBatch = string.Empty;
foreach (string pointItemId in selectRow)
{
var pointItem = BLL.Batch_PointBatchItemService.GetPointBatchItemByPointBatchItemId(pointItemId);
if (BLL.Batch_PointBatchService.GetIsGenerateTrust(pointItem.PointBatchItemId)) ////生成委托单的条件判断
{
if (!toPointBatch.Contains(pointItem.PointBatchId))
{
toPointBatch = toPointBatch + pointItem.PointBatchId + ",";
}
Model.Batch_BatchTrustItem trustItem = new Model.Batch_BatchTrustItem
{
TrustBatchItemId = SQLHelper.GetNewID(typeof(Model.Batch_BatchTrustItem)),
TrustBatchId = trustBatchId,
PointBatchItemId = pointItem.PointBatchItemId,
WeldJointId = pointItem.WeldJointId,
//FilmNum = fileNum,
CreateDate = DateTime.Now
};
Batch_BatchTrustItemService.AddBatchTrustItem(trustItem);
}
//Model.Batch_PointBatchItem pointBatchItem = Funs.DB.Batch_PointBatchItem.FirstOrDefault(e => e.PointBatchItemId == item.PointBatchItemId);
pointItem.IsBuildTrust = true;
Funs.DB.SubmitChanges();
}
// 回写委托批对应点口信息
if (!string.IsNullOrEmpty(toPointBatch))
{
toPointBatch = toPointBatch.Substring(0, toPointBatch.Length - 1);
var updateTrut = BLL.Batch_BatchTrustService.GetBatchTrustById(trustBatchId);
if (updateTrut != null)
{
updateTrut.TopointBatch = toPointBatch;
BLL.Batch_BatchTrustService.UpdateBatchTrust(updateTrut);
}
}
Alert.ShowInTop("委托单已生成!", MessageBoxIcon.Success);
}
else
{
Alert.ShowInTop(error + "不能组成一个委托单!", MessageBoxIcon.Warning);
}
}
else
{
Alert.ShowInTop("请勾选要生成委托单的焊口!", MessageBoxIcon.Warning);
}
}
else
{
ShowNotify(Resources.Lan.NoPrivilegePrompt, MessageBoxIcon.Warning);
return;
}
}
}
}

View File

@ -0,0 +1,188 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.WeldingProcess.TrustManage
{
public partial class PointForAudit
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// drpNoAudit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpNoAudit;
/// <summary>
/// txtPipeCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPipeCode;
/// <summary>
/// drpNde 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpNde;
/// <summary>
/// txtPointStartDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtPointStartDate;
/// <summary>
/// txtPointEndDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtPointEndDate;
/// <summary>
/// BtnAnalyse 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button BtnAnalyse;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnJLAudit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnJLAudit;
/// <summary>
/// btnGLGSAudit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnGLGSAudit;
/// <summary>
/// btnOtherAudit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnOtherAudit;
/// <summary>
/// btnHandGenerate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnHandGenerate;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
}
}

View File

@ -118,7 +118,7 @@
runat="server" OnClick="btnbtnOpenResetPoint_Click">
</f:Button>
<f:Button ID="btnClear" Text="手动关闭批" ToolTip="手动关闭批" Icon="ArrowOutLonger" runat="server"
ConfirmText="确定要手动关闭批吗?" OnClick="btnbtnClear_Click">
ConfirmText="确定要手动关闭批中待处理焊口吗?" OnClick="btnbtnClear_Click">
</f:Button>
<f:Button ID="btnSelectExpandPoint" Text="重新选择扩口" ToolTip="重新选择扩口" Icon="ArrowRefresh"
runat="server" OnClick="btnSelectExpandPoint_Click" Hidden="true">

View File

@ -850,7 +850,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
}
/// <summary>
/// 手动结束批(暂不用)
/// 手动结束批
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
@ -858,23 +858,30 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_PointManageMenuId, Const.BtnClearBatch))
{
string info = "该批次已关闭!";
var point = BLL.Batch_PointBatchService.GetPointBatchById(this.PointBatchId);
if (point != null && !point.EndDate.HasValue)
string info = "该批次待处理状态的焊口已关闭!";
var pointItemList = (from x in Funs.DB.Batch_PointBatchItem where x.PointBatchId == this.PointBatchId && (x.IsCompletedPoint == null || x.IsCompletedPoint == false) select x).ToList();
foreach (var item in pointItemList)
{
var q = Funs.DB.Batch_PointBatchItem.FirstOrDefault(x => x.PointBatchId == PointBatchId && x.PointState == "1");
if (q != null)
{
BLL.Batch_PointBatchService.UpdatePointBatch(PointBatchId, System.DateTime.Now);
this.txtEndDate.Text = point.EndDate.Value.ToShortDateString();
this.txtState.Text = "批关闭";
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_PointManageMenuId, Const.BtnClearBatch, this.PointBatchId);
}
else
{
info = "该批次未点口,请手动点口后再结束批!";
}
item.IsCompletedPoint = true;
}
Funs.DB.SubmitChanges();
//var point = BLL.Batch_PointBatchService.GetPointBatchById(this.PointBatchId);
//if (point != null && !point.EndDate.HasValue)
//{
// var q = Funs.DB.Batch_PointBatchItem.FirstOrDefault(x => x.PointBatchId == PointBatchId && x.PointState == "1");
// if (q != null)
// {
// BLL.Batch_PointBatchService.UpdatePointBatch(PointBatchId, System.DateTime.Now);
// this.txtEndDate.Text = point.EndDate.Value.ToShortDateString();
// this.txtState.Text = "批关闭";
// BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_PointManageMenuId, Const.BtnClearBatch, this.PointBatchId);
// }
// else
// {
// info = "该批次未点口,请手动点口后再结束批!";
// }
//}
Alert.ShowInTop(info);
}
else

View File

@ -37,7 +37,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
private void BindGrid()
{
string strSql = @"SELECT * FROM dbo.View_Batch_BatchTrustItemSelect
WHERE PointBatchItemId IS NOT NULL AND ProjectId=@ProjectId ";
WHERE ProjectId=@ProjectId ";
List<SqlParameter> listStr = new List<SqlParameter>();

View File

@ -110,20 +110,18 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpCoode1" Label="Coode1" runat="server"
EnableEdit="true" LabelWidth="130px" AutoPostBack="true" OnSelectedIndexChanged="drpCoode1_SelectedIndexChanged">
</f:DropDownList>
<f:TextBox ID="txtCoode1" Label="Coode1" runat="server"
LabelWidth="130px" AutoPostBack="true" OnTextChanged="txtCoode1_TextChanged">
</f:TextBox>
<f:TextBox ID="txtCoode2" Label="Coode2" runat="server" AutoPostBack="true" OnTextChanged="txtCoode2_TextChanged"
LabelWidth="130px">
</f:TextBox>
<f:DropDownList ID="drpHeartNo1" Label="<%$ Resources:Lan,BatchNumber1 %>" runat="server"
LabelWidth="130px" EnableEdit="true">
</f:DropDownList>
<f:DropDownList ID="drpCoode2" Label="Coode2" runat="server"
EnableEdit="true" LabelWidth="130px" AutoPostBack="true" OnSelectedIndexChanged="drpCoode2_SelectedIndexChanged">
</f:DropDownList>
<f:DropDownList ID="drpHeartNo2" Label="<%$ Resources:Lan,BatchNumber2 %>" runat="server"
LabelWidth="130px" EnableEdit="true">
</f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>

View File

@ -127,9 +127,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
this.drpJointAttribute.DataBind();
Funs.FineUIPleaseSelect(this.drpJointAttribute,Resources.Lan.PleaseSelect);
// 物料码
BLL.MaterialCoodeService.InitCoodeDropDownList(this.drpCoode1, this.CurrUser.LoginProjectId, true, Resources.Lan.PleaseSelect);//Coode1
BLL.MaterialCoodeService.InitCoodeDropDownList(this.drpCoode2, this.CurrUser.LoginProjectId, true, Resources.Lan.PleaseSelect);//Coode2
///组件1号
Base_ComponentsService.InitComponentsDropDownList(this.drpPipeAssembly1, true,Resources.Lan.PleaseSelect);
///组件2号
@ -355,14 +353,14 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
txtPageNum.Text = jointInfo.PageNum;
if (!string.IsNullOrEmpty(jointInfo.Coode1))
{
drpCoode1.SelectedValue = jointInfo.Coode1;
BLL.MaterialCoodeService.InitHeartNoDropDownList(this.drpHeartNo1, drpCoode1.SelectedValue, true, Resources.Lan.PleaseSelect);
txtCoode1.Text = jointInfo.Coode1;
BLL.MaterialCoodeService.InitHeartNoDropDownList(this.drpHeartNo1, txtCoode1.Text, true, Resources.Lan.PleaseSelect);
drpHeartNo1.SelectedValue = jointInfo.Coode1;
}
if (!string.IsNullOrEmpty(jointInfo.Coode2))
{
drpCoode2.SelectedValue = jointInfo.Coode2;
BLL.MaterialCoodeService.InitHeartNoDropDownList(this.drpHeartNo2, drpCoode2.SelectedValue, true, Resources.Lan.PleaseSelect);
txtCoode2.Text = jointInfo.Coode2;
BLL.MaterialCoodeService.InitHeartNoDropDownList(this.drpHeartNo2, txtCoode2.Text, true, Resources.Lan.PleaseSelect);
drpHeartNo2.SelectedValue = jointInfo.Coode2;
}
@ -517,19 +515,13 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
newJointInfo.TestPackageNo = this.txtTestPackageNo.Text.Trim();
newJointInfo.PrepareTemp = this.txtPrepareTemp.Text.Trim();
newJointInfo.PageNum = txtPageNum.Text.Trim();
if (drpCoode1.SelectedValue != Const._Null)
{
newJointInfo.Coode1 = drpCoode1.SelectedValue;
}
newJointInfo.Coode1 = txtCoode1.Text.Trim();
if (drpHeartNo1.SelectedValue != Const._Null)
{
newJointInfo.HeartNo1 = drpHeartNo1.SelectedValue;
}
if (drpCoode2.SelectedValue != Const._Null)
{
newJointInfo.Coode2=drpCoode2.SelectedValue;
}
newJointInfo.Coode2 = txtCoode2.Text.Trim();
if (drpHeartNo2.SelectedValue != Const._Null)
{
newJointInfo.HeartNo2 = drpHeartNo2.SelectedValue;
@ -658,21 +650,21 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
}
protected void drpCoode1_SelectedIndexChanged(object sender, EventArgs e)
protected void txtCoode1_TextChanged(object sender, EventArgs e)
{
if (drpCoode1.SelectedValue != Const._Null)
if (!string.IsNullOrEmpty(txtCoode1.Text))
{
drpHeartNo1.Items.Clear();
BLL.MaterialCoodeService.InitHeartNoDropDownList(this.drpHeartNo1, drpCoode1.SelectedValue, true, Resources.Lan.PleaseSelect);//HeartNo1
BLL.MaterialCoodeService.InitHeartNoDropDownList(this.drpHeartNo1, txtCoode1.Text, true, Resources.Lan.PleaseSelect);//HeartNo1
}
}
protected void drpCoode2_SelectedIndexChanged(object sender, EventArgs e)
protected void txtCoode2_TextChanged(object sender, EventArgs e)
{
if (drpCoode2.SelectedValue != Const._Null)
if (!string.IsNullOrEmpty(txtCoode2.Text))
{
drpHeartNo2.Items.Clear();
BLL.MaterialCoodeService.InitHeartNoDropDownList(this.drpHeartNo2, drpCoode2.SelectedValue, true, Resources.Lan.PleaseSelect);//HeartNo2
BLL.MaterialCoodeService.InitHeartNoDropDownList(this.drpHeartNo2, txtCoode2.Text, true, Resources.Lan.PleaseSelect);//HeartNo2
}
}

View File

@ -249,13 +249,22 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
protected global::FineUIPro.TextBox txtSystemNumber;
/// <summary>
/// drpCoode1 控件。
/// txtCoode1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpCoode1;
protected global::FineUIPro.TextBox txtCoode1;
/// <summary>
/// txtCoode2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCoode2;
/// <summary>
/// drpHeartNo1 控件。
@ -266,15 +275,6 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
/// </remarks>
protected global::FineUIPro.DropDownList drpHeartNo1;
/// <summary>
/// drpCoode2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpCoode2;
/// <summary>
/// drpHeartNo2 控件。
/// </summary>

View File

@ -30,9 +30,18 @@
</f:Button>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnNew" ToolTip="<%$ Resources:Lan,Add %>" Icon="Add" EnablePostBack="true"
runat="server" OnClick="btnNew_Click">
<f:FileUpload runat="server" ID="CoodeUrl" EmptyText="请选择要导入的Excel日报文件"
LabelWidth="50px" LabelAlign="Right" Width="300px">
</f:FileUpload>
<f:Button ID="btnImport" Icon="ApplicationEdit" runat="server" Text="导入" ToolTip="日报导入"
OnClick="btnImport_Click">
</f:Button>
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" Text="模板下载" ToolTip="模板下载" OnClick="btnDownLoad_Click">
</f:Button>
<f:Button ID="btnNew" ToolTip="<%$ Resources:Lan,Add %>" Icon="Add" EnablePostBack="true"
Text="新增" runat="server" OnClick="btnNew_Click">
</f:Button>
<f:HiddenField ID="hidFileName" runat="server"></f:HiddenField>
</Items>
</f:Toolbar>
</Toolbars>
@ -49,6 +58,8 @@
FieldType="String" HeaderText="数量" HeaderTextAlign="Center"
TextAlign="Left" SortField="MediumAbbreviation">
</f:RenderField>
<f:RenderCheckField Width="80px" ColumnID="IsUse" DataField="IsUse" HeaderText="是否启用" EnableColumnEdit="false" >
</f:RenderCheckField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />

View File

@ -4,11 +4,25 @@ using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Data.SqlClient;
using Model;
using System.IO;
using System.Drawing;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.WeldingProcess.WeldingManage
{
public partial class MaterialCoode : PageBase
{
//定义变量
/// <summary>
/// 上传预设的虚拟路径
/// </summary>
private string initPath = Const.ExcelUrl;
/// <summary>
/// 错误集合
/// </summary>
public static string errorInfos = string.Empty;
#region
/// <summary>
/// 加载页面
@ -179,18 +193,18 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
var getMedium = BLL.Base_MediumService.GetMediumByMediumId(rowID);
if (getMedium != null)
var getCoode = BLL.MaterialCoodeService.GetMaterialCoode(rowID,this.CurrUser.LoginProjectId);
if (getCoode != null)
{
string cont = judgementDelete(rowID);
if (string.IsNullOrEmpty(cont))
{
BLL.Base_MediumService.DeleteMediumByMediumId(rowID);
BLL.MaterialCoodeService.DeleteMaterialCoode(rowID);
BLL.Sys_LogService.AddLog(Const.System_2, this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.MediumMenuId, Const.BtnDelete, rowID);
}
else
{
strShowNotify += Resources.Lan.MediumDefinition + "" + getMedium.MediumCode + cont;
strShowNotify += Resources.Lan.MediumDefinition + "" + getCoode.Coode + cont;
}
}
}
@ -255,6 +269,181 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
}
#endregion
protected void btnImport_Click(object sender, EventArgs e)
{
if (this.CoodeUrl.HasFile == false)
{
ShowNotify("请选择Excel文件!", MessageBoxIcon.Warning);
return;
}
string IsXls = Path.GetExtension(this.CoodeUrl.FileName).ToString().Trim().ToLower();
if (IsXls != ".xls" && IsXls != ".xlsx")
{
ShowNotify("只能选择Excel文件!", MessageBoxIcon.Warning);
return;
}
string rootPath = Server.MapPath("~/");
string initFullPath = rootPath + initPath;
if (!Directory.Exists(initFullPath))
{
Directory.CreateDirectory(initFullPath);
}
//指定上传文件名称
this.hidFileName.Text = BLL.Funs.GetNewFileName() + IsXls;
//上传文件路径
string filePath = initFullPath + this.hidFileName.Text;
//文件上传服务器
this.CoodeUrl.PostedFile.SaveAs(filePath);
//文件上传服务器后的名称
string fileName = rootPath + initPath + this.hidFileName.Text;
//读取Excel
DataSet ds = NPOIHelper.ExcelToDataSet(fileName, out errorInfos, true);
errorInfos = string.Empty;
//验证Excel读取是否有误
if (!string.IsNullOrEmpty(errorInfos))
{
ShowNotify(errorInfos, MessageBoxIcon.Warning);
return;
}
string message = string.Empty;
List<Model.Base_MaterialCoode> coodeList = new List<Model.Base_MaterialCoode>();
var coodes = from x in Funs.DB.Base_MaterialCoode where x.ProjectId == this.CurrUser.LoginProjectId select x;
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
Model.Base_MaterialCoode d = new Model.Base_MaterialCoode();
d.ProjectId = this.CurrUser.LoginProjectId;
d.MaterialCoodeId = SQLHelper.GetNewID(typeof(Model.Base_MaterialCoode));
d.Coode = ds.Tables[0].Rows[i]["Coode"].ToString();
d.HeartNo = ds.Tables[0].Rows[i]["炉批号"].ToString();
if (!string.IsNullOrEmpty(d.Coode) && !string.IsNullOrEmpty(d.HeartNo))
{
var c = from x in coodes where x.Coode == d.Coode && x.HeartNo == d.HeartNo select x;
if (c.Count() > 0)
{
errorInfos += (i + 2) + "行,Coode对应的炉批号已存在!</br>";
}
}
if (ds.Tables[0].Rows[i]["数量"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["数量"].ToString()))
{
int? dd = Funs.GetNewInt(ds.Tables[0].Rows[i]["数量"].ToString());
if (dd != null)
{
d.Amount = Funs.GetNewInt(ds.Tables[0].Rows[i]["数量"].ToString());
}
else
{
errorInfos += (i + 2) + "行,数量格式不正确!</br>";
}
}
if (ds.Tables[0].Rows[i]["是否启用"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["是否启用"].ToString()))
{
string isUser = ds.Tables[0].Rows[i]["是否启用"].ToString();
if (isUser != "是" && isUser != "否")
{
errorInfos += (i + 2) + "行,是否启用只能录入是或否!</br>";
}
else
{
if (isUser == "是")
{
d.IsUse = true;
}
else
{
d.IsUse = false;
}
}
}
else
{
d.IsUse = false;
}
coodeList.Add(d);
}
var coodeGroup = coodeList.GroupBy(x => new { x.Coode, x.HeartNo }).Select(g => new { Coode = g.Key.Coode, HeartNo = g.Key.HeartNo });
if (coodeList.Count() != coodeGroup.Count())
{
errorInfos += "Coode对应的炉批号有重复";
}
// 数据验证错误,返回
if (!string.IsNullOrEmpty(errorInfos))
{
ShowNotify(errorInfos, MessageBoxIcon.Warning, 10000);
return;
}
else
{
foreach (var item in coodeList)
{
BLL.MaterialCoodeService.AddMaterialCoode(item);
}
ShowNotify("Coode导入成功!", MessageBoxIcon.Success);
this.BindGrid();
}
}
#region
/// <summary>
/// 模板下载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnDownLoad_Click(object sender, EventArgs e)
{
string rootPath = Server.MapPath("~/");
string uploadfilepath = rootPath + Const.CoodeInTemplateUrl;
string filePath = Const.CoodeInTemplateUrl;
string fileName = Path.GetFileName(filePath);
FileInfo info = new FileInfo(uploadfilepath);
long fileSize = info.Length;
Response.ClearContent();
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
Response.ContentType = "excel/plain";
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.AddHeader("Content-Length", fileSize.ToString().Trim());
Response.TransmitFile(uploadfilepath, 0, fileSize);
Response.End();
//PageContext.RegisterStartupScript(Confirm.GetShowReference("确定要下载焊工资质导入模板?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel")));
}
/// <summary>
/// 下载导入模板
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void PageManager1_CustomEvent(object sender, CustomEventArgs e)
{
if (e.EventArgument == "Confirm_OK")
{
string rootPath = Server.MapPath("~/");
string uploadfilepath = rootPath + Const.WelderQueTemplateUrl;
string filePath = Const.WelderQueTemplateUrl;
string fileName = Path.GetFileName(filePath);
FileInfo info = new FileInfo(uploadfilepath);
long fileSize = info.Length;
Response.ClearContent();
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
Response.ContentType = "excel/plain";
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.AddHeader("Content-Length", fileSize.ToString().Trim());
Response.TransmitFile(uploadfilepath, 0, fileSize);
Response.End();
}
}
#endregion
#region
/// <summary>
/// 获取按钮权限

View File

@ -86,6 +86,33 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// CoodeUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FileUpload CoodeUrl;
/// <summary>
/// btnImport 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnImport;
/// <summary>
/// btnDownLoad 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDownLoad;
/// <summary>
/// btnNew 控件。
/// </summary>
@ -95,6 +122,15 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// hidFileName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hidFileName;
/// <summary>
/// ToolbarSeparator1 控件。
/// </summary>

View File

@ -35,6 +35,11 @@
<f:NumberBox ID="txtAmount" runat="server" Label="数量" LabelWidth="200px"></f:NumberBox>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:CheckBox ID="cbIsUse" Checked="true" Label="是否启用" runat="server" LabelWidth="200px"/>
</Items>
</f:FormRow>
</Rows>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">

View File

@ -1,4 +1,5 @@
using BLL;
using Microsoft.ReportingServices.ReportProcessing.ReportObjectModel;
using System;
using System.Linq;
@ -52,6 +53,14 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
{
txtAmount.Text = Material.Amount.Value.ToString();
}
if (Material.IsUse.HasValue)
{
this.cbIsUse.Checked = Material.IsUse.Value;
}
else
{
this.cbIsUse.Checked=false;
}
}
}
}
@ -78,6 +87,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
ProjectId = this.CurrUser.LoginProjectId,
Coode = this.txtCoode.Text.Trim(),
HeartNo = this.txtHeartNo.Text.Trim(),
IsUse = this.cbIsUse.Checked,
};
if (this.txtAmount.Text != "")
{

View File

@ -68,6 +68,15 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
/// </remarks>
protected global::FineUIPro.NumberBox txtAmount;
/// <summary>
/// cbIsUse 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox cbIsUse;
/// <summary>
/// Toolbar1 控件。
/// </summary>

View File

@ -1020,40 +1020,26 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
}
if (ds.Tables[0].Rows[i]["Coode1"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["Coode1"].ToString()))
{
var cood = coodeList.FirstOrDefault(x => x.Coode == ds.Tables[0].Rows[i]["Coode1"].ToString());
if (cood == null)
{
errorInfos += "Coode1:[" + ds.Tables[0].Rows[i]["Coode1"].ToString() + "]不存在;";
}
else
{
d.Coode1 = cood.Coode;
}
}
else
{
errorInfos += (i + 2) + "行,Coode1不能为空!</br>";
d.Coode1 = ds.Tables[0].Rows[i]["Coode1"].ToString();
}
//else
//{
// errorInfos += (i + 2) + "行,Coode1不能为空!</br>";
//}
if (ds.Tables[0].Rows[i]["Coode2"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["Coode2"].ToString()))
{
var cood = coodeList.FirstOrDefault(x => x.Coode == ds.Tables[0].Rows[i]["Coode2"].ToString());
if (cood == null)
{
errorInfos += "Coode2:[" + ds.Tables[0].Rows[i]["Coode2"].ToString() + "]不存在;";
}
else
{
d.Coode1 = cood.Coode;
}
}
else
{
errorInfos += (i + 2) + "行,Coode2不能为空!</br>";
d.Coode1 = ds.Tables[0].Rows[i]["Coode2"].ToString();
}
//else
//{
// errorInfos += (i + 2) + "行,Coode2不能为空!</br>";
//}
if (ds.Tables[0].Rows[i]["炉批号1"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["炉批号1"].ToString()))
{
var cood = coodeList.FirstOrDefault(x => x.Coode == d.Coode1 && x.HeartNo == ds.Tables[0].Rows[i]["炉批号1"].ToString());
var cood = coodeList.FirstOrDefault(x =>x.IsUse==true && x.Coode == d.Coode1 && x.HeartNo == ds.Tables[0].Rows[i]["炉批号1"].ToString());
if (cood == null)
{
errorInfos += "炉批号1:[" + ds.Tables[0].Rows[i]["炉批号1"].ToString() + "]或对应的Coode1不存在";
@ -1063,14 +1049,14 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
d.HeartNo1 = ds.Tables[0].Rows[i]["炉批号1"].ToString();
}
}
else
{
errorInfos += (i + 2) + "行,炉批号1不能为空!</br>";
}
//else
//{
// errorInfos += (i + 2) + "行,炉批号1不能为空!</br>";
//}
if (ds.Tables[0].Rows[i]["炉批号2"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["炉批号2"].ToString()))
{
var cood = coodeList.FirstOrDefault(x => x.Coode == d.Coode2 && x.HeartNo == ds.Tables[0].Rows[i]["炉批号2"].ToString());
var cood = coodeList.FirstOrDefault(x => x.IsUse == true && x.Coode == d.Coode2 && x.HeartNo == ds.Tables[0].Rows[i]["炉批号2"].ToString());
if (cood == null)
{
errorInfos += "炉批号2:[" + ds.Tables[0].Rows[i]["炉批号2"].ToString() + "]或对应的Coode2不存在";
@ -1080,10 +1066,10 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
d.HeartNo2 = ds.Tables[0].Rows[i]["炉批号2"].ToString();
}
}
else
{
errorInfos += (i + 2) + "行,炉批号2不能为空!</br>";
}
//else
//{
// errorInfos += (i + 2) + "行,炉批号2不能为空!</br>";
//}
//if (ds.Tables[0].Rows[i]["焊丝"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["焊丝"].ToString()))
//{
@ -1166,6 +1152,39 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
dayList.Add(d);
#region WPS资质
//if (!string.IsNullOrEmpty(errorInfos))
//{
// ShowNotify(errorInfos, MessageBoxIcon.Warning, 10000);
// return;
//}
//else
//{
// // 判断WPS资质 暂不用
// if (welderQueIsUse == true)
// {
// if (isExistFloor && isExistCell)
// {
// //bool canSave = false;
// var jot = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(jotId);
// var wps = BLL.WPQListServiceService.GetWPQById(jot.WPQId);
// if (wps != null)
// {
// if (wps.WelderIds.Contains(cellWelderId) && wps.WelderIds.Contains(floorWelderId))
// {
// }
// else
// {
// eventArg = eventArg + jot.WeldJointCode + ",";
// }
// }
// }
// }
//}
#endregion
#region
if (!string.IsNullOrEmpty(errorInfos))
{
ShowNotify(errorInfos, MessageBoxIcon.Warning, 10000);
@ -1176,125 +1195,98 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
// 判断资质
if (welderQueIsUse == true)
{
if (isExistFloor && isExistCell)
if (!string.IsNullOrEmpty(jotId) && isExistFloor && isExistCell)
{
//bool canSave = false;
bool canSave = false;
var jot = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(jotId);
var wps = BLL.WPQListServiceService.GetWPQById(jot.WPQId);
if (wps.WelderIds.Contains(cellWelderId) && wps.WelderIds.Contains(floorWelderId))
{
var joty = BLL.Base_WeldTypeService.GetWeldTypeByWeldTypeId(jot.WeldTypeId);
string weldTypeGroup = joty.Flag;
string weldTypeCode = joty.WeldTypeCode;
string floorWelder = floorWelderId;
string cellWelder = cellWelderId;
//decimal? dia = jot.Dia;
//decimal? sch = jot.Thickness;
string weldingMethodCode = string.Empty;
var wm = BLL.Base_WeldingMethodService.GetWeldingMethodByWeldingMethodId(d.WeldingMethodId);
if (wm != null)
{
weldingMethodCode = wm.WeldingMethodCode;
}
string[] wmeCodes = weldingMethodCode.Split('+');
string location = string.Empty;
var loc = BLL.Base_WeldingLocationServie.GetWeldingLocationById(d.WeldingLocationId);
if (loc != null)
{
location = loc.WeldingLocationCode;
}
string ste = jot.Material1Id;
List<Model.Welder_WelderQualify> floorWelderQualifys = (from x in Funs.DB.Welder_WelderQualify
where x.WelderId == floorWelder && x.WeldingMethodId != null
&& x.WeldingLocationId != null && x.MaterialType != null
&& x.WeldType != null
&& x.ThicknessMax != null && x.SizesMin != null
select x).ToList();
List<Model.Welder_WelderQualify> cellWelderQualifys = (from x in Funs.DB.Welder_WelderQualify
where x.WelderId == cellWelder && x.WeldingMethodId != null
&& x.WeldingLocationId != null && x.MaterialType != null
&& x.WeldType != null
&& x.ThicknessMax != null && x.SizesMin != null
select x).ToList();
// 打底和盖面同一焊工
if (floorWelder == cellWelder)
{
if (floorWelderQualifys != null && floorWelderQualifys.Count() > 0)
{
if (wmeCodes.Count() <= 1) // 一种焊接方法
{
canSave = IsOK(floorWelderQualifys, wmeCodes[0], location, weldTypeGroup, ste, dia, sch);
}
else // 大于一种焊接方法,如氩电联焊
{
canSave = TwoWmeIsOK(floorWelderQualifys, cellWelderQualifys, wmeCodes[0], wmeCodes[1], location, weldTypeGroup, ste, dia, sch);
}
}
}
// 打底和盖面焊工不同
else
{
bool isok1 = false;
bool isok2 = false;
if (wmeCodes.Count() <= 1) // 一种焊接方法
{
if (floorWelderQualifys != null && floorWelderQualifys.Count() > 0)
{
isok1 = IsOK(floorWelderQualifys, wmeCodes[0], location, weldTypeGroup, ste, dia, sch);
}
if (cellWelderQualifys != null && cellWelderQualifys.Count() > 0)
{
isok2 = IsOK(cellWelderQualifys, wmeCodes[0], location, weldTypeGroup, ste, dia, sch);
}
if (isok1 && isok2)
{
canSave = true;
}
}
else
{
canSave = TwoWmeIsOK(floorWelderQualifys, cellWelderQualifys, wmeCodes[0], wmeCodes[1], location, weldTypeGroup, ste, dia, sch);
}
}
if (canSave == false)
{
eventArg = eventArg + jot.WeldJointCode + ",";
}
}
}
}
#region ,WPS的焊工判断
//if (!string.IsNullOrEmpty(errorInfos))
//{
// ShowNotify(errorInfos, MessageBoxIcon.Warning, 10000);
// return;
//}
//else
//{
// // 判断资质
// if (welderQueIsUse == true)
// {
// if (isExistFloor && isExistCell)
// {
// bool canSave = false;
// var jot = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(jotId);
// var joty = BLL.Base_WeldTypeService.GetWeldTypeByWeldTypeId(jot.WeldTypeId);
// string weldTypeGroup = joty.Flag;
// string weldTypeCode = joty.WeldTypeCode;
// string floorWelder = floorWelderId;
// string cellWelder = cellWelderId;
// //decimal? dia = jot.Dia;
// //decimal? sch = jot.Thickness;
// string weldingMethodCode = string.Empty;
// var wm = BLL.Base_WeldingMethodService.GetWeldingMethodByWeldingMethodId(jot.WeldingMethodId);
// if (wm != null)
// {
// weldingMethodCode = wm.WeldingMethodCode;
// }
// string[] wmeCodes = weldingMethodCode.Split('+');
// string location = string.Empty;
// var loc = BLL.Base_WeldingLocationServie.GetWeldingLocationById(jot.WeldingLocationId);
// if (loc != null)
// {
// location = loc.WeldingLocationCode;
// }
// string ste = jot.Material1Id;
// List<Model.Welder_WelderQualify> floorWelderQualifys = (from x in Funs.DB.Welder_WelderQualify
// where x.WelderId == floorWelder && x.WeldingMethodId != null
// && x.WeldingLocationId != null && x.MaterialType != null
// && x.WeldType != null
// && x.ThicknessMax != null && x.SizesMin != null
// select x).ToList();
// List<Model.Welder_WelderQualify> cellWelderQualifys = (from x in Funs.DB.Welder_WelderQualify
// where x.WelderId == cellWelder && x.WeldingMethodId != null
// && x.WeldingLocationId != null && x.MaterialType != null
// && x.WeldType != null
// && x.ThicknessMax != null && x.SizesMin != null
// select x).ToList();
// // 打底和盖面同一焊工
// if (floorWelder == cellWelder)
// {
// if (floorWelderQualifys != null && floorWelderQualifys.Count() > 0)
// {
// if (wmeCodes.Count() <= 1) // 一种焊接方法
// {
// canSave = IsOK(floorWelderQualifys, wmeCodes[0], location, weldTypeGroup, ste, dia, sch);
// }
// else // 大于一种焊接方法,如氩电联焊
// {
// canSave = TwoWmeIsOK(floorWelderQualifys, cellWelderQualifys, wmeCodes[0], wmeCodes[1], location, weldTypeGroup, ste, dia, sch);
// }
// }
// }
// // 打底和盖面焊工不同
// else
// {
// bool isok1 = false;
// bool isok2 = false;
// if (wmeCodes.Count() <= 1) // 一种焊接方法
// {
// if (floorWelderQualifys != null && floorWelderQualifys.Count() > 0)
// {
// isok1 = IsOK(floorWelderQualifys, wmeCodes[0], location, weldTypeGroup, ste, dia, sch);
// }
// if (cellWelderQualifys != null && cellWelderQualifys.Count() > 0)
// {
// isok2 = IsOK(cellWelderQualifys, wmeCodes[0], location, weldTypeGroup, ste, dia, sch);
// }
// if (isok1 && isok2)
// {
// canSave = true;
// }
// }
// else
// {
// canSave = TwoWmeIsOK(floorWelderQualifys, cellWelderQualifys, wmeCodes[0], wmeCodes[1], location, weldTypeGroup, ste, dia, sch);
// }
// }
// if (canSave == false)
// {
// eventArg = eventArg + jot.WeldJointCode + ",";
// }
// }
// }
//}
#endregion
}

View File

@ -208,6 +208,7 @@
</f:DropDownList>
</Editor>
</f:RenderField>
<f:RenderField HeaderText="Coode1-炉批号1" ColumnID="CoodeHeartNo1"
DataField="CoodeHeartNo1" FieldType="String"
HeaderTextAlign="Center" TextAlign="Left" Width="200px">

View File

@ -374,99 +374,98 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
coodeNumError = coodeNumError + "请检查后再导入";
}
#region
//// 焊工资质
//foreach (var item in GetWeldingDailyItem)
//{
// bool canSave = false;
// var jot = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(item.WeldJointId);
// var joty = BLL.Base_WeldTypeService.GetWeldTypeByWeldTypeId(jot.WeldTypeId);
// string weldTypeGroup = joty.Flag;
// string weldTypeCode = joty.WeldTypeCode;
// string floorWelder = item.BackingWelderId;
// string cellWelder = item.CoverWelderId;
// decimal? dia = item.Dia;
// decimal? sch = item.Thickness;
// //string wme = item.WeldingMethodCode;
// //string wmeCode = string.Empty;
// //var wm = BLL.HJGL_WeldingMethodService.GetWeldMethodByWMEID(item.WME_ID);
// //if (wm != null)
// //{
// // wmeCode = wm.WME_Code;
// //}
#region
foreach (var item in GetWeldingDailyItem)
{
bool canSave = false;
var jot = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(item.WeldJointId);
var joty = BLL.Base_WeldTypeService.GetWeldTypeByWeldTypeId(jot.WeldTypeId);
string weldTypeGroup = joty.Flag;
string weldTypeCode = joty.WeldTypeCode;
string floorWelder = item.BackingWelderId;
string cellWelder = item.CoverWelderId;
decimal? dia = item.Dia;
decimal? sch = item.Thickness;
//string wme = item.WeldingMethodCode;
//string wmeCode = string.Empty;
//var wm = BLL.HJGL_WeldingMethodService.GetWeldMethodByWMEID(item.WME_ID);
//if (wm != null)
//{
// wmeCode = wm.WME_Code;
//}
// string[] wmeCodes = item.WeldingMethodCode.Split('+');
// string location = item.WeldingLocationCode;
// string ste = jot.Material1Id;
// var projectWelder = BLL.Welder_ProjectWelderService.GetProjectWelderByProjectIdAndWelderId(this.ProjectId,item.BackingWelderId);
// var projectUnit = BLL.Project_UnitService.GetProject_UnitByProjectIdUnitId(this.ProjectId,projectWelder.UnitId);
// if (projectUnit != null && projectUnit.WelderQueIsUse == true)
// {
// List<Model.Welder_WelderQualify> floorWelderQualifys = (from x in Funs.DB.Welder_WelderQualify
// where x.WelderId == floorWelder && x.WeldingMethodId != null
// && x.WeldingLocationId != null && x.MaterialType != null
// && x.WeldType != null
// && x.ThicknessMax != null && x.SizesMin != null
// select x).ToList();
string[] wmeCodes = item.WeldingMethodCode.Split('+');
string location = item.WeldingLocationCode;
string ste = jot.Material1Id;
var projectWelder = BLL.Welder_ProjectWelderService.GetProjectWelderByProjectIdAndWelderId(this.ProjectId, item.BackingWelderId);
var projectUnit = BLL.Project_UnitService.GetProject_UnitByProjectIdUnitId(this.ProjectId, projectWelder.UnitId);
if (projectUnit != null && projectUnit.WelderQueIsUse == true)
{
List<Model.Welder_WelderQualify> floorWelderQualifys = (from x in Funs.DB.Welder_WelderQualify
where x.WelderId == floorWelder && x.WeldingMethodId != null
&& x.WeldingLocationId != null && x.MaterialType != null
&& x.WeldType != null
&& x.ThicknessMax != null && x.SizesMin != null
select x).ToList();
// List<Model.Welder_WelderQualify> cellWelderQualifys = (from x in Funs.DB.Welder_WelderQualify
// where x.WelderId == cellWelder && x.WeldingMethodId != null
// && x.WeldingLocationId != null && x.MaterialType != null
// && x.WeldType != null
// && x.ThicknessMax != null && x.SizesMin != null
// select x).ToList();
// // 打底和盖面同一焊工
// if (floorWelder == cellWelder)
// {
// if (floorWelderQualifys != null && floorWelderQualifys.Count() > 0)
// {
// if (wmeCodes.Count() <= 1) // 一种焊接方法
// {
// canSave = IsOK(floorWelderQualifys, wmeCodes[0], location, weldTypeGroup, ste, dia, sch);
// }
// else // 大于一种焊接方法,如氩电联焊
// {
// canSave = TwoWmeIsOK(floorWelderQualifys, cellWelderQualifys, wmeCodes[0], wmeCodes[1], location, weldTypeGroup, ste, dia, sch);
// }
// }
// }
// // 打底和盖面焊工不同
// else
// {
// bool isok1 = false;
// bool isok2 = false;
List<Model.Welder_WelderQualify> cellWelderQualifys = (from x in Funs.DB.Welder_WelderQualify
where x.WelderId == cellWelder && x.WeldingMethodId != null
&& x.WeldingLocationId != null && x.MaterialType != null
&& x.WeldType != null
&& x.ThicknessMax != null && x.SizesMin != null
select x).ToList();
// 打底和盖面同一焊工
if (floorWelder == cellWelder)
{
if (floorWelderQualifys != null && floorWelderQualifys.Count() > 0)
{
if (wmeCodes.Count() <= 1) // 一种焊接方法
{
canSave = IsOK(floorWelderQualifys, wmeCodes[0], location, weldTypeGroup, ste, dia, sch);
}
else // 大于一种焊接方法,如氩电联焊
{
canSave = TwoWmeIsOK(floorWelderQualifys, cellWelderQualifys, wmeCodes[0], wmeCodes[1], location, weldTypeGroup, ste, dia, sch);
}
}
}
// 打底和盖面焊工不同
else
{
bool isok1 = false;
bool isok2 = false;
// if (wmeCodes.Count() <= 1) // 一种焊接方法
// {
// if (floorWelderQualifys != null && floorWelderQualifys.Count() > 0)
// {
// isok1 = IsOK(floorWelderQualifys, wmeCodes[0], location, weldTypeGroup, ste, dia, sch);
// }
// if (cellWelderQualifys != null && cellWelderQualifys.Count() > 0)
// {
// isok2 = IsOK(cellWelderQualifys, wmeCodes[0], location, weldTypeGroup, ste, dia, sch);
// }
// if (isok1 && isok2)
// {
// canSave = true;
// }
// }
// else
// {
// canSave = TwoWmeIsOK(floorWelderQualifys, cellWelderQualifys, wmeCodes[0], wmeCodes[1], location, weldTypeGroup, ste, dia, sch);
// }
// }
// }
// else
// {
// canSave = true;
// }
if (wmeCodes.Count() <= 1) // 一种焊接方法
{
if (floorWelderQualifys != null && floorWelderQualifys.Count() > 0)
{
isok1 = IsOK(floorWelderQualifys, wmeCodes[0], location, weldTypeGroup, ste, dia, sch);
}
if (cellWelderQualifys != null && cellWelderQualifys.Count() > 0)
{
isok2 = IsOK(cellWelderQualifys, wmeCodes[0], location, weldTypeGroup, ste, dia, sch);
}
if (isok1 && isok2)
{
canSave = true;
}
}
else
{
canSave = TwoWmeIsOK(floorWelderQualifys, cellWelderQualifys, wmeCodes[0], wmeCodes[1], location, weldTypeGroup, ste, dia, sch);
}
}
}
else
{
canSave = true;
}
// if (canSave == false)
// {
// eventArg = eventArg + jot.WeldJointCode + ",";
// }
//}
if (canSave == false)
{
eventArg = eventArg + jot.WeldJointCode + ",";
}
}
#endregion
#region 线

View File

@ -91,8 +91,8 @@
Width="80px">
</f:RenderField>
<f:RenderField HeaderText="焊接位置" ColumnID="WeldingLocationR"
DataField="WeldingLocationR" SortField="WeldingLocationR" FieldType="String" HeaderTextAlign="Center"
<f:RenderField HeaderText="焊接位置" ColumnID="WeldingLocationCode"
DataField="WeldingLocationCode" SortField="WeldingLocationCode" FieldType="String" HeaderTextAlign="Center"
Width="80px">
</f:RenderField>

View File

@ -248,7 +248,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
reportModel.GetRow(rowIndex).GetCell(10).CellStyle = style;
//焊接位置
if (reportModel.GetRow(rowIndex).GetCell(11) == null) reportModel.GetRow(rowIndex).CreateCell(11);
reportModel.GetRow(rowIndex).GetCell(11).SetCellValue(itemOver["WeldingLocationR"].ToString());
reportModel.GetRow(rowIndex).GetCell(11).SetCellValue(itemOver["WeldingLocationCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(11).CellStyle = style;
//管径
if (reportModel.GetRow(rowIndex).GetCell(12) == null) reportModel.GetRow(rowIndex).CreateCell(12);

View File

@ -79,8 +79,8 @@
DataField="WeldTypeCode" SortField="WeldTypeCode" FieldType="String" HeaderTextAlign="Center"
Width="120px">
</f:RenderField>
<f:RenderField HeaderText="焊接位置<br>Welding Location" ColumnID="WeldingLocationR"
DataField="WeldingLocationR" FieldType="String" HeaderTextAlign="Center"
<f:RenderField HeaderText="焊接位置<br>Welding Location" ColumnID="WeldingLocationCode"
DataField="WeldingLocationCode" FieldType="String" HeaderTextAlign="Center"
Width="100px">
</f:RenderField>

View File

@ -37,7 +37,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
/// </summary>
private DataTable GetDataTable()
{
string strSql = @"SELECT weldJoint.WeldJointId,weldJoint.ProjectId,ins.InstallationCode,unit.UnitName,pipeline.PipelineCode,weldJoint.WeldingLocationR,
string strSql = @"SELECT weldJoint.WeldJointId,weldJoint.ProjectId,ins.InstallationCode,unit.UnitName,pipeline.PipelineCode,
(CASE WHEN weldJoint.PageNum IS NOT NULL AND weldJoint.PageNum<>'' THEN pipeline.SingleNumber+'-'+weldJoint.PageNum ELSE pipeline.SingleNumber END) AS SingleNumber,
pipeline.DrawingsNum,CONVERT(NVARCHAR(10),weldingDaily.WeldingDate,120) AS WeldingDate,rate.DetectionRateCode, weldJoint.WeldJointCode,
CAST(ISNULL(weldJoint.Size,0) AS REAL) AS Size,(CAST(ISNULL(weldJoint.Thickness,0) AS REAL)) AS Thickness,weldJoint.Specification,
@ -283,7 +283,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingReport
//}
//焊接位置
if (reportModel.GetRow(rowIndex).GetCell(5) == null) reportModel.GetRow(rowIndex).CreateCell(5);
reportModel.GetRow(rowIndex).GetCell(5).SetCellValue(itemOver["WeldingLocationR"].ToString());
reportModel.GetRow(rowIndex).GetCell(5).SetCellValue(itemOver["WeldingLocationCode"].ToString());
reportModel.GetRow(rowIndex).GetCell(5).CellStyle = style;
//寸径
if (reportModel.GetRow(rowIndex).GetCell(6) == null) reportModel.GetRow(rowIndex).CreateCell(6);

View File

@ -29,6 +29,10 @@ namespace Model
#region
partial void OnCreated();
partial void OnCreated()
{
this.CommandTimeout = 600;
}
partial void InsertAttachFile(AttachFile instance);
partial void UpdateAttachFile(AttachFile instance);
partial void DeleteAttachFile(AttachFile instance);
@ -3540,6 +3544,8 @@ namespace Model
private System.Nullable<int> _Amount;
private System.Nullable<bool> _IsUse;
#region
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@ -3554,6 +3560,8 @@ namespace Model
partial void OnHeartNoChanged();
partial void OnAmountChanging(System.Nullable<int> value);
partial void OnAmountChanged();
partial void OnIsUseChanging(System.Nullable<bool> value);
partial void OnIsUseChanged();
#endregion
public Base_MaterialCoode()
@ -3661,6 +3669,26 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsUse", DbType="Bit")]
public System.Nullable<bool> IsUse
{
get
{
return this._IsUse;
}
set
{
if ((this._IsUse != value))
{
this.OnIsUseChanging(value);
this.SendPropertyChanging();
this._IsUse = value;
this.SendPropertyChanged("IsUse");
this.OnIsUseChanged();
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
@ -41282,10 +41310,6 @@ namespace Model
public partial class View_PTP_TestPackageAudit
{
private string _PipelineId;
private string _PT_PipeId;
private string _PTP_ID;
private string _ProjectId;
@ -41294,59 +41318,29 @@ namespace Model
private string _PipelineCode;
private int _WeldJointCount;
private string _PipelineId;
private int _WeldJointCountT;
private System.Nullable<bool> _IsAll;
private int _CountS;
private System.Nullable<long> _WeldJointCount;
private System.Nullable<int> _WeldJointCountT;
private System.Nullable<int> _CountS;
private System.Nullable<int> _CountU;
private string _NDTR_Name;
private int _NDTR_Rate;
private string _Ratio;
private int _NDTR_Rate;
private System.Nullable<decimal> _RatioC;
public View_PTP_TestPackageAudit()
{
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineId", DbType="NVarChar(50)")]
public string PipelineId
{
get
{
return this._PipelineId;
}
set
{
if ((this._PipelineId != value))
{
this._PipelineId = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PT_PipeId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
public string PT_PipeId
{
get
{
return this._PT_PipeId;
}
set
{
if ((this._PT_PipeId != value))
{
this._PT_PipeId = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PTP_ID", DbType="NVarChar(50)")]
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PTP_ID", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
public string PTP_ID
{
get
@ -41410,8 +41404,40 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldJointCount", DbType="Int NOT NULL")]
public int WeldJointCount
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineId", DbType="NVarChar(50)")]
public string PipelineId
{
get
{
return this._PipelineId;
}
set
{
if ((this._PipelineId != value))
{
this._PipelineId = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Name="isAll", Storage="_IsAll", DbType="Bit")]
public System.Nullable<bool> IsAll
{
get
{
return this._IsAll;
}
set
{
if ((this._IsAll != value))
{
this._IsAll = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldJointCount", DbType="BigInt")]
public System.Nullable<long> WeldJointCount
{
get
{
@ -41426,8 +41452,8 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldJointCountT", DbType="Int NOT NULL")]
public int WeldJointCountT
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldJointCountT", DbType="Int")]
public System.Nullable<int> WeldJointCountT
{
get
{
@ -41442,8 +41468,8 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CountS", DbType="Int NOT NULL")]
public int CountS
[global::System.Data.Linq.Mapping.ColumnAttribute(Name="countS", Storage="_CountS", DbType="Int")]
public System.Nullable<int> CountS
{
get
{
@ -41474,18 +41500,18 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NDTR_Name", DbType="VarChar(30)")]
public string NDTR_Name
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NDTR_Rate", DbType="Int NOT NULL")]
public int NDTR_Rate
{
get
{
return this._NDTR_Name;
return this._NDTR_Rate;
}
set
{
if ((this._NDTR_Name != value))
if ((this._NDTR_Rate != value))
{
this._NDTR_Name = value;
this._NDTR_Rate = value;
}
}
}
@ -41506,22 +41532,6 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NDTR_Rate", DbType="Int NOT NULL")]
public int NDTR_Rate
{
get
{
return this._NDTR_Rate;
}
set
{
if ((this._NDTR_Rate != value))
{
this._NDTR_Rate = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RatioC", DbType="Decimal(19,2)")]
public System.Nullable<decimal> RatioC
{