This commit is contained in:
parent
3a4d247d3d
commit
97efc6eb11
|
@ -54,7 +54,7 @@
|
|||
//定义一个定时器,并开启和配置相关属性
|
||||
System.Timers.Timer Wtimer = new System.Timers.Timer();
|
||||
//执行任务的周期 ,20分钟
|
||||
Wtimer.Interval = 1000 * 60 * 40;
|
||||
Wtimer.Interval = 1000 * 60 * 60;
|
||||
Wtimer.Enabled = true;
|
||||
Wtimer.Start();
|
||||
Wtimer.Elapsed += new System.Timers.ElapsedEventHandler(Wtimer_Elapsed);
|
||||
|
|
|
@ -335,6 +335,336 @@ namespace FineUIPro.Web.Welder
|
|||
}
|
||||
}
|
||||
}
|
||||
var que = from x in Funs.DB.HJGL_BS_WelderQualifiedProject select x;
|
||||
if (que.Count() > 0)
|
||||
{
|
||||
foreach (var q in que)
|
||||
{
|
||||
string weldMethod = string.Empty;
|
||||
string materialType = string.Empty;
|
||||
string location = string.Empty;
|
||||
string weldType = string.Empty;
|
||||
decimal thicknessMax = 0; // 0表示不限
|
||||
decimal sizesMin = 0; // 0表示不限
|
||||
string materialTypeName = string.Empty;
|
||||
|
||||
string[] queProject = q.QualifiedProjectCode.Split('-');
|
||||
|
||||
// 焊接方法和钢材类型
|
||||
weldMethod = queProject[0].Trim();
|
||||
if (queProject.Count() > 1)
|
||||
{
|
||||
if (q.IsDemoteUse == true)
|
||||
{
|
||||
string[] demoteUseSteelType = q.DemoteUseSteelType.Split(',');
|
||||
if (demoteUseSteelType.Count() > 0)
|
||||
{
|
||||
foreach (string type in demoteUseSteelType)
|
||||
{
|
||||
if (type == "FeIV" || type == "FeⅣ")
|
||||
{
|
||||
materialType = materialType + "FeⅣ" + ",";
|
||||
materialTypeName = materialTypeName + "铬钼钢" + ",";
|
||||
}
|
||||
if (type == "FeIII" || type == "FeⅢ")
|
||||
{
|
||||
materialType = materialType + "FeⅢ" + ",";
|
||||
materialTypeName = materialTypeName + "合金钢" + ",";
|
||||
}
|
||||
if (type == "FeII" || type == "FeⅡ")
|
||||
{
|
||||
materialType = materialType + "FeⅡ" + ",";
|
||||
materialTypeName = materialTypeName + "不锈钢" + ",";
|
||||
}
|
||||
if (type == "FeI" || type == "FeⅠ")
|
||||
{
|
||||
materialType = materialType + "FeⅠ" + ",";
|
||||
materialTypeName = materialTypeName + "碳钢" + ",";
|
||||
}
|
||||
}
|
||||
|
||||
if (materialType.Length > 0 && materialTypeName.Length > 0)
|
||||
{
|
||||
materialType = materialType.Substring(0, materialType.Length - 1);
|
||||
materialTypeName = materialTypeName.Substring(0, materialTypeName.Length - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (weldMethod.Contains("GTAW") || weldMethod.Contains("SAW"))
|
||||
{
|
||||
if (queProject[1].Trim() == ("FeI") || queProject[1].Trim() == ("FeⅠ"))
|
||||
{
|
||||
materialType = "FeⅠ";
|
||||
materialTypeName = "碳钢";
|
||||
}
|
||||
|
||||
else if (queProject[1].Trim() == ("FeII") || queProject[1].Trim() == ("FeⅡ"))
|
||||
{
|
||||
materialType = "FeⅡ,FeⅠ";
|
||||
materialTypeName = "不锈钢,碳钢";
|
||||
}
|
||||
else if (queProject[1].Trim() == ("FeIII") || queProject[1].Trim() == ("FeⅢ"))
|
||||
{
|
||||
materialType = "FeⅢ";
|
||||
materialTypeName = "合金钢";
|
||||
}
|
||||
else if (queProject[1].Trim() == ("FeIV") || queProject[1].Trim() == ("FeⅣ"))
|
||||
{
|
||||
materialType = "FeⅣ";
|
||||
materialTypeName = "铬钼钢";
|
||||
}
|
||||
else if (queProject[1].Trim().Contains("Ni"))
|
||||
{
|
||||
materialType = "NiⅤ,NiⅣ,NiⅢ,NiⅡ,NiⅠ";
|
||||
materialTypeName = "镍基合金";
|
||||
}
|
||||
else if (queProject[1].Trim().Contains("P61"))
|
||||
{
|
||||
materialType = "Zr3";
|
||||
materialTypeName = "其它";
|
||||
}
|
||||
else if (queProject[1].Trim().Contains("P62"))
|
||||
{
|
||||
materialType = "Zr5";
|
||||
materialTypeName = "其它";
|
||||
}
|
||||
else if (queProject[1].Trim().Contains("TiⅡ"))
|
||||
{
|
||||
materialType = "TiⅡ,TiⅠ";
|
||||
materialTypeName = "钛合金";
|
||||
}
|
||||
else if (queProject[1].Trim().Contains("TiⅠ"))
|
||||
{
|
||||
materialType = "TiⅠ";
|
||||
materialTypeName = "钛合金";
|
||||
}
|
||||
else
|
||||
{
|
||||
materialType = "FeⅣ,FeⅢ,FeⅡ,FeⅠ";
|
||||
materialTypeName = "其它";
|
||||
}
|
||||
}
|
||||
else if (weldMethod.Contains("SMAW") || weldMethod.Contains("GMAW") || weldMethod.Contains("FCAW"))
|
||||
{
|
||||
if (queProject[1].Trim() == ("FeI") || queProject[1].Trim() == ("FeⅠ"))
|
||||
{
|
||||
materialType = "FeⅠ";
|
||||
materialTypeName = "碳钢";
|
||||
}
|
||||
|
||||
else if (queProject[1].Trim() == ("FeII") || queProject[1].Trim() == ("FeⅡ"))
|
||||
{
|
||||
materialType = "FeⅡ,FeⅠ";
|
||||
materialTypeName = "不锈钢,碳钢";
|
||||
}
|
||||
else if (queProject[1].Trim() == ("FeIII") || queProject[1].Trim() == ("FeⅢ"))
|
||||
{
|
||||
materialType = "FeⅢ,FeⅡ,FeⅠ";
|
||||
materialTypeName = "合金钢,不锈钢,碳钢";
|
||||
}
|
||||
else if (queProject[1].Trim() == ("FeIV") || queProject[1].Trim() == ("FeⅣ"))
|
||||
{
|
||||
materialType = "FeⅣ";
|
||||
materialTypeName = "铬钼钢";
|
||||
}
|
||||
else if (queProject[1].Trim().Contains("Ni"))
|
||||
{
|
||||
materialType = "NiⅤ,NiⅣ,NiⅢ,NiⅡ,NiⅠ";
|
||||
materialTypeName = "镍基合金";
|
||||
}
|
||||
else if (queProject[1].Trim().Contains("P61"))
|
||||
{
|
||||
materialType = "Zr3";
|
||||
materialTypeName = "其它";
|
||||
}
|
||||
else if (queProject[1].Trim().Contains("P62"))
|
||||
{
|
||||
materialType = "Zr5";
|
||||
materialTypeName = "其它";
|
||||
}
|
||||
else if (queProject[1].Trim().Contains("TiⅡ"))
|
||||
{
|
||||
materialType = "TiⅡ,TiⅠ";
|
||||
materialTypeName = "钛合金";
|
||||
}
|
||||
else if (queProject[1].Trim().Contains("TiⅠ"))
|
||||
{
|
||||
materialType = "TiⅠ";
|
||||
materialTypeName = "钛合金";
|
||||
}
|
||||
else
|
||||
{
|
||||
materialType = queProject[1].Trim();
|
||||
materialTypeName = "其它";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (queProject[1].Trim().Contains("Ni"))
|
||||
{
|
||||
materialType = "NiⅤ,NiⅣ,NiⅢ,NiⅡ,NiⅠ";
|
||||
materialTypeName = "镍基合金";
|
||||
}
|
||||
else if (queProject[1].Trim().Contains("P61"))
|
||||
{
|
||||
materialType = "Zr3";
|
||||
materialTypeName = "其它";
|
||||
}
|
||||
else if (queProject[1].Trim().Contains("P62"))
|
||||
{
|
||||
materialType = "Zr5";
|
||||
materialTypeName = "其它";
|
||||
}
|
||||
else if (queProject[1].Trim().Contains("TiⅡ"))
|
||||
{
|
||||
materialType = "TiⅡ,TiⅠ";
|
||||
materialTypeName = "钛合金";
|
||||
}
|
||||
else if (queProject[1].Trim().Contains("TiⅠ"))
|
||||
{
|
||||
materialType = "TiⅠ";
|
||||
materialTypeName = "钛合金";
|
||||
}
|
||||
else
|
||||
{
|
||||
materialType = queProject[1].Trim();
|
||||
materialTypeName = "其它";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (queProject.Count() > 2)
|
||||
{
|
||||
// 焊接位置
|
||||
if (queProject[2].Contains("6G"))
|
||||
{
|
||||
location = "ALL";
|
||||
}
|
||||
else if (queProject[2].Contains("2G"))
|
||||
{
|
||||
location = "1G,2G";
|
||||
}
|
||||
else if (queProject[2].Contains("3G"))
|
||||
{
|
||||
location = "1G,2G,3G";
|
||||
}
|
||||
else if (queProject[2].Contains("4G"))
|
||||
{
|
||||
location = "1G,3G,4G";
|
||||
}
|
||||
else if (queProject[2].Contains("5G"))
|
||||
{
|
||||
location = "1G,2G,3G,5G";
|
||||
}
|
||||
|
||||
else if (queProject[2].Contains("6FG"))
|
||||
{
|
||||
location = "ALL";
|
||||
}
|
||||
else if (queProject[2].Contains("5FG"))
|
||||
{
|
||||
location = "2FG,5FG";
|
||||
}
|
||||
else if (queProject[2].Contains("4FG"))
|
||||
{
|
||||
location = "2FG,4FG";
|
||||
}
|
||||
else
|
||||
{
|
||||
location = queProject[2].Trim();
|
||||
if (weldMethod.Contains("GTAW") || weldMethod.Contains("SAW"))
|
||||
{
|
||||
location = queProject[1].Trim();
|
||||
}
|
||||
}
|
||||
|
||||
// 1-对接,2-角焊缝,3-支管连接焊缝
|
||||
if (queProject[2].Contains("FG"))
|
||||
{
|
||||
weldType = "2,3";
|
||||
}
|
||||
else
|
||||
{
|
||||
weldType = "1,2";
|
||||
}
|
||||
}
|
||||
|
||||
if (queProject.Count() > 3)
|
||||
{
|
||||
// 壁厚和外径
|
||||
string[] thickSize = queProject[3].Split('/');
|
||||
if (thickSize.Count() == 2)
|
||||
{
|
||||
double t = 0.0;
|
||||
double s = 0.0;
|
||||
if (double.TryParse(thickSize[0], out t))
|
||||
{
|
||||
decimal thick = Convert.ToDecimal(t);
|
||||
if (thick < 12)
|
||||
{
|
||||
//thicknessMax = "≤" + thick * 2;
|
||||
thicknessMax = thick * 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
thicknessMax = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (double.TryParse(thickSize[1], out s))
|
||||
{
|
||||
decimal size = Convert.ToDecimal(s);
|
||||
if (size < 25)
|
||||
{
|
||||
//sizesMin = "≥" + size;
|
||||
sizesMin = size;
|
||||
}
|
||||
else if (size >= 25 && size < 76)
|
||||
{
|
||||
//sizesMin = "≥25";
|
||||
sizesMin = 25;
|
||||
}
|
||||
else
|
||||
{
|
||||
//sizesMin = "≥76";
|
||||
sizesMin = 76;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (thickSize.Count() == 1)
|
||||
{
|
||||
thicknessMax = 0;
|
||||
//sizesMin = "≥76";
|
||||
sizesMin = 76;
|
||||
}
|
||||
}
|
||||
if (queProject.Count() > 4)
|
||||
{
|
||||
if (queProject[4].Contains("Ni"))
|
||||
{
|
||||
materialType = "NiⅤ,NiⅣ,NiⅢ,NiⅡ,NiⅠ";
|
||||
materialTypeName = "镍基合金";
|
||||
}
|
||||
}
|
||||
|
||||
Model.HJGL_BS_WelderQualifiedProject updateQue = new Model.HJGL_BS_WelderQualifiedProject();
|
||||
updateQue.WelderQualifiedProjectId = q.WelderQualifiedProjectId;
|
||||
updateQue.WED_ID = q.WED_ID;
|
||||
updateQue.QualifiedProjectCode = q.QualifiedProjectCode;
|
||||
updateQue.LimitDate = q.LimitDate;
|
||||
updateQue.WeldingMethodId = weldMethod;
|
||||
updateQue.MaterialType = materialType;
|
||||
updateQue.WeldingLocationId = location;
|
||||
updateQue.WeldType = weldType;
|
||||
updateQue.ThicknessMax = thicknessMax;
|
||||
updateQue.SizesMin = sizesMin;
|
||||
updateQue.MaterialTypeName = materialTypeName;
|
||||
BLL.HJGL_WelderQualifiedProjectService.UpdateWelderQualifiedProject(updateQue);
|
||||
}
|
||||
}
|
||||
int d = m + n;
|
||||
int f = k + l;
|
||||
BLL.Sys_LogService.AddLog(Const.System_6, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "同步焊工及其合格项目信息");
|
||||
|
|
Loading…
Reference in New Issue