提交代码

This commit is contained in:
高飞 2023-11-28 10:59:50 +08:00
parent de0a1d28d3
commit db46ed8cd1
18 changed files with 402 additions and 191 deletions

View File

@ -0,0 +1,22 @@
alter table WBS_WorkPackage add DrawProjectQuantity decimal(18,2) null
GO
ALTER VIEW [dbo].[View_WBS]
AS
select '1' as Id,'0' as SupId ,'JZ' as Code, '½¨Öþ¹¤³Ì' as Name,'ProjectType' as WBSType,null as PlanStartDate,null as PlanEndDate,null as RealEndDate,null as WBSCode,null as JDWeights,null as Unit,null as PlanProjectQuantity,null as RealProjectQuantity,null as RealStartDate,null as IsMileStone,null as PlanCost,null as PreWorkCode,'' as ShowId,null as DrawProjectQuantity,
ProjectId from dbo.Base_Project
Union
select '2' as Id,'0' as SupId ,'AZ' as Code, '°²×°¹¤³Ì' as Name,'ProjectType' as WBSType,null as PlanStartDate,null as PlanEndDate,null as RealEndDate,null as WBSCode,null as JDWeights,null as Unit,null as PlanProjectQuantity,null as RealProjectQuantity,null as RealStartDate,null as IsMileStone,null as PlanCost,null as PreWorkCode,'' as ShowId,null as DrawProjectQuantity,
ProjectId from dbo.Base_Project
Union
select UnitWorkId as Id,ProjectType as SupId ,UnitWorkCode as Code, UnitWorkName as Name,'UnitWork' as WBSType,PlanStartDate, PlanEndDate,RealEndDate,WBSCode,JDWeights,null as Unit,null as PlanProjectQuantity,null as RealProjectQuantity,RealStartDate,null as IsMileStone,PlanCost,null as PreWorkCode,'' as ShowId,null as DrawProjectQuantity,
ProjectId from dbo.WBS_UnitWork
Union all
select WorkPackageId as id,UnitWorkId as SupId,WorkPackageCode as Code,PackageContent as Name,'WorkPackage' as WBSType,PlanStartDate, PlanEndDate,RealEndDate,WBSCode,JDWeights,Unit,PlanProjectQuantity,RealProjectQuantity,RealStartDate,IsMileStone,PlanCost,PreWorkCode,case when (select COUNT(*) from WBS_WorkPackage a where a.SuperWorkPackageId=w.WorkPackageId and a.IsApprove=1)=0 then WorkPackageId else '' end as ShowId,DrawProjectQuantity,
ProjectId from dbo.WBS_WorkPackage w where IsApprove=1 and SuperWorkPackageId is null
Union all
select WorkPackageId as id,SuperWorkPackageId as SupId,WorkPackageCode as Code, PackageContent as Name,'WorkPackage' as WBSType,PlanStartDate, PlanEndDate,RealEndDate,WBSCode,JDWeights,Unit,PlanProjectQuantity,RealProjectQuantity,RealStartDate,IsMileStone,PlanCost,PreWorkCode,case when (select COUNT(*) from WBS_WorkPackage a where a.SuperWorkPackageId=w.WorkPackageId and a.IsApprove=1)=0 then WorkPackageId else '' end as ShowId,DrawProjectQuantity,
ProjectId from dbo.WBS_WorkPackage w where IsApprove=1 and SuperWorkPackageId is not null
GO

View File

