diff --git a/DataBase/版本日志/SGGLDB_V2023-11-29.sql b/DataBase/版本日志/SGGLDB_V2023-11-29.sql
new file mode 100644
index 00000000..91b9c864
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2023-11-29.sql
@@ -0,0 +1,53 @@
+
+CREATE TABLE [dbo].[ZHGL_ConstructionLogHJGL](
+ [ConstructionLogHJGLId] [nvarchar](50) NOT NULL,
+ [ConstructionLogId] [nvarchar](50) NULL,
+ [UnitWorkId] [nvarchar](50) NULL,
+ [TodayCompleteSize] [decimal](18, 3) NULL,
+ [TotalCompleteSize] [decimal](18, 3) NULL,
+ [TotalSize] [decimal](18, 3) NULL,
+ [TotalRate] [nvarchar](20) NULL,
+ [TomorrowPlanSize] [decimal](18, 3) NULL,
+ CONSTRAINT [PK_ZHGL_ConstructionLogHJGL] PRIMARY KEY CLUSTERED
+(
+ [ConstructionLogHJGLId] 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
+
+ALTER TABLE [dbo].[ZHGL_ConstructionLogHJGL] WITH CHECK ADD CONSTRAINT [FK_ZHGL_ConstructionLogHJGL_ZHGL_ConstructionLog] FOREIGN KEY([ConstructionLogId])
+REFERENCES [dbo].[ZHGL_ConstructionLog] ([ConstructionLogId])
+GO
+
+ALTER TABLE [dbo].[ZHGL_ConstructionLogHJGL] CHECK CONSTRAINT [FK_ZHGL_ConstructionLogHJGL_ZHGL_ConstructionLog]
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionLogHJGL', @level2type=N'COLUMN',@level2name=N'ConstructionLogHJGLId'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionLogHJGL', @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_ConstructionLogHJGL', @level2type=N'COLUMN',@level2name=N'UnitWorkId'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ɴ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionLogHJGL', @level2type=N'COLUMN',@level2name=N'TodayCompleteSize'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ۼɴ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionLogHJGL', @level2type=N'COLUMN',@level2name=N'TotalCompleteSize'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ܴ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionLogHJGL', @level2type=N'COLUMN',@level2name=N'TotalSize'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ۼɰٷֱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionLogHJGL', @level2type=N'COLUMN',@level2name=N'TotalRate'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ռƻ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionLogHJGL', @level2type=N'COLUMN',@level2name=N'TomorrowPlanSize'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʩ־ݱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionLogHJGL'
+GO
+
+
diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj
index b8bfa829..0ee1899e 100644
--- a/SGGL/BLL/BLL.csproj
+++ b/SGGL/BLL/BLL.csproj
@@ -644,6 +644,7 @@
+
diff --git a/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs b/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs
index 0172d0a1..e1471476 100644
--- a/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs
+++ b/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs
@@ -1,5 +1,5 @@
using FineUIPro;
-
+
using System;
using System.Collections;
using System.Collections.Generic;
@@ -75,7 +75,7 @@ namespace BLL
IQueryable q1 = (from x in db.HJGL_PackagingManage
join y in db.HJGL_Pipeline_Component on x.PipelineComponentId equals y.PipelineComponentId
join z in db.HJGL_Pipeline on y.PipelineId equals z.PipelineId
- select x
+ select x
);
if (!string.IsNullOrEmpty(name))
{
@@ -121,7 +121,7 @@ namespace BLL
}
return PlanStartDate;
}
- public static List GetPackagingManageList(string projectId,string PackagingCode)
+ public static List GetPackagingManageList(string projectId, string PackagingCode)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
@@ -131,7 +131,7 @@ namespace BLL
join m in db.Person_Persons on x.ReceiveMan equals m.PersonId into tt
from t in tt.DefaultIfEmpty()
where x.ProjectId == projectId
- &&(string.IsNullOrEmpty(PackagingCode)|| x.PackagingCode.Contains(PackagingCode) )
+ && (string.IsNullOrEmpty(PackagingCode) || x.PackagingCode.Contains(PackagingCode))
select new PackagingManageItem
{
PackagingManageId = x.PackagingManageId,
@@ -142,7 +142,7 @@ namespace BLL
StackingPosition = x.StackingPosition,
State = x.State,
ReceiveMan = t.PersonName,
- ReceiveDate = string.Format("{0:g}", x.ReceiveDate),
+ ReceiveDate = x.ReceiveDate.HasValue ? string.Format("{0:g}", x.ReceiveDate) : "",
PlanStartDate = GetMinPlanStartDate(x.PackagingManageId),
}).Distinct();
@@ -156,8 +156,8 @@ namespace BLL
///
public static void PutOutOrder(string PackagingManageId)
{
- var model= GetHJGL_PackagingManageById(PackagingManageId);
- if (model.State==state_0)
+ var model = GetHJGL_PackagingManageById(PackagingManageId);
+ if (model.State == state_0)
{
model.State = state_1;
UpdateHJGL_PackagingManage(model);
@@ -173,7 +173,7 @@ namespace BLL
{
DataTable tb = new DataTable();
var model = GetHJGL_PackagingManageById(PackagingManageId);
- if (!string .IsNullOrEmpty(model.PipelineComponentId))
+ if (!string.IsNullOrEmpty(model.PipelineComponentId))
{
var PipelineComponentIds = model.PipelineComponentId.Split(',');
string strSql = @"select com.PipelineComponentId, com.PipelineComponentCode,pipe.PlanStartDate,unitwork.UnitWorkName,'1' as num ,'个' as CU
@@ -185,7 +185,7 @@ namespace BLL
strSql += string.Format("where com.PipelineComponentId in ( {0}) ", "'" + string.Join("','", PipelineComponentIds) + "'");
SqlParameter[] parameter = listStr.ToArray();
tb = SQLHelper.GetDataTableRunText(strSql, parameter);
- }
+ }
return tb;
}
@@ -195,7 +195,7 @@ namespace BLL
///
///
///
- public static List GetPackagingCode(string projectid)
+ public static List GetPackagingCode(string projectid)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.HJGL_PackagingManage
@@ -244,8 +244,8 @@ namespace BLL
table.ContactName = newtable.ContactName;
table.ContactPhone = newtable.ContactPhone;
table.Remark = newtable.Remark;
- table.ReceiveMan=newtable.ReceiveMan;
- table.ReceiveDate=newtable.ReceiveDate;
+ table.ReceiveMan = newtable.ReceiveMan;
+ table.ReceiveDate = newtable.ReceiveDate;
db.SubmitChanges();
}
diff --git a/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs b/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs
index 8949031b..24e91bfd 100644
--- a/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs
+++ b/SGGL/BLL/HJGL/WeldingManage/WeldingDailyService.cs
@@ -322,6 +322,14 @@ namespace BLL
updateWeldJoint.BackingWelderId = null;
BLL.WeldJointService.UpdateWeldJoint(updateWeldJoint);
+ var weldTask = BLL.WeldTaskService.GetWeldTaskByWeldJointId(weldJointId);
+ if (weldTask != null)
+ {
+ weldTask.CoverWelderId = null;
+ weldTask.BackingWelderId = null;
+ BLL.WeldTaskService.UpdateWeldTask(weldTask);
+ }
+
var pointBatchItems = from x in Funs.DB.HJGL_Batch_PointBatchItem where x.WeldJointId == weldJointId select x;
string pointBatchId = pointBatchItems.FirstOrDefault().PointBatchId;
diff --git a/SGGL/BLL/PZHGL/InformationProject/ConstructionLogHJGLService.cs b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogHJGLService.cs
new file mode 100644
index 00000000..65e9c06e
--- /dev/null
+++ b/SGGL/BLL/PZHGL/InformationProject/ConstructionLogHJGLService.cs
@@ -0,0 +1,69 @@
+using System.Collections.Generic;
+using System.Linq;
+
+namespace BLL
+{
+ public class ConstructionLogHJGLService
+ {
+ public static Model.SGGLDB db = Funs.DB;
+
+ ///
+ /// 获取施工日志焊接数据明细列表
+ ///
+ ///
+ ///
+ ///
+ public static List getListData(string ConstructionLogId)
+ {
+ return (from x in db.ZHGL_ConstructionLogHJGL
+ where x.ConstructionLogId == ConstructionLogId
+ select x).ToList();
+ }
+
+ ///
+ /// 增加施工日志焊接数据明细
+ ///
+ /// 施工日志焊接数据明细实体
+ public static void AddConstructionLogHJGL(Model.ZHGL_ConstructionLogHJGL constructionLogHJGL)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.ZHGL_ConstructionLogHJGL newConstructionLogHJGL = new Model.ZHGL_ConstructionLogHJGL();
+ newConstructionLogHJGL.ConstructionLogHJGLId = constructionLogHJGL.ConstructionLogHJGLId;
+ newConstructionLogHJGL.ConstructionLogId = constructionLogHJGL.ConstructionLogId;
+ newConstructionLogHJGL.UnitWorkId = constructionLogHJGL.UnitWorkId;
+ newConstructionLogHJGL.TodayCompleteSize = constructionLogHJGL.TodayCompleteSize;
+ newConstructionLogHJGL.TotalCompleteSize = constructionLogHJGL.TotalCompleteSize;
+ newConstructionLogHJGL.TotalSize = constructionLogHJGL.TotalSize;
+ newConstructionLogHJGL.TotalRate = constructionLogHJGL.TotalRate;
+ newConstructionLogHJGL.TomorrowPlanSize = constructionLogHJGL.TomorrowPlanSize;
+
+ db.ZHGL_ConstructionLogHJGL.InsertOnSubmit(newConstructionLogHJGL);
+ db.SubmitChanges();
+ }
+
+ ///
+ /// 根据月报id删除对应的所有施工日志焊接数据明细
+ ///
+ /// 施工日志焊接数据明细编号
+ public static void DeleteConstructionLogHJGLsByConstructionLogId(string ConstructionLogId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ var q = (from x in db.ZHGL_ConstructionLogHJGL where x.ConstructionLogId == ConstructionLogId select x).ToList();
+ if (q.Count() > 0)
+ {
+ db.ZHGL_ConstructionLogHJGL.DeleteAllOnSubmit(q);
+ db.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据月报id获取对应的所有施工日志焊接数据明细
+ ///
+ /// 施工日志焊接数据明细编号
+ public static List GetConstructionLogHJGLsByConstructionLogId(string ConstructionLogId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ return (from x in db.ZHGL_ConstructionLogHJGL where x.ConstructionLogId == ConstructionLogId orderby x.UnitWorkId select x).ToList();
+ }
+ }
+}
diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs
index f1ccd769..07bfc41e 100644
--- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointEdit.aspx.cs
@@ -876,7 +876,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
SaveData(false);
}
- PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/WeldJoint&menuId={1}", WeldJointId, BLL.Const.HJGL_WeldJointMenuId)));
+ PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/WeldJoint&menuId={1}", WeldJointId, BLL.Const.HJGL_JotTwoDesignMenuId)));
}
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs
index b23ca5a5..5a5b93ba 100644
--- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs
@@ -231,7 +231,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
{
var weldJointIds = (from x in list
where x.UnitWorkId == this.UnitWorkId && x.TaskDate.Value.Date <= Convert.ToDateTime(txtWeldingDate.Text)
- && x.WeldingDailyId == null /*&& x.CoverWelderId != null && x.BackingWelderId != null*/
+ && x.WeldingDailyId == null
select x).ToList();
weldJointIds = weldJointIds.GroupBy(x => x.WeldJointId, (key, group) => group.OrderByDescending(x => x.TaskDate).First()).ToList();
task = weldJointIds;
diff --git a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLog.aspx b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLog.aspx
index c9d8d7f5..23e308e4 100644
--- a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLog.aspx
+++ b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLog.aspx
@@ -145,6 +145,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
("values");
+ sumTodayCompleteSize += Funs.GetNewDecimalOrZero(values.Value("TodayCompleteSize"));
+ sumTotalCompleteSize += Funs.GetNewDecimalOrZero(values.Value("TotalCompleteSize"));
+ sumTotalSize += Funs.GetNewDecimalOrZero(values.Value("TotalSize"));
+ sumTomorrowPlanSize += Funs.GetNewDecimalOrZero(values.Value("TomorrowPlanSize"));
+ }
+ string sumRate = "/";
+ if (sumTotalSize > 0)
+ {
+ sumRate = decimal.Round(sumTotalCompleteSize / sumTotalSize * 100, 2) + "%";
+ }
+ JObject summary3 = new JObject();
+ summary3.Add("UnitWorkName", "合计");
+ summary3.Add("TodayCompleteSize", sumTodayCompleteSize);
+ summary3.Add("TotalCompleteSize", sumTotalCompleteSize);
+ summary3.Add("TotalSize", sumTotalSize);
+ summary3.Add("TotalRate", sumRate);
+ summary3.Add("TomorrowPlanSize", sumTomorrowPlanSize);
+ Grid6.SummaryData = summary3;
}
#region 加载树装置-单位-工作区
@@ -563,6 +585,17 @@ namespace FineUIPro.Web.PZHGL.InformationProject
this.Grid5.DataSource = records;
this.Grid5.DataBind();
}
+ var hjgls = BLL.ConstructionLogHJGLService.GetConstructionLogHJGLsByConstructionLogId(ConstructionLogId);
+ if (hjgls.Count > 0)
+ {
+ this.Grid6.DataSource = hjgls;
+ this.Grid6.DataBind();
+ }
+ else
+ {
+ this.Grid6.DataSource = null;
+ this.Grid6.DataBind();
+ }
ChangeText();
OutputSummaryData();
}
@@ -667,6 +700,7 @@ namespace FineUIPro.Web.PZHGL.InformationProject
this.Grid5.DataBind();
drpUnitWork_SelectedIndexChanged(null, null);
ChangeText();
+ OutputSummaryData();
}
private void TextEmpty()
@@ -700,6 +734,8 @@ namespace FineUIPro.Web.PZHGL.InformationProject
this.Grid4.DataBind();
this.Grid5.DataSource = null;
this.Grid5.DataBind();
+ this.Grid6.DataSource = null;
+ this.Grid6.DataBind();
}
#endregion
@@ -1084,6 +1120,7 @@ namespace FineUIPro.Web.PZHGL.InformationProject
sheet.AddMergedRegion(new CellRangeAddress(8, 8, 0, 1 + list.Count));
int rowCount = 10;
List unitWorklist = Funs.GetStrListByStr(log.UnitWorks, ',');
+ int[] sum1 = new int[list.Count];
for (int i = 0; i < unitWorklist.Count; i++)
{
row1 = sheet.GetRow(rowCount + i);
@@ -1101,10 +1138,25 @@ namespace FineUIPro.Web.PZHGL.InformationProject
if (person != null && person.Num != null)
{
cell3.SetCellValue(person.Num.ToString());
+ sum1[j] += Funs.GetNewIntOrZero(person.Num.ToString());
}
}
}
rowCount += unitWorklist.Count;
+ row1 = sheet.GetRow(rowCount);
+ cell3 = row1.CreateCell(0);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("");
+ cell3 = row1.CreateCell(1);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("合计");
+ for (int i = 0; i < sum1.Length; i++)
+ {
+ cell3 = row1.CreateCell(i + 2);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(sum1[i].ToString());
+ }
+ rowCount++;
int rowMachineTitle = rowCount;
row1 = sheet.GetRow(rowCount);
cell3 = row1.CreateCell(0);
@@ -1130,6 +1182,7 @@ namespace FineUIPro.Web.PZHGL.InformationProject
cell3.CellStyle = cellStyle0;
sheet.AddMergedRegion(new CellRangeAddress(rowMachineTitle, rowMachineTitle, 0, 1 + list2.Count));
rowCount++;
+ int[] sum2 = new int[list2.Count];
for (int i = 0; i < unitWorklist.Count; i++)
{
row1 = sheet.GetRow(rowCount + i);
@@ -1147,12 +1200,126 @@ namespace FineUIPro.Web.PZHGL.InformationProject
if (machine != null && machine.Num != null)
{
cell3.SetCellValue(machine.Num.ToString());
+ sum2[j] += Funs.GetNewIntOrZero(machine.Num.ToString());
}
}
}
rowCount += unitWorklist.Count;
row1 = sheet.GetRow(rowCount);
cell3 = row1.CreateCell(0);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("");
+ cell3 = row1.CreateCell(1);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("合计");
+ for (int i = 0; i < sum2.Length; i++)
+ {
+ cell3 = row1.CreateCell(i + 2);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(sum2[i].ToString());
+ }
+ rowCount++;
+ int rowHJGLTitle = rowCount;
+ row1 = sheet.GetRow(rowCount);
+ cell3 = row1.CreateCell(0);
+ cell3.CellStyle = cellStyle3;
+ cell3.SetCellValue("焊接数据");
+ rowCount++;
+ row1 = sheet.GetRow(rowCount);
+ cell3 = row1.CreateCell(0);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("序号");
+ cell3 = row1.CreateCell(1);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("单位工程");
+ cell3 = row1.CreateCell(2);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("今日完成(DIN)");
+ cell3 = row1.CreateCell(3);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("累计完成(DIN)");
+ cell3 = row1.CreateCell(4);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("总量(DIN)");
+ cell3 = row1.CreateCell(5);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("累计完成百分比");
+ cell3 = row1.CreateCell(6);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("明日计划(DIN)");
+ row1 = sheet.GetRow(rowHJGLTitle);
+ cell3 = row1.CreateCell(6);
+ cell3.CellStyle = cellStyle0;
+ sheet.AddMergedRegion(new CellRangeAddress(rowHJGLTitle, rowHJGLTitle, 0, 6));
+ rowCount++;
+ var hjgls = (from x in db.ZHGL_ConstructionLogHJGL
+ where x.ConstructionLogId == constructionLogId
+ orderby x.UnitWorkId
+ select x).ToList();
+ if (hjgls.Count > 0)
+ {
+ decimal sumTodayCompleteSize = 0, sumTotalCompleteSize = 0, sumTotalSize = 0, sumTomorrowPlanSize = 0;
+ for (int i = 0; i < hjgls.Count; i++)
+ {
+ row1 = sheet.GetRow(rowCount + i);
+ cell3 = row1.CreateCell(0);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue((i + 1).ToString());
+ cell3 = row1.CreateCell(1);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(BLL.UnitWorkService.GetUnitWorkName(hjgls[i].UnitWorkId));
+ cell3 = row1.CreateCell(2);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(hjgls[i].TodayCompleteSize.Value.ToString("0.###"));
+ cell3 = row1.CreateCell(3);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(hjgls[i].TotalCompleteSize.Value.ToString("0.###"));
+ cell3 = row1.CreateCell(4);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(hjgls[i].TotalSize.Value.ToString("0.###"));
+ cell3 = row1.CreateCell(5);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(hjgls[i].TotalRate);
+ cell3 = row1.CreateCell(6);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(hjgls[i].TomorrowPlanSize.Value.ToString("0.###"));
+ sumTodayCompleteSize += hjgls[i].TodayCompleteSize.Value;
+ sumTotalCompleteSize += hjgls[i].TotalCompleteSize.Value;
+ sumTotalSize += hjgls[i].TotalSize.Value;
+ sumTomorrowPlanSize += hjgls[i].TomorrowPlanSize.Value;
+ }
+ rowCount += hjgls.Count;
+ row1 = sheet.GetRow(rowCount);
+ cell3 = row1.CreateCell(0);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("");
+ cell3 = row1.CreateCell(1);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("合计");
+ cell3 = row1.CreateCell(2);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(sumTodayCompleteSize.ToString("0.###"));
+ cell3 = row1.CreateCell(3);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(sumTotalCompleteSize.ToString("0.###"));
+ cell3 = row1.CreateCell(4);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(sumTotalSize.ToString("0.###"));
+ cell3 = row1.CreateCell(5);
+ cell3.CellStyle = cellStyle0;
+ string sumRate = "/";
+ if (sumTotalSize > 0)
+ {
+ sumRate = decimal.Round(sumTotalCompleteSize / sumTotalSize * 100, 2) + "%";
+ }
+ cell3.SetCellValue(sumRate);
+ cell3 = row1.CreateCell(6);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(sumTomorrowPlanSize.ToString("0.###"));
+ rowCount++;
+ }
+ row1 = sheet.GetRow(rowCount);
+ cell3 = row1.CreateCell(0);
cell3.CellStyle = cellStyle3;
cell3.SetCellValue("专业管理");
cell3 = row1.CreateCell(2);
@@ -1932,6 +2099,22 @@ namespace FineUIPro.Web.PZHGL.InformationProject
newItem.Remark = values.Value("Remark");
ConstructionLogRecordService.AddConstructionLogRecord(newItem);
}
+ BLL.ConstructionLogHJGLService.DeleteConstructionLogHJGLsByConstructionLogId(this.ConstructionLogId);
+ foreach (JObject mergedRow in Grid6.GetMergedData()) //需要协调解决的问题
+ {
+ Model.ZHGL_ConstructionLogHJGL newItem = new Model.ZHGL_ConstructionLogHJGL();
+ int i = mergedRow.Value("index");
+ JObject values = mergedRow.Value("values");
+ newItem.ConstructionLogHJGLId = SQLHelper.GetNewID();
+ newItem.ConstructionLogId = this.ConstructionLogId;
+ newItem.UnitWorkId = values.Value("UnitWorkId");
+ newItem.TodayCompleteSize = Funs.GetNewDecimalOrZero(values.Value("TodayCompleteSize"));
+ newItem.TotalCompleteSize = Funs.GetNewDecimalOrZero(values.Value("TotalCompleteSize"));
+ newItem.TotalSize = Funs.GetNewDecimalOrZero(values.Value("TotalSize"));
+ newItem.TotalRate = values.Value("TotalRate");
+ newItem.TomorrowPlanSize = Funs.GetNewDecimalOrZero(values.Value("TomorrowPlanSize"));
+ ConstructionLogHJGLService.AddConstructionLogHJGL(newItem);
+ }
ShowNotify("保存成功!", MessageBoxIcon.Success);
InitTreeMenu();
}
@@ -1987,6 +2170,7 @@ namespace FineUIPro.Web.PZHGL.InformationProject
BLL.ConstructionLogWorkEfficiencyService.DeleteConstructionLogWorkEfficiencysByConstructionLogId(ConstructionLogId);
BLL.ConstructionLogPersonService.DeleteConstructionLogPersonsByConstructionLogId(ConstructionLogId);
BLL.ConstructionLogMachineService.DeleteConstructionLogMachinesByConstructionLogId(ConstructionLogId);
+ BLL.ConstructionLogHJGLService.DeleteConstructionLogHJGLsByConstructionLogId(ConstructionLogId);
BLL.ConstructionLogManagementService.DeleteConstructionLogManagementsByConstructionLogId(ConstructionLogId);
BLL.ConstructionLogProblemService.DeleteConstructionLogProblemsByConstructionLogId(ConstructionLogId);
BLL.ConstructionLogRecordService.DeleteConstructionLogRecordsByConstructionLogId(ConstructionLogId);
@@ -2064,6 +2248,8 @@ namespace FineUIPro.Web.PZHGL.InformationProject
this.Grid3.DataBind();
this.Grid4.DataSource = null;
this.Grid4.DataBind();
+ this.Grid6.DataSource = null;
+ this.Grid6.DataBind();
}
else
{
@@ -2093,6 +2279,47 @@ namespace FineUIPro.Web.PZHGL.InformationProject
}
this.Grid2.DataSource = machines;
this.Grid2.DataBind();
+ DateTime today = DateTime.Now.Date;
+ if (!string.IsNullOrEmpty(this.txtCompileDate.Text.Trim()))
+ {
+ today = Convert.ToDateTime(this.txtCompileDate.Text.Trim()).Date;
+ }
+ Model.SGGLDB db = Funs.DB;
+ var allWeldJoints = from x in db.View_HJGL_WeldJoint
+ where x.ProjectId == this.CurrUser.LoginProjectId
+ select new
+ {
+ x.UnitWorkId,
+ x.WeldJointId,
+ Size = x.Size ?? 0,
+ x.WeldingDateD,
+ };
+ List hjgls = new List();
+ foreach (var item in this.drpUnitWork.SelectedValueArray)
+ {
+ if (item != BLL.Const._Null)
+ {
+ Model.ZHGL_ConstructionLogHJGL hjgl = new Model.ZHGL_ConstructionLogHJGL();
+ hjgl.ConstructionLogHJGLId = SQLHelper.GetNewID();
+ hjgl.UnitWorkId = item;
+ hjgl.TodayCompleteSize = allWeldJoints.Where(x => x.UnitWorkId == item && x.WeldingDateD == today).ToList().Sum(x => x.Size);
+ decimal totalCompleteSize = allWeldJoints.Where(x => x.UnitWorkId == item && x.WeldingDateD <= today).ToList().Sum(x => x.Size);
+ hjgl.TotalCompleteSize = totalCompleteSize;
+ decimal totalSize = allWeldJoints.Where(x => x.UnitWorkId == item).ToList().Sum(x => x.Size);
+ hjgl.TotalSize = totalSize;
+ if (totalSize > 0)
+ {
+ hjgl.TotalRate = decimal.Round(totalCompleteSize / totalSize * 100, 2) + "%";
+ }
+ else
+ {
+ hjgl.TotalRate = "/";
+ }
+ hjgls.Add(hjgl);
+ }
+ }
+ this.Grid6.DataSource = hjgls;
+ this.Grid6.DataBind();
List managements = new List();
foreach (var item in this.drpUnitWork.SelectedValueArray)
{
diff --git a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLog.aspx.designer.cs b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLog.aspx.designer.cs
index b223ac56..950849bc 100644
--- a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLog.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLog.aspx.designer.cs
@@ -309,6 +309,33 @@ namespace FineUIPro.Web.PZHGL.InformationProject {
///
protected global::System.Web.UI.WebControls.Label Label2;
+ ///
+ /// Grid6 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid6;
+
+ ///
+ /// Label5 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label5;
+
+ ///
+ /// nbTomorrowPlanSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox nbTomorrowPlanSize;
+
///
/// Grid3 控件。
///
diff --git a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLogFileCabinet.aspx b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLogFileCabinet.aspx
index f7651d47..44d7be9c 100644
--- a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLogFileCabinet.aspx
+++ b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLogFileCabinet.aspx
@@ -132,6 +132,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
("values");
+ sumTodayCompleteSize += Funs.GetNewDecimalOrZero(values.Value("TodayCompleteSize"));
+ sumTotalCompleteSize += Funs.GetNewDecimalOrZero(values.Value("TotalCompleteSize"));
+ sumTotalSize += Funs.GetNewDecimalOrZero(values.Value("TotalSize"));
+ sumTomorrowPlanSize += Funs.GetNewDecimalOrZero(values.Value("TomorrowPlanSize"));
+ }
+ string sumRate = "/";
+ if (sumTotalSize > 0)
+ {
+ sumRate = decimal.Round(sumTotalCompleteSize / sumTotalSize * 100, 2) + "%";
+ }
+ JObject summary3 = new JObject();
+ summary3.Add("UnitWorkName", "合计");
+ summary3.Add("TodayCompleteSize", sumTodayCompleteSize);
+ summary3.Add("TotalCompleteSize", sumTotalCompleteSize);
+ summary3.Add("TotalSize", sumTotalSize);
+ summary3.Add("TotalRate", sumRate);
+ summary3.Add("TomorrowPlanSize", sumTomorrowPlanSize);
+ Grid6.SummaryData = summary3;
}
#region 加载
@@ -585,6 +607,17 @@ namespace FineUIPro.Web.PZHGL.InformationProject
this.Grid5.DataSource = records;
this.Grid5.DataBind();
}
+ var hjgls = BLL.ConstructionLogHJGLService.GetConstructionLogHJGLsByConstructionLogId(ConstructionLogId);
+ if (hjgls.Count > 0)
+ {
+ this.Grid6.DataSource = hjgls;
+ this.Grid6.DataBind();
+ }
+ else
+ {
+ this.Grid6.DataSource = null;
+ this.Grid6.DataBind();
+ }
OutputSummaryData();
}
}
@@ -1099,6 +1132,7 @@ namespace FineUIPro.Web.PZHGL.InformationProject
sheet.AddMergedRegion(new CellRangeAddress(8, 8, 0, 1 + list.Count));
int rowCount = 10;
List unitWorklist = Funs.GetStrListByStr(log.UnitWorks, ',');
+ int[] sum1 = new int[list.Count];
for (int i = 0; i < unitWorklist.Count; i++)
{
row1 = sheet.GetRow(rowCount + i);
@@ -1116,10 +1150,25 @@ namespace FineUIPro.Web.PZHGL.InformationProject
if (person != null && person.Num != null)
{
cell3.SetCellValue(person.Num.ToString());
+ sum1[j] += Funs.GetNewIntOrZero(person.Num.ToString());
}
}
}
rowCount += unitWorklist.Count;
+ row1 = sheet.GetRow(rowCount);
+ cell3 = row1.CreateCell(0);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("");
+ cell3 = row1.CreateCell(1);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("合计");
+ for (int i = 0; i < sum1.Length; i++)
+ {
+ cell3 = row1.CreateCell(i + 2);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(sum1[i].ToString());
+ }
+ rowCount++;
int rowMachineTitle = rowCount;
row1 = sheet.GetRow(rowCount);
cell3 = row1.CreateCell(0);
@@ -1145,6 +1194,7 @@ namespace FineUIPro.Web.PZHGL.InformationProject
cell3.CellStyle = cellStyle0;
sheet.AddMergedRegion(new CellRangeAddress(rowMachineTitle, rowMachineTitle, 0, 1 + list2.Count));
rowCount++;
+ int[] sum2 = new int[list2.Count];
for (int i = 0; i < unitWorklist.Count; i++)
{
row1 = sheet.GetRow(rowCount + i);
@@ -1162,12 +1212,126 @@ namespace FineUIPro.Web.PZHGL.InformationProject
if (machine != null && machine.Num != null)
{
cell3.SetCellValue(machine.Num.ToString());
+ sum2[j] += Funs.GetNewIntOrZero(machine.Num.ToString());
}
}
}
rowCount += unitWorklist.Count;
row1 = sheet.GetRow(rowCount);
cell3 = row1.CreateCell(0);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("");
+ cell3 = row1.CreateCell(1);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("合计");
+ for (int i = 0; i < sum2.Length; i++)
+ {
+ cell3 = row1.CreateCell(i + 2);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(sum2[i].ToString());
+ }
+ rowCount++;
+ int rowHJGLTitle = rowCount;
+ row1 = sheet.GetRow(rowCount);
+ cell3 = row1.CreateCell(0);
+ cell3.CellStyle = cellStyle3;
+ cell3.SetCellValue("焊接数据");
+ rowCount++;
+ row1 = sheet.GetRow(rowCount);
+ cell3 = row1.CreateCell(0);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("序号");
+ cell3 = row1.CreateCell(1);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("单位工程");
+ cell3 = row1.CreateCell(2);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("今日完成(DIN)");
+ cell3 = row1.CreateCell(3);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("累计完成(DIN)");
+ cell3 = row1.CreateCell(4);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("总量(DIN)");
+ cell3 = row1.CreateCell(5);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("累计完成百分比");
+ cell3 = row1.CreateCell(6);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("明日计划(DIN)");
+ row1 = sheet.GetRow(rowHJGLTitle);
+ cell3 = row1.CreateCell(6);
+ cell3.CellStyle = cellStyle0;
+ sheet.AddMergedRegion(new CellRangeAddress(rowHJGLTitle, rowHJGLTitle, 0, 6));
+ rowCount++;
+ var hjgls = (from x in db.ZHGL_ConstructionLogHJGL
+ where x.ConstructionLogId == constructionLogId
+ orderby x.UnitWorkId
+ select x).ToList();
+ if (hjgls.Count > 0)
+ {
+ decimal sumTodayCompleteSize = 0, sumTotalCompleteSize = 0, sumTotalSize = 0, sumTomorrowPlanSize = 0;
+ for (int i = 0; i < hjgls.Count; i++)
+ {
+ row1 = sheet.GetRow(rowCount + i);
+ cell3 = row1.CreateCell(0);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue((i + 1).ToString());
+ cell3 = row1.CreateCell(1);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(BLL.UnitWorkService.GetUnitWorkName(hjgls[i].UnitWorkId));
+ cell3 = row1.CreateCell(2);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(hjgls[i].TodayCompleteSize.Value.ToString("0.###"));
+ cell3 = row1.CreateCell(3);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(hjgls[i].TotalCompleteSize.Value.ToString("0.###"));
+ cell3 = row1.CreateCell(4);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(hjgls[i].TotalSize.Value.ToString("0.###"));
+ cell3 = row1.CreateCell(5);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(hjgls[i].TotalRate);
+ cell3 = row1.CreateCell(6);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(hjgls[i].TomorrowPlanSize.Value.ToString("0.###"));
+ sumTodayCompleteSize += hjgls[i].TodayCompleteSize.Value;
+ sumTotalCompleteSize += hjgls[i].TotalCompleteSize.Value;
+ sumTotalSize += hjgls[i].TotalSize.Value;
+ sumTomorrowPlanSize += hjgls[i].TomorrowPlanSize.Value;
+ }
+ rowCount += hjgls.Count;
+ row1 = sheet.GetRow(rowCount);
+ cell3 = row1.CreateCell(0);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("");
+ cell3 = row1.CreateCell(1);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("合计");
+ cell3 = row1.CreateCell(2);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(sumTodayCompleteSize.ToString("0.###"));
+ cell3 = row1.CreateCell(3);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(sumTotalCompleteSize.ToString("0.###"));
+ cell3 = row1.CreateCell(4);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(sumTotalSize.ToString("0.###"));
+ cell3 = row1.CreateCell(5);
+ cell3.CellStyle = cellStyle0;
+ string sumRate = "/";
+ if (sumTotalSize > 0)
+ {
+ sumRate = decimal.Round(sumTotalCompleteSize / sumTotalSize * 100, 2) + "%";
+ }
+ cell3.SetCellValue(sumRate);
+ cell3 = row1.CreateCell(6);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(sumTomorrowPlanSize.ToString("0.###"));
+ rowCount++;
+ }
+ row1 = sheet.GetRow(rowCount);
+ cell3 = row1.CreateCell(0);
cell3.CellStyle = cellStyle3;
cell3.SetCellValue("专业管理");
cell3 = row1.CreateCell(2);
@@ -1993,6 +2157,7 @@ namespace FineUIPro.Web.PZHGL.InformationProject
{
BLL.ConstructionLogPersonService.DeleteConstructionLogPersonsByConstructionLogId(ConstructionLogId);
BLL.ConstructionLogMachineService.DeleteConstructionLogMachinesByConstructionLogId(ConstructionLogId);
+ BLL.ConstructionLogHJGLService.DeleteConstructionLogHJGLsByConstructionLogId(ConstructionLogId);
BLL.ConstructionLogManagementService.DeleteConstructionLogManagementsByConstructionLogId(ConstructionLogId);
BLL.ConstructionLogProblemService.DeleteConstructionLogProblemsByConstructionLogId(ConstructionLogId);
BLL.ConstructionLogRecordService.DeleteConstructionLogRecordsByConstructionLogId(ConstructionLogId);
diff --git a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLogFileCabinet.aspx.designer.cs b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLogFileCabinet.aspx.designer.cs
index 4469893b..9ecbdb5d 100644
--- a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLogFileCabinet.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionLogFileCabinet.aspx.designer.cs
@@ -282,6 +282,24 @@ namespace FineUIPro.Web.PZHGL.InformationProject {
///
protected global::System.Web.UI.WebControls.Label Label2;
+ ///
+ /// Grid6 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid6;
+
+ ///
+ /// Label5 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label5;
+
///
/// Grid3 控件。
///
diff --git a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ProjectConstructionLog.aspx b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ProjectConstructionLog.aspx
index c4ac6bc0..148622aa 100644
--- a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ProjectConstructionLog.aspx
+++ b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ProjectConstructionLog.aspx
@@ -138,6 +138,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
("values");
+ sumTodayCompleteSize += Funs.GetNewDecimalOrZero(values.Value("TodayCompleteSize"));
+ sumTotalCompleteSize += Funs.GetNewDecimalOrZero(values.Value("TotalCompleteSize"));
+ sumTotalSize += Funs.GetNewDecimalOrZero(values.Value("TotalSize"));
+ sumTomorrowPlanSize += Funs.GetNewDecimalOrZero(values.Value("TomorrowPlanSize"));
+ }
+ string sumRate = "/";
+ if (sumTotalSize > 0)
+ {
+ sumRate = decimal.Round(sumTotalCompleteSize / sumTotalSize * 100, 2) + "%";
+ }
+ JObject summary3 = new JObject();
+ summary3.Add("UnitWorkName", "合计");
+ summary3.Add("TodayCompleteSize", sumTodayCompleteSize);
+ summary3.Add("TotalCompleteSize", sumTotalCompleteSize);
+ summary3.Add("TotalSize", sumTotalSize);
+ summary3.Add("TotalRate", sumRate);
+ summary3.Add("TomorrowPlanSize", sumTomorrowPlanSize);
+ Grid6.SummaryData = summary3;
}
#region 加载
@@ -863,6 +885,7 @@ namespace FineUIPro.Web.PZHGL.InformationProject
cell3.CellStyle = cellStyle0;
sheet.AddMergedRegion(new CellRangeAddress(8, 8, 0, 1 + list.Count));
int rowCount = 10;
+ int[] sum1 = new int[list.Count];
List unitWorklist = Funs.GetStrListByStr(log.UnitWorks, ',');
for (int i = 0; i < unitWorklist.Count; i++)
{
@@ -880,9 +903,24 @@ namespace FineUIPro.Web.PZHGL.InformationProject
int num = 0;
num = persons.Where(x => x.UnitWorkId == unitWorklist[i] && x.WorkPostId == list[j]).ToList().Sum(x => x.Num ?? 0);
cell3.SetCellValue(num.ToString());
+ sum1[j] += Funs.GetNewIntOrZero(num.ToString());
}
}
rowCount += unitWorklist.Count;
+ row1 = sheet.GetRow(rowCount);
+ cell3 = row1.CreateCell(0);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("");
+ cell3 = row1.CreateCell(1);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("合计");
+ for (int i = 0; i < sum1.Length; i++)
+ {
+ cell3 = row1.CreateCell(i + 2);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(sum1[i].ToString());
+ }
+ rowCount++;
int rowMachineTitle = rowCount;
row1 = sheet.GetRow(rowCount);
cell3 = row1.CreateCell(0);
@@ -908,6 +946,7 @@ namespace FineUIPro.Web.PZHGL.InformationProject
cell3.CellStyle = cellStyle0;
sheet.AddMergedRegion(new CellRangeAddress(rowMachineTitle, rowMachineTitle, 0, 1 + list2.Count));
rowCount++;
+ int[] sum2 = new int[list2.Count];
for (int i = 0; i < unitWorklist.Count; i++)
{
row1 = sheet.GetRow(rowCount + i);
@@ -924,11 +963,125 @@ namespace FineUIPro.Web.PZHGL.InformationProject
int num = 0;
num = machines.Where(x => x.UnitWorkId == unitWorklist[i] && x.MachineId == list2[j]).ToList().Sum(x => x.Num ?? 0);
cell3.SetCellValue(num.ToString());
+ sum2[j] += Funs.GetNewIntOrZero(num.ToString());
}
}
rowCount += unitWorklist.Count;
row1 = sheet.GetRow(rowCount);
cell3 = row1.CreateCell(0);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("");
+ cell3 = row1.CreateCell(1);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("合计");
+ for (int i = 0; i < sum2.Length; i++)
+ {
+ cell3 = row1.CreateCell(i + 2);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(sum2[i].ToString());
+ }
+ rowCount++;
+ int rowHJGLTitle = rowCount;
+ row1 = sheet.GetRow(rowCount);
+ cell3 = row1.CreateCell(0);
+ cell3.CellStyle = cellStyle3;
+ cell3.SetCellValue("焊接数据");
+ rowCount++;
+ row1 = sheet.GetRow(rowCount);
+ cell3 = row1.CreateCell(0);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("序号");
+ cell3 = row1.CreateCell(1);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("单位工程");
+ cell3 = row1.CreateCell(2);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("今日完成(DIN)");
+ cell3 = row1.CreateCell(3);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("累计完成(DIN)");
+ cell3 = row1.CreateCell(4);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("总量(DIN)");
+ cell3 = row1.CreateCell(5);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("累计完成百分比");
+ cell3 = row1.CreateCell(6);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("明日计划(DIN)");
+ row1 = sheet.GetRow(rowHJGLTitle);
+ cell3 = row1.CreateCell(6);
+ cell3.CellStyle = cellStyle0;
+ sheet.AddMergedRegion(new CellRangeAddress(rowHJGLTitle, rowHJGLTitle, 0, 6));
+ rowCount++;
+ var hjgls = (from x in db.ZHGL_ConstructionLogHJGL
+ where personLogIds.Contains(x.ConstructionLogId)
+ orderby x.UnitWorkId
+ select x).ToList();
+ if (hjgls.Count > 0)
+ {
+ decimal sumTodayCompleteSize = 0, sumTotalCompleteSize = 0, sumTotalSize = 0, sumTomorrowPlanSize = 0;
+ for (int i = 0; i < hjgls.Count; i++)
+ {
+ row1 = sheet.GetRow(rowCount + i);
+ cell3 = row1.CreateCell(0);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue((i + 1).ToString());
+ cell3 = row1.CreateCell(1);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(BLL.UnitWorkService.GetUnitWorkName(hjgls[i].UnitWorkId));
+ cell3 = row1.CreateCell(2);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(hjgls[i].TodayCompleteSize.Value.ToString("0.###"));
+ cell3 = row1.CreateCell(3);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(hjgls[i].TotalCompleteSize.Value.ToString("0.###"));
+ cell3 = row1.CreateCell(4);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(hjgls[i].TotalSize.Value.ToString("0.###"));
+ cell3 = row1.CreateCell(5);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(hjgls[i].TotalRate);
+ cell3 = row1.CreateCell(6);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(hjgls[i].TomorrowPlanSize.Value.ToString("0.###"));
+ sumTodayCompleteSize += hjgls[i].TodayCompleteSize.Value;
+ sumTotalCompleteSize += hjgls[i].TotalCompleteSize.Value;
+ sumTotalSize += hjgls[i].TotalSize.Value;
+ sumTomorrowPlanSize += hjgls[i].TomorrowPlanSize.Value;
+ }
+ rowCount += hjgls.Count;
+ row1 = sheet.GetRow(rowCount);
+ cell3 = row1.CreateCell(0);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("");
+ cell3 = row1.CreateCell(1);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue("合计");
+ cell3 = row1.CreateCell(2);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(sumTodayCompleteSize.ToString("0.###"));
+ cell3 = row1.CreateCell(3);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(sumTotalCompleteSize.ToString("0.###"));
+ cell3 = row1.CreateCell(4);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(sumTotalSize.ToString("0.###"));
+ cell3 = row1.CreateCell(5);
+ cell3.CellStyle = cellStyle0;
+ string sumRate = "/";
+ if (sumTotalSize > 0)
+ {
+ sumRate = decimal.Round(sumTotalCompleteSize / sumTotalSize * 100, 2) + "%";
+ }
+ cell3.SetCellValue(sumRate);
+ cell3 = row1.CreateCell(6);
+ cell3.CellStyle = cellStyle0;
+ cell3.SetCellValue(sumTomorrowPlanSize.ToString("0.###"));
+ rowCount++;
+ }
+ row1 = sheet.GetRow(rowCount);
+ cell3 = row1.CreateCell(0);
cell3.CellStyle = cellStyle3;
cell3.SetCellValue("专业管理");
cell3 = row1.CreateCell(2);
@@ -1989,6 +2142,9 @@ namespace FineUIPro.Web.PZHGL.InformationProject
var allRecords = from x in db.ZHGL_ConstructionLogRecord
where personLogIds.Contains(x.ConstructionLogId)
select x;
+ var allHJGLs = from x in db.ZHGL_ConstructionLogHJGL
+ where personLogIds.Contains(x.ConstructionLogId)
+ select x;
List personItems = new List();
List workPostList = Funs.GetStrListByStr(this.hdWorkPostId.Text, ',');
workPostList.Distinct();
@@ -2212,6 +2368,8 @@ namespace FineUIPro.Web.PZHGL.InformationProject
this.Grid4.DataBind();
this.Grid5.DataSource = allRecords;
this.Grid5.DataBind();
+ this.Grid6.DataSource = allHJGLs;
+ this.Grid6.DataBind();
}
}
diff --git a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ProjectConstructionLog.aspx.designer.cs b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ProjectConstructionLog.aspx.designer.cs
index 6c7e24bb..368124a0 100644
--- a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ProjectConstructionLog.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ProjectConstructionLog.aspx.designer.cs
@@ -300,6 +300,24 @@ namespace FineUIPro.Web.PZHGL.InformationProject {
///
protected global::System.Web.UI.WebControls.Label Label2;
+ ///
+ /// Grid6 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid6;
+
+ ///
+ /// Label12 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label12;
+
///
/// Grid3 控件。
///
diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs
index deae5b7e..6d6f8e78 100644
--- a/SGGL/Model/Model.cs
+++ b/SGGL/Model/Model.cs
@@ -1715,6 +1715,9 @@ namespace Model
partial void InsertZHGL_ConstructionLog(ZHGL_ConstructionLog instance);
partial void UpdateZHGL_ConstructionLog(ZHGL_ConstructionLog instance);
partial void DeleteZHGL_ConstructionLog(ZHGL_ConstructionLog instance);
+ partial void InsertZHGL_ConstructionLogHJGL(ZHGL_ConstructionLogHJGL instance);
+ partial void UpdateZHGL_ConstructionLogHJGL(ZHGL_ConstructionLogHJGL instance);
+ partial void DeleteZHGL_ConstructionLogHJGL(ZHGL_ConstructionLogHJGL instance);
partial void InsertZHGL_ConstructionLogMachine(ZHGL_ConstructionLogMachine instance);
partial void UpdateZHGL_ConstructionLogMachine(ZHGL_ConstructionLogMachine instance);
partial void DeleteZHGL_ConstructionLogMachine(ZHGL_ConstructionLogMachine instance);
@@ -7081,6 +7084,14 @@ namespace Model
}
}
+ public System.Data.Linq.Table ZHGL_ConstructionLogHJGL
+ {
+ get
+ {
+ return this.GetTable();
+ }
+ }
+
public System.Data.Linq.Table ZHGL_ConstructionLogMachine
{
get
@@ -304577,6 +304588,8 @@ namespace Model
private EntityRef _Base_Project;
+ private EntitySet _ZHGL_ConstructionLogHJGL;
+
private EntitySet _ZHGL_ConstructionLogMachine;
private EntitySet _ZHGL_ConstructionLogManagement;
@@ -304640,6 +304653,7 @@ namespace Model
public ZHGL_ConstructionLog()
{
this._Base_Project = default(EntityRef);
+ this._ZHGL_ConstructionLogHJGL = new EntitySet(new Action(this.attach_ZHGL_ConstructionLogHJGL), new Action(this.detach_ZHGL_ConstructionLogHJGL));
this._ZHGL_ConstructionLogMachine = new EntitySet(new Action(this.attach_ZHGL_ConstructionLogMachine), new Action(this.detach_ZHGL_ConstructionLogMachine));
this._ZHGL_ConstructionLogManagement = new EntitySet(new Action(this.attach_ZHGL_ConstructionLogManagement), new Action(this.detach_ZHGL_ConstructionLogManagement));
this._ZHGL_ConstructionLogPerson = new EntitySet(new Action(this.attach_ZHGL_ConstructionLogPerson), new Action(this.detach_ZHGL_ConstructionLogPerson));
@@ -305126,6 +305140,19 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ZHGL_ConstructionLogHJGL_ZHGL_ConstructionLog", Storage="_ZHGL_ConstructionLogHJGL", ThisKey="ConstructionLogId", OtherKey="ConstructionLogId", DeleteRule="NO ACTION")]
+ public EntitySet ZHGL_ConstructionLogHJGL
+ {
+ get
+ {
+ return this._ZHGL_ConstructionLogHJGL;
+ }
+ set
+ {
+ this._ZHGL_ConstructionLogHJGL.Assign(value);
+ }
+ }
+
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ZHGL_ConstructionLogMachine_ZHGL_ConstructionLog", Storage="_ZHGL_ConstructionLogMachine", ThisKey="ConstructionLogId", OtherKey="ConstructionLogId", DeleteRule="NO ACTION")]
public EntitySet ZHGL_ConstructionLogMachine
{
@@ -305211,6 +305238,18 @@ namespace Model
}
}
+ private void attach_ZHGL_ConstructionLogHJGL(ZHGL_ConstructionLogHJGL entity)
+ {
+ this.SendPropertyChanging();
+ entity.ZHGL_ConstructionLog = this;
+ }
+
+ private void detach_ZHGL_ConstructionLogHJGL(ZHGL_ConstructionLogHJGL entity)
+ {
+ this.SendPropertyChanging();
+ entity.ZHGL_ConstructionLog = null;
+ }
+
private void attach_ZHGL_ConstructionLogMachine(ZHGL_ConstructionLogMachine entity)
{
this.SendPropertyChanging();
@@ -305272,6 +305311,277 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ZHGL_ConstructionLogHJGL")]
+ public partial class ZHGL_ConstructionLogHJGL : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+
+ private string _ConstructionLogHJGLId;
+
+ private string _ConstructionLogId;
+
+ private string _UnitWorkId;
+
+ private System.Nullable _TodayCompleteSize;
+
+ private System.Nullable _TotalCompleteSize;
+
+ private System.Nullable _TotalSize;
+
+ private string _TotalRate;
+
+ private System.Nullable _TomorrowPlanSize;
+
+ private EntityRef _ZHGL_ConstructionLog;
+
+ #region 可扩展性方法定义
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnConstructionLogHJGLIdChanging(string value);
+ partial void OnConstructionLogHJGLIdChanged();
+ partial void OnConstructionLogIdChanging(string value);
+ partial void OnConstructionLogIdChanged();
+ partial void OnUnitWorkIdChanging(string value);
+ partial void OnUnitWorkIdChanged();
+ partial void OnTodayCompleteSizeChanging(System.Nullable value);
+ partial void OnTodayCompleteSizeChanged();
+ partial void OnTotalCompleteSizeChanging(System.Nullable value);
+ partial void OnTotalCompleteSizeChanged();
+ partial void OnTotalSizeChanging(System.Nullable value);
+ partial void OnTotalSizeChanged();
+ partial void OnTotalRateChanging(string value);
+ partial void OnTotalRateChanged();
+ partial void OnTomorrowPlanSizeChanging(System.Nullable value);
+ partial void OnTomorrowPlanSizeChanged();
+ #endregion
+
+ public ZHGL_ConstructionLogHJGL()
+ {
+ this._ZHGL_ConstructionLog = default(EntityRef);
+ OnCreated();
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionLogHJGLId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
+ public string ConstructionLogHJGLId
+ {
+ get
+ {
+ return this._ConstructionLogHJGLId;
+ }
+ set
+ {
+ if ((this._ConstructionLogHJGLId != value))
+ {
+ this.OnConstructionLogHJGLIdChanging(value);
+ this.SendPropertyChanging();
+ this._ConstructionLogHJGLId = value;
+ this.SendPropertyChanged("ConstructionLogHJGLId");
+ this.OnConstructionLogHJGLIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionLogId", DbType="NVarChar(50)")]
+ public string ConstructionLogId
+ {
+ get
+ {
+ return this._ConstructionLogId;
+ }
+ set
+ {
+ if ((this._ConstructionLogId != value))
+ {
+ if (this._ZHGL_ConstructionLog.HasLoadedOrAssignedValue)
+ {
+ throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+ }
+ this.OnConstructionLogIdChanging(value);
+ this.SendPropertyChanging();
+ this._ConstructionLogId = value;
+ this.SendPropertyChanged("ConstructionLogId");
+ this.OnConstructionLogIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorkId", DbType="NVarChar(50)")]
+ public string UnitWorkId
+ {
+ get
+ {
+ return this._UnitWorkId;
+ }
+ set
+ {
+ if ((this._UnitWorkId != value))
+ {
+ this.OnUnitWorkIdChanging(value);
+ this.SendPropertyChanging();
+ this._UnitWorkId = value;
+ this.SendPropertyChanged("UnitWorkId");
+ this.OnUnitWorkIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TodayCompleteSize", DbType="Decimal(18,3)")]
+ public System.Nullable TodayCompleteSize
+ {
+ get
+ {
+ return this._TodayCompleteSize;
+ }
+ set
+ {
+ if ((this._TodayCompleteSize != value))
+ {
+ this.OnTodayCompleteSizeChanging(value);
+ this.SendPropertyChanging();
+ this._TodayCompleteSize = value;
+ this.SendPropertyChanged("TodayCompleteSize");
+ this.OnTodayCompleteSizeChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalCompleteSize", DbType="Decimal(18,3)")]
+ public System.Nullable TotalCompleteSize
+ {
+ get
+ {
+ return this._TotalCompleteSize;
+ }
+ set
+ {
+ if ((this._TotalCompleteSize != value))
+ {
+ this.OnTotalCompleteSizeChanging(value);
+ this.SendPropertyChanging();
+ this._TotalCompleteSize = value;
+ this.SendPropertyChanged("TotalCompleteSize");
+ this.OnTotalCompleteSizeChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalSize", DbType="Decimal(18,3)")]
+ public System.Nullable TotalSize
+ {
+ get
+ {
+ return this._TotalSize;
+ }
+ set
+ {
+ if ((this._TotalSize != value))
+ {
+ this.OnTotalSizeChanging(value);
+ this.SendPropertyChanging();
+ this._TotalSize = value;
+ this.SendPropertyChanged("TotalSize");
+ this.OnTotalSizeChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalRate", DbType="NVarChar(20)")]
+ public string TotalRate
+ {
+ get
+ {
+ return this._TotalRate;
+ }
+ set
+ {
+ if ((this._TotalRate != value))
+ {
+ this.OnTotalRateChanging(value);
+ this.SendPropertyChanging();
+ this._TotalRate = value;
+ this.SendPropertyChanged("TotalRate");
+ this.OnTotalRateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TomorrowPlanSize", DbType="Decimal(18,3)")]
+ public System.Nullable TomorrowPlanSize
+ {
+ get
+ {
+ return this._TomorrowPlanSize;
+ }
+ set
+ {
+ if ((this._TomorrowPlanSize != value))
+ {
+ this.OnTomorrowPlanSizeChanging(value);
+ this.SendPropertyChanging();
+ this._TomorrowPlanSize = value;
+ this.SendPropertyChanged("TomorrowPlanSize");
+ this.OnTomorrowPlanSizeChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ZHGL_ConstructionLogHJGL_ZHGL_ConstructionLog", Storage="_ZHGL_ConstructionLog", ThisKey="ConstructionLogId", OtherKey="ConstructionLogId", IsForeignKey=true)]
+ public ZHGL_ConstructionLog ZHGL_ConstructionLog
+ {
+ get
+ {
+ return this._ZHGL_ConstructionLog.Entity;
+ }
+ set
+ {
+ ZHGL_ConstructionLog previousValue = this._ZHGL_ConstructionLog.Entity;
+ if (((previousValue != value)
+ || (this._ZHGL_ConstructionLog.HasLoadedOrAssignedValue == false)))
+ {
+ this.SendPropertyChanging();
+ if ((previousValue != null))
+ {
+ this._ZHGL_ConstructionLog.Entity = null;
+ previousValue.ZHGL_ConstructionLogHJGL.Remove(this);
+ }
+ this._ZHGL_ConstructionLog.Entity = value;
+ if ((value != null))
+ {
+ value.ZHGL_ConstructionLogHJGL.Add(this);
+ this._ConstructionLogId = value.ConstructionLogId;
+ }
+ else
+ {
+ this._ConstructionLogId = default(string);
+ }
+ this.SendPropertyChanged("ZHGL_ConstructionLog");
+ }
+ }
+ }
+
+ 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_ConstructionLogMachine")]
public partial class ZHGL_ConstructionLogMachine : INotifyPropertyChanging, INotifyPropertyChanged
{