From f1a5407c698c6030b4e0efd8697ebc0a126fa8bc Mon Sep 17 00:00:00 2001
From: gaofei1985 <181547018@qq.com>
Date: Sat, 7 Oct 2023 15:27:02 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=91=98=E5=B7=A5=E8=80=83?=
=?UTF-8?q?=E6=A0=B8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
DataBase/版本日志/SGGLDB_V2023-10-07.sql | 56 +++
SGGL/BLL/BLL.csproj | 1 +
.../SitePerson/SitePerson_PersonService.cs | 2 +-
.../PhtglContracttrackService .cs | 266 ++++++++++--
.../ConstructionLogWorkEfficiencyService.cs | 69 +++
SGGL/FineUIPro.Web/ErrLog.txt | 37 ++
SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 8 +
.../InformationProject/ConstructionLog.aspx | 9 +-
.../ConstructionLog.aspx.cs | 76 +++-
.../ConstructionLog.aspx.designer.cs | 13 +-
.../ConstructionLogWorkEfficiency.aspx | 92 ++++
.../ConstructionLogWorkEfficiency.aspx.cs | 230 ++++++++++
...tructionLogWorkEfficiency.aspx.designer.cs | 96 +++++
.../Personal/PersonalInfo.aspx.cs | 2 +
SGGL/Model/Model.cs | 406 +++++++++++++++---
15 files changed, 1269 insertions(+), 94 deletions(-)
create mode 100644 DataBase/版本日志/SGGLDB_V2023-10-07.sql
create mode 100644 SGGL/BLL/PZHGL/InformationProject/ConstructionLogWorkEfficiencyService.cs
create mode 100644 SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLogWorkEfficiency.aspx
create mode 100644 SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLogWorkEfficiency.aspx.cs
create mode 100644 SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLogWorkEfficiency.aspx.designer.cs
diff --git a/DataBase/版本日志/SGGLDB_V2023-10-07.sql b/DataBase/版本日志/SGGLDB_V2023-10-07.sql
new file mode 100644
index 00000000..453b3561
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2023-10-07.sql
@@ -0,0 +1,56 @@
+
+CREATE TABLE [dbo].[ZHGL_ConstructionLogWorkEfficiency](
+ [ConstructionLogWorkEfficiencyId] [nvarchar](50) NOT NULL,
+ [ConstructionLogId] [nvarchar](50) NULL,
+ [ContractTrackId] [varchar](50) NULL,
+ [PhysicalCompletionQuantity] [decimal](18, 2) NULL,
+ [MaterialConsumption] [decimal](18, 2) NULL,
+ [Type] [nvarchar](20) NULL,
+ [TypeId] [nvarchar](50) NULL,
+ [ConsumeHours] [decimal](18, 2) NULL,
+ CONSTRAINT [PK_ZHGL_ConstructionLogWorkEfficiency] PRIMARY KEY CLUSTERED
+(
+ [ConstructionLogWorkEfficiencyId] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+
+GO
+
+SET ANSI_PADDING OFF
+GO
+
+ALTER TABLE [dbo].[ZHGL_ConstructionLogWorkEfficiency] WITH CHECK ADD CONSTRAINT [FK_ZHGL_ConstructionLogWorkEfficiency_PHTGL_ContractTrack] FOREIGN KEY([ContractTrackId])
+REFERENCES [dbo].[PHTGL_ContractTrack] ([Id])
+GO
+
+ALTER TABLE [dbo].[ZHGL_ConstructionLogWorkEfficiency] CHECK CONSTRAINT [FK_ZHGL_ConstructionLogWorkEfficiency_PHTGL_ContractTrack]
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionLogWorkEfficiency', @level2type=N'COLUMN',@level2name=N'ConstructionLogWorkEfficiencyId'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionLogWorkEfficiency', @level2type=N'COLUMN',@level2name=N'ConstructionLogId'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ͬId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionLogWorkEfficiency', @level2type=N'COLUMN',@level2name=N'ContractTrackId'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionLogWorkEfficiency', @level2type=N'COLUMN',@level2name=N'PhysicalCompletionQuantity'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionLogWorkEfficiency', @level2type=N'COLUMN',@level2name=N'MaterialConsumption'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ͣ˹/е' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionLogWorkEfficiency', @level2type=N'COLUMN',@level2name=N'Type'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionLogWorkEfficiency', @level2type=N'COLUMN',@level2name=N'TypeId'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ĺ/̨ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionLogWorkEfficiency', @level2type=N'COLUMN',@level2name=N'ConsumeHours'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʩ־Ч' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionLogWorkEfficiency'
+GO
+
+
diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj
index 1e700e32..dd14cece 100644
--- a/SGGL/BLL/BLL.csproj
+++ b/SGGL/BLL/BLL.csproj
@@ -649,6 +649,7 @@
+
diff --git a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs
index a2feec55..d27aa849 100644
--- a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs
+++ b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs
@@ -429,7 +429,7 @@ namespace BLL
public static List GetSitePersonsByProjectIds(List ProjectIds)
{
return (from x in Funs.DB.SitePerson_Person
- where ProjectIds.Contains(x.ProjectId) && x.RoleIds.Length > 1
+ where ProjectIds.Contains(x.ProjectId) && x.RoleIds.Length > 1 && x.States == Const.ProjectPersonStates_1
select x).ToList();
}
#endregion
diff --git a/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackService .cs b/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackService .cs
index 775ceb26..e7c1eced 100644
--- a/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackService .cs
+++ b/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackService .cs
@@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
+using System.Data;
using System.Linq;
using EmitMapper;
using FineUIPro;
@@ -81,37 +82,37 @@ namespace BLL
q = q.Skip(grid1.PageSize * grid1.PageIndex).Take(grid1.PageSize).ToList();
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
return from x in q
- select new
- {
- x.Id,
- x.ContractNum,
- x.MainItemCode,
- x.MainItemName,
- x.MajorName,
- x.MajorCode,
- x.SubProject,
- x.SubItemProject,
- x.ProjectCode,
- x.ProjectName,
- x.ProjectDescription,
- x.UnitOfMeasurement,
- x.Quantity,
- x.TotalCostFixedComprehensiveUnitPrice,
- x.MainMaterialCost,
- x.TotalPrice,
- x.CalculationRule,
- x.WorkContent,
- x.Remarks,
- x.ConstructionSubcontractor,
- x.ContractWeight,
- x.MaterialSupplier,
- x.IsWithinGeneralContractScope,
- x.EstimatedQuantity,
- x.EstimatedAmount,
- x.SettledQuantity,
- x.SettledAmount,
- x.ContractId
- };
+ select new
+ {
+ x.Id,
+ x.ContractNum,
+ x.MainItemCode,
+ x.MainItemName,
+ x.MajorName,
+ x.MajorCode,
+ x.SubProject,
+ x.SubItemProject,
+ x.ProjectCode,
+ x.ProjectName,
+ x.ProjectDescription,
+ x.UnitOfMeasurement,
+ x.Quantity,
+ x.TotalCostFixedComprehensiveUnitPrice,
+ x.MainMaterialCost,
+ x.TotalPrice,
+ x.CalculationRule,
+ x.WorkContent,
+ x.Remarks,
+ x.ConstructionSubcontractor,
+ x.ContractWeight,
+ x.MaterialSupplier,
+ x.IsWithinGeneralContractScope,
+ x.EstimatedQuantity,
+ x.EstimatedAmount,
+ x.SettledQuantity,
+ x.SettledAmount,
+ x.ContractId
+ };
}
#endregion
@@ -195,8 +196,8 @@ namespace BLL
table.EstimatedAmount = newtable.EstimatedAmount;
table.SettledQuantity = newtable.SettledQuantity;
table.SettledAmount = newtable.SettledAmount;
- table.ContractId=newtable.ContractId;
- table.ProjectId=newtable.ProjectId;
+ table.ContractId = newtable.ContractId;
+ table.ProjectId = newtable.ProjectId;
Funs.DB.SubmitChanges();
}
}
@@ -250,7 +251,7 @@ namespace BLL
};
if (string.IsNullOrEmpty(item.ProjectCode)) continue;
var resultModel = GetPHTGL_ContractTrackByModle(phtglContractTrack);
- item.ContractNum=ContractService.GetContractById(contractid)?.ContractNum;
+ item.ContractNum = ContractService.GetContractById(contractid)?.ContractNum;
if (resultModel.Any())
{
item.Id = resultModel[0].Id;
@@ -267,6 +268,202 @@ namespace BLL
return responeData;
}
+ ///
+ /// 获取模拟树表格
+ ///
+ ///
+ public static DataTable GetAllTreeDataTable(string projectId, string IsOut, List contractNoList, List professionalList, List workPostIds, List machineIds, string constructionLogId)
+ {
+ using (var db = new Model.SGGLDB(Funs.ConnString))
+ {
+ var pros = BLL.PHTGL_QuantityService.GetMajorItems();
+ List proNames = new List();
+ foreach (var item in professionalList)
+ {
+ var pro = pros.FirstOrDefault(x => x.Text == item);
+ if (pro != null)
+ {
+ proNames.Add(pro.Value);
+ }
+ }
+ IQueryable getContractTracks = from x in db.PHTGL_ContractTrack
+ where x.ProjectId == projectId && contractNoList.Contains(x.ContractId) && proNames.Contains(x.MajorName)
+ orderby x.ProjectCode, x.ProjectName
+ select x;
+ IQueryable workEfficiencys = from x in db.ZHGL_ConstructionLogWorkEfficiency
+ where x.ConstructionLogId == constructionLogId
+ select x;
+ var unitWorks = (from x in getContractTracks
+ select new { MainItemCode = x.MainItemCode, MainItemName = x.MainItemName }).Distinct().ToList();
+
+ DataTable table = new DataTable();
+ table.Columns.Add(new DataColumn("Id", typeof(String)));
+ table.Columns.Add(new DataColumn("Code", typeof(String)));
+ table.Columns.Add(new DataColumn("ProjectCode", typeof(String)));
+ table.Columns.Add(new DataColumn("ProjectName", typeof(String)));
+ table.Columns.Add(new DataColumn("UnitOfMeasurement", typeof(String)));
+ table.Columns.Add(new DataColumn("PhysicalCompletionQuantity", typeof(String)));
+ table.Columns.Add(new DataColumn("MaterialConsumption", typeof(String)));
+ table.Columns.Add(new DataColumn("ShowId", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonConsumeHours0", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonWorkEfficiency0", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonConsumeHours1", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonWorkEfficiency1", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonConsumeHours2", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonWorkEfficiency2", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonConsumeHours3", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonWorkEfficiency3", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonConsumeHours4", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonWorkEfficiency4", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonConsumeHours5", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonWorkEfficiency5", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonConsumeHours6", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonWorkEfficiency6", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonConsumeHours7", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonWorkEfficiency7", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonConsumeHours8", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonWorkEfficiency8", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonConsumeHours9", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonWorkEfficiency9", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonConsumeHours10", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonWorkEfficiency10", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonConsumeHours11", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonWorkEfficiency11", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonConsumeHours12", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonWorkEfficiency12", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonConsumeHours13", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonWorkEfficiency13", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonConsumeHours14", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonWorkEfficiency14", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonConsumeHours15", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonWorkEfficiency15", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonConsumeHours16", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonWorkEfficiency16", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonConsumeHours17", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonWorkEfficiency17", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonConsumeHours18", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonWorkEfficiency18", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonConsumeHours19", typeof(String)));
+ table.Columns.Add(new DataColumn("PersonWorkEfficiency19", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineConsumeHours0", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineWorkEfficiency0", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineConsumeHours1", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineWorkEfficiency1", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineConsumeHours2", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineWorkEfficiency2", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineConsumeHours3", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineWorkEfficiency3", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineConsumeHours4", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineWorkEfficiency4", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineConsumeHours5", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineWorkEfficiency5", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineConsumeHours6", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineWorkEfficiency6", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineConsumeHours7", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineWorkEfficiency7", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineConsumeHours8", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineWorkEfficiency8", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineConsumeHours9", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineWorkEfficiency9", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineConsumeHours10", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineWorkEfficiency10", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineConsumeHours11", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineWorkEfficiency11", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineConsumeHours12", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineWorkEfficiency12", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineConsumeHours13", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineWorkEfficiency13", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineConsumeHours14", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineWorkEfficiency14", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineConsumeHours15", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineWorkEfficiency15", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineConsumeHours16", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineWorkEfficiency16", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineConsumeHours17", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineWorkEfficiency17", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineConsumeHours18", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineWorkEfficiency18", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineConsumeHours19", typeof(String)));
+ table.Columns.Add(new DataColumn("MachineWorkEfficiency19", typeof(String)));
+ DataRow row;
+ int a = 1;
+ foreach (var unitWork in unitWorks)
+ {
+ row = table.NewRow();
+ row[0] = unitWork.MainItemCode;
+ row[1] = a;
+ row[2] = string.Empty;
+ row[3] = unitWork.MainItemName;
+ table.Rows.Add(row);
+ int b = 1;
+ foreach (var proName in proNames)
+ {
+ row = table.NewRow();
+ row[0] = unitWork.MainItemCode + b.ToString();
+ row[1] = a + "." + b;
+ row[2] = string.Empty;
+ row[3] = proName;
+ table.Rows.Add(row);
+ int c = 1;
+ var contractTracks = getContractTracks.Where(x => x.MainItemCode == unitWork.MainItemCode && x.MajorName == proName);
+ foreach (Model.PHTGL_ContractTrack item in contractTracks)
+ {
+ row = table.NewRow();
+ row[0] = item.Id;
+ row[1] = a + "." + b + "." + c;
+ row[2] = item.ProjectCode;
+ row[3] = item.ProjectName;
+ row[4] = item.UnitOfMeasurement;
+ row[7] = item.Id;
+ if (workEfficiencys.Count() > 0)
+ {
+ var we = workEfficiencys.FirstOrDefault(x => x.ContractTrackId == item.Id);
+ if (we != null)
+ {
+ row[5] = we.PhysicalCompletionQuantity;
+ row[6] = we.MaterialConsumption;
+ }
+ for (int i = 0; i < workPostIds.Count; i++)
+ {
+ var workEfficiency = workEfficiencys.FirstOrDefault(x => x.Type == "Person" && x.TypeId == workPostIds[i] && x.ContractTrackId== item.Id);
+ if (workEfficiency != null)
+ {
+ if (workEfficiency.ConsumeHours != null)
+ {
+ row[8 + i * 2] = decimal.Round(Convert.ToDecimal(workEfficiency.ConsumeHours), 2);
+ if (we.PhysicalCompletionQuantity != null && we.PhysicalCompletionQuantity > 0)
+ {
+ row[9 + i * 2] = decimal.Round(Convert.ToDecimal(we.PhysicalCompletionQuantity / workEfficiency.ConsumeHours), 2);
+ }
+ }
+ }
+ }
+ for (int i = 0; i < machineIds.Count; i++)
+ {
+ var workEfficiency = workEfficiencys.FirstOrDefault(x => x.Type == "Machine" && x.TypeId == machineIds[i] && x.ContractTrackId == item.Id);
+ if (workEfficiency != null)
+ {
+ if (workEfficiency.ConsumeHours != null)
+ {
+ row[48 + i * 2] = decimal.Round(Convert.ToDecimal(workEfficiency.ConsumeHours), 2);
+ if (we.PhysicalCompletionQuantity != null && we.PhysicalCompletionQuantity > 0)
+ {
+ row[49 + i * 2] = decimal.Round(Convert.ToDecimal(we.PhysicalCompletionQuantity / workEfficiency.ConsumeHours), 2);
+ }
+ }
+ }
+ }
+ }
+ table.Rows.Add(row);
+ c++;
+ }
+ b++;
+ }
+ a++;
+ }
+ return table;
+ }
+ }
}
public class PHTGL_ContractTrackDtoIn
{
@@ -331,5 +528,4 @@ namespace BLL
///
[ExcelColumnIndex("P")] public string Remarks { get; set; }
}
-
}
\ No newline at end of file
diff --git a/SGGL/BLL/PZHGL/InformationProject/ConstructionLogWorkEfficiencyService.cs b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogWorkEfficiencyService.cs
new file mode 100644
index 00000000..337c1ce7
--- /dev/null
+++ b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogWorkEfficiencyService.cs
@@ -0,0 +1,69 @@
+using System.Collections.Generic;
+using System.Linq;
+
+namespace BLL
+{
+ public class ConstructionLogWorkEfficiencyService
+ {
+ public static Model.SGGLDB db = Funs.DB;
+
+ ///
+ /// 获取施工日志工效明细列表
+ ///
+ ///
+ ///
+ ///
+ public static List getListData(string ConstructionLogId)
+ {
+ return (from x in db.ZHGL_ConstructionLogWorkEfficiency
+ where x.ConstructionLogId == ConstructionLogId
+ select x).ToList();
+ }
+
+ ///
+ /// 增加施工日志工效明细
+ ///
+ /// 施工日志工效明细实体
+ public static void AddConstructionLogWorkEfficiency(Model.ZHGL_ConstructionLogWorkEfficiency constructionLogWorkEfficiency)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.ZHGL_ConstructionLogWorkEfficiency newConstructionLogWorkEfficiency = new Model.ZHGL_ConstructionLogWorkEfficiency();
+ newConstructionLogWorkEfficiency.ConstructionLogWorkEfficiencyId = constructionLogWorkEfficiency.ConstructionLogWorkEfficiencyId;
+ newConstructionLogWorkEfficiency.ConstructionLogId = constructionLogWorkEfficiency.ConstructionLogId;
+ newConstructionLogWorkEfficiency.ContractTrackId = constructionLogWorkEfficiency.ContractTrackId;
+ newConstructionLogWorkEfficiency.PhysicalCompletionQuantity = constructionLogWorkEfficiency.PhysicalCompletionQuantity;
+ newConstructionLogWorkEfficiency.MaterialConsumption = constructionLogWorkEfficiency.MaterialConsumption;
+ newConstructionLogWorkEfficiency.Type = constructionLogWorkEfficiency.Type;
+ newConstructionLogWorkEfficiency.TypeId = constructionLogWorkEfficiency.TypeId;
+ newConstructionLogWorkEfficiency.ConsumeHours = constructionLogWorkEfficiency.ConsumeHours;
+
+ db.ZHGL_ConstructionLogWorkEfficiency.InsertOnSubmit(newConstructionLogWorkEfficiency);
+ db.SubmitChanges();
+ }
+
+ ///
+ /// 根据月报id删除对应的所有施工日志工效明细
+ ///
+ /// 施工日志工效明细编号
+ public static void DeleteConstructionLogWorkEfficiencysByConstructionLogId(string ConstructionLogId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ var q = (from x in db.ZHGL_ConstructionLogWorkEfficiency where x.ConstructionLogId == ConstructionLogId select x).ToList();
+ if (q.Count() > 0)
+ {
+ db.ZHGL_ConstructionLogWorkEfficiency.DeleteAllOnSubmit(q);
+ db.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据月报id获取对应的所有施工日志工效明细
+ ///
+ /// 施工日志工效明细编号
+ public static List GetConstructionLogWorkEfficiencysByConstructionLogId(string ConstructionLogId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ return (from x in db.ZHGL_ConstructionLogWorkEfficiency where x.ConstructionLogId == ConstructionLogId select x).ToList();
+ }
+ }
+}
diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt
index e07efab4..91eccac6 100644
--- a/SGGL/FineUIPro.Web/ErrLog.txt
+++ b/SGGL/FineUIPro.Web/ErrLog.txt
@@ -245,3 +245,40 @@ IP地址:::1
出错时间:09/25/2023 10:05:02
+
+错误信息开始=====>
+错误类型:NullReferenceException
+错误信息:未将对象引用设置到对象的实例。
+错误堆栈:
+ 在 FineUIPro.Web.indexProject.MenuSwitchMethod(String type) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\indexProject.aspx.cs:行号 595
+ 在 FineUIPro.Web.indexProject.btnPHTGL_Click(Object sender, EventArgs e) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\indexProject.aspx.cs:行号 697
+ 在 FineUIPro.Button.OnClick(EventArgs e)
+ 在 (Button , EventArgs )
+ 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument)
+ 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
+ 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+ 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+出错时间:09/26/2023 16:04:25
+出错文件:http://localhost:2325/indexProject.aspx?projectId=7b691ed0-6bad-468f-9e54-f0f5ba4df21f
+IP地址:::1
+
+出错时间:09/26/2023 16:04:25
+
+
+错误信息开始=====>
+错误类型:InvalidCastException
+错误信息:无法将类型为“FineUIPro.RenderField”的对象强制转换为类型“FineUIPro.GroupField”。
+错误堆栈:
+ 在 FineUIPro.Web.PZHGL.InformationProject.ConstructionLogWorkEfficiency.Page_Load(Object sender, EventArgs e) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\PZHGL\InformationProject\ConstructionLogWorkEfficiency.aspx.cs:行号 141
+ 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
+ 在 System.EventHandler.Invoke(Object sender, EventArgs e)
+ 在 System.Web.UI.Control.OnLoad(EventArgs e)
+ 在 System.Web.UI.Control.LoadRecursive()
+ 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+出错时间:09/28/2023 09:26:08
+出错文件:http://localhost:2325/PZHGL/InformationProject/ConstructionLogWorkEfficiency.aspx?ConstructionLogId=09043ee7-93ec-4705-93bb-d49b44148d3c&contractNo=03348581-d016-4ee8-b5a7-d61ace761c3c,23a86756-402f-4c77-a452-b36231bb7b4f&professional=0,1&WorkPostId=41EF8B02-2852-495E-A2BE-2EF19BA70A4F,2E71A650-6D40-459A-AAC1-5FB5E00D247C,558124BF-B678-48EB-B7DB-22211951747B&MachineId=0cefba88-c16a-4508-a642-1ffb079dbf58,5d6ccd22-5072-4bbd-847e-e1b7c06adc3b,f29fa0ad-b834-4198-a543-8e3deef0d340
+IP地址:::1
+操作人员:JT
+
+出错时间:09/28/2023 09:26:08
+
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index 7a5fc19d..d6fef964 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -1320,6 +1320,7 @@
+
@@ -12805,6 +12806,13 @@
ConstructionLogView.aspx
+
+ ConstructionLogWorkEfficiency.aspx
+ ASPXCodeBehind
+
+
+ ConstructionLogWorkEfficiency.aspx
+
ConstructionMonthReport.aspx
ASPXCodeBehind
diff --git a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLog.aspx b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLog.aspx
index 7446d711..d5e18b1a 100644
--- a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLog.aspx
+++ b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLog.aspx
@@ -42,6 +42,7 @@
+
@@ -80,9 +81,11 @@
-
+
-
+
+
+
@@ -350,7 +353,7 @@
+ Width="1300px" Height="650px">
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
-
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
+ ChangeText();
}
#endregion
+ private void ChangeText()
+ {
+ var workEfficiencys = from x in Funs.DB.ZHGL_ConstructionLogWorkEfficiency
+ where x.ConstructionLogId == this.hdConstructionLogId.Text
+ select x;
+ if (workEfficiencys.Count() > 0)
+ {
+ this.btnWorkEfficiency.Text = "已填报";
+ }
+ else
+ {
+ this.btnWorkEfficiency.Text = "未填报";
+ }
+ }
+
#region 右键删除焊口
///
/// 右键删除焊口
@@ -911,6 +936,7 @@ namespace FineUIPro.Web.PZHGL.InformationProject
var log = BLL.ConstructionLogService.GetConstructionLogById(ConstructionLogId);
if (log != null)
{
+ BLL.ConstructionLogWorkEfficiencyService.DeleteConstructionLogWorkEfficiencysByConstructionLogId(ConstructionLogId);
BLL.ConstructionLogPersonService.DeleteConstructionLogPersonsByConstructionLogId(ConstructionLogId);
BLL.ConstructionLogMachineService.DeleteConstructionLogMachinesByConstructionLogId(ConstructionLogId);
BLL.ConstructionLogManagementService.DeleteConstructionLogManagementsByConstructionLogId(ConstructionLogId);
@@ -923,7 +949,7 @@ namespace FineUIPro.Web.PZHGL.InformationProject
}
else
{
- Alert.ShowInTop("请选择要删除的试压记录!", MessageBoxIcon.Warning);
+ Alert.ShowInTop("请选择要删除的记录!", MessageBoxIcon.Warning);
}
}
else
@@ -1216,5 +1242,45 @@ namespace FineUIPro.Web.PZHGL.InformationProject
{
TextNew();
}
+
+ protected void btnWorkEfficiency_Click(object sender, EventArgs e)
+ {
+ if (string.IsNullOrEmpty(hdConstructionLogId.Text)) //新增记录
+ {
+ hdConstructionLogId.Text = SQLHelper.GetNewID();
+ }
+ string contractNo = string.Empty;
+ foreach (var item in this.drpContractNo.SelectedValueArray)
+ {
+ if (item != BLL.Const._Null)
+ {
+ contractNo += item + ",";
+ }
+ }
+ if (!string.IsNullOrEmpty(contractNo))
+ {
+ contractNo = contractNo.Substring(0, contractNo.Length - 1);
+ }
+ string professional = string.Empty;
+ foreach (var item in this.drpProfessional.SelectedValueArray)
+ {
+ if (item != BLL.Const._Null)
+ {
+ professional += item + ",";
+ }
+ }
+ if (!string.IsNullOrEmpty(professional))
+ {
+ professional = professional.Substring(0, professional.Length - 1);
+ }
+ if (!string.IsNullOrEmpty(contractNo) && !string.IsNullOrEmpty(professional))
+ {
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ConstructionLogWorkEfficiency.aspx?ConstructionLogId={0}&contractNo={1}&professional={2}&WorkPostId={3}&MachineId={4}", this.hdConstructionLogId.Text, contractNo, professional, hdWorkPostId.Text, hdMachineId.Text, "导入 - ")));
+ }
+ else
+ {
+ Alert.ShowInTop("请选择合同编号和专业工程!", MessageBoxIcon.Warning);
+ }
+ }
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLog.aspx.designer.cs b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLog.aspx.designer.cs
index a1397de5..358072d6 100644
--- a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLog.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLog.aspx.designer.cs
@@ -111,6 +111,15 @@ namespace FineUIPro.Web.PZHGL.InformationProject {
///
protected global::FineUIPro.HiddenField hdMachineId;
+ ///
+ /// hdConstructionLogId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdConstructionLogId;
+
///
/// btnSave 控件。
///
@@ -238,13 +247,13 @@ namespace FineUIPro.Web.PZHGL.InformationProject {
protected global::FineUIPro.DropDownList drpProfessional;
///
- /// txtState 控件。
+ /// btnWorkEfficiency 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.TextBox txtState;
+ protected global::FineUIPro.Button btnWorkEfficiency;
///
/// txtRemark 控件。
diff --git a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLogWorkEfficiency.aspx b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLogWorkEfficiency.aspx
new file mode 100644
index 00000000..2d32fd97
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLogWorkEfficiency.aspx
@@ -0,0 +1,92 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ConstructionLogWorkEfficiency.aspx.cs" Inherits="FineUIPro.Web.PZHGL.InformationProject.ConstructionLogWorkEfficiency" %>
+
+
+
+
+
+ 工效录入
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLogWorkEfficiency.aspx.cs b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLogWorkEfficiency.aspx.cs
new file mode 100644
index 00000000..6a21f06a
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLogWorkEfficiency.aspx.cs
@@ -0,0 +1,230 @@
+using BLL;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.PZHGL.InformationProject
+{
+ public partial class ConstructionLogWorkEfficiency : PageBase
+ {
+ #region 定义变量
+ ///
+ /// 列数量
+ ///
+ public int ColumnNum
+ {
+ get
+ {
+ return (int)ViewState["ColumnNum"];
+ }
+ set
+ {
+ ViewState["ColumnNum"] = value;
+ }
+ }
+ #endregion
+
+ ///
+ /// 加载表头
+ ///
+ protected void Page_Init(object sender, EventArgs e)
+ {
+ InitGrid();
+ }
+
+ #region 表头
+ ///
+ /// 表头
+ ///
+ private void InitGrid()
+ {
+ ColumnNum = 0;
+ List workPostIds = Funs.GetStrListByStr(Request.Params["WorkPostId"], ',');
+ List machineIds = Funs.GetStrListByStr(Request.Params["MachineId"], ',');
+ GroupField gf1 = new GroupField();
+ gf1.ColumnID = "Person";
+ gf1.HeaderText = "人工消耗(工·h)";
+ gf1.HeaderTextAlign = TextAlign.Center;
+ for (int i = 0; i < workPostIds.Count; i++)
+ {
+ GroupField gf = new GroupField();
+ gf.ColumnID = "Person" + i.ToString();
+ gf.HeaderText = BLL.WorkPostService.getWorkPostNameById(workPostIds[i]);
+ gf.HeaderTextAlign = TextAlign.Center;
+ RenderField rd1 = new RenderField();
+ rd1.ColumnID = "PersonConsumeHours" + i.ToString();
+ rd1.Width = Unit.Pixel(100);
+ rd1.DataField = "PersonConsumeHours" + i.ToString();
+ rd1.FieldType = FieldType.Double;
+ rd1.HeaderText = "消耗工时";
+ rd1.HeaderTextAlign = TextAlign.Center;
+ NumberBox numPlan = new NumberBox();
+ numPlan.NoNegative = true;
+ numPlan.NoDecimal = false;
+ rd1.Editor.Add(numPlan);
+ gf.Columns.Add(rd1);
+ RenderField rd2 = new RenderField();
+ rd2.ColumnID = "PersonWorkEfficiency" + i.ToString();
+ rd2.Width = Unit.Pixel(100);
+ rd2.DataField = "PersonWorkEfficiency" + i.ToString();
+ rd2.FieldType = FieldType.Double;
+ rd2.HeaderText = "工效";
+ rd2.HeaderTextAlign = TextAlign.Center;
+ gf.Columns.Add(rd2);
+ gf1.Columns.Add(gf);
+ }
+ Grid1.Columns.Add(gf1);
+ GroupField gf2 = new GroupField();
+ gf2.ColumnID = "Machine";
+ gf2.HeaderText = "机械消耗(台·h)";
+ gf2.HeaderTextAlign = TextAlign.Center;
+ for (int i = 0; i < machineIds.Count; i++)
+ {
+ GroupField gf = new GroupField();
+ gf.ColumnID = "Machine" + i.ToString();
+ gf.HeaderText = BLL.SpecialEquipmentService.GetSpecialEquipmentNameById(machineIds[i]);
+ gf.HeaderTextAlign = TextAlign.Center;
+ RenderField rd1 = new RenderField();
+ rd1.ColumnID = "MachineConsumeHours" + i.ToString();
+ rd1.Width = Unit.Pixel(100);
+ rd1.DataField = "MachineConsumeHours" + i.ToString();
+ rd1.FieldType = FieldType.Double;
+ rd1.HeaderText = "消耗台时";
+ rd1.HeaderTextAlign = TextAlign.Center;
+ NumberBox numPlan = new NumberBox();
+ numPlan.NoNegative = true;
+ numPlan.NoDecimal = false;
+ rd1.Editor.Add(numPlan);
+ gf.Columns.Add(rd1);
+ RenderField rd2 = new RenderField();
+ rd2.ColumnID = "MachineWorkEfficiency" + i.ToString();
+ rd2.Width = Unit.Pixel(100);
+ rd2.DataField = "MachineWorkEfficiency" + i.ToString();
+ rd2.FieldType = FieldType.Double;
+ rd2.HeaderText = "工效";
+ rd2.HeaderTextAlign = TextAlign.Center;
+ gf.Columns.Add(rd2);
+ gf2.Columns.Add(gf);
+ }
+ Grid1.Columns.Add(gf2);
+ }
+ #endregion
+
+ #region 加载
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ string contractNo = Request.Params["contractNo"];
+ string professional = Request.Params["professional"];
+ string constructionLogId = Request.Params["ConstructionLogId"];
+ List contractNoList = Funs.GetStrListByStr(contractNo, ',');
+ List professionalList = Funs.GetStrListByStr(professional, ',');
+ List workPostIds = Funs.GetStrListByStr(Request.Params["WorkPostId"], ',');
+ List machineIds = Funs.GetStrListByStr(Request.Params["MachineId"], ',');
+ DataTable table = BLL.PhtglContractTrackService.GetAllTreeDataTable(this.CurrUser.LoginProjectId, string.Empty, contractNoList, professionalList, workPostIds, machineIds, constructionLogId);
+ Grid1.DataSource = table;
+ Grid1.DataBind();
+ for (int i = 0; i < this.Grid1.Rows.Count; i++)
+ {
+ if (string.IsNullOrEmpty(this.Grid1.Rows[i].DataKeys[2].ToString()))
+ {
+ foreach (GridColumn column in Grid1.Columns)
+ {
+ if (column.ColumnIndex != 0 && column.ColumnIndex != 1 && column.ColumnIndex != 2)
+ {
+ if (column.ColumnIndex > 5)
+ {
+ GroupField gf1 = column as GroupField;
+ foreach (var column1 in gf1.Columns)
+ {
+ GroupField gf2 = column1 as GroupField;
+ foreach (var column2 in gf2.Columns)
+ {
+ this.Grid1.Rows[i].CellCssClasses[column2.ColumnIndex] = "f-grid-cell-uneditable";
+ }
+ }
+ }
+ else
+ {
+ this.Grid1.Rows[i].CellCssClasses[column.ColumnIndex] = "f-grid-cell-uneditable";
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ #endregion
+
+ #region 保存
+ ///
+ /// 保存按钮
+ ///
+ ///
+ ///
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ Save();
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
+ ShowNotify("保存成功!", MessageBoxIcon.Success);
+ }
+
+ private void Save()
+ {
+ string constructionLogId = Request.Params["ConstructionLogId"];
+ Model.SGGLDB db = Funs.DB;
+ var oldViewInfos = from x in db.ZHGL_ConstructionLogWorkEfficiency
+ where x.ConstructionLogId == constructionLogId
+ select x;
+ BLL.ConstructionLogWorkEfficiencyService.DeleteConstructionLogWorkEfficiencysByConstructionLogId(constructionLogId);
+ List workPostIds = Funs.GetStrListByStr(Request.Params["WorkPostId"], ',');
+ List machineIds = Funs.GetStrListByStr(Request.Params["MachineId"], ',');
+ foreach (JObject mergedRow in Grid1.GetMergedData())
+ {
+ JObject values = mergedRow.Value("values");
+ int a = mergedRow.Value("index");
+ if (this.Grid1.Rows[a].DataKeys[2] != null)
+ {
+ string physicalCompletionQuantity = values.Value("PhysicalCompletionQuantity");
+ string materialConsumption = values.Value("MaterialConsumption");
+ for (int i = 0; i < workPostIds.Count; i++)
+ {
+ Model.ZHGL_ConstructionLogWorkEfficiency workEfficiency = new Model.ZHGL_ConstructionLogWorkEfficiency();
+ workEfficiency.ConstructionLogWorkEfficiencyId = SQLHelper.GetNewID();
+ workEfficiency.ConstructionLogId = constructionLogId;
+ workEfficiency.ContractTrackId = this.Grid1.Rows[a].DataKeys[2].ToString();
+ workEfficiency.PhysicalCompletionQuantity = Funs.GetNewDecimal(physicalCompletionQuantity);
+ workEfficiency.MaterialConsumption = Funs.GetNewDecimal(materialConsumption);
+ workEfficiency.Type = "Person";
+ workEfficiency.TypeId = workPostIds[i];
+ workEfficiency.ConsumeHours = Funs.GetNewDecimal(values.Value("PersonConsumeHours" + i.ToString()));
+ BLL.ConstructionLogWorkEfficiencyService.AddConstructionLogWorkEfficiency(workEfficiency);
+ }
+ for (int i = 0; i < machineIds.Count; i++)
+ {
+ Model.ZHGL_ConstructionLogWorkEfficiency workEfficiency = new Model.ZHGL_ConstructionLogWorkEfficiency();
+ workEfficiency.ConstructionLogWorkEfficiencyId = SQLHelper.GetNewID();
+ workEfficiency.ConstructionLogId = constructionLogId;
+ workEfficiency.ContractTrackId = this.Grid1.Rows[a].DataKeys[2].ToString();
+ workEfficiency.PhysicalCompletionQuantity = Funs.GetNewDecimal(physicalCompletionQuantity);
+ workEfficiency.MaterialConsumption = Funs.GetNewDecimal(materialConsumption);
+ workEfficiency.Type = "Machine";
+ workEfficiency.TypeId = machineIds[i];
+ workEfficiency.ConsumeHours = Funs.GetNewDecimal(values.Value("MachineConsumeHours" + i.ToString()));
+ BLL.ConstructionLogWorkEfficiencyService.AddConstructionLogWorkEfficiency(workEfficiency);
+ }
+ }
+ }
+ }
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLogWorkEfficiency.aspx.designer.cs b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLogWorkEfficiency.aspx.designer.cs
new file mode 100644
index 00000000..7404df96
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLogWorkEfficiency.aspx.designer.cs
@@ -0,0 +1,96 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.PZHGL.InformationProject {
+
+
+ public partial class ConstructionLogWorkEfficiency {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar2;
+
+ ///
+ /// hdId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox hdId;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+
+ ///
+ /// nbPhysicalCompletionQuantity 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox nbPhysicalCompletionQuantity;
+
+ ///
+ /// nbMaterialConsumption 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox nbMaterialConsumption;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.cs b/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.cs
index 87511df0..f8e6631e 100644
--- a/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.cs
+++ b/SGGL/FineUIPro.Web/Personal/PersonalInfo.aspx.cs
@@ -259,6 +259,8 @@
if (string.IsNullOrEmpty(info))
{
Person_PersonsService.UpdatePerson(getData);
+ this.CurrUser.LogWorkPostId = getData.LogWorkPostId;
+ this.CurrUser.LogMachineId = getData.LogMachineId;
LogService.AddSys_Log(this.CurrUser, getData.PersonName, getData.PersonId, BLL.Const.PersonalInfoMenuId, BLL.Const.BtnModify);
Alert.ShowInParent("保存成功!", MessageBoxIcon.Success);
}
diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs
index 9caf9de9..e4022022 100644
--- a/SGGL/Model/Model.cs
+++ b/SGGL/Model/Model.cs
@@ -1730,6 +1730,9 @@ namespace Model
partial void InsertZHGL_ConstructionLogRecord(ZHGL_ConstructionLogRecord instance);
partial void UpdateZHGL_ConstructionLogRecord(ZHGL_ConstructionLogRecord instance);
partial void DeleteZHGL_ConstructionLogRecord(ZHGL_ConstructionLogRecord instance);
+ partial void InsertZHGL_ConstructionLogWorkEfficiency(ZHGL_ConstructionLogWorkEfficiency instance);
+ partial void UpdateZHGL_ConstructionLogWorkEfficiency(ZHGL_ConstructionLogWorkEfficiency instance);
+ partial void DeleteZHGL_ConstructionLogWorkEfficiency(ZHGL_ConstructionLogWorkEfficiency instance);
partial void InsertZHGL_ConstructionMonthReport(ZHGL_ConstructionMonthReport instance);
partial void UpdateZHGL_ConstructionMonthReport(ZHGL_ConstructionMonthReport instance);
partial void DeleteZHGL_ConstructionMonthReport(ZHGL_ConstructionMonthReport instance);
@@ -7101,6 +7104,14 @@ namespace Model
}
}
+ public System.Data.Linq.Table ZHGL_ConstructionLogWorkEfficiency
+ {
+ get
+ {
+ return this.GetTable();
+ }
+ }
+
public System.Data.Linq.Table ZHGL_ConstructionMonthReport
{
get
@@ -39427,10 +39438,10 @@ namespace Model
private string _SaveHandleMan;
- private string _WorkPackageName;
-
private string _WorkPackageId;
+ private string _WorkPackageName;
+
private EntityRef _Base_Project;
private EntityRef _Person_Persons;
@@ -39487,10 +39498,10 @@ namespace Model
partial void OnProposeUnitIdChanged();
partial void OnSaveHandleManChanging(string value);
partial void OnSaveHandleManChanged();
- partial void OnWorkPackageNameChanging(string value);
- partial void OnWorkPackageNameChanged();
partial void OnWorkPackageIdChanging(string value);
partial void OnWorkPackageIdChanged();
+ partial void OnWorkPackageNameChanging(string value);
+ partial void OnWorkPackageNameChanged();
#endregion
public Check_CheckControl()
@@ -39969,26 +39980,6 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageName", DbType="NVarChar(2000)")]
- public string WorkPackageName
- {
- get
- {
- return this._WorkPackageName;
- }
- set
- {
- if ((this._WorkPackageName != value))
- {
- this.OnWorkPackageNameChanging(value);
- this.SendPropertyChanging();
- this._WorkPackageName = value;
- this.SendPropertyChanged("WorkPackageName");
- this.OnWorkPackageNameChanged();
- }
- }
- }
-
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageId", DbType="NVarChar(2000)")]
public string WorkPackageId
{
@@ -40009,6 +40000,26 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageName", DbType="NVarChar(2000)")]
+ public string WorkPackageName
+ {
+ get
+ {
+ return this._WorkPackageName;
+ }
+ set
+ {
+ if ((this._WorkPackageName != value))
+ {
+ this.OnWorkPackageNameChanging(value);
+ this.SendPropertyChanging();
+ this._WorkPackageName = value;
+ this.SendPropertyChanged("WorkPackageName");
+ this.OnWorkPackageNameChanged();
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_CheckControl_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
public Base_Project Base_Project
{
@@ -100676,10 +100687,10 @@ namespace Model
private string _HazardValue;
- private string _WorkPackageName;
-
private string _WorkPackageId;
+ private string _WorkPackageName;
+
private EntityRef _Base_Unit;
private EntityRef _HSSE_Hazard_HazardRegisterTypes;
@@ -100780,10 +100791,10 @@ namespace Model
partial void OnRegisterTypes4IdChanged();
partial void OnHazardValueChanging(string value);
partial void OnHazardValueChanged();
- partial void OnWorkPackageNameChanging(string value);
- partial void OnWorkPackageNameChanged();
partial void OnWorkPackageIdChanging(string value);
partial void OnWorkPackageIdChanged();
+ partial void OnWorkPackageNameChanging(string value);
+ partial void OnWorkPackageNameChanged();
#endregion
public HSSE_Hazard_HazardRegister()
@@ -101721,26 +101732,6 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageName", DbType="NVarChar(2000)")]
- public string WorkPackageName
- {
- get
- {
- return this._WorkPackageName;
- }
- set
- {
- if ((this._WorkPackageName != value))
- {
- this.OnWorkPackageNameChanging(value);
- this.SendPropertyChanging();
- this._WorkPackageName = value;
- this.SendPropertyChanged("WorkPackageName");
- this.OnWorkPackageNameChanged();
- }
- }
- }
-
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageId", DbType="NVarChar(2000)")]
public string WorkPackageId
{
@@ -101761,6 +101752,26 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageName", DbType="NVarChar(2000)")]
+ public string WorkPackageName
+ {
+ get
+ {
+ return this._WorkPackageName;
+ }
+ set
+ {
+ if ((this._WorkPackageName != value))
+ {
+ this.OnWorkPackageNameChanging(value);
+ this.SendPropertyChanging();
+ this._WorkPackageName = value;
+ this.SendPropertyChanged("WorkPackageName");
+ this.OnWorkPackageNameChanged();
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HSSE_Hazard_HazardRegister_Base_Unit", Storage="_Base_Unit", ThisKey="ResponsibleUnit", OtherKey="UnitId", IsForeignKey=true)]
public Base_Unit Base_Unit
{
@@ -181850,6 +181861,8 @@ namespace Model
private string _ProjectId;
+ private EntitySet _ZHGL_ConstructionLogWorkEfficiency;
+
#region 可扩展性方法定义
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@@ -181916,6 +181929,7 @@ namespace Model
public PHTGL_ContractTrack()
{
+ this._ZHGL_ConstructionLogWorkEfficiency = new EntitySet(new Action(this.attach_ZHGL_ConstructionLogWorkEfficiency), new Action(this.detach_ZHGL_ConstructionLogWorkEfficiency));
OnCreated();
}
@@ -182499,6 +182513,19 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ZHGL_ConstructionLogWorkEfficiency_PHTGL_ContractTrack", Storage="_ZHGL_ConstructionLogWorkEfficiency", ThisKey="Id", OtherKey="ContractTrackId", DeleteRule="NO ACTION")]
+ public EntitySet ZHGL_ConstructionLogWorkEfficiency
+ {
+ get
+ {
+ return this._ZHGL_ConstructionLogWorkEfficiency;
+ }
+ set
+ {
+ this._ZHGL_ConstructionLogWorkEfficiency.Assign(value);
+ }
+ }
+
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
@@ -182518,6 +182545,18 @@ namespace Model
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
+
+ private void attach_ZHGL_ConstructionLogWorkEfficiency(ZHGL_ConstructionLogWorkEfficiency entity)
+ {
+ this.SendPropertyChanging();
+ entity.PHTGL_ContractTrack = this;
+ }
+
+ private void detach_ZHGL_ConstructionLogWorkEfficiency(ZHGL_ConstructionLogWorkEfficiency entity)
+ {
+ this.SendPropertyChanging();
+ entity.PHTGL_ContractTrack = null;
+ }
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.PHTGL_ContractTrackMatchWBS")]
@@ -305284,6 +305323,277 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ZHGL_ConstructionLogWorkEfficiency")]
+ public partial class ZHGL_ConstructionLogWorkEfficiency : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+
+ private string _ConstructionLogWorkEfficiencyId;
+
+ private string _ConstructionLogId;
+
+ private string _ContractTrackId;
+
+ private System.Nullable _PhysicalCompletionQuantity;
+
+ private System.Nullable _MaterialConsumption;
+
+ private string _Type;
+
+ private string _TypeId;
+
+ private System.Nullable _ConsumeHours;
+
+ private EntityRef _PHTGL_ContractTrack;
+
+ #region 可扩展性方法定义
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnConstructionLogWorkEfficiencyIdChanging(string value);
+ partial void OnConstructionLogWorkEfficiencyIdChanged();
+ partial void OnConstructionLogIdChanging(string value);
+ partial void OnConstructionLogIdChanged();
+ partial void OnContractTrackIdChanging(string value);
+ partial void OnContractTrackIdChanged();
+ partial void OnPhysicalCompletionQuantityChanging(System.Nullable value);
+ partial void OnPhysicalCompletionQuantityChanged();
+ partial void OnMaterialConsumptionChanging(System.Nullable value);
+ partial void OnMaterialConsumptionChanged();
+ partial void OnTypeChanging(string value);
+ partial void OnTypeChanged();
+ partial void OnTypeIdChanging(string value);
+ partial void OnTypeIdChanged();
+ partial void OnConsumeHoursChanging(System.Nullable value);
+ partial void OnConsumeHoursChanged();
+ #endregion
+
+ public ZHGL_ConstructionLogWorkEfficiency()
+ {
+ this._PHTGL_ContractTrack = default(EntityRef);
+ OnCreated();
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionLogWorkEfficiencyId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
+ public string ConstructionLogWorkEfficiencyId
+ {
+ get
+ {
+ return this._ConstructionLogWorkEfficiencyId;
+ }
+ set
+ {
+ if ((this._ConstructionLogWorkEfficiencyId != value))
+ {
+ this.OnConstructionLogWorkEfficiencyIdChanging(value);
+ this.SendPropertyChanging();
+ this._ConstructionLogWorkEfficiencyId = value;
+ this.SendPropertyChanged("ConstructionLogWorkEfficiencyId");
+ this.OnConstructionLogWorkEfficiencyIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionLogId", DbType="NVarChar(50)")]
+ public string ConstructionLogId
+ {
+ get
+ {
+ return this._ConstructionLogId;
+ }
+ set
+ {
+ if ((this._ConstructionLogId != value))
+ {
+ this.OnConstructionLogIdChanging(value);
+ this.SendPropertyChanging();
+ this._ConstructionLogId = value;
+ this.SendPropertyChanged("ConstructionLogId");
+ this.OnConstructionLogIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractTrackId", DbType="VarChar(50)")]
+ public string ContractTrackId
+ {
+ get
+ {
+ return this._ContractTrackId;
+ }
+ set
+ {
+ if ((this._ContractTrackId != value))
+ {
+ if (this._PHTGL_ContractTrack.HasLoadedOrAssignedValue)
+ {
+ throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+ }
+ this.OnContractTrackIdChanging(value);
+ this.SendPropertyChanging();
+ this._ContractTrackId = value;
+ this.SendPropertyChanged("ContractTrackId");
+ this.OnContractTrackIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PhysicalCompletionQuantity", DbType="Decimal(18,2)")]
+ public System.Nullable PhysicalCompletionQuantity
+ {
+ get
+ {
+ return this._PhysicalCompletionQuantity;
+ }
+ set
+ {
+ if ((this._PhysicalCompletionQuantity != value))
+ {
+ this.OnPhysicalCompletionQuantityChanging(value);
+ this.SendPropertyChanging();
+ this._PhysicalCompletionQuantity = value;
+ this.SendPropertyChanged("PhysicalCompletionQuantity");
+ this.OnPhysicalCompletionQuantityChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialConsumption", DbType="Decimal(18,2)")]
+ public System.Nullable MaterialConsumption
+ {
+ get
+ {
+ return this._MaterialConsumption;
+ }
+ set
+ {
+ if ((this._MaterialConsumption != value))
+ {
+ this.OnMaterialConsumptionChanging(value);
+ this.SendPropertyChanging();
+ this._MaterialConsumption = value;
+ this.SendPropertyChanged("MaterialConsumption");
+ this.OnMaterialConsumptionChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Type", DbType="NVarChar(20)")]
+ public string Type
+ {
+ get
+ {
+ return this._Type;
+ }
+ set
+ {
+ if ((this._Type != value))
+ {
+ this.OnTypeChanging(value);
+ this.SendPropertyChanging();
+ this._Type = value;
+ this.SendPropertyChanged("Type");
+ this.OnTypeChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TypeId", DbType="NVarChar(50)")]
+ public string TypeId
+ {
+ get
+ {
+ return this._TypeId;
+ }
+ set
+ {
+ if ((this._TypeId != value))
+ {
+ this.OnTypeIdChanging(value);
+ this.SendPropertyChanging();
+ this._TypeId = value;
+ this.SendPropertyChanged("TypeId");
+ this.OnTypeIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConsumeHours", DbType="Decimal(18,2)")]
+ public System.Nullable ConsumeHours
+ {
+ get
+ {
+ return this._ConsumeHours;
+ }
+ set
+ {
+ if ((this._ConsumeHours != value))
+ {
+ this.OnConsumeHoursChanging(value);
+ this.SendPropertyChanging();
+ this._ConsumeHours = value;
+ this.SendPropertyChanged("ConsumeHours");
+ this.OnConsumeHoursChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ZHGL_ConstructionLogWorkEfficiency_PHTGL_ContractTrack", Storage="_PHTGL_ContractTrack", ThisKey="ContractTrackId", OtherKey="Id", IsForeignKey=true)]
+ public PHTGL_ContractTrack PHTGL_ContractTrack
+ {
+ get
+ {
+ return this._PHTGL_ContractTrack.Entity;
+ }
+ set
+ {
+ PHTGL_ContractTrack previousValue = this._PHTGL_ContractTrack.Entity;
+ if (((previousValue != value)
+ || (this._PHTGL_ContractTrack.HasLoadedOrAssignedValue == false)))
+ {
+ this.SendPropertyChanging();
+ if ((previousValue != null))
+ {
+ this._PHTGL_ContractTrack.Entity = null;
+ previousValue.ZHGL_ConstructionLogWorkEfficiency.Remove(this);
+ }
+ this._PHTGL_ContractTrack.Entity = value;
+ if ((value != null))
+ {
+ value.ZHGL_ConstructionLogWorkEfficiency.Add(this);
+ this._ContractTrackId = value.Id;
+ }
+ else
+ {
+ this._ContractTrackId = default(string);
+ }
+ this.SendPropertyChanged("PHTGL_ContractTrack");
+ }
+ }
+ }
+
+ public event PropertyChangingEventHandler PropertyChanging;
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ protected virtual void SendPropertyChanging()
+ {
+ if ((this.PropertyChanging != null))
+ {
+ this.PropertyChanging(this, emptyChangingEventArgs);
+ }
+ }
+
+ protected virtual void SendPropertyChanged(String propertyName)
+ {
+ if ((this.PropertyChanged != null))
+ {
+ this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ZHGL_ConstructionMonthReport")]
public partial class ZHGL_ConstructionMonthReport : INotifyPropertyChanging, INotifyPropertyChanged
{