@ -40,6 +40,7 @@ namespace BLL
newWorkPackage.RealStartDate = WorkPackage.RealStartDate;
newWorkPackage.RealEndDate = WorkPackage.RealEndDate;
newWorkPackage.Unit = WorkPackage.Unit;
newWorkPackage.DrawProjectQuantity = WorkPackage.DrawProjectQuantity;
db.WBS_WorkPackage.InsertOnSubmit(newWorkPackage);
db.SubmitChanges();
@ -76,6 +77,7 @@ namespace BLL
newWorkPackage.PlanCost = WorkPackage.PlanCost;
newWorkPackage.JDWeights = WorkPackage.JDWeights;
newWorkPackage.PreWorkCode = WorkPackage.PreWorkCode;
newWorkPackage.DrawProjectQuantity = WorkPackage.DrawProjectQuantity;
db.SubmitChanges();
}
@ -505,6 +507,7 @@ namespace BLL
table.Columns.Add(new DataColumn("JDWeights", typeof(String)));
table.Columns.Add(new DataColumn("Unit", typeof(String)));
table.Columns.Add(new DataColumn("PlanProjectQuantity", typeof(String)));
table.Columns.Add(new DataColumn("DrawProjectQuantity", typeof(String)));
table.Columns.Add(new DataColumn("RealProjectQuantity", typeof(String)));
table.Columns.Add(new DataColumn("PlanStartDate", typeof(DateTime)));
table.Columns.Add(new DataColumn("PlanEndDate", typeof(DateTime)));
@ -551,30 +554,31 @@ namespace BLL
row[6] = item.JDWeights;
row[7] = item.Unit;
row[8] = item.PlanProjectQuantity;
row[9] = item.RealProjectQuantity;
row[9] = item.DrawProjectQuantity;
row[10] = item.RealProjectQuantity;
if (item.PlanStartDate != null)
{
row[10] = item.PlanStartDate;
row[11] = item.PlanStartDate;
}
if (item.PlanEndDate != null)
{
row[11] = item.PlanEndDate;
row[12] = item.PlanEndDate;
}
if (item.RealStartDate != null)
{
row[12] = item.RealStartDate;
row[13] = item.RealStartDate;
}
if (item.RealEndDate != null)
{
row[13] = item.RealEndDate;
row[14] = item.RealEndDate;
}
if (item.IsMileStone != null)
{
row[14] = item.IsMileStone;
row[15] = item.IsMileStone;
}
row[15] = item.PlanCost;
row[16] = item.PreWorkCode;
row[17] = item.Code;
row[16] = item.PlanCost;
row[17] = item.PreWorkCode;
row[18] = item.Code;
if (!string.IsNullOrEmpty(item.ShowId))
{
var details = getDetails.Where(x => x.WorkPackageId == item.Id).ToList();
@ -583,11 +587,11 @@ namespace BLL
var index = months.FindIndex(x => x.Equals(item1.Months));
if (item1.PlanNum != 0)
{
row[18 + index * 2] = decimal.Round(Convert.ToDecimal(item1.PlanNum), 2);
row[19 + index * 2] = decimal.Round(Convert.ToDecimal(item1.PlanNum), 2);
}
if (item1.ThisNum != 0)
{
row[19 + index * 2] = decimal.Round(Convert.ToDecimal(item1.ThisNum), 2);
row[20 + index * 2] = decimal.Round(Convert.ToDecimal(item1.ThisNum), 2);
}
}
}

View File

@ -116,7 +116,7 @@
</f:RegionPanel>
<f:Window ID="Window1" Title="导入" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true"
Width="800px" Height="460px" OnClose="Window1_Close">
Width="1000px" Height="460px" OnClose="Window1_Close">
</f:Window>
</form>
<script type="text/javascript">

View File

@ -17,7 +17,7 @@
<Items>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnAudit" Icon="ApplicationEdit" runat="server" ToolTip="数据导入" ValidateForms="SimpleForm1"
OnClick="btnAudit_Click" >
OnClick="btnAudit_Click">
</f:Button>
<f:Button ID="btnSave" ToolTip="保存" Icon="SystemSaveNew" runat="server" Text=""
OnClick="btnSave_Click">
@ -44,7 +44,7 @@
PageSize="200" Hidden="true">
<Columns>
<f:RenderField Width="200px" ColumnID="PackageContent" DataField="PackageContent" FieldType="String"
<f:RenderField Width="100px" ColumnID="PackageContent" DataField="PackageContent" FieldType="String"
HeaderText="第2级" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField HeaderText="定制" ColumnID="SuperWorkPack" DataField="SuperWorkPack" SortField="SuperWorkPack"
@ -54,6 +54,24 @@
</f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField Width="80px" ColumnID="Unit" DataField="Unit" FieldType="String"
HeaderText="单位" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="PlanProjectQuantity" DataField="PlanProjectQuantity" FieldType="Double"
HeaderText="概算工程量" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="DrawProjectQuantity" DataField="DrawProjectQuantity" FieldType="Double"
HeaderText="图纸工程量" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="RealProjectQuantity" DataField="RealProjectQuantity" FieldType="Double"
HeaderText="实际工程量" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="PlanStartDate" DataField="PlanStartDate" FieldType="Date"
Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="计划开始时间" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="PlanEndDate" DataField="PlanEndDate" FieldType="Date"
Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="计划完成时间" HeaderTextAlign="Center">
</f:RenderField>
</Columns>
</f:Grid>
</Items>

View File

