提交代码
This commit is contained in:
@@ -145,6 +145,50 @@
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid6" ShowBorder="true" ShowHeader="true" Title="焊接数据" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ConstructionLogHJGLId" AllowCellEditing="true"
|
||||
EnableColumnLines="true" ClicksToEdit="1" DataIDField="ConstructionLogHJGLId"
|
||||
SortField="ConstructionLogHJGLId" EnableTextSelection="True" EnableSummary="true" SummaryPosition="Flow">
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:TemplateField HeaderText="单位工程" ColumnID="UnitWorkName" HeaderTextAlign="Center" Width="200px">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label5" runat="server" Text='<%# ConvertUnitWorkName(Eval("UnitWorkId")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField HeaderText="UnitWorkId" ColumnID="UnitWorkId" DataField="UnitWorkId"
|
||||
FieldType="String" Hidden="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="今日完成(DIN)" ColumnID="TodayCompleteSize"
|
||||
DataField="TodayCompleteSize" SortField="TodayCompleteSize" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="累计完成(DIN)" ColumnID="TotalCompleteSize"
|
||||
DataField="TotalCompleteSize" SortField="TotalCompleteSize" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="总量(DIN)" ColumnID="TotalSize"
|
||||
DataField="TotalSize" SortField="TotalSize" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="TotalRate" DataField="TotalRate"
|
||||
FieldType="String" HeaderText="累计完成百分比" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="TomorrowPlanSize" DataField="TomorrowPlanSize"
|
||||
FieldType="Double" HeaderText="明日计划(DIN)" TextAlign="Center" HeaderTextAlign="Center">
|
||||
<Editor>
|
||||
<f:NumberBox runat="server" ID="nbTomorrowPlanSize" NoDecimal="false" NoNegative="true"></f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="afteredit" Handler="onGridAfterEdit" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid3" ShowBorder="true" ShowHeader="true" Title="专业管理" EnableCollapse="true"
|
||||
|
||||
@@ -179,6 +179,28 @@ namespace FineUIPro.Web.PZHGL.InformationProject
|
||||
summary2.Add("Num" + i.ToString(), sum2[i]);
|
||||
}
|
||||
Grid2.SummaryData = summary2;
|
||||
decimal sumTodayCompleteSize = 0, sumTotalCompleteSize = 0, sumTotalSize = 0, sumTomorrowPlanSize = 0;
|
||||
foreach (JObject mergedRow in Grid6.GetMergedData())
|
||||
{
|
||||
JObject values = mergedRow.Value<JObject>("values");
|
||||
sumTodayCompleteSize += Funs.GetNewDecimalOrZero(values.Value<string>("TodayCompleteSize"));
|
||||
sumTotalCompleteSize += Funs.GetNewDecimalOrZero(values.Value<string>("TotalCompleteSize"));
|
||||
sumTotalSize += Funs.GetNewDecimalOrZero(values.Value<string>("TotalSize"));
|
||||
sumTomorrowPlanSize += Funs.GetNewDecimalOrZero(values.Value<string>("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<string> 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<string>("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<int>("index");
|
||||
JObject values = mergedRow.Value<JObject>("values");
|
||||
newItem.ConstructionLogHJGLId = SQLHelper.GetNewID();
|
||||
newItem.ConstructionLogId = this.ConstructionLogId;
|
||||
newItem.UnitWorkId = values.Value<string>("UnitWorkId");
|
||||
newItem.TodayCompleteSize = Funs.GetNewDecimalOrZero(values.Value<string>("TodayCompleteSize"));
|
||||
newItem.TotalCompleteSize = Funs.GetNewDecimalOrZero(values.Value<string>("TotalCompleteSize"));
|
||||
newItem.TotalSize = Funs.GetNewDecimalOrZero(values.Value<string>("TotalSize"));
|
||||
newItem.TotalRate = values.Value<string>("TotalRate");
|
||||
newItem.TomorrowPlanSize = Funs.GetNewDecimalOrZero(values.Value<string>("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<Model.ZHGL_ConstructionLogHJGL> hjgls = new List<Model.ZHGL_ConstructionLogHJGL>();
|
||||
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<Model.ZHGL_ConstructionLogManagement> managements = new List<Model.ZHGL_ConstructionLogManagement>();
|
||||
foreach (var item in this.drpUnitWork.SelectedValueArray)
|
||||
{
|
||||
|
||||
+27
@@ -309,6 +309,33 @@ namespace FineUIPro.Web.PZHGL.InformationProject {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label2;
|
||||
|
||||
/// <summary>
|
||||
/// Grid6 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid6;
|
||||
|
||||
/// <summary>
|
||||
/// Label5 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label5;
|
||||
|
||||
/// <summary>
|
||||
/// nbTomorrowPlanSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox nbTomorrowPlanSize;
|
||||
|
||||
/// <summary>
|
||||
/// Grid3 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -132,6 +132,44 @@
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid6" ShowBorder="true" ShowHeader="true" Title="焊接数据" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ConstructionLogHJGLId" AllowCellEditing="true"
|
||||
EnableColumnLines="true" ClicksToEdit="1" DataIDField="ConstructionLogHJGLId"
|
||||
SortField="ConstructionLogHJGLId" EnableTextSelection="True" EnableSummary="true" SummaryPosition="Flow">
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:TemplateField HeaderText="单位工程" ColumnID="UnitWorkName" HeaderTextAlign="Center" Width="200px">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label5" runat="server" Text='<%# ConvertUnitWorkName(Eval("UnitWorkId")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField HeaderText="UnitWorkId" ColumnID="UnitWorkId" DataField="UnitWorkId"
|
||||
FieldType="String" Hidden="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="今日完成(DIN)" ColumnID="TodayCompleteSize"
|
||||
DataField="TodayCompleteSize" SortField="TodayCompleteSize" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="累计完成(DIN)" ColumnID="TotalCompleteSize"
|
||||
DataField="TotalCompleteSize" SortField="TotalCompleteSize" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="总量(DIN)" ColumnID="TotalSize"
|
||||
DataField="TotalSize" SortField="TotalSize" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="TotalRate" DataField="TotalRate"
|
||||
FieldType="String" HeaderText="累计完成百分比" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="TomorrowPlanSize" DataField="TomorrowPlanSize"
|
||||
FieldType="Double" HeaderText="明日计划(DIN)" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid3" ShowBorder="true" ShowHeader="true" Title="专业管理" EnableCollapse="true"
|
||||
|
||||
@@ -144,6 +144,28 @@ namespace FineUIPro.Web.PZHGL.InformationProject
|
||||
summary2.Add("Num" + i.ToString(), sum2[i]);
|
||||
}
|
||||
Grid2.SummaryData = summary2;
|
||||
decimal sumTodayCompleteSize = 0, sumTotalCompleteSize = 0, sumTotalSize = 0, sumTomorrowPlanSize = 0;
|
||||
foreach (JObject mergedRow in Grid6.GetMergedData())
|
||||
{
|
||||
JObject values = mergedRow.Value<JObject>("values");
|
||||
sumTodayCompleteSize += Funs.GetNewDecimalOrZero(values.Value<string>("TodayCompleteSize"));
|
||||
sumTotalCompleteSize += Funs.GetNewDecimalOrZero(values.Value<string>("TotalCompleteSize"));
|
||||
sumTotalSize += Funs.GetNewDecimalOrZero(values.Value<string>("TotalSize"));
|
||||
sumTomorrowPlanSize += Funs.GetNewDecimalOrZero(values.Value<string>("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<string> 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);
|
||||
|
||||
+18
@@ -282,6 +282,24 @@ namespace FineUIPro.Web.PZHGL.InformationProject {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label2;
|
||||
|
||||
/// <summary>
|
||||
/// Grid6 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid6;
|
||||
|
||||
/// <summary>
|
||||
/// Label5 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label5;
|
||||
|
||||
/// <summary>
|
||||
/// Grid3 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -138,6 +138,44 @@
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid6" ShowBorder="true" ShowHeader="true" Title="焊接数据" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ConstructionLogHJGLId" AllowCellEditing="true"
|
||||
EnableColumnLines="true" ClicksToEdit="1" DataIDField="ConstructionLogHJGLId"
|
||||
SortField="ConstructionLogHJGLId" EnableTextSelection="True" EnableSummary="true" SummaryPosition="Flow">
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:TemplateField HeaderText="单位工程" ColumnID="UnitWorkName" HeaderTextAlign="Center" Width="200px">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label12" runat="server" Text='<%# ConvertUnitWorkName(Eval("UnitWorkId")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField HeaderText="UnitWorkId" ColumnID="UnitWorkId" DataField="UnitWorkId"
|
||||
FieldType="String" Hidden="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="今日完成(DIN)" ColumnID="TodayCompleteSize"
|
||||
DataField="TodayCompleteSize" SortField="TodayCompleteSize" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="累计完成(DIN)" ColumnID="TotalCompleteSize"
|
||||
DataField="TotalCompleteSize" SortField="TotalCompleteSize" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="总量(DIN)" ColumnID="TotalSize"
|
||||
DataField="TotalSize" SortField="TotalSize" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="TotalRate" DataField="TotalRate"
|
||||
FieldType="String" HeaderText="累计完成百分比" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="TomorrowPlanSize" DataField="TomorrowPlanSize"
|
||||
FieldType="Double" HeaderText="明日计划(DIN)" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid3" ShowBorder="true" ShowHeader="true" Title="专业管理" EnableCollapse="true"
|
||||
|
||||
@@ -148,6 +148,28 @@ namespace FineUIPro.Web.PZHGL.InformationProject
|
||||
summary2.Add("Num" + i.ToString(), sum2[i]);
|
||||
}
|
||||
Grid2.SummaryData = summary2;
|
||||
decimal sumTodayCompleteSize = 0, sumTotalCompleteSize = 0, sumTotalSize = 0, sumTomorrowPlanSize = 0;
|
||||
foreach (JObject mergedRow in Grid6.GetMergedData())
|
||||
{
|
||||
JObject values = mergedRow.Value<JObject>("values");
|
||||
sumTodayCompleteSize += Funs.GetNewDecimalOrZero(values.Value<string>("TodayCompleteSize"));
|
||||
sumTotalCompleteSize += Funs.GetNewDecimalOrZero(values.Value<string>("TotalCompleteSize"));
|
||||
sumTotalSize += Funs.GetNewDecimalOrZero(values.Value<string>("TotalSize"));
|
||||
sumTomorrowPlanSize += Funs.GetNewDecimalOrZero(values.Value<string>("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<string> 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<Model.ConstructionLogPersonItem> personItems = new List<Model.ConstructionLogPersonItem>();
|
||||
List<string> 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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+18
@@ -300,6 +300,24 @@ namespace FineUIPro.Web.PZHGL.InformationProject {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label2;
|
||||
|
||||
/// <summary>
|
||||
/// Grid6 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid6;
|
||||
|
||||
/// <summary>
|
||||
/// Label12 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label Label12;
|
||||
|
||||
/// <summary>
|
||||
/// Grid3 控件。
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user