修改接口
This commit is contained in:
@@ -988,7 +988,7 @@ namespace BLL
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.HSSELogItem> getHSSELogDataList(string projectId, string userId)
|
||||
public static List<Model.HSSELogItem> getHSSELogDataList(string projectId, string userId,string CompileMan,string CompileDate)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
@@ -1017,6 +1017,15 @@ namespace BLL
|
||||
getInfoList = getInfoList.Where(x => x.CompileMan == userId).ToList();
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(CompileMan))
|
||||
{
|
||||
getInfoList = getInfoList.Where(x => x.CompileMan == CompileMan).ToList();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(CompileDate))
|
||||
{
|
||||
getInfoList = getInfoList.Where(x => x.CompileDate == CompileDate).ToList();
|
||||
}
|
||||
|
||||
return getInfoList;
|
||||
}
|
||||
}
|
||||
@@ -1043,33 +1052,117 @@ namespace BLL
|
||||
WeatherName = z.ConstText,
|
||||
|
||||
|
||||
Num11=x.Num11,
|
||||
Contents12=x.Contents12,
|
||||
Contents13=x.Contents13,
|
||||
Contents21=x.Contents21,
|
||||
Num21=x.Num21,
|
||||
Contents22=x.Contents22,
|
||||
Num22=x.Num22,
|
||||
Contents23=x.Contents23,
|
||||
Num23=x.Num23,
|
||||
Contents24=x.Contents24,
|
||||
Num24=x.Num24,
|
||||
Contents210=x.Contents210,
|
||||
Num210=x.Num210,
|
||||
Num211=x.Num211,
|
||||
Contents31=x.Contents31,
|
||||
Num31=x.Num31,
|
||||
Contents32=x.Contents32,
|
||||
Num32=x.Num32,
|
||||
Contents41=x.Contents41,
|
||||
Contents42=x.Contents42
|
||||
Content1 = x.Num11.ToString(),
|
||||
Content2= x.Contents12,
|
||||
Content3= x.Contents13,
|
||||
Content4= x.Contents21,
|
||||
Content5= x.Num21.ToString(),
|
||||
Content6= x.Contents22,
|
||||
Content7 = x.Num22.ToString(),
|
||||
Content8 = x.Contents23,
|
||||
Content9 = x.Num23.ToString(),
|
||||
Content10 = x.Contents24,
|
||||
Content11 = x.Num24.ToString(),
|
||||
Content12 = x.Contents210,
|
||||
Content13 = x.Num210.ToString(),
|
||||
Content14 = x.Num211.ToString(),
|
||||
Content15 = x.Contents31,
|
||||
Content16 = x.Num31.ToString(),
|
||||
Content17 = x.Contents32,
|
||||
Content18 = x.Num32.ToString(),
|
||||
Content19 = x.Contents41,
|
||||
Content20 = x.Contents42
|
||||
}).FirstOrDefault();
|
||||
|
||||
return model;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 增加HSSE日志暨管理数据收集
|
||||
/// </summary>
|
||||
/// <param name="HSSELog">HSSE日志暨管理数据收集实体</param>
|
||||
public static void AddHSSELogApi(Model.HSSELogItem HSSELog)
|
||||
{
|
||||
Model.Manager_HSSELog newHSSELog = new Model.Manager_HSSELog
|
||||
{
|
||||
HSSELogId = HSSELog.HSSELogId,
|
||||
ProjectId = HSSELog.ProjectId,
|
||||
CompileDate = Convert.ToDateTime(HSSELog.CompileDate),
|
||||
CompileMan = HSSELog.CompileMan,
|
||||
Weather = HSSELog.Weather,
|
||||
IsVisible = HSSELog.IsVisible,
|
||||
Num11 = Convert.ToInt32(HSSELog.Content1),
|
||||
Contents12 = HSSELog.Content2,
|
||||
Contents13 = HSSELog.Content3,
|
||||
Contents21 = HSSELog.Content4,
|
||||
Num21 = Convert.ToInt32(HSSELog.Content5),
|
||||
Contents22 = HSSELog.Content6,
|
||||
Num22 = Convert.ToInt32(HSSELog.Content7),
|
||||
Contents23 = HSSELog.Content8,
|
||||
Num23 = Convert.ToInt32(HSSELog.Content9),
|
||||
Contents24 = HSSELog.Content10,
|
||||
Num24 = Convert.ToInt32(HSSELog.Content11),
|
||||
|
||||
Contents210 = HSSELog.Content12,
|
||||
Num210 = Convert.ToInt32(HSSELog.Content13),
|
||||
Num211 = Convert.ToInt32(HSSELog.Content14),
|
||||
Contents31 = HSSELog.Content15,
|
||||
Num31 = Convert.ToInt32(HSSELog.Content16),
|
||||
Contents32 = HSSELog.Content17,
|
||||
Num32 = Convert.ToInt32(HSSELog.Content18),
|
||||
|
||||
Contents41 = HSSELog.Content19,
|
||||
Contents42 = HSSELog.Content20
|
||||
};
|
||||
Funs.DB.Manager_HSSELog.InsertOnSubmit(newHSSELog);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改HSSE日志暨管理数据收集
|
||||
/// </summary>
|
||||
/// <param name="updateHSSELog"></param>
|
||||
public static void UpdateHSSELogApi(Model.HSSELogItem updateHSSELog)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.Manager_HSSELog newHSSELog = db.Manager_HSSELog.FirstOrDefault(e => e.HSSELogId == updateHSSELog.HSSELogId);
|
||||
if (newHSSELog != null)
|
||||
{
|
||||
newHSSELog.CompileDate = Convert.ToDateTime(updateHSSELog.CompileDate);
|
||||
newHSSELog.CompileMan = updateHSSELog.CompileMan;
|
||||
newHSSELog.Weather = updateHSSELog.Weather;
|
||||
newHSSELog.IsVisible = updateHSSELog.IsVisible;
|
||||
|
||||
newHSSELog.Num11 = Convert.ToInt32(updateHSSELog.Content1);
|
||||
newHSSELog.Contents12 = updateHSSELog.Content2;
|
||||
newHSSELog.Contents13 = updateHSSELog.Content3;
|
||||
newHSSELog.Contents21 = updateHSSELog.Content4;
|
||||
newHSSELog.Num21 = Convert.ToInt32(updateHSSELog.Content5);
|
||||
newHSSELog.Contents22 = updateHSSELog.Content6;
|
||||
newHSSELog.Num22 = Convert.ToInt32(updateHSSELog.Content7);
|
||||
newHSSELog.Contents23 = updateHSSELog.Content8;
|
||||
newHSSELog.Num23 = Convert.ToInt32(updateHSSELog.Content9);
|
||||
newHSSELog.Contents24 = updateHSSELog.Content10;
|
||||
newHSSELog.Num24 = Convert.ToInt32(updateHSSELog.Content11);
|
||||
|
||||
newHSSELog.Contents210 = updateHSSELog.Content12;
|
||||
newHSSELog.Num210 = Convert.ToInt32(updateHSSELog.Content13);
|
||||
newHSSELog.Num211 = Convert.ToInt32(updateHSSELog.Content14);
|
||||
newHSSELog.Contents31 = updateHSSELog.Content15;
|
||||
newHSSELog.Num31 = Convert.ToInt32(updateHSSELog.Content16);
|
||||
newHSSELog.Contents32 = updateHSSELog.Content17;
|
||||
newHSSELog.Num32 = Convert.ToInt32(updateHSSELog.Content18);
|
||||
|
||||
newHSSELog.Contents41 = updateHSSELog.Content19;
|
||||
newHSSELog.Contents42 = updateHSSELog.Content20;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user