@ -200,6 +200,11 @@ namespace FineUIPro.Web.CQMS.WBS
string result = string.Empty;
string col0 = pds.Rows[i][0].ToString().Trim();
string col1 = pds.Rows[i][1].ToString().Trim();
string col3 = pds.Rows[i][3].ToString().Trim();
string col4 = pds.Rows[i][4].ToString().Trim();
string col5 = pds.Rows[i][5].ToString().Trim();
string col6 = pds.Rows[i][6].ToString().Trim();
string col7 = pds.Rows[i][7].ToString().Trim();
if (!string.IsNullOrEmpty(col0))
{
if (string.IsNullOrEmpty(col0))
@ -234,6 +239,66 @@ namespace FineUIPro.Web.CQMS.WBS
result += "第" + (i + 2).ToString() + "行," + "定制输入值有误!" + "|";
}
if (!string.IsNullOrEmpty(col3))
{
try
{
newWorkPackage.PlanProjectQuantity = Convert.ToDecimal(col3);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "概算工程量输入值有误!" + "|";
}
}
if (!string.IsNullOrEmpty(col4))
{
try
{
newWorkPackage.DrawProjectQuantity = Convert.ToDecimal(col4);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "图纸工程量输入值有误!" + "|";
}
}
if (!string.IsNullOrEmpty(col5))
{
try
{
newWorkPackage.RealProjectQuantity = Convert.ToDecimal(col5);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "实际工程量输入值有误!" + "|";
}
}
if (!string.IsNullOrEmpty(col6))
{
try
{
newWorkPackage.PlanStartDate = Convert.ToDateTime(col6);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "计划开始时间输入值有误!" + "|";
}
}
if (!string.IsNullOrEmpty(col7))
{
try
{
newWorkPackage.PlanEndDate = Convert.ToDateTime(col7);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "计划完成时间输入值有误!" + "|";
}
}
ViewWorkPackages.Add(newWorkPackage);
}
if (!string.IsNullOrEmpty(result))
@ -387,6 +452,12 @@ namespace FineUIPro.Web.CQMS.WBS
string result = string.Empty;
string col0 = pds.Rows[i][0].ToString().Trim();
string col1 = pds.Rows[i][1].ToString().Trim();
string col2 = pds.Rows[i][2].ToString().Trim();
string col3 = pds.Rows[i][3].ToString().Trim();
string col4 = pds.Rows[i][4].ToString().Trim();
string col5 = pds.Rows[i][5].ToString().Trim();
string col6 = pds.Rows[i][6].ToString().Trim();
string col7 = pds.Rows[i][7].ToString().Trim();
if (!string.IsNullOrEmpty(col0))
{
if (string.IsNullOrEmpty(col0))
@ -421,6 +492,68 @@ namespace FineUIPro.Web.CQMS.WBS
result += "第" + (i + 2).ToString() + "行," + "定制输入值有误!" + "|";
}
newWorkPackage.Unit = col2;
if (!string.IsNullOrEmpty(col3))
{
try
{
newWorkPackage.PlanProjectQuantity = Convert.ToDecimal(col3);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "概算工程量输入值有误!" + "|";
}
}
if (!string.IsNullOrEmpty(col4))
{
try
{
newWorkPackage.DrawProjectQuantity = Convert.ToDecimal(col4);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "图纸工程量输入值有误!" + "|";
}
}
if (!string.IsNullOrEmpty(col5))
{
try
{
newWorkPackage.RealProjectQuantity = Convert.ToDecimal(col5);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "实际工程量输入值有误!" + "|";
}
}
if (!string.IsNullOrEmpty(col6))
{
try
{
newWorkPackage.PlanStartDate = Convert.ToDateTime(col6);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "计划开始时间输入值有误!" + "|";
}
}
if (!string.IsNullOrEmpty(col7))
{
try
{
newWorkPackage.PlanEndDate = Convert.ToDateTime(col7);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "计划完成时间输入值有误!" + "|";
}
}
ViewWorkPackages.Add(newWorkPackage);
if (!string.IsNullOrEmpty(result))
{
@ -470,6 +603,12 @@ namespace FineUIPro.Web.CQMS.WBS
Model.WBS_WorkPackage oldWorkPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(workPackageId);
string workPackageCode2 = this.Grid1.Rows[i].DataKeys[1].ToString();
string txtName = values.Value<string>("SuperWorkPack");
string Unit = values.Value<string>("Unit");
string PlanProjectQuantity = values.Value<string>("PlanProjectQuantity");
string DrawProjectQuantity = values.Value<string>("DrawProjectQuantity");
string RealProjectQuantity = values.Value<string>("RealProjectQuantity");
string PlanStartDate = values.Value<string>("PlanStartDate");
string PlanEndDate = values.Value<string>("PlanEndDate");
Model.WBS_WorkPackageProject workPackageProject = BLL.WorkPackageProjectService.GetWorkPackageProjectByWorkPackageCode(workPackageCode2, this.CurrUser.LoginProjectId);
if (oldWorkPackage == null) //新增内容
{
@ -522,6 +661,12 @@ namespace FineUIPro.Web.CQMS.WBS
newWorkPackage.ProjectType = workPackageProject.ProjectType;
newWorkPackage.InitWorkPackageCode = workPackageProject.WorkPackageCode;
newWorkPackage.IsApprove = true;
newWorkPackage.Unit = Unit;
newWorkPackage.PlanProjectQuantity = Funs.GetNewDecimal(PlanProjectQuantity);
newWorkPackage.DrawProjectQuantity = Funs.GetNewDecimal(DrawProjectQuantity);
newWorkPackage.RealProjectQuantity = Funs.GetNewDecimal(RealProjectQuantity);
newWorkPackage.PlanStartDate = Funs.GetNewDateTime(PlanStartDate);
newWorkPackage.PlanEndDate = Funs.GetNewDateTime(PlanEndDate);
BLL.WorkPackageService.AddWorkPackage(newWorkPackage);
num++;
}

View File

@ -1111,8 +1111,20 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
if (delJoints.Count() > 0)
{
db2.HJGL_WeldJoint.DeleteAllOnSubmit(delJoints);
db2.SubmitChanges();
try
{
db2.HJGL_WeldJoint.DeleteAllOnSubmit(delJoints);
db2.SubmitChanges();
}
catch (Exception)
{
string weldJointCodes = string.Empty;
foreach (var item in delJoints)
{
weldJointCodes += item.WeldJointCode + ",";
}
Alert.ShowInParent(weldJointCodes, MessageBoxIcon.Warning);
}
}
}

