This commit is contained in:
2024-09-05 14:09:58 +08:00
20 changed files with 1679 additions and 231 deletions
@@ -86,6 +86,14 @@ namespace BLL
BLL.CommonService.DeleteAttachFileById(EmergencyTeamAndTrain.FileId);
////删除流程表
BLL.CommonService.DeleteFlowOperateByID(EmergencyTeamAndTrain.FileId);
//删除子表
var list = db.Emergency_EmergencyTeamItem.Where(x => x.FileId == FileId).ToList();
if (list.Count>0)
{
db.Emergency_EmergencyTeamItem.DeleteAllOnSubmit(list);
}
db.Emergency_EmergencyTeamAndTrain.DeleteOnSubmit(EmergencyTeamAndTrain);
db.SubmitChanges();
}
@@ -36,9 +36,11 @@ namespace BLL
FirstAidDressing = injuryAccident.FirstAidDressing,
MedicalTreatment = injuryAccident.MedicalTreatment,
WorkLimitation = injuryAccident.WorkLimitation,
LossCount = injuryAccident.LossCount,
LossPerson = injuryAccident.LossPerson,
LossWorkTime = injuryAccident.LossWorkTime,
LossEconomy = injuryAccident.LossEconomy,
DeathCount=injuryAccident.DeathCount,
DeathPerson = injuryAccident.DeathPerson,
DeathWorkTime = injuryAccident.DeathWorkTime,
DeathEconomy = injuryAccident.DeathEconomy
@@ -369,5 +369,6 @@ namespace BLL
db.SubmitChanges();
}
#endregion
}
}
+39
View File
@@ -972,5 +972,44 @@ namespace BLL
maxId = GetIntValue(str);
return maxId;
}
/// <summary>
/// 通过存储过程获取数据
/// </summary>
/// <param name="storedProcName"></param>
/// <returns></returns>
public static int RunProcGetHsseKq(string ProjectId,DateTime startTime,DateTime endTime,string UnitId)
{
string str = "";
using (SqlConnection Connection = new SqlConnection(connectionString))
{
try
{
Connection.Open();
SqlCommand command = new SqlCommand("SpGetHsseKq", Connection)
{
CommandTimeout = 0,
CommandType = CommandType.StoredProcedure
};
SqlParameter[] values = new SqlParameter[]
{
new SqlParameter("@ProjectId", ProjectId),
new SqlParameter("@startTime", startTime.ToString()),
new SqlParameter("@endTime", endTime.ToString()),
new SqlParameter("@UnitId", UnitId),
new SqlParameter("@returnVal", SqlDbType.Int)
};
command.Parameters.AddRange(values);
command.Parameters["@returnVal"].Direction = ParameterDirection.Output;
command.ExecuteNonQuery();
str = command.Parameters["@returnVal"].Value.ToString();
}
finally
{
Connection.Close();
}
return Convert.ToInt32(str);
}
}
}
}