diff --git a/DataBase/版本日志/SGGLDB_2025-06-04-geh.sql b/DataBase/版本日志/SGGLDB_2025-06-04-geh.sql
new file mode 100644
index 0000000..a165989
Binary files /dev/null and b/DataBase/版本日志/SGGLDB_2025-06-04-geh.sql differ
diff --git a/DataBase/版本日志/SGGLDB_2025-06-18-geh.sql b/DataBase/版本日志/SGGLDB_2025-06-18-geh.sql
new file mode 100644
index 0000000..8a088cb
Binary files /dev/null and b/DataBase/版本日志/SGGLDB_2025-06-18-geh.sql differ
diff --git a/SUBQHSE/BLL/BLL.csproj b/SUBQHSE/BLL/BLL.csproj
index 0dce8de..e2b3966 100644
--- a/SUBQHSE/BLL/BLL.csproj
+++ b/SUBQHSE/BLL/BLL.csproj
@@ -279,6 +279,7 @@
+
@@ -381,6 +382,7 @@
+
@@ -894,6 +896,7 @@
+
diff --git a/SUBQHSE/BLL/BaseInfo/SuperviseCheckTypeService.cs b/SUBQHSE/BLL/BaseInfo/SuperviseCheckTypeService.cs
new file mode 100644
index 0000000..2fd0e9f
--- /dev/null
+++ b/SUBQHSE/BLL/BaseInfo/SuperviseCheckTypeService.cs
@@ -0,0 +1,107 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BLL
+{
+ ///
+ /// 企业大检查类别
+ ///
+ public class SuperviseCheckTypeService
+ {
+ ///
+ /// 根据主键获取检查类别
+ ///
+ ///
+ ///
+ public static Model.Base_SuperviseCheckType GetCheckTypeById(string checkTypeId)
+ {
+ return Funs.DB.Base_SuperviseCheckType.FirstOrDefault(e => e.CheckTypeId == checkTypeId);
+ }
+
+ ///
+ /// 添加检查类别
+ ///
+ ///
+ public static void AddCheckType(Model.Base_SuperviseCheckType checkType)
+ {
+ Model.Base_SuperviseCheckType newCheckType = new Model.Base_SuperviseCheckType
+ {
+ CheckTypeId = checkType.CheckTypeId,
+ CheckTypeCode = checkType.CheckTypeCode,
+ CheckTypeName = checkType.CheckTypeName,
+ CheckMainType = checkType.CheckMainType,
+ Remark = checkType.Remark
+ };
+ Funs.DB.Base_SuperviseCheckType.InsertOnSubmit(newCheckType);
+ Funs.DB.SubmitChanges();
+ }
+
+ ///
+ /// 修改检查类别
+ ///
+ ///
+ public static void UpdateCheckType(Model.Base_SuperviseCheckType checkType)
+ {
+ Model.Base_SuperviseCheckType newCheckType = Funs.DB.Base_SuperviseCheckType.FirstOrDefault(e => e.CheckTypeId == checkType.CheckTypeId);
+ if (newCheckType != null)
+ {
+ newCheckType.CheckTypeCode = checkType.CheckTypeCode;
+ newCheckType.CheckTypeName = checkType.CheckTypeName;
+ newCheckType.CheckMainType = checkType.CheckMainType;
+ newCheckType.Remark = checkType.Remark;
+ Funs.DB.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据主键删除检查类别
+ ///
+ ///
+ public static void DeleteCheckTypeById(string checkTypeId)
+ {
+ Model.Base_SuperviseCheckType newCheckType = Funs.DB.Base_SuperviseCheckType.FirstOrDefault(e => e.CheckTypeId == checkTypeId);
+ if (newCheckType != null)
+ {
+ Funs.DB.Base_SuperviseCheckType.DeleteOnSubmit(newCheckType);
+ Funs.DB.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 获取检查类别下拉列表项
+ ///
+ ///
+ public static List GetCheckTypeListByMainType(string mainType)
+ {
+ if (!string.IsNullOrWhiteSpace(mainType))
+ {
+ return (from x in Funs.DB.Base_SuperviseCheckType where x.CheckMainType == mainType orderby x.CheckTypeCode select x).ToList();
+ }
+ else
+ {
+ return (from x in Funs.DB.Base_SuperviseCheckType orderby x.CheckTypeCode select x).ToList();
+ }
+ }
+
+ ///
+ /// 检查类别下拉框
+ ///
+ /// 下拉框名字
+ /// 检查大类
+ /// 是否显示请选择
+ public static void InitCheckTypeDropDownListByMainType(FineUIPro.DropDownList dropName, string mainType, bool isShowPlease)
+ {
+ dropName.DataValueField = "CheckTypeCode";
+ dropName.DataTextField = "CheckTypeName";
+ dropName.DataSource = GetCheckTypeListByMainType(mainType);
+ dropName.DataBind();
+ if (isShowPlease)
+ {
+ Funs.FineUIPleaseSelect(dropName);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/SUBQHSE/BLL/CQMS/Check/CheckControlService.cs b/SUBQHSE/BLL/CQMS/Check/CheckControlService.cs
index 7e978ee..45d317d 100644
--- a/SUBQHSE/BLL/CQMS/Check/CheckControlService.cs
+++ b/SUBQHSE/BLL/CQMS/Check/CheckControlService.cs
@@ -242,6 +242,7 @@ namespace BLL
newCheckControl.ReAttachUrl = CheckControl.ReAttachUrl;
newCheckControl.State = CheckControl.State;
newCheckControl.SaveHandleMan = CheckControl.SaveHandleMan;
+ newCheckControl.IsUpdate = null;
db.SubmitChanges();
}
diff --git a/SUBQHSE/BLL/CQMS/QualityActivity/QCManage/QCManage_QCGroupRegistrationService.cs b/SUBQHSE/BLL/CQMS/QualityActivity/QCManage/QCManage_QCGroupRegistrationService.cs
new file mode 100644
index 0000000..84ac4cc
--- /dev/null
+++ b/SUBQHSE/BLL/CQMS/QualityActivity/QCManage/QCManage_QCGroupRegistrationService.cs
@@ -0,0 +1,85 @@
+using System.Collections.Generic;
+using System.Linq;
+using System.Web.UI.WebControls;
+
+namespace BLL
+{
+ public class QCManage_QCGroupRegistrationService
+ {
+ ///
+ /// 获取QC管理-QC小组注册信息
+ ///
+ ///
+ ///
+ public static Model.QCManage_QCGroupRegistration GetQCGroupRegistrationByQCGroupRegistrationId(string QCGroupRegistrationId)
+ {
+ return Funs.DB.QCManage_QCGroupRegistration.FirstOrDefault(e => e.QCGroupRegistrationId == QCGroupRegistrationId);
+ }
+ ///
+ /// 添加QC管理-QC小组注册信息
+ ///
+ ///
+ public static void AddQCGroupRegistration(Model.QCManage_QCGroupRegistration QCGroupRegistration)
+ {
+ Model.SUBQHSEDB db = Funs.DB;
+ Model.QCManage_QCGroupRegistration newQCGroupRegistration = new Model.QCManage_QCGroupRegistration();
+ newQCGroupRegistration.QCGroupRegistrationId = QCGroupRegistration.QCGroupRegistrationId;
+ newQCGroupRegistration.ProjectId = QCGroupRegistration.ProjectId;
+ newQCGroupRegistration.Code = QCGroupRegistration.Code;
+ newQCGroupRegistration.Name = QCGroupRegistration.Name;
+ newQCGroupRegistration.CompileMan = QCGroupRegistration.CompileMan;
+ newQCGroupRegistration.CompileDate = QCGroupRegistration.CompileDate;
+ newQCGroupRegistration.UnitId = QCGroupRegistration.UnitId;
+ newQCGroupRegistration.Subjects = QCGroupRegistration.Subjects;
+ newQCGroupRegistration.Process = QCGroupRegistration.Process;
+ newQCGroupRegistration.Achievement = QCGroupRegistration.Achievement;
+ newQCGroupRegistration.AwardName = QCGroupRegistration.AwardName;
+ newQCGroupRegistration.AwardType = QCGroupRegistration.AwardType;
+ newQCGroupRegistration.AwardLevel = QCGroupRegistration.AwardLevel;
+ newQCGroupRegistration.AwardingUnit = QCGroupRegistration.AwardingUnit;
+ db.QCManage_QCGroupRegistration.InsertOnSubmit(newQCGroupRegistration);
+ db.SubmitChanges();
+ }
+
+ ///
+ /// 修改QC管理-QC小组注册信息
+ ///
+ ///
+ public static void UpdateQCGroupRegistration(Model.QCManage_QCGroupRegistration QCGroupRegistration)
+ {
+ Model.SUBQHSEDB db = Funs.DB;
+ Model.QCManage_QCGroupRegistration newQCGroupRegistration = db.QCManage_QCGroupRegistration.FirstOrDefault(e => e.QCGroupRegistrationId == QCGroupRegistration.QCGroupRegistrationId);
+ if (newQCGroupRegistration != null)
+ {
+ newQCGroupRegistration.Code = QCGroupRegistration.Code;
+ newQCGroupRegistration.Name = QCGroupRegistration.Name;
+ newQCGroupRegistration.CompileMan = QCGroupRegistration.CompileMan;
+ newQCGroupRegistration.CompileDate = QCGroupRegistration.CompileDate;
+ newQCGroupRegistration.UnitId = QCGroupRegistration.UnitId;
+ newQCGroupRegistration.Subjects = QCGroupRegistration.Subjects;
+ newQCGroupRegistration.Process = QCGroupRegistration.Process;
+ newQCGroupRegistration.Achievement = QCGroupRegistration.Achievement;
+ newQCGroupRegistration.AwardName = QCGroupRegistration.AwardName;
+ newQCGroupRegistration.AwardLevel = QCGroupRegistration.AwardLevel;
+ newQCGroupRegistration.AwardingUnit = QCGroupRegistration.AwardingUnit;
+ newQCGroupRegistration.IsUpdate = null;
+ newQCGroupRegistration.AwardType = QCGroupRegistration.AwardType;
+ db.SubmitChanges();
+ }
+ }
+ ///
+ /// 根据主键删除QC管理-QC小组注册信息
+ ///
+ ///
+ public static void DeleteQCGroupRegistrationById(string QCGroupRegistrationId)
+ {
+ Model.SUBQHSEDB db = Funs.DB;
+ Model.QCManage_QCGroupRegistration QCGroupRegistration = db.QCManage_QCGroupRegistration.FirstOrDefault(e => e.QCGroupRegistrationId == QCGroupRegistrationId);
+ if (QCGroupRegistration != null)
+ {
+ db.QCManage_QCGroupRegistration.DeleteOnSubmit(QCGroupRegistration);
+ db.SubmitChanges();
+ }
+ }
+ }
+}
diff --git a/SUBQHSE/BLL/Common/AttachFileService.cs b/SUBQHSE/BLL/Common/AttachFileService.cs
index cfe675a..fe9da4e 100644
--- a/SUBQHSE/BLL/Common/AttachFileService.cs
+++ b/SUBQHSE/BLL/Common/AttachFileService.cs
@@ -462,5 +462,64 @@ namespace BLL
return result;
}
+
+ ///
+ /// 获取附件数据流类 多附件的情况
+ ///
+ /// 附件路径
+ ///
+ public static List GetMoreFileStructByAttachUrl(string attachUrl)
+ {
+ List fileContext = new List();
+ try
+ {
+ if (!String.IsNullOrEmpty(attachUrl))
+ {
+ string physicalpath = ConfigurationManager.AppSettings["localRoot"];
+ string filePath = string.Empty;
+ string[] strs = attachUrl.Trim().Split(',');
+ foreach (var item in strs)
+ {
+ //HttpContext.Current.Request.PhysicalApplicationPath;
+ filePath = physicalpath + item;
+ if (File.Exists(filePath))
+ {
+ fileContext.Add(fileConvertByte(item));
+ }
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ string a = ex.Message;
+ }
+ return fileContext;
+ }
+
+ #region 附件转换二进制数据(用于保存数据库)
+ ///
+ /// 附件转换二进制数据(用于保存数据库)
+ ///
+ /// 附件路径
+ /// 二进制
+ public static byte[] fileConvertByte(string filePath)
+ {
+ string physicalpath = (ConfigurationManager.AppSettings["localRoot"] + "\\" + filePath).Replace("\\\\", "\\");
+ byte[] bytContent = null;
+ System.IO.FileStream fs = null;
+ System.IO.BinaryReader br = null;
+ try
+ {
+ fs = new FileStream(physicalpath, System.IO.FileMode.Open);
+ }
+ catch
+ {
+ }
+ br = new BinaryReader((Stream)fs);
+ bytContent = br.ReadBytes((Int32)fs.Length);
+ fs.Dispose();
+ return bytContent;
+ }
+ #endregion
}
}
diff --git a/SUBQHSE/BLL/Common/Const.cs b/SUBQHSE/BLL/Common/Const.cs
index 699b2c1..339e882 100644
--- a/SUBQHSE/BLL/Common/Const.cs
+++ b/SUBQHSE/BLL/Common/Const.cs
@@ -6724,6 +6724,13 @@ namespace BLL
/// 施工作业风险
///
public const string ConstructionRiskMenuId = "F531D523-35BC-4D13-88D3-CB2554C4185C";
-
+ ///
+ /// QC活动
+ ///
+ public const string ProjectQCGroupRegistrationListMenuId = "C8031876-4F44-4CBC-8370-0EC7CB1B21F5";
+ /// 质量隐患
+ ///
+ public const string CQMSRectifyMenuId = "D72BB321-11A8-485B-BAC7-367C7FCA7FBA";
+ ///
}
}
\ No newline at end of file
diff --git a/SUBQHSE/BLL/HSSE/Hazard/Hazard_HazardSelectedItemService.cs b/SUBQHSE/BLL/HSSE/Hazard/Hazard_HazardSelectedItemService.cs
index e3a8d93..a9ffe8a 100644
--- a/SUBQHSE/BLL/HSSE/Hazard/Hazard_HazardSelectedItemService.cs
+++ b/SUBQHSE/BLL/HSSE/Hazard/Hazard_HazardSelectedItemService.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
+using FineUIPro;
namespace BLL
{
@@ -227,11 +228,16 @@ namespace BLL
newHazardSelectedItem.State = hazardSelectedItem.State;
newHazardSelectedItem.PlanExistDate = hazardSelectedItem.PlanExistDate;
newHazardSelectedItem.QRCodeAttachUrl = hazardSelectedItem.QRCodeAttachUrl;
+ newHazardSelectedItem.IsUpdate = null;
db.SubmitChanges();
}
}
+ ///
+ /// 根据危险源类别主键删除对应的所有危险源信息
+ ///
+ /// 危险源类别主键
///
/// 根据危险源类别主键删除对应的所有危险源信息
///
@@ -244,23 +250,56 @@ namespace BLL
{
foreach (var item in q)
{
- var h = db.Hazard_RiskEvaluationRecord.Where(x => x.DataId == item.HazardSelectedItemId);
- if (h.Count() > 0)
+ if (item.IsUpdate == true)
{
- db.Hazard_RiskEvaluationRecord.DeleteAllOnSubmit(h);
- db.SubmitChanges();
+ var returndata = Project_HSSEData_HSSEService.DeleteProjectSecurityRiskData(item.HazardSelectedItemId);
+ if (returndata.code == 1)
+ {
+ var h = db.Hazard_RiskEvaluationRecord.Where(x => x.DataId == item.HazardSelectedItemId);
+ if (h.Count() > 0)
+ {
+ db.Hazard_RiskEvaluationRecord.DeleteAllOnSubmit(h);
+ db.SubmitChanges();
+ }
+ var p = db.Hazard_PatrolPlan.Where(x => x.HazardSelectedItemId == item.HazardSelectedItemId);
+ if (p.Count() > 0)
+ {
+ db.Hazard_PatrolPlan.DeleteAllOnSubmit(p);
+ db.SubmitChanges();
+ }
+ var r = db.Hazard_RoutingInspection.Where(x => x.HazardSelectedItemId == item.HazardSelectedItemId);
+ if (r.Count() > 0)
+ {
+ db.Hazard_RoutingInspection.DeleteAllOnSubmit(r);
+ db.SubmitChanges();
+ }
+ }
+ else
+ {
+ Alert.ShowInTop("记录已上报集团,集团删除失败,无法删除本地数据!", MessageBoxIcon.Warning);
+ return;
+ }
}
- var p = db.Hazard_PatrolPlan.Where(x => x.HazardSelectedItemId == item.HazardSelectedItemId);
- if (p.Count() > 0)
+ else
{
- db.Hazard_PatrolPlan.DeleteAllOnSubmit(p);
- db.SubmitChanges();
- }
- var r = db.Hazard_RoutingInspection.Where(x => x.HazardSelectedItemId == item.HazardSelectedItemId);
- if (r.Count() > 0)
- {
- db.Hazard_RoutingInspection.DeleteAllOnSubmit(r);
- db.SubmitChanges();
+ var h = db.Hazard_RiskEvaluationRecord.Where(x => x.DataId == item.HazardSelectedItemId);
+ if (h.Count() > 0)
+ {
+ db.Hazard_RiskEvaluationRecord.DeleteAllOnSubmit(h);
+ db.SubmitChanges();
+ }
+ var p = db.Hazard_PatrolPlan.Where(x => x.HazardSelectedItemId == item.HazardSelectedItemId);
+ if (p.Count() > 0)
+ {
+ db.Hazard_PatrolPlan.DeleteAllOnSubmit(p);
+ db.SubmitChanges();
+ }
+ var r = db.Hazard_RoutingInspection.Where(x => x.HazardSelectedItemId == item.HazardSelectedItemId);
+ if (r.Count() > 0)
+ {
+ db.Hazard_RoutingInspection.DeleteAllOnSubmit(r);
+ db.SubmitChanges();
+ }
}
}
db.Hazard_HazardSelectedItem.DeleteAllOnSubmit(q);
diff --git a/SUBQHSE/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs b/SUBQHSE/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs
index d7525e5..63acdcf 100644
--- a/SUBQHSE/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs
+++ b/SUBQHSE/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs
@@ -118,7 +118,7 @@ namespace BLL
newHazardRegister.RegisterTypesId = hazardRegister.RegisterTypesId;
newHazardRegister.Risk_Level = hazardRegister.Risk_Level;
newHazardRegister.Requirements = hazardRegister.Requirements;
-
+ newHazardRegister.IsUpdate = null;
//把附件表的路径复制过来
Model.AttachFile file = BLL.AttachFileService.GetAttachFile(hazardRegister.HazardRegisterId, Const.HSSE_HiddenRectificationListMenuId);
if (file != null)
diff --git a/SUBQHSE/BLL/HSSE/License/LicenseManagerService.cs b/SUBQHSE/BLL/HSSE/License/LicenseManagerService.cs
index ce0f637..13a86ad 100644
--- a/SUBQHSE/BLL/HSSE/License/LicenseManagerService.cs
+++ b/SUBQHSE/BLL/HSSE/License/LicenseManagerService.cs
@@ -97,6 +97,7 @@ namespace BLL
newLicenseManager.IsHighRisk = licenseManager.IsHighRisk;
newLicenseManager.LicenseCodes = licenseManager.LicenseCodes;
+ newLicenseManager.IsUpdate = null;
db.SubmitChanges();
}
}
diff --git a/SUBQHSE/BLL/HSSE/Solution/LargerHazardService.cs b/SUBQHSE/BLL/HSSE/Solution/LargerHazardService.cs
index eae4784..8568270 100644
--- a/SUBQHSE/BLL/HSSE/Solution/LargerHazardService.cs
+++ b/SUBQHSE/BLL/HSSE/Solution/LargerHazardService.cs
@@ -75,7 +75,7 @@ namespace BLL
newLargerHazard.TrainPersonNum = largerHazard.TrainPersonNum;
newLargerHazard.IsSuperLargerHazard = largerHazard.IsSuperLargerHazard;
newLargerHazard.Descriptions = largerHazard.Descriptions;
- newLargerHazard.RecordTime = largerHazard.RecordTime;
+ newLargerHazard.IsUpdate = null;
db.SubmitChanges();
}
}
diff --git a/SUBQHSE/BLL/HSSE/Technique/RectifyService.cs b/SUBQHSE/BLL/HSSE/Technique/RectifyService.cs
index 2d0288e..e3b27e2 100644
--- a/SUBQHSE/BLL/HSSE/Technique/RectifyService.cs
+++ b/SUBQHSE/BLL/HSSE/Technique/RectifyService.cs
@@ -26,10 +26,11 @@ namespace BLL
/// 根据上一节点id获取安全隐患
///
///
+ ///
///
- public static List GetRectifyBySupRectifyId(string supRectifyId)
+ public static List GetRectifyBySupRectifyId(string supRectifyId, string type)
{
- return (from x in Funs.DB.Technique_Rectify where x.SupRectifyId == supRectifyId select x).ToList();
+ return (from x in Funs.DB.Technique_Rectify where x.SupRectifyId == supRectifyId && x.RectifyType == type select x).ToList();
}
///
@@ -42,6 +43,7 @@ namespace BLL
Model.Technique_Rectify newRectify = new Model.Technique_Rectify
{
RectifyId = rectify.RectifyId,
+ RectifyType = rectify.RectifyType,
RectifyCode = rectify.RectifyCode,
RectifyName = rectify.RectifyName,
SupRectifyId = rectify.SupRectifyId,
@@ -62,6 +64,7 @@ namespace BLL
Model.Technique_Rectify newRectify = db.Technique_Rectify.FirstOrDefault(e => e.RectifyId == rectify.RectifyId);
if (newRectify != null)
{
+ newRectify.RectifyType = rectify.RectifyType;
newRectify.RectifyCode = rectify.RectifyCode;
newRectify.RectifyName = rectify.RectifyName;
newRectify.SupRectifyId = rectify.SupRectifyId;
@@ -111,7 +114,7 @@ namespace BLL
}
else
{
- var supItemSetCount = BLL.RectifyService.GetRectifyBySupRectifyId(rectifyId);
+ var supItemSetCount = BLL.RectifyService.GetRectifyBySupRectifyId(rectifyId, rectify.RectifyType);
if (supItemSetCount.Count() > 0)
{
isDelete = false;
diff --git a/SUBQHSE/BLL/ZHGL/DataSync/BaseDataService.cs b/SUBQHSE/BLL/ZHGL/DataSync/BaseDataService.cs
new file mode 100644
index 0000000..a6e6652
--- /dev/null
+++ b/SUBQHSE/BLL/ZHGL/DataSync/BaseDataService.cs
@@ -0,0 +1,180 @@
+using Model;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BLL
+{
+ public static class BaseDataService
+ {
+ public static List BeUnderConstructionList = GetBeUnderConstruction().Select(p => p.ProjectId).ToList();
+
+ ///
+ /// 获取在建项目数
+ ///
+ ///
+ public static List GetBeUnderConstruction()
+ {
+ var projectInfos = from project in Funs.DB.Base_Project
+ join unit in Funs.DB.Base_Unit on project.UnitId equals unit.UnitId into unitJoin
+ from unit in unitJoin.DefaultIfEmpty()
+ join projectType in Funs.DB.Base_ProjectType on project.ProjectType equals projectType.ProjectTypeId into projectTypeJoin
+ from projectType in projectTypeJoin.DefaultIfEmpty()
+ join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = project.ProjectState2, GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin
+ from sysConst in sysConstJoin.DefaultIfEmpty()
+ where (project.ProjectAttribute == "GONGCHENG" || project.ProjectAttribute == null) && (project.IsDelete == null || project.IsDelete == false) && project.ProjectState == "1"
+ select new ProjectOutput
+ {
+ ProjectId = project.ProjectId,
+ ProjectCode = project.ProjectCode,
+ ProjectName = project.ProjectName,
+ UnitId = project.UnitId,
+ UnitName = unit.UnitName,
+ StartDate = project.StartDate,
+ EndDate = project.EndDate,
+ ProjectAddress = project.ProjectAddress,
+ ShortName = project.ShortName,
+ ConstructionMoney = project.ConstructionMoney,
+ ProjectStateName = project.ProjectState == BLL.Const.ProjectState_2 ? "暂停中" : (project.ProjectState == BLL.Const.ProjectState_3 ? "已完工" : "施工中"),
+ ProjectState = project.ProjectState,
+ ProjectAttributeName = project.ProjectAttribute == "GONGCHENG" ? "工程" : (project.ProjectAttribute == "SHIYE" ? "实业" : ""),
+ ProjectMoney = project.ProjectMoney,
+ DayCount = DateTime.Now.Subtract(project.StartDate.Value).Days,
+ ProjectTypeName = projectType.ProjectTypeName,
+ ProjectStateName2 = sysConst.ConstText
+ };
+ var result = projectInfos.ToList();
+ return result;
+ }
+ ///
+ /// 获取在建项目数(异步)
+ ///
+ ///
+ public static async Task> GetBeUnderConstructionAsync()
+ {
+ return await Task.Run(GetBeUnderConstruction);
+ }
+
+ ///
+ /// 获取停工项目数
+ ///
+ ///
+ public static List GetShutdown()
+ {
+ var projectInfos = from project in Funs.DB.Base_Project
+ join unit in Funs.DB.Base_Unit on project.UnitId equals unit.UnitId into unitJoin
+ from unit in unitJoin.DefaultIfEmpty()
+ join projectType in Funs.DB.Base_ProjectType on project.ProjectType equals projectType.ProjectTypeId into projectTypeJoin
+ from projectType in projectTypeJoin.DefaultIfEmpty()
+ join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = project.ProjectState2, GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin
+ from sysConst in sysConstJoin.DefaultIfEmpty()
+ where (project.ProjectAttribute == "GONGCHENG" || project.ProjectAttribute == null) && (project.IsDelete == null || project.IsDelete == false) && project.ProjectState == "2"
+ select new ProjectOutput
+ {
+ ProjectId = project.ProjectId,
+ ProjectCode = project.ProjectCode,
+ ProjectName = project.ProjectName,
+ UnitId = project.UnitId,
+ UnitName = unit.UnitName,
+ StartDate = project.StartDate,
+ EndDate = project.EndDate,
+ ProjectAddress = project.ProjectAddress,
+ ShortName = project.ShortName,
+ ConstructionMoney = project.ConstructionMoney,
+ ProjectStateName = project.ProjectState == BLL.Const.ProjectState_2 ? "暂停中" : (project.ProjectState == BLL.Const.ProjectState_3 ? "已完工" : "施工中"),
+ ProjectState = project.ProjectState,
+ ProjectAttributeName = project.ProjectAttribute == "GONGCHENG" ? "工程" : (project.ProjectAttribute == "SHIYE" ? "实业" : ""),
+ ProjectMoney = project.ProjectMoney,
+ DayCount = DateTime.Now.Subtract(project.StartDate.Value).Days,
+ ProjectTypeName = projectType.ProjectTypeName,
+ ProjectStateName2 = sysConst.ConstText
+ };
+ var result = projectInfos.ToList();
+ return result;
+ }
+ ///
+ /// 获取停工项目数(异步)
+ ///
+ ///
+ public static async Task> GetShutdownAsync()
+ {
+ return await Task.Run(GetShutdown);
+ }
+ ///
+ /// 获取完工项目数
+ ///
+ ///
+ public static List GetCompletedProject()
+ {
+ var projectInfos = from project in Funs.DB.Base_Project
+ join unit in Funs.DB.Base_Unit on project.UnitId equals unit.UnitId into unitJoin
+ from unit in unitJoin.DefaultIfEmpty()
+ join projectType in Funs.DB.Base_ProjectType on project.ProjectType equals projectType.ProjectTypeId into projectTypeJoin
+ from projectType in projectTypeJoin.DefaultIfEmpty()
+ join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = project.ProjectState2, GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin
+ from sysConst in sysConstJoin.DefaultIfEmpty()
+ where (project.ProjectAttribute == "GONGCHENG" || project.ProjectAttribute == null) && (project.IsDelete == null || project.IsDelete == false) && project.ProjectState == "3"
+ select new ProjectOutput
+ {
+ ProjectId = project.ProjectId,
+ ProjectCode = project.ProjectCode,
+ ProjectName = project.ProjectName,
+ UnitId = project.UnitId,
+ UnitName = unit.UnitName,
+ StartDate = project.StartDate,
+ EndDate = project.EndDate,
+ ProjectAddress = project.ProjectAddress,
+ ShortName = project.ShortName,
+ ConstructionMoney = project.ConstructionMoney,
+ ProjectStateName = project.ProjectState == BLL.Const.ProjectState_2 ? "暂停中" : (project.ProjectState == BLL.Const.ProjectState_3 ? "已完工" : "施工中"),
+ ProjectState = project.ProjectState,
+ ProjectAttributeName = project.ProjectAttribute == "GONGCHENG" ? "工程" : (project.ProjectAttribute == "SHIYE" ? "实业" : ""),
+ ProjectMoney = project.ProjectMoney,
+ DayCount = DateTime.Now.Subtract(project.StartDate.Value).Days,
+ ProjectTypeName = projectType.ProjectTypeName,
+ ProjectStateName2 = sysConst.ConstText
+ };
+ var result = projectInfos.ToList();
+ return result;
+ }
+ ///
+ /// 获取所有项目数
+ ///
+ ///
+ public static List GetALLProject()
+ {
+ var projectInfos = from project in Funs.DB.Base_Project
+ join unit in Funs.DB.Base_Unit on project.UnitId equals unit.UnitId into unitJoin
+ from unit in unitJoin.DefaultIfEmpty()
+ join projectType in Funs.DB.Base_ProjectType on project.ProjectType equals projectType.ProjectTypeId into projectTypeJoin
+ from projectType in projectTypeJoin.DefaultIfEmpty()
+ join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = project.ProjectState2, GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin
+ from sysConst in sysConstJoin.DefaultIfEmpty()
+ where (project.ProjectAttribute == "GONGCHENG" || project.ProjectAttribute == null) && (project.IsDelete == null || project.IsDelete == false)
+ select new ProjectOutput
+ {
+ ProjectId = project.ProjectId,
+ ProjectCode = project.ProjectCode,
+ ProjectName = project.ProjectName,
+ UnitId = project.UnitId,
+ UnitName = unit.UnitName,
+ StartDate = project.StartDate,
+ EndDate = project.EndDate,
+ ProjectAddress = project.ProjectAddress,
+ ShortName = project.ShortName,
+ ConstructionMoney = project.ConstructionMoney,
+ ProjectStateName = project.ProjectState == BLL.Const.ProjectState_2 ? "暂停中" : (project.ProjectState == BLL.Const.ProjectState_3 ? "已完工" : "施工中"),
+ ProjectState = project.ProjectState,
+ ProjectAttributeName = project.ProjectAttribute == "GONGCHENG" ? "工程" : (project.ProjectAttribute == "SHIYE" ? "实业" : ""),
+ ProjectMoney = project.ProjectMoney,
+ DayCount = DateTime.Now.Subtract(project.StartDate.Value).Days,
+ ProjectTypeName = projectType.ProjectTypeName,
+ ProjectStateName2 = sysConst.ConstText
+ };
+ var result = projectInfos.ToList();
+ return result;
+ }
+ }
+}
diff --git a/SUBQHSE/BLL/ZHGL/DataSync/CQMSDataService.cs b/SUBQHSE/BLL/ZHGL/DataSync/CQMSDataService.cs
index b16de0d..f959f90 100644
--- a/SUBQHSE/BLL/ZHGL/DataSync/CQMSDataService.cs
+++ b/SUBQHSE/BLL/ZHGL/DataSync/CQMSDataService.cs
@@ -15,8 +15,7 @@ namespace BLL
{
public static class CQMSDataService
{
- public static SUBQHSEDB db = Funs.DB;
- public static List BeUnderConstructionList = ProjectService.GetProjectWorkList().Where(x => (x.ProjectAttribute == "GONGCHENG" || x.ProjectAttribute == null)).Select(x => x.ProjectId).ToList();
+ public static List BeUnderConstructionList = BaseDataService.BeUnderConstructionList;
#region 获取列表
@@ -63,6 +62,9 @@ namespace BLL
x.ReportDate,
x.TrainPersonNum,
x.TechnicalDisclosePersonNum,
+ x.ComprehensiveConTechnologyDisclosureNum,
+ x.ComprehensiveConTechnologyDisclosurePersonNum,
+ x.ComprehensiveReviewDrawingsNum,
x.UseNum,
x.OKNum,
x.CompanyPersonNum,
@@ -90,6 +92,8 @@ namespace BLL
x.SubProjectNum,
x.SubdivisionalWorksNum,
x.InspectionLotNum,
+ x.InspectionMachineNum,
+ x.InspectionMachineQualifiedNum,
x.State,
x.CreateDate,
x.CreateMan
@@ -113,11 +117,15 @@ namespace BLL
ReportDate = newtable.ReportDate,
TrainPersonNum = newtable.TrainPersonNum,
TechnicalDisclosePersonNum = newtable.TechnicalDisclosePersonNum,
+ ComprehensiveConTechnologyDisclosureNum = newtable.ComprehensiveConTechnologyDisclosureNum,
+ ComprehensiveConTechnologyDisclosurePersonNum = newtable.ComprehensiveConTechnologyDisclosurePersonNum,
+ ComprehensiveReviewDrawingsNum = newtable.ComprehensiveReviewDrawingsNum,
UseNum = newtable.UseNum,
OKNum = newtable.OKNum,
CompanyPersonNum = newtable.CompanyPersonNum,
BranchPersonNum = newtable.BranchPersonNum,
ProjectPersonNum = newtable.ProjectPersonNum,
+ ProjectSubPersonNum = newtable.ProjectSubPersonNum,
ProblemNum = newtable.ProblemNum,
ProblemCompletedNum = newtable.ProblemCompletedNum,
ProblemNotCompletedNum = newtable.ProblemNotCompletedNum,
@@ -159,6 +167,8 @@ namespace BLL
SubProjectAcceptOKNum = newtable.SubProjectAcceptOKNum,
SubdivisionalWorksAcceptNum = newtable.SubdivisionalWorksAcceptNum,
SubdivisionalWorksAcceptOKNum = newtable.SubdivisionalWorksAcceptOKNum,
+ InspectionMachineNum = newtable.InspectionMachineNum,
+ InspectionMachineQualifiedNum = newtable.InspectionMachineQualifiedNum,
State = newtable.State,
CreateDate = newtable.CreateDate,
CreateMan = newtable.CreateMan
@@ -182,14 +192,24 @@ namespace BLL
table.ReportDate = newtable.ReportDate;
table.TrainPersonNum = newtable.TrainPersonNum;
table.TechnicalDisclosePersonNum = newtable.TechnicalDisclosePersonNum;
+ table.ComprehensiveConTechnologyDisclosureNum = newtable.ComprehensiveConTechnologyDisclosureNum;
+ table.ComprehensiveConTechnologyDisclosurePersonNum = newtable.ComprehensiveConTechnologyDisclosurePersonNum;
+ table.ComprehensiveReviewDrawingsNum = newtable.ComprehensiveReviewDrawingsNum;
table.UseNum = newtable.UseNum;
table.OKNum = newtable.OKNum;
table.CompanyPersonNum = newtable.CompanyPersonNum;
table.BranchPersonNum = newtable.BranchPersonNum;
table.ProjectPersonNum = newtable.ProjectPersonNum;
+ table.ProjectSubPersonNum = newtable.ProjectSubPersonNum;
table.ProblemNum = newtable.ProblemNum;
table.ProblemCompletedNum = newtable.ProblemCompletedNum;
table.ProblemNotCompletedNum = newtable.ProblemNotCompletedNum;
+ table.UnitCheckNum = newtable.UnitCheckNum;
+ table.UnitCheckClosedNum = newtable.UnitCheckClosedNum;
+ table.UnitCheckNotClosedNum = newtable.UnitCheckNotClosedNum;
+ table.BranchCheckNum = newtable.BranchCheckNum;
+ table.BranchCheckClosedNum = newtable.BranchCheckClosedNum;
+ table.BranchCheckNotClosedNum = newtable.BranchCheckNotClosedNum;
table.SNum = newtable.SNum;
table.ANum = newtable.ANum;
table.BNum = newtable.BNum;
@@ -228,6 +248,8 @@ namespace BLL
table.SubProjectAcceptOKNum = newtable.SubProjectAcceptOKNum;
table.SubdivisionalWorksAcceptNum = newtable.SubdivisionalWorksAcceptNum;
table.SubdivisionalWorksAcceptOKNum = newtable.SubdivisionalWorksAcceptOKNum;
+ table.InspectionMachineNum = newtable.InspectionMachineNum;
+ table.InspectionMachineQualifiedNum = newtable.InspectionMachineQualifiedNum;
table.State = newtable.State;
table.CreateMan = newtable.CreateMan;
table.CreateDate = newtable.CreateDate;
@@ -270,6 +292,9 @@ namespace BLL
item.CollCropCode = model.CollCropCode;
item.TrainPersonNum = model.TrainPersonNum;
item.TechnicalDisclosePersonNum = model.TechnicalDisclosePersonNum;
+ item.ComprehensiveConTechnologyDisclosureNum = model.ComprehensiveConTechnologyDisclosureNum;
+ item.ComprehensiveConTechnologyDisclosurePersonNum = model.ComprehensiveConTechnologyDisclosurePersonNum;
+ item.ComprehensiveReviewDrawingsNum = model.ComprehensiveReviewDrawingsNum;
item.UseNum = model.UseNum;
item.OKNum = model.OKNum;
item.CompanyPersonNum = model.CompanyPersonNum;
@@ -279,6 +304,12 @@ namespace BLL
item.ProblemCompletedNum = model.ProblemCompletedNum;
item.ProblemNotCompletedNum = model.ProblemNotCompletedNum;
item.ProblemRate = "";
+ item.UnitCheckNum = model.UnitCheckNum;
+ item.UnitCheckClosedNum = model.UnitCheckClosedNum;
+ item.UnitCheckNotClosedNum = model.UnitCheckNotClosedNum;
+ item.BranchCheckNum = model.BranchCheckNum;
+ item.BranchCheckClosedNum = model.BranchCheckClosedNum;
+ item.BranchCheckNotClosedNum = model.BranchCheckNotClosedNum;
item.SNum = model.SNum;
item.ANum = model.ANum;
item.BNum = model.BNum;
@@ -322,6 +353,11 @@ namespace BLL
item.SubProjectAcceptOKNum = model.SubProjectAcceptOKNum;
item.SubdivisionalWorksAcceptNum = model.SubdivisionalWorksAcceptNum;
item.SubdivisionalWorksAcceptOKNum = model.SubdivisionalWorksAcceptOKNum;
+ item.MachineInspectionNum = model.MachineInspectionQualifiedNum;
+ item.MachineInspectionQualifiedNum = model.MachineInspectionQualifiedNum;
+ item.InspectionLotNum = model.InspectionLotNum;
+ item.InspectionMachineNum = model.InspectionMachineNum;
+ item.InspectionMachineQualifiedNum = model.InspectionMachineQualifiedNum;
}
var cqmsDataItems = new List();
@@ -371,6 +407,9 @@ namespace BLL
ReportDate = DateTime.Now.Date,
TrainPersonNum = ProjectData.Sum(x => x.TrainPersonNum),
TechnicalDisclosePersonNum = ProjectData.Sum(x => x.TechnicalDisclosePersonNum),
+ ComprehensiveConTechnologyDisclosureNum = ProjectData.Sum(x => x.ComprehensiveConTechnologyDisclosureNum),
+ ComprehensiveConTechnologyDisclosurePersonNum = ProjectData.Sum(x => x.ComprehensiveConTechnologyDisclosurePersonNum),
+ ComprehensiveReviewDrawingsNum = ProjectData.Sum(x => x.ComprehensiveReviewDrawingsNum),
UseNum = ProjectData.Sum(x => x.UseNum),
OKNum = ProjectData.Sum(x => x.OKNum),
CompanyPersonNum = GetCompanyPersonNum(),
@@ -398,6 +437,9 @@ namespace BLL
SubProjectNum = ProjectData.Sum(x => x.SubProjectNum),
SubdivisionalWorksNum = ProjectData.Sum(x => x.SubdivisionalWorksNum),
InspectionLotNum = ProjectData.Sum(x => x.InspectionLotNum),
+ InspectionMachineNum = ProjectData.Sum(x=>x.InspectionMachineNum),
+ InspectionMachineQualifiedNum = ProjectData.Sum(x => x.InspectionMachineQualifiedNum),
+ SpecialEquipmentQualityAssuranceSystemNum = ProjectData.Sum(x => x.SpecialEquipmentQualityAssuranceSystemNum),
CreateMan = Const.sysglyId,
CreateDate = DateTime.Now
};
@@ -446,92 +488,6 @@ namespace BLL
return responeData;
}
- public static CQMSData StatisticalData()
- {
- var thisUnitId = string.Empty;
- var thisUnit = CommonService.GetIsThisUnit();
- if (thisUnit != null) thisUnitId = thisUnit.UnitId;
- var base_Unit = UnitService.GetUnitByUnitId(thisUnitId);
- Project_CQMSDataService.StatisticalAllProjectData();
-
- var ProjectData = (from x in Funs.DB.Project_CQMSData_CQMS
- where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
- select x).ToList();
- var table = new CQMSData_CQMS
- {
- UnitId = thisUnitId,
- CollCropCode = base_Unit.CollCropCode,
- UnitName = base_Unit.UnitName,
- ReportDate = DateTime.Now.Date,
- TrainPersonNum = ProjectData.Sum(x => x.TrainPersonNum),
- TechnicalDisclosePersonNum = ProjectData.Sum(x => x.TechnicalDisclosePersonNum),
- UseNum = ProjectData.Sum(x => x.UseNum),
- OKNum = ProjectData.Sum(x => x.OKNum),
- CompanyPersonNum = GetCompanyPersonNum(),
- BranchPersonNum = GetBranchPersonNum(),
- ProjectPersonNum = ProjectData.Sum(x => x.ProjectPersonNum),
- ProblemNum = ProjectData.Sum(x => x.ProblemNum),
- ProblemCompletedNum = ProjectData.Sum(x => x.ProblemCompletedNum),
- ProblemNotCompletedNum = ProjectData.Sum(x => x.ProblemNotCompletedNum),
- SNum = ProjectData.Sum(x => x.SNum),
- ANum = ProjectData.Sum(x => x.ANum),
- BNum = ProjectData.Sum(x => x.BNum),
- CNum = ProjectData.Sum(x => x.CNum),
- KeyProcessNum = ProjectData.Sum(x => x.KeyProcessNum),
- KeyProcessOKNum = ProjectData.Sum(x => x.KeyProcessOKNum),
- SpecialProcessNum = ProjectData.Sum(x => x.SpecialProcessNum),
- SpecialProcessOKNum = ProjectData.Sum(x => x.SpecialProcessOKNum),
- ConcealedWorksNum = ProjectData.Sum(x => x.ConcealedWorksNum),
- ConcealedWorksOKNum = ProjectData.Sum(x => x.ConcealedWorksOKNum),
- UnitProjectOnesNum = ProjectData.Sum(x => x.UnitProjectOnesNum),
- UnitProjectOnesOKNum = ProjectData.Sum(x => x.UnitProjectOnesOKNum),
- MaterialInRecheckNum = ProjectData.Sum(x => x.MaterialInRecheckNum),
- MaterialInRecheckOKNum = ProjectData.Sum(x => x.MaterialInRecheckOKNum),
- SingleProjectNum = ProjectData.Sum(x => x.SingleProjectNum),
- UnitProjectNum = ProjectData.Sum(x => x.UnitProjectNum),
- SubProjectNum = ProjectData.Sum(x => x.SubProjectNum),
- SubdivisionalWorksNum = ProjectData.Sum(x => x.SubdivisionalWorksNum),
- InspectionLotNum = ProjectData.Sum(x => x.InspectionLotNum),
- EquipmentInspectionNum = ProjectData.Sum(x => x.EquipmentInspectionNum),
- EquipmentInspectionQualifiedNum = ProjectData.Sum(x => x.EquipmentInspectionQualifiedNum),
- MachineInspectionNum = ProjectData.Sum(x => x.MachineInspectionNum),
- MachineInspectionQualifiedNum = ProjectData.Sum(x => x.MachineInspectionQualifiedNum),
- PersonInspectionNum = ProjectData.Sum(x => x.PersonInspectionNum),
- PersonInspectionQualifiedNum = ProjectData.Sum(x => x.PersonInspectionQualifiedNum),
- MaterialInspectionNum = ProjectData.Sum(x => x.MaterialInspectionNum),
- MaterialInspectionQualifiedNum = ProjectData.Sum(x => x.MaterialInspectionQualifiedNum),
- ConstructSolutionNum = ProjectData.Sum(x => x.ConstructSolutionNum),
- ConstructSolutionProjectApproveNum = ProjectData.Sum(x => x.ConstructSolutionProjectApproveNum),
- ConstructSolutionUnitApproveNum = ProjectData.Sum(x => x.ConstructSolutionUnitApproveNum),
- SpecialEquipmentQualityAssuranceSystemNum = ProjectData.Sum(x => x.SpecialEquipmentQualityAssuranceSystemNum),
- DesignDetailsNum = ProjectData.Sum(x => x.DesignDetailsNum),
- UnitProjectAcceptNum = ProjectData.Sum(x => x.UnitProjectAcceptNum),
- UnitProjectAcceptOKNum = ProjectData.Sum(x => x.UnitProjectAcceptOKNum),
- SubProjectAcceptNum = ProjectData.Sum(x => x.SubProjectAcceptNum),
- SubProjectAcceptOKNum = ProjectData.Sum(x => x.SubProjectAcceptOKNum),
- SubdivisionalWorksAcceptNum = ProjectData.Sum(x => x.SubdivisionalWorksAcceptNum),
- SubdivisionalWorksAcceptOKNum = ProjectData.Sum(x => x.SubdivisionalWorksAcceptOKNum),
- CreateMan = Const.sysglyId,
- CreateDate = DateTime.Now
- };
- if (IsReportByToday())
- {
- table.Id = GetTodayData().Id;
- table.State = Const.CNCEC_State_1;
- UpdateCQMSData_CQMS(table);
- }
- else
- {
- table.Id = SQLHelper.GetNewID();
- table.State = Const.CNCEC_State_0;
- AddCQMSData_CQMS(table);
- }
-
- var data = new CQMSData();
- data = GetDataByCQMSData_CQMS(table);
- return data;
- }
-
///
/// 获取质量统计数据
///
@@ -547,11 +503,15 @@ namespace BLL
var branchPersonNumTask = CQMSDataService.GetBranchPersonNumAsync(); //获取分支机构人数
var projectPersonNumTask = CQMSDataService.GetProjectPersonNumAsync(); //获取项目专职人数
var trainPersonNumTask = CQMSDataService.GetTrainPersonNumAsync(); //获取质量培训人次数
- var technicalDisclosePersonTask = CQMSDataService.GetTechnicalDisclosePersonNumAsync(); //获取技术交底人次数
+ var technicalDisclosePersonTask = CQMSDataService.GetTechnicalDisclosePersonNumAsync(); //获取设计交底人次数
+ var qualityAssuranceNumTask = CQMSDataService.GetQualityAssuranceNumAsync(); //获取特设质保体系数量
+ var comprehensiveConTechnologyDisclosureTask = CQMSDataService.GetComprehensiveConTechnologyDisclosureAsync(); //获取施工技术交底
+ var comprehensiveReviewDrawingsTask = CQMSDataService.GetComprehensiveReviewDrawingsAsync(); //获取图纸会审
var inspectionEquipmentTask = CQMSDataService.GetComprehensive_InspectionEquipmentAsync(); //获取设备报验
var inspectionPersonTask = CQMSDataService.GetComprehensive_InspectionPersonAsync(); //获取人员报验
var inspectionMachineTask = CQMSDataService.GetComprehensive_InspectionMachineAsync(); //获取机具报验
+ var inspectionMachineEquipmentTask = CQMSDataService.GetComprehensive_InspectionMachineEquipmentAsync(); //获取设备报验报检
var useNumTask = CQMSDataService.GetUseNumAsync(); //获取在用计量器具数
var okNumTask = CQMSDataService.GetOkNumAsync(); //获取校准合格数
@@ -562,6 +522,8 @@ namespace BLL
var inspectionLotNumTask = CQMSDataService.GetInspectionLotNumAsync(); //获取检验批个数
var constructSolutionTask = CQMSDataService.GetConstructSolutionAsync(); //施工方案数量
var cqmsProblemTask = CQMSDataService.GetCQMSProblemAsync(); //获取企业级、项目级质量问题
+ var cqmsBranchMajorCheckTask = CQMSDataService.GetBranchMajorCheckAsync(); //获取分支机构质量大检查次数
+ var cqmsCompanyMajorCheckTask = CQMSDataService.GetCompanyMajorCheckAsync(); //获取企业质量大检查次数
//质量验收数据
var keyProcessNumTask = CQMSDataService.GetKeyProcessNumAsync(); //获取关键工序验收数
@@ -584,14 +546,16 @@ namespace BLL
await Task.WhenAll(
companyPersonNumTask, branchPersonNumTask, projectPersonNumTask,
trainPersonNumTask, technicalDisclosePersonTask,
+ comprehensiveConTechnologyDisclosureTask, comprehensiveReviewDrawingsTask,
inspectionEquipmentTask, inspectionPersonTask, inspectionMachineTask,
useNumTask, okNumTask,
singleProjectNumTask, unitProjectNumTask, subProjectNuTask, subdivisionalWorksNuTask, inspectionLotNumTask,
constructSolutionTask,
- cqmsProblemTask,
+ cqmsProblemTask, cqmsBranchMajorCheckTask, cqmsCompanyMajorCheckTask,
keyProcessNumTask, keyProcessOKNumTask, specialProcessNumTask, specialProcessOKNumTask, concealedWorksNumTask, concealedWorksOKNumTask,
unitProjectAcceptNumTask, unitProjectAcceptOKNumTask, subProjectAcceptNumTask, subProjectAcceptOKNumTask, subdivisionalWorksAcceptNumTask, subdivisionalWorksAcceptOKNumTask,
- materialInRecheckNumTask, materialInRecheckOKNumTask
+ materialInRecheckNumTask, materialInRecheckOKNumTask, inspectionMachineEquipmentTask,
+ qualityAssuranceNumTask
);
// 统一获取异步方法的返回值
@@ -600,10 +564,13 @@ namespace BLL
var projectPersonNumList = await projectPersonNumTask;
var trainPersonNumList = await trainPersonNumTask;
var technicalDisclosePersonList = await technicalDisclosePersonTask;
+ var comprehensiveConTechnologyDisclosureList = await comprehensiveConTechnologyDisclosureTask;
+ var comprehensiveReviewDrawingsList = await comprehensiveReviewDrawingsTask;
var inspectionEquipmentList = await inspectionEquipmentTask;
var inspectionPersonList = await inspectionPersonTask;
var inspectionMachineList = await inspectionMachineTask;
+ var inspectionMachineEquipmentList =await inspectionMachineEquipmentTask;
var useNum = await useNumTask;
var okNum = await okNumTask;
var singleProjectNum = await singleProjectNumTask;
@@ -614,6 +581,8 @@ namespace BLL
var constructSolutionList = await constructSolutionTask;
var cqmsProblemList = await cqmsProblemTask;
+ var cqmsBranchMajorCheckList = await cqmsBranchMajorCheckTask;
+ var cqmsCompanyMajorCheckList = await cqmsCompanyMajorCheckTask;
var keyProcessNum = await keyProcessNumTask;
var keyProcessOKNum = await keyProcessOKNumTask;
@@ -630,7 +599,8 @@ namespace BLL
var subdivisionalWorksAcceptOKNum = await subdivisionalWorksAcceptOKNumTask;
var materialInRecheckNum = await materialInRecheckNumTask;
var materialInRecheckOKNum = await materialInRecheckOKNumTask;
-
+ var qualityAssuranceNum = await qualityAssuranceNumTask;
+
// 构造结果对象
var table = new CQMSData_CQMS
{
@@ -640,17 +610,23 @@ namespace BLL
ReportDate = DateTime.Now.Date,
CompanyPersonNum = companyPersonNum,//
BranchPersonNum = branchPersonNum,//
- ProjectPersonNum = projectPersonNumList.Count(),
+ ProjectPersonNum = projectPersonNumList.Count(x => x.IsOffice == true),
+ ProjectSubPersonNum = projectPersonNumList.Count(x => x.IsOffice == false),
TrainPersonNum = trainPersonNumList.Count(),
TechnicalDisclosePersonNum = technicalDisclosePersonList.Sum(x => x.TrainPersonNum),
+ ComprehensiveConTechnologyDisclosureNum = comprehensiveConTechnologyDisclosureList.Count(),
+ ComprehensiveConTechnologyDisclosurePersonNum = comprehensiveConTechnologyDisclosureList.Sum(x => x.TrainPersonNum),
+ ComprehensiveReviewDrawingsNum = comprehensiveReviewDrawingsList.Count(),
+
EquipmentInspectionNum = inspectionEquipmentList.Count(),
EquipmentInspectionQualifiedNum = inspectionEquipmentList.Where(x => x.SamplingResult == "1").Count(),
PersonInspectionNum = inspectionPersonList.Count(),
PersonInspectionQualifiedNum = inspectionPersonList.Where(x => x.IsOnSite.HasValue && x.IsOnSite == true).Count(),
MachineInspectionNum = inspectionMachineList.Count(),
MachineInspectionQualifiedNum = inspectionMachineList.Where(x => x.IsCheckOK.HasValue && x.IsCheckOK == true).Count(),
- MaterialInspectionNum = 0,
- MaterialInspectionQualifiedNum = 0,
+
+ MaterialInspectionNum = inspectionEquipmentList.Count(),
+ MaterialInspectionQualifiedNum = inspectionEquipmentList.Where(x => x.SamplingResult == "1").Count(),
UseNum = useNum.Count(),
OKNum = okNum.Count(),
SingleProjectNum = singleProjectNum.Count(),
@@ -662,12 +638,18 @@ namespace BLL
ConstructSolutionNum = constructSolutionList.Count(),
ConstructSolutionProjectApproveNum = constructSolutionList.Where(x => x.State == "1").Count(),
ConstructSolutionUnitApproveNum = 0,//
- SpecialEquipmentQualityAssuranceSystemNum = 0,//
+ SpecialEquipmentQualityAssuranceSystemNum = qualityAssuranceNum.Count(),
DesignDetailsNum = technicalDisclosePersonList.Sum(x => x.TrainPersonNum),
ProblemNum = cqmsProblemList.Count(),
ProblemCompletedNum = cqmsProblemList.Where(x => x.State == "7").Count(),
ProblemNotCompletedNum = cqmsProblemList.Where(x => x.State != "7").Count(),
+ BranchCheckNum = cqmsBranchMajorCheckList.Count(),
+ BranchCheckClosedNum = cqmsBranchMajorCheckList.Count(),
+ BranchCheckNotClosedNum = 0,
+ UnitCheckNum = cqmsCompanyMajorCheckList.Count(),
+ UnitCheckClosedNum = cqmsCompanyMajorCheckList.Count(),
+ UnitCheckNotClosedNum = 0,
KeyProcessNum = keyProcessNum.Count(),
KeyProcessOKNum = keyProcessOKNum.Count(),
@@ -682,7 +664,10 @@ namespace BLL
SubdivisionalWorksAcceptNum = subdivisionalWorksAcceptNum.Count(),
SubdivisionalWorksAcceptOKNum = subdivisionalWorksAcceptOKNum.Count(),
MaterialInRecheckNum = materialInRecheckNum.Count(),
- MaterialInRecheckOKNum = materialInRecheckOKNum.Count()
+ MaterialInRecheckOKNum = materialInRecheckOKNum.Count(),
+ InspectionMachineNum = inspectionMachineEquipmentList.Count(),
+ InspectionMachineQualifiedNum = inspectionMachineEquipmentList.Where(x => x.IsCheckOK.HasValue && x.IsCheckOK == true).Count(),
+
};
#region 添加项目统计数据
@@ -699,9 +684,13 @@ namespace BLL
ReportDate = DateTime.Now.Date,
CompanyPersonNum = companyPersonNum,//
BranchPersonNum = branchPersonNum,//
- ProjectPersonNum = projectPersonNumList.Count(x => x.ProjectId == projectid),
+ ProjectPersonNum = projectPersonNumList.Count(x => x.ProjectId == projectid && x.IsOffice == true),
+ ProjectSubPersonNum = projectPersonNumList.Count(x => x.ProjectId == projectid && x.IsOffice == false),
TrainPersonNum = trainPersonNumList.Count(x => x.ProjectId == projectid),
TechnicalDisclosePersonNum = technicalDisclosePersonList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
+ ComprehensiveConTechnologyDisclosureNum = comprehensiveConTechnologyDisclosureList.Count(x => x.ProjectId == projectid),
+ ComprehensiveConTechnologyDisclosurePersonNum = comprehensiveConTechnologyDisclosureList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
+ ComprehensiveReviewDrawingsNum = comprehensiveReviewDrawingsList.Count(x => x.ProjectId == projectid),
EquipmentInspectionNum = inspectionEquipmentList.Count(x => x.ProjectId == projectid),
EquipmentInspectionQualifiedNum = inspectionEquipmentList.Where(x => x.SamplingResult == "1" && x.ProjectId == projectid).Count(),
PersonInspectionNum = inspectionPersonList.Count(x => x.ProjectId == projectid),
@@ -721,7 +710,7 @@ namespace BLL
ConstructSolutionNum = constructSolutionList.Count(x => x.ProjectId == projectid),
ConstructSolutionProjectApproveNum = constructSolutionList.Where(x => x.State == "1" && x.ProjectId == projectid).Count(),
ConstructSolutionUnitApproveNum = 0,//
- SpecialEquipmentQualityAssuranceSystemNum = 0,//
+ SpecialEquipmentQualityAssuranceSystemNum = qualityAssuranceNum.Count(x => x.ProjectId == projectid),
DesignDetailsNum = technicalDisclosePersonList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
ProblemNum = cqmsProblemList.Count(x => x.ProjectId == projectid),
@@ -741,7 +730,10 @@ namespace BLL
SubdivisionalWorksAcceptNum = subdivisionalWorksAcceptNum.Count(x => x.ProjectId == projectid),
SubdivisionalWorksAcceptOKNum = subdivisionalWorksAcceptOKNum.Count(x => x.ProjectId == projectid),
MaterialInRecheckNum = materialInRecheckNum.Count(x => x.ProjectId == projectid),
- MaterialInRecheckOKNum = materialInRecheckOKNum.Count(x => x.ProjectId == projectid)
+ MaterialInRecheckOKNum = materialInRecheckOKNum.Count(x => x.ProjectId == projectid),
+ InspectionMachineNum = inspectionMachineEquipmentList.Count(x => x.ProjectId == projectid),
+ InspectionMachineQualifiedNum = inspectionMachineEquipmentList.Where(x => x.IsCheckOK.HasValue && x.IsCheckOK == true && x.ProjectId == projectid).Count(),
+
};
Project_CQMSDataService.AddProject_CQMSData_CQMS(projectCqmsData);
}
@@ -766,7 +758,6 @@ namespace BLL
return data;
}
-
public static CQMSData GetDataByCQMSData_CQMS(CQMSData_CQMS table)
{
var data = new CQMSData();
@@ -777,15 +768,25 @@ namespace BLL
item.CollCropCode = table.CollCropCode;
item.TrainPersonNum = table.TrainPersonNum;
item.TechnicalDisclosePersonNum = table.TechnicalDisclosePersonNum;
+ item.ComprehensiveConTechnologyDisclosureNum = table.ComprehensiveConTechnologyDisclosureNum;
+ item.ComprehensiveConTechnologyDisclosurePersonNum = table.ComprehensiveConTechnologyDisclosurePersonNum;
+ item.ComprehensiveReviewDrawingsNum = table.ComprehensiveReviewDrawingsNum;
item.UseNum = table.UseNum;
item.OKNum = table.OKNum;
item.CompanyPersonNum = table.CompanyPersonNum;
item.BranchPersonNum = table.BranchPersonNum;
item.ProjectPersonNum = table.ProjectPersonNum;
+ item.ProjectSubPersonNum = table.ProjectSubPersonNum;
item.ProblemNum = table.ProblemNum;
item.ProblemCompletedNum = table.ProblemCompletedNum;
item.ProblemNotCompletedNum = table.ProblemNotCompletedNum;
item.ProblemRate = "";
+ item.UnitCheckNum = table.UnitCheckNum;
+ item.UnitCheckClosedNum = table.UnitCheckClosedNum;
+ item.UnitCheckNotClosedNum = table.UnitCheckNotClosedNum;
+ item.BranchCheckNum = table.BranchCheckNum;
+ item.BranchCheckClosedNum = table.BranchCheckClosedNum;
+ item.BranchCheckNotClosedNum = table.BranchCheckNotClosedNum;
item.SNum = table.SNum;
item.ANum = table.ANum;
item.BNum = table.BNum;
@@ -829,6 +830,8 @@ namespace BLL
item.SubProjectAcceptOKNum = table.SubProjectAcceptOKNum;
item.SubdivisionalWorksAcceptNum = table.SubdivisionalWorksAcceptNum;
item.SubdivisionalWorksAcceptOKNum = table.SubdivisionalWorksAcceptOKNum;
+ item.InspectionMachineNum = table.InspectionMachineNum;
+ item.InspectionMachineQualifiedNum = table.InspectionMachineQualifiedNum;
var cqmsDataItems = new List();
cqmsDataItems.Add(item);
data.CQMSDataItems = cqmsDataItems;
@@ -891,6 +894,7 @@ namespace BLL
///
public static IEnumerable GetProjectPersonNum()
{
+ var mianAndSubUnitList = (from x in Funs.DB.Base_Unit where x.IsThisUnit == true || x.IsBranch == true select x.UnitId).ToList();
var result = (from x in Funs.DB.SitePerson_Person
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
@@ -902,13 +906,15 @@ namespace BLL
{
ProjectId = x.ProjectId,
ProjectName = p.ProjectName,
+ ProjectFromUnitId=p.UnitId,
UnitId = u.UnitId,
UnitName = u.UnitName,
Name = x.PersonName,
Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"),
IdentityCard = x.IdentityCard,
WorkPostName = y.WorkPostName == null ? "" : y.WorkPostName,
- Phone = x.Telephone
+ Phone = x.Telephone,
+ IsOffice = x.UnitId == null ? false : mianAndSubUnitList.Contains(x.UnitId)
}).ToList();
result = result
.GroupBy(x => x.IdentityCard)
@@ -965,7 +971,7 @@ namespace BLL
}
///
- /// 获取技术交底人次数
+ /// 获取设计交底人次数
///
///
public static int GetTechnicalDisclosePersonNum()
@@ -977,7 +983,7 @@ namespace BLL
}
///
- /// 获取技术交底人次数
+ /// 获取设计交底人次数
///
///
public static List GetTechnicalDisclosePerson()
@@ -1001,7 +1007,7 @@ namespace BLL
}
///
- /// 获取技术交底人次数(异步)
+ /// 获取设计交底人次数(异步)
///
///
public static async Task> GetTechnicalDisclosePersonNumAsync()
@@ -1009,6 +1015,69 @@ namespace BLL
return await Task.Run(GetTechnicalDisclosePerson);
}
+
+ ///
+ /// 获取施工技术交底
+ ///
+ ///
+ public static List GetComprehensiveConTechnologyDisclosure()
+ {
+ var result = (from x in Funs.DB.Comprehensive_ConTechnologyDisclosure
+ join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
+ from p in pGroup.DefaultIfEmpty()
+ where BeUnderConstructionList.Contains(p.ProjectId) && x.CompileDate > Const.DtmarkTime
+ select new Model.EduTrainOutput()
+ {
+ ProjectId = x.ProjectId,
+ ProjectName = p.ProjectName,
+ UnitName = "",
+ Id = x.ConTechnologyDisclosureId,
+ TrainTitle = "",
+ TrainStartDate = null,
+ TrainEndDate = null,
+ TrainPersonNum = x.DisclosurePersonNum ?? 0,
+ }).ToList();
+ return result;
+ }
+
+ ///
+ /// 获取施工技术交底(异步)
+ ///
+ ///
+ public static async Task> GetComprehensiveConTechnologyDisclosureAsync()
+ {
+ return await Task.Run(GetComprehensiveConTechnologyDisclosure);
+ }
+
+ ///
+ /// 获取图纸会审
+ ///
+ ///
+ public static List GetComprehensiveReviewDrawings()
+ {
+ var result = (from x in Funs.DB.Comprehensive_ReviewDrawings
+ join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
+ from p in pGroup.DefaultIfEmpty()
+ where BeUnderConstructionList.Contains(p.ProjectId) && x.CreateDate > Const.DtmarkTime
+ select new Model.EduTrainOutput()
+ {
+ ProjectId = x.ProjectId,
+ ProjectName = p.ProjectName,
+ UnitName = "",
+ Id = x.Id
+ }).ToList();
+ return result;
+ }
+
+ ///
+ /// 获取图纸会审(异步)
+ ///
+ ///
+ public static async Task> GetComprehensiveReviewDrawingsAsync()
+ {
+ return await Task.Run(GetComprehensiveReviewDrawings);
+ }
+
///
/// 获取设备报验
///
@@ -1058,7 +1127,19 @@ namespace BLL
public static List GetComprehensive_InspectionMachine()
{
var result = (from x in Funs.DB.Comprehensive_InspectionMachine
- where BeUnderConstructionList.Contains(x.ProjectId) && x.CompileDate > Const.DtmarkTime
+ where BeUnderConstructionList.Contains(x.ProjectId) && x.SType == "机具" && x.CompileDate > Const.DtmarkTime
+ select x).ToList();
+ return result;
+ }
+
+ ///
+ /// 获取设备报验
+ ///
+ ///
+ public static List GetComprehensive_InspectionMachineEquipment()
+ {
+ var result = (from x in Funs.DB.Comprehensive_InspectionMachine
+ where BeUnderConstructionList.Contains(x.ProjectId) && x.SType == "设备" && x.CompileDate > Const.DtmarkTime
select x).ToList();
return result;
}
@@ -1072,6 +1153,15 @@ namespace BLL
return await Task.Run(GetComprehensive_InspectionMachine);
}
+ ///
+ /// 获取设备报验(异步)
+ ///
+ ///
+ public static async Task> GetComprehensive_InspectionMachineEquipmentAsync()
+ {
+ return await Task.Run(GetComprehensive_InspectionMachineEquipment);
+ }
+
///
/// 获取在用计量器具数
///
@@ -1730,5 +1820,110 @@ namespace BLL
}
#endregion
+
+
+ ///
+ /// 特设质保体系数量
+ ///
+ ///
+ public static List GetQualityAssuranceNum()
+ {
+ var result = (from x in Funs.DB.Comprehensive_QualityAssurance
+ where BeUnderConstructionList.Contains(x.ProjectId)
+ select x).ToList();
+ return result;
+ }
+ ///
+ /// 特设质保体系数量(异步)
+ ///
+ ///
+ public static async Task> GetQualityAssuranceNumAsync()
+ {
+ return await Task.Run(GetQualityAssuranceNum);
+ }
+
+ #region 质量监督大检查数据
+
+ #region 企业级-本单位
+
+ ///
+ /// 获取企业质量大检查次数
+ ///
+ ///
+ public static List GetCompanyMajorCheck()
+ {
+ var result = (from x in Funs.DB.Supervise_SuperviseCheckReport
+ join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
+ from p in pGroup.DefaultIfEmpty()
+ join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup
+ from u in uGroup.DefaultIfEmpty()
+ join cu in Funs.DB.Base_Unit on x.CheckUnitId equals cu.UnitId into cuGroup
+ from cu in cuGroup.DefaultIfEmpty()
+ where cu.IsThisUnit == true && x.CheckMainType == "1" && x.CheckDate > Const.DtmarkTime //&& x.CheckType == "1"
+ select new Model.CheckOutput()
+ {
+ ProjectId = x.ProjectId,
+ ProjectName = p.ProjectName,
+ UnitId = x.UnitId,
+ UnitName = u.UnitName,
+ Id = x.SuperviseCheckReportId,
+ CheckTeam = x.CheckTeam,
+ CheckDate = x.CheckDate,
+ });
+ return result.ToList();
+ }
+ ///
+ /// 获取企业质量大检查次数(异步)
+ ///
+ ///
+ public static async Task> GetCompanyMajorCheckAsync()
+ {
+ return await Task.Run(GetCompanyMajorCheck);
+ }
+
+ #endregion
+
+ #region 分支机构
+
+ ///
+ /// 获取分支机构质量大检查次数
+ ///
+ ///
+ public static List GetBranchMajorCheck()
+ {
+ var result = (from x in Funs.DB.Supervise_SuperviseCheckReport
+ join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
+ from p in pGroup.DefaultIfEmpty()
+ join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup
+ from u in uGroup.DefaultIfEmpty()
+ join cu in Funs.DB.Base_Unit on x.CheckUnitId equals cu.UnitId into cuGroup
+ from cu in cuGroup.DefaultIfEmpty()
+ where cu.IsBranch == true && x.CheckMainType == "1" && x.CheckDate > Const.DtmarkTime//&& x.CheckType == "1"
+ select new Model.CheckOutput()
+ {
+ ProjectId = x.ProjectId,
+ ProjectName = p.ProjectName,
+ UnitId = x.UnitId,
+ UnitName = u.UnitName,
+ Id = x.SuperviseCheckReportId,
+ CheckTeam = x.CheckTeam,
+ CheckDate = x.CheckDate,
+ });
+ return result.ToList();
+ }
+ ///
+ /// 获取分支机构质量大检查次数(异步)
+ ///
+ ///
+ public static async Task> GetBranchMajorCheckAsync()
+ {
+ return await Task.Run(GetBranchMajorCheck);
+ }
+
+
+ #endregion
+
+ #endregion
+
}
}
\ No newline at end of file
diff --git a/SUBQHSE/BLL/ZHGL/DataSync/HJGLData_HJGLService.cs b/SUBQHSE/BLL/ZHGL/DataSync/HJGLData_HJGLService.cs
index 2a03e36..28a3600 100644
--- a/SUBQHSE/BLL/ZHGL/DataSync/HJGLData_HJGLService.cs
+++ b/SUBQHSE/BLL/ZHGL/DataSync/HJGLData_HJGLService.cs
@@ -1,4 +1,4 @@
-using FineUIPro;
+using FineUIPro;
using Model;
using Newtonsoft.Json;
using System;
@@ -14,9 +14,7 @@ namespace BLL
{
public static class HJGLData_HJGLService
{
- public static SUBQHSEDB db = Funs.DB;
- public static List BeUnderConstructionList = ProjectService.GetProjectWorkList().Where(x => (x.ProjectAttribute == "GONGCHENG" || x.ProjectAttribute == null)).Select(x => x.ProjectId).ToList();
-
+ public static List BeUnderConstructionList = BaseDataService.BeUnderConstructionList;
#region 获取列表
///
diff --git a/SUBQHSE/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs b/SUBQHSE/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs
index 359c130..56741e1 100644
--- a/SUBQHSE/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs
+++ b/SUBQHSE/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs
@@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices.ComTypes;
using System.Runtime.Remoting.Contexts;
+using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Web.UI.WebControls;
using Aspose.Words.Lists;
@@ -16,10 +17,8 @@ namespace BLL
{
public static class HSSEData_HSSEService
{
- public static SUBQHSEDB Db = Funs.DB;
-
- public static List BeUnderConstructionList = ProjectService.GetProjectWorkList().Where(x => (x.ProjectAttribute == "GONGCHENG" || x.ProjectAttribute == null)).Select(x => x.ProjectId).ToList();
+ public static List BeUnderConstructionList = BaseDataService.BeUnderConstructionList;
public static void AddHSSEData_HSSE(HSSEData_HSSE newtable)
{
using (var db = new SUBQHSEDB(Funs.ConnString))
@@ -52,11 +51,13 @@ namespace BLL
BranchFullTimeNum = newtable.BranchFullTimeNum,
ProjectInspectorGeneralNum = newtable.ProjectInspectorGeneralNum,
ProjectFullTimeNum = newtable.ProjectFullTimeNum,
+ ProjectSubFullTimeNum = newtable.ProjectSubFullTimeNum,
ProjectSafetyMonitorNum = newtable.ProjectSafetyMonitorNum,
SafetyInjectionEngineer = newtable.SafetyInjectionEngineer,
CertificateANum = newtable.CertificateANum,
CertificateBNum = newtable.CertificateBNum,
CertificateCNum = newtable.CertificateCNum,
+ QualityPersonNum = newtable.QualityPersonNum,
SafetyCommitteeMeetingNum = newtable.SafetyCommitteeMeetingNum,
EnterpriseTopicsMeetingNum = newtable.EnterpriseTopicsMeetingNum,
ProjectSafetyLeadingGroupMeetingNum = newtable.ProjectSafetyLeadingGroupMeetingNum,
@@ -64,6 +65,9 @@ namespace BLL
CompanyLeadShiftCheckNum = newtable.CompanyLeadShiftCheckNum,
CompanyComprehensiveCheckNum = newtable.CompanyComprehensiveCheckNum,
CompanySpecialCheckNum = newtable.CompanySpecialCheckNum,
+ BranchLeadShiftCheckNum = newtable.BranchLeadShiftCheckNum,
+ BranchComprehensiveCheckNum = newtable.BranchComprehensiveCheckNum,
+ BranchSpecialCheckNum = newtable.BranchSpecialCheckNum,
ProjectLeadShiftCheckNum = newtable.ProjectLeadShiftCheckNum,
ProjectSpecialCheckNum = newtable.ProjectSpecialCheckNum,
ProjectMajorCheckNum = newtable.ProjectMajorCheckNum,
@@ -76,8 +80,13 @@ namespace BLL
CompanyComprehensivePlanNum = newtable.CompanyComprehensivePlanNum,
CompanySpecialPlanNum = newtable.CompanySpecialPlanNum,
CompanyOnSiteDisposalPlan = newtable.CompanyOnSiteDisposalPlan,
+ BranchComprehensivePlanNum = newtable.BranchComprehensivePlanNum,
+ BranchSpecialPlanNum = newtable.BranchSpecialPlanNum,
+ BranchOnSiteDisposalPlan = newtable.BranchOnSiteDisposalPlan,
CompanyDrillNum = newtable.CompanyDrillNum,
CompanyDrillPersonNum = newtable.CompanyDrillPersonNum,
+ BranchDrillNum = newtable.BranchDrillNum,
+ BranchDrillPersonNum = newtable.BranchDrillPersonNum,
ProjectComprehensivePlanNum = newtable.ProjectComprehensivePlanNum,
ProjectSpecialPlanNum = newtable.ProjectSpecialPlanNum,
ProjectOnSiteDisposalPlan = newtable.ProjectOnSiteDisposalPlan,
@@ -99,6 +108,7 @@ namespace BLL
HighRiskNum = newtable.HighRiskNum,
CompletedNum = newtable.CompletedNum,
TrainPersonNum = newtable.TrainPersonNum,
+ OperativesNum = newtable.OperativesNum,
ConstructionNum = newtable.ConstructionNum,
FinishedNum = newtable.FinishedNum,
ArgumentNum = newtable.ArgumentNum,
@@ -144,17 +154,26 @@ namespace BLL
var dataHsse = GetHSSEData_HSSEById(id);
if (dataHsse != null)
{
+ item.BranchLeadShiftCheckNum = dataHsse.BranchLeadShiftCheckNum;
+ item.BranchComprehensiveCheckNum = dataHsse.BranchComprehensiveCheckNum;
+ item.BranchSpecialCheckNum = dataHsse.BranchSpecialCheckNum;
item.BeUnderConstructionNum = dataHsse.BeUnderConstructionNum;
item.BranchFullTimeNum = dataHsse.BranchFullTimeNum;
item.BranchInspectorGeneralNum = dataHsse.BranchInspectorGeneralNum;
+ item.BranchComprehensivePlanNum = dataHsse.BranchComprehensivePlanNum;
+ item.BranchSpecialPlanNum = dataHsse.BranchSpecialPlanNum;
+ item.BranchOnSiteDisposalPlan = dataHsse.BranchOnSiteDisposalPlan;
item.CertificateANum = dataHsse.CertificateANum;
item.CertificateBNum = dataHsse.CertificateBNum;
item.CertificateCNum = dataHsse.CertificateCNum;
+ item.QualityPersonNum = dataHsse.QualityPersonNum;
item.CollCropCode = dataHsse.CollCropCode;
item.CompanyComprehensiveCheckNum = dataHsse.CompanyComprehensiveCheckNum;
item.CompanyComprehensivePlanNum = dataHsse.CompanyComprehensivePlanNum;
item.CompanyDrillNum = dataHsse.CompanyDrillNum;
item.CompanyDrillPersonNum = dataHsse.CompanyDrillPersonNum;
+ item.BranchDrillNum = dataHsse.BranchDrillNum;
+ item.BranchDrillPersonNum = dataHsse.BranchDrillPersonNum;
item.CompanyLeadShiftCheckNum = dataHsse.CompanyLeadShiftCheckNum;
item.CompanyOnSiteDisposalPlan = dataHsse.CompanyOnSiteDisposalPlan;
item.CompanySpecialCheckNum = dataHsse.CompanySpecialCheckNum;
@@ -220,10 +239,12 @@ namespace BLL
item.SuperConstructionNum = dataHsse.SuperConstructionNum;
item.SuperFinishedNum = dataHsse.SuperFinishedNum;
item.SuperTrainPersonNum = dataHsse.SuperTrainPersonNum;
+ item.SuperOperativesNum = dataHsse.SuperOperativesNum;
item.SuperArgumentNum = dataHsse.SuperArgumentNum;
item.TotalEnergyConsumption = dataHsse.TotalEnergyConsumption;
item.TotalWorkingHour = dataHsse.TotalWorkingHour;
item.TrainPersonNum = dataHsse.TrainPersonNum;
+ item.OperativesNum = dataHsse.OperativesNum;
item.UnitId = dataHsse.UnitId;
item.UseEquipmentNum = dataHsse.UseEquipmentNum;
var hSseDataHiddens =
@@ -254,17 +275,26 @@ namespace BLL
var data = new HSSEData();
if (dataHsse != null)
{
+ item.BranchLeadShiftCheckNum = dataHsse.BranchLeadShiftCheckNum;
+ item.BranchComprehensiveCheckNum = dataHsse.BranchComprehensiveCheckNum;
+ item.BranchSpecialCheckNum = dataHsse.BranchSpecialCheckNum;
item.BeUnderConstructionNum = dataHsse.BeUnderConstructionNum;
item.BranchFullTimeNum = dataHsse.BranchFullTimeNum;
item.BranchInspectorGeneralNum = dataHsse.BranchInspectorGeneralNum;
+ item.BranchComprehensivePlanNum = dataHsse.BranchComprehensivePlanNum;
+ item.BranchSpecialPlanNum = dataHsse.BranchSpecialPlanNum;
+ item.BranchOnSiteDisposalPlan = dataHsse.BranchOnSiteDisposalPlan;
item.CertificateANum = dataHsse.CertificateANum;
item.CertificateBNum = dataHsse.CertificateBNum;
item.CertificateCNum = dataHsse.CertificateCNum;
+ item.QualityPersonNum = dataHsse.QualityPersonNum;
item.CollCropCode = dataHsse.CollCropCode;
item.CompanyComprehensiveCheckNum = dataHsse.CompanyComprehensiveCheckNum;
item.CompanyComprehensivePlanNum = dataHsse.CompanyComprehensivePlanNum;
item.CompanyDrillNum = dataHsse.CompanyDrillNum;
item.CompanyDrillPersonNum = dataHsse.CompanyDrillPersonNum;
+ item.BranchDrillNum = dataHsse.BranchDrillNum;
+ item.BranchDrillPersonNum = dataHsse.BranchDrillPersonNum;
item.CompanyLeadShiftCheckNum = dataHsse.CompanyLeadShiftCheckNum;
item.CompanyOnSiteDisposalPlan = dataHsse.CompanyOnSiteDisposalPlan;
item.CompanySpecialCheckNum = dataHsse.CompanySpecialCheckNum;
@@ -303,6 +333,7 @@ namespace BLL
item.ProjectDrillNum = dataHsse.ProjectDrillNum;
item.ProjectDrillPersonNum = dataHsse.ProjectDrillPersonNum;
item.ProjectFullTimeNum = dataHsse.ProjectFullTimeNum;
+ item.ProjectSubFullTimeNum = dataHsse.ProjectSubFullTimeNum;
item.ProjectInspectorGeneralNum = dataHsse.ProjectInspectorGeneralNum;
item.ProjectLeadShiftCheckNum = dataHsse.ProjectLeadShiftCheckNum;
item.ProjectMajorCheckNum = dataHsse.ProjectMajorCheckNum;
@@ -331,9 +362,11 @@ namespace BLL
item.SuperFinishedNum = dataHsse.SuperFinishedNum;
item.SuperArgumentNum = dataHsse.SuperArgumentNum;
item.SuperTrainPersonNum = dataHsse.SuperTrainPersonNum;
+ item.SuperOperativesNum = dataHsse.SuperOperativesNum;
item.TotalEnergyConsumption = dataHsse.TotalEnergyConsumption;
item.TotalWorkingHour = dataHsse.TotalWorkingHour;
item.TrainPersonNum = dataHsse.TrainPersonNum;
+ item.OperativesNum = dataHsse.OperativesNum;
item.UnitId = dataHsse.UnitId;
item.UseEquipmentNum = dataHsse.UseEquipmentNum;
if (hSseDataHiddens != null)
@@ -523,116 +556,10 @@ namespace BLL
return result;
}
- public static HSSEData StatisticalData()
- {
- var thisUnitId = string.Empty;
- var thisUnit = CommonService.GetIsThisUnit();
- if (thisUnit != null) thisUnitId = thisUnit.UnitId;
- var baseUnit = UnitService.GetUnitByUnitId(thisUnitId);
- Project_HSSEData_HiddenDangerDetailService.StatisticalAllProjectData();
-
- var totalEnergyConsumption = ChemicalReportItemService.GetLatstTimeTotalEnergyConsumption();
- var incomeComprehensiveEnergyConsumption =
- ChemicalReportItemService.GetLatstTimeIncomeComprehensiveEnergyConsumption();
- var newWaterConsumption = ChemicalReportItemService.GetLatstTimeNewWaterConsumption();
-
- var table = new HSSEData_HSSE
- {
- UnitId = thisUnitId,
- CollCropCode = baseUnit.CollCropCode,
- UnitName = baseUnit.UnitName,
- ReportDate = DateTime.Now.Date,
- BeUnderConstructionNum = GetBeUnderConstruction().Count,
- ShutdownNum = GetShutdown().Count,
- JoinConstructionPersonNum = GetJoinConstructionPerson().Count,
- MajorProjectsUnderConstructionNum = GetMajorProjectsUnderConstruction().Count,
- TotalWorkingHour = GetTotalWorkingHour(),
- LostWorkingHour = GetLostWorkingHour(),
- SafeWorkingHour = GetSafeWorkingHour(),
- SafeTrainNum = GetSafeTrain().Sum(x => x.TrainPersonNum),
- SpecialTrainNum = GetSpecialTrain().Sum(x => x.TrainPersonNum),
- SpecialOperationTrainNum = GetSpecialOperationTrain().Sum(x => x.TrainPersonNum),
- EnvironmentalTrainNum = 0,
- TotalEnergyConsumption = totalEnergyConsumption,
- IncomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumption,
- NewWaterConsumption = newWaterConsumption,
- HeadOfficeInspectorGeneralNum = GetHeadOfficeInspectorGeneral().Count,
- HeadOfficeFullTimeNum = GetHeadOfficeFullTime().Count,
- BranchInspectorGeneralNum = GetBranchInspectorGeneral().Count,
- BranchFullTimeNum = GetBranchFullTime().Count,
- ProjectInspectorGeneralNum = GetProjectInspectorGeneral().Count,
- ProjectFullTimeNum = GetProjectFullTime().Count,
- ProjectSafetyMonitorNum = GetProjectSafetyMonitor().Count,
- SafetyInjectionEngineer = GetSafetyInjectionEngineer().Count,
- CertificateANum = GetCertificateA().Count,
- CertificateBNum = GetCertificateB().Count,
- CertificateCNum = GetCertificateC().Count,
- SafetyCommitteeMeetingNum = GetSafetyCommitteeMeeting().Count,
- EnterpriseTopicsMeetingNum = GetEnterpriseTopicsMeeting().Count,
- ProjectSafetyLeadingGroupMeetingNum = GetProjectSafetyLeadingGroupMeeting().Count,
- ProjectSafetyMeetingNum = GetProjectSafetyMeeting().Count,
- CompanyLeadShiftCheckNum = GetCompanyLeadShiftCheck().Count,
- CompanyComprehensiveCheckNum = GetCompanyComprehensiveCheck().Count,
- CompanySpecialCheckNum = GetCompanySpecialCheck().Count,
- ProjectLeadShiftCheckNum = GetProjectLeadShiftCheck().Count,
- ProjectSpecialCheckNum = GetProjectSpecialCheck().Count,
- ProjectMajorCheckNum = GetProjectMajorCheck().Count,
- NearMissNum = GetNearMiss().Count,
- RecordableEventNum = GetRecordableEvent().Count,
- GeneralAccidentNum = GetGeneralAccident().Count,
- MajorAccidentNum = GetMajorAccident().Count,
- SeriousAccidentNum = GetSeriousAccident().Count,
- SpecialSeriousAccidentNum = GetSpecialSeriousAccident().Count,
- CompanyComprehensivePlanNum = GetCompanyComprehensivePlan().Count,
- CompanySpecialPlanNum = GetCompanySpecialPlan().Count,
- CompanyOnSiteDisposalPlan = GetCompanyOnSiteDisposalPlan().Count,
- CompanyDrillNum = GetCompanyDrill().Count,
- ProjectComprehensivePlanNum = GetProjectComprehensivePlan().Count,
- ProjectSpecialPlanNum = GetProjectSpecialPlan().Count,
- ProjectOnSiteDisposalPlan = GetProjectOnSiteDisposalPlan().Count,
- ProjectDrillNum = GetProjectDrill().Count,
- CostExtract = Convert.ToInt32(GetCostExtract().Sum(x => x.SUMCost)),
- CostUse = Convert.ToInt32(GetCostUse().Sum(x => x.SUMCost)),
- UseEquipmentNum = GetUseEquipment().Count,
- SpecialEquipmentNum = GetSpecialEquipment().Count,
- LicensesNum = GetLicenses().Count,
- LicensesCloseNum = GetLicensesClose().Count,
- GeneralClosedNum = GetGeneralHiddenRectificationOutputs().Sum(x => x.RecNum),
- GeneralNotClosedNum = GetGeneralHiddenRectificationOutputs().Sum(x => x.NoRecNum),
- MajorClosedNum = GetMajorHiddenRectificationOutputs().Sum(x => x.RecNum),
- MajorNotClosedNum = GetMajorHiddenRectificationOutputs().Sum(x => x.NoRecNum),
- GeneralRiskNum = GetSecurityRiskOutputs().Sum(x => x.GeneralRiskNum),
- LowRiskNum = GetSecurityRiskOutputs().Sum(x => x.LowRiskNum),
- MediumRiskNum = GetSecurityRiskOutputs().Sum(x => x.MediumRiskNum),
- HighRiskNum = GetSecurityRiskOutputs().Sum(x => x.HighRiskNum),
- CompletedNum = GetLargeEngineeringOutputs().Sum(x => x.CompletedNum),
- TrainPersonNum = GetLargeEngineeringOutputs().Sum(x => x.TrainPersonNum),
- ConstructionNum = GetLargeEngineeringOutputs().Sum(x => x.ConstructionNum),
- FinishedNum = GetLargeEngineeringOutputs().Sum(x => x.FinishedNum),
- SuperCompletedNum = GetLargeEngineeringOutputs().Sum(x => x.SuperCompletedNum),
- SuperTrainPersonNum = GetLargeEngineeringOutputs().Sum(x => x.SuperTrainPersonNum),
- SuperConstructionNum = GetLargeEngineeringOutputs().Sum(x => x.SuperConstructionNum),
- SuperFinishedNum = GetLargeEngineeringOutputs().Sum(x => x.SuperFinishedNum),
- CreateMan = Const.sysglyId,
- CreateDate = DateTime.Now
- };
- if (IsReportByToday())
- {
- table.Id = GetTodayData().Id;
- table.State = Const.CNCEC_State_1;
- UpdateHSSEData_HSSE(table);
- }
- else
- {
- table.Id = SQLHelper.GetNewID();
- table.State = Const.CNCEC_State_0;
- AddHSSEData_HSSE(table);
- }
-
- var data = GetItemByHSSEData_HSSE(table, Project_HSSEData_HiddenDangerDetailService.GetTodayModel());
- return data;
- }
-
+ ///
+ /// 统计数据(异步)
+ ///
+ ///
public static async Task StatisticalDataAsync()
{
var thisUnitId = string.Empty;
@@ -652,6 +579,8 @@ namespace BLL
var certificateATask = HSSEData_HSSEService.GetCertificateAAsync();
var certificateBTask = HSSEData_HSSEService.GetCertificateBAsync();
var certificateCTask = HSSEData_HSSEService.GetCertificateCAsync();
+ var qualityPersonNumTask = HSSEData_HSSEService.GetQualityPersonNumAsync();
+
var beUnderConstructionTask = HSSEData_HSSEService.GetBeUnderConstructionAsync();
var shutdownTask = HSSEData_HSSEService.GetShutdownAsync();
var joinConstructionPersonTask = HSSEData_HSSEService.GetJoinConstructionPersonAsync();
@@ -662,7 +591,7 @@ namespace BLL
var safeTrainTask = HSSEData_HSSEService.GetSafeTrainAsync();
var specialTrainTask = HSSEData_HSSEService.GetSpecialTrainAsync();
var specialOperationTrainTask = HSSEData_HSSEService.GetSpecialOperationTrainAsync();
- var hseTechnicalNumTask = HSSEData_HSSEService.GetHseTechnicalNumAsync();
+ var hseTechnicalTask = HSSEData_HSSEService.GetHseTechnicalAsync();
var headOfficeInspectorGeneralTask = HSSEData_HSSEService.GetHeadOfficeInspectorGeneralAsync();
var headOfficeFullTimeTask = HSSEData_HSSEService.GetHeadOfficeFullTimeAsync();
var branchInspectorGeneralTask = HSSEData_HSSEService.GetBranchInspectorGeneralAsync();
@@ -677,6 +606,9 @@ namespace BLL
var companyLeadShiftCheckTask = HSSEData_HSSEService.GetCompanyLeadShiftCheckAsync();
var companyComprehensiveCheckTask = HSSEData_HSSEService.GetCompanyComprehensiveCheckAsync();
var companySpecialCheckTask = HSSEData_HSSEService.GetCompanySpecialCheckAsync();
+ var branchLeadShiftCheckTask = HSSEData_HSSEService.GetBranchLeadShiftCheckAsync();
+ var branchComprehensiveCheckTask = HSSEData_HSSEService.GetBranchComprehensiveCheckAsync();
+ var branchSpecialCheckTask = HSSEData_HSSEService.GetBranchSpecialCheckAsync();
var projectLeadShiftCheckTask = HSSEData_HSSEService.GetProjectLeadShiftCheckAsync();
var projectSpecialCheckTask = HSSEData_HSSEService.GetProjectSpecialCheckAsync();
var projectMajorCheckTask = HSSEData_HSSEService.GetProjectMajorCheckAsync();
@@ -689,7 +621,11 @@ namespace BLL
var companyComprehensivePlanTask = HSSEData_HSSEService.GetCompanyComprehensivePlanAsync();
var companySpecialPlanTask = HSSEData_HSSEService.GetCompanySpecialPlanAsync();
var companyOnSiteDisposalPlanTask = HSSEData_HSSEService.GetCompanyOnSiteDisposalPlanAsync();
+ var branchComprehensivePlanTask = HSSEData_HSSEService.GetBranchComprehensivePlanAsync();
+ var branchSpecialPlanTask = HSSEData_HSSEService.GetBranchSpecialPlanAsync();
+ var branchOnSiteDisposalPlanTask = HSSEData_HSSEService.GetBranchOnSiteDisposalPlanAsync();
var companyDrillTask = HSSEData_HSSEService.GetCompanyDrillAsync();
+ var branchDrillTask = HSSEData_HSSEService.GetBranchDrillAsync();
var projectComprehensivePlanTask = HSSEData_HSSEService.GetProjectComprehensivePlanAsync();
var projectSpecialPlanTask = HSSEData_HSSEService.GetProjectSpecialPlanAsync();
var projectOnSiteDisposalPlanTask = HSSEData_HSSEService.GetProjectOnSiteDisposalPlanAsync();
@@ -711,6 +647,7 @@ namespace BLL
certificateATask,
certificateBTask,
certificateCTask,
+ qualityPersonNumTask,
beUnderConstructionTask,
shutdownTask,
joinConstructionPersonTask,
@@ -720,7 +657,7 @@ namespace BLL
safeWorkingHourTask,
safeTrainTask,
specialTrainTask,
- specialOperationTrainTask, hseTechnicalNumTask,
+ specialOperationTrainTask, hseTechnicalTask,
headOfficeInspectorGeneralTask,
headOfficeFullTimeTask,
branchInspectorGeneralTask,
@@ -735,6 +672,9 @@ namespace BLL
companyLeadShiftCheckTask,
companyComprehensiveCheckTask,
companySpecialCheckTask,
+ branchLeadShiftCheckTask,
+ branchComprehensiveCheckTask,
+ branchSpecialCheckTask,
projectLeadShiftCheckTask,
projectSpecialCheckTask,
projectMajorCheckTask,
@@ -747,7 +687,10 @@ namespace BLL
companyComprehensivePlanTask,
companySpecialPlanTask,
companyOnSiteDisposalPlanTask,
- companyDrillTask,
+ branchComprehensivePlanTask,
+ branchSpecialPlanTask,
+ branchOnSiteDisposalPlanTask,
+ companyDrillTask, branchDrillTask,
projectComprehensivePlanTask,
projectSpecialPlanTask,
projectOnSiteDisposalPlanTask,
@@ -771,6 +714,7 @@ namespace BLL
var certificateAList = await certificateATask;
var certificateBList = await certificateBTask;
var certificateCList = await certificateCTask;
+ var qualityPersonList = await qualityPersonNumTask;
var beUnderConstructionList = await beUnderConstructionTask;
var shutdownList = await shutdownTask;
var joinConstructionPersonList = await joinConstructionPersonTask;
@@ -781,7 +725,7 @@ namespace BLL
var safeTrainList = await safeTrainTask;
var specialTrainList = await specialTrainTask;
var specialOperationTrainList = await specialOperationTrainTask;
- var hseTechnicalNum = await hseTechnicalNumTask;
+ var hseTechnicalList = await hseTechnicalTask;
var headOfficeInspectorGeneralList = await headOfficeInspectorGeneralTask;
var headOfficeFullTimeList = await headOfficeFullTimeTask;
var branchInspectorGeneralList = await branchInspectorGeneralTask;
@@ -796,6 +740,9 @@ namespace BLL
var companyLeadShiftCheckList = await companyLeadShiftCheckTask;
var companyComprehensiveCheckList = await companyComprehensiveCheckTask;
var companySpecialCheckList = await companySpecialCheckTask;
+ var branchLeadShiftCheckList = await branchLeadShiftCheckTask;
+ var branchComprehensiveCheckList = await branchComprehensiveCheckTask;
+ var branchSpecialCheckList = await branchSpecialCheckTask;
var projectLeadShiftCheckList = await projectLeadShiftCheckTask;
var projectSpecialCheckList = await projectSpecialCheckTask;
var projectMajorCheckList = await projectMajorCheckTask;
@@ -808,7 +755,11 @@ namespace BLL
var companyComprehensivePlanList = await companyComprehensivePlanTask;
var companySpecialPlanList = await companySpecialPlanTask;
var companyOnSiteDisposalPlanList = await companyOnSiteDisposalPlanTask;
+ var branchComprehensivePlanList = await branchComprehensivePlanTask;
+ var branchSpecialPlanList = await branchSpecialPlanTask;
+ var branchOnSiteDisposalPlanList = await branchOnSiteDisposalPlanTask;
var companyDrillList = await companyDrillTask;
+ var branchDrillList = await branchDrillTask;
var projectComprehensivePlanList = await projectComprehensivePlanTask;
var projectSpecialPlanList = await projectSpecialPlanTask;
var projectOnSiteDisposalPlanList = await projectOnSiteDisposalPlanTask;
@@ -835,6 +786,7 @@ namespace BLL
CertificateANum = certificateAList.Count(),
CertificateBNum = certificateBList.Count(),
CertificateCNum = certificateCList.Count(),
+ QualityPersonNum = qualityPersonList.Count(),
JoinConstructionPersonNum = joinConstructionPersonList.Count(),
MajorProjectsUnderConstructionNum = majorProjectsUnderConstructionList.Count(),
TotalWorkingHour = totalWorkingHour,
@@ -843,7 +795,7 @@ namespace BLL
SafeTrainNum = safeTrainList.Sum(x => x.TrainPersonNum),
SpecialTrainNum = specialTrainList.Sum(x => x.TrainPersonNum),
SpecialOperationTrainNum = specialOperationTrainList.Sum(x => x.TrainPersonNum),
- HseTechnicalNum = hseTechnicalNum,
+ HseTechnicalNum = hseTechnicalList.Count(),
EnvironmentalTrainNum = 0,
TotalEnergyConsumption = totalEnergyConsumption,
IncomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumption,
@@ -853,7 +805,8 @@ namespace BLL
BranchInspectorGeneralNum = branchInspectorGeneralList.Count,
BranchFullTimeNum = branchFullTimeList.Count,
ProjectInspectorGeneralNum = projectInspectorGeneralList.Count,
- ProjectFullTimeNum = projectFullTimeList.Count,
+ ProjectFullTimeNum = projectFullTimeList.Count(x=>x.IsOffice==true),
+ ProjectSubFullTimeNum = projectFullTimeList.Count(x=>x.IsOffice==false),
ProjectSafetyMonitorNum = projectSafetyMonitorList.Count,
SafetyCommitteeMeetingNum = safetyCommitteeMeetingList.Count(),
EnterpriseTopicsMeetingNum = enterpriseTopicsMeetingList.Count(),
@@ -862,6 +815,9 @@ namespace BLL
CompanyLeadShiftCheckNum = companyLeadShiftCheckList.Count(),
CompanyComprehensiveCheckNum = companyComprehensiveCheckList.Count(),
CompanySpecialCheckNum = companySpecialCheckList.Count(),
+ BranchLeadShiftCheckNum = branchLeadShiftCheckList.Count(),
+ BranchComprehensiveCheckNum = branchComprehensiveCheckList.Count(),
+ BranchSpecialCheckNum = branchSpecialCheckList.Count(),
ProjectLeadShiftCheckNum = projectLeadShiftCheckList.Count(),
ProjectSpecialCheckNum = projectSpecialCheckList.Count(),
ProjectMajorCheckNum = projectMajorCheckList.Count(),
@@ -874,8 +830,13 @@ namespace BLL
CompanyComprehensivePlanNum = companyComprehensivePlanList.Count(),
CompanySpecialPlanNum = companySpecialPlanList.Count(),
CompanyOnSiteDisposalPlan = companyOnSiteDisposalPlanList.Count(),
+ BranchComprehensivePlanNum = branchComprehensivePlanList.Count(),
+ BranchSpecialPlanNum = branchSpecialPlanList.Count(),
+ BranchOnSiteDisposalPlan = branchOnSiteDisposalPlanList.Count(),
CompanyDrillNum = companyDrillList.Count(),
CompanyDrillPersonNum = companyDrillList.Sum(x => x.JointPersonNum),
+ BranchDrillNum = branchDrillList.Count(),
+ BranchDrillPersonNum = branchDrillList.Sum(x => x.JointPersonNum),
ProjectComprehensivePlanNum = projectComprehensivePlanList.Count(),
ProjectSpecialPlanNum = projectSpecialPlanList.Count(),
ProjectOnSiteDisposalPlan = projectOnSiteDisposalPlanList.Count(),
@@ -897,11 +858,13 @@ namespace BLL
HighRiskNum = securityRiskOutputListTask.Result.Sum(x => x.HighRiskNum),
CompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.CompletedNum),
TrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.TrainPersonNum),
+ OperativesNum = largeEngineeringOutputsTask.Result.Sum(x => x.OperativesNum),
ConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.ConstructionNum),
FinishedNum = largeEngineeringOutputsTask.Result.Sum(x => x.FinishedNum),
ArgumentNum = largeEngineeringOutputsTask.Result.Sum(x => x.ArgumentNum),
SuperCompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperCompletedNum),
SuperTrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperTrainPersonNum),
+ SuperOperativesNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperOperativesNum),
SuperConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperConstructionNum),
SuperFinishedNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperFinishedNum),
SuperArgumentNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperArgumentNum)
@@ -945,12 +908,15 @@ namespace BLL
{
CompletedNum = g.Sum(x => x.CompletedNum),
TrainPersonNum = g.Sum(x => x.TrainPersonNum),
+ OperativesNum = g.Sum(x => x.OperativesNum),
ConstructionNum = g.Sum(x => x.ConstructionNum),
FinishedNum = g.Sum(x => x.FinishedNum),
ArgumentNum = g.Sum(x => x.ArgumentNum),
SuperCompletedNum = g.Sum(x => x.SuperCompletedNum),
SuperTrainPersonNum = g.Sum(x => x.SuperTrainPersonNum),
+ SuperOperativesNum = g.Sum(x => x.SuperOperativesNum),
SuperConstructionNum = g.Sum(x => x.SuperConstructionNum),
+ SuperFinishedNum = g.Sum(x => x.SuperFinishedNum),
SuperArgumentNum = g.Sum(x => x.SuperArgumentNum)
}
);
@@ -976,7 +942,7 @@ namespace BLL
SafeTrainNum = safeTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
SpecialTrainNum = specialTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
SpecialOperationTrainNum = specialOperationTrainList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum),
- HseTechnicalNum = hseTechnicalNum,
+ HseTechnicalNum = hseTechnicalList.Count(x => x.ProjectId == projectid),
EnvironmentalTrainNum = 0,
TotalEnergyConsumption = 0,
IncomeComprehensiveEnergyConsumption = 0,
@@ -990,14 +956,19 @@ namespace BLL
CertificateANum = certificateAList.Count(x => x.ProjectId == projectid),
CertificateBNum = certificateBList.Count(x => x.ProjectId == projectid),
CertificateCNum = certificateCList.Count(x => x.ProjectId == projectid),
+ QualityPersonNum = qualityPersonList.Count(x => x.ProjectId == projectid),
ProjectInspectorGeneralNum = projectInspectorGeneralList.Count(x => x.ProjectId == projectid),
- ProjectFullTimeNum = projectFullTimeList.Count(x => x.ProjectId == projectid),
+ ProjectFullTimeNum = projectFullTimeList.Count(x => x.ProjectId == projectid && x.IsOffice==true),
+ ProjectSubFullTimeNum = projectFullTimeList.Count(x => x.ProjectId == projectid && x.IsOffice== false),
ProjectSafetyMonitorNum = projectSafetyMonitorList.Count(x => x.ProjectId == projectid),
ProjectSafetyLeadingGroupMeetingNum = projectSafetyLeadingGroupMeetingList.Count(x => x.ProjectId == projectid),
ProjectSafetyMeetingNum = projectSafetyMeetingList.Count(x => x.ProjectId == projectid),
CompanyLeadShiftCheckNum = companyLeadShiftCheckList.Count(x => x.ProjectId == projectid),
CompanyComprehensiveCheckNum = companyComprehensiveCheckList.Count(x => x.ProjectId == projectid),
CompanySpecialCheckNum = companySpecialCheckList.Count(x => x.ProjectId == projectid),
+ BranchLeadShiftCheckNum = branchLeadShiftCheckList.Count(x => x.ProjectId == projectid),
+ BranchComprehensiveCheckNum = branchComprehensiveCheckList.Count(x => x.ProjectId == projectid),
+ BranchSpecialCheckNum = branchSpecialCheckList.Count(x => x.ProjectId == projectid),
ProjectLeadShiftCheckNum = projectLeadShiftCheckList.Count(x => x.ProjectId == projectid),
ProjectSpecialCheckNum = projectSpecialCheckList.Count(x => x.ProjectId == projectid),
ProjectMajorCheckNum = projectMajorCheckList.Count(x => x.ProjectId == projectid),
@@ -1010,8 +981,13 @@ namespace BLL
CompanyComprehensivePlanNum = 0,
CompanySpecialPlanNum = 0,
CompanyOnSiteDisposalPlan = 0,
+ BranchComprehensivePlanNum = 0,
+ BranchSpecialPlanNum = 0,
+ BranchOnSiteDisposalPlan = 0,
CompanyDrillNum = 0,
CompanyDrillPersonNum = 0,
+ BranchDrillNum = 0,
+ BranchDrillPersonNum = 0,
ProjectComprehensivePlanNum = projectComprehensivePlanList.Count(x => x.ProjectId == projectid),
ProjectSpecialPlanNum = projectSpecialPlanList.Count(x => x.ProjectId == projectid),
ProjectOnSiteDisposalPlan = projectOnSiteDisposalPlanList.Count(x => x.ProjectId == projectid),
@@ -1033,12 +1009,15 @@ namespace BLL
HighRiskNum = securityRiskOutputs?.HighRiskNum ?? 0,
CompletedNum = largeEngineeringOutputs?.CompletedNum ?? 0,
TrainPersonNum = largeEngineeringOutputs?.TrainPersonNum ?? 0,
+ OperativesNum = largeEngineeringOutputs?.OperativesNum ?? 0,
ConstructionNum = largeEngineeringOutputs?.ConstructionNum ?? 0,
FinishedNum = largeEngineeringOutputs?.FinishedNum ?? 0,
ArgumentNum = largeEngineeringOutputs?.ArgumentNum ?? 0,
SuperCompletedNum = largeEngineeringOutputs?.SuperCompletedNum ?? 0,
SuperTrainPersonNum = largeEngineeringOutputs?.SuperTrainPersonNum ?? 0,
+ SuperOperativesNum = largeEngineeringOutputs?.SuperOperativesNum ?? 0,
SuperConstructionNum = largeEngineeringOutputs?.SuperConstructionNum ?? 0,
+ SuperFinishedNum=largeEngineeringOutputs?.SuperFinishedNum ?? 0,
SuperArgumentNum = largeEngineeringOutputs?.SuperArgumentNum ?? 0
};
Project_HSSEData_HSSEService.AddProject_HSSEData_HSSE(projectHsseData);
@@ -1063,120 +1042,6 @@ namespace BLL
return data;
}
- //public static HSSEData StatisticalDataOld()
- //{
- // var thisUnitId = string.Empty;
- // var thisUnit = CommonService.GetIsThisUnit();
- // if (thisUnit != null) thisUnitId = thisUnit.UnitId;
- // var baseUnit = UnitService.GetUnitByUnitId(thisUnitId);
- // Project_HSSEData_HSSEService.StatisticalAllProjectData();
- // Project_HSSEData_HiddenDangerDetailService.StatisticalAllProjectData();
-
- // var projectData = (from x in Funs.DB.Project_HSSEData_HSSE
- // where x.ReportDate < DateTime.Now.AddDays(1).Date && x.ReportDate >= DateTime.Now.Date
- // select x).ToList();
- // var totalEnergyConsumption = ChemicalReportItemService.GetLatstTimeTotalEnergyConsumption();
- // var incomeComprehensiveEnergyConsumption =
- // ChemicalReportItemService.GetLatstTimeIncomeComprehensiveEnergyConsumption();
- // var newWaterConsumption = ChemicalReportItemService.GetLatstTimeNewWaterConsumption();
-
- // var table = new HSSEData_HSSE
- // {
- // UnitId = thisUnitId,
- // CollCropCode = baseUnit.CollCropCode,
- // UnitName = baseUnit.UnitName,
- // ReportDate = DateTime.Now.Date,
- // BeUnderConstructionNum = projectData.Sum(x => x.BeUnderConstructionNum),
- // ShutdownNum = projectData.Sum(x => x.ShutdownNum),
- // JoinConstructionPersonNum = projectData.Sum(x => x.JoinConstructionPersonNum),
- // MajorProjectsUnderConstructionNum = projectData.Sum(x => x.MajorProjectsUnderConstructionNum),
- // TotalWorkingHour = projectData.Sum(x => x.TotalWorkingHour),
- // LostWorkingHour = projectData.Sum(x => x.LostWorkingHour),
- // SafeWorkingHour = projectData.Sum(x => x.SafeWorkingHour),
- // SafeTrainNum = projectData.Sum(x => x.SafeTrainNum),
- // SpecialTrainNum = projectData.Sum(x => x.SpecialTrainNum),
- // SpecialOperationTrainNum = projectData.Sum(x => x.SpecialOperationTrainNum),
- // EnvironmentalTrainNum = projectData.Sum(x => x.EnvironmentalTrainNum),
- // TotalEnergyConsumption = totalEnergyConsumption,
- // IncomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumption,
- // NewWaterConsumption = newWaterConsumption,
- // HeadOfficeInspectorGeneralNum = GetHeadOfficeInspectorGeneralNum(),
- // HeadOfficeFullTimeNum = GetHeadOfficeFullTimeNum(),
- // BranchInspectorGeneralNum = GetBranchInspectorGeneralNum(),
- // BranchFullTimeNum = GetBranchFullTimeNum(),
- // ProjectInspectorGeneralNum = projectData.Sum(x => x.ProjectInspectorGeneralNum),
- // ProjectFullTimeNum = projectData.Sum(x => x.ProjectFullTimeNum),
- // ProjectSafetyMonitorNum = projectData.Sum(x => x.ProjectSafetyMonitorNum),
- // SafetyInjectionEngineer = projectData.Sum(x => x.SafetyInjectionEngineer),
- // CertificateANum = projectData.Sum(x => x.CertificateANum),
- // CertificateBNum = projectData.Sum(x => x.CertificateBNum),
- // CertificateCNum = projectData.Sum(x => x.CertificateCNum),
- // SafetyCommitteeMeetingNum = GetSafetyCommitteeMeetingNum(),
- // EnterpriseTopicsMeetingNum = GetEnterpriseTopicsMeetingNum(),
- // ProjectSafetyLeadingGroupMeetingNum = projectData.Sum(x => x.ProjectSafetyLeadingGroupMeetingNum),
- // ProjectSafetyMeetingNum = projectData.Sum(x => x.ProjectSafetyMeetingNum),
- // // CompanyLeadShiftCheckNum = GetCompanyLeadShiftCheckNum(),
- // // CompanyComprehensiveCheckNum = GetCompanyComprehensiveCheckNum(),
- // // CompanySpecialCheckNum = GetCompanySpecialCheckNum(),
- // ProjectLeadShiftCheckNum = projectData.Sum(x => x.ProjectLeadShiftCheckNum),
- // ProjectSpecialCheckNum = projectData.Sum(x => x.ProjectSpecialCheckNum),
- // ProjectMajorCheckNum = projectData.Sum(x => x.ProjectMajorCheckNum),
- // NearMissNum = projectData.Sum(x => x.NearMissNum),
- // RecordableEventNum = projectData.Sum(x => x.RecordableEventNum),
- // GeneralAccidentNum = projectData.Sum(x => x.GeneralAccidentNum),
- // MajorAccidentNum = projectData.Sum(x => x.MajorAccidentNum),
- // SeriousAccidentNum = projectData.Sum(x => x.SeriousAccidentNum),
- // SpecialSeriousAccidentNum = projectData.Sum(x => x.SpecialSeriousAccidentNum),
- // //CompanyComprehensivePlanNum = GetCompanyComprehensivePlan(),
- // // CompanySpecialPlanNum = GetCompanySpecialPlan(),
- // // CompanyOnSiteDisposalPlan = GetCompanyOnSiteDisposalPlan(),
- // // CompanyDrillNum = GetCompanyDrill(),
- // ProjectComprehensivePlanNum = projectData.Sum(x => x.ProjectComprehensivePlanNum),
- // ProjectSpecialPlanNum = projectData.Sum(x => x.ProjectSpecialPlanNum),
- // ProjectOnSiteDisposalPlan = projectData.Sum(x => x.ProjectOnSiteDisposalPlan),
- // ProjectDrillNum = projectData.Sum(x => x.ProjectDrillNum),
- // CostExtract = projectData.Sum(x => x.CostExtract),
- // CostUse = projectData.Sum(x => x.CostUse),
- // UseEquipmentNum = projectData.Sum(x => x.UseEquipmentNum),
- // SpecialEquipmentNum = projectData.Sum(x => x.SpecialEquipmentNum),
- // LicensesNum = projectData.Sum(x => x.LicensesNum),
- // LicensesCloseNum = projectData.Sum(x => x.LicensesCloseNum),
- // GeneralClosedNum = projectData.Sum(x => x.GeneralClosedNum),
- // GeneralNotClosedNum = projectData.Sum(x => x.GeneralNotClosedNum),
- // MajorClosedNum = projectData.Sum(x => x.MajorClosedNum),
- // MajorNotClosedNum = projectData.Sum(x => x.MajorNotClosedNum),
- // GeneralRiskNum = projectData.Sum(x => x.GeneralRiskNum),
- // LowRiskNum = projectData.Sum(x => x.LowRiskNum),
- // MediumRiskNum = projectData.Sum(x => x.MediumRiskNum),
- // HighRiskNum = projectData.Sum(x => x.HighRiskNum),
- // CompletedNum = projectData.Sum(x => x.CompletedNum),
- // TrainPersonNum = projectData.Sum(x => x.TrainPersonNum),
- // ConstructionNum = projectData.Sum(x => x.ConstructionNum),
- // FinishedNum = projectData.Sum(x => x.FinishedNum),
- // SuperCompletedNum = projectData.Sum(x => x.SuperCompletedNum),
- // SuperTrainPersonNum = projectData.Sum(x => x.SuperTrainPersonNum),
- // SuperConstructionNum = projectData.Sum(x => x.SuperConstructionNum),
- // SuperFinishedNum = projectData.Sum(x => x.SuperFinishedNum),
- // CreateMan = Const.sysglyId,
- // CreateDate = DateTime.Now
- // };
- // if (IsReportByToday())
- // {
- // table.Id = GetTodayData().Id;
- // table.State = Const.CNCEC_State_1;
- // UpdateHSSEData_HSSE(table);
- // }
- // else
- // {
- // table.Id = SQLHelper.GetNewID();
- // table.State = Const.CNCEC_State_0;
- // AddHSSEData_HSSE(table);
- // }
-
- // var data = GetItemByHSSEData_HSSE(table, Project_HSSEData_HiddenDangerDetailService.GetTodayModel());
- // return data;
- //}
-
public static void UpdateHSSEData_HSSE(HSSEData_HSSE newtable)
{
using (var db = new SUBQHSEDB(Funs.ConnString))
@@ -1210,11 +1075,13 @@ namespace BLL
table.BranchFullTimeNum = newtable.BranchFullTimeNum;
table.ProjectInspectorGeneralNum = newtable.ProjectInspectorGeneralNum;
table.ProjectFullTimeNum = newtable.ProjectFullTimeNum;
+ table.ProjectSubFullTimeNum = newtable.ProjectSubFullTimeNum;
table.ProjectSafetyMonitorNum = newtable.ProjectSafetyMonitorNum;
table.SafetyInjectionEngineer = newtable.SafetyInjectionEngineer;
table.CertificateANum = newtable.CertificateANum;
table.CertificateBNum = newtable.CertificateBNum;
table.CertificateCNum = newtable.CertificateCNum;
+ table.QualityPersonNum = newtable.QualityPersonNum;
table.SafetyCommitteeMeetingNum = newtable.SafetyCommitteeMeetingNum;
table.EnterpriseTopicsMeetingNum = newtable.EnterpriseTopicsMeetingNum;
table.ProjectSafetyLeadingGroupMeetingNum = newtable.ProjectSafetyLeadingGroupMeetingNum;
@@ -1222,6 +1089,9 @@ namespace BLL
table.CompanyLeadShiftCheckNum = newtable.CompanyLeadShiftCheckNum;
table.CompanyComprehensiveCheckNum = newtable.CompanyComprehensiveCheckNum;
table.CompanySpecialCheckNum = newtable.CompanySpecialCheckNum;
+ table.BranchLeadShiftCheckNum = newtable.BranchLeadShiftCheckNum;
+ table.BranchComprehensiveCheckNum = newtable.BranchComprehensiveCheckNum;
+ table.BranchSpecialCheckNum = newtable.BranchSpecialCheckNum;
table.ProjectLeadShiftCheckNum = newtable.ProjectLeadShiftCheckNum;
table.ProjectSpecialCheckNum = newtable.ProjectSpecialCheckNum;
table.ProjectMajorCheckNum = newtable.ProjectMajorCheckNum;
@@ -1234,8 +1104,13 @@ namespace BLL
table.CompanyComprehensivePlanNum = newtable.CompanyComprehensivePlanNum;
table.CompanySpecialPlanNum = newtable.CompanySpecialPlanNum;
table.CompanyOnSiteDisposalPlan = newtable.CompanyOnSiteDisposalPlan;
+ table.BranchComprehensivePlanNum = newtable.BranchComprehensivePlanNum;
+ table.BranchSpecialPlanNum = newtable.BranchSpecialPlanNum;
+ table.BranchOnSiteDisposalPlan = newtable.BranchOnSiteDisposalPlan;
table.CompanyDrillNum = newtable.CompanyDrillNum;
table.CompanyDrillPersonNum = newtable.CompanyDrillPersonNum;
+ table.BranchDrillNum = newtable.BranchDrillNum;
+ table.BranchDrillPersonNum = newtable.BranchDrillPersonNum;
table.ProjectComprehensivePlanNum = newtable.ProjectComprehensivePlanNum;
table.ProjectSpecialPlanNum = newtable.ProjectSpecialPlanNum;
table.ProjectOnSiteDisposalPlan = newtable.ProjectOnSiteDisposalPlan;
@@ -1257,11 +1132,13 @@ namespace BLL
table.HighRiskNum = newtable.HighRiskNum;
table.CompletedNum = newtable.CompletedNum;
table.TrainPersonNum = newtable.TrainPersonNum;
+ table.OperativesNum = newtable.OperativesNum;
table.ConstructionNum = newtable.ConstructionNum;
table.FinishedNum = newtable.FinishedNum;
table.ArgumentNum = newtable.ArgumentNum;
table.SuperCompletedNum = newtable.SuperCompletedNum;
table.SuperTrainPersonNum = newtable.SuperTrainPersonNum;
+ table.SuperOperativesNum = newtable.SuperOperativesNum;
table.SuperConstructionNum = newtable.SuperConstructionNum;
table.SuperFinishedNum = newtable.SuperFinishedNum;
table.SuperArgumentNum = newtable.SuperArgumentNum;
@@ -1273,31 +1150,6 @@ namespace BLL
}
}
- ///
- /// 获取安全技术交底数
- ///
- ///
- public static int GetHseTechnicalNum()
- {
- var list = (from x in Funs.DB.License_HSETechnical
- where BeUnderConstructionList.Contains(x.ProjectId)
- select x).Distinct().ToList();
- var result = list.ToList().Count();
- return result;
-
- }
- ///
- /// 获取安全技术交底数(异步)
- ///
- ///
- public static async Task GetHseTechnicalNumAsync()
- {
- return await Task.Run(GetHseTechnicalNum);
-
- }
-
-
-
#region 安监人员数据
///
/// 获取企业总部总监人数
@@ -1311,6 +1163,8 @@ namespace BLL
var result = (from x in Funs.DB.Person_CompanyBranchPerson
join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup
from u in uGroup.DefaultIfEmpty()
+ join m in Funs.DB.Base_Post on x.WorkPostId equals m.PostId into mGroup
+ from m in mGroup.DefaultIfEmpty()
where x.IsOnJob == true && x.WorkPostId == Const.WorkPost_HSSEDirector && x.UnitId == unitId && x.IdentityCard != null
select new Model.OfSafetySupervisorsOutput
{
@@ -1320,7 +1174,7 @@ namespace BLL
Name = x.PersonName,
Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"),
IdentityCard = x.IdentityCard,
- WorkPostName = PostService.GetPostNameById(x.WorkPostId),
+ WorkPostName = m.PostName == null ? "" : m.PostName,
Phone = x.Telephone
}).ToList();
result = result
@@ -1352,6 +1206,8 @@ namespace BLL
join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup
from u in uGroup.DefaultIfEmpty()
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
+ join m in Funs.DB.Base_Post on x.WorkPostId equals m.PostId into mGroup
+ from m in mGroup.DefaultIfEmpty()
where x.IsOnJob == true && y.IsHsse == true && x.UnitId == unitId && x.IdentityCard != null
select new Model.OfSafetySupervisorsOutput
{
@@ -1360,7 +1216,7 @@ namespace BLL
Name = x.PersonName,
Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"),
IdentityCard = x.IdentityCard,
- WorkPostName = PostService.GetPostNameById(x.WorkPostId),
+ WorkPostName = m.PostName == null ? "" : m.PostName,
Phone = x.Telephone
}).ToList();
result = result
@@ -1391,6 +1247,8 @@ namespace BLL
join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup
from u in uGroup.DefaultIfEmpty()
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
+ join m in Funs.DB.Base_Post on x.WorkPostId equals m.PostId into mGroup
+ from m in mGroup.DefaultIfEmpty()
where x.IsOnJob == true && y.IsHsse == true && x.UnitId != unitId && x.IdentityCard != null
select new Model.OfSafetySupervisorsOutput
{
@@ -1399,7 +1257,7 @@ namespace BLL
Name = x.PersonName,
Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"),
IdentityCard = x.IdentityCard,
- WorkPostName = PostService.GetPostNameById(x.WorkPostId),
+ WorkPostName = m.PostName == null ? "" : m.PostName,
Phone = x.Telephone
}).ToList();
result = result
@@ -1430,6 +1288,9 @@ namespace BLL
var result = (from x in Funs.DB.Person_CompanyBranchPerson
join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup
from u in uGroup.DefaultIfEmpty()
+ join m in Funs.DB.Base_Post on x.WorkPostId equals m.PostId into mGroup
+ from m in mGroup.DefaultIfEmpty()
+
where x.IsOnJob == true && x.WorkPostId == Const.WorkPost_HSSEDirector && x.UnitId != unitId && x.IdentityCard != null
select new Model.OfSafetySupervisorsOutput
{
@@ -1438,7 +1299,7 @@ namespace BLL
Name = x.PersonName,
Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"),
IdentityCard = x.IdentityCard,
- WorkPostName = PostService.GetPostNameById(x.WorkPostId),
+ WorkPostName = m.PostName == null ? "" : m.PostName,
Phone = x.Telephone
}).ToList();
result = result
@@ -1468,6 +1329,8 @@ namespace BLL
join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup
from u in uGroup.DefaultIfEmpty()
join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
+ join z in Funs.DB.Base_Post on x.WorkPostId equals z.PostId into zGroup
+ from z in zGroup.DefaultIfEmpty()
where BeUnderConstructionList.Contains(p.ProjectId) &&
x.WorkPostId == Const.WorkPost_ProjectHSSEDirector && x.IsUsed == true && x.IdentityCard != null
select new Model.OfSafetySupervisorsOutput
@@ -1479,7 +1342,7 @@ namespace BLL
Name = x.PersonName,
Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"),
IdentityCard = x.IdentityCard,
- WorkPostName = PostService.GetPostNameById(x.WorkPostId),
+ WorkPostName = z.PostName == null ? "" : z.PostName,
Phone = x.Telephone
}).ToList();
result = result
@@ -1503,24 +1366,30 @@ namespace BLL
///
public static List GetProjectFullTime()
{
+ var mianAndSubUnitList = (from x in Funs.DB.Base_Unit where x.IsThisUnit == true || x.IsBranch == true select x.UnitId).ToList();
var result = (from x in Funs.DB.SitePerson_Person
join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
from p in pGroup.DefaultIfEmpty()
join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup
from u in uGroup.DefaultIfEmpty()
- join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId
- where BeUnderConstructionList.Contains(p.ProjectId) && y.IsHsse == true && x.IsUsed == true && x.IdentityCard != null
+ join y in Funs.DB.Base_WorkPost on x.WorkPostId equals y.WorkPostId into yGroup
+ from y in yGroup.DefaultIfEmpty()
+ join z in Funs.DB.Base_Post on x.WorkPostId equals z.PostId into zGroup
+ from z in zGroup.DefaultIfEmpty()
+ where BeUnderConstructionList.Contains(p.ProjectId) && y.IsHsse == true && x.IsUsed == true && x.IdentityCard != null
select new Model.OfSafetySupervisorsOutput
{
ProjectId = x.ProjectId,
ProjectName = p.ProjectName,
+ ProjectFromUnitId = p.UnitId,
UnitId = u.UnitId,
UnitName = u.UnitName,
Name = x.PersonName,
Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"),
IdentityCard = x.IdentityCard,
- WorkPostName = PostService.GetPostNameById(x.WorkPostId),
- Phone = x.Telephone
+ WorkPostName = y.WorkPostName == null ? "" : y.WorkPostName,
+ Phone = x.Telephone,
+ IsOffice = x.UnitId==null?false: mianAndSubUnitList.Contains(x.UnitId)
}).ToList();
result = result
.GroupBy(x => x.IdentityCard)
@@ -1594,6 +1463,8 @@ namespace BLL
from u in uGroup.DefaultIfEmpty()
join y in Funs.DB.QualityAudit_PersonQuality on x.PersonId equals y.PersonId
join z in Funs.DB.Base_Certificate on y.CertificateId equals z.CertificateId
+ join m in Funs.DB.Base_Post on x.WorkPostId equals m.PostId into mGroup
+ from m in mGroup.DefaultIfEmpty()
where BeUnderConstructionList.Contains(p.ProjectId) && z.IsRegisterHSSE == true && x.IsUsed == true && x.IdentityCard != null
select new Model.OfSafetySupervisorsOutput
{
@@ -1604,7 +1475,7 @@ namespace BLL
Name = x.PersonName,
Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"),
IdentityCard = x.IdentityCard,
- WorkPostName = PostService.GetPostNameById(x.WorkPostId),
+ WorkPostName = m.PostName == null ? "" : m.PostName,
Phone = x.Telephone
}).ToList();
@@ -1615,6 +1486,8 @@ namespace BLL
from u in uGroup.DefaultIfEmpty()
join y in Funs.DB.QualityAudit_PersonQuality on x.UserId equals y.UserId
join z in Funs.DB.Base_Certificate on y.CertificateId equals z.CertificateId
+ join m in Funs.DB.Base_Post on x.WorkPostId equals m.PostId into mGroup
+ from m in mGroup.DefaultIfEmpty()
where z.IsRegisterHSSE == true && x.IdentityCard != null && x.IsPost == true
select new Model.OfSafetySupervisorsOutput
{
@@ -1624,7 +1497,7 @@ namespace BLL
Name = x.UserName,
Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"),
IdentityCard = x.IdentityCard,
- WorkPostName = PostService.GetPostNameById(x.WorkPostId),
+ WorkPostName = m.PostName == null ? "" : m.PostName == null ? "" : m.PostName,
Phone = x.Telephone
}).ToList();
@@ -1659,6 +1532,8 @@ namespace BLL
from u in uGroup.DefaultIfEmpty()
join y in Funs.DB.QualityAudit_PersonQuality on x.PersonId equals y.PersonId
join z in Funs.DB.Base_Certificate on y.CertificateId equals z.CertificateId
+ join m in Funs.DB.Base_Post on x.WorkPostId equals m.PostId into mGroup
+ from m in mGroup.DefaultIfEmpty()
where BeUnderConstructionList.Contains(p.ProjectId) && z.CertificateType == "A" && x.IsUsed == true && x.IdentityCard != null
select new Model.OfSafetySupervisorsOutput
{
@@ -1669,7 +1544,7 @@ namespace BLL
Name = x.PersonName,
Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"),
IdentityCard = x.IdentityCard,
- WorkPostName = PostService.GetPostNameById(x.WorkPostId),
+ WorkPostName = m.PostName == null ? "" : m.PostName,
Phone = x.Telephone
}).ToList();
var query2 = (from x in Funs.DB.Sys_User
@@ -1679,6 +1554,8 @@ namespace BLL
from u in uGroup.DefaultIfEmpty()
join y in Funs.DB.QualityAudit_PersonQuality on x.UserId equals y.UserId
join z in Funs.DB.Base_Certificate on y.CertificateId equals z.CertificateId
+ join m in Funs.DB.Base_Post on x.WorkPostId equals m.PostId into mGroup
+ from m in mGroup.DefaultIfEmpty()
where z.CertificateType == "A" && x.IdentityCard != null && x.IsPost == true
select new Model.OfSafetySupervisorsOutput
{
@@ -1688,7 +1565,7 @@ namespace BLL
Name = x.UserName,
Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"),
IdentityCard = x.IdentityCard,
- WorkPostName = PostService.GetPostNameById(x.WorkPostId),
+ WorkPostName = m.PostName == null ? "" : m.PostName,
Phone = x.Telephone
}).ToList();
query1.AddRange(query2);
@@ -1721,6 +1598,8 @@ namespace BLL
from u in uGroup.DefaultIfEmpty()
join y in Funs.DB.QualityAudit_PersonQuality on x.PersonId equals y.PersonId
join z in Funs.DB.Base_Certificate on y.CertificateId equals z.CertificateId
+ join m in Funs.DB.Base_Post on x.WorkPostId equals m.PostId into mGroup
+ from m in mGroup.DefaultIfEmpty()
where BeUnderConstructionList.Contains(p.ProjectId) && z.CertificateType == "B" && x.IsUsed == true && x.IdentityCard != null
select new Model.OfSafetySupervisorsOutput
{
@@ -1731,7 +1610,7 @@ namespace BLL
Name = x.PersonName,
Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"),
IdentityCard = x.IdentityCard,
- WorkPostName = PostService.GetPostNameById(x.WorkPostId),
+ WorkPostName = m.PostName == null ? "" : m.PostName,
Phone = x.Telephone
}).ToList();
var query2 = (from x in Funs.DB.Sys_User
@@ -1741,6 +1620,8 @@ namespace BLL
from u in uGroup.DefaultIfEmpty()
join y in Funs.DB.QualityAudit_PersonQuality on x.UserId equals y.UserId
join z in Funs.DB.Base_Certificate on y.CertificateId equals z.CertificateId
+ join m in Funs.DB.Base_Post on x.WorkPostId equals m.PostId into mGroup
+ from m in mGroup.DefaultIfEmpty()
where z.CertificateType == "B" && x.IdentityCard != null && x.IsPost == true
select new Model.OfSafetySupervisorsOutput
{
@@ -1750,7 +1631,7 @@ namespace BLL
Name = x.UserName,
Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"),
IdentityCard = x.IdentityCard,
- WorkPostName = PostService.GetPostNameById(x.WorkPostId),
+ WorkPostName = m.PostName == null ? "" : m.PostName,
Phone = x.Telephone
}).ToList();
query1.AddRange(query2);
@@ -1784,6 +1665,8 @@ namespace BLL
from u in uGroup.DefaultIfEmpty()
join y in Funs.DB.QualityAudit_PersonQuality on x.PersonId equals y.PersonId
join z in Funs.DB.Base_Certificate on y.CertificateId equals z.CertificateId
+ join m in Funs.DB.Base_Post on x.WorkPostId equals m.PostId into mGroup
+ from m in mGroup.DefaultIfEmpty()
where BeUnderConstructionList.Contains(p.ProjectId) && z.CertificateType == "C" && x.IsUsed == true && x.IdentityCard != null
select new Model.OfSafetySupervisorsOutput
{
@@ -1794,7 +1677,7 @@ namespace BLL
Name = x.PersonName,
Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"),
IdentityCard = x.IdentityCard,
- WorkPostName = PostService.GetPostNameById(x.WorkPostId),
+ WorkPostName = m.PostName == null ? "" : m.PostName,
Phone = x.Telephone
}).ToList();
var query2 = (from x in Funs.DB.Sys_User
@@ -1804,6 +1687,8 @@ namespace BLL
from u in uGroup.DefaultIfEmpty()
join y in Funs.DB.QualityAudit_PersonQuality on x.UserId equals y.UserId
join z in Funs.DB.Base_Certificate on y.CertificateId equals z.CertificateId
+ join m in Funs.DB.Base_Post on x.WorkPostId equals m.PostId into mGroup
+ from m in mGroup.DefaultIfEmpty()
where z.CertificateType == "C" && x.IdentityCard != null && x.IsPost == true
select new Model.OfSafetySupervisorsOutput
{
@@ -1813,7 +1698,7 @@ namespace BLL
Name = x.UserName,
Sex = x.Sex == null ? "" : (x.Sex == "1" ? "男" : "女"),
IdentityCard = x.IdentityCard,
- WorkPostName = PostService.GetPostNameById(x.WorkPostId),
+ WorkPostName = m.PostName == null ? "" : m.PostName,
Phone = x.Telephone
}).ToList();
query1.AddRange(query2);
@@ -1832,6 +1717,48 @@ namespace BLL
{
return await Task.Run(GetCertificateC);
}
+
+ ///
+ /// 获取在岗特种作业人员数量
+ ///
+ ///
+ public static List GetQualityPersonNum()
+ {
+ var result = (from x in Funs.DB.QualityAudit_PersonQuality
+ join p in Funs.DB.SitePerson_Person on x.PersonId equals p.PersonId into pGroup
+ from p in pGroup.DefaultIfEmpty()
+ join bp in Funs.DB.Base_Project on p.ProjectId equals bp.ProjectId into bpGroup
+ from bp in bpGroup.DefaultIfEmpty()
+ join u in Funs.DB.Base_Unit on p.UnitId equals u.UnitId into uGroup
+ from u in uGroup.DefaultIfEmpty()
+ join y in Funs.DB.QualityAudit_PersonQuality on x.PersonId equals y.PersonId
+ join m in Funs.DB.Base_WorkPost on p.WorkPostId equals m.WorkPostId into mGroup
+ from m in mGroup.DefaultIfEmpty()
+ where BeUnderConstructionList.Contains(p.ProjectId) && p.IsUsed == true && m.PostType == Const.PostType_2 && (x.LimitDate == null || x.LimitDate < DateTime.Now)
+ select new Model.OfSafetySupervisorsOutput
+ {
+ ProjectId = p.ProjectId,
+ ProjectName = bp.ProjectName,
+ UnitId = u.UnitId,
+ UnitName = u.UnitName,
+ Name = p.PersonName,
+ Sex = p.Sex == null ? "" : (p.Sex == "1" ? "男" : "女"),
+ IdentityCard = p.IdentityCard,
+ WorkPostName = m.WorkPostName == null ? "" : m.WorkPostName,
+ Phone = p.Telephone
+ }).ToList();
+ return result;
+ }
+ ///
+ /// 获取在岗特种作业人员数量(异步)
+ ///
+ ///
+ public static async Task> GetQualityPersonNumAsync()
+ {
+ return await Task.Run(GetQualityPersonNum);
+
+ }
+
#endregion
#region 安全会议数据
@@ -1921,33 +1848,30 @@ namespace BLL
}
///
- /// 获取项目班前会
+ /// 获取项目班前会
///
///
public static List GetProjectClassMeeting(string projectId)
{
- var list = (from x in Funs.DB.Meeting_ClassMeeting
- join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
- from p in pGroup.DefaultIfEmpty()
- where x.CompileDate > Const.DtmarkTime && BeUnderConstructionList.Contains(p.ProjectId)
- select new MeetingOutput()
- {
- ProjectId = x.ProjectId,
- ProjectName = p.ProjectName,
- Id = x.ClassMeetingId,
- MeetingName = x.ClassMeetingName,
- MeetingDate = x.ClassMeetingDate,
- MeetingHours = x.MeetingHours,
- HostMan = x.MeetingHostMan,
- AttentPerson = x.AttentPerson,
- AttentPersonNum = x.AttentPersonNum,
- }).ToList();
-
- if (!string.IsNullOrWhiteSpace(projectId))
- {
- list = list.Where(x => x.ProjectId == projectId).ToList();
- }
- return list.ToList();
+ var result =
+ (
+ from x in Funs.DB.Meeting_ClassMeeting
+ join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
+ from p in pGroup.DefaultIfEmpty()
+ where x.ProjectId == projectId && x.CompileDate > Const.DtmarkTime && BeUnderConstructionList.Contains(p.ProjectId)
+ select new MeetingOutput()
+ {
+ ProjectId = x.ProjectId,
+ ProjectName = p.ProjectName,
+ Id = x.ClassMeetingId,
+ MeetingName = x.ClassMeetingName,
+ MeetingDate = x.ClassMeetingDate,
+ MeetingHours = x.MeetingHours,
+ HostMan = x.MeetingHostMan,
+ AttentPerson = x.AttentPerson,
+ AttentPersonNum = x.AttentPersonNum,
+ }).ToList();
+ return result.ToList();
}
/////
///// 获取项目班前会议(异步)
@@ -2181,6 +2105,8 @@ namespace BLL
#region 安全监督检查数据
+ #region 企业级-本单位
+
///
/// 获取企业负责人带班检查次数
///
@@ -2192,7 +2118,9 @@ namespace BLL
from p in pGroup.DefaultIfEmpty()
join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup
from u in uGroup.DefaultIfEmpty()
- where x.CheckType == "1" && x.CheckDate > Const.DtmarkTime
+ join cu in Funs.DB.Base_Unit on x.CheckUnitId equals cu.UnitId into cuGroup
+ from cu in cuGroup.DefaultIfEmpty()
+ where cu.IsThisUnit == true && x.CheckMainType == "0" && x.CheckType == "1" && x.CheckDate > Const.DtmarkTime
select new Model.CheckOutput()
{
ProjectId = x.ProjectId,
@@ -2214,20 +2142,21 @@ namespace BLL
return await Task.Run(GetCompanyLeadShiftCheck);
}
-
-
///
/// 获取企业综合检查次数
///
///
public static List GetCompanyComprehensiveCheck()
{
+
var result = (from x in Funs.DB.Supervise_SuperviseCheckReport
join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
from p in pGroup.DefaultIfEmpty()
join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup
from u in uGroup.DefaultIfEmpty()
- where x.CheckType == "2" && x.CheckDate > Const.DtmarkTime
+ join cu in Funs.DB.Base_Unit on x.CheckUnitId equals cu.UnitId into cuGroup
+ from cu in cuGroup.DefaultIfEmpty()
+ where cu.IsThisUnit == true && x.CheckMainType == "0" && x.CheckType == "2" && x.CheckDate > Const.DtmarkTime
select new Model.CheckOutput()
{
ProjectId = x.ProjectId,
@@ -2238,6 +2167,51 @@ namespace BLL
CheckTeam = x.CheckTeam,
CheckDate = x.CheckDate,
});
+
+ #region 交建统计
+ var IsCnccg = CommonService.GetIsThisUnit().CollCropCode == "913700001630777743";
+ if (IsCnccg)
+ {
+ result = (from x in Funs.DB.Problem_Notice
+ join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
+ from p in pGroup.DefaultIfEmpty()
+ join u in Funs.DB.Base_Unit on x.Unitid equals u.UnitId into uGroup
+ from u in uGroup.DefaultIfEmpty()
+ select new Model.CheckOutput()
+ {
+ ProjectId = x.ProjectId,
+ ProjectName = p.ProjectName,
+ UnitId = x.Unitid,
+ UnitName = u.UnitName,
+ Id = x.ProNoticeId,
+ CheckTeam = "",
+ CheckDate = x.CheckStartTime,
+ }
+ );
+ }
+ #endregion
+ #region 四化建
+ var IsCncec4 = CommonService.GetIsThisUnit().CollCropCode == "914306001837642996";
+ if (IsCncec4)
+ {
+ result = (from x in Funs.DB.Supervise_SuperviseCheckReport_Shj
+ join p in Funs.DB.Base_Project on x.ProjectOrUnit equals p.ProjectId into pGroup
+ from p in pGroup.DefaultIfEmpty()
+ join u in Funs.DB.Base_Unit on x.ProjectOrUnit equals u.UnitId into uGroup
+ from u in uGroup.DefaultIfEmpty()
+ select new Model.CheckOutput()
+ {
+ ProjectId = x.ProjectOrUnit,
+ ProjectName = p.ProjectName,
+ UnitId = x.ProjectOrUnit,
+ UnitName = u.UnitName,
+ Id = x.SuperviseCheckReportId,
+ CheckTeam = "",
+ CheckDate = x.CheckDate,
+ }
+ );
+ }
+ #endregion
return result.ToList();
}
///
@@ -2260,7 +2234,9 @@ namespace BLL
from p in pGroup.DefaultIfEmpty()
join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup
from u in uGroup.DefaultIfEmpty()
- where x.CheckType == "3" && x.CheckDate > Const.DtmarkTime
+ join cu in Funs.DB.Base_Unit on x.CheckUnitId equals cu.UnitId into cuGroup
+ from cu in cuGroup.DefaultIfEmpty()
+ where cu.IsThisUnit == true && x.CheckMainType == "0" && x.CheckType == "3" && x.CheckDate > Const.DtmarkTime
select new Model.CheckOutput()
{
ProjectId = x.ProjectId,
@@ -2281,12 +2257,192 @@ namespace BLL
{
return await Task.Run(GetCompanySpecialCheck);
}
+
+ #endregion
+
+ #region 分支机构
+
+ ///
+ /// 获取分支机构企业负责人带班检查次数
+ ///
+ ///
+ public static List GetBranchLeadShiftCheck()
+ {
+ var result = (from x in Funs.DB.Supervise_SuperviseCheckReport
+ join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
+ from p in pGroup.DefaultIfEmpty()
+ join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup
+ from u in uGroup.DefaultIfEmpty()
+ join cu in Funs.DB.Base_Unit on x.CheckUnitId equals cu.UnitId into cuGroup
+ from cu in cuGroup.DefaultIfEmpty()
+ where cu.IsBranch == true && x.CheckMainType == "0" && x.CheckType == "1" && x.CheckDate > Const.DtmarkTime
+ select new Model.CheckOutput()
+ {
+ ProjectId = x.ProjectId,
+ ProjectName = p.ProjectName,
+ UnitId = x.UnitId,
+ UnitName = u.UnitName,
+ Id = x.SuperviseCheckReportId,
+ CheckTeam = x.CheckTeam,
+ CheckDate = x.CheckDate,
+ });
+ return result.ToList();
+ }
+ ///
+ /// 获取分支机构企业负责人带班检查次数(异步)
+ ///
+ ///
+ public static async Task> GetBranchLeadShiftCheckAsync()
+ {
+ return await Task.Run(GetBranchLeadShiftCheck);
+ }
+
+ ///
+ /// 获取分支机构企业综合检查次数
+ ///
+ ///
+ public static List GetBranchComprehensiveCheck()
+ {
+ var result = (from x in Funs.DB.Supervise_SuperviseCheckReport
+ join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
+ from p in pGroup.DefaultIfEmpty()
+ join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup
+ from u in uGroup.DefaultIfEmpty()
+ join cu in Funs.DB.Base_Unit on x.CheckUnitId equals cu.UnitId into cuGroup
+ from cu in cuGroup.DefaultIfEmpty()
+ where cu.IsBranch == true && x.CheckMainType == "0" && x.CheckType == "2" && x.CheckDate > Const.DtmarkTime
+ select new Model.CheckOutput()
+ {
+ ProjectId = x.ProjectId,
+ ProjectName = p.ProjectName,
+ UnitId = x.UnitId,
+ UnitName = u.UnitName,
+ Id = x.SuperviseCheckReportId,
+ CheckTeam = x.CheckTeam,
+ CheckDate = x.CheckDate,
+ });
+
+ #region 交建统计
+ var IsCnccg = CommonService.GetIsThisUnit().CollCropCode == "913700001630777743";
+ if (IsCnccg)
+ {
+ result = (from x in Funs.DB.Problem_Notice
+ join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
+ from p in pGroup.DefaultIfEmpty()
+ join u in Funs.DB.Base_Unit on x.Unitid equals u.UnitId into uGroup
+ from u in uGroup.DefaultIfEmpty()
+ select new Model.CheckOutput()
+ {
+ ProjectId = x.ProjectId,
+ ProjectName = p.ProjectName,
+ UnitId = x.Unitid,
+ UnitName = u.UnitName,
+ Id = x.ProNoticeId,
+ CheckTeam = "",
+ CheckDate = x.CheckStartTime,
+ }
+ );
+ }
+ #endregion
+ #region 四化建
+ var IsCncec4 = CommonService.GetIsThisUnit().CollCropCode == "914306001837642996";
+ if (IsCncec4)
+ {
+ result = (from x in Funs.DB.Supervise_SuperviseCheckReport_Shj
+ join p in Funs.DB.Base_Project on x.ProjectOrUnit equals p.ProjectId into pGroup
+ from p in pGroup.DefaultIfEmpty()
+ join u in Funs.DB.Base_Unit on x.ProjectOrUnit equals u.UnitId into uGroup
+ from u in uGroup.DefaultIfEmpty()
+ select new Model.CheckOutput()
+ {
+ ProjectId = x.ProjectOrUnit,
+ ProjectName = p.ProjectName,
+ UnitId = x.ProjectOrUnit,
+ UnitName = u.UnitName,
+ Id = x.SuperviseCheckReportId,
+ CheckTeam = "",
+ CheckDate = x.CheckDate,
+ }
+ );
+ }
+ #endregion
+ return result.ToList();
+ }
+ ///
+ /// 获取分支机构企业综合检查次数(异步)
+ ///
+ ///
+ public static async Task> GetBranchComprehensiveCheckAsync()
+ {
+ return await Task.Run(GetBranchComprehensiveCheck);
+ }
+
+ ///
+ /// 获取分支机构企业专项检查次数
+ ///
+ ///
+ public static List GetBranchSpecialCheck()
+ {
+ var result = (from x in Funs.DB.Supervise_SuperviseCheckReport
+ join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
+ from p in pGroup.DefaultIfEmpty()
+ join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup
+ from u in uGroup.DefaultIfEmpty()
+ join cu in Funs.DB.Base_Unit on x.CheckUnitId equals cu.UnitId into cuGroup
+ from cu in cuGroup.DefaultIfEmpty()
+ where cu.IsBranch == true && x.CheckMainType == "0" && x.CheckType == "3" && x.CheckDate > Const.DtmarkTime
+ select new Model.CheckOutput()
+ {
+ ProjectId = x.ProjectId,
+ ProjectName = p.ProjectName,
+ UnitId = x.UnitId,
+ UnitName = u.UnitName,
+ Id = x.SuperviseCheckReportId,
+ CheckTeam = x.CheckTeam,
+ CheckDate = x.CheckDate,
+ });
+ return result.ToList();
+ }
+ ///
+ /// 获取分支机构企业专项检查次数(异步)
+ ///
+ ///
+ public static async Task> GetBranchSpecialCheckAsync()
+ {
+ return await Task.Run(GetBranchSpecialCheck);
+ }
+
+ #endregion
+
+ #region 项目级
+
///
/// 获取项目负责人带班检查次数
///
///
public static List GetProjectLeadShiftCheck()
{
+ // 先批量获取所有需要的UnitIds和LeaderIds
+ var unitIds = Funs.DB.Check_ProjectLeaderCheck
+ .Where(x => BeUnderConstructionList.Contains(x.ProjectId) && x.CheckDate > Const.DtmarkTime)
+ .Select(x => x.UnitIds).Distinct().ToList();
+ Dictionary unitNames = new Dictionary();
+ foreach (var item in unitIds)
+ {
+ unitNames.Add(item ?? "null", UnitService.getUnitNamesUnitIds(item));
+
+ }
+
+ var leaderIds = Funs.DB.Check_ProjectLeaderCheck
+ .Where(x => BeUnderConstructionList.Contains(x.ProjectId) && x.CheckDate > Const.DtmarkTime)
+ .Select(x => x.LeaderIds).Distinct().ToList();
+ Dictionary leaderNames = new Dictionary();
+ foreach (var item in leaderIds)
+ {
+ leaderNames.Add(item ?? "null", UserService.getUserNamesUserIds(item));
+
+ }
+
var result = (from x in Funs.DB.Check_ProjectLeaderCheck
join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
from p in pGroup.DefaultIfEmpty()
@@ -2295,9 +2451,9 @@ namespace BLL
{
ProjectId = x.ProjectId,
ProjectName = p.ProjectName,
- UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds),
+ UnitName = unitNames[x.UnitIds ?? "null"], // 从预加载的字典中获取
Id = x.ProjectLeaderCheckId,
- CheckTeam = UserService.getUserNamesUserIds(x.LeaderIds),
+ CheckTeam = leaderNames[x.LeaderIds ?? "null"], // 从预加载的字典中获取
CheckDate = x.CheckDate,
});
return result.ToList();
@@ -2317,6 +2473,15 @@ namespace BLL
///
public static List GetProjectSpecialCheck()
{
+ var unitIds = Funs.DB.Check_CheckSpecial
+ .Where(x => BeUnderConstructionList.Contains(x.ProjectId) && x.CheckTime > Const.DtmarkTime)
+ .Select(x => x.PartInUnits).Distinct().ToList();
+ Dictionary unitNames = new Dictionary();
+ foreach (var item in unitIds)
+ {
+ unitNames.Add(item ?? "null", UnitService.getUnitNamesUnitIds(item));
+
+ }
var result = (from x in Funs.DB.Check_CheckSpecial
join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
from p in pGroup.DefaultIfEmpty()
@@ -2325,7 +2490,7 @@ namespace BLL
{
ProjectId = x.ProjectId,
ProjectName = p.ProjectName,
- UnitName = UnitService.getUnitNamesUnitIds(x.PartInUnits),
+ UnitName = unitNames[x.PartInUnits ?? "null"],
Id = x.CheckSpecialId,
CheckTeam = x.PartInPersonNames,
CheckDate = x.CheckTime,
@@ -2375,6 +2540,9 @@ namespace BLL
{
return await Task.Run(GetProjectMajorCheck);
}
+
+ #endregion
+
#endregion
#region 应急管理数据
@@ -2386,7 +2554,9 @@ namespace BLL
{
var result = (from x in Funs.DB.Emergency_EmergencyList_Unit
join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
- where y.EmergencyTypeName.Contains("综合") && x.CompileDate > Const.DtmarkTime
+ join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup
+ from u in uGroup.DefaultIfEmpty()
+ where u.IsThisUnit == true && y.EmergencyTypeName.Contains("综合") && x.CompileDate > Const.DtmarkTime
select new Model.EmergencyOutput
{
ProjectId = x.ProjectId,
@@ -2418,7 +2588,9 @@ namespace BLL
{
var result = (from x in Funs.DB.Emergency_EmergencyList_Unit
join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
- where y.EmergencyTypeName.Contains("专项") && x.CompileDate > Const.DtmarkTime
+ join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup
+ from u in uGroup.DefaultIfEmpty()
+ where u.IsThisUnit == true && y.EmergencyTypeName.Contains("专项") && x.CompileDate > Const.DtmarkTime
select new Model.EmergencyOutput
{
ProjectId = x.ProjectId,
@@ -2450,7 +2622,9 @@ namespace BLL
{
var result = (from x in Funs.DB.Emergency_EmergencyList_Unit
join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
- where y.EmergencyTypeName.Contains("现场处置") && x.CompileDate > Const.DtmarkTime
+ join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup
+ from u in uGroup.DefaultIfEmpty()
+ where u.IsThisUnit == true && y.EmergencyTypeName.Contains("现场处置") && x.CompileDate > Const.DtmarkTime
select new Model.EmergencyOutput
{
ProjectId = x.ProjectId,
@@ -2474,6 +2648,109 @@ namespace BLL
return await Task.Run(GetCompanyOnSiteDisposalPlan);
}
+
+ ///
+ /// 获取分支机构综合预案数
+ ///
+ ///
+ public static List GetBranchComprehensivePlan()
+ {
+ var result = (from x in Funs.DB.Emergency_EmergencyList_Unit
+ join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
+ join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup
+ from u in uGroup.DefaultIfEmpty()
+ where u.IsBranch == true && y.EmergencyTypeName.Contains("综合") && x.CompileDate > Const.DtmarkTime
+ select new Model.EmergencyOutput
+ {
+ ProjectId = x.ProjectId,
+ ProjectName = ProjectService.GetProjectNameByProjectId(x.ProjectId),
+ UnitId = x.UnitId,
+ UnitName = UnitService.GetUnitNameByUnitId(x.UnitId),
+ Id = x.EmergencyListId,
+ EmergencyName = x.EmergencyName,
+ EmergencyTypeName = y.EmergencyTypeName,
+ VersionCode = x.VersionCode,
+ Date = x.CompileDate,
+ }).ToList();
+ return result;
+ }
+ ///
+ /// 获取分支机构综合预案数(异步)
+ ///
+ ///
+ public static async Task> GetBranchComprehensivePlanAsync()
+ {
+ return await Task.Run(GetBranchComprehensivePlan);
+ }
+
+ ///
+ /// 获取分支机构专项预案数
+ ///
+ ///
+ public static List GetBranchSpecialPlan()
+ {
+ var result = (from x in Funs.DB.Emergency_EmergencyList_Unit
+ join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
+ join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup
+ from u in uGroup.DefaultIfEmpty()
+ where u.IsBranch == true && y.EmergencyTypeName.Contains("专项") && x.CompileDate > Const.DtmarkTime
+ select new Model.EmergencyOutput
+ {
+ ProjectId = x.ProjectId,
+ ProjectName = ProjectService.GetProjectNameByProjectId(x.ProjectId),
+ UnitId = x.UnitId,
+ UnitName = UnitService.GetUnitNameByUnitId(x.UnitId),
+ Id = x.EmergencyListId,
+ EmergencyName = x.EmergencyName,
+ EmergencyTypeName = y.EmergencyTypeName,
+ VersionCode = x.VersionCode,
+ Date = x.CompileDate,
+ }).ToList();
+ return result;
+ }
+ ///
+ /// 获取分支机构专项预案数(异步)
+ ///
+ ///
+ public static async Task> GetBranchSpecialPlanAsync()
+ {
+ return await Task.Run(GetBranchSpecialPlan);
+ }
+
+ ///
+ /// 获取分支机构现场处置预案
+ ///
+ ///
+ public static List GetBranchOnSiteDisposalPlan()
+ {
+ var result = (from x in Funs.DB.Emergency_EmergencyList_Unit
+ join y in Funs.DB.Base_EmergencyType on x.EmergencyTypeId equals y.EmergencyTypeId
+ join u in Funs.DB.Base_Unit on x.UnitId equals u.UnitId into uGroup
+ from u in uGroup.DefaultIfEmpty()
+ where u.IsBranch == true && y.EmergencyTypeName.Contains("现场处置") && x.CompileDate > Const.DtmarkTime
+ select new Model.EmergencyOutput
+ {
+ ProjectId = x.ProjectId,
+ ProjectName = ProjectService.GetProjectNameByProjectId(x.ProjectId),
+ UnitId = x.UnitId,
+ UnitName = UnitService.GetUnitNameByUnitId(x.UnitId),
+ Id = x.EmergencyListId,
+ EmergencyName = x.EmergencyName,
+ EmergencyTypeName = y.EmergencyTypeName,
+ VersionCode = x.VersionCode,
+ Date = x.CompileDate,
+ }).ToList();
+ return result;
+ }
+ ///
+ /// 获取分支机构现场处置预案(异步)
+ ///
+ ///
+ public static async Task> GetBranchOnSiteDisposalPlanAsync()
+ {
+ return await Task.Run(GetBranchOnSiteDisposalPlan);
+ }
+
///
/// 获取企业级演练次数
///
@@ -2482,8 +2759,9 @@ namespace BLL
{
var result = (from x in Funs.DB.Emergency_DrillRecordList_Unit
join y in Funs.DB.Sys_Const on x.DrillRecordType equals y.ConstValue
- where y.GroupId == "DrillRecordType"
- where x.CompileDate > Const.DtmarkTime
+ join u in Funs.DB.Base_Unit on x.UnitIds equals u.UnitId into uGroup
+ from u in uGroup.DefaultIfEmpty()
+ where u.IsThisUnit == true && y.GroupId == "DrillRecordType" && x.CompileDate > Const.DtmarkTime
select new Model.EmergencyOutput
{
ProjectId = x.ProjectId,
@@ -2507,6 +2785,40 @@ namespace BLL
{
return await Task.Run(GetCompanyDrill);
}
+ ///
+ /// 获取分支机构演练次数
+ ///
+ ///
+ public static List GetBranchDrill()
+ {
+ var result = (from x in Funs.DB.Emergency_DrillRecordList_Unit
+ join y in Funs.DB.Sys_Const on x.DrillRecordType equals y.ConstValue
+ join u in Funs.DB.Base_Unit on x.UnitIds equals u.UnitId into uGroup
+ from u in uGroup.DefaultIfEmpty()
+ where u.IsBranch == true && y.GroupId == "DrillRecordType" && x.CompileDate > Const.DtmarkTime
+ select new Model.EmergencyOutput
+ {
+ ProjectId = x.ProjectId,
+ ProjectName = ProjectService.GetProjectNameByProjectId(x.ProjectId),
+ UnitId = x.UnitIds,
+ UnitName = UnitService.getUnitNamesUnitIds(x.UnitIds),
+ Id = x.DrillRecordListId,
+ EmergencyName = x.DrillRecordName,
+ EmergencyTypeName = y.ConstText,
+ Date = x.DrillRecordDate,
+ DrillCost = x.DrillCost,
+ JointPersonNum = x.JointPersonNum ?? 0,
+ }).ToList();
+ return result;
+ }
+ ///
+ /// 获取分支机构演练次数(异步)
+ ///
+ ///
+ public static async Task> GetBranchDrillAsync()
+ {
+ return await Task.Run(GetBranchDrill);
+ }
///
/// 获取项目级综合预案
@@ -2628,7 +2940,7 @@ namespace BLL
EmergencyTypeName = y.ConstText,
Date = x.DrillRecordDate,
DrillCost = x.DrillCost,
- JointPersonNum = x.JointPersonNum,
+ JointPersonNum = x.JointPersonNum ?? 0,
}).ToList();
return result;
}
@@ -2649,36 +2961,7 @@ namespace BLL
///
public static List GetBeUnderConstruction()
{
- var projectInfos = from project in Funs.DB.Base_Project
- join unit in Funs.DB.Base_Unit on project.UnitId equals unit.UnitId into unitJoin
- from unit in unitJoin.DefaultIfEmpty()
- join projectType in Funs.DB.Base_ProjectType on project.ProjectType equals projectType.ProjectTypeId into projectTypeJoin
- from projectType in projectTypeJoin.DefaultIfEmpty()
- join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = project.ProjectState2, GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin
- from sysConst in sysConstJoin.DefaultIfEmpty()
- where (project.ProjectAttribute == "GONGCHENG" || project.ProjectAttribute == null) && (project.IsDelete == null || project.IsDelete == false) && project.ProjectState == "1"
- select new ProjectOutput
- {
- ProjectId = project.ProjectId,
- ProjectCode = project.ProjectCode,
- ProjectName = project.ProjectName,
- UnitId = project.UnitId,
- UnitName = unit.UnitName,
- StartDate = project.StartDate,
- EndDate = project.EndDate,
- ProjectAddress = project.ProjectAddress,
- ShortName = project.ShortName,
- ConstructionMoney = project.ConstructionMoney,
- ProjectStateName = project.ProjectState == BLL.Const.ProjectState_2 ? "暂停中" : (project.ProjectState == BLL.Const.ProjectState_3 ? "已完工" : "施工中"),
- ProjectState = project.ProjectState,
- ProjectAttributeName = project.ProjectAttribute == "GONGCHENG" ? "工程" : (project.ProjectAttribute == "SHIYE" ? "实业" : ""),
- ProjectMoney = project.ProjectMoney,
- DayCount = DateTime.Now.Subtract(project.StartDate.Value).Days,
- ProjectTypeName = projectType.ProjectTypeName,
- ProjectStateName2 = sysConst.ConstText
- };
- var result = projectInfos.ToList();
- return result;
+ return BaseDataService.GetBeUnderConstruction();
}
///
/// 获取在建项目数(异步)
@@ -2689,43 +2972,13 @@ namespace BLL
return await Task.Run(GetBeUnderConstruction);
}
-
///
/// 获取停工项目数
///
///
public static List GetShutdown()
{
- var projectInfos = from project in Funs.DB.Base_Project
- join unit in Funs.DB.Base_Unit on project.UnitId equals unit.UnitId into unitJoin
- from unit in unitJoin.DefaultIfEmpty()
- join projectType in Funs.DB.Base_ProjectType on project.ProjectType equals projectType.ProjectTypeId into projectTypeJoin
- from projectType in projectTypeJoin.DefaultIfEmpty()
- join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = project.ProjectState2, GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin
- from sysConst in sysConstJoin.DefaultIfEmpty()
- where (project.ProjectAttribute == "GONGCHENG" || project.ProjectAttribute == null) && (project.IsDelete == null || project.IsDelete == false) && project.ProjectState == "2"
- select new ProjectOutput
- {
- ProjectId = project.ProjectId,
- ProjectCode = project.ProjectCode,
- ProjectName = project.ProjectName,
- UnitId = project.UnitId,
- UnitName = unit.UnitName,
- StartDate = project.StartDate,
- EndDate = project.EndDate,
- ProjectAddress = project.ProjectAddress,
- ShortName = project.ShortName,
- ConstructionMoney = project.ConstructionMoney,
- ProjectStateName = project.ProjectState == BLL.Const.ProjectState_2 ? "暂停中" : (project.ProjectState == BLL.Const.ProjectState_3 ? "已完工" : "施工中"),
- ProjectState = project.ProjectState,
- ProjectAttributeName = project.ProjectAttribute == "GONGCHENG" ? "工程" : (project.ProjectAttribute == "SHIYE" ? "实业" : ""),
- ProjectMoney = project.ProjectMoney,
- DayCount = DateTime.Now.Subtract(project.StartDate.Value).Days,
- ProjectTypeName = projectType.ProjectTypeName,
- ProjectStateName2 = sysConst.ConstText
- };
- var result = projectInfos.ToList();
- return result;
+ return BaseDataService.GetShutdown();
}
///
/// 获取停工项目数(异步)
@@ -2741,36 +2994,8 @@ namespace BLL
///
public static List GetCompletedProject()
{
- var projectInfos = from project in Funs.DB.Base_Project
- join unit in Funs.DB.Base_Unit on project.UnitId equals unit.UnitId into unitJoin
- from unit in unitJoin.DefaultIfEmpty()
- join projectType in Funs.DB.Base_ProjectType on project.ProjectType equals projectType.ProjectTypeId into projectTypeJoin
- from projectType in projectTypeJoin.DefaultIfEmpty()
- join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = project.ProjectState2, GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin
- from sysConst in sysConstJoin.DefaultIfEmpty()
- where (project.ProjectAttribute == "GONGCHENG" || project.ProjectAttribute == null) && (project.IsDelete == null || project.IsDelete == false) && project.ProjectState == "3"
- select new ProjectOutput
- {
- ProjectId = project.ProjectId,
- ProjectCode = project.ProjectCode,
- ProjectName = project.ProjectName,
- UnitId = project.UnitId,
- UnitName = unit.UnitName,
- StartDate = project.StartDate,
- EndDate = project.EndDate,
- ProjectAddress = project.ProjectAddress,
- ShortName = project.ShortName,
- ConstructionMoney = project.ConstructionMoney,
- ProjectStateName = project.ProjectState == BLL.Const.ProjectState_2 ? "暂停中" : (project.ProjectState == BLL.Const.ProjectState_3 ? "已完工" : "施工中"),
- ProjectState = project.ProjectState,
- ProjectAttributeName = project.ProjectAttribute == "GONGCHENG" ? "工程" : (project.ProjectAttribute == "SHIYE" ? "实业" : ""),
- ProjectMoney = project.ProjectMoney,
- DayCount = DateTime.Now.Subtract(project.StartDate.Value).Days,
- ProjectTypeName = projectType.ProjectTypeName,
- ProjectStateName2 = sysConst.ConstText
- };
- var result = projectInfos.ToList();
- return result;
+ return BaseDataService.GetCompletedProject();
+
}
///
/// 获取所有项目数
@@ -2778,36 +3003,8 @@ namespace BLL
///
public static List GetALLProject()
{
- var projectInfos = from project in Funs.DB.Base_Project
- join unit in Funs.DB.Base_Unit on project.UnitId equals unit.UnitId into unitJoin
- from unit in unitJoin.DefaultIfEmpty()
- join projectType in Funs.DB.Base_ProjectType on project.ProjectType equals projectType.ProjectTypeId into projectTypeJoin
- from projectType in projectTypeJoin.DefaultIfEmpty()
- join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = project.ProjectState2, GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin
- from sysConst in sysConstJoin.DefaultIfEmpty()
- where (project.ProjectAttribute == "GONGCHENG" || project.ProjectAttribute == null) && (project.IsDelete == null || project.IsDelete == false)
- select new ProjectOutput
- {
- ProjectId = project.ProjectId,
- ProjectCode = project.ProjectCode,
- ProjectName = project.ProjectName,
- UnitId = project.UnitId,
- UnitName = unit.UnitName,
- StartDate = project.StartDate,
- EndDate = project.EndDate,
- ProjectAddress = project.ProjectAddress,
- ShortName = project.ShortName,
- ConstructionMoney = project.ConstructionMoney,
- ProjectStateName = project.ProjectState == BLL.Const.ProjectState_2 ? "暂停中" : (project.ProjectState == BLL.Const.ProjectState_3 ? "已完工" : "施工中"),
- ProjectState = project.ProjectState,
- ProjectAttributeName = project.ProjectAttribute == "GONGCHENG" ? "工程" : (project.ProjectAttribute == "SHIYE" ? "实业" : ""),
- ProjectMoney = project.ProjectMoney,
- DayCount = DateTime.Now.Subtract(project.StartDate.Value).Days,
- ProjectTypeName = projectType.ProjectTypeName,
- ProjectStateName2 = sysConst.ConstText
- };
- var result = projectInfos.ToList();
- return result;
+ return BaseDataService.GetALLProject();
+
}
///
@@ -2835,7 +3032,6 @@ namespace BLL
return await Task.Run(GetJoinConstructionPerson);
}
-
///
/// 获取在施危大工程数
///
@@ -3074,41 +3270,61 @@ namespace BLL
return await Task.Run(GetSpecialOperationTrain);
}
+ ///
+ /// 获取安全技术交底数
+ ///
+ ///
+ public static int GetHseTechnicalNum()
+ {
+ var list = (from x in Funs.DB.License_HSETechnical
+ where BeUnderConstructionList.Contains(x.ProjectId)
+ select x).Distinct().ToList();
+ var result = list.ToList().Count();
+ return result;
+
+ }
+ ///
+ /// 获取安全技术交底数(异步)
+ ///
+ ///
+ public static async Task GetHseTechnicalNumAsync()
+ {
+ return await Task.Run(GetHseTechnicalNum);
+
+ }
+
+ ///
+ /// 获取安全技术交底
+ ///
+ ///
+ public static List GetHseTechnical()
+ {
+ var result = (from x in Funs.DB.License_HSETechnical
+ join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
+ from p in pGroup.DefaultIfEmpty()
+ where BeUnderConstructionList.Contains(x.ProjectId)
+ select new Model.LicenseHSETechnicalOutput()
+ {
+ ProjectId = x.ProjectId,
+ ProjectName = p.ProjectName,
+ UnitName = UnitService.getUnitNamesUnitIds(x.UnitId),
+ Id = x.HSETechnicalId,
+ HSETechnicalCode = x.HSETechnicalCode,
+ WorkContents = x.WorkContents
+ }).ToList();
+ return result;
+ }
+
+ ///
+ /// 获取安全技术交底(异步)
+ ///
+ ///
+ public static async Task> GetHseTechnicalAsync()
+ {
+ return await Task.Run(GetHseTechnical);
+ }
#endregion
-
-
- ///
- /// 获取能耗总量
- ///
- ///
- public static int GetTotalEnergyConsumption()
- {
- var result = 0;
- return result;
- }
-
- ///
- /// 获取万元营业收入综合能耗
- ///
- ///
- public static int GetIncomeComprehensiveEnergyConsumption()
- {
- var result = 0;
- return result;
- }
-
- ///
- /// 获取二氧化碳
- ///
- ///
- public static int GetNewWaterConsumption()
- {
- var result = 0;
- return result;
- }
-
-
#region 事故事件数据
///
@@ -3360,7 +3576,7 @@ namespace BLL
UnitId = cost.UnitId,
UnitName = unit.UnitName,
Months = cost.Months,
- SUMCost = cost.Extract//Math.Round(sumCost, 2)
+ SUMCost = cost.Extract ?? 0//Math.Round(sumCost, 2)
};
return query.ToList();
}
@@ -3382,7 +3598,7 @@ namespace BLL
from unit in unitGroup.DefaultIfEmpty()
let sumCost = (from item in Funs.DB.CostGoods_CostSmallDetailItem
where item.CostSmallDetailId == cost.CostSmallDetailId
- select item.CostMoney).Sum() * 1.0m // 10000
+ select item.CostMoney ?? 0).Sum() * 1.0m // 10000
where BeUnderConstructionList.Contains(p.ProjectId)
select new CostSmallDetailOutput
{
@@ -3538,20 +3754,33 @@ namespace BLL
///
public static List GetLicenses()
{
+ var WorkAreaIds = Funs.DB.View_License_LicenseManager
+ .Where(x => BeUnderConstructionList.Contains(x.ProjectId) && x.CompileDate > Const.DtmarkTime)
+ .Select(x => x.WorkAreaId).Distinct().ToList();
+ Dictionary WorkAreaNames = new Dictionary();
+ foreach (var item in WorkAreaIds)
+ {
+ WorkAreaNames.Add(item ?? "null", UnitWorkService.GetUnitWorkName(item));
+
+ }
+
var result = (from x in Funs.DB.View_License_LicenseManager
- where BeUnderConstructionList.Contains(x.ProjectId) && x.IsHighRisk == true &&
- x.CompileDate > Const.DtmarkTime
+ join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId into yGroup
+ from y in yGroup.DefaultIfEmpty()
+ join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
+ from p in pGroup.DefaultIfEmpty()
+ where BeUnderConstructionList.Contains(x.ProjectId) && x.CompileDate > Const.DtmarkTime
select new Model.LicenseOutput
{
Id = x.LicenseManagerId,
ProjectId = x.ProjectId,
- ProjectName = ProjectService.GetProjectNameByProjectId(x.ProjectId),
+ ProjectName = p.ProjectName,
UnitId = x.UnitId,
- UnitName = UnitService.GetUnitNameByUnitId(x.UnitId),
+ UnitName = y.UnitName,
LicenseTypeName = x.LicenseTypeName,
UnitTypeName = x.UnitTypeName,
IsHighRisk = x.IsHighRisk,
- WorkAreaName = x.WorkStates,
+ WorkAreaName = WorkAreaNames[x.WorkAreaId ?? "null"],
CompileDate = x.CompileDate,
StartDate = x.StartDate,
EndDate = x.EndDate,
@@ -3571,20 +3800,32 @@ namespace BLL
///
public static List GetLicensesClose()
{
+ var WorkAreaIds = Funs.DB.View_License_LicenseManager
+ .Where(x => BeUnderConstructionList.Contains(x.ProjectId) && x.CompileDate > Const.DtmarkTime)
+ .Select(x => x.WorkAreaId).Distinct().ToList();
+ Dictionary WorkAreaNames = new Dictionary();
+ foreach (var item in WorkAreaIds)
+ {
+ WorkAreaNames.Add(item ?? "null", UnitWorkService.GetUnitWorkName(item));
+
+ }
var result = (from x in Funs.DB.View_License_LicenseManager
- where BeUnderConstructionList.Contains(x.ProjectId) && x.IsHighRisk == true && x.WorkStates == "3" &&
- x.CompileDate > Const.DtmarkTime
+ join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId into yGroup
+ from y in yGroup.DefaultIfEmpty()
+ join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup
+ from p in pGroup.DefaultIfEmpty()
+ where BeUnderConstructionList.Contains(x.ProjectId) & x.CompileDate > Const.DtmarkTime && x.WorkStates == "3"
select new Model.LicenseOutput
{
Id = x.LicenseManagerId,
ProjectId = x.ProjectId,
- ProjectName = ProjectService.GetProjectNameByProjectId(x.ProjectId),
+ ProjectName = p.ProjectName,
UnitId = x.UnitId,
- UnitName = UnitService.GetUnitNameByUnitId(x.UnitId),
+ UnitName = y.UnitName,
LicenseTypeName = x.LicenseTypeName,
UnitTypeName = x.UnitTypeName,
IsHighRisk = x.IsHighRisk,
- WorkAreaName = x.WorkStates,
+ WorkAreaName = WorkAreaNames[x.WorkAreaId ?? "null"],
CompileDate = x.CompileDate,
StartDate = x.StartDate,
EndDate = x.EndDate,
@@ -3637,6 +3878,42 @@ namespace BLL
return await Task.Run(GetGeneralHiddenRectificationOutputs);
}
+ ///
+ /// 获取较大隐患数据
+ ///
+ ///
+ public static List GetLargerHiddenRectificationOutputs()
+ {
+
+ var query = (from x in Funs.DB.Base_Project
+ join y in Funs.DB.HSSE_Hazard_HazardRegister on x.ProjectId equals y.ProjectId into yGroup
+ from y in yGroup.DefaultIfEmpty()
+ where BeUnderConstructionList.Contains(x.ProjectId) && y.ProblemTypes == "2" && y.Risk_Level == "较大" && y.CheckTime > Const.DtmarkTime
+ group y by new { x.ProjectId, x.ProjectName, x.ProjectCode } into gg
+ select new HiddenRectificationOutput
+ {
+ ProjectId = gg.Key.ProjectId,
+ ProjectName = gg.Key.ProjectName,
+ ProjectCode = gg.Key.ProjectCode,
+ ProNum = gg.Count(y => y.States != "4" && y.States != "-1"),
+ RecNum = gg.Count(y => y.States == "3"),
+ NoRecNum = gg.Count(y => y.States != "3" && y.States != "-1"),
+ RecRate = gg.Count(y => y.States != "4" && y.States != "-1") == 0 ? "0" :
+ Math.Round(Convert.ToDecimal(gg.Count(y => y.States == "3") /
+ gg.Count(y => y.States != "4" && y.States != "-1") * 100), 2, MidpointRounding.AwayFromZero).ToString()
+ }).ToList();
+
+ foreach (var item in query)
+ {
+ item.RecRate = Math.Round(Convert.ToDecimal(item.RecRate), 2).ToString(); // 转换为字符串并格式化为两位小数
+ }
+ return query;
+ }
+ public static async Task> GetLargerHiddenRectificationOutputsAsync()
+ {
+ return await Task.Run(GetLargerHiddenRectificationOutputs);
+ }
+
///
/// 获取重大隐患数据
///
@@ -3732,9 +4009,15 @@ namespace BLL
SuperConstructionNum = gg.Count(x => x.States == "2" && x.IsSuperLargerHazard == true),
SuperFinishedNum = gg.Count(x => x.States == "3" && x.IsSuperLargerHazard == true),
SuperArgumentNum = gg.Count(x => x.IsArgument == true && x.IsSuperLargerHazard == true),
+ OperativesNum = gg.Where(x => x.IsSuperLargerHazard == false).Sum(x => x.OperativesNum) ?? 0,
+ SuperOperativesNum = gg.Where(x => x.IsSuperLargerHazard == true).Sum(x => x.OperativesNum) ?? 0,
}).ToList();
return query;
}
+ ///
+ /// 获取危大工程数据(异步)
+ ///
+ ///
public static async Task> GetLargeEngineeringOutputsAsync()
{
return await Task.Run(GetLargeEngineeringOutputs);
@@ -3853,7 +4136,6 @@ namespace BLL
#endregion
-
#region 获取列表
///
@@ -3920,6 +4202,7 @@ namespace BLL
x.CertificateANum,
x.CertificateBNum,
x.CertificateCNum,
+ x.QualityPersonNum,
x.SafetyCommitteeMeetingNum,
x.EnterpriseTopicsMeetingNum,
x.ProjectSafetyLeadingGroupMeetingNum,
@@ -3939,8 +4222,13 @@ namespace BLL
x.CompanyComprehensivePlanNum,
x.CompanySpecialPlanNum,
x.CompanyOnSiteDisposalPlan,
+ x.BranchComprehensivePlanNum,
+ x.BranchSpecialPlanNum,
+ x.BranchOnSiteDisposalPlan,
x.CompanyDrillNum,
x.CompanyDrillPersonNum,
+ x.BranchDrillNum,
+ x.BranchDrillPersonNum,
x.ProjectComprehensivePlanNum,
x.ProjectSpecialPlanNum,
x.ProjectOnSiteDisposalPlan,
@@ -3962,11 +4250,13 @@ namespace BLL
x.HighRiskNum,
x.CompletedNum,
x.TrainPersonNum,
+ x.OperativesNum,
x.ConstructionNum,
x.FinishedNum,
x.ArgumentNum,
x.SuperCompletedNum,
x.SuperTrainPersonNum,
+ x.SuperOperativesNum,
x.SuperConstructionNum,
x.SuperFinishedNum,
x.SuperArgumentNum,
@@ -3977,5 +4267,192 @@ namespace BLL
}
#endregion 获取列表
+
+
+ #region 推送企业级检查明细数据检查
+
+ ///
+ /// 推送企业级检查明细数据检查
+ ///
+ ///
+ public static ReturnData PushSuperviseCheckReportData(int pushNum)
+ {
+ var thisUnit = CommonService.GetIsThisUnit();
+ Model.SUBQHSEDB db = Funs.DB;
+
+ var items = (from x in db.Supervise_SuperviseCheckReport
+ join P in db.Base_Project on x.ProjectId equals P.ProjectId into PJ
+ from P in PJ.DefaultIfEmpty()
+ join U in db.Base_Unit on x.UnitId equals U.UnitId into UJ
+ from U in UJ.DefaultIfEmpty()
+ join CU in db.Base_Unit on x.CheckUnitId equals CU.UnitId into CUJ
+ from CU in CUJ.DefaultIfEmpty()
+ where (x.IsUpdate == null || x.IsUpdate == false) && x.CheckDate > BLL.Const.DtmarkTime
+ select new Model.SuperviseCheckReportItem
+ {
+ Id = x.SuperviseCheckReportId,
+ SourceUnitId = thisUnit.UnitId,
+ ProjectId = x.ProjectId,
+ CollCropCode = thisUnit.CollCropCode,
+ DataDate = x.CheckDate,
+ AttachFile = AttachFileService.getFileUrl(x.SuperviseCheckReportId.ToString()),
+ SuperviseCheckReportCode = x.SuperviseCheckReportCode,
+ CheckDate = x.CheckDate,
+ UnitId = x.UnitId,
+ UnitName = U.UnitName,
+ CheckTeam = x.CheckTeam,
+ CheckType = x.CheckType,
+ CheckTypeName = x.CheckType == "1" ? "企业负责人带班检查" :
+ x.CheckType == "2" ? "企业综合检查" :
+ x.CheckType == "3" ? "企业专项检查" : "",
+ CheckMainType = x.CheckMainType,
+ CheckMainTypeName = x.CheckMainType == "0" ? "安全" :
+ x.CheckMainType == "1" ? "质量" : "",
+ CheckUnitId = x.CheckUnitId,
+ CheckUnitName = CU.UnitName,
+ }).Take(pushNum).ToList();
+ Model.ReturnData responeData = new Model.ReturnData();
+ if (items.Count() > 0)
+ {
+ foreach (var superviseCheckReportItem in items)
+ {
+ List detailItems = getDetail(superviseCheckReportItem.Id, thisUnit);
+ superviseCheckReportItem.SuperviseCheckReportDetail = detailItems;
+ }
+
+ var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items };
+ var str = JsonConvert.SerializeObject(newItem);
+ var baseurl = "/api/HSSEData/SaveSuperviseCheckReportData";
+ responeData = ServerService.PushCNCEC(str, baseurl);
+ if (responeData.code == 1)
+ {
+ foreach (var item in items)
+ {
+ var data = db.Supervise_SuperviseCheckReport.FirstOrDefault(x =>
+ x.SuperviseCheckReportId == item.Id && (x.IsUpdate == null || x.IsUpdate == false));
+ data.IsUpdate = true;
+ db.SubmitChanges();
+ }
+ }
+ }
+ else
+ {
+ responeData.code = 0;
+ responeData.message = "当前没有企业级检查明细数据检查数据";
+ }
+
+ return responeData;
+ }
+
+ #region 转换字符串
+
+ ///
+ /// 获取明细
+ ///
+ ///
+ ///
+ public static List getDetail(string SuperviseCheckReportId,
+ Model.Base_Unit thisUnit)
+ {
+ List detailItems = null;
+ if (!string.IsNullOrEmpty(SuperviseCheckReportId))
+ {
+ detailItems = (from x in Funs.DB.View_Supervise_SuperviseCheckReportItem
+ where x.SuperviseCheckReportId == SuperviseCheckReportId
+ select new Model.SuperviseCheckReportDetailItem
+ {
+ Id = x.SuperviseCheckReportItemId,
+ SourceUnitId = thisUnit.UnitId,
+ // ProjectId = x.ProjectId,
+ CollCropCode = thisUnit.CollCropCode,
+ // DataDate = x.CheckDate,
+ AttachFile = AttachFileService.getFileUrl(x.SuperviseCheckReportItemId.ToString()),
+ SuperviseCheckReportId = x.SuperviseCheckReportId,
+ RectifyItemId = x.RectifyItemId,
+ IsSelected = x.IsSelected,
+ HazardSourcePoint = x.HazardSourcePoint,
+ RiskAnalysis = x.RiskAnalysis,
+ RiskPrevention = x.RiskPrevention,
+ SimilarRisk = x.SimilarRisk,
+ RectifyName = x.RectifyName,
+ RectifyCode = x.RectifyCode,
+ }).ToList();
+ }
+
+ return detailItems;
+ }
+
+ #endregion
+
+ #endregion
+
+ #region 删除企业级检查明细数据检查
+
+ ///
+ /// 删除企业级检查明细数据检查
+ ///
+ ///
+ public static ReturnData DeleteSuperviseCheckReportData(string Id)
+ {
+ Model.ReturnData responeData = new Model.ReturnData();
+ try
+ {
+ var thisUnit = CommonService.GetIsThisUnit();
+ Model.SUBQHSEDB db = Funs.DB;
+ var items = (from x in db.Supervise_SuperviseCheckReport
+ join P in db.Base_Project on x.ProjectId equals P.ProjectId into PJ
+ from P in PJ.DefaultIfEmpty()
+ join U in db.Base_Unit on x.UnitId equals U.UnitId into UJ
+ from U in UJ.DefaultIfEmpty()
+ join CU in db.Base_Unit on x.CheckUnitId equals CU.UnitId into CUJ
+ from CU in CUJ.DefaultIfEmpty()
+ where x.SuperviseCheckReportId == Id
+ select new Model.SuperviseCheckReportItem
+ {
+ Id = x.SuperviseCheckReportId,
+ SourceUnitId = thisUnit.UnitId,
+ ProjectId = x.ProjectId,
+ CollCropCode = thisUnit.CollCropCode,
+ DataDate = x.CheckDate,
+ AttachFile = AttachFileService.getFileUrl(x.SuperviseCheckReportId.ToString()),
+ SuperviseCheckReportCode = x.SuperviseCheckReportCode,
+ CheckDate = x.CheckDate,
+ UnitId = x.UnitId,
+ UnitName = U.UnitName,
+ CheckTeam = x.CheckTeam,
+ CheckType = x.CheckType,
+ CheckTypeName = x.CheckType == "1" ? "企业负责人带班检查" :
+ x.CheckType == "2" ? "企业综合检查" :
+ x.CheckType == "3" ? "企业专项检查" : "",
+ CheckMainType = x.CheckMainType,
+ CheckMainTypeName = x.CheckMainType == "0" ? "安全" :
+ x.CheckMainType == "1" ? "质量" : "",
+ CheckUnitId = x.CheckUnitId,
+ CheckUnitName = CU.UnitName,
+ }).ToList();
+
+ if (items.Count() > 0)
+ {
+ var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items };
+ var str = JsonConvert.SerializeObject(newItem);
+ var baseurl = "/api/HSSEData/DeleteSuperviseCheckReportData";
+ responeData = ServerService.PushCNCEC(str, baseurl);
+ }
+ else
+ {
+ responeData.code = 0;
+ responeData.message = "集团数据删除失败";
+ }
+ }
+ catch (Exception)
+ {
+ responeData.code = 0;
+ responeData.message = "集团数据删除失败";
+ }
+ return responeData;
+ }
+
+ #endregion
+
}
}
\ No newline at end of file
diff --git a/SUBQHSE/BLL/ZHGL/DataSync/LotAPIService.cs b/SUBQHSE/BLL/ZHGL/DataSync/LotAPIService.cs
new file mode 100644
index 0000000..aa00b0a
--- /dev/null
+++ b/SUBQHSE/BLL/ZHGL/DataSync/LotAPIService.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BLL
+{
+ public class LotAPIService
+ {
+ ///
+ /// 保存环境监测
+ ///
+ ///
+ ///
+ public static string saveEnvironmentCheck(Model.EnvironmentalCheckInput input)
+ {
+ using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
+ {
+ //使用Emitmapper 将input 映射到实体类db.ZJ_EnvironmentCheck
+ var entity = EmitMapper.ObjectMapperManager.DefaultInstance.GetMapper().Map(input);
+ entity.Id = Guid.NewGuid().ToString();
+ entity.CreateTime = DateTime.Now;
+ db.EnvironmentalCheck.InsertOnSubmit(entity);
+ db.SubmitChanges();
+ return entity.Id;
+
+ }
+ }
+
+ }
+}
diff --git a/SUBQHSE/BLL/ZHGL/DataSync/MainSevice.cs b/SUBQHSE/BLL/ZHGL/DataSync/MainSevice.cs
index 7f36518..1b90176 100644
--- a/SUBQHSE/BLL/ZHGL/DataSync/MainSevice.cs
+++ b/SUBQHSE/BLL/ZHGL/DataSync/MainSevice.cs
@@ -10,7 +10,6 @@ namespace BLL
public class MainSevice
{
-
///
/// 在建项目集合
///
@@ -41,13 +40,13 @@ namespace BLL
{
_beUnderConstructionList = new List() { "0" };
}
- }
+ }
public MainSevice(string userid, string projectId)
{
var userModel = UserService.GetUserByUserId(userid);
int unitType = 3;
- _unitId = userModel.UnitId;
+ _unitId = userModel.UnitId?? "";
_unitType = unitType;
_beUnderConstructionList = new List() { projectId };
}
@@ -60,8 +59,6 @@ namespace BLL
{
try
{
-
-
// 并行执行异步方法
var totalEnergyConsumptionTask = ChemicalReportItemService.GetLatstTimeTotalEnergyConsumption();
var incomeComprehensiveEnergyConsumptionTask = ChemicalReportItemService.GetLatstTimeIncomeComprehensiveEnergyConsumption();
@@ -84,6 +81,7 @@ namespace BLL
var safeTrainTask = HSSEData_HSSEService.GetSafeTrainAsync();
var specialTrainTask = HSSEData_HSSEService.GetSpecialTrainAsync();
var specialOperationTrainTask = HSSEData_HSSEService.GetSpecialOperationTrainAsync();
+ var hseTechnicalTask = HSSEData_HSSEService.GetHseTechnicalAsync();
var headOfficeInspectorGeneralTask = HSSEData_HSSEService.GetHeadOfficeInspectorGeneralAsync();
var headOfficeFullTimeTask = HSSEData_HSSEService.GetHeadOfficeFullTimeAsync();
var branchInspectorGeneralTask = HSSEData_HSSEService.GetBranchInspectorGeneralAsync();
@@ -141,7 +139,7 @@ namespace BLL
safeWorkingHourTask,
safeTrainTask,
specialTrainTask,
- specialOperationTrainTask,
+ specialOperationTrainTask, hseTechnicalTask,
headOfficeInspectorGeneralTask,
headOfficeFullTimeTask,
branchInspectorGeneralTask,
@@ -202,6 +200,7 @@ namespace BLL
var safeTrainList = await safeTrainTask;
var specialTrainList = await specialTrainTask;
var specialOperationTrainList = await specialOperationTrainTask;
+ var hseTechnicalList = await hseTechnicalTask;
var headOfficeInspectorGeneralList = await headOfficeInspectorGeneralTask;
var headOfficeFullTimeList = await headOfficeFullTimeTask;
var branchInspectorGeneralList = await branchInspectorGeneralTask;
@@ -243,76 +242,79 @@ namespace BLL
var majorHiddenRectificationOutputsList = await majorHiddenRectificationOutputsTask;
// 构造结果对象
- var table = new HSSEData_HSSE
- {
- JoinConstructionPersonNum = joinConstructionPersonList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- MajorProjectsUnderConstructionNum = majorProjectsUnderConstructionList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- TotalWorkingHour = totalWorkingHour,
- LostWorkingHour = lostWorkingHour,
- SafeWorkingHour = safeWorkingHour,
- SafeTrainNum = safeTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum),
- SpecialTrainNum = specialTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum),
- SpecialOperationTrainNum = specialOperationTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum),
- EnvironmentalTrainNum = 0,
- TotalEnergyConsumption = totalEnergyConsumption,
- IncomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumption,
- NewWaterConsumption = newWaterConsumption,
- HeadOfficeInspectorGeneralNum = headOfficeInspectorGeneralList.Count(),
- HeadOfficeFullTimeNum = headOfficeFullTimeList.Count,
- BranchInspectorGeneralNum = branchInspectorGeneralList.Count,
- BranchFullTimeNum = branchFullTimeList.Count,
- ProjectInspectorGeneralNum = projectInspectorGeneralList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- ProjectFullTimeNum = projectFullTimeList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- ProjectSafetyMonitorNum = projectSafetyMonitorList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- ProjectSafetyLeadingGroupMeetingNum = projectSafetyLeadingGroupMeetingList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- ProjectSafetyMeetingNum = projectSafetyMeetingList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- CompanyLeadShiftCheckNum = companyLeadShiftCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- CompanyComprehensiveCheckNum = companyComprehensiveCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- CompanySpecialCheckNum = companySpecialCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- ProjectLeadShiftCheckNum = projectLeadShiftCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- ProjectSpecialCheckNum = projectSpecialCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- ProjectMajorCheckNum = projectMajorCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- NearMissNum = nearMissList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- RecordableEventNum = recordableEventList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- GeneralAccidentNum = generalAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- MajorAccidentNum = majorAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- SeriousAccidentNum = seriousAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- SpecialSeriousAccidentNum = specialSeriousAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- CompanyComprehensivePlanNum = companyComprehensivePlanList.Count(x => x.UnitId == _unitId),
- CompanySpecialPlanNum = companySpecialPlanList.Count(x => x.UnitId == _unitId),
- CompanyOnSiteDisposalPlan = companyOnSiteDisposalPlanList.Count(x => x.UnitId == _unitId),
- ProjectComprehensivePlanNum = projectComprehensivePlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- ProjectSpecialPlanNum = projectSpecialPlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- ProjectOnSiteDisposalPlan = projectOnSiteDisposalPlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- ProjectDrillNum = projectDrillList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- CostExtract = Convert.ToInt32(costExtractList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.SUMCost)),
- CostUse = Convert.ToInt32(costUseList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.SUMCost)),
- UseEquipmentNum = useEquipmentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- SpecialEquipmentNum = specialEquipmentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- LicensesNum = licensesList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- LicensesCloseNum = licensesCloseList.Count(x => _beUnderConstructionList.Contains(x.ProjectId)),
- GeneralClosedNum = generalHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.RecNum),
- GeneralNotClosedNum = generalHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.NoRecNum),
- MajorClosedNum = majorHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.RecNum),
- MajorNotClosedNum = majorHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.NoRecNum),
- LowRiskNum = securityRiskOutputListTask.Result.Sum(x => x.LowRiskNum),
- GeneralRiskNum = securityRiskOutputListTask.Result.Sum(x => x.GeneralRiskNum),
- MediumRiskNum = securityRiskOutputListTask.Result.Sum(x => x.MediumRiskNum),
- HighRiskNum = securityRiskOutputListTask.Result.Sum(x => x.HighRiskNum),
- CompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.CompletedNum),
- TrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.TrainPersonNum),
- ConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.ConstructionNum),
- FinishedNum = largeEngineeringOutputsTask.Result.Sum(x => x.FinishedNum),
- SuperCompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperCompletedNum),
- SuperTrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperTrainPersonNum),
- SuperConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperConstructionNum)
- };
+ var table = new HSSEData_HSSE();
+ table.JoinConstructionPersonNum = joinConstructionPersonList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.MajorProjectsUnderConstructionNum = majorProjectsUnderConstructionList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.TotalWorkingHour = totalWorkingHour;
+ table.LostWorkingHour = lostWorkingHour;
+ table.SafeWorkingHour = safeWorkingHour;
+ table.SafeTrainNum = safeTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum);
+ table.SpecialTrainNum = specialTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum);
+ table.SpecialOperationTrainNum = specialOperationTrainList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.TrainPersonNum);
+ table.HseTechnicalNum = hseTechnicalList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.EnvironmentalTrainNum = 0;
+ table.TotalEnergyConsumption = totalEnergyConsumption;
+ table.IncomeComprehensiveEnergyConsumption = incomeComprehensiveEnergyConsumption;
+ table.NewWaterConsumption = newWaterConsumption;
+ table.HeadOfficeInspectorGeneralNum = headOfficeInspectorGeneralList.Count();
+ table.HeadOfficeFullTimeNum = headOfficeFullTimeList.Count;
+ table.BranchInspectorGeneralNum = branchInspectorGeneralList.Count;
+ table.BranchFullTimeNum = branchFullTimeList.Count;
+ table.ProjectInspectorGeneralNum = projectInspectorGeneralList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.ProjectFullTimeNum = projectFullTimeList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.ProjectSafetyMonitorNum = projectSafetyMonitorList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.ProjectSafetyLeadingGroupMeetingNum = projectSafetyLeadingGroupMeetingList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.ProjectSafetyMeetingNum = projectSafetyMeetingList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.CompanyLeadShiftCheckNum = companyLeadShiftCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.CompanyComprehensiveCheckNum = companyComprehensiveCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.CompanySpecialCheckNum = companySpecialCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.ProjectLeadShiftCheckNum = projectLeadShiftCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.ProjectSpecialCheckNum = projectSpecialCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.ProjectMajorCheckNum = projectMajorCheckList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.NearMissNum = nearMissList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.RecordableEventNum = recordableEventList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.GeneralAccidentNum = generalAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.MajorAccidentNum = majorAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.SeriousAccidentNum = seriousAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.SpecialSeriousAccidentNum = specialSeriousAccidentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.CompanyComprehensivePlanNum = companyComprehensivePlanList.Count(x => x.UnitId == _unitId);
+ table.CompanySpecialPlanNum = companySpecialPlanList.Count(x => x.UnitId == _unitId);
+ table.CompanyOnSiteDisposalPlan = companyOnSiteDisposalPlanList.Count(x => x.UnitId == _unitId);
+ table.CompanyDrillNum = companyDrillList.Count(x => x.UnitId.Contains(_unitId));
+ table.CompanyDrillPersonNum = companyDrillList.Where(x => x.UnitId.Contains(_unitId)).Sum(x => x.JointPersonNum);
+ table.ProjectComprehensivePlanNum = projectComprehensivePlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.ProjectSpecialPlanNum = projectSpecialPlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.ProjectOnSiteDisposalPlan = projectOnSiteDisposalPlanList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.ProjectDrillNum = projectDrillList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.ProjectDrillPersonNum = projectDrillList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.JointPersonNum);
+ table.CostExtract = Convert.ToInt32(costExtractList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.SUMCost));
+ table.CostUse = Convert.ToInt32(costUseList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.SUMCost));
+ table.UseEquipmentNum = useEquipmentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.SpecialEquipmentNum = specialEquipmentList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.LicensesNum = licensesList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.LicensesCloseNum = licensesCloseList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
+ table.GeneralClosedNum = generalHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.RecNum);
+ table.GeneralNotClosedNum = generalHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.NoRecNum);
+ table.MajorClosedNum = majorHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.RecNum);
+ table.MajorNotClosedNum = majorHiddenRectificationOutputsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).Sum(x => x.NoRecNum);
+ table.LowRiskNum = securityRiskOutputListTask.Result.Sum(x => x.LowRiskNum);
+ table.GeneralRiskNum = securityRiskOutputListTask.Result.Sum(x => x.GeneralRiskNum);
+ table.MediumRiskNum = securityRiskOutputListTask.Result.Sum(x => x.MediumRiskNum);
+ table.HighRiskNum = securityRiskOutputListTask.Result.Sum(x => x.HighRiskNum);
+ table.CompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.CompletedNum);
+ table.TrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.TrainPersonNum);
+ table.OperativesNum = largeEngineeringOutputsTask.Result.Sum(x => x.OperativesNum);
+ table.ConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.ConstructionNum);
+ table.FinishedNum = largeEngineeringOutputsTask.Result.Sum(x => x.FinishedNum);
+ table.ArgumentNum = largeEngineeringOutputsTask.Result.Sum(x => x.ArgumentNum);
+ table.SuperCompletedNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperCompletedNum);
+ table.SuperTrainPersonNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperTrainPersonNum);
+ table.SuperOperativesNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperOperativesNum);
+ table.SuperConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperConstructionNum);
+ table.SuperFinishedNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperFinishedNum);
+ table.SuperArgumentNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperArgumentNum);
+
- if (!string.IsNullOrEmpty(_unitId))
- {
- table.CompanyDrillNum = companyDrillList.Count(x => x.UnitId.Contains(_unitId));
- }
-
if (_unitType == 0)
{
table.BeUnderConstructionNum = beUnderConstructionList.Count();
@@ -323,7 +325,6 @@ namespace BLL
table.CertificateBNum = certificateBList.Count();
table.CertificateCNum = certificateCList.Count();
table.SafetyCommitteeMeetingNum = safetyCommitteeMeetingList.Count();
-
}
else if (_unitType == 1)
{
@@ -336,16 +337,16 @@ namespace BLL
table.CertificateBNum = certificateBList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId);
table.CertificateCNum = certificateCList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) || x.UnitId == _unitId);
}
- else if (_unitType ==3)
+ else if (_unitType == 3)
{
table.BeUnderConstructionNum = beUnderConstructionList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
table.ShutdownNum = shutdownList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
table.SafetyCommitteeMeetingNum = safetyCommitteeMeetingList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
- table.SafetyInjectionEngineer = safetyInjectionEngineerList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) );
+ table.SafetyInjectionEngineer = safetyInjectionEngineerList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
table.EnterpriseTopicsMeetingNum = safetyInjectionEngineerList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
table.CertificateANum = certificateAList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
table.CertificateBNum = certificateBList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
- table.CertificateCNum = certificateCList.Count(x => _beUnderConstructionList.Contains(x.ProjectId) );
+ table.CertificateCNum = certificateCList.Count(x => _beUnderConstructionList.Contains(x.ProjectId));
}
_hsseData = table;
@@ -390,7 +391,6 @@ namespace BLL
return result;
}
-
///
/// 质量数据
///
@@ -405,6 +405,9 @@ namespace BLL
var projectPersonNumTask = CQMSDataService.GetProjectPersonNumAsync(); //获取项目专职人数
var trainPersonNumTask = CQMSDataService.GetTrainPersonNumAsync(); //获取质量培训人次数
var technicalDisclosePersonTask = CQMSDataService.GetTechnicalDisclosePersonNumAsync(); //获取技术交底人次数
+ var qualityAssuranceNumTask = CQMSDataService.GetQualityAssuranceNumAsync(); //获取特设质保体系数量
+ var comprehensiveConTechnologyDisclosureTask = CQMSDataService.GetComprehensiveConTechnologyDisclosureAsync(); //获取施工技术交底
+ var comprehensiveReviewDrawingsTask = CQMSDataService.GetComprehensiveReviewDrawingsAsync(); //获取图纸会审
var inspectionEquipmentTask = CQMSDataService.GetComprehensive_InspectionEquipmentAsync(); //获取设备报验
var inspectionPersonTask = CQMSDataService.GetComprehensive_InspectionPersonAsync(); //获取人员报验
@@ -438,7 +441,8 @@ namespace BLL
// 等待所有异步方法执行完成
await Task.WhenAll(
companyPersonNumTask, branchPersonNumTask, projectPersonNumTask,
- trainPersonNumTask, technicalDisclosePersonTask,
+ trainPersonNumTask, technicalDisclosePersonTask, qualityAssuranceNumTask,
+ comprehensiveConTechnologyDisclosureTask, comprehensiveReviewDrawingsTask,
inspectionEquipmentTask, inspectionPersonTask, inspectionMachineTask,
useNumTask, okNumTask,
singleProjectNumTask, unitProjectNumTask, subProjectNuTask, subdivisionalWorksNuTask, inspectionLotNumTask,
@@ -454,6 +458,9 @@ namespace BLL
var projectPersonNumList = await projectPersonNumTask;
var trainPersonNumList = await trainPersonNumTask;
var technicalDisclosePersonList = await technicalDisclosePersonTask;
+ var qualityAssuranceNum = await qualityAssuranceNumTask;
+ var comprehensiveConTechnologyDisclosureList = await comprehensiveConTechnologyDisclosureTask;
+ var comprehensiveReviewDrawingsList = await comprehensiveReviewDrawingsTask;
var inspectionEquipmentList = await inspectionEquipmentTask;
var inspectionPersonList = await inspectionPersonTask;
@@ -488,6 +495,9 @@ namespace BLL
projectPersonNumList = projectPersonNumList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).ToList();
trainPersonNumList = trainPersonNumList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).ToList();
technicalDisclosePersonList = technicalDisclosePersonList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).ToList();
+ comprehensiveConTechnologyDisclosureList = comprehensiveConTechnologyDisclosureList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).ToList();
+ comprehensiveReviewDrawingsList = comprehensiveReviewDrawingsList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).ToList();
+ qualityAssuranceNum = qualityAssuranceNum.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).ToList();
inspectionEquipmentList = inspectionEquipmentList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).ToList();
inspectionPersonList = inspectionPersonList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).ToList();
inspectionMachineList = inspectionMachineList.Where(x => _beUnderConstructionList.Contains(x.ProjectId)).ToList();
@@ -521,6 +531,9 @@ namespace BLL
ProjectPersonNum = projectPersonNumList.Count(),
TrainPersonNum = trainPersonNumList.Count(),
TechnicalDisclosePersonNum = technicalDisclosePersonList.Sum(x => x.TrainPersonNum),
+ ComprehensiveConTechnologyDisclosureNum = comprehensiveConTechnologyDisclosureList.Count(),
+ ComprehensiveConTechnologyDisclosurePersonNum = comprehensiveConTechnologyDisclosureList.Sum(x => x.TrainPersonNum),
+ ComprehensiveReviewDrawingsNum = comprehensiveReviewDrawingsList.Count(),
EquipmentInspectionNum = inspectionEquipmentList.Count(),
EquipmentInspectionQualifiedNum = inspectionEquipmentList.Where(x => x.SamplingResult == "1").Count(),
PersonInspectionNum = inspectionPersonList.Count(),
@@ -535,12 +548,12 @@ namespace BLL
UnitProjectNum = unitProjectNum.Count(),
SubProjectNum = subProjectNum.Count(),
SubdivisionalWorksNum = subdivisionalWorksNum.Count(),
- InspectionLotNum = inspectionLotNum.Count(),
+ InspectionLotNum = inspectionLotNum.Sum(x=>x.Sum),
ConstructSolutionNum = constructSolutionList.Count(),
ConstructSolutionProjectApproveNum = constructSolutionList.Where(x => x.State == "1").Count(),
ConstructSolutionUnitApproveNum = 0,//
- SpecialEquipmentQualityAssuranceSystemNum = 0,//
+ SpecialEquipmentQualityAssuranceSystemNum = qualityAssuranceNum.Count(),
DesignDetailsNum = technicalDisclosePersonList.Sum(x => x.TrainPersonNum),
ProblemNum = cqmsProblemList.Count(),
diff --git a/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_CQMSDataService.cs b/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_CQMSDataService.cs
index 5daa6f2..4be31fc 100644
--- a/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_CQMSDataService.cs
+++ b/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_CQMSDataService.cs
@@ -60,6 +60,10 @@ namespace BLL
///
SpecialEquipmentAndDesignDetails,
///
+ /// 设备报验报检
+ ///
+ InspectionMachineEquipment,
+ ///
/// 全部数据
///
All
@@ -115,6 +119,9 @@ namespace BLL
x.ReportDate,
x.TrainPersonNum,
x.TechnicalDisclosePersonNum,
+ x.ComprehensiveConTechnologyDisclosureNum,
+ x.ComprehensiveConTechnologyDisclosurePersonNum,
+ x.ComprehensiveReviewDrawingsNum,
x.UseNum,
x.OKNum,
x.CompanyPersonNum,
@@ -142,7 +149,9 @@ namespace BLL
x.SubProjectNum,
x.SubdivisionalWorksNum,
x.InspectionLotNum,
-
+ x.InspectionMachineNum,
+ x.InspectionMachineQualifiedNum,
+ x.SpecialEquipmentQualityAssuranceSystemNum
};
}
#endregion
@@ -180,11 +189,15 @@ namespace BLL
ReportDate = newtable.ReportDate,
TrainPersonNum = newtable.TrainPersonNum,
TechnicalDisclosePersonNum = newtable.TechnicalDisclosePersonNum,
+ ComprehensiveReviewDrawingsNum = newtable.ComprehensiveReviewDrawingsNum,
+ ComprehensiveConTechnologyDisclosureNum = newtable.ComprehensiveConTechnologyDisclosureNum,
+ ComprehensiveConTechnologyDisclosurePersonNum = newtable.ComprehensiveConTechnologyDisclosurePersonNum,
UseNum = newtable.UseNum,
OKNum = newtable.OKNum,
CompanyPersonNum = newtable.CompanyPersonNum,
BranchPersonNum = newtable.BranchPersonNum,
ProjectPersonNum = newtable.ProjectPersonNum,
+ ProjectSubPersonNum = newtable.ProjectSubPersonNum,
ProblemNum = newtable.ProblemNum,
ProblemCompletedNum = newtable.ProblemCompletedNum,
ProblemNotCompletedNum = newtable.ProblemNotCompletedNum,
@@ -225,7 +238,9 @@ namespace BLL
SubProjectAcceptNum = newtable.SubProjectAcceptNum,
SubProjectAcceptOKNum = newtable.SubProjectAcceptOKNum,
SubdivisionalWorksAcceptNum = newtable.SubdivisionalWorksAcceptNum,
- SubdivisionalWorksAcceptOKNum = newtable.SubdivisionalWorksAcceptOKNum
+ SubdivisionalWorksAcceptOKNum = newtable.SubdivisionalWorksAcceptOKNum,
+ InspectionMachineNum = newtable.InspectionMachineNum,
+ InspectionMachineQualifiedNum = newtable.InspectionMachineQualifiedNum,
};
db.Project_CQMSData_CQMS.InsertOnSubmit(table);
db.SubmitChanges();
@@ -251,11 +266,15 @@ namespace BLL
table.ReportDate = newtable.ReportDate;
table.TrainPersonNum = newtable.TrainPersonNum;
table.TechnicalDisclosePersonNum = newtable.TechnicalDisclosePersonNum;
+ table.ComprehensiveConTechnologyDisclosureNum = newtable.ComprehensiveConTechnologyDisclosureNum;
+ table.ComprehensiveConTechnologyDisclosurePersonNum = newtable.ComprehensiveConTechnologyDisclosurePersonNum;
+ table.ComprehensiveReviewDrawingsNum = newtable.ComprehensiveReviewDrawingsNum;
table.UseNum = newtable.UseNum;
table.OKNum = newtable.OKNum;
table.CompanyPersonNum = newtable.CompanyPersonNum;
table.BranchPersonNum = newtable.BranchPersonNum;
table.ProjectPersonNum = newtable.ProjectPersonNum;
+ table.ProjectSubPersonNum = newtable.ProjectSubPersonNum;
table.ProblemNum = newtable.ProblemNum;
table.ProblemCompletedNum = newtable.ProblemCompletedNum;
table.ProblemNotCompletedNum = newtable.ProblemNotCompletedNum;
@@ -297,6 +316,8 @@ namespace BLL
table.SubProjectAcceptOKNum = newtable.SubProjectAcceptOKNum;
table.SubdivisionalWorksAcceptNum = newtable.SubdivisionalWorksAcceptNum;
table.SubdivisionalWorksAcceptOKNum = newtable.SubdivisionalWorksAcceptOKNum;
+ table.InspectionMachineNum = newtable.InspectionMachineNum;
+ table.InspectionMachineQualifiedNum = newtable.InspectionMachineQualifiedNum;
db.SubmitChanges();
}
}
@@ -494,6 +515,14 @@ namespace BLL
{
table.SpecialEquipmentQualityAssuranceSystemNum = GetSpecialEquipmentQualityAssuranceSystemNum(projectid);
table.DesignDetailsNum = GetTechnicalDisclosePersonNum(projectid);
+ table.ComprehensiveConTechnologyDisclosureNum = GetComprehensiveConTechnologyDisclosureNum(projectid);
+ table.ComprehensiveConTechnologyDisclosurePersonNum = GetComprehensiveConTechnologyDisclosurePersonNum(projectid);
+ table.ComprehensiveReviewDrawingsNum = GetComprehensiveReviewDrawings(projectid);
+ }
+ if (cQMSDateType == CQMSDateType.InspectionMachineEquipment || cQMSDateType == CQMSDateType.All)
+ {
+ table.InspectionMachineNum = GetInspectionMachineEquipmentNum(projectid);
+ table.InspectionMachineQualifiedNum = GetInspectionMachineEquipmentQualifiedNum(projectid);
}
if (IsReportByToday(projectid))
@@ -518,7 +547,7 @@ namespace BLL
return result;
}
///
- /// 获取技术交底人次数
+ /// 获取设计交底人次数
///
///
public static int GetTechnicalDisclosePersonNum(string projectid)
@@ -529,6 +558,41 @@ namespace BLL
var q = Funs.GetNewIntOrZero(result.ToString());
return q;
}
+ ///
+ /// 获取施工技术交底数
+ ///
+ ///
+ public static int GetComprehensiveConTechnologyDisclosureNum(string projectid)
+ {
+ var result = (from x in Funs.DB.Comprehensive_ConTechnologyDisclosure
+ where x.ProjectId == projectid && x.CompileDate > Const.DtmarkTime
+ select x).ToList().Count();
+ return result;
+ }
+ ///
+ /// 获取施工技术交底人数
+ ///
+ ///
+ public static int GetComprehensiveConTechnologyDisclosurePersonNum(string projectid)
+ {
+ var result = (from x in Funs.DB.Comprehensive_ConTechnologyDisclosure
+ where x.ProjectId == projectid && x.CompileDate > Const.DtmarkTime
+ select x.DisclosurePersonNum).ToList().Sum(x => x.Value);
+ var q = Funs.GetNewIntOrZero(result.ToString());
+ return q;
+ }
+ ///
+ /// 获取图纸会审
+ ///
+ ///
+ public static int GetComprehensiveReviewDrawings(string projectid)
+ {
+ var result = (from x in Funs.DB.Comprehensive_ReviewDrawings
+ where x.ProjectId == projectid && x.CreateDate > Const.DtmarkTime
+ select x).ToList().Count();
+ return result;
+ }
+
///
/// 获取在用计量器具数
///
@@ -901,6 +965,7 @@ namespace BLL
{
int result = (from x in Funs.DB.Comprehensive_InspectionMachine
where x.ProjectId == projectid && x.CompileDate > Const.DtmarkTime
+ && x.SType == "机具"
select x).Count();
return result;
}
@@ -913,7 +978,34 @@ namespace BLL
public static int GetComprehensiveInspectionMachineOKNum(string projectid)
{
int result = (from x in Funs.DB.Comprehensive_InspectionMachine
- where x.ProjectId == projectid && x.IsCheckOK.HasValue && x.IsCheckOK == true && x.CompileDate > Const.DtmarkTime
+ where x.ProjectId == projectid && x.SType=="机具" && x.IsCheckOK.HasValue && x.IsCheckOK == true && x.CompileDate > Const.DtmarkTime
+ select x).Count();
+ return result;
+ }
+
+ ///
+ /// 获取机具设备报验-设备报验数
+ ///
+ ///
+ ///
+ public static int GetInspectionMachineEquipmentNum(string projectid)
+ {
+ int result = (from x in Funs.DB.Comprehensive_InspectionMachine
+ where x.ProjectId == projectid && x.CompileDate > Const.DtmarkTime
+ && x.SType == "设备"
+ select x).Count();
+ return result;
+ }
+
+ ///
+ /// 获取机具设备报验-设备报验合格数
+ ///
+ ///
+ ///
+ public static int GetInspectionMachineEquipmentQualifiedNum(string projectid)
+ {
+ int result = (from x in Funs.DB.Comprehensive_InspectionMachine
+ where x.ProjectId == projectid && x.SType == "设备" && x.IsCheckOK.HasValue && x.IsCheckOK == true && x.CompileDate > Const.DtmarkTime
select x).Count();
return result;
}
@@ -948,7 +1040,9 @@ namespace BLL
///
public static int GetComprehensiveInspectionMaterialNum(string projectid)
{
- var result = 0;
+ int result = (from x in Funs.DB.Comprehensive_InspectionEquipment
+ where x.ProjectId == projectid && x.CompileDate > Const.DtmarkTime
+ select x).Count();
return result;
}
@@ -958,7 +1052,9 @@ namespace BLL
///
public static int GetComprehensiveInspectionMaterialOKNum(string projectid)
{
- var result = 0;
+ int result = (from x in Funs.DB.Comprehensive_InspectionEquipment
+ where x.ProjectId == projectid && x.SamplingResult == "1" && x.CompileDate > Const.DtmarkTime
+ select x).Count();
return result;
}
@@ -1004,11 +1100,13 @@ namespace BLL
///
public static int GetSpecialEquipmentQualityAssuranceSystemNum(string projectid)
{
- var result = 0;
+ var result = (from x in Funs.DB.Solution_CQMSConstructSolution
+ where x.ProjectId == projectid && x.CompileDate > Const.DtmarkTime
+ select x).ToList().Count();
return result;
}
-
+
#region 推送项目质量数据
@@ -1039,5 +1137,348 @@ namespace BLL
}
#endregion
+
+ #region 推送项目质量巡检数据
+
+ ///
+ /// 推送项目质量巡检数据
+ ///
+ ///
+ public static ReturnData PushProjectHazardRegisterData()
+ {
+ var thisUnit = CommonService.GetIsThisUnit();
+ Model.SUBQHSEDB db = Funs.DB;
+ var items = (from x in db.View_Hazard_HazardRegister
+ where x.IsUpdate == null || x.IsUpdate == false
+ select new Model.Hazard_HazardRegisterItem
+ {
+ HazardRegisterId = x.HazardRegisterId,
+ SourceUnitId = thisUnit.UnitId,
+ RegisterDate = x.RegisterDate,
+ RegisterDef = x.RegisterDef,
+ Rectification = x.Rectification,
+ WorkAreaName = x.WorkAreaName,
+ ResponsibilityUnitName = x.ResponsibilityUnitName,
+ ResponsibilityUnitCollCropCode = x.ResponsibilityUnitCollCropCode,
+ Risk_Level = x.Risk_Level,
+ ProjectId = x.ProjectId,
+ ProjectName = x.ProjectName,
+ States = x.States,
+ StatesStr = x.StatesStr,
+ ResponsibilityManName = x.ResponsibilityManName,
+ CheckManName = x.CheckManName,
+ CheckTime = x.CheckTime,
+ RectificationPeriod = x.RectificationPeriod,
+ ImageUrl = x.ImageUrl,
+ ImageUrlFileContext = AttachFileService.GetMoreFileStructByAttachUrl(x.ImageUrl),
+ RectificationImageUrl = x.RectificationImageUrl,
+ RectificationImageUrlFileContext = AttachFileService.GetMoreFileStructByAttachUrl(x.RectificationImageUrl),
+ RectificationTime = x.RectificationTime,
+ ConfirmManName = x.ConfirmManName,
+ ConfirmDate = x.ConfirmDate,
+ HandleIdea = x.HandleIdea,
+ CutPayment = x.CutPayment,
+ CheckCycle = x.CheckCycle,
+ RegisterTypesName = x.RegisterTypesName,
+ Requirements = x.Requirements
+ }).ToList();
+ Model.ReturnData responeData = new Model.ReturnData();
+ if (items.Count() > 0)
+ {
+
+ var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items };
+ var str = JsonConvert.SerializeObject(newItem);
+ var baseurl = "/api/HSSEData/SaveProjectHazardRegisterData";
+ responeData = ServerService.PushCNCEC(str, baseurl);
+ if (responeData.code == 1)
+ {
+ var list = from x in db.HSSE_Hazard_HazardRegister
+ where x.IsUpdate == null || x.IsUpdate == false
+ select x;
+ foreach (var item in list)
+ {
+ item.IsUpdate = true;
+ }
+ db.SubmitChanges();
+ }
+ }
+ else
+ {
+ responeData.code = 0;
+ responeData.message = "当前没有项目质量巡检数据";
+ }
+ return responeData;
+ }
+
+ #endregion
+
+
+ #region 推送项目质量隐患数据
+
+ ///
+ /// 推送项目质量隐患数据
+ ///
+ ///
+ public static ReturnData PushProjectQualityProblemData(int pushNum)
+ {
+ var thisUnit = CommonService.GetIsThisUnit();
+ Model.SUBQHSEDB db = Funs.DB;
+ var items = (from x in db.Check_CheckControl
+ join unit in db.Base_Unit on x.UnitId equals unit.UnitId into unitJ
+ from unit in unitJ.DefaultIfEmpty()
+ join cNProfessional in db.Base_CNProfessional on x.CNProfessionalCode equals cNProfessional.CNProfessionalId into cNProfessionalJ
+ from cNProfessional in cNProfessionalJ.DefaultIfEmpty()
+ join unitWork in db.WBS_UnitWork on x.UnitWorkId equals unitWork.UnitWorkId into unitWorkJ
+ from unitWork in unitWorkJ.DefaultIfEmpty()
+ join QualityQuestionType in db.Base_QualityQuestionType on x.QuestionType equals QualityQuestionType.QualityQuestionTypeId
+ where (x.IsUpdate == null || x.IsUpdate == false) && x.CheckDate > BLL.Const.DtmarkTime
+ select new Model.QualityProblemItem
+ {
+ Id = x.CheckControlCode,
+ SourceUnitId = thisUnit.UnitId,
+ ProjectId = x.ProjectId,
+ CollCropCode = thisUnit.CollCropCode,
+ DataDate = x.CheckDate,
+ CheckDate = x.CheckDate,
+ UnitWorkName = unitWork.UnitWorkName + (unitWork.ProjectType == "1" ? "(建筑)" : "(安装)"),
+ UnitName = unit.UnitName,
+ ProfessionalName = cNProfessional.ProfessionalName,
+ QuestionType = QualityQuestionType.QualityQuestionType,
+ ImageUrl = AttachFileService.getFileUrl(x.CheckControlCode.ToString()),
+ RectificationImageUrl = AttachFileService.getFileUrl(x.CheckControlCode.ToString() + "r"),
+ CheckSite = x.CheckSite,
+ States = x.State,
+ StatesStr = x.State == "5" || x.State == "6" ? "未确认" :
+ x.State == "7" ? "已闭环" :
+ Convert.ToDateTime(x.LimitDate).AddDays(1) < DateTime.Now ? "超期未整改" : "未整改",
+ }).Take(pushNum).ToList();
+ Model.ReturnData responeData = new Model.ReturnData();
+ if (items.Count() > 0)
+ {
+
+ var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items };
+ var str = JsonConvert.SerializeObject(newItem);
+ var baseurl = "/api/CQMSData/SaveProjectQualityProblemData";
+ responeData = ServerService.PushCNCEC(str, baseurl);
+ if (responeData.code == 1)
+ {
+ foreach (var item in items)
+ {
+ var data = db.Check_CheckControl.FirstOrDefault(x =>
+ x.CheckControlCode == item.Id && (x.IsUpdate == null || x.IsUpdate == false));
+ data.IsUpdate = true;
+ db.SubmitChanges();
+ }
+
+ }
+ }
+ else
+ {
+ responeData.code = 0;
+ responeData.message = "当前没有项目质量隐患数据";
+ }
+ return responeData;
+ }
+
+ #endregion
+
+ #region 删除项目质量隐患数据
+
+ ///
+ /// 删除项目质量隐患数据
+ ///
+ ///
+ public static ReturnData DeleteProjectQualityProblemData(string Id)
+ {
+ Model.ReturnData responeData = new Model.ReturnData();
+ try
+ {
+ var thisUnit = CommonService.GetIsThisUnit();
+ Model.SUBQHSEDB db = Funs.DB;
+ var items = (from x in db.Check_CheckControl
+ join unit in db.Base_Unit on x.UnitId equals unit.UnitId into unitJ
+ from unit in unitJ.DefaultIfEmpty()
+ join cNProfessional in db.Base_CNProfessional on x.CNProfessionalCode equals cNProfessional.CNProfessionalId into cNProfessionalJ
+ from cNProfessional in cNProfessionalJ.DefaultIfEmpty()
+ join unitWork in db.WBS_UnitWork on x.UnitWorkId equals unitWork.UnitWorkId into unitWorkJ
+ from unitWork in unitWorkJ.DefaultIfEmpty()
+ join QualityQuestionType in db.Base_QualityQuestionType on x.QuestionType equals QualityQuestionType.QualityQuestionTypeId
+ where x.CheckControlCode == Id
+ select new Model.QualityProblemItem
+ {
+ Id = x.CheckControlCode,
+ SourceUnitId = thisUnit.UnitId,
+ ProjectId = x.ProjectId,
+ CollCropCode = thisUnit.CollCropCode,
+ DataDate = x.CheckDate,
+ CheckDate = x.CheckDate,
+ UnitWorkName = unitWork.UnitWorkName + (unitWork.ProjectType == "1" ? "(建筑)" : "(安装)"),
+ UnitName = unit.UnitName,
+ ProfessionalName = cNProfessional.ProfessionalName,
+ QuestionType = QualityQuestionType.QualityQuestionType,
+ ImageUrl = AttachFileService.getFileUrl(x.CheckControlCode.ToString()),
+ RectificationImageUrl = AttachFileService.getFileUrl(x.CheckControlCode.ToString() + "r"),
+ CheckSite = x.CheckSite,
+ States = x.State,
+ StatesStr = x.State == "5" || x.State == "6" ? "未确认" :
+ x.State == "7" ? "已闭环" :
+ Convert.ToDateTime(x.LimitDate).AddDays(1) < DateTime.Now ? "超期未整改" : "未整改",
+ }).ToList();
+
+ if (items.Count() > 0)
+ {
+ var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items };
+ var str = JsonConvert.SerializeObject(newItem);
+ var baseurl = "/api/CQMSData/DeleteProjectQualityProblemData";
+ responeData = ServerService.PushCNCEC(str, baseurl);
+ }
+ else
+ {
+ responeData.code = 0;
+ responeData.message = "集团数据删除失败";
+ }
+ }
+ catch (Exception)
+ {
+ responeData.code = 0;
+ responeData.message = "集团数据删除失败";
+ }
+ return responeData;
+ }
+
+ #endregion
+
+
+ #region 推送质量QC活动注册数据
+
+ ///
+ /// 推送质量QC活动注册数据
+ ///
+ ///
+ public static ReturnData PushQCRegistrationData(int pushNum)
+ {
+ var thisUnit = CommonService.GetIsThisUnit();
+ Model.SUBQHSEDB db = Funs.DB;
+ var items = (from x in db.QCManage_QCGroupRegistration
+ join unit in db.Base_Unit on x.UnitId equals unit.UnitId into unitJ
+ from u in unitJ.DefaultIfEmpty()
+ join s in db.Sys_User on x.CompileMan equals s.UserId into userJ
+ from s in userJ.DefaultIfEmpty()
+ where (x.IsUpdate == null || x.IsUpdate == false) && x.CompileDate > BLL.Const.DtmarkTime
+ select new Model.QCRegistrationItem
+ {
+ Id = x.QCGroupRegistrationId,
+ SourceUnitId = thisUnit.UnitId,
+ ProjectId = x.ProjectId,
+ CollCropCode = thisUnit.CollCropCode,
+ DataDate = x.CompileDate,
+ AttachFile = AttachFileService.getFileUrl(x.QCGroupRegistrationId.ToString()),
+ Code = x.Code,
+ Name = x.Name,
+ CompileManName = s.UserName,
+ CompileDate = x.CompileDate,
+ UnitName = u.UnitName,
+ UnitCollCropCode = Funs.DB.Base_Unit.FirstOrDefault(e => e.UnitId == x.UnitId).CollCropCode,
+ Subjects = x.Subjects,
+ Process = x.Process,
+ Achievement = x.Achievement,
+ AwardName = x.AwardName,
+ AwardType = x.AwardType,
+ AwardLevel = x.AwardLevel,
+ AwardingUnit = x.AwardingUnit,
+ }).Take(pushNum).ToList();
+ Model.ReturnData responeData = new Model.ReturnData();
+ if (items.Count() > 0)
+ {
+ var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items };
+ var str = JsonConvert.SerializeObject(newItem);
+ var baseurl = "/api/CQMSData/SaveQCRegistrationData";
+ responeData = ServerService.PushCNCEC(str, baseurl);
+ if (responeData.code == 1)
+ {
+ foreach (var item in items)
+ {
+ var data = db.QCManage_QCGroupRegistration.FirstOrDefault(x =>
+ x.QCGroupRegistrationId == item.Id && (x.IsUpdate == null || x.IsUpdate == false));
+ data.IsUpdate = true;
+ db.SubmitChanges();
+ }
+
+ }
+ }
+ else
+ {
+ responeData.code = 0;
+ responeData.message = "当前没有质量QC活动注册数据";
+ }
+ return responeData;
+ }
+
+ #endregion
+
+ #region 删除质量QC活动注册数据
+
+ ///
+ /// 删除质量QC活动注册数据
+ ///
+ ///
+ public static ReturnData DeleteQCRegistrationData(string Id)
+ {
+ Model.ReturnData responeData = new Model.ReturnData();
+ try
+ {
+ var thisUnit = CommonService.GetIsThisUnit();
+ Model.SUBQHSEDB db = Funs.DB;
+ var items = (from x in db.QCManage_QCGroupRegistration
+ join unit in db.Base_Unit on x.UnitId equals unit.UnitId into unitJ
+ from u in unitJ.DefaultIfEmpty()
+ join s in db.Sys_User on x.CompileMan equals s.UserId into userJ
+ from s in userJ.DefaultIfEmpty()
+ where x.QCGroupRegistrationId == Id
+ select new Model.QCRegistrationItem
+ {
+ Id = x.QCGroupRegistrationId,
+ SourceUnitId = thisUnit.UnitId,
+ ProjectId = x.ProjectId,
+ CollCropCode = thisUnit.CollCropCode,
+ DataDate = x.CompileDate,
+ AttachFile = AttachFileService.getFileUrl(x.QCGroupRegistrationId.ToString()),
+ Code = x.Code,
+ Name = x.Name,
+ CompileManName = s.UserName,
+ CompileDate = x.CompileDate,
+ UnitName = u.UnitName,
+ UnitCollCropCode = Funs.DB.Base_Unit.FirstOrDefault(e => e.UnitId == x.UnitId).CollCropCode,
+ Subjects = x.Subjects,
+ Process = x.Process,
+ Achievement = x.Achievement,
+ AwardName = x.AwardName,
+ AwardLevel = x.AwardLevel,
+ AwardingUnit = x.AwardingUnit,
+ }).ToList();
+
+ if (items.Count() > 0)
+ {
+ var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items };
+ var str = JsonConvert.SerializeObject(newItem);
+ var baseurl = "/api/CQMSData/DeleteQCRegistrationData";
+ responeData = ServerService.PushCNCEC(str, baseurl);
+ }
+ else
+ {
+ responeData.code = 0;
+ responeData.message = "集团数据删除失败";
+ }
+ }
+ catch (Exception)
+ {
+ responeData.code = 0;
+ responeData.message = "集团数据删除失败";
+ }
+ return responeData;
+ }
+
+ #endregion
+
}
}
\ No newline at end of file
diff --git a/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_DefectService.cs b/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_DefectService.cs
index 4c0ba04..5ab264a 100644
--- a/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_DefectService.cs
+++ b/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_DefectService.cs
@@ -1,5 +1,4 @@
using FineUIPro;
-using Microsoft.SqlServer.Dts.Runtime;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections;
@@ -89,30 +88,30 @@ namespace BLL
{
using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
{
- }
-
- var table = new Project_HJGLData_Defect
- {
- Id = newtable.Id,
- ProjectId = newtable.ProjectId,
- UnitId = newtable.UnitId,
- CollCropCode = newtable.CollCropCode,
- UnitName = newtable.UnitName,
- ReportDate = newtable.ReportDate,
- DefectName = newtable.DefectName,
- DefectNum = newtable.DefectNum
- };
- db.Project_HJGLData_Defect.InsertOnSubmit(table);
- db.SubmitChanges();
+ var table = new Project_HJGLData_Defect
+ {
+ Id = newtable.Id,
+ ProjectId = newtable.ProjectId,
+ UnitId = newtable.UnitId,
+ CollCropCode = newtable.CollCropCode,
+ UnitName = newtable.UnitName,
+ ReportDate = newtable.ReportDate,
+ DefectName = newtable.DefectName,
+ DefectNum = newtable.DefectNum
+ };
+ db.Project_HJGLData_Defect.InsertOnSubmit(table);
+ db.SubmitChanges();
+ }
}
public static void AddBulkProject_HJGLData_Defect(List newtables)
{
using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
{
+ db.Project_HJGLData_Defect.InsertAllOnSubmit(newtables);
+ db.SubmitChanges();
+
}
- db.Project_HJGLData_Defect.InsertAllOnSubmit(newtables);
- db.SubmitChanges();
}
public static void UpdateProject_HJGLData_Defect(Project_HJGLData_Defect newtable)
@@ -263,7 +262,7 @@ namespace BLL
{
var db = Funs.DB;
- var projectids = ProjectService.GetProjectWorkList().Select(x => x.ProjectId).ToList();
+ var projectids = HJGLData_HJGLService.BeUnderConstructionList;
var thisUnitId = string.Empty;
var thisUnit = CommonService.GetIsThisUnit();
if (thisUnit != null) thisUnitId = thisUnit.UnitId;
@@ -285,8 +284,7 @@ namespace BLL
}).ToList();
DeleteProject_HJGLData_DefectByDate(DateTime.Now.Date); //删除当前所有
var projectHjglDataDefect = new List();
- foreach (var item in data
- )
+ foreach (var item in data)
{
var table = new Project_HJGLData_Defect
{
diff --git a/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGLService.cs b/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGLService.cs
index c30691e..2db56c7 100644
--- a/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGLService.cs
+++ b/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HJGLData_HJGLService.cs
@@ -168,6 +168,18 @@ namespace BLL
}
}
}
+ public static void DeleteProject_HJGLData_HJGLByDate(DateTime? reportDate)
+ {
+ using (var db = new SUBQHSEDB(Funs.ConnString))
+ {
+ var table = db.Project_HJGLData_HJGL.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0);
+ if (table != null)
+ {
+ db.Project_HJGLData_HJGL.DeleteAllOnSubmit(table);
+ db.SubmitChanges();
+ }
+ }
+ }
///
/// 判断该项目的该日期是否统计数据
///
@@ -356,11 +368,11 @@ namespace BLL
public static ReturnData PushProjectHJGLData()
{
var items = (from x in Funs.DB.Project_HJGLData_HJGL
- where x.ReportDate == DateTime.Now.Date
- select x).ToList();
+ where x.ReportDate == DateTime.Now.Date
+ select x).ToList();
var defectItems = (from x in Funs.DB.Project_HJGLData_Defect
- where x.ReportDate == DateTime.Now.Date
- select x).ToList();
+ where x.ReportDate == DateTime.Now.Date
+ select x).ToList();
Model.ReturnData responeData = new Model.ReturnData();
if (items.Count() > 0 || defectItems.Count() > 0)
{
@@ -379,20 +391,5 @@ namespace BLL
}
#endregion
-
-
- public static void DeleteProject_HJGLData_HJGLByDate(DateTime? reportDate)
- {
- using (var db = new SUBQHSEDB(Funs.ConnString))
- {
- var table = db.Project_HJGLData_HJGL.Where(x => x.ReportDate.Value.Date.CompareTo(reportDate.Value.Date) == 0);
- if (table != null)
- {
- db.Project_HJGLData_HJGL.DeleteAllOnSubmit(table);
- db.SubmitChanges();
- }
- }
- }
-
}
}
\ No newline at end of file
diff --git a/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs b/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs
index 67de1e3..e8786fd 100644
--- a/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs
+++ b/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs
@@ -101,8 +101,6 @@ namespace BLL
DangerousProject
}
- public static SUBQHSEDB db = Funs.DB;
-
///
/// 新增实体
///
@@ -139,11 +137,13 @@ namespace BLL
BranchFullTimeNum = newtable.BranchFullTimeNum,
ProjectInspectorGeneralNum = newtable.ProjectInspectorGeneralNum,
ProjectFullTimeNum = newtable.ProjectFullTimeNum,
+ ProjectSubFullTimeNum = newtable.ProjectSubFullTimeNum,
ProjectSafetyMonitorNum = newtable.ProjectSafetyMonitorNum,
SafetyInjectionEngineer = newtable.SafetyInjectionEngineer,
CertificateANum = newtable.CertificateANum,
CertificateBNum = newtable.CertificateBNum,
CertificateCNum = newtable.CertificateCNum,
+ QualityPersonNum = newtable.QualityPersonNum,
SafetyCommitteeMeetingNum = newtable.SafetyCommitteeMeetingNum,
EnterpriseTopicsMeetingNum = newtable.EnterpriseTopicsMeetingNum,
ProjectSafetyLeadingGroupMeetingNum = newtable.ProjectSafetyLeadingGroupMeetingNum,
@@ -151,6 +151,9 @@ namespace BLL
CompanyLeadShiftCheckNum = newtable.CompanyLeadShiftCheckNum,
CompanyComprehensiveCheckNum = newtable.CompanyComprehensiveCheckNum,
CompanySpecialCheckNum = newtable.CompanySpecialCheckNum,
+ BranchLeadShiftCheckNum = newtable.BranchLeadShiftCheckNum,
+ BranchComprehensiveCheckNum = newtable.BranchComprehensiveCheckNum,
+ BranchSpecialCheckNum = newtable.BranchSpecialCheckNum,
ProjectLeadShiftCheckNum = newtable.ProjectLeadShiftCheckNum,
ProjectSpecialCheckNum = newtable.ProjectSpecialCheckNum,
ProjectMajorCheckNum = newtable.ProjectMajorCheckNum,
@@ -163,8 +166,13 @@ namespace BLL
CompanyComprehensivePlanNum = newtable.CompanyComprehensivePlanNum,
CompanySpecialPlanNum = newtable.CompanySpecialPlanNum,
CompanyOnSiteDisposalPlan = newtable.CompanyOnSiteDisposalPlan,
+ BranchComprehensivePlanNum = newtable.BranchComprehensivePlanNum,
+ BranchSpecialPlanNum = newtable.BranchSpecialPlanNum,
+ BranchOnSiteDisposalPlan = newtable.BranchOnSiteDisposalPlan,
CompanyDrillNum = newtable.CompanyDrillNum,
CompanyDrillPersonNum = newtable.CompanyDrillPersonNum,
+ BranchDrillNum = newtable.BranchDrillNum,
+ BranchDrillPersonNum = newtable.BranchDrillPersonNum,
ProjectComprehensivePlanNum = newtable.ProjectComprehensivePlanNum,
ProjectSpecialPlanNum = newtable.ProjectSpecialPlanNum,
ProjectOnSiteDisposalPlan = newtable.ProjectOnSiteDisposalPlan,
@@ -186,11 +194,13 @@ namespace BLL
HighRiskNum = newtable.HighRiskNum,
CompletedNum = newtable.CompletedNum,
TrainPersonNum = newtable.TrainPersonNum,
+ OperativesNum = newtable.OperativesNum,
ConstructionNum = newtable.ConstructionNum,
FinishedNum = newtable.FinishedNum,
ArgumentNum = newtable.ArgumentNum,
SuperCompletedNum = newtable.SuperCompletedNum,
SuperTrainPersonNum = newtable.SuperTrainPersonNum,
+ SuperOperativesNum = newtable.SuperOperativesNum,
SuperConstructionNum = newtable.SuperConstructionNum,
SuperFinishedNum = newtable.SuperFinishedNum,
SuperArgumentNum = newtable.SuperArgumentNum
@@ -200,7 +210,6 @@ namespace BLL
}
}
-
///
/// 删除实体
///
@@ -225,7 +234,7 @@ namespace BLL
///
public static Project_HSSEData_HSSE GetProject_HSSEData_HSSEById(string Id)
{
- return db.Project_HSSEData_HSSE.FirstOrDefault(x => x.Id == Id);
+ return Funs.DB.Project_HSSEData_HSSE.FirstOrDefault(x => x.Id == Id);
}
public static List GetProject_HSSEData_HSSEByProjectid(string Projectid)
@@ -271,11 +280,13 @@ namespace BLL
table.BranchFullTimeNum = newtable.BranchFullTimeNum;
table.ProjectInspectorGeneralNum = newtable.ProjectInspectorGeneralNum;
table.ProjectFullTimeNum = newtable.ProjectFullTimeNum;
+ table.ProjectSubFullTimeNum = newtable.ProjectSubFullTimeNum;
table.ProjectSafetyMonitorNum = newtable.ProjectSafetyMonitorNum;
table.SafetyInjectionEngineer = newtable.SafetyInjectionEngineer;
table.CertificateANum = newtable.CertificateANum;
table.CertificateBNum = newtable.CertificateBNum;
table.CertificateCNum = newtable.CertificateCNum;
+ table.QualityPersonNum = newtable.QualityPersonNum;
table.SafetyCommitteeMeetingNum = newtable.SafetyCommitteeMeetingNum;
table.EnterpriseTopicsMeetingNum = newtable.EnterpriseTopicsMeetingNum;
table.ProjectSafetyLeadingGroupMeetingNum = newtable.ProjectSafetyLeadingGroupMeetingNum;
@@ -295,7 +306,13 @@ namespace BLL
table.CompanyComprehensivePlanNum = newtable.CompanyComprehensivePlanNum;
table.CompanySpecialPlanNum = newtable.CompanySpecialPlanNum;
table.CompanyOnSiteDisposalPlan = newtable.CompanyOnSiteDisposalPlan;
+ table.BranchComprehensivePlanNum = newtable.BranchComprehensivePlanNum;
+ table.BranchSpecialPlanNum = newtable.BranchSpecialPlanNum;
+ table.BranchOnSiteDisposalPlan = newtable.BranchOnSiteDisposalPlan;
table.CompanyDrillNum = newtable.CompanyDrillNum;
+ table.CompanyDrillPersonNum = newtable.CompanyDrillPersonNum;
+ table.BranchDrillNum = newtable.BranchDrillNum;
+ table.BranchDrillPersonNum = newtable.BranchDrillPersonNum;
table.ProjectComprehensivePlanNum = newtable.ProjectComprehensivePlanNum;
table.ProjectSpecialPlanNum = newtable.ProjectSpecialPlanNum;
table.ProjectOnSiteDisposalPlan = newtable.ProjectOnSiteDisposalPlan;
@@ -316,10 +333,12 @@ namespace BLL
table.HighRiskNum = newtable.HighRiskNum;
table.CompletedNum = newtable.CompletedNum;
table.TrainPersonNum = newtable.TrainPersonNum;
+ table.OperativesNum = newtable.OperativesNum;
table.ConstructionNum = newtable.ConstructionNum;
table.FinishedNum = newtable.FinishedNum;
table.SuperCompletedNum = newtable.SuperCompletedNum;
table.SuperTrainPersonNum = newtable.SuperTrainPersonNum;
+ table.SuperOperativesNum = newtable.SuperOperativesNum;
table.SuperConstructionNum = newtable.SuperConstructionNum;
table.SuperFinishedNum = newtable.SuperFinishedNum;
db.SubmitChanges();
@@ -458,6 +477,7 @@ namespace BLL
table.CertificateANum = GetCertificateANum(projectid);
table.CertificateBNum = GetCertificateBNum(projectid);
table.CertificateCNum = GetCertificateCNum(projectid);
+ table.QualityPersonNum = GetQualityPersonNum(projectid);
}
if (hSseDateType == HSSEDateType.SafetyMeeting || hSseDateType == HSSEDateType.All)
@@ -493,11 +513,18 @@ namespace BLL
table.CompanyComprehensivePlanNum = GetCompanyComprehensivePlanNum(projectid);
table.CompanySpecialPlanNum = GetCompanySpecialPlanNum(projectid);
table.CompanyOnSiteDisposalPlan = GetCompanyOnSiteDisposalPlan(projectid);
+ table.BranchComprehensivePlanNum = GetBranchComprehensivePlanNum(projectid);
+ table.BranchSpecialPlanNum = GetBranchSpecialPlanNum(projectid);
+ table.BranchOnSiteDisposalPlan = GetBranchOnSiteDisposalPlan(projectid);
table.CompanyDrillNum = GetCompanyDrillNum(projectid);
+ table.CompanyDrillPersonNum = GetCompanyDrillPersonNum(projectid);
+ table.BranchDrillNum = GetBranchDrillNum(projectid);
+ table.BranchDrillPersonNum = GetBranchDrillPersonNum(projectid);
table.ProjectComprehensivePlanNum = GetProjectComprehensivePlanNum(projectid);
table.ProjectSpecialPlanNum = GetProjectSpecialPlanNum(projectid);
table.ProjectOnSiteDisposalPlan = GetProjectOnSiteDisposalPlan(projectid);
table.ProjectDrillNum = GetProjectDrillNum(projectid);
+ table.ProjectDrillNum = GetProjectDrillNum(projectid);
}
if (hSseDateType == HSSEDateType.SecurityCost || hSseDateType == HSSEDateType.All)
@@ -580,10 +607,12 @@ namespace BLL
{
table.CompletedNum = GetCompletedNum(projectid);
table.TrainPersonNum = GetTrainPersonNum(projectid);
+ table.OperativesNum = GetOperativesNum(projectid);
table.ConstructionNum = GetConstructionNum(projectid);
table.FinishedNum = GetFinishedNum(projectid);
table.SuperCompletedNum = GetSuperCompletedNum(projectid);
table.SuperTrainPersonNum = GetSuperTrainPersonNum(projectid);
+ table.SuperOperativesNum = GetSuperOperativesNum(projectid);
table.SuperConstructionNum = GetSuperConstructionNum(projectid);
table.SuperFinishedNum = GetSuperFinishedNum(projectid);
}
@@ -904,6 +933,19 @@ namespace BLL
return result;
}
+ ///
+ /// 获取在岗特种作业人员数量
+ ///
+ ///
+ public static int GetQualityPersonNum(string projectid)
+ {
+ var result = (from x in Funs.DB.SitePerson_Person
+ join y in Funs.DB.QualityAudit_PersonQuality on x.PersonId equals y.PersonId
+ join m in Funs.DB.Base_WorkPost on x.WorkPostId equals m.WorkPostId
+ where x.ProjectId == projectid && m.PostType == Const.PostType_2 && x.IsUsed == true && (y.LimitDate == null || y.LimitDate < DateTime.Now)
+ select x).Count();
+ return result;
+ }
///
/// 获取企业安委会会议数
///
@@ -1122,6 +1164,36 @@ namespace BLL
return result;
}
+ ///
+ /// 获取分支机构综合预案数
+ ///
+ ///
+ public static int GetBranchComprehensivePlanNum(string projectid)
+ {
+ var result = 0;
+ return result;
+ }
+
+ ///
+ /// 获取分支机构专项预案数
+ ///
+ ///
+ public static int GetBranchSpecialPlanNum(string projectid)
+ {
+ var result = 0;
+ return result;
+ }
+
+ ///
+ /// 获取分支机构现场处置预案
+ ///
+ ///
+ public static int GetBranchOnSiteDisposalPlan(string projectid)
+ {
+ var result = 0;
+ return result;
+ }
+
///
/// 获取企业级演练次数
///
@@ -1131,6 +1203,33 @@ namespace BLL
var result = 0;
return result;
}
+ ///
+ /// 获取企业级演练人次数
+ ///
+ ///
+ public static int GetCompanyDrillPersonNum(string projectid)
+ {
+ var result = 0;
+ return result;
+ }
+ ///
+ /// 获取分支机构演练次数
+ ///
+ ///
+ public static int GetBranchDrillNum(string projectid)
+ {
+ var result = 0;
+ return result;
+ }
+ ///
+ /// 获取分支机构演练人次数
+ ///
+ ///
+ public static int GetBranchDrillPersonNum(string projectid)
+ {
+ var result = 0;
+ return result;
+ }
///
/// 获取项目级综合预案
@@ -1183,6 +1282,17 @@ namespace BLL
select x).Count();
return result;
}
+ ///
+ /// 获取项目级参演人数
+ ///
+ ///
+ public static int GetProjectDrillPersonNum(string projectid)
+ {
+ var result = (from x in Funs.DB.Emergency_DrillRecordList
+ where x.ProjectId == projectid && x.CompileDate > Const.DtmarkTime
+ select x.JointPersonNum ?? 0).ToList().Sum();
+ return result;
+ }
///
/// 获取费用提取(万元)
@@ -1394,6 +1504,17 @@ namespace BLL
select x.TrainPersonNum).ToList().Sum(x => x.Value);
return result;
}
+ ///
+ /// 获取危大工程作业人次数
+ ///
+ ///
+ public static int GetOperativesNum(string projectid)
+ {
+ var result = (from x in Funs.DB.Solution_LargerHazard
+ where x.ProjectId == projectid && x.IsSuperLargerHazard == false && x.RecordTime > Const.DtmarkTime
+ select x.OperativesNum).ToList().Sum(x => x.Value);
+ return result;
+ }
///
/// 获取危大工程施工个数
@@ -1445,6 +1566,18 @@ namespace BLL
where x.ProjectId == projectid && x.IsSuperLargerHazard == true && x.RecordTime > Const.DtmarkTime
select x.TrainPersonNum).ToList().Sum(x => x.Value);
return result;
+ }
+ ///
+ /// 获取超危大工程作业人员数
+ ///
+ ///
+ public static int GetSuperOperativesNum(string projectid)
+ {
+ var result =
+ (from x in Funs.DB.Solution_LargerHazard
+ where x.ProjectId == projectid && x.IsSuperLargerHazard == true && x.RecordTime > Const.DtmarkTime
+ select x.OperativesNum).ToList().Sum(x => x.Value);
+ return result;
}
///
@@ -1482,7 +1615,7 @@ namespace BLL
public static List GetProject_HSSEData_HSSEByModle(Project_HSSEData_HSSE table)
{
- var q = from x in db.Project_HSSEData_HSSE
+ var q = from x in Funs.DB.Project_HSSEData_HSSE
where
(string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) &&
(string.IsNullOrEmpty(table.ProjectId) || x.Id.Contains(table.ProjectId)) &&
@@ -1538,6 +1671,7 @@ namespace BLL
x.CertificateANum,
x.CertificateBNum,
x.CertificateCNum,
+ x.QualityPersonNum,
x.SafetyCommitteeMeetingNum,
x.EnterpriseTopicsMeetingNum,
x.ProjectSafetyLeadingGroupMeetingNum,
@@ -1557,7 +1691,13 @@ namespace BLL
x.CompanyComprehensivePlanNum,
x.CompanySpecialPlanNum,
x.CompanyOnSiteDisposalPlan,
+ x.BranchComprehensivePlanNum,
+ x.BranchSpecialPlanNum,
+ x.BranchOnSiteDisposalPlan,
x.CompanyDrillNum,
+ x.CompanyDrillPersonNum,
+ x.BranchDrillNum,
+ x.BranchDrillPersonNum,
x.ProjectComprehensivePlanNum,
x.ProjectSpecialPlanNum,
x.ProjectOnSiteDisposalPlan,
@@ -1578,10 +1718,12 @@ namespace BLL
x.HighRiskNum,
x.CompletedNum,
x.TrainPersonNum,
+ x.OperativesNum,
x.ConstructionNum,
x.FinishedNum,
x.SuperCompletedNum,
x.SuperTrainPersonNum,
+ x.SuperOperativesNum,
x.SuperConstructionNum,
x.SuperFinishedNum
};
@@ -1589,7 +1731,7 @@ namespace BLL
#endregion
- #region 推送项目安全隐患风险数据
+ #region 推送项目安全统计数据
///
/// 推送项目安全隐患风险数据
@@ -1597,10 +1739,10 @@ namespace BLL
///
public static ReturnData PushProjectHSSEData()
{
- var items = (from x in db.Project_HSSEData_HSSE
+ var items = (from x in Funs.DB.Project_HSSEData_HSSE
where x.ReportDate == DateTime.Now.Date
select x).ToList();
- var detailItems = (from x in db.Project_HSSEData_HiddenDangerDetail
+ var detailItems = (from x in Funs.DB.Project_HSSEData_HiddenDangerDetail
where x.ReportDate == DateTime.Now.Date
select x).ToList();
Model.ReturnData responeData = new Model.ReturnData();
@@ -1621,5 +1763,650 @@ namespace BLL
}
#endregion
+
+ #region 推送项目安全隐患数据
+
+ ///
+ /// 推送项目安全隐患数据
+ ///
+ ///
+ public static ReturnData PushProjectHazardRegisterData(int pushNum)
+ {
+ var thisUnit = CommonService.GetIsThisUnit();
+ Model.SUBQHSEDB db = Funs.DB;
+ var items = (from x in db.View_Hazard_HazardRegister
+ where (x.IsUpdate == null || x.IsUpdate == false) && x.CheckTime > BLL.Const.DtmarkTime
+ && x.ProblemTypes == "1"
+ && x.ProjectState == "1"
+ // && x.IsBranch.Value == true
+ && (x.IsDelete == null || x.IsDelete == false)
+ select new Model.Hazard_HazardRegisterItem
+ {
+ HazardRegisterId = x.HazardRegisterId,
+ SourceUnitId = thisUnit.UnitId,
+ RegisterDate = x.RegisterDate,
+ RegisterDef = x.RegisterDef,
+ Rectification = x.Rectification,
+ WorkAreaName = x.WorkAreaName,
+ ResponsibilityUnitName = x.ResponsibilityUnitName,
+ ResponsibilityUnitCollCropCode = x.ResponsibilityUnitCollCropCode,
+ Risk_Level = x.Risk_Level,
+ ProjectId = x.ProjectId,
+ ProjectName = x.ProjectName,
+ States = x.States,
+ StatesStr = x.StatesStr,
+ ResponsibilityManName = x.ResponsibilityManName,
+ CheckManName = x.CheckManName,
+ CheckTime = x.CheckTime,
+ RectificationPeriod = x.RectificationPeriod,
+ ImageUrl = x.ImageUrl,
+ // ImageUrlFileContext = AttachFileService.GetMoreFileStructByAttachUrl(x.ImageUrl),
+ RectificationImageUrl = x.RectificationImageUrl,
+ // RectificationImageUrlFileContext = AttachFileService.GetMoreFileStructByAttachUrl(x.RectificationImageUrl),
+ RectificationTime = x.RectificationTime,
+ ConfirmManName = x.ConfirmManName,
+ ConfirmDate = x.ConfirmDate,
+ HandleIdea = x.HandleIdea,
+ CutPayment = x.CutPayment,
+ CheckCycle = x.CheckCycle,
+ RegisterTypesName = x.RegisterTypesName,
+ Requirements = x.Requirements
+ }).Take(pushNum).ToList();
+ Model.ReturnData responeData = new Model.ReturnData();
+ if (items.Count() > 0)
+ {
+
+ var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items };
+ var str = JsonConvert.SerializeObject(newItem);
+ var baseurl = "/api/HSSEData/SaveProjectHazardRegisterData";
+ responeData = ServerService.PushCNCEC(str, baseurl);
+ if (responeData.code == 1)
+ {
+ foreach (var item in items)
+ {
+ var data = db.HSSE_Hazard_HazardRegister.FirstOrDefault(x =>
+ x.HazardRegisterId == item.HazardRegisterId && (x.IsUpdate == null || x.IsUpdate == false));
+ data.IsUpdate = true;
+ db.SubmitChanges();
+ }
+ // var list = from x in db.HSSE_Hazard_HazardRegister
+ // where x.IsUpdate == null || x.IsUpdate == false
+ // select x;
+ // foreach (var item in list)
+ // {
+ // item.IsUpdate = true;
+ // }
+ // db.SubmitChanges();
+ }
+ }
+ else
+ {
+ responeData.code = 0;
+ responeData.message = "当前没有项目安全隐患数据";
+ }
+ return responeData;
+ }
+
+ #endregion
+
+ #region 删除项目安全隐患数据
+
+ ///
+ /// 删除项目安全隐患数据
+ ///
+ ///
+ public static ReturnData DeleteProjectHazardRegisterData(string hazardRegisterId)
+ {
+ Model.ReturnData responeData = new Model.ReturnData();
+ try
+ {
+ var thisUnit = CommonService.GetIsThisUnit();
+ Model.SUBQHSEDB db = Funs.DB;
+ var items = (from x in db.View_Hazard_HazardRegister
+ where x.HazardRegisterId == hazardRegisterId
+ select new Model.Hazard_HazardRegisterItem
+ {
+ HazardRegisterId = x.HazardRegisterId,
+ SourceUnitId = thisUnit.UnitId,
+ RegisterDate = x.RegisterDate,
+ RegisterDef = x.RegisterDef,
+ Rectification = x.Rectification,
+ WorkAreaName = x.WorkAreaName,
+ ResponsibilityUnitName = x.ResponsibilityUnitName,
+ ResponsibilityUnitCollCropCode = x.ResponsibilityUnitCollCropCode,
+ Risk_Level = x.Risk_Level,
+ ProjectId = x.ProjectId,
+ ProjectName = x.ProjectName,
+ States = x.States,
+ StatesStr = x.StatesStr,
+ ResponsibilityManName = x.ResponsibilityManName,
+ CheckManName = x.CheckManName,
+ CheckTime = x.CheckTime,
+ RectificationPeriod = x.RectificationPeriod,
+ ImageUrl = x.ImageUrl,
+ ImageUrlFileContext = AttachFileService.GetMoreFileStructByAttachUrl(x.ImageUrl),
+ RectificationImageUrl = x.RectificationImageUrl,
+ RectificationImageUrlFileContext = AttachFileService.GetMoreFileStructByAttachUrl(x.RectificationImageUrl),
+ RectificationTime = x.RectificationTime,
+ ConfirmManName = x.ConfirmManName,
+ ConfirmDate = x.ConfirmDate,
+ HandleIdea = x.HandleIdea,
+ CutPayment = x.CutPayment,
+ CheckCycle = x.CheckCycle,
+ RegisterTypesName = x.RegisterTypesName,
+ Requirements = x.Requirements
+ }).ToList();
+
+ if (items.Count() > 0)
+ {
+ var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items };
+ var str = JsonConvert.SerializeObject(newItem);
+ var baseurl = "/api/HSSEData/DeleteProjectHazardRegisterData";
+ responeData = ServerService.PushCNCEC(str, baseurl);
+ }
+ else
+ {
+ responeData.code = 0;
+ responeData.message = "集团数据删除失败";
+ }
+ }
+ catch (Exception)
+ {
+ responeData.code = 0;
+ responeData.message = "集团数据删除失败";
+ }
+ return responeData;
+ }
+
+ #endregion
+
+ #region 推送危大工程业务明细数据
+
+ ///
+ /// 推送危大工程业务明细数据
+ ///
+ ///
+ public static ReturnData PushProjectLargeEngineeringData(int pushNum)
+ {
+ var thisUnit = CommonService.GetIsThisUnit();
+ Model.SUBQHSEDB db = Funs.DB;
+ var items = (from x in db.Solution_LargerHazard
+ where (x.IsUpdate == null || x.IsUpdate == false) && x.RecordTime > BLL.Const.DtmarkTime
+ select new Model.LargeEngineeringItem
+ {
+ Id = x.HazardId,
+ SourceUnitId = thisUnit.UnitId,
+ ProjectId = x.ProjectId,
+ CollCropCode = thisUnit.CollCropCode,
+ DataDate = x.RecordTime,
+ AttachFile = AttachFileService.getFileUrl(x.HazardId.ToString()),
+ HazardName = x.HazardName,
+ TypeName = db.Sys_Const.FirstOrDefault(y =>
+ y.ConstValue == x.HazardType && y.GroupId == ConstValue.Group_LargerHazardType).ConstText,
+ IsSuperLargerHazard = x.IsSuperLargerHazard,
+ IsArgument = x.IsArgument,
+ Address = x.Address,
+ Descriptions = x.Descriptions,
+ TrainPersonNum = x.TrainPersonNum,
+ RecordTime = x.RecordTime,
+ ExpectedTime = x.ExpectedTime,
+ States = x.States,
+ StatesStr = x.States == "0" ? "已取消" :
+ x.States == "1" ? "未开始" :
+ x.States == "2" ? "作业中" :
+ x.States == "3" ? "已完工" : "",
+ }).Take(pushNum).ToList();
+ Model.ReturnData responeData = new Model.ReturnData();
+ if (items.Count() > 0)
+ {
+ var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items };
+ var str = JsonConvert.SerializeObject(newItem);
+ var baseurl = "/api/HSSEData/SaveProjectLargeEngineeringData";
+ responeData = ServerService.PushCNCEC(str, baseurl);
+ if (responeData.code == 1)
+ {
+ foreach (var item in items)
+ {
+ var data = db.Solution_LargerHazard.FirstOrDefault(x =>
+ x.HazardId == item.Id && (x.IsUpdate == null || x.IsUpdate == false));
+ data.IsUpdate = true;
+ db.SubmitChanges();
+ }
+ }
+ }
+ else
+ {
+ responeData.code = 0;
+ responeData.message = "当前没有项目危大工程业务明细数据";
+ }
+
+ return responeData;
+ }
+
+ #endregion
+
+ #region 删除危大工程业务明细数据
+
+ ///
+ /// 删除危大工程业务明细数据
+ ///
+ ///
+ public static ReturnData DeleteProjectLargeEngineeringData(string Id)
+ {
+ Model.ReturnData responeData = new Model.ReturnData();
+ try
+ {
+ var thisUnit = CommonService.GetIsThisUnit();
+ Model.SUBQHSEDB db = Funs.DB;
+ var items = (from x in db.Solution_LargerHazard
+ where x.HazardId == Id
+ select new Model.LargeEngineeringItem
+ {
+ Id = x.HazardId,
+ SourceUnitId = thisUnit.UnitId,
+ ProjectId = x.ProjectId,
+ CollCropCode = thisUnit.CollCropCode,
+ DataDate = x.RecordTime,
+ AttachFile = AttachFileService.getFileUrl(x.HazardId.ToString()),
+ HazardName = x.HazardName,
+ TypeName = db.Sys_Const.FirstOrDefault(y =>
+ y.ConstValue == x.HazardType && y.GroupId == ConstValue.Group_LargerHazardType).ConstText,
+ IsSuperLargerHazard = x.IsSuperLargerHazard,
+ IsArgument = x.IsArgument,
+ Address = x.Address,
+ Descriptions = x.Descriptions,
+ TrainPersonNum = x.TrainPersonNum,
+ OperativesNum = x.OperativesNum,
+ RecordTime = x.RecordTime,
+ ExpectedTime = x.ExpectedTime,
+ States = x.States,
+ StatesStr = x.States == "0" ? "已取消" :
+ x.States == "1" ? "未开始" :
+ x.States == "2" ? "作业中" :
+ x.States == "3" ? "已完工" : "",
+ }).ToList();
+
+ if (items.Count() > 0)
+ {
+ var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items };
+ var str = JsonConvert.SerializeObject(newItem);
+ var baseurl = "/api/HSSEData/DeleteProjectLargeEngineeringData";
+ responeData = ServerService.PushCNCEC(str, baseurl);
+ }
+ else
+ {
+ responeData.code = 0;
+ responeData.message = "集团数据删除失败";
+ }
+ }
+ catch (Exception)
+ {
+ responeData.code = 0;
+ responeData.message = "集团数据删除失败";
+ }
+ return responeData;
+ }
+
+ #endregion
+
+ #region 推送安全作业许可业务明细数据
+
+ ///
+ /// 推送安全作业许可业务明细数据
+ ///
+ ///
+ public static ReturnData PushProjectLicenseData(int pushNum)
+ {
+ var thisUnit = CommonService.GetIsThisUnit();
+ Model.SUBQHSEDB db = Funs.DB;
+ var items = (from x in db.View_License_LicenseManager
+ where (x.IsUpdate == null || x.IsUpdate == false) && x.CompileDate > BLL.Const.DtmarkTime
+ select new Model.ProjectLicenseItem
+ {
+ Id = x.LicenseManagerId,
+ SourceUnitId = thisUnit.UnitId,
+ ProjectId = x.ProjectId,
+ CollCropCode = thisUnit.CollCropCode,
+ DataDate = x.CompileDate,
+ AttachFile = AttachFileService.getFileUrl(x.LicenseManagerId.ToString()),
+ LicenseManagerCode = x.LicenseManagerCode,
+ UnitId = x.UnitId,
+ UnitName = x.UnitName,
+ LicenseTypeName = x.LicenseTypeName,
+ UnitTypeName = x.UnitTypeName,
+ IsHighRisk = x.IsHighRisk,
+ WorkAreaName = x.WorkAreaName,
+ CompileDate = x.CompileDate,
+ StartDate = x.StartDate,
+ EndDate = x.EndDate,
+ WorkStatesStr = x.WorkStatesStr,
+
+ }).Take(pushNum).ToList();
+ Model.ReturnData responeData = new Model.ReturnData();
+ if (items.Count() > 0)
+ {
+ var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items };
+ var str = JsonConvert.SerializeObject(newItem);
+ var baseurl = "/api/HSSEData/SaveProjectLicenseData";
+ responeData = ServerService.PushCNCEC(str, baseurl);
+ if (responeData.code == 1)
+ {
+ foreach (var item in items)
+ {
+ var data = db.License_LicenseManager.FirstOrDefault(x =>
+ x.LicenseManagerId == item.Id && (x.IsUpdate == null || x.IsUpdate == false));
+ data.IsUpdate = true;
+ db.SubmitChanges();
+ }
+ }
+ }
+ else
+ {
+ responeData.code = 0;
+ responeData.message = "当前没有项目安全作业许可业务明细数据";
+ }
+
+ return responeData;
+ }
+
+ #endregion
+
+ #region 删除安全作业许可业务明细数据
+
+ ///
+ /// 删除安全作业许可业务明细数据
+ ///
+ ///
+ public static ReturnData DeleteProjectLicenseData(string Id)
+ {
+ Model.ReturnData responeData = new Model.ReturnData();
+ try
+ {
+ var thisUnit = CommonService.GetIsThisUnit();
+ Model.SUBQHSEDB db = Funs.DB;
+ var items = (from x in db.View_License_LicenseManager
+ where x.LicenseManagerId == Id
+ select new Model.ProjectLicenseItem
+ {
+ Id = x.LicenseManagerId,
+ SourceUnitId = thisUnit.UnitId,
+ ProjectId = x.ProjectId,
+ CollCropCode = thisUnit.CollCropCode,
+ DataDate = x.CompileDate,
+ AttachFile = AttachFileService.getFileUrl(x.LicenseManagerId.ToString()),
+ LicenseManagerCode = x.LicenseManagerCode,
+ UnitId = x.UnitId,
+ UnitName = x.UnitName,
+ LicenseTypeName = x.LicenseTypeName,
+ UnitTypeName = x.UnitTypeName,
+ IsHighRisk = x.IsHighRisk,
+ WorkAreaName = x.WorkAreaName,
+ CompileDate = x.CompileDate,
+ StartDate = x.StartDate,
+ EndDate = x.EndDate,
+ WorkStatesStr = x.WorkStatesStr,
+
+ }).ToList();
+
+ if (items.Count() > 0)
+ {
+ var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items };
+ var str = JsonConvert.SerializeObject(newItem);
+ var baseurl = "/api/HSSEData/DeleteProjectLicenseData";
+ responeData = ServerService.PushCNCEC(str, baseurl);
+ }
+ else
+ {
+ responeData.code = 0;
+ responeData.message = "集团数据删除失败";
+ }
+ }
+ catch (Exception)
+ {
+ responeData.code = 0;
+ responeData.message = "集团数据删除失败";
+ }
+ return responeData;
+ }
+
+ #endregion
+
+ #region 推送安全风险数据
+
+ ///
+ /// 推送安全风险数据
+ ///
+ ///
+ public static ReturnData PushProjectSecurityRiskData(int pushNum)
+ {
+ var thisUnit = CommonService.GetIsThisUnit();
+ Model.SUBQHSEDB db = Funs.DB;
+ var items = (from x in db.Hazard_HazardSelectedItem
+ join List in db.Hazard_HazardList on x.HazardListId equals List.HazardListId into ListJ
+ from list in ListJ.DefaultIfEmpty()
+ join Level in db.Base_RiskLevel on x.HazardLevel equals Level.RiskLevelId into LevelJ
+ from level in LevelJ.DefaultIfEmpty()
+ where (x.IsUpdate == null || x.IsUpdate == false) && level.RiskLevelName != "" && list.States == BLL.Const.State_2
+ select new Model.ProjectSecurityRiskItem
+ {
+ Id = x.HazardSelectedItemId,
+ SourceUnitId = thisUnit.UnitId,
+ ProjectId = x.ProjectId,
+ CollCropCode = thisUnit.CollCropCode,
+ DataDate = x.CheckStartDate,
+ // AttachFile = AttachFileService.getFileUrl(x.HazardListId.ToString()),
+ WorkAreaName = list.WorkAreaName,
+ WorkStageName = ConvertWorkStage(x.WorkStage),
+ SupHazardListType = ConvertSupHazardListTypeId(x.HazardListTypeId),
+ HazardListType = ConvertHazardListTypeId(x.HazardListTypeId),
+ Hazard = ConvertHazardCode(x.HazardId),
+ HazardItems = x.HazardItems,
+ DefectsType = x.DefectsType,
+ MayLeadAccidents = x.MayLeadAccidents,
+ HelperMethod = x.HelperMethod,
+ HazardJudge_L = x.HazardJudge_L,
+ HazardJudge_E = x.HazardJudge_E,
+ HazardJudge_C = x.HazardJudge_C,
+ HazardJudge_D = x.HazardJudge_D,
+ RiskLevelName = level.RiskLevelName,
+ RiskLevel = level.RiskLevel,
+ ControlMeasures = x.ControlMeasures,
+ }).Take(pushNum).ToList();
+ Model.ReturnData responeData = new Model.ReturnData();
+ if (items.Count() > 0)
+ {
+ var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items };
+ var str = JsonConvert.SerializeObject(newItem);
+ var baseurl = "/api/HSSEData/SaveProjectSecurityRiskData";
+ responeData = ServerService.PushCNCEC(str, baseurl);
+ if (responeData.code == 1)
+ {
+ foreach (var item in items)
+ {
+ var data = db.Hazard_HazardSelectedItem.FirstOrDefault(x =>
+ x.HazardSelectedItemId == item.Id && (x.IsUpdate == null || x.IsUpdate == false));
+ data.IsUpdate = true;
+ db.SubmitChanges();
+ }
+ }
+ }
+ else
+ {
+ responeData.code = 0;
+ responeData.message = "当前没有项目安全风险数据";
+ }
+
+ return responeData;
+ }
+
+ #region 转换字符串
+
+ ///
+ /// 转换工作阶段
+ ///
+ ///
+ ///
+ public static string ConvertWorkStage(object workStage)
+ {
+ if (workStage != null)
+ {
+ string workStages = string.Empty;
+ string[] strList = workStage.ToString().Split(',');
+ foreach (string str in strList)
+ {
+ Model.Base_WorkStage c = BLL.WorkStageService.GetWorkStageById(str);
+ if (c != null)
+ {
+ workStages += c.WorkStageName + ",";
+ }
+ }
+
+ if (!string.IsNullOrEmpty(workStages))
+ {
+ workStages = workStages.Substring(0, workStages.LastIndexOf(","));
+ }
+
+ return workStages;
+ }
+
+ return "";
+ }
+
+ ///
+ /// 获取危险源编号
+ ///
+ ///
+ ///
+ public static string ConvertHazardCode(object HazardId)
+ {
+ string hazardCode = string.Empty;
+ if (HazardId != null)
+ {
+ Model.Technique_HazardList hazardList = BLL.HazardListService.GetHazardListById(HazardId.ToString());
+ if (hazardList != null)
+ {
+ hazardCode = hazardList.HazardCode;
+ }
+ }
+
+ return hazardCode;
+ }
+
+ ///
+ /// 获取危险源类别
+ ///
+ ///
+ ///
+ public static string ConvertSupHazardListTypeId(object hazardListTypeId)
+ {
+ if (hazardListTypeId != null)
+ {
+ Model.Technique_HazardListType hazardListType =
+ BLL.HazardListTypeService.GetHazardListTypeById(hazardListTypeId.ToString());
+ if (hazardListType != null)
+ {
+ var hazard = BLL.HazardListTypeService.GetHazardListTypeById(hazardListType.SupHazardListTypeId);
+ if (hazard != null)
+ {
+ return hazard.HazardListTypeName;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ ///
+ /// 获取危险源项
+ ///
+ ///
+ ///
+ public static string ConvertHazardListTypeId(object hazardListTypeId)
+ {
+ if (hazardListTypeId != null)
+ {
+ Model.Technique_HazardListType hazardListType =
+ BLL.HazardListTypeService.GetHazardListTypeById(hazardListTypeId.ToString());
+ if (hazardListType != null)
+ {
+ return hazardListType.HazardListTypeName;
+ }
+ }
+
+ return null;
+ }
+
+ #endregion
+
+ #endregion
+
+ #region 删除安全风险数据
+
+ ///
+ /// 删除安全风险数据
+ ///
+ ///
+ public static ReturnData DeleteProjectSecurityRiskData(string Id)
+ {
+ Model.ReturnData responeData = new Model.ReturnData();
+ try
+ {
+ var thisUnit = CommonService.GetIsThisUnit();
+ Model.SUBQHSEDB db = Funs.DB;
+ var items = (from x in db.Hazard_HazardSelectedItem
+ join List in db.Hazard_HazardList on x.HazardListId equals List.HazardListId into ListJ
+ from list in ListJ.DefaultIfEmpty()
+ join Level in db.Base_RiskLevel on x.HazardLevel equals Level.RiskLevelId into LevelJ
+ from level in LevelJ.DefaultIfEmpty()
+ where x.HazardSelectedItemId == Id
+ select new Model.ProjectSecurityRiskItem
+ {
+ Id = x.HazardSelectedItemId,
+ SourceUnitId = thisUnit.UnitId,
+ ProjectId = x.ProjectId,
+ CollCropCode = thisUnit.CollCropCode,
+ DataDate = x.CheckStartDate,
+ // AttachFile = AttachFileService.getFileUrl(x.HazardListId.ToString()),
+ WorkAreaName = list.WorkAreaName,
+ WorkStageName = ConvertWorkStage(x.WorkStage),
+ SupHazardListType = ConvertSupHazardListTypeId(x.HazardListTypeId),
+ HazardListType = ConvertHazardListTypeId(x.HazardListTypeId),
+ Hazard = ConvertHazardCode(x.HazardId),
+ HazardItems = x.HazardItems,
+ DefectsType = x.DefectsType,
+ MayLeadAccidents = x.MayLeadAccidents,
+ HelperMethod = x.HelperMethod,
+ HazardJudge_L = x.HazardJudge_L,
+ HazardJudge_E = x.HazardJudge_E,
+ HazardJudge_C = x.HazardJudge_C,
+ HazardJudge_D = x.HazardJudge_D,
+ RiskLevelName = level.RiskLevelName,
+ RiskLevel = level.RiskLevel,
+ ControlMeasures = x.ControlMeasures,
+ }).ToList();
+
+ if (items.Count() > 0)
+ {
+ var newItem = new { CollCropCode = thisUnit.CollCropCode, Items = items };
+ var str = JsonConvert.SerializeObject(newItem);
+ var baseurl = "/api/HSSEData/DeleteProjectSecurityRiskData";
+ responeData = ServerService.PushCNCEC(str, baseurl);
+ }
+ else
+ {
+ responeData.code = 0;
+ responeData.message = "集团数据删除失败";
+ }
+ }
+ catch (Exception)
+ {
+ responeData.code = 0;
+ responeData.message = "集团数据删除失败";
+ }
+ return responeData;
+ }
+
+ #endregion
+
}
}
\ No newline at end of file
diff --git a/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HiddenDangerDetailService.cs b/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HiddenDangerDetailService.cs
index 8908b90..eee7559 100644
--- a/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HiddenDangerDetailService.cs
+++ b/SUBQHSE/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HiddenDangerDetailService.cs
@@ -1,5 +1,4 @@
using FineUIPro;
-using Microsoft.SqlServer.Dts.Runtime;
using Model;
using System;
using System.Collections;
diff --git a/SUBQHSE/BLL/ZHGL/Supervise/SuperviseCheckReportService.cs b/SUBQHSE/BLL/ZHGL/Supervise/SuperviseCheckReportService.cs
index 449b7fa..8cf74d0 100644
--- a/SUBQHSE/BLL/ZHGL/Supervise/SuperviseCheckReportService.cs
+++ b/SUBQHSE/BLL/ZHGL/Supervise/SuperviseCheckReportService.cs
@@ -36,6 +36,8 @@ namespace BLL
UnitId = superviseCheckReport.UnitId,
CheckTeam = superviseCheckReport.CheckTeam,
EvaluationResult = superviseCheckReport.EvaluationResult,
+ CheckUnitId = superviseCheckReport.CheckUnitId,
+ CheckMainType = superviseCheckReport.CheckMainType,
CheckType = superviseCheckReport.CheckType,
AttachUrl = superviseCheckReport.AttachUrl,
IsIssued = superviseCheckReport.IsIssued
@@ -59,9 +61,12 @@ namespace BLL
newSuperviseCheckReport.UnitId = superviseCheckReport.UnitId;
newSuperviseCheckReport.CheckTeam = superviseCheckReport.CheckTeam;
newSuperviseCheckReport.EvaluationResult = superviseCheckReport.EvaluationResult;
+ newSuperviseCheckReport.CheckUnitId = superviseCheckReport.CheckUnitId;
+ newSuperviseCheckReport.CheckMainType = superviseCheckReport.CheckMainType;
newSuperviseCheckReport.CheckType = superviseCheckReport.CheckType;
newSuperviseCheckReport.AttachUrl = superviseCheckReport.AttachUrl;
newSuperviseCheckReport.IsIssued = superviseCheckReport.IsIssued;
+ newSuperviseCheckReport.IsUpdate = null;
Funs.DB.SubmitChanges();
}
}
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs b/SUBQHSE/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs
index c744708..169dfd0 100644
--- a/SUBQHSE/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs
+++ b/SUBQHSE/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs
@@ -599,10 +599,34 @@ namespace FineUIPro.Web.CQMS.Check
string codes = Grid1.SelectedRowID.Split(',')[0];
var checks = BLL.CheckControlService.GetCheckControl(codes);
- BLL.CheckControlApproveService.DeleteCheckControlApprovesByCheckControlCode(codes);
- BLL.CheckControlService.DeleteCheckControl(codes);
- //Project_CQMSDataService.StatisticalData(this.CurrUser.LoginProjectId, Project_CQMSDataService.CQMSDateType.QualityProblem);
- BLL.LogService.AddSys_Log(this.CurrUser, checks.DocCode, codes, BLL.Const.CheckListMenuId, "删除质量巡检记录");
+ if (checks != null)
+ {
+ if (checks.IsUpdate == true)
+ {
+ var returndata = Project_CQMSDataService.DeleteProjectQualityProblemData(codes);
+ if (returndata.code == 1)
+ {
+ BLL.CheckControlApproveService.DeleteCheckControlApprovesByCheckControlCode(codes);
+ BLL.CheckControlService.DeleteCheckControl(codes);
+ //Project_CQMSDataService.StatisticalData(this.CurrUser.LoginProjectId, Project_CQMSDataService.CQMSDateType.QualityProblem);
+ BLL.LogService.AddSys_Log(this.CurrUser, checks.DocCode, codes, BLL.Const.CheckListMenuId, "删除质量巡检记录");
+
+ }
+ else
+ {
+ Alert.ShowInTop("记录已上报集团,集团删除失败,无法删除本地数据!", MessageBoxIcon.Warning);
+ return;
+ }
+ }
+ else
+ {
+ BLL.CheckControlApproveService.DeleteCheckControlApprovesByCheckControlCode(codes);
+ BLL.CheckControlService.DeleteCheckControl(codes);
+ //Project_CQMSDataService.StatisticalData(this.CurrUser.LoginProjectId, Project_CQMSDataService.CQMSDateType.QualityProblem);
+ BLL.LogService.AddSys_Log(this.CurrUser, checks.DocCode, codes, BLL.Const.CheckListMenuId, "删除质量巡检记录");
+ }
+
+ }
Grid1.DataBind();
BindGrid();
Alert.ShowInTop("删除数据成功!", MessageBoxIcon.Success);
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistration.aspx b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistration.aspx
new file mode 100644
index 0000000..8fc35f3
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistration.aspx
@@ -0,0 +1,163 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QCGroupRegistration.aspx.cs" Inherits="FineUIPro.Web.CQMS.QualityActivity.QCManage.QCGroupRegistration" %>
+
+<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistration.aspx.cs b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistration.aspx.cs
new file mode 100644
index 0000000..d48cbc5
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistration.aspx.cs
@@ -0,0 +1,272 @@
+using BLL;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Linq;
+
+namespace FineUIPro.Web.CQMS.QualityActivity.QCManage
+{
+ public partial class QCGroupRegistration : PageBase
+ {
+ ///
+ /// 项目id
+ ///
+ public string ProjectId
+ {
+ get
+ {
+ return (string)ViewState["ProjectId"];
+ }
+ set
+ {
+ ViewState["ProjectId"] = value;
+ }
+ }
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ this.ProjectId = this.CurrUser.LoginProjectId;
+ if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
+ {
+ this.ProjectId = Request.Params["projectId"];
+ }
+
+ this.ucTree.UnitId = this.CurrUser.UnitId;
+ this.ucTree.ProjectId = this.ProjectId;
+ // if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId) )
+ // {
+ this.panelLeftRegion.Hidden = true;
+ ////权限按钮方法
+ this.GetButtonPower();
+ // }
+ btnNew.OnClientClick = Window1.GetShowReference("QCGroupRegistrationEdit.aspx") + "return false;";
+ BindGrid();
+ }
+ }
+ ///
+ /// 公司级树加载
+ ///
+ ///
+ ///
+ protected void changeTree(object sender, EventArgs e)
+ {
+ this.ProjectId = this.ucTree.ProjectId;
+ this.GetButtonPower();
+ if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
+ {
+ btnNew.Hidden = true;
+ }
+ this.BindGrid();
+ }
+ ///
+ /// 绑定数据
+ ///
+
+ public void BindGrid()
+ {
+ // if (string.IsNullOrEmpty(this.ProjectId))
+ // {
+ // return;
+ // }
+ DataTable tb = ChecklistData();
+ Grid1.RecordCount = tb.Rows.Count;
+ tb = GetFilteredTable(Grid1.FilteredData, tb);
+ var table = this.GetPagedDataTable(Grid1, tb);
+
+ Grid1.DataSource = table;
+ Grid1.DataBind();
+ }
+ protected DataTable ChecklistData()
+ {
+ string strSql =
+ @"select C.*,p.UserName,u.UnitName, (case C.AwardType when '1' then '创优' when '2' then 'QC' end) as AwardTypeName,
+ (case C.AwardLevel when '1' then '鲁班奖'
+ when '2' then '国优奖'
+ when '3' then '省部级'
+ when '4' then '市级'
+ when '5' then '省部级'
+ when '6' then '集团级'
+ when '7' then '企业级' end) as AwardLevelName
+ from [dbo].[QCManage_QCGroupRegistration] C
+ left join Sys_User p on p.UserId=C.CompileMan
+ left join Base_Unit u on u.UnitId = c.UnitId
+ where 1=1 ";
+ List listStr = new List();
+ // strSql += " AND C.ProjectId = @ProjectId";
+ // listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
+ SqlParameter[] parameter = listStr.ToArray();
+ DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
+ return tb;
+ }
+ ///
+ /// 分页显示条数下拉框
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
+ BindGrid();
+ }
+ ///
+ /// 窗体关闭
+ ///
+ ///
+ ///
+ protected void Window1_Close(object sender, WindowCloseEventArgs e)
+ {
+ BindGrid();
+ }
+ //右键编辑
+ protected void btnMenuModify_Click(object sender, EventArgs e)
+ {
+ EditData();
+ }
+ //双击编辑
+ protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
+ {
+ EditData();
+ }
+ //分页
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ BindGrid();
+ }
+ ///
+ /// 编辑数据方法
+ ///
+ private void EditData()
+ {
+
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
+ return;
+ }
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QCGroupRegistrationEdit.aspx?QCGroupRegistrationId={0}", Grid1.SelectedRowID, "编辑 - ")));
+
+ }
+ //右键查看
+ protected void btnMenuView_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
+ return;
+ }
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QCGroupRegistrationView.aspx?QCGroupRegistrationId={0}", Grid1.SelectedRowID, "查看 - ")));
+ }
+ //右键删除
+ protected void btnMenuDel_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length > 0)
+ {
+ foreach (int rowIndex in Grid1.SelectedRowIndexArray)
+ {
+ string rowID = Grid1.DataKeys[rowIndex][0].ToString();
+ var QCGroupRegistration = BLL.QCManage_QCGroupRegistrationService.GetQCGroupRegistrationByQCGroupRegistrationId(rowID);
+
+ if (QCGroupRegistration != null)
+ {
+ if (QCGroupRegistration.IsUpdate == true)
+ {
+ var returndata = Project_CQMSDataService.DeleteQCRegistrationData(rowID);
+ if (returndata.code == 1)
+ {
+ ////删除附件表
+ BLL.CommonService.DeleteAttachFileById(rowID);
+ BLL.QCManage_QCGroupRegistrationService.DeleteQCGroupRegistrationById(rowID);
+ }
+ else
+ {
+ Alert.ShowInTop("记录已上报集团,集团删除失败,无法删除本地数据!", MessageBoxIcon.Warning);
+ return;
+ }
+ }
+ else
+ {
+ ////删除附件表
+ BLL.CommonService.DeleteAttachFileById(rowID);
+ BLL.QCManage_QCGroupRegistrationService.DeleteQCGroupRegistrationById(rowID);
+ }
+ }
+
+ }
+
+ BindGrid();
+ ShowNotify("删除数据成功!", MessageBoxIcon.Success);
+ }
+ }
+ ///
+ /// 搜索
+ ///
+ ///
+ ///
+ protected void btnSearch_Click(object sender, EventArgs e)
+ {
+ BindGrid();
+ }
+ ///
+ /// 重置
+ ///
+ ///
+ ///
+ protected void btnRset_Click(object sender, EventArgs e)
+ {
+ BindGrid();
+ }
+
+ #region 获取按钮权限
+ ///
+ /// 获取按钮权限
+ ///
+ ///
+ ///
+ private void GetButtonPower()
+ {
+ if (Request.Params["value"] == "0")
+ {
+ return;
+ }
+ var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectQCGroupRegistrationListMenuId);
+ if (buttonList.Count() > 0)
+ {
+ if (buttonList.Contains(BLL.Const.BtnAdd))
+ {
+ this.btnNew.Hidden = false;
+ }
+ if (buttonList.Contains(BLL.Const.BtnModify))
+ {
+ this.btnMenuModify.Hidden = false;
+ }
+ if (buttonList.Contains(BLL.Const.BtnDelete))
+ {
+ this.btnMenuDel.Hidden = false;
+ }
+ }
+ }
+ #endregion
+
+ protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
+ {
+ object[] keys = Grid1.DataKeys[e.RowIndex];
+ string fileId = string.Empty;
+ if (keys == null)
+ {
+ return;
+ }
+ else
+ {
+ fileId = keys[0].ToString();
+ }
+ if (e.CommandName.Equals("download"))
+ {
+ string menuId = Const.ProjectQCGroupRegistrationListMenuId;
+ PageContext.RegisterStartupScript(WindowAtt.GetShowReference(
+ String.Format("../../../AttachFile/webuploader.aspx?type=-1&source=1&toKeyId={0}&path=FileUpload/QCGroupRegistration&menuId={1}", fileId, menuId)));
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistration.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistration.aspx.designer.cs
new file mode 100644
index 0000000..3f429a8
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistration.aspx.designer.cs
@@ -0,0 +1,197 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.CQMS.QualityActivity.QCManage
+{
+
+
+ public partial class QCGroupRegistration
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// panelLeftRegion 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel panelLeftRegion;
+
+ ///
+ /// ContentPanel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ContentPanel ContentPanel1;
+
+ ///
+ /// ucTree 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
+
+ ///
+ /// panelCenterRegion 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel panelCenterRegion;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// btnNew 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnNew;
+
+ ///
+ /// lblPageIndex 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblPageIndex;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+
+ ///
+ /// Window1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window1;
+
+ ///
+ /// WindowAtt 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window WindowAtt;
+
+ ///
+ /// Menu1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Menu Menu1;
+
+ ///
+ /// btnMenuModify 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuModify;
+
+ ///
+ /// btnMenuView 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuView;
+
+ ///
+ /// btnMenuDel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuDel;
+ }
+}
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationEdit.aspx b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationEdit.aspx
new file mode 100644
index 0000000..96a7eff
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationEdit.aspx
@@ -0,0 +1,130 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QCGroupRegistrationEdit.aspx.cs" Inherits="FineUIPro.Web.CQMS.QualityActivity.QCManage.QCGroupRegistrationEdit" %>
+
+
+
+
+
+ QC小组注册
+
+
+
+
+
+
+
+
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationEdit.aspx.cs b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationEdit.aspx.cs
new file mode 100644
index 0000000..f0d34e5
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationEdit.aspx.cs
@@ -0,0 +1,188 @@
+using BLL;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Data;
+using System.Data.SqlClient;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web.UI.WebControls;
+using AspNet = System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.CQMS.QualityActivity.QCManage
+{
+ public partial class QCGroupRegistrationEdit : PageBase
+ {
+ ///
+ /// 主键
+ ///
+ public string QCGroupRegistrationId
+ {
+ get
+ {
+ return (string)ViewState["QCGroupRegistrationId"];
+ }
+ set
+ {
+ ViewState["QCGroupRegistrationId"] = value;
+ }
+ }
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ // BLL.UnitService.InitProjectUnitDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true);
+ BLL.UnitService.InitAllUnitDownList(this.drpUnitId, true);
+
+ QCGroupRegistrationId = Request.Params["QCGroupRegistrationId"];
+ if (!string.IsNullOrEmpty(QCGroupRegistrationId))
+ {
+ hdId.Text = this.QCGroupRegistrationId;
+ Model.QCManage_QCGroupRegistration QCGroupRegistration = BLL.QCManage_QCGroupRegistrationService.GetQCGroupRegistrationByQCGroupRegistrationId(QCGroupRegistrationId);
+ this.txtCode.Text = QCGroupRegistration.Code;
+ this.txtName.Text = QCGroupRegistration.Name;
+ if (!string.IsNullOrEmpty(QCGroupRegistration.CompileMan))
+ {
+ this.txtCompileMan.Text = UserService.GetUserNameByUserId(QCGroupRegistration.CompileMan);
+ }
+ if (QCGroupRegistration.CompileDate != null)
+ {
+ txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", QCGroupRegistration.CompileDate);
+ }
+ if (!string.IsNullOrEmpty(QCGroupRegistration.UnitId))
+ {
+ this.drpUnitId.SelectedValue = QCGroupRegistration.UnitId;
+ }
+ txtSubjects.Text = QCGroupRegistration.Subjects;
+ txtProcess.Text = QCGroupRegistration.Process;
+ txtAchievement.Text = QCGroupRegistration.Achievement;
+ txtAwardName.Text = QCGroupRegistration.AwardName;
+ if (!string.IsNullOrEmpty(QCGroupRegistration.AwardType))
+ {
+ drpAwardType.SelectedValue = QCGroupRegistration.AwardType;
+ if (QCGroupRegistration.AwardType == "1") {
+ drpAwardLevel.Items.Add(new ListItem("鲁班奖", "1"));
+ drpAwardLevel.Items.Add(new ListItem("国优奖", "2"));
+ drpAwardLevel.Items.Add(new ListItem("省部级", "3"));
+ drpAwardLevel.Items.Add(new ListItem("市级", "4"));
+ }
+ else if (QCGroupRegistration.AwardType == "2") {
+ drpAwardLevel.Items.Add(new ListItem("省部级", "5"));
+ drpAwardLevel.Items.Add(new ListItem("集团级", "6"));
+ drpAwardLevel.Items.Add(new ListItem("企业级", "7"));
+ }
+ }
+ if (!string.IsNullOrEmpty(QCGroupRegistration.AwardLevel))
+ {
+ drpAwardLevel.SelectedValue = QCGroupRegistration.AwardLevel;
+ }
+ txtAwardingUnit.Text = QCGroupRegistration.AwardingUnit;
+ }
+ else
+ {
+ this.txtCompileMan.Text = this.CurrUser.UserName;
+ txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
+ }
+ }
+ }
+
+ protected void Grid1_Sort(object sender, GridSortEventArgs e)
+ {
+
+ }
+
+ protected void WindowAtt_Close(object sender, WindowCloseEventArgs e)
+ {
+
+ }
+
+ protected void imgBtnFile_Click(object sender, EventArgs e)
+ {
+ if (string.IsNullOrEmpty(hdId.Text))
+ {
+ hdId.Text = SQLHelper.GetNewID();
+ }
+ PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../../AttachFile/webuploader.aspx?type=1&toKeyId={0}&path=FileUpload/QCGroupRegistration&menuId={1}", hdId.Text, BLL.Const.ProjectQCGroupRegistrationListMenuId)));
+ }
+
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ Saveinspection("save");
+ }
+
+ ///
+ /// 保存
+ ///
+ public void Saveinspection(string saveType)
+ {
+ Model.QCManage_QCGroupRegistration QCGroupRegistration = new Model.QCManage_QCGroupRegistration();
+ QCGroupRegistration.ProjectId = this.CurrUser.LoginProjectId;
+ QCGroupRegistration.Code = this.txtCode.Text.Trim();
+ QCGroupRegistration.Name = this.txtName.Text.Trim();
+ QCGroupRegistration.CompileMan = this.CurrUser.UserId;
+ QCGroupRegistration.CompileDate = Funs.GetNewDateTime(this.txtCompileDate.Text.Trim());
+ if (this.drpUnitId.SelectedValue != BLL.Const._Null)
+ {
+ QCGroupRegistration.UnitId = this.drpUnitId.SelectedValue;
+ }
+ QCGroupRegistration.Subjects = txtSubjects.Text.Trim();
+ QCGroupRegistration.Process = txtProcess.Text.Trim();
+ QCGroupRegistration.Achievement = txtAchievement.Text.Trim();
+ QCGroupRegistration.AwardName = txtAwardName.Text.Trim();
+ if (!string.IsNullOrEmpty(this.drpAwardType.SelectedValue))
+ {
+ QCGroupRegistration.AwardType = this.drpAwardType.SelectedValue;
+ }
+ if (!string.IsNullOrEmpty(this.drpAwardLevel.SelectedValue))
+ {
+ QCGroupRegistration.AwardLevel = this.drpAwardLevel.SelectedValue;
+ }
+ QCGroupRegistration.AwardingUnit = txtAwardingUnit.Text.Trim();
+ if (!string.IsNullOrEmpty(this.QCGroupRegistrationId))
+ {
+ QCGroupRegistration.QCGroupRegistrationId = this.QCGroupRegistrationId;
+ QCManage_QCGroupRegistrationService.UpdateQCGroupRegistration(QCGroupRegistration);
+ LogService.AddSys_Log(CurrUser, QCGroupRegistration.Code, QCGroupRegistration.QCGroupRegistrationId, Const.ProjectQCGroupRegistrationListMenuId, "修改QC小组注册");
+ }
+ else
+ {
+ if (string.IsNullOrEmpty(hdId.Text))
+ {
+ QCGroupRegistration.QCGroupRegistrationId = SQLHelper.GetNewID();
+ QCGroupRegistrationId = QCGroupRegistration.QCGroupRegistrationId;
+ }
+ else
+ {
+ QCGroupRegistration.QCGroupRegistrationId = hdId.Text;
+ }
+ QCManage_QCGroupRegistrationService.AddQCGroupRegistration(QCGroupRegistration);
+ LogService.AddSys_Log(CurrUser, QCGroupRegistration.Code, QCGroupRegistration.QCGroupRegistrationId, Const.ProjectQCGroupRegistrationListMenuId, "增加QC小组注册");
+ }
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
+ }
+
+ protected void Change_AwardType(object sender, EventArgs eventArgs)
+ {
+
+ drpAwardLevel.Items.Clear();
+ drpAwardLevel.Items.Add(new ListItem("-请选择-", ""));
+
+ if (drpAwardType.SelectedValue == "1") {
+ drpAwardLevel.Items.Add(new ListItem("鲁班奖", "1"));
+ drpAwardLevel.Items.Add(new ListItem("国优奖", "2"));
+ drpAwardLevel.Items.Add(new ListItem("省部级", "3"));
+ drpAwardLevel.Items.Add(new ListItem("市级", "4"));
+ }
+ else if (drpAwardType.SelectedValue == "2") {
+ drpAwardLevel.Items.Add(new ListItem("省部级", "5"));
+ drpAwardLevel.Items.Add(new ListItem("集团级", "6"));
+ drpAwardLevel.Items.Add(new ListItem("企业级", "7"));
+ }
+ // 设置选中第一项
+ if (drpAwardLevel.Items.Count > 0)
+ {
+ drpAwardLevel.SelectedIndex = 0;
+ }
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationEdit.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationEdit.aspx.designer.cs
new file mode 100644
index 0000000..61698fd
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationEdit.aspx.designer.cs
@@ -0,0 +1,251 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.CQMS.QualityActivity.QCManage
+{
+
+
+ public partial class QCGroupRegistrationEdit
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// ContentPanel2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ContentPanel ContentPanel2;
+
+ ///
+ /// Form2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form Form2;
+
+ ///
+ /// txtCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtCode;
+
+ ///
+ /// txtName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtName;
+
+ ///
+ /// drpUnitId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpUnitId;
+
+ ///
+ /// txtSubjects 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtSubjects;
+
+ ///
+ /// txtProcess 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtProcess;
+
+ ///
+ /// txtAchievement 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtAchievement;
+
+ ///
+ /// txtAwardName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtAwardName;
+
+ ///
+ /// txtAwardingUnit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtAwardingUnit;
+
+ ///
+ /// drpAwardType 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpAwardType;
+
+ ///
+ /// drpAwardLevel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpAwardLevel;
+
+ ///
+ /// txtCompileMan 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtCompileMan;
+
+ ///
+ /// txtCompileDate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtCompileDate;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// imgBtnFile 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button imgBtnFile;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// lbTemp 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label lbTemp;
+
+ ///
+ /// ToolbarFill1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarFill ToolbarFill1;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+
+ ///
+ /// hdId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdId;
+
+ ///
+ /// hdAttachUrl 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdAttachUrl;
+
+ ///
+ /// WindowAtt 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window WindowAtt;
+ }
+}
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationView.aspx b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationView.aspx
new file mode 100644
index 0000000..ff5c9b1
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationView.aspx
@@ -0,0 +1,128 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QCGroupRegistrationView.aspx.cs" Inherits="FineUIPro.Web.CQMS.QualityActivity.QCManage.QCGroupRegistrationView" %>
+
+
+
+
+
+ QC小组注册
+
+
+
+
+
+
+
+
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationView.aspx.cs b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationView.aspx.cs
new file mode 100644
index 0000000..06c5de4
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationView.aspx.cs
@@ -0,0 +1,130 @@
+using BLL;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Data;
+using System.Data.SqlClient;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web.UI.WebControls;
+using AspNet = System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.CQMS.QualityActivity.QCManage
+{
+ public partial class QCGroupRegistrationView : PageBase
+ {
+ ///
+ /// 主键
+ ///
+ public string QCGroupRegistrationId
+ {
+ get
+ {
+ return (string)ViewState["QCGroupRegistrationId"];
+ }
+ set
+ {
+ ViewState["QCGroupRegistrationId"] = value;
+ }
+ }
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ // BLL.UnitService.InitProjectUnitDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true);
+ BLL.UnitService.InitAllUnitDownList(this.drpUnitId, true);
+ QCGroupRegistrationId = Request.Params["QCGroupRegistrationId"];
+ if (!string.IsNullOrEmpty(QCGroupRegistrationId))
+ {
+ hdId.Text = this.QCGroupRegistrationId;
+ Model.QCManage_QCGroupRegistration QCGroupRegistration = BLL.QCManage_QCGroupRegistrationService.GetQCGroupRegistrationByQCGroupRegistrationId(QCGroupRegistrationId);
+ this.txtCode.Text = QCGroupRegistration.Code;
+ this.txtName.Text = QCGroupRegistration.Name;
+ if (!string.IsNullOrEmpty(QCGroupRegistration.CompileMan))
+ {
+ this.txtCompileMan.Text = UserService.GetUserNameByUserId(QCGroupRegistration.CompileMan);
+ }
+ if (QCGroupRegistration.CompileDate != null)
+ {
+ txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", QCGroupRegistration.CompileDate);
+ }
+ if (!string.IsNullOrEmpty(QCGroupRegistration.UnitId))
+ {
+ this.drpUnitId.SelectedValue = QCGroupRegistration.UnitId;
+ }
+ txtSubjects.Text = QCGroupRegistration.Subjects;
+ txtProcess.Text = QCGroupRegistration.Process;
+ txtAchievement.Text = QCGroupRegistration.Achievement;
+ txtAwardName.Text = QCGroupRegistration.AwardName;
+ if (!string.IsNullOrEmpty(QCGroupRegistration.AwardType))
+ {
+ drpAwardType.SelectedValue = QCGroupRegistration.AwardType;
+ if (QCGroupRegistration.AwardType == "1") {
+ drpAwardLevel.Items.Add(new ListItem("鲁班奖", "1"));
+ drpAwardLevel.Items.Add(new ListItem("国优奖", "2"));
+ drpAwardLevel.Items.Add(new ListItem("省部级", "3"));
+ drpAwardLevel.Items.Add(new ListItem("市级", "4"));
+ }
+ else if (QCGroupRegistration.AwardType == "2") {
+ drpAwardLevel.Items.Add(new ListItem("省部级", "5"));
+ drpAwardLevel.Items.Add(new ListItem("集团级", "6"));
+ drpAwardLevel.Items.Add(new ListItem("企业级", "7"));
+ }
+ }
+ if (!string.IsNullOrEmpty(QCGroupRegistration.AwardLevel))
+ {
+ drpAwardLevel.SelectedValue = QCGroupRegistration.AwardLevel;
+ }
+ txtAwardingUnit.Text = QCGroupRegistration.AwardingUnit;
+ }
+ else
+ {
+ this.txtCompileMan.Text = this.CurrUser.UserName;
+ txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
+ }
+ }
+ }
+
+ protected void Grid1_Sort(object sender, GridSortEventArgs e)
+ {
+
+ }
+
+ protected void WindowAtt_Close(object sender, WindowCloseEventArgs e)
+ {
+
+ }
+
+ protected void imgBtnFile_Click(object sender, EventArgs e)
+ {
+ if (string.IsNullOrEmpty(hdId.Text))
+ {
+ hdId.Text = SQLHelper.GetNewID();
+ }
+ PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/QCGroupRegistration&menuId={1}", hdId.Text, BLL.Const.ProjectQCGroupRegistrationListMenuId)));
+ }
+
+ protected void Change_AwardType(object sender, EventArgs eventArgs)
+ {
+
+ drpAwardLevel.Items.Clear();
+ drpAwardLevel.Items.Add(new ListItem("-请选择-", ""));
+
+ if (drpAwardType.SelectedValue == "1") {
+ drpAwardLevel.Items.Add(new ListItem("国家级", "1"));
+ drpAwardLevel.Items.Add(new ListItem("省部级", "2"));
+ drpAwardLevel.Items.Add(new ListItem("市级", "3"));
+ }
+ else if (drpAwardType.SelectedValue == "2") {
+ drpAwardLevel.Items.Add(new ListItem("省部级", "4"));
+ drpAwardLevel.Items.Add(new ListItem("集团级", "5"));
+ drpAwardLevel.Items.Add(new ListItem("企业级", "6"));
+ }
+ // 设置选中第一项
+ if (drpAwardLevel.Items.Count > 0)
+ {
+ drpAwardLevel.SelectedIndex = 0;
+ }
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationView.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationView.aspx.designer.cs
new file mode 100644
index 0000000..5f30c35
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCGroupRegistrationView.aspx.designer.cs
@@ -0,0 +1,242 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.CQMS.QualityActivity.QCManage
+{
+
+
+ public partial class QCGroupRegistrationView
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// ContentPanel2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ContentPanel ContentPanel2;
+
+ ///
+ /// Form2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form Form2;
+
+ ///
+ /// txtCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtCode;
+
+ ///
+ /// txtName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtName;
+
+ ///
+ /// drpUnitId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpUnitId;
+
+ ///
+ /// txtSubjects 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtSubjects;
+
+ ///
+ /// txtProcess 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtProcess;
+
+ ///
+ /// txtAchievement 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtAchievement;
+
+ ///
+ /// txtAwardName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtAwardName;
+
+ ///
+ /// txtAwardingUnit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtAwardingUnit;
+
+ ///
+ /// drpAwardType 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpAwardType;
+
+ ///
+ /// drpAwardLevel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpAwardLevel;
+
+ ///
+ /// txtCompileMan 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtCompileMan;
+
+ ///
+ /// txtCompileDate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtCompileDate;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// imgBtnFile 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button imgBtnFile;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// lbTemp 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label lbTemp;
+
+ ///
+ /// ToolbarFill1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarFill ToolbarFill1;
+
+ ///
+ /// hdId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdId;
+
+ ///
+ /// hdAttachUrl 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdAttachUrl;
+
+ ///
+ /// WindowAtt 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window WindowAtt;
+ }
+}
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCStatics.aspx b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCStatics.aspx
new file mode 100644
index 0000000..91c7437
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCStatics.aspx
@@ -0,0 +1,160 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QCStatics.aspx.cs" Inherits="FineUIPro.Web.CQMS.QualityActivity.QCManage.QCStatics" %>
+
+<%--<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>--%>
+
+
+
+
+
+
+ QC统计
+
+
+
+
+
+
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCStatics.aspx.cs b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCStatics.aspx.cs
new file mode 100644
index 0000000..e24ed65
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCStatics.aspx.cs
@@ -0,0 +1,191 @@
+using BLL;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.CQMS.QualityActivity.QCManage
+{
+ public partial class QCStatics : PageBase
+ {
+ ///
+ /// 项目id
+ ///
+ public string ProjectId
+ {
+ get
+ {
+ return (string)ViewState["ProjectId"];
+ }
+ set
+ {
+ ViewState["ProjectId"] = value;
+ }
+ }
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ //this.ProjectId = this.CurrUser.LoginProjectId;
+ //if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
+ //{
+ // this.ProjectId = Request.Params["projectId"];
+ //}
+
+ //this.ucTree.UnitId = this.CurrUser.UnitId;
+ //this.ucTree.ProjectId = this.ProjectId;
+ //if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
+ //{
+ // this.panelLeftRegion.Hidden = true;
+ ////权限按钮方法
+ //this.GetButtonPower();
+ //}
+ BLL.ProjectService.InitAllProjectDropDownList(this.drpProjectId, true);
+ BLL.UnitService.InitProjectUnitDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true);
+
+ if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
+ {
+ this.drpProjectId.Hidden = true;
+ this.Grid1.Columns[1].Hidden = true;
+ }
+ else
+ {
+ this.drpProjectId.Hidden = false;
+ this.Grid1.Columns[1].Hidden = false;
+ }
+ BindGrid();
+ }
+ }
+ ///
+ /// 公司级树加载
+ ///
+ ///
+ ///
+ //protected void changeTree(object sender, EventArgs e)
+ //{
+ //this.ProjectId = this.ucTree.ProjectId;
+ //this.GetButtonPower();
+ //if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
+ //{
+ //}
+ // this.BindGrid();
+ //}
+ ///
+ /// 绑定数据
+ ///
+ //private DataTable tb = null;
+
+ public void BindGrid()
+ {
+ //List listStr = new List
+ //{
+ //};
+ //if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
+ //{
+ // listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId));
+ //}
+ //else
+ //{
+ // if (this.drpProjectId.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpProjectId.SelectedValue))
+ // {
+ // listStr.Add(new SqlParameter("@projectId", this.drpProjectId.SelectedValue));
+ // }
+ // else
+ // {
+ // listStr.Add(new SqlParameter("@projectId", null));
+ // }
+ //}
+ //SqlParameter[] parameter = listStr.ToArray();
+ //tb = SQLHelper.GetDataTableRunProc("Sp_QCStatics", parameter);
+ //this.Grid1.RecordCount = tb.Rows.Count;
+ //var table = this.GetPagedDataTable(Grid1, tb);
+ //Grid1.DataSource = table;
+ //Grid1.DataBind();
+ string strSql = @"select C.*,p.UserName,u.UnitName,pro.ProjectName,(case C.AwardLevel when '1' then '国家' when '2' then '省部' when '3' then '企业' end) as AwardLevelName
+ from [dbo].[QCManage_QCGroupRegistration] C
+ left join Sys_User p on p.UserId=C.CompileMan
+ left join Base_Unit u on u.UnitId = c.UnitId
+ left join Base_Project pro on pro.ProjectId = C.ProjectId
+ where 1=1 ";
+ List listStr = new List();
+ if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
+ {
+ strSql += " AND C.ProjectId = @ProjectId";
+ listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
+ }
+ else
+ {
+ if (this.drpProjectId.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpProjectId.SelectedValue))
+ {
+ strSql += " AND C.ProjectId = @ProjectId";
+ listStr.Add(new SqlParameter("@ProjectId", this.drpProjectId.SelectedValue));
+ }
+ }
+ if (this.drpUnitId.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpUnitId.SelectedValue))
+ {
+ strSql += " AND C.UnitId = @UnitId";
+ listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue));
+ }
+
+ SqlParameter[] parameter = listStr.ToArray();
+ DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
+ Grid1.RecordCount = tb.Rows.Count;
+ //tb = GetFilteredTable(Grid1.FilteredData, tb);
+ var table = this.GetPagedDataTable(Grid1, tb);
+
+ Grid1.DataSource = table;
+ Grid1.DataBind();
+ }
+
+ ///
+ /// 分页显示条数下拉框
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
+ BindGrid();
+ }
+
+ //分页
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ BindGrid();
+ }
+
+ ///
+ /// 统计按钮
+ ///
+ ///
+ ///
+ protected void BtnAnalyse_Click(object sender, EventArgs e)
+ {
+ BindGrid();
+ }
+
+ protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
+ {
+ object[] keys = Grid1.DataKeys[e.RowIndex];
+ string fileId = string.Empty;
+ if (keys == null)
+ {
+ return;
+ }
+ else
+ {
+ fileId = keys[0].ToString();
+ }
+ if (e.CommandName.Equals("download"))
+ {
+ string menuId = Const.ProjectQCGroupRegistrationListMenuId;
+ PageContext.RegisterStartupScript(WindowAtt.GetShowReference(
+ String.Format("../../../AttachFile/webuploader.aspx?type=-1&source=1&toKeyId={0}&path=FileUpload/QCGroupRegistration&menuId={1}", fileId, menuId)));
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCStatics.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCStatics.aspx.designer.cs
new file mode 100644
index 0000000..6fdd3c5
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/CQMS/QualityActivity/QCManage/QCStatics.aspx.designer.cs
@@ -0,0 +1,143 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.CQMS.QualityActivity.QCManage
+{
+
+
+ public partial class QCStatics
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// panelCenterRegion 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel panelCenterRegion;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// drpProjectId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpProjectId;
+
+ ///
+ /// drpUnitId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpUnitId;
+
+ ///
+ /// BtnAnalyse 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button BtnAnalyse;
+
+ ///
+ /// lblPageIndex 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblPageIndex;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+
+ ///
+ /// WindowAtt 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window WindowAtt;
+ }
+}
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Solution/EditConstructSolution.aspx.cs b/SUBQHSE/FineUIPro.Web/CQMS/Solution/EditConstructSolution.aspx.cs
index 5d9635b..1598eff 100644
--- a/SUBQHSE/FineUIPro.Web/CQMS/Solution/EditConstructSolution.aspx.cs
+++ b/SUBQHSE/FineUIPro.Web/CQMS/Solution/EditConstructSolution.aspx.cs
@@ -102,7 +102,7 @@ namespace FineUIPro.Web.CQMS.Solution
BLL.SolutionTempleteTypeService.InitSolutionTempleteDropDownList(drpModelType, false);
BLL.SpecialSchemeTypeService.InitSpecialSchemeTypeDropDownList(drpSpecialType,1, false);
UnitService.InitMainAndSubUnitDropDownList(drpUnit, CurrUser.LoginProjectId, false);
- if (this.CurrUser.UnitId != null && CommonService.GetProjectUnitType(this.CurrUser.LoginProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UnitId != Const.hfnbdId)
+ if (this.CurrUser.UnitId != null && CommonService.GetProjectUnitType(this.CurrUser.LoginProjectId, this.CurrUser.UnitId) != BLL.Const.ProjectUnitType_1 && this.CurrUser.UserId != Const.hfnbdId)
{
drpUnit.SelectedValue = this.CurrUser.UnitId;
drpUnit.Enabled = false;
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Technique/Rectify.aspx b/SUBQHSE/FineUIPro.Web/CQMS/Technique/Rectify.aspx
new file mode 100644
index 0000000..259643c
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/CQMS/Technique/Rectify.aspx
@@ -0,0 +1,150 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Rectify.aspx.cs" Inherits="FineUIPro.Web.CQMS.Technique.Rectify" %>
+
+
+
+
+
+ 质量隐患
+
+
+
+
+
+
+
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Technique/Rectify.aspx.cs b/SUBQHSE/FineUIPro.Web/CQMS/Technique/Rectify.aspx.cs
new file mode 100644
index 0000000..de35d21
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/CQMS/Technique/Rectify.aspx.cs
@@ -0,0 +1,561 @@
+using BLL;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Web.UI;
+
+namespace FineUIPro.Web.CQMS.Technique
+{
+ public partial class Rectify : PageBase
+ {
+ #region 加载页面
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ Funs.DropDownPageSize(this.ddlPageSize);
+ btnSelectColumns.OnClientClick = Window5.GetShowReference("RectifySelectCloumn.aspx");
+ ////权限按钮方法
+ this.GetButtonPower();
+ InitTreeMenu();
+ }
+ }
+
+ ///
+ /// 绑定数据
+ ///
+ private void BindGrid()
+ {
+ string strSql = @"SELECT RectifyItem.RectifyItemId,RectifyItem.RectifyId,RectifyItem.HazardSourcePoint,(CASE WHEN LEN(RectifyItem.HazardSourcePoint) > 30 THEN LEFT(RectifyItem.HazardSourcePoint,30) + '...' ELSE RectifyItem.HazardSourcePoint END) AS ShortHazardSourcePoint, "
+ + @" RectifyItem.RiskAnalysis,(CASE WHEN LEN(RectifyItem.RiskPrevention) > 30 THEN LEFT(RectifyItem.RiskPrevention,30) + '...' ELSE RectifyItem.RiskPrevention END) AS ShortRiskPrevention,RectifyItem.RiskPrevention, "
+ + @" RectifyItem.SimilarRisk,(CASE WHEN LEN(RectifyItem.SimilarRisk) > 30 THEN LEFT(RectifyItem.SimilarRisk,30) + '...' ELSE RectifyItem.SimilarRisk END) AS ShortSimilarRisk,R.RectifyName,R.RectifyCode,RectifyItem.CompileMan,RectifyItem.CompileDate,"
+ + @" RectifyItem.AuditMan,RectifyItem.AuditDate,RectifyItem.IsPass,U.UserName AS CompileManName,UR.UserName AS AuditManName"
+ + @" FROM dbo.Technique_RectifyItem AS RectifyItem"
+ + @" LEFT JOIN dbo.Technique_Rectify AS R ON R.RectifyId=RectifyItem.RectifyId"
+ + @" LEFT JOIN dbo.Sys_User AS U ON U.UserId=RectifyItem.CompileMan"
+ + @" LEFT JOIN dbo.Sys_User AS UR ON U.UserId=RectifyItem.AuditMan"
+ + @" WHERE RectifyItem.RectifyId=@RectifyId";
+ List listStr = new List
+ {
+ new SqlParameter("@RectifyId", this.trRectify.SelectedNode.NodeID)
+ };
+ if (!string.IsNullOrEmpty(this.RectifyName.Text.Trim()))
+ {
+ strSql += " AND RectifyName LIKE @RectifyName";
+ listStr.Add(new SqlParameter("@RectifyName", "%" + this.RectifyName.Text.Trim() + "%"));
+ }
+ if (!string.IsNullOrEmpty(this.HazardSourcePoint.Text.Trim()))
+ {
+ strSql += " AND HazardSourcePoint LIKE @HazardSourcePoint";
+ listStr.Add(new SqlParameter("@HazardSourcePoint", "%" + this.HazardSourcePoint.Text.Trim() + "%"));
+ }
+
+ SqlParameter[] parameter = listStr.ToArray();
+ DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
+ Grid1.RecordCount = tb.Rows.Count;
+ var table = this.GetPagedDataTable(Grid1, tb);
+
+ Grid1.DataSource = table;
+ Grid1.DataBind();
+ }
+ #endregion
+
+ #region 加载树
+ ///
+ /// 加载树
+ ///
+ private void InitTreeMenu()
+ {
+ this.trRectify.Nodes.Clear();
+ this.trRectify.ShowBorder = false;
+ this.trRectify.ShowHeader = false;
+ this.trRectify.EnableIcons = true;
+ this.trRectify.AutoScroll = true;
+ this.trRectify.EnableSingleClickExpand = true;
+ TreeNode rootNode = new TreeNode
+ {
+ Text = "隐患类型",
+ NodeID = "0",
+ Expanded = true
+ };
+ this.trRectify.Nodes.Add(rootNode);
+ BoundTree(rootNode.Nodes, "0");
+ }
+
+ ///
+ /// 加载树
+ ///
+ ///
+ ///
+ private void BoundTree(TreeNodeCollection nodes, string menuId)
+ {
+ var dt = BLL.RectifyService.GetRectifyBySupRectifyId(menuId,"1");
+ if (dt.Count() > 0)
+ {
+ TreeNode tn = null;
+ foreach (var dr in dt)
+ {
+ tn = new TreeNode
+ {
+ Text = dr.RectifyName,
+ ToolTip = dr.RectifyName,
+ NodeID = dr.RectifyId,
+ EnableClickEvent = true
+ };
+ nodes.Add(tn);
+ BoundTree(tn.Nodes, dr.RectifyId);
+ }
+ }
+ }
+ #endregion
+
+ #region 添加按钮
+ ///
+ /// 添加安全隐患类型按钮
+ ///
+ ///
+ ///
+ protected void btnNew_Click(object sender, EventArgs e)
+ {
+
+ if (this.trRectify.SelectedNode != null)
+ {
+ Model.Technique_Rectify rectify = BLL.RectifyService.GetRectifyById(this.trRectify.SelectedNode.NodeID);
+ if ((rectify != null && rectify.IsEndLever == false) || this.trRectify.SelectedNode.NodeID == "0") //根节点或者非末级节点,可以增加
+ {
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("RectifyEdit.aspx?SupRectifyId={0}", this.trRectify.SelectedNode.NodeID, "编辑 - ")));
+ }
+ else
+ {
+ ShowNotify("选择的项已是末级!", MessageBoxIcon.Success);
+ }
+ }
+ else
+ {
+ ShowNotify("请选择树节点!", MessageBoxIcon.Success);
+ }
+ }
+ #endregion
+
+ #region 修改
+ ///
+ /// 修改安全隐患类型
+ ///
+ ///
+ ///
+ protected void btnEdit_Click(object sender, EventArgs e)
+ {
+ if (this.trRectify.SelectedNode != null)
+ {
+ if (this.trRectify.SelectedNode.NodeID != "0") //非根节点可以编辑
+ {
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("RectifyEdit.aspx?RectifyId={0}", this.trRectify.SelectedNode.NodeID, "编辑 - ")));
+ }
+ else
+ {
+ ShowNotify("根节点无法编辑!", MessageBoxIcon.Warning);
+ }
+ }
+ else
+ {
+ ShowNotify("请选择树节点!", MessageBoxIcon.Warning);
+ }
+ }
+ #endregion
+
+ #region 删除
+ ///
+ /// 删除安全试题类型
+ ///
+ ///
+ ///
+ protected void btnDelete_Click(object sender, EventArgs e)
+ {
+ if (this.trRectify.SelectedNode != null)
+ {
+ var q = BLL.RectifyService.GetRectifyById(this.trRectify.SelectedNode.NodeID);
+
+ if (q != null && BLL.RectifyService.IsDeleteRectify(this.trRectify.SelectedNode.NodeID))
+ {
+ BLL.LogService.AddSys_Log(this.CurrUser, q.RectifyName, q.RectifyId, BLL.Const.CQMSRectifyMenuId, Const.BtnDelete);
+ BLL.RectifyItemService.DeleteRectifyItemByRectifyId(this.trRectify.SelectedNode.NodeID);
+ BLL.RectifyService.DeleteRectify(this.trRectify.SelectedNode.NodeID);
+ InitTreeMenu();
+ }
+ else
+ {
+ ShowNotify("存在下级菜单或已增加资源数据或者为内置项,不允许删除!", MessageBoxIcon.Warning);
+ }
+ }
+ else
+ {
+ ShowNotify("请选择删除项!", MessageBoxIcon.Warning);
+ }
+ }
+ #endregion
+
+ #region Tree点击事件
+ ///
+ /// tree点击事件
+ ///
+ ///
+ ///
+ protected void trRectify_NodeCommand(object sender, TreeCommandEventArgs e)
+ {
+ BindGrid();
+ }
+ #endregion
+
+ #region 文本框查询事件
+ ///
+ /// 查询
+ ///
+ ///
+ ///
+ protected void TextBox_TextChanged(object sender, EventArgs e)
+ {
+ this.BindGrid();
+ BLL.LogService.AddSys_Log(this.CurrUser, string.Empty, string.Empty, BLL.Const.CQMSRectifyMenuId, Const.BtnQuery);
+ }
+ #endregion
+
+ #region 增加明细
+ ///
+ /// 增加安全隐患明细
+ ///
+ ///
+ ///
+ protected void btnNewDetail_Click(object sender, EventArgs e)
+ {
+ if (this.trRectify.SelectedNode != null)
+ {
+ if (this.trRectify.SelectedNode.Nodes.Count == 0)
+ {
+ PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("RectifyItemEdit.aspx?RectifyId={0}", this.trRectify.SelectedNode.NodeID, "编辑 - ")));
+ }
+ else
+ {
+ ShowNotify("请选择末级节点!", MessageBoxIcon.Warning);
+ }
+ }
+ else
+ {
+ ShowNotify("请选择树节点!", MessageBoxIcon.Warning);
+ }
+ }
+ #endregion
+
+ #region 编辑明细
+ ///
+ /// 右键编辑事件
+ ///
+ ///
+ ///
+ protected void btnMenuEdit_Click(object sender, EventArgs e)
+ {
+ this.EditData();
+ }
+
+ ///
+ /// 编辑数据方法
+ ///
+ private void EditData()
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+
+ string rectifyItemId = Grid1.SelectedRowID;
+
+ PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("RectifyItemEdit.aspx?RectifyItemId={0}", rectifyItemId, "编辑 - ")));
+ }
+ #endregion
+
+ #region 删除明细
+ ///
+ /// 右键删除事件
+ ///
+ ///
+ ///
+ protected void btnMenuDelete_Click(object sender, EventArgs e)
+ {
+ this.DeleteData();
+ }
+
+ ///
+ /// 删除方法
+ ///
+ private void DeleteData()
+ {
+ if (Grid1.SelectedRowIndexArray.Length > 0)
+ {
+ foreach (int rowIndex in Grid1.SelectedRowIndexArray)
+ {
+ string rowID = Grid1.DataKeys[rowIndex][0].ToString();
+ if (judgementDelete(rowID, true))
+ {
+ var rectifyItem = BLL.RectifyItemService.GetRectifyItemById(rowID);
+ if (rectifyItem != null)
+ {
+ BLL.LogService.AddSys_Log(this.CurrUser, rectifyItem.HazardSourcePoint, rectifyItem.RectifyItemId, BLL.Const.CQMSRectifyMenuId, Const.BtnDelete);
+ BLL.RectifyItemService.DeleteRectifyItem(rowID);
+ BindGrid();
+ ShowNotify("删除数据成功!");
+ }
+ }
+ }
+ }
+ }
+ #endregion
+
+ #region 表头分页、排序
+ ///
+ /// Grid分页索引改变事件
+ ///
+ ///
+ ///
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ Grid1.PageIndex = e.NewPageIndex;
+ BindGrid();
+ }
+
+ ///
+ /// 分页下拉选择事件
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
+ BindGrid();
+ }
+
+ ///
+ /// Grid1排序
+ ///
+ ///
+ ///
+ protected void Grid1_Sort(object sender, GridSortEventArgs e)
+ {
+ Grid1.SortDirection = e.SortDirection;
+ Grid1.SortField = e.SortField;
+ BindGrid();
+ }
+ #endregion
+
+ #region Grid行双击事件
+ ///
+ /// Grid1行双击事件
+ ///
+ ///
+ ///
+ protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
+ {
+ this.EditData();
+ }
+ #endregion
+
+ #region 关闭弹出框
+ ///
+ /// 关闭弹出窗口1
+ ///
+ ///
+ ///
+ protected void Window1_Close(object sender, WindowCloseEventArgs e)
+ {
+ InitTreeMenu();
+ }
+
+ ///
+ /// 关闭弹出窗口2
+ ///
+ ///
+ ///
+ protected void Window2_Close(object sender, WindowCloseEventArgs e)
+ {
+ BindGrid();
+ }
+ #endregion
+
+ #region 导出
+ ///
+ /// 关闭导出窗口
+ ///
+ ///
+ ///
+ protected void Window5_Close(object sender, WindowCloseEventArgs e)
+ {
+ Response.ClearContent();
+ Response.AddHeader("content-disposition", "attachment; filename=MyExcelFile.xls");
+ Response.ContentType = "application/excel";
+ Response.ContentEncoding = System.Text.Encoding.UTF8;
+ Response.Write(GetGridTableHtml(Grid1, e.CloseArgument.Split('#')));
+ Response.End();
+ }
+
+ ///
+ /// 导出
+ ///
+ ///
+ ///
+ ///
+ private string GetGridTableHtml(Grid grid, string[] columns)
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("");
+ List columnHeaderTexts = new List(columns);
+ List columnIndexs = new List();
+ sb.Append("");
+ sb.Append("");
+ foreach (GridColumn column in grid.Columns)
+ {
+ if (columnHeaderTexts.Contains(column.HeaderText))
+ {
+ sb.AppendFormat("| {0} | ", column.HeaderText);
+ columnIndexs.Add(column.ColumnIndex);
+ }
+ }
+ sb.Append("
");
+ foreach (GridRow row in grid.Rows)
+ {
+ sb.Append("");
+ int columnIndex = 0;
+ foreach (object value in row.Values)
+ {
+ if (columnIndexs.Contains(columnIndex))
+ {
+ string html = value.ToString();
+ if (html.StartsWith(Grid.TEMPLATE_PLACEHOLDER_PREFIX))
+ {
+ // 模板列
+ string templateID = html.Substring(Grid.TEMPLATE_PLACEHOLDER_PREFIX.Length);
+ Control templateCtrl = row.FindControl(templateID);
+ html = GetRenderedHtmlSource(templateCtrl);
+ }
+ //else
+ //{
+ // // 处理CheckBox
+ // if (html.Contains("f-grid-static-checkbox"))
+ // {
+ // if (!html.Contains("f-checked"))
+ // {
+ // html = "×";
+ // }
+ // else
+ // {
+ // html = "√";
+ // }
+ // }
+ // // 处理图片
+ // if (html.Contains("
{0}", html);
+ }
+ columnIndex++;
+ }
+ sb.Append("
");
+ }
+ sb.Append("
");
+ return sb.ToString();
+ }
+
+ ///
+ /// 获取控件渲染后的HTML源代码
+ ///
+ ///
+ ///
+ private string GetRenderedHtmlSource(Control ctrl)
+ {
+ if (ctrl != null)
+ {
+ using (StringWriter sw = new StringWriter())
+ {
+ using (HtmlTextWriter htw = new HtmlTextWriter(sw))
+ {
+ ctrl.RenderControl(htw);
+ return sw.ToString();
+ }
+ }
+ }
+ return String.Empty;
+ }
+ #endregion
+
+ #region 判断是否可删除
+ ///
+ /// 判断是否可以删除
+ ///
+ ///
+ private bool judgementDelete(string id, bool isShow)
+ {
+ string content = string.Empty;
+ //if (Funs.DB.Supervise_SuperviseCheckRectifyItem.FirstOrDefault(x => x.RectifyItemId == id) != null)
+ //{
+ // content = "该安全隐患已在【检查整改】中使用,不能删除!";
+ //}
+ if (string.IsNullOrEmpty(content))
+ {
+ return true;
+ }
+ else
+ {
+ if (isShow)
+ {
+ Alert.ShowInTop(content);
+ }
+ return false;
+ }
+ }
+ #endregion
+
+ #region 获取按钮权限
+ ///
+ /// 获取按钮权限
+ ///
+ ///
+ ///
+ private void GetButtonPower()
+ {
+ var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CQMSRectifyMenuId);
+ if (buttonList.Count() > 0)
+ {
+ if (buttonList.Contains(BLL.Const.BtnAdd))
+ {
+ this.btnNew.Hidden = false;
+ this.btnNewDetail.Hidden = false;
+ }
+ if (buttonList.Contains(BLL.Const.BtnModify))
+ {
+ this.btnEdit.Hidden = false;
+ this.btnMenuEdit.Hidden = false;
+ }
+ if (buttonList.Contains(BLL.Const.BtnDelete))
+ {
+ this.btnDelete.Hidden = false;
+ this.btnMenuDelete.Hidden = false;
+ }
+ if (buttonList.Contains(BLL.Const.BtnOut))
+ {
+ this.btnSelectColumns.Hidden = false;
+ }
+ }
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Technique/Rectify.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/CQMS/Technique/Rectify.aspx.designer.cs
new file mode 100644
index 0000000..a163ba3
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/CQMS/Technique/Rectify.aspx.designer.cs
@@ -0,0 +1,296 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.CQMS.Technique
+{
+
+
+ public partial class Rectify
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// panelLeftRegion 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel panelLeftRegion;
+
+ ///
+ /// Toolbar2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar2;
+
+ ///
+ /// btnNew 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnNew;
+
+ ///
+ /// btnEdit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnEdit;
+
+ ///
+ /// btnDelete 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnDelete;
+
+ ///
+ /// trRectify 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Tree trRectify;
+
+ ///
+ /// panelCenterRegion 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel panelCenterRegion;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar3;
+
+ ///
+ /// RectifyName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox RectifyName;
+
+ ///
+ /// HazardSourcePoint 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox HazardSourcePoint;
+
+ ///
+ /// btnQuery 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnQuery;
+
+ ///
+ /// btnNewDetail 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnNewDetail;
+
+ ///
+ /// btnSelectColumns 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSelectColumns;
+
+ ///
+ /// lblRectifyName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblRectifyName;
+
+ ///
+ /// Label5 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label5;
+
+ ///
+ /// Label4 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label4;
+
+ ///
+ /// Label2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label2;
+
+ ///
+ /// Label3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label3;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+
+ ///
+ /// Window1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window1;
+
+ ///
+ /// Window2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window2;
+
+ ///
+ /// Window5 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window5;
+
+ ///
+ /// Menu1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Menu Menu1;
+
+ ///
+ /// btnMenuEdit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuEdit;
+
+ ///
+ /// btnMenuDelete 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuDelete;
+ }
+}
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyEdit.aspx b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyEdit.aspx
new file mode 100644
index 0000000..ebeb831
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyEdit.aspx
@@ -0,0 +1,51 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RectifyEdit.aspx.cs" Inherits="FineUIPro.Web.CQMS.Technique.RectifyEdit" %>
+
+
+
+
+ 编辑安全隐患类型
+
+
+
+
+
+
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyEdit.aspx.cs b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyEdit.aspx.cs
new file mode 100644
index 0000000..bfc4a7b
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyEdit.aspx.cs
@@ -0,0 +1,148 @@
+using BLL;
+using System;
+using System.Linq;
+
+namespace FineUIPro.Web.CQMS.Technique
+{
+ public partial class RectifyEdit : PageBase
+ {
+ #region 定义变量
+ ///
+ /// 安全隐患主键
+ ///
+ public string RectifyId
+ {
+ get
+ {
+ return (string)ViewState["RectifyId"];
+ }
+ set
+ {
+ ViewState["RectifyId"] = value;
+ }
+ }
+
+ ///
+ /// 上一节点id
+ ///
+ public string SupRectifyId
+ {
+ get
+ {
+ return (string)ViewState["SupRectifyId"];
+ }
+ set
+ {
+ ViewState["SupRectifyId"] = value;
+ }
+ }
+ #endregion
+
+ #region 加载页面
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ btnClose.OnClientClick = ActiveWindow.GetHideReference();
+ ////权限按钮方法
+ this.GetButtonPower();
+ this.drpIsEndLever.DataTextField = "TypeName";
+ drpIsEndLever.DataValueField = "TypeId";
+ drpIsEndLever.DataSource = BLL.TrainingService.GetIsEndLeverList();
+ drpIsEndLever.DataBind();
+
+ this.RectifyId = Request.Params["RectifyId"];
+ this.SupRectifyId = Request.Params["SupRectifyId"];
+ if (!string.IsNullOrEmpty(this.RectifyId))
+ {
+ Model.Technique_Rectify rectify = BLL.RectifyService.GetRectifyById(this.RectifyId);
+ if (rectify != null)
+ {
+ this.txtRectifyCode.Text = rectify.RectifyCode;
+ this.txtRectifyName.Text = rectify.RectifyName;
+ if (rectify.IsEndLever == true)
+ {
+ this.drpIsEndLever.SelectedValue = "true";
+ }
+ else
+ {
+ this.drpIsEndLever.SelectedValue = "false";
+ }
+ }
+ }
+ }
+ }
+ #endregion
+
+ #region 保存
+ ///
+ /// 保存按钮
+ ///
+ ///
+ ///
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ Model.Technique_Rectify rectify = new Model.Technique_Rectify
+ {
+ RectifyType = "1",//质量
+ RectifyCode = this.txtRectifyCode.Text.Trim(),
+ RectifyName = this.txtRectifyName.Text.Trim()
+ };
+ if (this.drpIsEndLever.SelectedValue == "true")
+ {
+ rectify.IsEndLever = true;
+ }
+ else
+ {
+ rectify.IsEndLever = false;
+ }
+ if (string.IsNullOrEmpty(this.RectifyId))
+ {
+ rectify.SupRectifyId = this.SupRectifyId;
+ rectify.RectifyId = SQLHelper.GetNewID(typeof(Model.Technique_Rectify));
+ BLL.RectifyService.AddRectify(rectify);
+
+ BLL.LogService.AddSys_Log(this.CurrUser, rectify.RectifyName, rectify.RectifyId, BLL.Const.CQMSRectifyMenuId, Const.BtnAdd);
+ }
+ else
+ {
+ Model.Technique_Rectify r = BLL.RectifyService.GetRectifyById(this.RectifyId);
+ if (r != null)
+ {
+ rectify.SupRectifyId = r.SupRectifyId;
+ }
+ rectify.RectifyId = this.RectifyId;
+ BLL.RectifyService.UpdateRectify(rectify);
+
+ BLL.LogService.AddSys_Log(this.CurrUser, rectify.RectifyName, rectify.RectifyId, BLL.Const.CQMSRectifyMenuId, Const.BtnModify);
+ }
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
+ }
+ #endregion
+
+ #region 获取按钮权限
+ ///
+ /// 获取按钮权限
+ ///
+ ///
+ ///
+ private void GetButtonPower()
+ {
+ var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CQMSRectifyMenuId);
+ if (buttonList.Count() > 0)
+ {
+
+ if (buttonList.Contains(BLL.Const.BtnSave))
+ {
+ this.btnSave.Hidden = false;
+ }
+ }
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyEdit.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyEdit.aspx.designer.cs
new file mode 100644
index 0000000..8d92276
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyEdit.aspx.designer.cs
@@ -0,0 +1,98 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.CQMS.Technique
+{
+
+
+ public partial class RectifyEdit
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// txtRectifyCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtRectifyCode;
+
+ ///
+ /// txtRectifyName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtRectifyName;
+
+ ///
+ /// drpIsEndLever 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpIsEndLever;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+
+ ///
+ /// btnClose 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnClose;
+ }
+}
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyItemEdit.aspx b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyItemEdit.aspx
new file mode 100644
index 0000000..80fdaa7
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyItemEdit.aspx
@@ -0,0 +1,61 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RectifyItemEdit.aspx.cs"
+ Async="true" Inherits="FineUIPro.Web.CQMS.Technique.RectifyItemEdit" %>
+
+
+
+
+ 隐患详细
+
+
+
+
+
+
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyItemEdit.aspx.cs b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyItemEdit.aspx.cs
new file mode 100644
index 0000000..77dfadc
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyItemEdit.aspx.cs
@@ -0,0 +1,164 @@
+using BLL;
+using System;
+using System.Linq;
+
+namespace FineUIPro.Web.CQMS.Technique
+{
+ public partial class RectifyItemEdit : PageBase
+ {
+ #region 定义变量
+ ///
+ /// 质量隐患主键
+ ///
+ public string RectifyId
+ {
+ get
+ {
+ return (string)ViewState["RectifyId"];
+ }
+ set
+ {
+ ViewState["RectifyId"] = value;
+ }
+ }
+
+ ///
+ /// 质量隐患明细主键
+ ///
+ public string RectifyItemId
+ {
+ get
+ {
+ return (string)ViewState["RectifyItemId"];
+ }
+ set
+ {
+ ViewState["RectifyItemId"] = value;
+ }
+ }
+ #endregion
+
+ #region 加载页面
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ ////权限按钮方法
+ this.GetButtonPower();
+ this.RectifyId = Request.Params["RectifyId"];
+ this.RectifyItemId = Request.Params["RectifyItemId"];
+ if (!string.IsNullOrEmpty(this.RectifyItemId))
+ {
+ var rectifyItem = BLL.RectifyItemService.GetRectifyItemById(this.RectifyItemId);
+ if (rectifyItem != null)
+ {
+ if (!string.IsNullOrEmpty(rectifyItem.RectifyId))
+ {
+ var rectify = BLL.RectifyService.GetRectifyById(rectifyItem.RectifyId);
+ if (rectify != null)
+ {
+ this.lblRectifyName.Text = rectify.RectifyName;
+ }
+ }
+ this.txtHazardSourcePoint.Text = rectifyItem.HazardSourcePoint;
+ this.txtRiskAnalysis.Text = rectifyItem.RiskAnalysis;
+ this.txtRiskPrevention.Text = rectifyItem.RiskPrevention;
+ this.txtSimilarRisk.Text = rectifyItem.SimilarRisk;
+ }
+ }
+ else
+ {
+ if (!string.IsNullOrEmpty(this.RectifyId))
+ {
+ var rectify = BLL.RectifyService.GetRectifyById(this.RectifyId);
+ if (rectify != null)
+ {
+ this.lblRectifyName.Text = rectify.RectifyName;
+ }
+ }
+ }
+ }
+ }
+ #endregion
+
+ #region 保存
+ ///
+ /// 保存数据
+ ///
+ private void SaveData()
+ {
+ Model.Technique_RectifyItem rectifyItem = new Model.Technique_RectifyItem
+ {
+ HazardSourcePoint = this.txtHazardSourcePoint.Text.Trim(),
+ RiskAnalysis = this.txtRiskAnalysis.Text.Trim(),
+ RiskPrevention = this.txtRiskPrevention.Text.Trim(),
+ SimilarRisk = this.txtSimilarRisk.Text.Trim(),
+ };
+ if (string.IsNullOrEmpty(this.RectifyItemId))
+ {
+ rectifyItem.CompileMan = this.CurrUser.UserName;
+ rectifyItem.UnitId = String.IsNullOrEmpty(this.CurrUser.UnitId) ? CommonService.GetMainProjectUnitId(this.CurrUser.LoginProjectId) : this.CurrUser.UnitId;
+ rectifyItem.CompileDate = DateTime.Now;
+ rectifyItem.IsPass = true;
+ rectifyItem.RectifyItemId = SQLHelper.GetNewID(typeof(Model.Technique_RectifyItem));
+ RectifyItemId = rectifyItem.RectifyItemId;
+ rectifyItem.RectifyId = this.RectifyId;
+ BLL.RectifyItemService.AddRectifyItem(rectifyItem);
+ BLL.LogService.AddSys_Log(this.CurrUser, rectifyItem.HazardSourcePoint, rectifyItem.RectifyItemId, BLL.Const.CQMSRectifyMenuId, Const.BtnAdd);
+ }
+ else
+ {
+ rectifyItem.RectifyItemId = this.RectifyItemId;
+ Model.Technique_RectifyItem r = BLL.RectifyItemService.GetRectifyItemById(this.RectifyId);
+ if (r != null)
+ {
+ rectifyItem.RectifyId = r.RectifyId;
+ }
+ BLL.RectifyItemService.UpdateRectifyItem(rectifyItem);
+ BLL.LogService.AddSys_Log(this.CurrUser, rectifyItem.HazardSourcePoint, rectifyItem.RectifyItemId, BLL.Const.CQMSRectifyMenuId, Const.BtnModify);
+ }
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
+ }
+
+ ///
+ /// 保存按钮
+ ///
+ ///
+ ///
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ SaveData();
+ }
+ #endregion
+
+ #region 获取按钮权限
+ ///
+ /// 获取按钮权限
+ ///
+ ///
+ ///
+ private void GetButtonPower()
+ {
+ if (Request.Params["value"] == "0")
+ {
+ return;
+ }
+
+ var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CQMSRectifyMenuId);
+ if (buttonList.Count() > 0)
+ {
+
+ if (buttonList.Contains(BLL.Const.BtnSave))
+ {
+ this.btnSave.Hidden = false;
+ }
+ }
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyItemEdit.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyItemEdit.aspx.designer.cs
new file mode 100644
index 0000000..16f5613
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifyItemEdit.aspx.designer.cs
@@ -0,0 +1,116 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.CQMS.Technique
+{
+
+
+ public partial class RectifyItemEdit
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// lblRectifyName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label lblRectifyName;
+
+ ///
+ /// txtHazardSourcePoint 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtHazardSourcePoint;
+
+ ///
+ /// txtRiskAnalysis 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtRiskAnalysis;
+
+ ///
+ /// txtRiskPrevention 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtRiskPrevention;
+
+ ///
+ /// txtSimilarRisk 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtSimilarRisk;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+
+ ///
+ /// btnClose 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnClose;
+ }
+}
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifySelectCloumn.aspx b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifySelectCloumn.aspx
new file mode 100644
index 0000000..600dd4f
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifySelectCloumn.aspx
@@ -0,0 +1,38 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RectifySelectCloumn.aspx.cs" Inherits="FineUIPro.Web.CQMS.Technique.RectifySelectCloumn" %>
+
+
+
+
+
+ 质量隐患导出选择列
+
+
+
+
+
+
+
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifySelectCloumn.aspx.cs b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifySelectCloumn.aspx.cs
new file mode 100644
index 0000000..03eb713
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifySelectCloumn.aspx.cs
@@ -0,0 +1,62 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.CQMS.Technique
+{
+ public partial class RectifySelectCloumn : PageBase
+ {
+ #region 加载页面
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ ////权限按钮方法
+ this.GetButtonPower();
+ btnClose.OnClientClick = ActiveWindow.GetHideReference();
+ }
+ }
+ #endregion
+
+ #region 导出
+ ///
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnImport_Click(object sender, EventArgs e)
+ {
+ // 1. 这里放置保存窗体中数据的逻辑
+ // 2. 关闭本窗体,然后回发父窗体
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference(String.Join("#", cblColumns.SelectedValueArray)));
+ }
+ #endregion
+
+ #region 获取按钮权限
+ ///
+ /// 获取按钮权限
+ ///
+ ///
+ ///
+ private void GetButtonPower()
+ {
+ var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.CQMSRectifyMenuId);
+ if (buttonList.Count() > 0)
+ {
+ if (buttonList.Contains(BLL.Const.BtnOut))
+ {
+ this.btnImport.Hidden = false;
+ }
+ }
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifySelectCloumn.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifySelectCloumn.aspx.designer.cs
new file mode 100644
index 0000000..9b90b09
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/CQMS/Technique/RectifySelectCloumn.aspx.designer.cs
@@ -0,0 +1,80 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.CQMS.Technique
+{
+
+
+ public partial class RectifySelectCloumn
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// btnClose 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnClose;
+
+ ///
+ /// btnImport 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnImport;
+
+ ///
+ /// cblColumns 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.CheckBoxList cblColumns;
+ }
+}
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/WBS/ControlPoint.aspx.cs b/SUBQHSE/FineUIPro.Web/CQMS/WBS/ControlPoint.aspx.cs
index 2079d86..ee6e47c 100644
--- a/SUBQHSE/FineUIPro.Web/CQMS/WBS/ControlPoint.aspx.cs
+++ b/SUBQHSE/FineUIPro.Web/CQMS/WBS/ControlPoint.aspx.cs
@@ -949,11 +949,15 @@ namespace FineUIPro.Web.CQMS.WBS
}
else if (CheckAcceptType.ToString() == "4")
{
- name = "单位工程一次验收";
+ name = "单位工程验收";
}
else if (CheckAcceptType.ToString() == "5")
{
- name = "材料进场复验";
+ name = "分部工程验收";
+ }
+ else if (CheckAcceptType.ToString() == "6")
+ {
+ name = "分项工程验收";
}
}
return name;
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdown.aspx b/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdown.aspx
index b765044..0217ecf 100644
--- a/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdown.aspx
+++ b/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdown.aspx
@@ -46,11 +46,12 @@
-
-
-
-
-
+
+
+
+
+
+
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdown.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdown.aspx.designer.cs
index c711f7b..3c2dbce 100644
--- a/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdown.aspx.designer.cs
+++ b/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdown.aspx.designer.cs
@@ -1,239 +1,241 @@
//------------------------------------------------------------------------------
-// <自动生成>
-// 此代码由工具生成。
+//
+// This code was generated by a tool.
//
-// 对此文件的更改可能导致不正确的行为,如果
-// 重新生成代码,则所做更改将丢失。
-// 自动生成>
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
//------------------------------------------------------------------------------
-namespace FineUIPro.Web.CQMS.WBS {
-
-
- public partial class EditBreakdown {
-
+namespace FineUIPro.Web.CQMS.WBS
+{
+
+
+ public partial class EditBreakdown
+ {
+
///
- /// form1 控件。
+ /// form1 control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
+
///
- /// PageManager1 控件。
+ /// PageManager1 control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.PageManager PageManager1;
-
+
///
- /// SimpleForm1 控件。
+ /// SimpleForm1 control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.Form SimpleForm1;
-
+
///
- /// txtBreakdownCode 控件。
+ /// txtBreakdownCode control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.TextBox txtBreakdownCode;
-
+
///
- /// txtBreakdownName 控件。
+ /// txtBreakdownName control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.TextBox txtBreakdownName;
-
+
///
- /// txtBasis 控件。
+ /// txtBasis control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.TextArea txtBasis;
-
+
///
- /// txtCheckPoints 控件。
+ /// txtCheckPoints control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.TextArea txtCheckPoints;
-
+
///
- /// txtRecordAndCode 控件。
+ /// txtRecordAndCode control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.TextArea txtRecordAndCode;
-
+
///
- /// txtClass 控件。
+ /// txtClass control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.TextBox txtClass;
-
+
///
- /// drpCheckAcceptType 控件。
+ /// drpCheckAcceptType control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.DropDownList drpCheckAcceptType;
-
+
///
- /// tr1 控件。
+ /// tr1 control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.FormRow tr1;
-
+
///
- /// FenBao 控件。
+ /// FenBao control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.TextBox FenBao;
-
+
///
- /// tr2 控件。
+ /// tr2 control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.FormRow tr2;
-
+
///
- /// WuHuan 控件。
+ /// WuHuan control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.TextBox WuHuan;
-
+
///
- /// tr3 控件。
+ /// tr3 control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.FormRow tr3;
-
+
///
- /// JianLi 控件。
+ /// JianLi control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.TextBox JianLi;
-
+
///
- /// tr4 控件。
+ /// tr4 control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.FormRow tr4;
-
+
///
- /// YeZhu 控件。
+ /// YeZhu control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.TextBox YeZhu;
-
+
///
- /// txtSortIndex 控件。
+ /// txtSortIndex control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.NumberBox txtSortIndex;
-
+
///
- /// txtRemark 控件。
+ /// txtRemark control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.TextArea txtRemark;
-
+
///
- /// rblIsAcceptance 控件。
+ /// rblIsAcceptance control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.RadioButtonList rblIsAcceptance;
-
+
///
- /// Toolbar1 控件。
+ /// Toolbar1 control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.Toolbar Toolbar1;
-
+
///
- /// btnAttachUrl 控件。
+ /// btnAttachUrl control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.Button btnAttachUrl;
-
+
///
- /// btnSave 控件。
+ /// btnSave control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.Button btnSave;
-
+
///
- /// WindowAtt 控件。
+ /// WindowAtt control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.Window WindowAtt;
}
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdownProject.aspx b/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdownProject.aspx
index 4e60027..b1f595a 100644
--- a/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdownProject.aspx
+++ b/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdownProject.aspx
@@ -46,11 +46,12 @@
-
-
-
-
-
+
+
+
+
+
+
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdownProject.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdownProject.aspx.designer.cs
index 939f238..7a5cbd6 100644
--- a/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdownProject.aspx.designer.cs
+++ b/SUBQHSE/FineUIPro.Web/CQMS/WBS/EditBreakdownProject.aspx.designer.cs
@@ -1,239 +1,241 @@
//------------------------------------------------------------------------------
-// <自动生成>
-// 此代码由工具生成。
+//
+// This code was generated by a tool.
//
-// 对此文件的更改可能导致不正确的行为,如果
-// 重新生成代码,则所做更改将丢失。
-// 自动生成>
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
//------------------------------------------------------------------------------
-namespace FineUIPro.Web.CQMS.WBS {
-
-
- public partial class EditBreakdownProject {
-
+namespace FineUIPro.Web.CQMS.WBS
+{
+
+
+ public partial class EditBreakdownProject
+ {
+
///
- /// form1 控件。
+ /// form1 control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
+
///
- /// PageManager1 控件。
+ /// PageManager1 control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.PageManager PageManager1;
-
+
///
- /// SimpleForm1 控件。
+ /// SimpleForm1 control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.Form SimpleForm1;
-
+
///
- /// txtBreakdownCode 控件。
+ /// txtBreakdownCode control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.TextBox txtBreakdownCode;
-
+
///
- /// txtBreakdownName 控件。
+ /// txtBreakdownName control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.TextBox txtBreakdownName;
-
+
///
- /// txtBasis 控件。
+ /// txtBasis control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.TextArea txtBasis;
-
+
///
- /// txtCheckPoints 控件。
+ /// txtCheckPoints control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.TextArea txtCheckPoints;
-
+
///
- /// txtRecordAndCode 控件。
+ /// txtRecordAndCode control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.TextArea txtRecordAndCode;
-
+
///
- /// txtClass 控件。
+ /// txtClass control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.TextBox txtClass;
-
+
///
- /// drpCheckAcceptType 控件。
+ /// drpCheckAcceptType control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.DropDownList drpCheckAcceptType;
-
+
///
- /// tr1 控件。
+ /// tr1 control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.FormRow tr1;
-
+
///
- /// FenBao 控件。
+ /// FenBao control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.TextBox FenBao;
-
+
///
- /// tr2 控件。
+ /// tr2 control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.FormRow tr2;
-
+
///
- /// WuHuan 控件。
+ /// WuHuan control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.TextBox WuHuan;
-
+
///
- /// tr3 控件。
+ /// tr3 control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.FormRow tr3;
-
+
///
- /// JianLi 控件。
+ /// JianLi control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.TextBox JianLi;
-
+
///
- /// tr4 控件。
+ /// tr4 control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.FormRow tr4;
-
+
///
- /// YeZhu 控件。
+ /// YeZhu control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.TextBox YeZhu;
-
+
///
- /// txtSortIndex 控件。
+ /// txtSortIndex control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.NumberBox txtSortIndex;
-
+
///
- /// txtRemark 控件。
+ /// txtRemark control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.TextArea txtRemark;
-
+
///
- /// rblIsAcceptance 控件。
+ /// rblIsAcceptance control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.RadioButtonList rblIsAcceptance;
-
+
///
- /// Toolbar1 控件。
+ /// Toolbar1 control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.Toolbar Toolbar1;
-
+
///
- /// btnAttachUrl 控件。
+ /// btnAttachUrl control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.Button btnAttachUrl;
-
+
///
- /// btnSave 控件。
+ /// btnSave control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.Button btnSave;
-
+
///
- /// WindowAtt 控件。
+ /// WindowAtt control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.Window WindowAtt;
}
diff --git a/SUBQHSE/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx b/SUBQHSE/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx
index a0ba5c0..3425754 100644
--- a/SUBQHSE/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx
+++ b/SUBQHSE/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx
@@ -1,12 +1,10 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectControlPoint.aspx.cs" Inherits="FineUIPro.Web.CQMS.WBS.ProjectControlPoint" %>
-
-<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
-
+<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
-
+
现场控制点裁剪
+
+
+
+
+
+
diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/DataSync/PersonnelChangeRecord.aspx.cs b/SUBQHSE/FineUIPro.Web/ZHGL/DataSync/PersonnelChangeRecord.aspx.cs
new file mode 100644
index 0000000..9bed1bb
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/ZHGL/DataSync/PersonnelChangeRecord.aspx.cs
@@ -0,0 +1,192 @@
+using BLL;
+using FineUIPro.Web.Controls;
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Data.SqlClient;
+using System.Linq;
+using System.Text;
+using AspNet = System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.ZHGL.DataSync
+{
+ public partial class PersonnelChangeRecord : PageBase
+ {
+ #region 项目主键
+ ///
+ /// 项目主键
+ ///
+ public string ProjectId
+ {
+ get
+ {
+ return (string)ViewState["ProjectId"];
+ }
+ set
+ {
+ ViewState["ProjectId"] = value;
+ }
+ }
+ #endregion
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
+ {
+ this.ProjectId = Request.Params["projectId"];
+ }
+ this.ucTree.UnitId = this.CurrUser.UnitId;
+ this.ucTree.ProjectId = this.ProjectId;
+
+ if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
+ {
+ this.panelLeftRegion.Hidden = true;
+ }
+ Funs.DropDownPageSize(this.ddlPageSize);
+ ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
+ // 绑定表格
+ BindGrid();
+ }
+ }
+
+ protected void changeTree(object sender, EventArgs e)
+ {
+ this.ProjectId = this.ucTree.ProjectId;
+ this.BindGrid();
+ }
+
+ public void BindGrid()
+ {
+ string strSql = @"SELECT a.ProjectPersonnelChangeRecordId,a.ProjectId,a.RoleId,a.Remarks,a.UserId,a.StartTime,a.EndTime,b.UserName,c.RoleName "
+ + @" FROM Project_PersonnelChangeRecord a "
+ + @" LEFT JOIN Sys_Role c on a.RoleId=c.RoleId "
+ + @" LEFT JOIN Sys_User b on a.UserId=b.UserId WHERE ";
+ List listStr = new List();
+ if (!string.IsNullOrWhiteSpace(this.ProjectId))
+ {
+ strSql += " a.ProjectId = @ProjectId";
+ listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
+ }
+ else
+ {
+ strSql += " 1<>1 ";
+ }
+ if (!string.IsNullOrWhiteSpace(this.txtUserName.Text))
+ {
+ strSql += " AND b.UserName = @UserName";
+ listStr.Add(new SqlParameter("@UserName", this.txtUserName.Text));
+ }
+
+ SqlParameter[] parameter = listStr.ToArray();
+ DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
+
+ Grid1.RecordCount = tb.Rows.Count;
+ var table = this.GetPagedDataTable(Grid1, tb);
+ Grid1.DataSource = table;
+ Grid1.DataBind();
+ }
+ #region 分页 排序
+ ///
+ /// 改变索引事件
+ ///
+ ///
+ ///
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ BindGrid();
+ }
+
+ ///
+ /// 分页下拉选择事件
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue);
+ BindGrid();
+ }
+
+ ///
+ /// 排序
+ ///
+ ///
+ ///
+ protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
+ {
+ this.BindGrid();
+ }
+ #endregion
+
+ #region 查询
+ ///
+ /// 查询
+ ///
+ ///
+ ///
+ protected void TextBox_TextChanged(object sender, EventArgs e)
+ {
+ this.BindGrid();
+ }
+ #endregion
+
+
+ #region 导出按钮
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ Response.ClearContent();
+ string filename = Funs.GetNewFileName();
+ Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("人员变动记录" + filename, System.Text.Encoding.UTF8) + ".xls");
+ Response.ContentType = "application/excel";
+ Response.ContentEncoding = System.Text.Encoding.UTF8;
+ this.Grid1.PageSize = 500;
+ this.BindGrid();
+ Response.Write(GetGridTableHtml(Grid1));
+ Response.End();
+ }
+
+ ///
+ /// 导出方法
+ ///
+ ///
+ ///
+ private string GetGridTableHtml(Grid grid)
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("");
+ sb.Append("");
+ sb.Append("");
+ foreach (GridColumn column in grid.Columns)
+ {
+ sb.AppendFormat("| {0} | ", column.HeaderText);
+ }
+ sb.Append("
");
+ foreach (GridRow row in grid.Rows)
+ {
+ sb.Append("");
+ foreach (GridColumn column in grid.Columns)
+ {
+ string html = row.Values[column.ColumnIndex].ToString();
+ if (column.ColumnID == "tfNumber")
+ {
+ html = (row.FindControl("lblNumber") as AspNet.Label).Text;
+ }
+ sb.AppendFormat("| {0} | ", html);
+ }
+
+ sb.Append("
");
+ }
+
+ sb.Append("
");
+
+ return sb.ToString();
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/DataSync/PersonnelChangeRecord.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ZHGL/DataSync/PersonnelChangeRecord.aspx.designer.cs
new file mode 100644
index 0000000..7bf4416
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/ZHGL/DataSync/PersonnelChangeRecord.aspx.designer.cs
@@ -0,0 +1,152 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.ZHGL.DataSync
+{
+
+
+ public partial class PersonnelChangeRecord
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// panelLeftRegion 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel panelLeftRegion;
+
+ ///
+ /// ContentPanel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ContentPanel ContentPanel1;
+
+ ///
+ /// ucTree 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
+
+ ///
+ /// panelCenterRegion 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel panelCenterRegion;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// ToolSearch 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar ToolSearch;
+
+ ///
+ /// txtUserName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtUserName;
+
+ ///
+ /// btnSearch 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSearch;
+
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
+ ///
+ /// lblNumber 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblNumber;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+ }
+}
diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx
index ba9be4c..09d4b09 100644
--- a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx
+++ b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx
@@ -27,8 +27,8 @@
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="90px"
LabelAlign="right">
- <%--
- --%>
+
+
diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.cs b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.cs
index 7aa2074..b8ac6e6 100644
--- a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.cs
+++ b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.cs
@@ -40,12 +40,13 @@ namespace FineUIPro.Web.ZHGL.Emergency
{
////权限按钮方法
this.GetButtonPower();
- var thisUnit = CommonService.GetIsThisUnit();
- if (thisUnit != null)
- {
- this.UnitId = thisUnit.UnitId;
- }
-
+ //var thisUnit = CommonService.GetIsThisUnit();
+ //if (thisUnit != null)
+ //{
+ // this.UnitId = thisUnit.UnitId;
+ //}
+
+ BLL.UnitService.InitBranchUnitDropDownList(this.drpUnitId, true);
this.btnNew.OnClientClick = Window1.GetShowReference("DrillRecordListEdit.aspx") + "return false;";
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
{
@@ -70,16 +71,21 @@ namespace FineUIPro.Web.ZHGL.Emergency
+ @" LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId"
+ @" LEFT JOIN Sys_User AS Users ON DrillRecordList.CompileMan=Users.UserId WHERE 1=1 ";
List listStr = new List();
- strSql += " AND DrillRecordList.UnitIds =@UnitId";
+ //strSql += " AND DrillRecordList.UnitIds =@UnitId";
if (!string.IsNullOrEmpty(this.UnitId)) ///是否文件柜查看页面传项目值
{
- listStr.Add(new SqlParameter("@UnitId", this.UnitId));
+ //listStr.Add(new SqlParameter("@UnitId", this.UnitId));
strSql += " AND DrillRecordList.States = @States"; ///状态为已完成
listStr.Add(new SqlParameter("@States", BLL.Const.State_2));
}
else
{
- listStr.Add(new SqlParameter("@UnitId", this.UnitId));
+ //listStr.Add(new SqlParameter("@UnitId", this.UnitId));
+ }
+ if (this.drpUnitId.SelectedValue != BLL.Const._Null)
+ {
+ strSql += " AND DrillRecordList.UnitIds = @UnitId";
+ listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim()));
}
if (!string.IsNullOrEmpty(this.txtDrillRecordCode.Text.Trim()))
@@ -307,6 +313,10 @@ namespace FineUIPro.Web.ZHGL.Emergency
this.btnMenuDelete.Hidden = false;
}
}
+ //if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
+ //{
+ // btnNew.Hidden = true;
+ //}
}
#endregion
}
diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.designer.cs
index 08d9644..e9aa1d9 100644
--- a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.designer.cs
+++ b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordList.aspx.designer.cs
@@ -68,6 +68,15 @@ namespace FineUIPro.Web.ZHGL.Emergency
///
protected global::FineUIPro.TextBox txtDrillRecordCode;
+ ///
+ /// drpUnitId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpUnitId;
+
///
/// txtDrillRecordName 控件。
///
diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx
index cd13316..f055fd9 100644
--- a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx
+++ b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx
@@ -31,9 +31,11 @@
-
-
+ --%>
+
+
diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.cs b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.cs
index 59416fa..55b6644 100644
--- a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.cs
+++ b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.cs
@@ -21,17 +21,17 @@ namespace FineUIPro.Web.ZHGL.Emergency
ViewState["DrillRecordListId"] = value;
}
}
- public string UnitId
- {
- get
- {
- return (string)ViewState["UnitId"];
- }
- set
- {
- ViewState["UnitId"] = value;
- }
- }
+ //public string UnitId
+ //{
+ // get
+ // {
+ // return (string)ViewState["UnitId"];
+ // }
+ // set
+ // {
+ // ViewState["UnitId"] = value;
+ // }
+ //}
#endregion
#region 加载
@@ -59,7 +59,11 @@ namespace FineUIPro.Web.ZHGL.Emergency
{
this.drpDrillRecordType.SelectedValue = DrillRecordList.DrillRecordType;
}
- this.txtUnit.Text = DrillRecordList.UnitNames;
+ //this.txtUnit.Text = DrillRecordList.UnitNames;
+ if (!string.IsNullOrEmpty(DrillRecordList.UnitIds))
+ {
+ this.drpUnit.SelectedValue = DrillRecordList.UnitIds;
+ }
this.txtDrillRecordDate.Text = string.Format("{0:yyyy-MM-dd}", DrillRecordList.DrillRecordDate);
if (DrillRecordList.JointPersonNum != null)
{
@@ -81,9 +85,11 @@ namespace FineUIPro.Web.ZHGL.Emergency
// this.txtDrillRecordContents.Text = HttpUtility.HtmlDecode(codeTemplateRule.Template);
//}
+ var thisUnit = BLL.CommonService.GetIsThisUnit();
////自动生成编码
- this.txtDrillRecordCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.UnitDrillRecordListMenuId, null, this.UnitId);
+ this.txtDrillRecordCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.UnitDrillRecordListMenuId, null, thisUnit.UnitId);
this.txtDrillRecordName.Text = this.SimpleForm1.Title;
+ this.drpUnit.SelectedValue = thisUnit.UnitId;
}
///初始化审核菜单
@@ -100,12 +106,13 @@ namespace FineUIPro.Web.ZHGL.Emergency
private void InitDropDownList()
{
//BLL.UnitService.InitUnitDropDownList(this.drpUnits, this.ProjectId, false);
- var thisUnit = CommonService.GetIsThisUnit();
- if (thisUnit != null)
- {
- this.txtUnit.Text = thisUnit.UnitName;
- this.UnitId = thisUnit.UnitId;
- }
+ //var thisUnit = CommonService.GetIsThisUnit();
+ //if (thisUnit != null)
+ //{
+ // this.txtUnit.Text = thisUnit.UnitName;
+ // this.UnitId = thisUnit.UnitId;
+ //}
+ BLL.UnitService.InitBranchUnitDropDownList(this.drpUnit, false);
BLL.ConstValue.InitConstValueDropDownList(this.drpDrillRecordType, BLL.ConstValue.Group_DrillRecordType, false);
}
#endregion
@@ -155,8 +162,10 @@ namespace FineUIPro.Web.ZHGL.Emergency
DrillCost = Funs.GetNewDecimalOrZero(this.txtDrillCost.Text.Trim())
};
//参与单位
- DrillRecordList.UnitIds = this.UnitId;
- DrillRecordList.UnitNames = this.txtUnit.Text;
+ //DrillRecordList.UnitIds = this.UnitId;
+ //DrillRecordList.UnitNames = this.txtUnit.Text;
+ DrillRecordList.UnitIds = this.drpUnit.SelectedValue;
+ DrillRecordList.UnitNames = this.drpUnit.SelectedText;
////单据状态
DrillRecordList.States = BLL.Const.State_2;
diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.designer.cs
index f88b04c..6a72a7f 100644
--- a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.designer.cs
+++ b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/DrillRecordListEdit.aspx.designer.cs
@@ -69,13 +69,13 @@ namespace FineUIPro.Web.ZHGL.Emergency
protected global::FineUIPro.DatePicker txtDrillRecordDate;
///
- /// txtUnit 控件。
+ /// drpUnit 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.TextBox txtUnit;
+ protected global::FineUIPro.DropDownList drpUnit;
///
/// drpDrillRecordType 控件。
diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx
index 883e576..0baa3a5 100644
--- a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx
+++ b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx
@@ -24,8 +24,8 @@
AutoPostBack="true" OnTextChanged="TextBox_TextChanged" Width="250px" LabelWidth="90px"
LabelAlign="right">
- <%--
- --%>
+
+
diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.cs b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.cs
index 921e259..d71ba3f 100644
--- a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.cs
+++ b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.cs
@@ -37,12 +37,13 @@ namespace FineUIPro.Web.ZHGL.Emergency
Funs.DropDownPageSize(this.ddlPageSize);
////权限按钮方法
this.GetButtonPower();
- var thisUnit = CommonService.GetIsThisUnit();
- if (thisUnit != null)
- {
- this.UnitId = thisUnit.UnitId;
- }
-
+ //var thisUnit = CommonService.GetIsThisUnit();
+ //if (thisUnit != null)
+ //{
+ // this.UnitId = thisUnit.UnitId;
+ //}
+
+ BLL.UnitService.InitBranchUnitDropDownList(this.drpUnitId, true);
//BLL.UnitService.InitUnitDropDownList(this.drpUnitId, this.ProjectId, true);
//if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
//{
@@ -76,16 +77,16 @@ namespace FineUIPro.Web.ZHGL.Emergency
+ @" LEFT JOIN Sys_User AS ApproveMan ON ApproveMan.UserId=EmergencyList.ApproveMan"
+ @" LEFT JOIN Sys_User AS Users ON EmergencyList.CompileMan=Users.UserId WHERE 1=1 ";
List listStr = new List();
- strSql += " AND EmergencyList.UnitId = @UnitId";
+ //strSql += " AND EmergencyList.UnitId = @UnitId";
if (!string.IsNullOrEmpty(this.UnitId)) ///是否文件柜查看页面传项目值
{
- listStr.Add(new SqlParameter("@UnitId", this.UnitId));
+ //listStr.Add(new SqlParameter("@UnitId", this.UnitId));
strSql += " AND EmergencyList.States = @States"; ///状态为已完成
listStr.Add(new SqlParameter("@States", BLL.Const.State_2));
}
else
{
- listStr.Add(new SqlParameter("@UnitId", this.UnitId));
+ //listStr.Add(new SqlParameter("@UnitId", this.UnitId));
}
if (!string.IsNullOrEmpty(this.txtEmergencyCode.Text.Trim()))
@@ -93,11 +94,11 @@ namespace FineUIPro.Web.ZHGL.Emergency
strSql += " AND EmergencyCode LIKE @EmergencyCode";
listStr.Add(new SqlParameter("@EmergencyCode", "%" + this.txtEmergencyCode.Text.Trim() + "%"));
}
- //if (this.drpUnitId.SelectedValue != BLL.Const._Null)
- //{
- // strSql += " AND EmergencyList.UnitId = @UnitId";
- // listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim()));
- //}
+ if (this.drpUnitId.SelectedValue != BLL.Const._Null)
+ {
+ strSql += " AND EmergencyList.UnitId = @UnitId";
+ listStr.Add(new SqlParameter("@UnitId", this.drpUnitId.SelectedValue.Trim()));
+ }
if (!string.IsNullOrEmpty(this.txtEmergencyName.Text.Trim()))
{
strSql += " AND EmergencyList.EmergencyName LIKE @EmergencyName";
@@ -260,6 +261,12 @@ namespace FineUIPro.Web.ZHGL.Emergency
this.btnMenuDelete.Hidden = false;
}
}
+ //if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
+ //{
+ // btnNew.Hidden = true;
+ // btnMenuEdit.Hidden = true;
+ // btnMenuDelete.Hidden = true;
+ //}
}
#endregion
diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.designer.cs
index 8740591..850e1e9 100644
--- a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.designer.cs
+++ b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyList.aspx.designer.cs
@@ -68,6 +68,15 @@ namespace FineUIPro.Web.ZHGL.Emergency
///
protected global::FineUIPro.TextBox txtEmergencyCode;
+ ///
+ /// drpUnitId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpUnitId;
+
///
/// txtEmergencyName 控件。
///
diff --git a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx
index cc5284b..c782244 100644
--- a/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx
+++ b/SUBQHSE/FineUIPro.Web/ZHGL/Emergency/EmergencyListEdit.aspx
@@ -1,5 +1,6 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EmergencyListEdit.aspx.cs"
Inherits="FineUIPro.Web.ZHGL.Emergency.EmergencyListEdit" ValidateRequest="false" %>
+
<%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl" TagPrefix="uc1" %>
@@ -10,53 +11,53 @@