View File

@ -66,6 +66,9 @@
<f:RenderField Width="100px" ColumnID="PlanCost" DataField="PlanCost" FieldType="Double" EnableLock="true" Locked="true"
HeaderText="概算费用" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="DrawProjectQuantity" DataField="DrawProjectQuantity" FieldType="Double" EnableLock="true" Locked="true"
HeaderText="图纸工程量" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="RealProjectQuantity" DataField="RealProjectQuantity" FieldType="Double" EnableLock="true" Locked="true"
HeaderText="实际工程量" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>

View File

@ -99,6 +99,14 @@
<f:RenderField Width="100px" ColumnID="PlanCost" DataField="PlanCost" FieldType="Double"
HeaderText="概算费用" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="DrawProjectQuantity" DataField="DrawProjectQuantity" FieldType="Double"
HeaderText="图纸工程量" HeaderTextAlign="Center" TextAlign="Left">
<Editor>
<f:NumberBox ID="nbDrawProjectQuantity" NoDecimal="false" NoNegative="true" MinValue="0"
runat="server">
</f:NumberBox>
</Editor>
</f:RenderField>
<f:RenderField Width="100px" ColumnID="RealProjectQuantity" DataField="RealProjectQuantity" FieldType="Double"
HeaderText="实际工程量" HeaderTextAlign="Center" TextAlign="Left">
<Editor>

View File

@ -115,6 +115,7 @@ namespace FineUIPro.Web.JDGL.Check
unit = "m³";
}
string planProjectQuantity = values.Value<string>("PlanProjectQuantity");
string drawProjectQuantity = values.Value<string>("DrawProjectQuantity");
string realProjectQuantity = values.Value<string>("RealProjectQuantity");
string planStartDate = values.Value<string>("PlanStartDate");
string planEndDate = values.Value<string>("PlanEndDate");
@ -124,6 +125,7 @@ namespace FineUIPro.Web.JDGL.Check
workPackage.JDWeights = Funs.GetNewDecimal(weights);
workPackage.Unit = unit;
workPackage.PlanProjectQuantity = Funs.GetNewDecimal(planProjectQuantity);
workPackage.DrawProjectQuantity= Funs.GetNewDecimal(drawProjectQuantity);
workPackage.RealProjectQuantity = Funs.GetNewDecimal(realProjectQuantity);
workPackage.PlanStartDate = Funs.GetNewDateTime(planStartDate);
workPackage.PlanEndDate = Funs.GetNewDateTime(planEndDate);

View File

