代码无效引用清理,试压包资料界面看板修改

This commit is contained in:
2025-10-10 14:33:21 +08:00
parent 87fb529521
commit 55b798135c
933 changed files with 5897 additions and 7541 deletions
@@ -1,5 +1,4 @@
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -145,11 +144,11 @@ namespace BLL
/// <param name="DN"></param>
/// <param name="sch"></param>
/// <returns></returns>
public static decimal? GetThicknessByDNDia(int DN,string sch)
public static decimal? GetThicknessByDNDia(int DN, string sch)
{
decimal result = 0;
var q = GetDNCompareByDN(DN);
if (q!=null)
if (q != null)
{
var diaProperty = q.GetType().GetProperty(sch);
diaProperty = (diaProperty == null ? q.GetType().GetProperty(sch.Replace("Sch", "SCH")) : diaProperty);
@@ -1,10 +1,8 @@
using FineUIPro;
using Model;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BLL
@@ -26,7 +24,7 @@ namespace BLL
}
private static IQueryable<Model.BaseMaterialcolorOutput> GetByQueryModle(Model.BaseMaterialcolorOutput table)
{
var q = from x in Funs.DB.Base_MaterialColor
var q = from x in Funs.DB.Base_MaterialColor
join y in Funs.DB.Base_Material on x.MaterialId equals y.MaterialId into yy
from y in yy.DefaultIfEmpty()
select new BaseMaterialcolorOutput
@@ -39,7 +37,7 @@ namespace BLL
ColorName = x.ColorName,
ColorCardNo = x.ColorCardNo,
RGB = x.RGB,
Remark= x.Remark,
Remark = x.Remark,
};
if (table == null)
@@ -150,7 +148,7 @@ namespace BLL
{
MaterialColorId = newtable.MaterialColorId,
UnitId = newtable.UnitId,
ProjectId= newtable.ProjectId,
ProjectId = newtable.ProjectId,
MaterialId = newtable.MaterialId,
ColorName = newtable.ColorName,
ColorCardNo = newtable.ColorCardNo,
@@ -111,5 +111,5 @@
[ExcelColumnName("类型")]
public string MaterialName { get; set; }
}
}
+17 -16
View File
@@ -43,20 +43,20 @@ namespace BLL
/// <param name="FileName"></param>
/// <param name="project"></param>
/// <returns></returns>
public static Model.HJGL_DataImport GetLatestFileByFileName(string FileName,string ImportType, string project)
public static Model.HJGL_DataImport GetLatestFileByFileName(string FileName, string ImportType, string project)
{
var q = (from x in Funs.DB.HJGL_DataImport
where x.FileName.Contains(FileName) && x.ProjectId == project&&x.ImportType==ImportType
where x.FileName.Contains(FileName) && x.ProjectId == project && x.ImportType == ImportType
select x
).OrderByDescending(x => x.Version).FirstOrDefault();
return q;
}
public static string ConvertFileType(object ImportType)
public static string ConvertFileType(object ImportType)
{
string TypeName=string.Empty;
string TypeName = string.Empty;
if (ImportType != null)
{
switch (ImportType.ToString ())
switch (ImportType.ToString())
{
case "0":
TypeName = "ISO轴测图";
@@ -77,7 +77,7 @@ namespace BLL
}
return TypeName;
}
public static List<decimal?> GetListVersionByUnitWorkId(string UnitWorkId)
{
@@ -115,13 +115,14 @@ namespace BLL
System.Web.HttpContext.Current.Response.TransmitFile(url, 0, fileSize);
System.Web.HttpContext.Current.Response.Flush();
System.Web.HttpContext.Current.Response.Close();
}
}
}
catch (System.Exception ex)
{
throw;
};
}
;
}
/// <summary>
@@ -150,11 +151,11 @@ namespace BLL
catch (System.Exception)
{
result =false;
result = false;
}
return result;
}
}
/// <summary>
/// 获取当前文件新的版本号
/// </summary>
@@ -173,7 +174,7 @@ namespace BLL
var newVersion = MaxVersion + 0.1m;
return newVersion;
}
public static string Getlatest3DModelNameByUnitWorkId(string UnitWorkId )
public static string Getlatest3DModelNameByUnitWorkId(string UnitWorkId)
{
string result = "";
var q = (from x in Funs.DB.HJGL_DataImport
@@ -184,13 +185,13 @@ namespace BLL
from t in tt.DefaultIfEmpty()
select new
{
FileName = (from x2 in tt where x2.Version == tt.Max(x => x.Version ) select x2.FileName).FirstOrDefault()
FileName = (from x2 in tt where x2.Version == tt.Max(x => x.Version) select x2.FileName).FirstOrDefault()
}
).FirstOrDefault();
//where t.Key == UnitWorkId & x.FileType == "1" select x.Version).Distinct().ToList();
if (q!=null&&!string.IsNullOrEmpty(q.FileName))
if (q != null && !string.IsNullOrEmpty(q.FileName))
{
result=q.FileName.Substring (0,q.FileName.LastIndexOf('.'));
result = q.FileName.Substring(0, q.FileName.LastIndexOf('.'));
}
return result;
@@ -3,8 +3,6 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
namespace BLL
@@ -65,9 +63,9 @@ namespace BLL
{
return Funs.DB.HJGL_DesignBasisDataImport.FirstOrDefault(x => x.DesignBasisDataImportId == DesignBasisDataImportId);
}
public static List<Model.HJGL_DesignBasisDataImport> GetDataByUnitWorkIdAndVersion(string unitworkid,decimal version,string dataclassification)
public static List<Model.HJGL_DesignBasisDataImport> GetDataByUnitWorkIdAndVersion(string unitworkid, decimal version, string dataclassification)
{
var q = Funs.DB.HJGL_DesignBasisDataImport.Where(e => e.UnitWorkId == unitworkid && e.Version == version&& e.DataClassification==dataclassification).OrderBy(e => e.CreateDate).ToList();
var q = Funs.DB.HJGL_DesignBasisDataImport.Where(e => e.UnitWorkId == unitworkid && e.Version == version && e.DataClassification == dataclassification).OrderBy(e => e.CreateDate).ToList();
return q;
@@ -100,7 +98,7 @@ namespace BLL
FileId = newtable.FileId,
Version = newtable.Version,
Remark = newtable.Remark,
DataClassification=newtable.DataClassification,
DataClassification = newtable.DataClassification,
CreateMan = newtable.CreateMan,
CreateDate = newtable.CreateDate,
};
@@ -108,11 +106,12 @@ namespace BLL
db1.HJGL_DesignBasisDataImport.InsertOnSubmit(table);
db1.SubmitChanges();
}
public static List<decimal?> GetListVersionByUnitWorkId(string UnitWorkId,string dataclassification)
public static List<decimal?> GetListVersionByUnitWorkId(string UnitWorkId, string dataclassification)
{
//decimal a = 0.1M;
var q = (from x in Funs.DB.HJGL_DesignBasisDataImport where x.UnitWorkId == UnitWorkId &&x.DataClassification==dataclassification
select x.Version).Distinct().ToList();
var q = (from x in Funs.DB.HJGL_DesignBasisDataImport
where x.UnitWorkId == UnitWorkId && x.DataClassification == dataclassification
select x.Version).Distinct().ToList();
return q;
}
/// <summary>
@@ -120,11 +119,12 @@ namespace BLL
/// </summary>
/// <param name="UnitWorkId"></param>
/// <returns></returns>
public static decimal GetNewVersionByUnitWorkId(string UnitWorkId,string dataclassification)
public static decimal GetNewVersionByUnitWorkId(string UnitWorkId, string dataclassification)
{
decimal MaxVersion = 0.0M;
var q = (from x in Funs.DB.HJGL_DesignBasisDataImport where x.UnitWorkId == UnitWorkId && x.DataClassification == dataclassification
select x.Version).Distinct().ToList();
var q = (from x in Funs.DB.HJGL_DesignBasisDataImport
where x.UnitWorkId == UnitWorkId && x.DataClassification == dataclassification
select x.Version).Distinct().ToList();
if (q != null && q.Count() > 0)
{
MaxVersion = (decimal)q.Max();
@@ -133,11 +133,11 @@ namespace BLL
return newVersion;
}
public static decimal GetNowVersionByUnitWorkId(string unitworkId,string dataclassification)
public static decimal GetNowVersionByUnitWorkId(string unitworkId, string dataclassification)
{
decimal newVersion=0.0M;
var q= Funs.DB.HJGL_DesignBasisDataImportVerSionLog.FirstOrDefault(x => x.UnitWorkId == unitworkId && x.DataClassification == dataclassification);
if (q!=null)
decimal newVersion = 0.0M;
var q = Funs.DB.HJGL_DesignBasisDataImportVerSionLog.FirstOrDefault(x => x.UnitWorkId == unitworkId && x.DataClassification == dataclassification);
if (q != null)
{
newVersion = (decimal)q.Version;
@@ -145,10 +145,10 @@ namespace BLL
return newVersion;
}
public static void InitVersionDownList(FineUIPro.DropDownList dropName, string UnitWorkId,string dataClassification)
public static void InitVersionDownList(FineUIPro.DropDownList dropName, string UnitWorkId, string dataClassification)
{
dropName.DataSource = GetListVersionByUnitWorkId(UnitWorkId,dataClassification);
dropName.DataSource = GetListVersionByUnitWorkId(UnitWorkId, dataClassification);
dropName.DataBind();
}
@@ -1,10 +1,4 @@
using FineUIPro;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
using System.Linq;
namespace BLL
@@ -17,10 +11,10 @@ namespace BLL
return Funs.DB.HJGL_DesignBasisDataImportVerSionLog.FirstOrDefault(x => x.DesignBasisDataImportVerSionLogId == DesignBasisDataImportVerSionLogId);
}
public static Model.HJGL_DesignBasisDataImportVerSionLog GetHJGL_DesignBasisDataImportVerSionLogByunitworkId(string unitworkId,string DataClassification)
public static Model.HJGL_DesignBasisDataImportVerSionLog GetHJGL_DesignBasisDataImportVerSionLogByunitworkId(string unitworkId, string DataClassification)
{
var q = Funs.DB.HJGL_DesignBasisDataImportVerSionLog.FirstOrDefault(x => x.UnitWorkId == unitworkId&&x.DataClassification== DataClassification);
var q = Funs.DB.HJGL_DesignBasisDataImportVerSionLog.FirstOrDefault(x => x.UnitWorkId == unitworkId && x.DataClassification == DataClassification);
return q;
}
public static void AddHJGL_DesignBasisDataImportVerSionLog(Model.HJGL_DesignBasisDataImportVerSionLog newtable)
@@ -50,18 +44,18 @@ namespace BLL
table.ProjectId = newtable.ProjectId;
table.UnitWorkId = newtable.UnitWorkId;
table.Version = newtable.Version;
table.DataClassification=newtable.DataClassification;
table.DataClassification = newtable.DataClassification;
db1.SubmitChanges();
}
}
public static void UpdateVersion(string projectId,string unitworkId,decimal version,string DataClassification)
public static void UpdateVersion(string projectId, string unitworkId, decimal version, string DataClassification)
{
var q = GetHJGL_DesignBasisDataImportVerSionLogByunitworkId(unitworkId,DataClassification);
var q = GetHJGL_DesignBasisDataImportVerSionLogByunitworkId(unitworkId, DataClassification);
var db1 = Funs.DB;
if (q!=null)
if (q != null)
{
q.Version = version;
db1.SubmitChanges();
@@ -75,7 +69,7 @@ namespace BLL
ProjectId = projectId,
UnitWorkId = unitworkId,
Version = version,
DataClassification= DataClassification
DataClassification = DataClassification
};
db1.HJGL_DesignBasisDataImportVerSionLog.InsertOnSubmit(table);
db1.SubmitChanges();
@@ -662,7 +662,7 @@ namespace BLL
#endregion
#region
public static string AuditWelderQualify(string welderQualifyId,string personId)
public static string AuditWelderQualify(string welderQualifyId, string personId)
{
string str = string.Empty;
using (var db = new Model.SGGLDB(Funs.ConnString))
@@ -1,12 +1,8 @@
using NPOI.SS.Formula.Functions;
using System;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Windows.Media.Animation;
using System.Windows;
using Model;
namespace BLL
{
@@ -1,17 +1,15 @@
using FineUIPro;
using Model;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BLL
{
public static class HJGLPackagingmanagedetailService
{
{
#region
/// <summary>
/// 记录数
@@ -206,7 +204,7 @@ namespace BLL
MaterialMade = libItem.MaterialMade,
MaterialDef = libItem.MaterialDef,
Number = tb.Number,
CusBillCode = twOutItem.CusBillCode,
CusBillCode = twOutItem.CusBillCode,
};
result = q.ToList();
return result;
+20 -21
View File
@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web.UI.WebControls;
namespace BLL
{
@@ -106,7 +105,7 @@ namespace BLL
/// <param name="projectid"></param>
/// <param name="PipeArea"></param>
/// <returns></returns>
public static DataTable GetSHOPStockDt( string projectid)
public static DataTable GetSHOPStockDt(string projectid)
{
string strSql = @" SELECT mat.MaterialCode,
lib.MaterialName,
@@ -167,7 +166,7 @@ namespace BLL
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
return tb;
}
}
public static DataTable GetFIELDStockDt(string projectid)
{
string strSql = @"
@@ -240,7 +239,7 @@ namespace BLL
/// <param name="PipeArea">管线划分</param>
/// <returns></returns>
public static List<Model.MaterialStockItem> GetMaterialStockItems(string projectid, string PipeArea)
{
{
List<Model.MaterialStockItem> list = new List<Model.MaterialStockItem>();
DataTable dataTable = new DataTable();
switch (PipeArea)
@@ -252,9 +251,9 @@ namespace BLL
dataTable = GetFIELDStockDt(projectid);
break;
}
if (dataTable!=null)
if (dataTable != null)
{
list =Funs.TableToEntity<Model.MaterialStockItem>(dataTable);
list = Funs.TableToEntity<Model.MaterialStockItem>(dataTable);
}
return list;
}
@@ -262,8 +261,8 @@ namespace BLL
{
decimal num = 0;
var list = GetMaterialStockItems(projectid, PipeArea);
if (list!=null && list.Count>0)
var list = GetMaterialStockItems(projectid, PipeArea);
if (list != null && list.Count > 0)
{
var item = list.Where(x => x.MaterialCode == materialcode).FirstOrDefault();
if (item != null)
@@ -280,17 +279,17 @@ namespace BLL
/// <param name="num"></param>
/// <param name="projectid"></param>
/// <returns></returns>
public static bool isInStockByMaterialCode(string MaterialCode, decimal num,string PipeArea,string projectid)
public static bool isInStockByMaterialCode(string MaterialCode, decimal num, string PipeArea, string projectid)
{
bool state=false;
bool state = false;
List<Model.MaterialStockItem> list = GetMaterialStockItems(projectid, PipeArea);
if (list != null && list.Count > 0)
{
var Material = list.Where(x => x.MaterialCode == MaterialCode).FirstOrDefault();
if (Material!=null)
if (Material != null)
{
var StockNum = Material.MaterialNum;
if (num<= StockNum)
if (num <= StockNum)
{
state = true;
}
@@ -299,7 +298,7 @@ namespace BLL
}
return state;
}
/// <summary>
/// 判断库存是否满足此管线
@@ -307,9 +306,9 @@ namespace BLL
/// <param name="pipelineid"></param>
/// <param name="projectid"></param>
/// <returns></returns>
public static bool isInStockByPipeline(string pipelineid,string projectid)
public static bool isInStockByPipeline(string pipelineid, string projectid)
{
bool state = true ;
bool state = true;
try
{
var q = from x in Funs.DB.HJGL_PipeLineMat
@@ -324,7 +323,7 @@ namespace BLL
{
var pipemodel = BLL.PipelineService.GetPipelineByPipelineId(pipelineid);
List<Model.MaterialStockItem> materialStockItems = new List<Model.MaterialStockItem>();
if (pipemodel.PipeArea==PipelineService.PipeArea_SHOP)
if (pipemodel.PipeArea == PipelineService.PipeArea_SHOP)
{
if (HJGL_MaterialService.materialStockItems_SHOP.Count == 0)
{
@@ -334,13 +333,13 @@ namespace BLL
}
else if (pipemodel.PipeArea == PipelineService.PipeArea_FIELD)
{
if(HJGL_MaterialService.materialStockItems_FIELD.Count == 0)
if (HJGL_MaterialService.materialStockItems_FIELD.Count == 0)
{
HJGL_MaterialService.materialStockItems_FIELD = GetMaterialStockItems(projectid, pipemodel.PipeArea);
}
materialStockItems = materialStockItems_FIELD;
}
//List<Model.MaterialStockItem> materialStockItems = GetMaterialStockItems(projectid, pipemodel.PipeArea);
if (materialStockItems != null && materialStockItems.Count > 0) //判断是否有库存信息
{
@@ -382,10 +381,10 @@ namespace BLL
{
state = false;
ErrLogInfo.WriteLog(ex.ToString ());
ErrLogInfo.WriteLog(ex.ToString());
}
return state;
}
@@ -1,12 +1,9 @@
using FineUIPro;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
namespace BLL
{
@@ -1,10 +1,6 @@
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
@@ -136,7 +132,7 @@ namespace BLL
/// </summary>
/// <param name="projectId"></param>
/// <param name="unitWorkName"></param>
public static void DeleteProductionSchedulingPlanByUnitWork(string projectId,string unitWorkName)
public static void DeleteProductionSchedulingPlanByUnitWork(string projectId, string unitWorkName)
{
SGGLDB db = Funs.DB;
var q = (from x in db.HJGL_ProductionSchedulingPlan where x.ProjectId == projectId && x.MainItemName == unitWorkName select x).ToList();
@@ -1,6 +1,4 @@
using FineUIPro;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
namespace BLL
@@ -30,7 +28,7 @@ namespace BLL
if (!string.IsNullOrEmpty(table.TrainNumber))
{
q = q.Where(x => x.TrainNumber.Contains(table.TrainNumber));
}
}
if (!string.IsNullOrEmpty(table.ProjectId))
{
q = q.Where(x => x.ProjectId.Contains(table.ProjectId));
@@ -99,9 +97,9 @@ namespace BLL
where x.ProjectId == ProjectId
select x.TrainNumber;
var max = q.Count();
var NewTrainNumber=(max+1).ToString().PadLeft(2, '0');
var NewTrainNumber = (max + 1).ToString().PadLeft(2, '0');
return NewTrainNumber;
}
public static void Add(Model.HJGL_TrainNumberManage newtable)
@@ -118,7 +116,7 @@ namespace BLL
ContactName = newtable.ContactName,
ContactPhone = newtable.ContactPhone,
Remark = newtable.Remark,
ReceiveDate=newtable.ReceiveDate,
ReceiveDate = newtable.ReceiveDate,
};
Funs.DB.HJGL_TrainNumberManage.InsertOnSubmit(table);
Funs.DB.SubmitChanges();
+12 -15
View File
@@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
@@ -16,10 +13,10 @@ namespace BLL
}
public static List<Model.HJGL_YardPlanning> GetHJGL_YardPlanningBySurperId(string SurperId)
{
var q= (from x in Funs.DB.HJGL_YardPlanning where x.SurperId== SurperId select x ) .ToList();
var q = (from x in Funs.DB.HJGL_YardPlanning where x.SurperId == SurperId select x).ToList();
return q;
}
public static Model.HJGL_YardPlanning GetHJGL_YardPlanningByProjectId(string projectId,string unitworkid)
public static Model.HJGL_YardPlanning GetHJGL_YardPlanningByProjectId(string projectId, string unitworkid)
{
return Funs.DB.HJGL_YardPlanning.FirstOrDefault(e => e.ProjectId == projectId && e.UnitWorkId == unitworkid);
@@ -30,9 +27,9 @@ namespace BLL
/// <param name="projectid"></param>
/// <param name="unitid"></param>
/// <param name="imgurl"></param>
public static void SavePic(string projectid,string unitworkid, string imgurl)
public static void SavePic(string projectid, string unitworkid, string imgurl)
{
var model = Funs.DB.HJGL_YardPlanning.FirstOrDefault(e => e.ProjectId == projectid && e.UnitWorkId==unitworkid);
var model = Funs.DB.HJGL_YardPlanning.FirstOrDefault(e => e.ProjectId == projectid && e.UnitWorkId == unitworkid);
if (model != null)
{
model.FlowChartPic = imgurl;
@@ -51,12 +48,12 @@ namespace BLL
}
public static void SavePic(string YardPlanningId, string imgurl)
{
var model = Funs.DB.HJGL_YardPlanning.FirstOrDefault(e => e.YardPlanningId== YardPlanningId);
var model = Funs.DB.HJGL_YardPlanning.FirstOrDefault(e => e.YardPlanningId == YardPlanningId);
if (model != null)
{
model.FlowChartPic = imgurl;
UpdateHJGL_YardPlanning(model);
}
}
}
public static void AddHJGL_YardPlanning(Model.HJGL_YardPlanning newtable)
{
@@ -66,7 +63,7 @@ namespace BLL
table.Remark = newtable.Remark;
table.FlowChartPic = newtable.FlowChartPic;
table.UnitWorkId = newtable.UnitWorkId;
table.YardPlanName=newtable.YardPlanName;
table.YardPlanName = newtable.YardPlanName;
table.SurperId = newtable.SurperId;
Funs.DB.HJGL_YardPlanning.InsertOnSubmit(table);
Funs.DB.SubmitChanges();
@@ -102,8 +99,8 @@ namespace BLL
}
public static void DeleteHJGL_YardPlanningBySurperId(string SurperId)
{
var q= GetHJGL_YardPlanningBySurperId(SurperId);
if (q.Count >0)
var q = GetHJGL_YardPlanningBySurperId(SurperId);
if (q.Count > 0)
{
Funs.DB.HJGL_YardPlanning.DeleteAllOnSubmit(q);
Funs.DB.SubmitChanges();
@@ -116,13 +113,13 @@ namespace BLL
var id = q.YardPlanningId;
DeleteHJGL_YardPlanningById(YardPlanningId);
var chirdList = GetHJGL_YardPlanningBySurperId(id);
if (chirdList.Count>0)
if (chirdList.Count > 0)
{
foreach (var item in chirdList)
{
DleteAllById(item.YardPlanningId);
}
}
}
}
@@ -1,6 +1,5 @@
using System.Data;
using System.Linq;
using Model;
namespace BLL
{
@@ -49,7 +48,8 @@ namespace BLL
return newApprove;
}
return null;
};
}
;
}
/// <summary>
@@ -1,6 +1,4 @@
using Model;
using NPOI.SS.Formula.Functions;
using NPOI.SS.UserModel;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -12,13 +10,20 @@ namespace BLL
{
public enum State : int
{
= 0,
= 1,
= 2,
= 3,
= 4,
= 0,
= 1,
= 2,
= 3,
= 4,
}
public static Dictionary<int, string> StateMap = new Dictionary<int, string>()
{
{ 0, State..ToString()},
{ 1, State..ToString()},
{ 2, State..ToString()},
{ 3, State..ToString()},
{ 4, State..ToString()},
};
/// <summary>
/// 根据试压Id获取用于试压信息
/// </summary>
@@ -441,7 +446,7 @@ namespace BLL
{
var q = Funs.DB.PTP_TestPackage.Where(e => e.ProjectId == projectid).ToList();
return q;
}
}
public static void DeletePipelineListByUnitWorkId(string unitworkId)
{
@@ -508,33 +513,33 @@ namespace BLL
Model.SGGLDB db = Funs.DB;
var testPackage = db.PTP_TestPackage.FirstOrDefault(p => p.PTP_ID == PTP_ID);
if (testPackage == null) return null; // 无效试压包,直接返回空结果
result.PTP_ID= PTP_ID;
result.PTP_ID = PTP_ID;
result.TestPackageNo = testPackage.TestPackageNo;
result.UnitWorkName = BLL.UnitWorkService.GetUnitWorkALLName(testPackage.UnitWorkId);
//判断当前试压包的状态
result.StateStr = State..ToString();
result.StateStr = State..ToString();
if (testPackage.AduditDate.HasValue)
{
result.StateStr=State..ToString();
result.StateStr = State..ToString();
}
var PtpItemEndCheckList=(from x in db.PTP_ItemEndCheckList where x.PTP_ID==PTP_ID select x).FirstOrDefault();
if (PtpItemEndCheckList != null )
var PtpItemEndCheckList = (from x in db.PTP_ItemEndCheckList where x.PTP_ID == PTP_ID select x).FirstOrDefault();
if (PtpItemEndCheckList != null)
{
if (PtpItemEndCheckList.State == Const.TestPackage_Complete)
{
result.StateStr = State..ToString();
result.StateStr = State..ToString();
}
else
{
result.StateStr = State..ToString();
result.StateStr = State..ToString();
}
}
if (testPackage.FinishDate.HasValue)
{
result.StateStr = State..ToString();
result.StateStr = State..ToString();
}
// 当前试压包下所有管线ID集合
@@ -709,10 +714,10 @@ namespace BLL
{
Model.SGGLDB db = Funs.DB;
// 获取该单位工程下所有试压包
int totalPipelines = db.PTP_TestPackage.Count(x => x.ProjectId == projectId && x.UnitWorkId == unitWorkId) ;
int totalPipelines = db.PTP_TestPackage.Count(x => x.ProjectId == projectId && x.UnitWorkId == unitWorkId);
if (totalPipelines == 0)
return 0M;
int finishedPipelines = db.PTP_TestPackage.Count(x => x.ProjectId == projectId && x.UnitWorkId == unitWorkId&&x.FinishDate.HasValue);
return 0M;
int finishedPipelines = db.PTP_TestPackage.Count(x => x.ProjectId == projectId && x.UnitWorkId == unitWorkId && x.FinishDate.HasValue);
if (totalPipelines == 0)
return 0M;
return Math.Round((decimal)finishedPipelines / totalPipelines * 100, 2);
@@ -725,7 +730,8 @@ namespace BLL
var groupQuery = db.PTP_TestPackage
.Where(x => x.ProjectId == projectId)
.GroupBy(x => x.UnitWorkId)
.Select(g => new {
.Select(g => new
{
UnitWorkId = g.Key,
Total = g.Count(),
Finished = g.Count(t => t.FinishDate.HasValue)
@@ -3,8 +3,6 @@ using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
+7 -7
View File
@@ -1,7 +1,7 @@
using System;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using Model;
namespace BLL
{
@@ -185,7 +185,7 @@ namespace BLL
decimal dia = jot.Dia.HasValue ? jot.Dia.Value : 0;
decimal sch = jot.Thickness.HasValue ? jot.Thickness.Value : 0;
string unitId = string.Empty;
if (unitid!=Const._Null)
if (unitid != Const._Null)
{
unitId = unitid;
}
@@ -193,7 +193,7 @@ namespace BLL
{
unitId = pipe.UnitId;
}
string weldType = string.Empty;
if (weldT != null)
{
@@ -382,12 +382,12 @@ namespace BLL
}
}
}
catch (Exception ex )
catch (Exception ex)
{
ErrLogInfo.WriteLog(ex.ToString());
continue ;
continue;
}
}
// 一、材质类别不相等
var wpq2 = from x in wpq where x.Material1Class != x.Material2Class select x;
@@ -3,7 +3,6 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BLL
@@ -11,7 +10,7 @@ namespace BLL
public static class HJGL_PipelineComponentjointService
{
#region
@@ -31,7 +30,7 @@ namespace BLL
(string.IsNullOrEmpty(table.PipelineComponentId) || x.PipelineComponentId.Contains(table.PipelineComponentId)) &&
(string.IsNullOrEmpty(table.PipelineComponentCode) || x.PipelineComponentCode.Contains(table.PipelineComponentCode)) &&
(string.IsNullOrEmpty(table.WeldJointId) || x.WeldJointId.Contains(table.WeldJointId)) &&
(string.IsNullOrEmpty(table.WeldJointCode) || x.WeldJointCode.Contains(table.WeldJointCode))
(string.IsNullOrEmpty(table.WeldJointCode) || x.WeldJointCode.Contains(table.WeldJointCode))
select x
;
@@ -120,13 +119,13 @@ namespace BLL
/// 根据焊口号更改状态
/// </summary>
/// <param name="WeldJointId"></param>
public static void UpdateStateByWeldJointId(string WeldJointId,DateTime TaskDate)
public static void UpdateStateByWeldJointId(string WeldJointId, DateTime TaskDate)
{
Model.HJGL_Pipeline_ComponentJoint table = Funs.DB.HJGL_Pipeline_ComponentJoint.FirstOrDefault(x => x.WeldJointId == WeldJointId);
if (table != null)
{
table.State =1;
{
table.State = 1;
Funs.DB.SubmitChanges();
GetProductionByPipelineComponentId(table.PipelineComponentId, TaskDate);
}
@@ -134,10 +133,10 @@ namespace BLL
}
public static void GetProductionByPipelineComponentId(string PipelineComponentId, DateTime TaskDate)
{
var q = Funs.DB.HJGL_Pipeline_ComponentJoint.Where(x => x.PipelineComponentId == PipelineComponentId).ToList();
if (q.Count!=0)
var q = Funs.DB.HJGL_Pipeline_ComponentJoint.Where(x => x.PipelineComponentId == PipelineComponentId).ToList();
if (q.Count != 0)
{
var NotProductionNum = (from x in q where x.State == 0||x.State ==null select x).Count(); //未生产数量
var NotProductionNum = (from x in q where x.State == 0 || x.State == null select x).Count(); //未生产数量
var ProductionNum = (from x in q where x.State == 1 select x).Count(); //已生产数量
if (NotProductionNum == 0) //全部完成
{
@@ -154,10 +153,10 @@ namespace BLL
HJGL_PipelineComponentService.UpdateProductionState(PipelineComponentId, 1, TaskDate);
}
}
}
}
public static void DeleteHJGL_Pipeline_ComponentJointById(string Id)
{
@@ -172,7 +171,7 @@ namespace BLL
public static void DeleteHJGL_Pipeline_ComponentJointByPipelineComponentId(string PipelineComponentId)
{
var table = Funs.DB.HJGL_Pipeline_ComponentJoint.Where(x => x.PipelineComponentId == PipelineComponentId);
var table = Funs.DB.HJGL_Pipeline_ComponentJoint.Where(x => x.PipelineComponentId == PipelineComponentId);
if (table != null)
{
Funs.DB.HJGL_Pipeline_ComponentJoint.DeleteAllOnSubmit(table);
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
using System.Linq;
namespace BLL
{
@@ -15,7 +10,7 @@ namespace BLL
/// <param name="projectId"></param>
/// <param name="type">0总达因,1预制口总达因,2安装口总达因</param>
/// <returns></returns>
public static decimal GetSumSize(string projectId,int type)
public static decimal GetSumSize(string projectId, int type)
{
decimal result = 0;
@@ -42,7 +37,7 @@ namespace BLL
}
}
return result;
}
/// <summary>
@@ -56,7 +51,7 @@ namespace BLL
var getWelds = Funs.DB.HJGL_WeldJoint.Where(x => x.ProjectId == projectId);
if (getWelds.Count() > 0)
{
var getWeldsOk = getWelds.Where(x => x.WeldingDailyId != null);
if (getWeldsOk.Count() > 0)
{
@@ -64,9 +59,9 @@ namespace BLL
if (GCModel.Count() > 0)
{
result = GCModel.Sum(x => x.Size ?? 0);
}
}
}
return result;
@@ -146,23 +141,23 @@ namespace BLL
/// </summary>
/// <param name="projectId"></param>
/// <returns></returns>
public static decimal GetWelderEfficacy(string projectId)
public static decimal GetWelderEfficacy(string projectId)
{
decimal result = 0;
var db = Funs.DB;
var q = (from x in db.HJGL_WeldJoint
join y in db.HJGL_WeldingDaily on x.WeldingDailyId equals y.WeldingDailyId
where x.ProjectId ==projectId
where x.ProjectId == projectId
group x by x.ProjectId into g
select new
select new
{
TotalDin = g.Sum(x => x.Size),
worktime = g.Select(x=>x.WeldingDailyId).Distinct().Count(),
}) ;
worktime = g.Select(x => x.WeldingDailyId).Distinct().Count(),
});
foreach (var item in q)
{
result = decimal.Divide((decimal)item.TotalDin, item.worktime) ;
result = decimal.Divide((decimal)item.TotalDin, item.worktime);
}
return decimal.Truncate(result);
@@ -173,7 +168,7 @@ namespace BLL
var db = Funs.DB;
var q = (from x in db.HJGL_WeldJoint
join y in db.HJGL_WeldingDaily on x.WeldingDailyId equals y.WeldingDailyId
where x.ProjectId == projectId && x.JointAttribute=="预制口"
where x.ProjectId == projectId && x.JointAttribute == "预制口"
group x by x.ProjectId into g
select new
{
@@ -1,11 +1,9 @@
using System;
using System.Collections;
using Model;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web.UI.WebControls;
using Model;
using NPOI.SS.Formula.Functions;
namespace BLL
{
@@ -33,7 +31,7 @@ namespace BLL
/// 已装箱
/// </summary>
public static int State2 = 2;
/// <summary>
/// 获取状态名称
@@ -44,9 +42,9 @@ namespace BLL
ListItem[] list = new ListItem[5];
list[0] = new ListItem("未验收", State0.ToString());
list[1] = new ListItem("已验收", State1.ToString());
list[2] = new ListItem("已出库", State2.ToString());
list[3] = new ListItem("待整改", StatePenRec.ToString());
list[4] = new ListItem("已整改", StateRec.ToString());
list[2] = new ListItem("已出库", State2.ToString());
list[3] = new ListItem("待整改", StatePenRec.ToString());
list[4] = new ListItem("已整改", StateRec.ToString());
return list;
}
/// <summary>
@@ -72,7 +70,7 @@ namespace BLL
}
public static Model.HJGL_Pipeline_Component GetPipelineComponentByCodeandpipelineId(string pipelineComponentCode, string pipelineId)
{
var q = Funs.DB.HJGL_Pipeline_Component.FirstOrDefault(x => x.PipelineComponentCode == pipelineComponentCode && x.PipelineId == pipelineId);
var q = Funs.DB.HJGL_Pipeline_Component.FirstOrDefault(x => x.PipelineComponentCode == pipelineComponentCode && x.PipelineId == pipelineId);
return q;
}
/// <summary>
@@ -121,7 +119,7 @@ namespace BLL
query = query.OrderBy(x => x.PrefabricatedComponents);
return query.ToList();
}
/// <summary>
@@ -136,7 +134,7 @@ namespace BLL
from libItem in libJoin.DefaultIfEmpty()
join line in Funs.DB.HJGL_Pipeline on pipe.PipelineId equals line.PipelineId into lineJoin
from lineItem in lineJoin.DefaultIfEmpty()
where lineItem != null && lineItem.PipeArea == "1"
where lineItem != null && lineItem.PipeArea == "1"
&& (pipe.PrefabricatedComponents == null || pipe.PrefabricatedComponents == "")
select new PipelinePrefabricatedComponentsItem
{
@@ -159,7 +157,7 @@ namespace BLL
query = query.OrderBy(x => x.PrefabricatedComponents);
var inoutplandetail = (from x in Funs.DB.HJGL_PackagingManageDetail
var inoutplandetail = (from x in Funs.DB.HJGL_PackagingManageDetail
where x.PipelineId == pipelineId
&& (x.PipelineComponentId == null || x.PipelineComponentId == "")
select x).ToList();
@@ -278,22 +276,22 @@ namespace BLL
var model_mat = BLL.PipelineMatService.GetPipeLineMat(pipeLineMatId);
var PipelineId = model_mat.PipelineId;
var PipeArea = BLL.PipelineService.GetPipelineByPipelineId(PipelineId).PipeArea;
if (PipeArea=="1" &&!string.IsNullOrEmpty(model_mat.PrefabricatedComponents))
if (PipeArea == "1" && !string.IsNullOrEmpty(model_mat.PrefabricatedComponents))
{
// var model = GetPipelineComponentByMatId(pipeLineMatId);
var model = GetPipelineComponentByCodeandpipelineId(model_mat.PrefabricatedComponents,PipelineId);
if (model!=null)
// var model = GetPipelineComponentByMatId(pipeLineMatId);
var model = GetPipelineComponentByCodeandpipelineId(model_mat.PrefabricatedComponents, PipelineId);
if (model != null)
{
model.PipelineId = PipelineId;
model.PipelineComponentCode = model_mat.PrefabricatedComponents;
model.DrawingName = model_mat.PrefabricatedComponents.Substring(0, model_mat.PrefabricatedComponents.LastIndexOf('-')).Replace("\"", "");
model.DrawingName = model_mat.PrefabricatedComponents.Substring(0, model_mat.PrefabricatedComponents.LastIndexOf('-')).Replace("\"", "");
model.State = State0;
model.ProductionState = 0;
UpdatePipelineComponent(model);
}
else
{
model=new Model.HJGL_Pipeline_Component();
model = new Model.HJGL_Pipeline_Component();
model.PipelineComponentId = SQLHelper.GetNewID();
model.PipelineId = PipelineId;
model.PipelineComponentCode = model_mat.PrefabricatedComponents;
@@ -326,17 +324,17 @@ namespace BLL
newPipeline.BoxNumber = pipeline.BoxNumber;
newPipeline.AssembleUnit = pipeline.AssembleUnit;
newPipeline.PipeLineMatId = pipeline.PipeLineMatId;
newPipeline.State= pipeline.State;
newPipeline.QRCode= pipeline.QRCode;
newPipeline.State = pipeline.State;
newPipeline.QRCode = pipeline.QRCode;
newPipeline.PlanStartDate = pipeline.PlanStartDate;
newPipeline.PlanEndDate = pipeline.PlanEndDate;
newPipeline.ActStartDate = pipeline.ActStartDate;
newPipeline.ActEndDate = pipeline.ActEndDate;
newPipeline.DrawingName = pipeline.DrawingName;
newPipeline.ReceiveMan= pipeline.ReceiveMan;
newPipeline.ReceiveDate= pipeline.ReceiveDate;
newPipeline.ProductionState= pipeline.ProductionState;
newPipeline.IsPrint= pipeline.IsPrint;
newPipeline.ReceiveMan = pipeline.ReceiveMan;
newPipeline.ReceiveDate = pipeline.ReceiveDate;
newPipeline.ProductionState = pipeline.ProductionState;
newPipeline.IsPrint = pipeline.IsPrint;
newPipeline.Remark = pipeline.Remark;
db.HJGL_Pipeline_Component.InsertOnSubmit(newPipeline);
db.SubmitChanges();
@@ -368,7 +366,7 @@ namespace BLL
newPipeline.ReceiveMan = pipeline.ReceiveMan;
newPipeline.ReceiveDate = pipeline.ReceiveDate;
newPipeline.ProductionState = pipeline.ProductionState;
newPipeline.IsPrint=pipeline.IsPrint;
newPipeline.IsPrint = pipeline.IsPrint;
newPipeline.Remark = pipeline.Remark;
db.SubmitChanges();
}
@@ -378,17 +376,17 @@ namespace BLL
/// </summary>
/// <param name="pipelineComponentId"></param>
/// <param name="BoxNumber"></param>
public static void UpdateOutState(string pipelineComponentId,string BoxNumber)
public static void UpdateOutState(string pipelineComponentId, string BoxNumber)
{
var q=GetPipelineComponentById(pipelineComponentId);
if (q.State==State1)
var q = GetPipelineComponentById(pipelineComponentId);
if (q.State == State1)
{
q.State = State2;
q.BoxNumber=BoxNumber;
q.BoxNumber = BoxNumber;
UpdatePipelineComponent(q);
}
}
/// <summary>
/// 修改组件打印状态
@@ -416,22 +414,22 @@ namespace BLL
public static void UpdateProductionState(string pipelineComponentId, int state, DateTime TaskDate)
{
var q = GetPipelineComponentById(pipelineComponentId);
if (q!=null)
if (q != null)
{
q.ProductionState = state;
if (state==2)
if (state == 2)
{
q.ActEndDate = TaskDate;
}
else if(state==1)
else if (state == 1)
{
if (q.ActStartDate ==null)
if (q.ActStartDate == null)
{
q.ActStartDate = TaskDate;
}
else
{
if (DateTime.Compare(TaskDate,q.ActStartDate.Value) < 0)
if (DateTime.Compare(TaskDate, q.ActStartDate.Value) < 0)
{
q.ActStartDate = TaskDate;
}
@@ -494,13 +492,13 @@ namespace BLL
/// <param name="pipelineComponentCode"></param>
/// <returns></returns>
public static List<HJGL_Pipeline_Component> GetAcceptedPipelineComponent(string projectId, string pipelineCode,
string pipelineComponentCode,string flowingSection)
string pipelineComponentCode, string flowingSection)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.HJGL_Pipeline_Component
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
where y.ProjectId.Contains(projectId) && x.State.Equals(State1) &&
(string.IsNullOrEmpty(pipelineCode) || y.PipelineCode.Contains(pipelineCode)) &&
(string.IsNullOrEmpty(pipelineCode) || y.PipelineCode.Contains(pipelineCode)) &&
(string.IsNullOrEmpty(pipelineComponentCode) || x.PipelineComponentCode.Contains(pipelineComponentCode)) &&
(string.IsNullOrEmpty(flowingSection) || y.FlowingSection.Contains(flowingSection))
select x).ToList();
@@ -513,7 +511,7 @@ namespace BLL
Model.SGGLDB db = Funs.DB;
var q = (from x in db.HJGL_Pipeline_Component
where x.PipelineId == PipelineId
select x).OrderBy(x=>x.PlanStartDate).ToList();
select x).OrderBy(x => x.PlanStartDate).ToList();
return q;
}
@@ -1,5 +1,4 @@
using Microsoft.Office.Interop.Word;
using MiniExcelLibs;
using MiniExcelLibs;
using Model;
using System;
using System.Collections.Generic;
@@ -7,10 +6,7 @@ using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Web.UI.DataVisualization.Charting;
using System.Web.UI.WebControls;
using System.Windows.Media.Animation;
using static BLL.PipelineService;
namespace BLL
{
@@ -258,7 +254,7 @@ namespace BLL
/// <returns></returns>
public static Model.HJGL_Pipeline GetPipelineByPipelineCode(string projectId, string pipelineCode)
{
return Funs.DB.HJGL_Pipeline.FirstOrDefault(e => e.PipelineCode == pipelineCode&&e.ProjectId==projectId );
return Funs.DB.HJGL_Pipeline.FirstOrDefault(e => e.PipelineCode == pipelineCode && e.ProjectId == projectId);
}
/// <summary>
/// 根据管线信息筛选管线
@@ -624,7 +620,7 @@ namespace BLL
newPipeline.FlowingSection = pipeline.FlowingSection;
db.HJGL_Pipeline.InsertOnSubmit(newPipeline);
db.SubmitChanges();
}
}
}
/// <summary>
@@ -1,9 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
namespace BLL
{
+12 -15
View File
@@ -1,9 +1,6 @@
using Model;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Numerics;
namespace BLL
{
@@ -32,12 +29,12 @@ namespace BLL
///获取焊接任务单编号
/// </summary>
/// <returns></returns>
public static string GetTaskCodeByDate(string projectId, string date,string unitworkid,string unitid)
public static string GetTaskCodeByDate(string projectId, string date, string unitworkid, string unitid)
{
string code = string.Empty;
var list = (from x in Funs.DB.HJGL_WeldTask where x.ProjectId == projectId && x.UnitWorkId== unitworkid && x.UnitId== unitid && x.TaskDate == Convert.ToDateTime(date) orderby x.TaskCode descending select x.TaskCode).Distinct().ToList();
var list = (from x in Funs.DB.HJGL_WeldTask where x.ProjectId == projectId && x.UnitWorkId == unitworkid && x.UnitId == unitid && x.TaskDate == Convert.ToDateTime(date) orderby x.TaskCode descending select x.TaskCode).Distinct().ToList();
var count = list.Count;
code = date +"-"+ (count + 1).ToString("D3") + UnitService.GetUnitCodeByUnitId(unitid) + "-" + UnitWorkService.getUnitWorkByUnitWorkId(unitworkid)?.UnitWorkCode;
code = date + "-" + (count + 1).ToString("D3") + UnitService.GetUnitCodeByUnitId(unitid) + "-" + UnitWorkService.getUnitWorkByUnitWorkId(unitworkid)?.UnitWorkCode;
/*if (list.Count > 0)
{
string oldCode = list[0];
@@ -74,26 +71,26 @@ namespace BLL
public static string GetSerialNumberByDate(string projectId, string date, string unitworkid, string unitid)
{
string code = string.Empty;
string code = string.Empty;
var list = (from x in Funs.DB.HJGL_WeldTask where x.ProjectId == projectId && x.UnitWorkId == unitworkid && x.UnitId == unitid && x.TaskDate == Convert.ToDateTime(date) orderby x.TaskCode descending select x.TaskCode).Distinct().ToList();
var count = list.Count;
code = (count + 1).ToString("D3");
code = (count + 1).ToString("D3");
return code;
}
public static string GetSerialNumberByDate(string projectId,string taskCode)
public static string GetSerialNumberByDate(string projectId, string taskCode)
{
string result = string.Empty;
var list = (from x in Funs.DB.HJGL_WeldTask where x.ProjectId == projectId && x.TaskCode == taskCode orderby x.SerialNumber descending select x.SerialNumber).FirstOrDefault();
var list = (from x in Funs.DB.HJGL_WeldTask where x.ProjectId == projectId && x.TaskCode == taskCode orderby x.SerialNumber descending select x.SerialNumber).FirstOrDefault();
result = list?.ToString();
return result;
}
public static List<Model.View_HJGL_WeldingTask> GetWeldingTaskList(string ProjectId, string UnitWorkId, string unitId, DateTime taskDate, string canWelder,string serialNumber)
public static List<Model.View_HJGL_WeldingTask> GetWeldingTaskList(string ProjectId, string UnitWorkId, string unitId, DateTime taskDate, string canWelder, string serialNumber)
{
var q = from x in Funs.DB.View_HJGL_WeldingTask
where x.ProjectId == ProjectId && x.UnitWorkId == UnitWorkId
&& x.TaskDate.Value.Date == taskDate.Date
&& x.TaskDate.Value.Date == taskDate.Date
select x;
if (!string.IsNullOrEmpty(unitId))
@@ -173,8 +170,8 @@ namespace BLL
newWeldTask.TableDate = WeldTask.TableDate;
newWeldTask.WeldingMode = WeldTask.WeldingMode;
newWeldTask.IsSaved = WeldTask.IsSaved;
newWeldTask.SerialNumber= WeldTask.SerialNumber;
newWeldTask.PipeLineSortIndex= WeldTask.PipeLineSortIndex;
newWeldTask.SerialNumber = WeldTask.SerialNumber;
newWeldTask.PipeLineSortIndex = WeldTask.PipeLineSortIndex;
db.SubmitChanges();
}
}
@@ -1,11 +1,9 @@
using Aspose.Words;
using Model;
using Model;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using WIA;
namespace BLL
{
@@ -47,29 +45,29 @@ namespace BLL
{
List<Model.SpWeldingDailyItem> returnViewMatch = new List<Model.SpWeldingDailyItem>();
var weldlineLists = (from x in Funs.DB.View_HJGL_WeldJoint
where x.WeldingDailyId == weldingDailyId
select new SpWeldingDailyItem
{
WeldJointId = x.WeldJointId,
WeldJointCode = x.WeldJointCode,
PipelineCode = x.PipelineCode,
CoverWelderCode = x.CoverWelderCode,
CoverWelderId = x.CoverWelderId,
BackingWelderCode = x.BackingWelderCode,
BackingWelderId = x.BackingWelderId,
WeldTypeId = x.WeldTypeCode,
JointArea = x.JointArea,
WeldingLocationId = x.WeldingLocationId,
WeldingLocationCode = x.WeldingLocationCode,
JointAttribute = x.JointAttribute,
Size = x.Size,
Dia = x.Dia,
Thickness = x.Thickness,
WeldingMethodCode = x.WeldingMethodCode,
WeldingWireCode = x.WeldingWireCode,
WeldingRodCode = x.WeldingRodCode
where x.WeldingDailyId == weldingDailyId
select new SpWeldingDailyItem
{
WeldJointId = x.WeldJointId,
WeldJointCode = x.WeldJointCode,
PipelineCode = x.PipelineCode,
CoverWelderCode = x.CoverWelderCode,
CoverWelderId = x.CoverWelderId,
BackingWelderCode = x.BackingWelderCode,
BackingWelderId = x.BackingWelderId,
WeldTypeId = x.WeldTypeCode,
JointArea = x.JointArea,
WeldingLocationId = x.WeldingLocationId,
WeldingLocationCode = x.WeldingLocationCode,
JointAttribute = x.JointAttribute,
Size = x.Size,
Dia = x.Dia,
Thickness = x.Thickness,
WeldingMethodCode = x.WeldingMethodCode,
WeldingWireCode = x.WeldingWireCode,
WeldingRodCode = x.WeldingRodCode
}).ToList();
}).ToList();
returnViewMatch = weldlineLists;
//if (weldlineLists.Count() > 0)
//{
@@ -409,7 +407,7 @@ namespace BLL
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
var WeldingDailyCode = (from x in Funs.DB.HJGL_WeldingDaily
where x.WeldingDailyId == WeldingDailyId
where x.WeldingDailyId == WeldingDailyId
select x.WeldingDailyCode).FirstOrDefault();
if (!string.IsNullOrEmpty(WeldingDailyCode))
{
@@ -417,7 +415,7 @@ namespace BLL
}
return value;
}
public static Dictionary<string, object> GetFileOutValueByUnitWorkId(string UnitWorkId,string Month)
public static Dictionary<string, object> GetFileOutValueByUnitWorkId(string UnitWorkId, string Month)
{
var value = new Dictionary<string, object>();
var p = from x in Funs.DB.HJGL_WeldingDaily
@@ -435,7 +433,7 @@ namespace BLL
}
}
return value;
return value;
}
#region
/// <summary>