diff --git a/DataBase/版本日志/SGGLDB_V2023-06-13.sql b/DataBase/版本日志/SGGLDB_V2023-06-13.sql
index f8ac87c2..6dab7336 100644
--- a/DataBase/版本日志/SGGLDB_V2023-06-13.sql
+++ b/DataBase/版本日志/SGGLDB_V2023-06-13.sql
@@ -1,6 +1,3 @@
-
-
-
ALTER VIEW [dbo].[View_HJGL_WeldJoint]
AS
SELECT jot.[ProjectId] --ĿId
@@ -167,3 +164,37 @@ LEFT JOIN dbo.HJGL_Batch_PointBatch point ON point.PointBatchId = pointItem.Poin
GO
+ALTER TABLE CostGoods_CostManage ADD NextManId nvarchar(50) null
+go
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'һID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CostGoods_CostManage', @level2type=N'COLUMN',@level2name=N'NextManId'
+GO
+
+--ȡǰĿ
+CREATE PROCEDURE [dbo].[Sp_Project_GetToDoItems]
+ @projectId NVARCHAR(50)=NULL,
+ @personId NVARCHAR(200)=NULL
+AS
+/*ȡǰ˱*/
+BEGIN
+SELECT CostManageId AS DataId
+ ,'HSE' AS MenuName
+ ,('HSE'+ CONVERT(varchar(100),CostManage.CostManageDate, 23)+'') AS Content
+ ,PersonId
+ ,persons.PersonName
+ ,CostManage.CostManageDate AS DataTime
+ ,CONVERT(varchar(100),CostManage.CostManageDate, 23) AS DataTimeStr
+ ,(CASE WHEN CostManage.States = '0' THEN '../HSSE/CostGoods/CostManageEdit.aspx?CostManageId='+CostManageId
+ ELSE '../HSSE/CostGoods/CostManageAudit.aspx?CostManageId='+CostManageId END)AS PCUrl
+FROM CostGoods_CostManage AS CostManage
+LEFT JOIN Person_Persons AS persons ON CostManage.NextManId= persons.PersonId
+WHERE CostManage.ProjectId=@projectId AND (CostManage.States = '0' or CostManage.States='1' )
+ AND CostManage.NextManId =@personId
+ORDER BY DataTime DESC
+END
+
+GO
+
+ALTER TABLE Project_ProjectUnit ADD IsSynchro BIT NULL
+GO
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʵͬ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_ProjectUnit', @level2type=N'COLUMN',@level2name=N'IsSynchro'
+GO
diff --git a/DataBase/版本日志/SGGLDB_V2023-06-13修改明细.txt b/DataBase/版本日志/SGGLDB_V2023-06-13修改明细.txt
new file mode 100644
index 00000000..2dac6eee
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2023-06-13修改明细.txt
@@ -0,0 +1,5 @@
+--ADD BY YangHongwei 2023-06-13
+1、新增项目级消息待办页面功能。
+2、新增项目单位是否同步实名制设置功能。
+3、优化考试合格自动生成卡号功能。
+--END
\ No newline at end of file
diff --git a/DataBase/菜单初始化脚本/1-11待办(Menu_ToDo).sql b/DataBase/菜单初始化脚本/1-11待办(Menu_ToDo).sql
new file mode 100644
index 00000000..f0a29870
--- /dev/null
+++ b/DataBase/菜单初始化脚本/1-11待办(Menu_ToDo).sql
@@ -0,0 +1,9 @@
+--delete from Sys_ButtonToMenu where MenuId in (select MenuId from Sys_Menu where MenuType='Menu_ToDo')
+--go
+--delete from Sys_Menu where MenuType='Menu_ToDo'
+--go
+
+--HSSE
+INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+VALUES('AEBFEC10-DD23-4E95-A684-B291A681A5E8','Ϣ','SysManage/ProjectToDo.aspx',10,'0','Menu_ToDo',0,0,1)
+GO
diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs
index 8d9736a5..43ffea3a 100644
--- a/SGGL/BLL/Common/Const.cs
+++ b/SGGL/BLL/Common/Const.cs
@@ -749,6 +749,11 @@
///
public const string Menu_PDigData = "Menu_PDigData";
+ ///
+ /// 消息
+ ///
+ public const string Menu_ToDo = "Menu_ToDo";
+
#endregion
#region 考勤方式定义
diff --git a/SGGL/BLL/HSSE/CostGoods/CostManageService.cs b/SGGL/BLL/HSSE/CostGoods/CostManageService.cs
index a0f62926..a7041376 100644
--- a/SGGL/BLL/HSSE/CostGoods/CostManageService.cs
+++ b/SGGL/BLL/HSSE/CostGoods/CostManageService.cs
@@ -70,7 +70,8 @@ namespace BLL
SubProject = costManage.SubProject,
States = costManage.States,
CompileMan = costManage.CompileMan,
- CompileDate = costManage.CompileDate
+ CompileDate = costManage.CompileDate,
+ NextManId= costManage.NextManId,
};
db.CostGoods_CostManage.InsertOnSubmit(newCostManage);
@@ -105,6 +106,7 @@ namespace BLL
newCostManage.States = costManage.States;
newCostManage.CompileMan = costManage.CompileMan;
newCostManage.CompileDate = costManage.CompileDate;
+ newCostManage.NextManId = costManage.NextManId;
db.SubmitChanges();
}
}
diff --git a/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs b/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs
index 45cc020c..1e3e5e85 100644
--- a/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs
+++ b/SGGL/BLL/HSSE/SitePerson/PersonInOutService.cs
@@ -223,7 +223,7 @@ namespace BLL
/// 监理 业主 不进入
var getPUnit = db.Project_ProjectUnit.FirstOrDefault(x => x.ProjectId == newPersonInOut.ProjectId && x.UnitId == newPersonInOut.UnitId);
- if (getPUnit.UnitType != Const.ProjectUnitType_3 && getPUnit.UnitType != Const.ProjectUnitType_4)
+ if (getPUnit.UnitType != Const.ProjectUnitType_3 && getPUnit.UnitType != Const.ProjectUnitType_4 && getPUnit.IsSynchro == true)
{
string proCode = ProjectService.GetContractNoByProjectId(newPersonInOut.ProjectId);
var getRealNameP = db.RealName_Project.FirstOrDefault(x => x.ProCode == proCode);
diff --git a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs
index 356dfb93..b7822e9e 100644
--- a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs
+++ b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs
@@ -1,6 +1,7 @@
using FineUIPro;
using Microsoft.SqlServer.Dts.Runtime;
using Model;
+using NPOI.HSSF.Record.Aggregates;
using NPOI.SS.Formula.PTG;
using System;
using System.Collections;
@@ -641,7 +642,7 @@ namespace BLL
var getMaxCarNo = Funs.DB.SitePerson_Person.Where(x => x.ProjectId == projectId && x.CardNo.Contains(prefix)).Max(x => x.CardNo);
if (!string.IsNullOrEmpty(getMaxCarNo) && getMaxCarNo.Length > 5)
{
- var getInt = Funs.GetNewInt(Funs.GetSubStr(getMaxCarNo, 5));
+ var getInt = Funs.GetNewInt(getMaxCarNo.Substring(getMaxCarNo.Length-5));
if (getInt.HasValue)
{
cardNo = SQLHelper.RunProcNewId("SpGetNewNumber", "SitePerson_Person", "CardNo", getSitePerson.ProjectId, prefix);
diff --git a/SGGL/BLL/OpenService/GetDataService.cs b/SGGL/BLL/OpenService/GetDataService.cs
index c6a72765..16fd6d17 100644
--- a/SGGL/BLL/OpenService/GetDataService.cs
+++ b/SGGL/BLL/OpenService/GetDataService.cs
@@ -510,24 +510,34 @@ namespace BLL
///
///
///
- public static void SendCarNo()
+ public static int SendCarNo(string projectId)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
+ int count = 0;
var getPersons = from x in db.SitePerson_Person
- where x.States == Const.State_1 && x.CardNo == null
+ where x.States == Const.State_1 && x.CardNo == null && x.ProjectId == projectId
select x;
foreach (var item in getPersons)
{
-
- var isNull = db.EduTrain_TrainRecordDetail.FirstOrDefault(x => x.PersonId == item.PersonId);
- if (isNull != null) ////未参加过培训的人员
+ var isNull = db.EduTrain_TrainRecordDetail.FirstOrDefault(x => x.PersonId == item.PersonId && x.CheckResult ==true);
+ if (isNull != null) ////参加过培训的人员
{
- item.CardNo = SQLHelper.RunProcNewId("SpGetNewNumber", "SitePerson_Person", "CardNo", item.ProjectId, UnitService.GetUnitCodeByUnitId(item.UnitId));
- db.SubmitChanges();
+ string prefix = UnitService.GetUnitCodeByUnitId(item.UnitId) + "-";
+ var getMaxCarNo = db.SitePerson_Person.Where(x => x.ProjectId == item.ProjectId && x.CardNo.Contains(prefix)).Max(x => x.CardNo);
+ if (!string.IsNullOrEmpty(getMaxCarNo) && getMaxCarNo.Length > 5)
+ {
+ var getInt = Funs.GetNewInt(getMaxCarNo.Substring(getMaxCarNo.Length - 5));
+ if (getInt.HasValue)
+ {
+ item.CardNo = SQLHelper.RunProcNewId("SpGetNewNumber", "SitePerson_Person", "CardNo", item.ProjectId, prefix);
+ db.SubmitChanges();
+ count++;
+ }
+ }
}
-
}
+ return count;
}
}
}
diff --git a/SGGL/BLL/ProjectData/ProjectService.cs b/SGGL/BLL/ProjectData/ProjectService.cs
index 8450ee44..5fc6aadc 100644
--- a/SGGL/BLL/ProjectData/ProjectService.cs
+++ b/SGGL/BLL/ProjectData/ProjectService.cs
@@ -337,10 +337,10 @@
}
}
- var pcount = from x in db.Sys_Log
- where x.ProjectId != null && x.OperationTime > DateTime.Now.AddDays(-3)
+ var pcount = (from x in db.Sys_Log
+ where x.ProjectId != null && x.OperationTime > DateTime.Now.AddDays(-2)
group x by x.ProjectId into g
- select new { g.First().ProjectId, count = g.Count() };
+ select new { g.First().ProjectId, count = g.Count() }).Distinct();
List getList = new List();
if (getProjects.Count() > 0)
diff --git a/SGGL/BLL/ProjectData/ProjectUnitService.cs b/SGGL/BLL/ProjectData/ProjectUnitService.cs
index 7e720208..23eb78cf 100644
--- a/SGGL/BLL/ProjectData/ProjectUnitService.cs
+++ b/SGGL/BLL/ProjectData/ProjectUnitService.cs
@@ -78,6 +78,7 @@
PlanCostB = projectUnit.PlanCostB,
ContractRange = projectUnit.ContractRange,
RealNamePushTime = projectUnit.RealNamePushTime,
+ IsSynchro = projectUnit.IsSynchro,
};
db.Project_ProjectUnit.InsertOnSubmit(newProjectUnit);
db.SubmitChanges();
@@ -100,6 +101,7 @@
newProjectUnit.PlanCostB = projectUnit.PlanCostB;
newProjectUnit.ContractRange = projectUnit.ContractRange;
newProjectUnit.RealNamePushTime = projectUnit.RealNamePushTime;
+ newProjectUnit.IsSynchro = projectUnit.IsSynchro;
db.SubmitChanges();
}
}
diff --git a/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs b/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs
index 70ebb554..b1a4cf6f 100644
--- a/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs
+++ b/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs
@@ -762,7 +762,7 @@ namespace BLL
&& x.UnitType != null
&& (proCode == null || y.ContractNo == proCode)
&& u.CollCropCode != null && u.CollCropCode != ""
- && z.JTproCode != null
+ && z.JTproCode != null && x.IsSynchro == true
select new
{
unitId = x.UnitId,
@@ -900,7 +900,7 @@ namespace BLL
where z.ProCode != null && !x.RealNamePushTime.HasValue && x.TeamTypeId != null
&& (proCode == null || y.ContractNo == proCode)
&& u.CollCropCode != null && u.CollCropCode != ""
- && z.JTproCode != null
+ && z.JTproCode != null && p.IsSynchro == true
&& p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4
select new
{
@@ -997,7 +997,7 @@ namespace BLL
&& y.ContractNo == proCode && v.TeamId.HasValue
&& ((type == Const.BtnModify && !x.RealNameUpdateTime.HasValue && x.RealNameAddTime.HasValue)
|| (type != Const.BtnModify && !x.RealNameAddTime.HasValue && x.States == Const.State_1 && Persons.HeadImage.Length > 0))
- && p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4
+ && p.UnitType != Const.ProjectUnitType_3 && p.UnitType != Const.ProjectUnitType_4 && p.IsSynchro == true
&& z.JTproCode != null
select new
{
@@ -1517,12 +1517,13 @@ namespace BLL
join z in Funs.DB.RealName_Project on x.ProCode equals z.ProCode
join v in Funs.DB.ProjectData_TeamGroup on p.TeamGroupId equals v.TeamGroupId
join r in Funs.DB.RealName_CollTeam on v.TeamId equals r.TeamId
+ join pu in Funs.DB.Project_ProjectUnit on new { x.UnitId, x.ProjectId } equals new { pu.UnitId, pu.ProjectId }
where x.IdcardNumber != null && x.ChangeTime.HasValue
&& (proCode == null || x.ProCode == proCode)
&& v.TeamId.HasValue && r.TeamId.HasValue
&& p.States == Const.State_1
&& !x.RealNamePushTime.HasValue
- && z.JTproCode != null
+ && z.JTproCode != null && pu.IsSynchro == true
orderby x.ChangeTime descending
select new
{
@@ -1735,7 +1736,8 @@ namespace BLL
join z in db.RealName_Project on y.ContractNo equals z.ProCode
join v in db.ProjectData_TeamGroup on x.TeamGroupId equals v.TeamGroupId
join w in db.Base_WorkPost on x.WorkPostId equals w.WorkPostId
- where personList.Contains(x.PersonId) && z.JTproCode != null
+ join p in db.Project_ProjectUnit on new { x.UnitId, x.ProjectId } equals new { p.UnitId, p.ProjectId }
+ where personList.Contains(x.PersonId) && z.JTproCode != null && p.IsSynchro == true
select new
{
name = x.PersonName,
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index 01905800..44199c5a 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -330,6 +330,7 @@
+
@@ -1502,6 +1503,7 @@
+
@@ -12953,6 +12955,13 @@
SysConstSet.aspx
+
+ ProjectToDo.aspx
+ ASPXCodeBehind
+
+
+ ProjectToDo.aspx
+
Unit.aspx
ASPXCodeBehind
@@ -13870,7 +13879,7 @@
True
0
/
- http://localhost:1541/
+ http://localhost:8667/
False
False
diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageAudit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageAudit.aspx.cs
index 9f2c0f2c..10a014c6 100644
--- a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageAudit.aspx.cs
+++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageAudit.aspx.cs
@@ -197,6 +197,7 @@ namespace FineUIPro.Web.HSSE.CostGoods
isAgree = false;
NowFlow.Opinion = this.rblIsAgree.SelectedItem.Text + ","+ this.txtOpinion.Text;
getCost.States = BLL.Const.State_0;
+ getCost.NextManId = getCost.CompileMan;
BLL.CostManageService.UpdateCostManage(getCost);
CostManageService.updateOpenCostManageFlowOperate(this.CostManageId);
}
@@ -208,9 +209,13 @@ namespace FineUIPro.Web.HSSE.CostGoods
{
NextFlow.OperaterId = this.drpNextMan.SelectedValue;
BLL.CostManageService.updateCostManageFlowOperate(NextFlow);
+
+ getCost.NextManId = this.drpNextMan.SelectedValue;
+ BLL.CostManageService.UpdateCostManage(getCost);
}
else
{
+ getCost.NextManId = null;
getCost.States = BLL.Const.State_2;
BLL.CostManageService.UpdateCostManage(getCost);
}
diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.cs
index 64a9cae0..f85a854b 100644
--- a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.cs
@@ -313,7 +313,12 @@ namespace FineUIPro.Web.HSSE.CostGoods
if (type == Const.BtnSubmit)
{
costManage.States = BLL.Const.State_1;
- }
+ costManage.NextManId = this.drpNextMan.SelectedValue;
+ }
+ else
+ {
+ costManage.NextManId = costManage.CompileMan;
+ }
var getCost= CostManageService.GetCostManageById(this.CostManageId);
if (getCost != null)
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx
index e5a883a1..433821fe 100644
--- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx
@@ -110,6 +110,8 @@
+
+
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs
index 60b12ccb..13499b37 100644
--- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs
@@ -70,6 +70,10 @@ namespace FineUIPro.Web.HSSE.SitePerson
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
BLL.WorkPostService.InitWorkPostDropDownList(this.drpPost, true);
this.InitTreeMenu();//加载树
+ if (this.CurrUser.PersonId == Const.hfnbdId || this.CurrUser.PersonId == Const.sysglyId)
+ {
+ this.btnRefresh.Hidden = false;
+ }
}
}
@@ -726,5 +730,11 @@ namespace FineUIPro.Web.HSSE.SitePerson
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../Person/ProjectPersonView.aspx?SitePersonId={0}", this.SitePersonId, "查看 - ")));
}
}
+
+ protected void btnRefresh_Click(object sender, EventArgs e)
+ {
+ int count = GetDataService.SendCarNo(this.ProjectId);
+ Alert.ShowInTop("刷新完成"+ count.ToString()+"条。", MessageBoxIcon.Success);
+ }
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.designer.cs
index cc9d9db8..fce5b39a 100644
--- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.designer.cs
@@ -248,6 +248,15 @@ namespace FineUIPro.Web.HSSE.SitePerson
///
protected global::FineUIPro.Button btnQR;
+ ///
+ /// btnRefresh 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnRefresh;
+
///
/// lbIsPost 控件。
///
diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectUnit.aspx b/SGGL/FineUIPro.Web/ProjectData/ProjectUnit.aspx
index bf4b2c24..6e531d2d 100644
--- a/SGGL/FineUIPro.Web/ProjectData/ProjectUnit.aspx
+++ b/SGGL/FineUIPro.Web/ProjectData/ProjectUnit.aspx
@@ -5,21 +5,19 @@
项目单位
-
+
+
+
+
+
+
+