@ -174,6 +174,15 @@ namespace FineUIPro.Web.JDGL.Check {
/// </remarks>
protected global::FineUIPro.NumberBox nbPlanProjectQuantity;
/// <summary>
/// nbDrawProjectQuantity 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.NumberBox nbDrawProjectQuantity;
/// <summary>
/// nbRealProjectQuantity 控件。
/// </summary>

View File

@ -436,94 +436,7 @@
function onGridAfterEdit(event, value, params) {
var me = this, columnId = params.columnId, rowId = params.rowId;
if (columnId === 'TotalNum' || columnId === 'TotalCompleteNum1') {
var TotalNum = me.getCellValue(rowId, 'TotalNum');
var TotalCompleteNum1 = me.getCellValue(rowId, 'TotalCompleteNum1');
if (TotalNum.toString() != "" && TotalCompleteNum1.toString() != "") {
if (TotalNum !== "0") {
me.updateCellValue(rowId, 'TotalRate1', (TotalCompleteNum1 / TotalNum * 100).toFixed(2) + "%");
} else {
me.updateCellValue(rowId, 'TotalRate1', (""));
}
}
}
if (columnId === 'TotalNum' || columnId === 'TotalCompleteNum2') {
var TotalNum = me.getCellValue(rowId, 'TotalNum');
var TotalCompleteNum2 = me.getCellValue(rowId, 'TotalCompleteNum2');
if (TotalNum.toString() != "" && TotalCompleteNum2.toString() != "") {
if (TotalNum !== "0") {
me.updateCellValue(rowId, 'TotalRate2', (TotalCompleteNum2 / TotalNum * 100).toFixed(2) + "%");
} else {
me.updateCellValue(rowId, 'TotalRate2', (""));
}
}
}
if (columnId === 'FilmNum' || columnId === 'NotOKFileNum') {
var FilmNum = me.getCellValue(rowId, 'FilmNum');
var NotOKFileNum = me.getCellValue(rowId, 'NotOKFileNum');
if (FilmNum.toString() != "" && NotOKFileNum.toString() != "") {
if (FilmNum !== "0") {
me.updateCellValue(rowId, 'OneOKRate', ((FilmNum - NotOKFileNum) / FilmNum * 100).toFixed(2) + "%");
} else {
me.updateCellValue(rowId, 'OneOKRate', (""));
}
}
updateSummary();
}
if (columnId === 'TotalFilmNum' || columnId === 'TotalNotOKFileNum') {
var TotalFilmNum = me.getCellValue(rowId, 'TotalFilmNum');
var TotalNotOKFileNum = me.getCellValue(rowId, 'TotalNotOKFileNum');
if (TotalFilmNum.toString() != "" && TotalNotOKFileNum.toString() != "") {
if (TotalFilmNum !== "0") {
me.updateCellValue(rowId, 'TotalOneOKRate', ((TotalFilmNum - TotalNotOKFileNum) / TotalFilmNum * 100).toFixed(2) + "%");
} else {
me.updateCellValue(rowId, 'TotalOneOKRate', (""));
}
}
updateSummary();
}
if (columnId === 'ThisPersonNum' || columnId === 'ThisOKPersonNum') {
var ThisPersonNum = me.getCellValue(rowId, 'ThisPersonNum');
var ThisOKPersonNum = me.getCellValue(rowId, 'ThisOKPersonNum');
if (ThisPersonNum.toString() != "" && ThisOKPersonNum.toString() != "") {
if (ThisPersonNum !== "0") {
me.updateCellValue(rowId, 'ThisOKRate', (ThisOKPersonNum / ThisPersonNum * 100).toFixed(2) + "%");
} else {
me.updateCellValue(rowId, 'ThisOKRate', (""));
}
}
updateSummary();
}
if (columnId === 'TotalPersonNum' || columnId === 'TotalOKPersonNum') {
var TotalPersonNum = me.getCellValue(rowId, 'TotalPersonNum');
var TotalOKPersonNum = me.getCellValue(rowId, 'TotalOKPersonNum');
if (TotalPersonNum.toString() != "" && TotalOKPersonNum.toString() != "") {
if (TotalPersonNum !== "0") {
me.updateCellValue(rowId, 'TotalOKRate', (TotalOKPersonNum / TotalPersonNum * 100).toFixed(2) + "%");
} else {
me.updateCellValue(rowId, 'TotalOKRate', (""));
}
}
updateSummary();
}
if (columnId === 'TotalSpotNum' || columnId === 'TotalSpotOKNum') {
var TotalSpotNum = me.getCellValue(rowId, 'TotalSpotNum');
var TotalSpotOKNum = me.getCellValue(rowId, 'TotalSpotOKNum');
if (TotalSpotNum.toString() != "" && TotalSpotOKNum.toString() != "") {
if (TotalSpotNum !== "0") {
me.updateCellValue(rowId, 'TotalSpotOKRate', ((TotalSpotOKNum) / TotalSpotNum * 100).toFixed(2) + "%");
} else {
me.updateCellValue(rowId, 'TotalSpotOKRate', (""));
}
}
}
updateSummary();
}
function updateSummary() {

View File

@ -144,90 +144,41 @@ namespace FineUIPro.Web.PZHGL.InformationProject
private void OutputSummaryData()
{
//JObject summary = new JObject();
//int filmNum = 0, notOKFileNum = 0, repairFileNum = 0, totalFilmNum = 0, totalNotOKFileNum = 0;
//string oneOKRate = string.Empty, totalOneOKRate = string.Empty;
//foreach (JObject mergedRow in GridNDTCheck.GetMergedData())
//{
// JObject values = mergedRow.Value<JObject>("values");
// if (values["FilmNum"].ToString() != "" && values["NotOKFileNum"].ToString() != "")
// {
// filmNum += values.Value<int>("FilmNum");
// notOKFileNum += values.Value<int>("NotOKFileNum");
// }
// if (values["RepairFileNum"].ToString() != "")
// {
// repairFileNum += values.Value<int>("RepairFileNum");
// }
// if (values["TotalFilmNum"].ToString() != "" && values["TotalNotOKFileNum"].ToString() != "")
// {
// totalFilmNum += values.Value<int>("TotalFilmNum");
// totalNotOKFileNum += values.Value<int>("TotalNotOKFileNum");
// }
//}
//if (filmNum > 0)
//{
// var a = Convert.ToDouble(filmNum - notOKFileNum);
// var b = Convert.ToDouble(filmNum);
// decimal result = decimal.Round(decimal.Parse((a / b * 100).ToString()), 2);
// oneOKRate = result.ToString() + "%";
//}
//if (totalFilmNum > 0)
//{
// var a = Convert.ToDouble(totalFilmNum - totalNotOKFileNum);
// var b = Convert.ToDouble(totalFilmNum);
// decimal result = decimal.Round(decimal.Parse((a / b * 100).ToString()), 2);
// totalOneOKRate = result.ToString() + "%";
//}
//JObject summary1 = new JObject();
//summary1.Add("UnitName", "合计");
//summary1.Add("FilmNum", filmNum);
//summary1.Add("NotOKFileNum", notOKFileNum);
//summary1.Add("RepairFileNum", repairFileNum);
//summary1.Add("OneOKRate", oneOKRate);
//summary1.Add("TotalFilmNum", totalFilmNum);
//summary1.Add("TotalNotOKFileNum", totalNotOKFileNum);
//summary1.Add("TotalOneOKRate", totalOneOKRate);
//GridNDTCheck.SummaryData = summary1;
//int thisPersonNum = 0, thisOKPersonNum = 0, totalPersonNum = 0, totalOKPersonNum = 0;
//string thisOKRate = string.Empty, totalOKRate = string.Empty;
//foreach (JObject mergedRow in GridWelder.GetMergedData())
//{
// JObject values = mergedRow.Value<JObject>("values");
// if (values["ThisPersonNum"].ToString() != "" && values["ThisOKPersonNum"].ToString() != "")
// {
// thisPersonNum += values.Value<int>("ThisPersonNum");
// thisOKPersonNum += values.Value<int>("ThisOKPersonNum");
// }
// if (values["TotalPersonNum"].ToString() != "" && values["TotalOKPersonNum"].ToString() != "")
// {
// totalPersonNum += values.Value<int>("TotalPersonNum");
// totalOKPersonNum += values.Value<int>("TotalOKPersonNum");
// }
//}
//if (thisPersonNum > 0 && thisOKPersonNum > 0)
//{
// var a = Convert.ToDouble(thisOKPersonNum);
// var b = Convert.ToDouble(thisPersonNum);
// decimal result = decimal.Round(decimal.Parse((a / b * 100).ToString()), 2);
// thisOKRate = result.ToString() + "%";
//}
//if (totalPersonNum > 0 && totalOKPersonNum > 0)
//{
// var a = Convert.ToDouble(totalOKPersonNum);
// var b = Convert.ToDouble(totalPersonNum);
// decimal result = decimal.Round(decimal.Parse((a / b * 100).ToString()), 2);
// totalOKRate = result.ToString() + "%";
//}
//summary.Add("UnitName", "合计");
//summary.Add("ThisPersonNum", thisPersonNum);
//summary.Add("ThisOKPersonNum", thisOKPersonNum);
//summary.Add("ThisOKRate", thisOKRate);
//summary.Add("TotalPersonNum", totalPersonNum);
//summary.Add("TotalOKPersonNum", totalOKPersonNum);
//summary.Add("TotalOKRate", totalOKRate);
//GridWelder.SummaryData = summary;
List<string> list = Funs.GetStrListByStr(this.hdWorkPostId.Text, ',');
int[] sum1 = new int[list.Count];
foreach (JObject mergedRow in Grid1.GetMergedData())
{
JObject values = mergedRow.Value<JObject>("values");
for (int i = 0; i < list.Count; i++)
{
sum1[i] += Funs.GetNewIntOrZero(values.Value<string>("Num" + i.ToString()));
}
}
JObject summary1 = new JObject();
summary1.Add("UnitWorkName", "合计");
for (int i = 0; i < list.Count; i++)
{
summary1.Add("Num" + i.ToString(), sum1[i]);
}
Grid1.SummaryData = summary1;
List<string> list2 = Funs.GetStrListByStr(this.hdMachineId.Text, ',');
int[] sum2 = new int[list2.Count];
foreach (JObject mergedRow in Grid2.GetMergedData())
{
JObject values = mergedRow.Value<JObject>("values");
for (int i = 0; i < list2.Count; i++)
{
sum2[i] += Funs.GetNewIntOrZero(values.Value<string>("Num" + i.ToString()));
}
}
JObject summary2 = new JObject();
summary2.Add("UnitWorkName", "合计");
for (int i = 0; i < list2.Count; i++)
{
summary2.Add("Num" + i.ToString(), sum2[i]);
}
Grid2.SummaryData = summary2;
}
#region --
@ -613,6 +564,7 @@ namespace FineUIPro.Web.PZHGL.InformationProject
this.Grid5.DataBind();
}
ChangeText();
OutputSummaryData();
}
}

