1、单位数据清理合并功能;
2、单位新增编辑功能调整,补充英文名称等; 3、建筑企业单位资质字典;
This commit is contained in:
@@ -61,11 +61,14 @@ SecurityProtocolType.Tls12;
|
||||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
string re = string.Empty;
|
||||
response = (HttpWebResponse)ex.Response;
|
||||
ResponseStream = response.GetResponseStream();
|
||||
StreamReader = new StreamReader(ResponseStream, Encoding.GetEncoding("utf-8"));
|
||||
|
||||
string re = StreamReader.ReadToEnd();
|
||||
if (response != null)
|
||||
{
|
||||
ResponseStream = response.GetResponseStream();
|
||||
StreamReader = new StreamReader(ResponseStream, Encoding.GetEncoding("utf-8"));
|
||||
re = StreamReader.ReadToEnd();
|
||||
}
|
||||
return re;
|
||||
}
|
||||
finally
|
||||
|
||||
@@ -132,6 +132,7 @@
|
||||
<Compile Include="API\HSSE\APITrainingPlanService.cs" />
|
||||
<Compile Include="API\HSSE\APITrainingTaskService.cs" />
|
||||
<Compile Include="API\HSSE\APITrainRecordService.cs" />
|
||||
<Compile Include="BaseInfo\QualificationService.cs" />
|
||||
<Compile Include="BaseInfo\SuperviseCheckTypeService.cs" />
|
||||
<Compile Include="BaseInfo\AccidentTypeService.cs" />
|
||||
<Compile Include="BaseInfo\BaseFactoryService.cs" />
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public static class QualificationService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取信息
|
||||
/// </summary>
|
||||
/// <param name="groupId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Base_Qualification GetQualificationById(string QualificationId)
|
||||
{
|
||||
return Funs.DB.Base_Qualification.FirstOrDefault(e => e.QualificationId == QualificationId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取信息
|
||||
/// </summary>
|
||||
/// <param name="groupId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Base_Qualification GetQualificationByName(string QualificationName)
|
||||
{
|
||||
return Funs.DB.Base_Qualification.FirstOrDefault(e => e.QualificationName == QualificationName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加
|
||||
/// </summary>
|
||||
/// <param name="?"></param>
|
||||
public static void AddQualification(Model.Base_Qualification model)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Base_Qualification newModel = new Model.Base_Qualification
|
||||
{
|
||||
QualificationId = model.QualificationId,
|
||||
QualificationCode = model.QualificationCode,
|
||||
QualificationName = model.QualificationName,
|
||||
QualificationType = model.QualificationType,
|
||||
Remark = model.Remark
|
||||
};
|
||||
|
||||
db.Base_Qualification.InsertOnSubmit(newModel);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="teamGroup"></param>
|
||||
public static void UpdateQualification(Model.Base_Qualification model)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Base_Qualification newModel = db.Base_Qualification.FirstOrDefault(e => e.QualificationId == model.QualificationId);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.QualificationCode = model.QualificationCode;
|
||||
newModel.QualificationName = model.QualificationName;
|
||||
newModel.QualificationType = model.QualificationType;
|
||||
newModel.Remark = model.Remark;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除信息
|
||||
/// </summary>
|
||||
/// <param name="QualificationId"></param>
|
||||
public static void DeleteQualificationById(string QualificationId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Base_Qualification model = db.Base_Qualification.FirstOrDefault(e => e.QualificationId == QualificationId);
|
||||
{
|
||||
db.Base_Qualification.DeleteOnSubmit(model);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取类别下拉项
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Base_Qualification> GetQualificationList()
|
||||
{
|
||||
var list = (from x in Funs.DB.Base_Qualification orderby x.QualificationCode select x).ToList();
|
||||
return list;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取建筑业企业资质下拉选项
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Base_Qualification> GetQualificationDropDownList()
|
||||
{
|
||||
var list = (from x in Funs.DB.Base_Qualification orderby x.QualificationCode select x).ToList();
|
||||
return list;
|
||||
}
|
||||
|
||||
#region 建筑业企业资质表下拉框
|
||||
/// <summary>
|
||||
/// 建筑业企业资质表下拉框
|
||||
/// </summary>
|
||||
/// <param name="dropName">下拉框名字</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
public static void InitQualificationDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "QualificationId";
|
||||
dropName.DataTextField = "QualificationName";
|
||||
dropName.DataSource = BLL.QualificationService.GetQualificationDropDownList();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键获取信息
|
||||
/// </summary>
|
||||
/// <param name="groupId"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetQualificationNameById(string QualificationId)
|
||||
{
|
||||
string name = string.Empty;
|
||||
var getType= Funs.DB.Base_Qualification.FirstOrDefault(e => e.QualificationId == QualificationId);
|
||||
if (getType != null)
|
||||
{
|
||||
name = getType.QualificationName;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1096,6 +1096,10 @@ namespace BLL
|
||||
/// </summary>
|
||||
public const string ProjectTypeMenuId = "AEB427BD-AE1A-47CC-9337-368BB06B37F7";
|
||||
/// <summary>
|
||||
/// 建筑业企业资质
|
||||
/// </summary>
|
||||
public const string QualificationMenuId = "CEB340BE-640E-4C95-ACB1-5E6207D4EDDA";
|
||||
/// <summary>
|
||||
/// 执业资格证书证书
|
||||
/// </summary>
|
||||
public const string PracticeCertificateMenuId = "1390195D8-874B-4E7B-8DBF-D81A5984E973";
|
||||
|
||||
@@ -43,6 +43,7 @@ namespace BLL
|
||||
{
|
||||
SubUnitQualityId = subUnitQuality.SubUnitQualityId,
|
||||
UnitId = subUnitQuality.UnitId,
|
||||
QualityId = subUnitQuality.QualityId,
|
||||
SubUnitQualityCode = subUnitQuality.SubUnitQualityCode,
|
||||
SubUnitQualityName = subUnitQuality.SubUnitQualityName,
|
||||
BusinessLicense = subUnitQuality.BusinessLicense,
|
||||
@@ -84,6 +85,7 @@ namespace BLL
|
||||
if (newSubUnitQuality != null)
|
||||
{
|
||||
newSubUnitQuality.UnitId = subUnitQuality.UnitId;
|
||||
newSubUnitQuality.QualityId = subUnitQuality.QualityId;
|
||||
newSubUnitQuality.SubUnitQualityCode = subUnitQuality.SubUnitQualityCode;
|
||||
newSubUnitQuality.SubUnitQualityName = subUnitQuality.SubUnitQualityName;
|
||||
newSubUnitQuality.BusinessLicense = subUnitQuality.BusinessLicense;
|
||||
|
||||
+104
-20
@@ -28,7 +28,7 @@ namespace BLL
|
||||
private static SqlCommand BuildIntCommand(string storedProcName, IDataParameter[] parameters)
|
||||
{
|
||||
SqlCommand command = BuildQueryCommand(storedProcName, parameters);
|
||||
|
||||
|
||||
command.Parameters.Add(new SqlParameter("ReturnValue",
|
||||
SqlDbType.Int,
|
||||
4, /* Size */
|
||||
@@ -71,7 +71,7 @@ namespace BLL
|
||||
finally
|
||||
{
|
||||
Connection.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ namespace BLL
|
||||
using (SqlConnection Connection = new SqlConnection(connectionString))
|
||||
{
|
||||
try
|
||||
{
|
||||
{
|
||||
Connection.Open();
|
||||
SqlCommand command = new SqlCommand(storedProcName, Connection)
|
||||
{
|
||||
@@ -222,7 +222,7 @@ namespace BLL
|
||||
using (SqlConnection Connection = new SqlConnection(connectionString))
|
||||
{
|
||||
try
|
||||
{
|
||||
{
|
||||
Connection.Open();
|
||||
SqlCommand command = new SqlCommand(storedProcName, Connection)
|
||||
{
|
||||
@@ -260,7 +260,7 @@ namespace BLL
|
||||
using (SqlConnection Connection = new SqlConnection(connectionString))
|
||||
{
|
||||
try
|
||||
{
|
||||
{
|
||||
Connection.Open();
|
||||
SqlCommand command = new SqlCommand(storedProcName, Connection)
|
||||
{
|
||||
@@ -295,7 +295,7 @@ namespace BLL
|
||||
using (SqlConnection Connection = new SqlConnection(connectionString))
|
||||
{
|
||||
try
|
||||
{
|
||||
{
|
||||
Connection.Open();
|
||||
SqlCommand command = new SqlCommand(strSql, Connection)
|
||||
{
|
||||
@@ -332,7 +332,7 @@ namespace BLL
|
||||
using (SqlConnection Connection = new SqlConnection(connectionString))
|
||||
{
|
||||
try
|
||||
{
|
||||
{
|
||||
Connection.Open();
|
||||
SqlCommand command = BuildQueryCommand(storedProcName, parameters);
|
||||
command.CommandTimeout = 0;
|
||||
@@ -344,6 +344,86 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 执行存储过程【无返回值】
|
||||
/// </summary>
|
||||
/// <param name="procedureName"></param>
|
||||
/// <param name="parameters"></param>
|
||||
public static void ExecuteNonQueryStoredProcedure(string procedureName, SqlParameter[] parameters = null)
|
||||
{
|
||||
using (SqlConnection connection = new SqlConnection(connectionString))
|
||||
{
|
||||
try
|
||||
{
|
||||
// 打开连接
|
||||
connection.Open();
|
||||
using (SqlCommand command = new SqlCommand(procedureName, connection))
|
||||
{
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
if (parameters != null)
|
||||
{
|
||||
command.Parameters.AddRange(parameters);
|
||||
}
|
||||
// 执行存储过程
|
||||
command.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// 处理异常,例如记录日志等
|
||||
Console.WriteLine("An error occurred: " + ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
connection.Close(); // Ensures the connection is closed even if an exception occurs
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 执行存储过程【返回int结果值】
|
||||
/// </summary>
|
||||
/// <param name="procedureName"></param>
|
||||
/// <param name="parameters"></param>
|
||||
/// <returns></returns>
|
||||
public static int ExecuteProcedure(string procedureName, SqlParameter[] parameters = null)
|
||||
{
|
||||
using (SqlConnection connection = new SqlConnection(connectionString))
|
||||
{
|
||||
try
|
||||
{
|
||||
// 打开连接
|
||||
connection.Open();
|
||||
using (SqlCommand command = new SqlCommand(procedureName, connection))
|
||||
{
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
if (parameters != null)
|
||||
{
|
||||
command.Parameters.AddRange(parameters);
|
||||
}
|
||||
command.Parameters["@returnVal"].Direction = ParameterDirection.Output;
|
||||
// 执行存储过程
|
||||
command.ExecuteNonQuery();
|
||||
// 获取返回值,如果存储过程有返回值参数,可以从参数中获取,例如:
|
||||
return (int)command.Parameters["returnVal"].Value;
|
||||
// 如果存储过程没有返回输出参数,而是通过其他方式(如SELECT语句)返回一个整数值,则需要修改为以下方式:
|
||||
//SqlCommand cmd = new SqlCommand("SELECT @RETURN_VALUE", connection); // 这里@RETURN_VALUE是你在存储过程中设置的变量名,例如SET @RETURN_VALUE = 1;
|
||||
//return (int)cmd.ExecuteScalar(); // 使用ExecuteScalar获取单个值结果
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// 处理异常,例如记录日志等
|
||||
Console.WriteLine("An error occurred: " + ex.Message);
|
||||
return 0;
|
||||
}
|
||||
finally
|
||||
{
|
||||
connection.Close(); // Ensures the connection is closed even if an exception occurs
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取字符串
|
||||
/// </summary>
|
||||
@@ -355,7 +435,7 @@ namespace BLL
|
||||
using (SqlConnection Connection = new SqlConnection(connectionString))
|
||||
{
|
||||
try
|
||||
{
|
||||
{
|
||||
Connection.Open();
|
||||
SqlCommand command = new SqlCommand(sql, Connection)
|
||||
{
|
||||
@@ -379,7 +459,7 @@ namespace BLL
|
||||
using (SqlConnection Connection = new SqlConnection(connectionString))
|
||||
{
|
||||
try
|
||||
{
|
||||
{
|
||||
Connection.Open();
|
||||
SqlCommand command = new SqlCommand(sql, Connection)
|
||||
{
|
||||
@@ -405,7 +485,7 @@ namespace BLL
|
||||
using (SqlConnection Connection = new SqlConnection(connectionString))
|
||||
{
|
||||
try
|
||||
{
|
||||
{
|
||||
Connection.Open();
|
||||
SqlCommand command = new SqlCommand(sql, Connection)
|
||||
{
|
||||
@@ -413,6 +493,10 @@ namespace BLL
|
||||
CommandType = CommandType.Text
|
||||
};
|
||||
command.ExecuteNonQuery();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -436,7 +520,7 @@ namespace BLL
|
||||
using (SqlConnection Connection = new SqlConnection(connectionString))
|
||||
{
|
||||
try
|
||||
{
|
||||
{
|
||||
Connection.Open();
|
||||
SqlDataAdapter sqlDA = new SqlDataAdapter
|
||||
{
|
||||
@@ -467,7 +551,7 @@ namespace BLL
|
||||
using (SqlConnection Connection = new SqlConnection(connectionString))
|
||||
{
|
||||
try
|
||||
{
|
||||
{
|
||||
Connection.Open();
|
||||
SqlDataAdapter sqlDA = new SqlDataAdapter
|
||||
{
|
||||
@@ -494,7 +578,7 @@ namespace BLL
|
||||
using (SqlConnection Connection = new SqlConnection(connectionString))
|
||||
{
|
||||
try
|
||||
{
|
||||
{
|
||||
Connection.Open();
|
||||
SqlCommand command = new SqlCommand(strSql, Connection)
|
||||
{
|
||||
@@ -525,7 +609,7 @@ namespace BLL
|
||||
using (SqlConnection Connection = new SqlConnection(connectionString))
|
||||
{
|
||||
try
|
||||
{
|
||||
{
|
||||
Connection.Open();
|
||||
SqlCommand command = new SqlCommand(strSql, Connection)
|
||||
{
|
||||
@@ -554,7 +638,7 @@ namespace BLL
|
||||
using (SqlConnection Connection = new SqlConnection(connectionString))
|
||||
{
|
||||
try
|
||||
{
|
||||
{
|
||||
Connection.Open();
|
||||
SqlCommand command = new SqlCommand(strSql, Connection)
|
||||
{
|
||||
@@ -751,7 +835,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
/// <param name="pur_name">存储过程名称</param>
|
||||
/// <param name="parmList">存储过程的{参数--值}的集合</param>
|
||||
public static void RunProcedure(string pur_name, Hashtable parmList, ref int returnValue)
|
||||
public static void RunProcedure(string pur_name, Hashtable parmList, ref int returnValue)
|
||||
{
|
||||
using (SqlConnection Connection = new SqlConnection(connectionString))
|
||||
{
|
||||
@@ -823,7 +907,7 @@ namespace BLL
|
||||
SqlTransaction trans = null;
|
||||
|
||||
try
|
||||
{
|
||||
{
|
||||
cmd.Connection.Open();
|
||||
trans = cmd.Connection.BeginTransaction();
|
||||
cmd.Transaction = trans;
|
||||
@@ -862,7 +946,7 @@ namespace BLL
|
||||
using (SqlConnection Connection = new SqlConnection(connectionString))
|
||||
{
|
||||
try
|
||||
{
|
||||
{
|
||||
Connection.Open();
|
||||
SqlCommand command = new SqlCommand(storedProcName, Connection)
|
||||
{
|
||||
@@ -902,7 +986,7 @@ namespace BLL
|
||||
using (SqlConnection Connection = new SqlConnection(connectionString))
|
||||
{
|
||||
try
|
||||
{
|
||||
{
|
||||
Connection.Open();
|
||||
SqlCommand command = new SqlCommand(storedProcName, Connection)
|
||||
{
|
||||
@@ -978,7 +1062,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
/// <param name="storedProcName"></param>
|
||||
/// <returns></returns>
|
||||
public static int RunProcGetHsseKq(string ProjectId,DateTime startTime,DateTime endTime,string UnitId)
|
||||
public static int RunProcGetHsseKq(string ProjectId, DateTime startTime, DateTime endTime, string UnitId)
|
||||
{
|
||||
string str = "";
|
||||
using (SqlConnection Connection = new SqlConnection(connectionString))
|
||||
|
||||
@@ -33,6 +33,17 @@ namespace BLL
|
||||
var unit = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitId != unitId && x.UnitName == unitName);
|
||||
return (unit != null);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取单位信息是否存在
|
||||
/// </summary>
|
||||
/// <param name="unitId"></param>
|
||||
/// <param name="unitEnName"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsExitUnitByUnitEnName(string unitId, string unitEnName)
|
||||
{
|
||||
var unit = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitId != unitId && x.UnitEnName == unitEnName);
|
||||
return (unit != null);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取单位信息是否存在
|
||||
@@ -58,6 +69,7 @@ namespace BLL
|
||||
UnitId = unit.UnitId,
|
||||
UnitCode = unit.UnitCode,
|
||||
UnitName = unit.UnitName,
|
||||
UnitEnName = unit.UnitEnName,
|
||||
ShortUnitName = unit.ShortUnitName,
|
||||
UnitTypeId = unit.UnitTypeId,
|
||||
Corporate = unit.Corporate,
|
||||
@@ -95,6 +107,7 @@ namespace BLL
|
||||
{
|
||||
newUnit.UnitCode = unit.UnitCode;
|
||||
newUnit.UnitName = unit.UnitName;
|
||||
newUnit.UnitEnName = unit.UnitEnName;
|
||||
newUnit.UnitTypeId = unit.UnitTypeId;
|
||||
newUnit.Corporate = unit.Corporate;
|
||||
newUnit.Address = unit.Address;
|
||||
|
||||
@@ -1095,6 +1095,7 @@
|
||||
#endregion
|
||||
|
||||
#region 建筑行业能源节约与生态环境保护汇总表上报
|
||||
|
||||
/// <summary>
|
||||
/// 建筑行业能源节约与生态环境保护汇总表上报
|
||||
/// </summary>
|
||||
@@ -1105,7 +1106,7 @@
|
||||
{
|
||||
try
|
||||
{
|
||||
CNCECHSSEService.HSSEServiceClient hsseC = new CNCECHSSEService.HSSEServiceClient();
|
||||
|
||||
var upReport = from x in db.Environmental_ArchitectureReport
|
||||
where x.ArchitectureReportId == chemicalReportId
|
||||
select new Model.ArchitectureReport
|
||||
@@ -1113,7 +1114,7 @@
|
||||
ArchitectureReportId = x.ArchitectureReportId,
|
||||
UnitId = x.UnitId,
|
||||
Year = x.Year,
|
||||
Quarters = x.Quarters,
|
||||
Month = x.Month,
|
||||
FillingMan = x.FillingMan,
|
||||
FillingDate = x.FillingDate,
|
||||
DutyPerson = x.DutyPerson,
|
||||
@@ -1149,7 +1150,7 @@
|
||||
////更新 当前人要处理的意见
|
||||
ProjectDataFlowSetService.CloseFlowOperate(Const.ArchitectureReportMenuId, item, string.Empty);
|
||||
// //更新催报信息
|
||||
UrgeReportService.SetComplete(report.UnitId, Const.ReportType_1, report.Year.ToString(), report.Quarters.ToString());
|
||||
UrgeReportService.SetComplete(report.UnitId, Const.ReportType_1, report.Year.ToString(), report.Month.ToString());
|
||||
}
|
||||
}
|
||||
LogService.AddSys_Log(CurrUser, "【建筑行业能源节约与生态环境保护汇总表】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.ArchitectureReportMenuId, BLL.Const.BtnUploadResources);
|
||||
@@ -1167,6 +1168,7 @@
|
||||
return code;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// UpApiArchitectureReportApi调用
|
||||
/// </summary>
|
||||
|
||||
@@ -57,12 +57,12 @@ namespace BLL
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportItemId">建筑行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.Environmental_ArchitectureReportItem> GetYearSumItems(string unitId, int? year, int? Quarters)
|
||||
public static List<Model.Environmental_ArchitectureReportItem> GetYearSumItems(string unitId, int? year, int? Month)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ArchitectureReportItem
|
||||
join y in Funs.DB.Environmental_ArchitectureReport
|
||||
on x.ArchitectureReportId equals y.ArchitectureReportId
|
||||
where y.UnitId == unitId && y.Year == year && y.Quarters == Quarters
|
||||
where y.UnitId == unitId && y.Year == year && y.Month == Month
|
||||
orderby x.SortIndex
|
||||
select x).Distinct().ToList();
|
||||
}
|
||||
|
||||
@@ -25,9 +25,9 @@ namespace BLL
|
||||
/// <param name = "year" > 年度 </ param >
|
||||
/// <param name="month">月份</param>
|
||||
/// <returns>建筑行业能源节约与生态环境保护汇总表</returns>
|
||||
public static Model.Environmental_ArchitectureReport GetArchitectureReportByUnitIdAndYearAndQuarters(string unitId, int year, int Quarters)
|
||||
public static Model.Environmental_ArchitectureReport GetArchitectureReportByUnitIdAndYearAndQuarters(string unitId, int year, int month)
|
||||
{
|
||||
return Funs.DB.Environmental_ArchitectureReport.FirstOrDefault(e => e.UnitId == unitId && e.Quarters == Quarters && e.Year == year);
|
||||
return Funs.DB.Environmental_ArchitectureReport.FirstOrDefault(e => e.UnitId == unitId && e.Month == month && e.Year == year);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -50,7 +50,7 @@ namespace BLL
|
||||
{
|
||||
ArchitectureReportId = ArchitectureReport.ArchitectureReportId,
|
||||
Year = ArchitectureReport.Year,
|
||||
Quarters = ArchitectureReport.Quarters,
|
||||
Month = ArchitectureReport.Month,
|
||||
UnitId = ArchitectureReport.UnitId,
|
||||
FillingDate = ArchitectureReport.FillingDate,
|
||||
DutyPerson = ArchitectureReport.DutyPerson,
|
||||
@@ -72,7 +72,7 @@ namespace BLL
|
||||
if (newArchitectureReport != null)
|
||||
{
|
||||
newArchitectureReport.Year = ArchitectureReport.Year;
|
||||
newArchitectureReport.Quarters = ArchitectureReport.Quarters;
|
||||
newArchitectureReport.Month = ArchitectureReport.Month;
|
||||
newArchitectureReport.UnitId = ArchitectureReport.UnitId;
|
||||
newArchitectureReport.FillingDate = ArchitectureReport.FillingDate;
|
||||
newArchitectureReport.DutyPerson = ArchitectureReport.DutyPerson;
|
||||
@@ -83,7 +83,7 @@ namespace BLL
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据Id获取数据
|
||||
/// 根据Id删除数据
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportId"></param>
|
||||
public static void DeleteArchitectureReportByArchitectureReportId(string ArchitectureReportId)
|
||||
@@ -101,9 +101,9 @@ namespace BLL
|
||||
/// </summary>
|
||||
/// <param name="Id">Id</param>
|
||||
/// <returns></returns>
|
||||
public static Model.Environmental_ArchitectureReport GetArchitectureReportByUnitIdDate(string unitId, int year, int Quarters)
|
||||
public static Model.Environmental_ArchitectureReport GetArchitectureReportByUnitIdDate(string unitId, int year, int month)
|
||||
{
|
||||
return Funs.DB.Environmental_ArchitectureReport.FirstOrDefault(e => e.UnitId == unitId && e.Year == year && e.Quarters == Quarters);
|
||||
return Funs.DB.Environmental_ArchitectureReport.FirstOrDefault(e => e.UnitId == unitId && e.Year == year && e.Month == month);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -57,12 +57,12 @@ namespace BLL
|
||||
/// </summary>
|
||||
/// <param name="ArchitectureReportItemId">建筑行业能源节约与生态环境保护汇总明细表Id</param>
|
||||
/// <returns>明细记录集合</returns>
|
||||
public static List<Model.Environmental_ProjectArchitectureReportItem> GetYearSumItems(string projectId, int? year, int? Quarters)
|
||||
public static List<Model.Environmental_ProjectArchitectureReportItem> GetYearSumItems(string projectId, int? year, int? Month)
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_ProjectArchitectureReportItem
|
||||
join y in Funs.DB.Environmental_ProjectArchitectureReport
|
||||
on x.ArchitectureReportId equals y.ArchitectureReportId
|
||||
where y.ProjectId == projectId && y.Year == year && y.Quarters == Quarters
|
||||
where y.ProjectId == projectId && y.Year == year && y.Month == Month
|
||||
orderby x.SortIndex
|
||||
select x).Distinct().ToList();
|
||||
}
|
||||
|
||||
@@ -25,9 +25,9 @@ namespace BLL
|
||||
/// <param name = "year" > 年度 </ param >
|
||||
/// <param name="month">月份</param>
|
||||
/// <returns>建筑行业能源节约与生态环境保护汇总表</returns>
|
||||
public static Model.Environmental_ProjectArchitectureReport GetArchitectureReportByProjectIdAndYearAndQuarters(string projectId, int year, int Quarters)
|
||||
public static Model.Environmental_ProjectArchitectureReport GetArchitectureReportByProjectIdAndYearAndQuarters(string projectId, int year, int Month)
|
||||
{
|
||||
return Funs.DB.Environmental_ProjectArchitectureReport.FirstOrDefault(e => e.ProjectId == projectId && e.Quarters == Quarters && e.Year == year);
|
||||
return Funs.DB.Environmental_ProjectArchitectureReport.FirstOrDefault(e => e.ProjectId == projectId && e.Month == Month && e.Year == year);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -50,7 +50,7 @@ namespace BLL
|
||||
{
|
||||
ArchitectureReportId = ArchitectureReport.ArchitectureReportId,
|
||||
Year = ArchitectureReport.Year,
|
||||
Quarters = ArchitectureReport.Quarters,
|
||||
Month = ArchitectureReport.Month,
|
||||
ProjectId = ArchitectureReport.ProjectId,
|
||||
FillingDate = ArchitectureReport.FillingDate,
|
||||
DutyPerson = ArchitectureReport.DutyPerson,
|
||||
@@ -72,7 +72,7 @@ namespace BLL
|
||||
if (newArchitectureReport != null)
|
||||
{
|
||||
newArchitectureReport.Year = ArchitectureReport.Year;
|
||||
newArchitectureReport.Quarters = ArchitectureReport.Quarters;
|
||||
newArchitectureReport.Month = ArchitectureReport.Month;
|
||||
newArchitectureReport.ProjectId = ArchitectureReport.ProjectId;
|
||||
newArchitectureReport.FillingDate = ArchitectureReport.FillingDate;
|
||||
newArchitectureReport.DutyPerson = ArchitectureReport.DutyPerson;
|
||||
@@ -101,9 +101,9 @@ namespace BLL
|
||||
/// </summary>
|
||||
/// <param name="Id">Id</param>
|
||||
/// <returns></returns>
|
||||
public static Model.Environmental_ProjectArchitectureReport GetArchitectureReportByProjectIdDate(string ProjectId, int year, int Quarters)
|
||||
public static Model.Environmental_ProjectArchitectureReport GetArchitectureReportByProjectIdDate(string ProjectId, int year, int Month)
|
||||
{
|
||||
return Funs.DB.Environmental_ProjectArchitectureReport.FirstOrDefault(e => e.ProjectId == ProjectId && e.Year == year && e.Quarters == Quarters);
|
||||
return Funs.DB.Environmental_ProjectArchitectureReport.FirstOrDefault(e => e.ProjectId == ProjectId && e.Year == year && e.Month == Month);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user