View File

@ -96,7 +96,7 @@
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="作业人员人数" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="ConstructionLogPersonId" AllowCellEditing="true"
EnableColumnLines="true" ClicksToEdit="1" DataIDField="ConstructionLogPersonId"
EnableColumnLines="true" ClicksToEdit="1" DataIDField="ConstructionLogPersonId" EnableSummary="true" SummaryPosition="Flow"
SortField="ConstructionLogPersonId" EnableTextSelection="True">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
@ -116,7 +116,7 @@
<Items>
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="true" Title="机械数量" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="ConstructionLogMachineId" AllowCellEditing="true"
EnableColumnLines="true" ClicksToEdit="1" DataIDField="ConstructionLogMachineId"
EnableColumnLines="true" ClicksToEdit="1" DataIDField="ConstructionLogMachineId" EnableSummary="true" SummaryPosition="Flow"
SortField="ConstructionLogMachineId" EnableTextSelection="True">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center" />

View File

@ -107,6 +107,45 @@ namespace FineUIPro.Web.PZHGL.InformationProject
}
#endregion
private void OutputSummaryData()
{
List<string> list = Funs.GetStrListByStr(this.hdWorkPostId.Text, ',');
int[] sum1 = new int[list.Count];
foreach (JObject mergedRow in Grid1.GetMergedData())
{
JObject values = mergedRow.Value<JObject>("values");
for (int i = 0; i < list.Count; i++)
{
sum1[i] += Funs.GetNewIntOrZero(values.Value<string>("Num" + i.ToString()));
}
}
JObject summary1 = new JObject();
summary1.Add("UnitWorkName", "合计");
for (int i = 0; i < list.Count; i++)
{
summary1.Add("Num" + i.ToString(), sum1[i]);
}
Grid1.SummaryData = summary1;
List<string> list2 = Funs.GetStrListByStr(this.hdMachineId.Text, ',');
int[] sum2 = new int[list2.Count];
foreach (JObject mergedRow in Grid2.GetMergedData())
{
JObject values = mergedRow.Value<JObject>("values");
for (int i = 0; i < list2.Count; i++)
{
sum2[i] += Funs.GetNewIntOrZero(values.Value<string>("Num" + i.ToString()));
}
}
JObject summary2 = new JObject();
summary2.Add("UnitWorkName", "合计");
for (int i = 0; i < list2.Count; i++)
{
summary2.Add("Num" + i.ToString(), sum2[i]);
}
Grid2.SummaryData = summary2;
}
#region
/// <summary>
/// 加载页面
@ -546,6 +585,7 @@ namespace FineUIPro.Web.PZHGL.InformationProject
this.Grid5.DataSource = records;
this.Grid5.DataBind();
}
OutputSummaryData();
}
}

View File

@ -102,7 +102,7 @@
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="作业人员人数" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="ConstructionLogPersonId" AllowCellEditing="true"
EnableColumnLines="true" ClicksToEdit="1" DataIDField="ConstructionLogPersonId"
EnableColumnLines="true" ClicksToEdit="1" DataIDField="ConstructionLogPersonId" EnableSummary="true" SummaryPosition="Flow"
SortField="ConstructionLogPersonId" EnableTextSelection="True">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
@ -122,7 +122,7 @@
<Items>
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="true" Title="机械数量" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="ConstructionLogMachineId" AllowCellEditing="true"
EnableColumnLines="true" ClicksToEdit="1" DataIDField="ConstructionLogMachineId"
EnableColumnLines="true" ClicksToEdit="1" DataIDField="ConstructionLogMachineId" EnableSummary="true" SummaryPosition="Flow"
SortField="ConstructionLogMachineId" EnableTextSelection="True">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="60px" HeaderTextAlign="Center" TextAlign="Center" />

View File

@ -111,6 +111,45 @@ namespace FineUIPro.Web.PZHGL.InformationProject
}
#endregion
private void OutputSummaryData()
{
List<string> list = Funs.GetStrListByStr(this.hdWorkPostId.Text, ',');
int[] sum1 = new int[list.Count];
foreach (JObject mergedRow in Grid1.GetMergedData())
{
JObject values = mergedRow.Value<JObject>("values");
for (int i = 0; i < list.Count; i++)
{
sum1[i] += Funs.GetNewIntOrZero(values.Value<string>("Num" + i.ToString()));
}
}
JObject summary1 = new JObject();
summary1.Add("UnitWorkName", "合计");
for (int i = 0; i < list.Count; i++)
{
summary1.Add("Num" + i.ToString(), sum1[i]);
}
Grid1.SummaryData = summary1;
List<string> list2 = Funs.GetStrListByStr(this.hdMachineId.Text, ',');
int[] sum2 = new int[list2.Count];
foreach (JObject mergedRow in Grid2.GetMergedData())
{
JObject values = mergedRow.Value<JObject>("values");
for (int i = 0; i < list2.Count; i++)
{
sum2[i] += Funs.GetNewIntOrZero(values.Value<string>("Num" + i.ToString()));
}
}
JObject summary2 = new JObject();
summary2.Add("UnitWorkName", "合计");
for (int i = 0; i < list2.Count; i++)
{
summary2.Add("Num" + i.ToString(), sum2[i]);
}
Grid2.SummaryData = summary2;
}
#region
/// <summary>
/// 加载页面
@ -364,6 +403,7 @@ namespace FineUIPro.Web.PZHGL.InformationProject
this.GridCQMSTomorrowPlan.DataBind();
}
ChangeText();
OutputSummaryData();
}
}
@ -509,6 +549,7 @@ namespace FineUIPro.Web.PZHGL.InformationProject
this.Grid5.DataBind();
drpUnitWork_SelectedIndexChanged(null, null);
ChangeText();
OutputSummaryData();
}
private void TextEmpty()

View File

@ -293155,6 +293155,8 @@ namespace Model
private string _ShowId;
private System.Nullable<decimal> _DrawProjectQuantity;
private string _ProjectId;
public View_WBS()
@ -293449,6 +293451,22 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DrawProjectQuantity", DbType="Decimal(18,2)")]
public System.Nullable<decimal> DrawProjectQuantity
{
get
{
return this._DrawProjectQuantity;
}
set
{
if ((this._DrawProjectQuantity != value))
{
this._DrawProjectQuantity = value;
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")]
public string ProjectId
{
@ -299078,6 +299096,8 @@ namespace Model
private string _WBSCode;
private System.Nullable<decimal> _DrawProjectQuantity;
private EntitySet<WBS_ControlItemAndCycle> _WBS_ControlItemAndCycle;
private EntityRef<WBS_UnitWork> _WBS_UnitWork;
@ -299150,6 +299170,8 @@ namespace Model
partial void OnPreWorkCodeChanged();
partial void OnWBSCodeChanging(string value);
partial void OnWBSCodeChanged();
partial void OnDrawProjectQuantityChanging(System.Nullable<decimal> value);
partial void OnDrawProjectQuantityChanged();
#endregion
public WBS_WorkPackage()
@ -299784,6 +299806,26 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DrawProjectQuantity", DbType="Decimal(18,2)")]
public System.Nullable<decimal> DrawProjectQuantity
{
get
{
return this._DrawProjectQuantity;
}
set
{
if ((this._DrawProjectQuantity != value))
{
this.OnDrawProjectQuantityChanging(value);
this.SendPropertyChanging();
this._DrawProjectQuantity = value;
this.SendPropertyChanged("DrawProjectQuantity");
this.OnDrawProjectQuantityChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_WBS_ControlItemAndCycle_WBS_ControlItemAndCycle", Storage="_WBS_ControlItemAndCycle", ThisKey="WorkPackageId", OtherKey="WorkPackageId", DeleteRule="NO ACTION")]
public EntitySet<WBS_ControlItemAndCycle> WBS_ControlItemAndCycle
{