0914-修改材料接口、焊接管理及三四级看板
This commit is contained in:
@@ -429,9 +429,7 @@
|
||||
<div class="tit-one tit-center" runat="server" id="divMonth" style="color: #fff; margin-left: 15px; text-align: left;"> </div>
|
||||
<div class="tab-wrap">
|
||||
<div class="tab" data-value="2">
|
||||
<div class="t-item active">材料到货情况</div>
|
||||
<div class="spline"></div>
|
||||
<div class="t-item ">材料出库情况</div>
|
||||
<div class="t-item active">管道材料汇总表</div>
|
||||
<div class="spline"></div>
|
||||
<div class="t-item">管道焊接工程量</div>
|
||||
<div class="spline"></div>
|
||||
@@ -939,19 +937,17 @@
|
||||
else if (value == 2) {
|
||||
if (index == 0) {
|
||||
$('#divGZL').html($('#hdContractQuantitySheets')[0].value);
|
||||
} else if (index == 2) {
|
||||
$('#divGZL').html($('#hdMaterialRecords')[0].value);
|
||||
} else if (index == 4) {
|
||||
} else if (index == 2) {
|
||||
$('#divGZL').html($('#hdTotalQuantity')[0].value);
|
||||
} else if (index == 6) {
|
||||
} else if (index == 4) {
|
||||
$('#divGZL').html($('#hdQuantity')[0].value);
|
||||
} else if (index == 8) {
|
||||
} else if (index == 6) {
|
||||
$('#divGZL').html($('#hdOneOKRate')[0].value);
|
||||
} else if (index == 10) {
|
||||
} else if (index == 8) {
|
||||
$('#divGZL').html($('#hdPressurePackageList')[0].value);
|
||||
} else if (index == 12) {
|
||||
} else if (index == 10) {
|
||||
$('#divGZL').html($('#hdNdtList')[0].value);
|
||||
} else if (index == 14) {
|
||||
} else if (index == 12) {
|
||||
$('#divGZL').html($('#hdTailItemList')[0].value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,77 +73,86 @@ namespace FineUIPro.Web.common
|
||||
//签证
|
||||
var siteVisas = from x in db.Comprehensive_SiteVisaManagement where x.ProjectId == this.CurrUser.LoginProjectId && cns.Contains(x.CNProfessionalId) select x;
|
||||
this.divQZ.InnerHtml = siteVisas.Count().ToString();
|
||||
//材料到货情况
|
||||
//管道材料汇总表
|
||||
string contractQuantitySheetsStr = string.Empty;
|
||||
long projectId = BLL.ProjectService.GetCLProjectCodeByProjectId(this.CurrUser.LoginProjectId);
|
||||
var contractQuantitySheets = from x in Funs.DB.CLGL_ContractQuantitySheet where x.ProjectId == projectId.ToString() && cnNames.Contains(x.Major) select x;
|
||||
var contractQuantitySheets = from x in Funs.DB.CLGL_PipelineMaterialSumList where x.ProjectId == projectId.ToString() && x.Type == "M" select x;
|
||||
if (contractQuantitySheets.Count() > 0)
|
||||
{
|
||||
contractQuantitySheetsStr = "<div class='jd-item'><div class='item jd-title'>序号</div><div class='item jd-title'>材料用途</div><div class='item jd-title'>合同号</div><div class='item jd-title'>专业</div><div class='item jd-title'>材料编码</div><div class='item jd-title'>位号</div><div class='item jd-title'>采购量</div><div class='item jd-title'>装置号</div><div class='item jd-title'>主项号</div><div class='item jd-title'>企业中文名称</div><div class='item jd-title'>备注</div></div>";
|
||||
contractQuantitySheetsStr = "<div class='jd-item'><div class='item jd-title'>序号</div><div class='item jd-title'>材料类别</div><div class='item jd-title'>设计量</div><div class='item jd-title'>预制量</div><div class='item jd-title'>采购量</div><div class='item jd-title'>采购量百分比</div><div class='item jd-title'>已到货</div><div class='item jd-title'>已到货百分比</div><div class='item jd-title'>已领料</div><div class='item jd-title'>已领料百分比</div><div class='item jd-title'>采购量MTO</div><div class='item jd-title'>采购量百分比MTO</div></div>";
|
||||
int i = 1;
|
||||
foreach (var item in contractQuantitySheets)
|
||||
{
|
||||
contractQuantitySheetsStr += "<div class='jd-item'><div class='item'>"
|
||||
+ i + "</div><div class='item'>"
|
||||
+ item.MaterialUse + "</div><div class='item'>"
|
||||
+ item.ContractCode + "</div><div class='item'>"
|
||||
+ item.Major + "</div><div class='item'>"
|
||||
+ item.MaterialCode + "</div><div class='item'>"
|
||||
+ item.TagNo + "</div><div class='item'>"
|
||||
+ item.BuyQuantity + "</div><div class='item'>"
|
||||
+ item.DeviceCode + "</div><div class='item'>"
|
||||
+ item.MainItemCode + "</div><div class='item'>"
|
||||
+ item.UnitName + "</div><div class='item'>"
|
||||
+ item.Remark + "</div></div>";
|
||||
+ item.C1 + "</div><div class='item'>"
|
||||
+ item.C2 + "</div><div class='item'>"
|
||||
+ item.C3 + "</div><div class='item'>"
|
||||
+ item.C4 + "</div><div class='item'>"
|
||||
+ item.C5 + "</div><div class='item'>"
|
||||
+ item.C6 + "</div><div class='item'>"
|
||||
+ item.C7 + "</div><div class='item'>"
|
||||
+ item.C8 + "</div><div class='item'>"
|
||||
+ item.C9 + "</div><div class='item'>"
|
||||
+ item.C10 + "</div><div class='item'>"
|
||||
+ item.C11 + "</div></div>";
|
||||
i++;
|
||||
}
|
||||
}
|
||||
this.divGZL.InnerHtml = contractQuantitySheetsStr;
|
||||
this.hdContractQuantitySheets.Value = contractQuantitySheetsStr;
|
||||
//材料出库情况
|
||||
string materialRecordsStr = string.Empty;
|
||||
var materialRecords = from x in db.CLGL_PickMaterialRecord where x.ProjectId == projectId.ToString() && cnNames.Contains(x.Major) select x;
|
||||
if (materialRecords.Count() > 0)
|
||||
{
|
||||
materialRecordsStr = "<div class='jd-item'><div class='item jd-title'>序号</div><div class='item jd-title'>领料单号</div><div class='item jd-title'>领料时间</div><div class='item jd-title'>领料单位</div><div class='item jd-title'>领料截止时间</div><div class='item jd-title'>专业</div><div class='item jd-title'>材料编码</div><div class='item jd-title'>位号</div><div class='item jd-title'>申领量</div><div class='item jd-title'>批准量</div><div class='item jd-title'>实发量</div><div class='item jd-title'>装置号</div><div class='item jd-title'>主项号</div><div class='item jd-title'>发料备注</div></div>";
|
||||
int i = 1;
|
||||
foreach (var item in materialRecords)
|
||||
{
|
||||
materialRecordsStr += "<div class='jd-item'><div class='item'>"
|
||||
+ i + "</div><div class='item'>"
|
||||
+ item.PickCode + "</div><div class='item'>"
|
||||
+ (item.PickDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.PickDate.Value) : "") + "</div><div class='item'>"
|
||||
+ item.PickUnit + "</div><div class='item'>"
|
||||
+ (item.PickLimitDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.PickLimitDate.Value) : "") + "</div><div class='item'>"
|
||||
+ item.Major + "</div><div class='item'>"
|
||||
+ item.MaterialCode + "</div><div class='item'>"
|
||||
+ item.TagNo + "</div><div class='item'>"
|
||||
+ item.ClaimQuantity + "</div><div class='item'>"
|
||||
+ item.ApproveQuantity + "</div><div class='item'>"
|
||||
+ item.ActualQuantity + "</div><div class='item'>"
|
||||
+ item.DeviceCode + "</div><div class='item'>"
|
||||
+ item.MainItemCode + "</div><div class='item'>"
|
||||
+ item.Remark + "</div></div>";
|
||||
i++;
|
||||
}
|
||||
}
|
||||
this.hdMaterialRecords.Value = materialRecordsStr;
|
||||
////材料出库情况
|
||||
//string materialRecordsStr = string.Empty;
|
||||
//var materialRecords = from x in db.CLGL_PickMaterialRecord where x.ProjectId == projectId.ToString() && cnNames.Contains(x.Major) select x;
|
||||
//if (materialRecords.Count() > 0)
|
||||
//{
|
||||
// materialRecordsStr = "<div class='jd-item'><div class='item jd-title'>序号</div><div class='item jd-title'>领料单号</div><div class='item jd-title'>领料时间</div><div class='item jd-title'>领料单位</div><div class='item jd-title'>领料截止时间</div><div class='item jd-title'>专业</div><div class='item jd-title'>材料编码</div><div class='item jd-title'>位号</div><div class='item jd-title'>申领量</div><div class='item jd-title'>批准量</div><div class='item jd-title'>实发量</div><div class='item jd-title'>装置号</div><div class='item jd-title'>主项号</div><div class='item jd-title'>发料备注</div></div>";
|
||||
// int i = 1;
|
||||
// foreach (var item in materialRecords)
|
||||
// {
|
||||
// materialRecordsStr += "<div class='jd-item'><div class='item'>"
|
||||
// + i + "</div><div class='item'>"
|
||||
// + item.PickCode + "</div><div class='item'>"
|
||||
// + (item.PickDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.PickDate.Value) : "") + "</div><div class='item'>"
|
||||
// + item.PickUnit + "</div><div class='item'>"
|
||||
// + (item.PickLimitDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.PickLimitDate.Value) : "") + "</div><div class='item'>"
|
||||
// + item.Major + "</div><div class='item'>"
|
||||
// + item.MaterialCode + "</div><div class='item'>"
|
||||
// + item.TagNo + "</div><div class='item'>"
|
||||
// + item.ClaimQuantity + "</div><div class='item'>"
|
||||
// + item.ApproveQuantity + "</div><div class='item'>"
|
||||
// + item.ActualQuantity + "</div><div class='item'>"
|
||||
// + item.DeviceCode + "</div><div class='item'>"
|
||||
// + item.MainItemCode + "</div><div class='item'>"
|
||||
// + item.Remark + "</div></div>";
|
||||
// i++;
|
||||
// }
|
||||
//}
|
||||
//this.hdMaterialRecords.Value = materialRecordsStr;
|
||||
//项目管道焊接工程量
|
||||
string totalQuantityStr = string.Empty;
|
||||
var totalQuantitys = from x in db.HJGL_FL_TotalQuantity where x.ProjectId == this.CurrUser.LoginProjectId orderby x.DeviceName, x.DeviceCode select x;
|
||||
if (totalQuantitys.Count() > 0)
|
||||
{
|
||||
totalQuantityStr = "<div class='jd-item'><div class='item jd-title'>序号</div><div class='item jd-title'>装置名称</div><div class='item jd-title'>单元号</div><div class='item jd-title'>施工单位</div><div class='item jd-title'>焊接总量</div><div class='item jd-title'>已完成总量</div></div>";
|
||||
totalQuantityStr = "<div class='jd-item'><div class='item jd-title'>序号</div><div class='item jd-title'>装置名称</div><div class='item jd-title'>单元号</div><div class='item jd-title'>施工单位</div><div class='item jd-title'>焊接总量</div><div class='item jd-title'>已完成总量</div><div class='item jd-title'>完成比例</div></div>";
|
||||
int i = 1;
|
||||
foreach (var item in totalQuantitys)
|
||||
{
|
||||
string rate = "0%";
|
||||
decimal totalWeldQuantity = Convert.ToDecimal(!string.IsNullOrEmpty(item.TotalWeldQuantity) ? item.TotalWeldQuantity : "0");
|
||||
decimal totalCompleted = Convert.ToDecimal(!string.IsNullOrEmpty(item.TotalCompleted) ? item.TotalCompleted : "0");
|
||||
if (totalWeldQuantity > 0 && totalCompleted > 0)
|
||||
{
|
||||
rate = Convert.ToDecimal(Math.Round(totalCompleted * 100 / totalWeldQuantity, 2)).ToString() + "%";
|
||||
}
|
||||
totalQuantityStr += "<div class='jd-item'><div class='item'>"
|
||||
+ i + "</div><div class='item'>"
|
||||
+ item.DeviceName + "</div><div class='item'>"
|
||||
+ item.DeviceCode + "</div><div class='item'>"
|
||||
+ item.Unit + "</div><div class='item'>"
|
||||
+ item.TotalWeldQuantity + "</div><div class='item'>"
|
||||
+ item.TotalCompleted + "</div></div>";
|
||||
+ item.TotalCompleted + "</div><div class='item'>"
|
||||
+ rate + "</div></div>";
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mainIII.aspx.cs" Inherits="FineUIPro.Web.common.mainIII" %>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mainIV.aspx.cs" Inherits="FineUIPro.Web.common.mainIV" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
@@ -429,9 +429,7 @@
|
||||
<div class="tit-one tit-center" runat="server" id="divMonth" style="color: #fff; margin-left: 15px; text-align: left;"> </div>
|
||||
<div class="tab-wrap">
|
||||
<div class="tab" data-value="2">
|
||||
<div class="t-item active">材料到货情况</div>
|
||||
<div class="spline"></div>
|
||||
<div class="t-item ">材料出库情况</div>
|
||||
<div class="t-item active">管道材料汇总表</div>
|
||||
<div class="spline"></div>
|
||||
<div class="t-item">管道焊接工程量</div>
|
||||
<div class="spline"></div>
|
||||
@@ -939,19 +937,17 @@
|
||||
else if (value == 2) {
|
||||
if (index == 0) {
|
||||
$('#divGZL').html($('#hdContractQuantitySheets')[0].value);
|
||||
} else if (index == 2) {
|
||||
$('#divGZL').html($('#hdMaterialRecords')[0].value);
|
||||
} else if (index == 4) {
|
||||
} else if (index == 2) {
|
||||
$('#divGZL').html($('#hdTotalQuantity')[0].value);
|
||||
} else if (index == 6) {
|
||||
} else if (index == 4) {
|
||||
$('#divGZL').html($('#hdQuantity')[0].value);
|
||||
} else if (index == 8) {
|
||||
} else if (index == 6) {
|
||||
$('#divGZL').html($('#hdOneOKRate')[0].value);
|
||||
} else if (index == 10) {
|
||||
} else if (index == 8) {
|
||||
$('#divGZL').html($('#hdPressurePackageList')[0].value);
|
||||
} else if (index == 12) {
|
||||
} else if (index == 10) {
|
||||
$('#divGZL').html($('#hdNdtList')[0].value);
|
||||
} else if (index == 14) {
|
||||
} else if (index == 12) {
|
||||
$('#divGZL').html($('#hdTailItemList')[0].value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,77 +114,86 @@ namespace FineUIPro.Web.common
|
||||
//签证
|
||||
var siteVisas = from x in db.Comprehensive_SiteVisaManagement where x.ProjectId == this.CurrUser.LoginProjectId && cns.Contains(x.CNProfessionalId) && unitWorkIdList.Contains(x.UnitWorkId) select x;
|
||||
this.divQZ.InnerHtml = siteVisas.Count().ToString();
|
||||
//材料到货情况
|
||||
//管道材料汇总表
|
||||
string contractQuantitySheetsStr = string.Empty;
|
||||
long projectId = BLL.ProjectService.GetCLProjectCodeByProjectId(this.CurrUser.LoginProjectId);
|
||||
var contractQuantitySheets = from x in Funs.DB.CLGL_ContractQuantitySheet where x.ProjectId == projectId.ToString() && cnNames.Contains(x.Major) select x;
|
||||
var contractQuantitySheets = from x in Funs.DB.CLGL_PipelineMaterialSumList where x.ProjectId == projectId.ToString() && x.Type == "M" select x;
|
||||
if (contractQuantitySheets.Count() > 0)
|
||||
{
|
||||
contractQuantitySheetsStr = "<div class='jd-item'><div class='item jd-title'>序号</div><div class='item jd-title'>材料用途</div><div class='item jd-title'>合同号</div><div class='item jd-title'>专业</div><div class='item jd-title'>材料编码</div><div class='item jd-title'>位号</div><div class='item jd-title'>采购量</div><div class='item jd-title'>装置号</div><div class='item jd-title'>主项号</div><div class='item jd-title'>企业中文名称</div><div class='item jd-title'>备注</div></div>";
|
||||
contractQuantitySheetsStr = "<div class='jd-item'><div class='item jd-title'>序号</div><div class='item jd-title'>材料类别</div><div class='item jd-title'>设计量</div><div class='item jd-title'>预制量</div><div class='item jd-title'>采购量</div><div class='item jd-title'>采购量百分比</div><div class='item jd-title'>已到货</div><div class='item jd-title'>已到货百分比</div><div class='item jd-title'>已领料</div><div class='item jd-title'>已领料百分比</div><div class='item jd-title'>采购量MTO</div><div class='item jd-title'>采购量百分比MTO</div></div>";
|
||||
int i = 1;
|
||||
foreach (var item in contractQuantitySheets)
|
||||
{
|
||||
contractQuantitySheetsStr += "<div class='jd-item'><div class='item'>"
|
||||
+ i + "</div><div class='item'>"
|
||||
+ item.MaterialUse + "</div><div class='item'>"
|
||||
+ item.ContractCode + "</div><div class='item'>"
|
||||
+ item.Major + "</div><div class='item'>"
|
||||
+ item.MaterialCode + "</div><div class='item'>"
|
||||
+ item.TagNo + "</div><div class='item'>"
|
||||
+ item.BuyQuantity + "</div><div class='item'>"
|
||||
+ item.DeviceCode + "</div><div class='item'>"
|
||||
+ item.MainItemCode + "</div><div class='item'>"
|
||||
+ item.UnitName + "</div><div class='item'>"
|
||||
+ item.Remark + "</div></div>";
|
||||
+ item.C1 + "</div><div class='item'>"
|
||||
+ item.C2 + "</div><div class='item'>"
|
||||
+ item.C3 + "</div><div class='item'>"
|
||||
+ item.C4 + "</div><div class='item'>"
|
||||
+ item.C5 + "</div><div class='item'>"
|
||||
+ item.C6 + "</div><div class='item'>"
|
||||
+ item.C7 + "</div><div class='item'>"
|
||||
+ item.C8 + "</div><div class='item'>"
|
||||
+ item.C9 + "</div><div class='item'>"
|
||||
+ item.C10 + "</div><div class='item'>"
|
||||
+ item.C11 + "</div></div>";
|
||||
i++;
|
||||
}
|
||||
}
|
||||
this.divGZL.InnerHtml = contractQuantitySheetsStr;
|
||||
this.hdContractQuantitySheets.Value = contractQuantitySheetsStr;
|
||||
//材料出库情况
|
||||
string materialRecordsStr = string.Empty;
|
||||
var materialRecords = from x in db.CLGL_PickMaterialRecord where x.ProjectId == projectId.ToString() && cnNames.Contains(x.Major) select x;
|
||||
if (materialRecords.Count() > 0)
|
||||
{
|
||||
materialRecordsStr = "<div class='jd-item'><div class='item jd-title'>序号</div><div class='item jd-title'>领料单号</div><div class='item jd-title'>领料时间</div><div class='item jd-title'>领料单位</div><div class='item jd-title'>领料截止时间</div><div class='item jd-title'>专业</div><div class='item jd-title'>材料编码</div><div class='item jd-title'>位号</div><div class='item jd-title'>申领量</div><div class='item jd-title'>批准量</div><div class='item jd-title'>实发量</div><div class='item jd-title'>装置号</div><div class='item jd-title'>主项号</div><div class='item jd-title'>发料备注</div></div>";
|
||||
int i = 1;
|
||||
foreach (var item in materialRecords)
|
||||
{
|
||||
materialRecordsStr += "<div class='jd-item'><div class='item'>"
|
||||
+ i + "</div><div class='item'>"
|
||||
+ item.PickCode + "</div><div class='item'>"
|
||||
+ (item.PickDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.PickDate.Value) : "") + "</div><div class='item'>"
|
||||
+ item.PickUnit + "</div><div class='item'>"
|
||||
+ (item.PickLimitDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.PickLimitDate.Value) : "") + "</div><div class='item'>"
|
||||
+ item.Major + "</div><div class='item'>"
|
||||
+ item.MaterialCode + "</div><div class='item'>"
|
||||
+ item.TagNo + "</div><div class='item'>"
|
||||
+ item.ClaimQuantity + "</div><div class='item'>"
|
||||
+ item.ApproveQuantity + "</div><div class='item'>"
|
||||
+ item.ActualQuantity + "</div><div class='item'>"
|
||||
+ item.DeviceCode + "</div><div class='item'>"
|
||||
+ item.MainItemCode + "</div><div class='item'>"
|
||||
+ item.Remark + "</div></div>";
|
||||
i++;
|
||||
}
|
||||
}
|
||||
this.hdMaterialRecords.Value = materialRecordsStr;
|
||||
////材料出库情况
|
||||
//string materialRecordsStr = string.Empty;
|
||||
//var materialRecords = from x in db.CLGL_PickMaterialRecord where x.ProjectId == projectId.ToString() && cnNames.Contains(x.Major) select x;
|
||||
//if (materialRecords.Count() > 0)
|
||||
//{
|
||||
// materialRecordsStr = "<div class='jd-item'><div class='item jd-title'>序号</div><div class='item jd-title'>领料单号</div><div class='item jd-title'>领料时间</div><div class='item jd-title'>领料单位</div><div class='item jd-title'>领料截止时间</div><div class='item jd-title'>专业</div><div class='item jd-title'>材料编码</div><div class='item jd-title'>位号</div><div class='item jd-title'>申领量</div><div class='item jd-title'>批准量</div><div class='item jd-title'>实发量</div><div class='item jd-title'>装置号</div><div class='item jd-title'>主项号</div><div class='item jd-title'>发料备注</div></div>";
|
||||
// int i = 1;
|
||||
// foreach (var item in materialRecords)
|
||||
// {
|
||||
// materialRecordsStr += "<div class='jd-item'><div class='item'>"
|
||||
// + i + "</div><div class='item'>"
|
||||
// + item.PickCode + "</div><div class='item'>"
|
||||
// + (item.PickDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.PickDate.Value) : "") + "</div><div class='item'>"
|
||||
// + item.PickUnit + "</div><div class='item'>"
|
||||
// + (item.PickLimitDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.PickLimitDate.Value) : "") + "</div><div class='item'>"
|
||||
// + item.Major + "</div><div class='item'>"
|
||||
// + item.MaterialCode + "</div><div class='item'>"
|
||||
// + item.TagNo + "</div><div class='item'>"
|
||||
// + item.ClaimQuantity + "</div><div class='item'>"
|
||||
// + item.ApproveQuantity + "</div><div class='item'>"
|
||||
// + item.ActualQuantity + "</div><div class='item'>"
|
||||
// + item.DeviceCode + "</div><div class='item'>"
|
||||
// + item.MainItemCode + "</div><div class='item'>"
|
||||
// + item.Remark + "</div></div>";
|
||||
// i++;
|
||||
// }
|
||||
//}
|
||||
//this.hdMaterialRecords.Value = materialRecordsStr;
|
||||
//项目管道焊接工程量
|
||||
string totalQuantityStr = string.Empty;
|
||||
var totalQuantitys = from x in db.HJGL_FL_TotalQuantity where x.ProjectId == this.CurrUser.LoginProjectId orderby x.DeviceName, x.DeviceCode select x;
|
||||
if (totalQuantitys.Count() > 0)
|
||||
{
|
||||
totalQuantityStr = "<div class='jd-item'><div class='item jd-title'>序号</div><div class='item jd-title'>装置名称</div><div class='item jd-title'>单元号</div><div class='item jd-title'>施工单位</div><div class='item jd-title'>焊接总量</div><div class='item jd-title'>已完成总量</div></div>";
|
||||
totalQuantityStr = "<div class='jd-item'><div class='item jd-title'>序号</div><div class='item jd-title'>装置名称</div><div class='item jd-title'>单元号</div><div class='item jd-title'>施工单位</div><div class='item jd-title'>焊接总量</div><div class='item jd-title'>已完成总量</div><div class='item jd-title'>完成比例</div></div>";
|
||||
int i = 1;
|
||||
foreach (var item in totalQuantitys)
|
||||
{
|
||||
string rate = "0%";
|
||||
decimal totalWeldQuantity = Convert.ToDecimal(!string.IsNullOrEmpty(item.TotalWeldQuantity) ? item.TotalWeldQuantity : "0");
|
||||
decimal totalCompleted = Convert.ToDecimal(!string.IsNullOrEmpty(item.TotalCompleted) ? item.TotalCompleted : "0");
|
||||
if (totalWeldQuantity > 0 && totalCompleted > 0)
|
||||
{
|
||||
rate = Convert.ToDecimal(Math.Round(totalCompleted * 100 / totalWeldQuantity, 2)).ToString() + "%";
|
||||
}
|
||||
totalQuantityStr += "<div class='jd-item'><div class='item'>"
|
||||
+ i + "</div><div class='item'>"
|
||||
+ item.DeviceName + "</div><div class='item'>"
|
||||
+ item.DeviceCode + "</div><div class='item'>"
|
||||
+ item.Unit + "</div><div class='item'>"
|
||||
+ item.TotalWeldQuantity + "</div><div class='item'>"
|
||||
+ item.TotalCompleted + "</div></div>";
|
||||
+ item.TotalCompleted + "</div><div class='item'>"
|
||||
+ rate + "</div></div>";
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
+82
-73
@@ -13,7 +13,16 @@ namespace FineUIPro.Web.common {
|
||||
public partial class mainIV {
|
||||
|
||||
/// <summary>
|
||||
/// hdNoticeId 控件。
|
||||
/// Head1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
|
||||
|
||||
/// <summary>
|
||||
/// hdNoticeId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
@@ -30,6 +39,78 @@ namespace FineUIPro.Web.common {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button imgBtn;
|
||||
|
||||
/// <summary>
|
||||
/// hdContractQuantitySheets 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlInputHidden hdContractQuantitySheets;
|
||||
|
||||
/// <summary>
|
||||
/// hdMaterialRecords 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlInputHidden hdMaterialRecords;
|
||||
|
||||
/// <summary>
|
||||
/// hdTotalQuantity 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlInputHidden hdTotalQuantity;
|
||||
|
||||
/// <summary>
|
||||
/// hdQuantity 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlInputHidden hdQuantity;
|
||||
|
||||
/// <summary>
|
||||
/// hdOneOKRate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlInputHidden hdOneOKRate;
|
||||
|
||||
/// <summary>
|
||||
/// hdPressurePackageList 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlInputHidden hdPressurePackageList;
|
||||
|
||||
/// <summary>
|
||||
/// hdNdtList 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlInputHidden hdNdtList;
|
||||
|
||||
/// <summary>
|
||||
/// hdTailItemList 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlInputHidden hdTailItemList;
|
||||
|
||||
/// <summary>
|
||||
/// swiper2 控件。
|
||||
/// </summary>
|
||||
@@ -173,77 +254,5 @@ namespace FineUIPro.Web.common {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divGZL;
|
||||
|
||||
/// <summary>
|
||||
/// hdContractQuantitySheets 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlInputHidden hdContractQuantitySheets;
|
||||
|
||||
/// <summary>
|
||||
/// hdMaterialRecords 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlInputHidden hdMaterialRecords;
|
||||
|
||||
/// <summary>
|
||||
/// hdTotalQuantity 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlInputHidden hdTotalQuantity;
|
||||
|
||||
/// <summary>
|
||||
/// hdQuantity 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlInputHidden hdQuantity;
|
||||
|
||||
/// <summary>
|
||||
/// hdOneOKRate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlInputHidden hdOneOKRate;
|
||||
|
||||
/// <summary>
|
||||
/// hdPressurePackageList 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlInputHidden hdPressurePackageList;
|
||||
|
||||
/// <summary>
|
||||
/// hdNdtList 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlInputHidden hdNdtList;
|
||||
|
||||
/// <summary>
|
||||
/// hdTailItemList 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlInputHidden hdTailItemList;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -341,8 +341,8 @@
|
||||
show: false
|
||||
},
|
||||
data: [
|
||||
{ value: data.num1, name: '已完成' },
|
||||
{ value: data.num2, name: '未完成' }
|
||||
{ value: data.num10, name: '已完成' },
|
||||
{ value: data.num11, name: '未完成' }
|
||||
],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
@@ -513,24 +513,19 @@
|
||||
// 指定图表的配置项和数据
|
||||
var option = {
|
||||
title: {
|
||||
//left: 'center',
|
||||
// left:'center',
|
||||
text: '一次合格率',
|
||||
textStyle: {
|
||||
color: '#fff',
|
||||
fontWeight: 'normal',
|
||||
fontSize: 12
|
||||
fontSize:14
|
||||
},
|
||||
show: true
|
||||
},
|
||||
tooltip: {
|
||||
formatter: '{a}<br />{b}: {c}%'
|
||||
},
|
||||
tooltip: {},
|
||||
legend: {
|
||||
show: true,
|
||||
textStyle: {
|
||||
color: '#fff'
|
||||
},
|
||||
left: '10%',
|
||||
//data: ['销量'],
|
||||
show: false
|
||||
},
|
||||
xAxis: {
|
||||
axisTick: {
|
||||
@@ -545,7 +540,30 @@
|
||||
show: true,
|
||||
textStyle: {
|
||||
color: 'rgba(255, 255, 255, 0.8)'
|
||||
}
|
||||
},
|
||||
formatter:function(value)
|
||||
{
|
||||
var ret = "";//拼接加\n返回的类目项
|
||||
var maxLength = 8;//每项显示文字个数
|
||||
var valLength = value.length;//X轴类目项的文字个数
|
||||
var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
|
||||
if (rowN > 1)//如果类目项的文字大于maxLength,
|
||||
{
|
||||
for (var i = 0; i < rowN; i++) {
|
||||
var temp = "";//每次截取的字符串
|
||||
var start = i * maxLength;//开始截取的位置
|
||||
var end = start + maxLength;//结束截取的位置
|
||||
//这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧
|
||||
//temp = value.substring(start, end) + "\n";
|
||||
temp = value.substring(start, end) + (i == rowN -1 ? "" : "\n");
|
||||
ret += temp; //凭借最终的字符串
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
else {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
},
|
||||
type: 'category',
|
||||
data: xArr
|
||||
@@ -555,7 +573,6 @@
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
show: false,
|
||||
lineStyle: {
|
||||
color: 'rgba(255, 255, 255, 0.3)'
|
||||
}
|
||||
@@ -564,22 +581,25 @@
|
||||
show: true,
|
||||
textStyle: {
|
||||
color: 'rgba(255, 255, 255, 0.8)'
|
||||
},
|
||||
formatter: '{value} %'
|
||||
}
|
||||
}
|
||||
},
|
||||
series: data,
|
||||
series: [{
|
||||
name: '',
|
||||
type: 'bar',
|
||||
data: data
|
||||
}],
|
||||
grid: {
|
||||
top: '15%',
|
||||
left: '10',
|
||||
right: '10',
|
||||
top: '25%',
|
||||
left: '0%',
|
||||
right: '0%',
|
||||
bottom: '0%',
|
||||
containLabel: true,
|
||||
backgroundColor: 'rgba(0,162,233, 0.01)',
|
||||
// borderColor: 'rgba(0,162,233, 1)'
|
||||
},
|
||||
itemStyle: {
|
||||
//color: 'rgba(200,201,10, 1)'
|
||||
color: 'rgba(200,201,10, 1)'
|
||||
},
|
||||
backgroundColor: 'rgba(0,162,233, 0.01)',
|
||||
textStyle: {
|
||||
@@ -604,8 +624,8 @@
|
||||
name: '分包3',
|
||||
type: 'line',
|
||||
data: [51, 61, 71],
|
||||
}]
|
||||
var data2 = four.series3
|
||||
}]
|
||||
var data2 = four.series[0].data
|
||||
line('four', xArr1, data2)
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
@@ -898,12 +918,12 @@
|
||||
var four2 =<%=Four2 %>;
|
||||
if (index == 0) {
|
||||
var xArr1 = four.categories
|
||||
var data2 = four.series3
|
||||
var data2 = four.series[0].data
|
||||
line('four', xArr1, data2)
|
||||
}
|
||||
else if (index == 2) {
|
||||
var xArr1 = four2.categories
|
||||
var data2 = four2.series3
|
||||
var data2 = four2.series[0].data
|
||||
line('four', xArr1, data2)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,19 +15,14 @@ namespace FineUIPro.Web
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
var firstOKRates = from x in Funs.DB.HJGL_FirstOKRate where x.ProjectId == this.CurrUser.LoginProjectId && x.Type == "unit" orderby x.Months descending select x;
|
||||
var units = firstOKRates.Where(x => x.Type == "unit").Select(x => x.Name).Distinct();
|
||||
if (firstOKRates.Count() > 0)
|
||||
var oneOKRates = from x in Funs.DB.HJGL_FL_OneOKRate where x.ProjectId == this.CurrUser.LoginProjectId select x;
|
||||
if (oneOKRates.Count() > 0)
|
||||
{
|
||||
int totalNum = 0, oKNum = 0;
|
||||
foreach (var item in units)
|
||||
foreach (var item in oneOKRates)
|
||||
{
|
||||
var f = firstOKRates.FirstOrDefault(x => x.Name == item); //取每个单位最后一个月的一次合格率数据进行汇总
|
||||
if (f != null)
|
||||
{
|
||||
totalNum += f.TotalNum ?? 0;
|
||||
oKNum += f.OKNum ?? 0;
|
||||
}
|
||||
totalNum += !string.IsNullOrEmpty(item.TestWeldAmount) ? Convert.ToInt32(item.TestWeldAmount) : 0;
|
||||
oKNum += !string.IsNullOrEmpty(item.OnceQualifiedQuantity) ? Convert.ToInt32(item.OnceQualifiedQuantity) : 0;
|
||||
}
|
||||
if (totalNum > 0)
|
||||
{
|
||||
@@ -49,16 +44,16 @@ namespace FineUIPro.Web
|
||||
get
|
||||
{
|
||||
Model.Num num = new Model.Num();
|
||||
var finishRates = from x in Funs.DB.HJGL_FinishRate where x.ProjectId == this.CurrUser.LoginProjectId && x.Type == "unit" select x;
|
||||
int totalNum = 0, finishNum = 0;
|
||||
foreach (var item in finishRates)
|
||||
var totalQuantity = from x in Funs.DB.HJGL_FL_TotalQuantity where x.ProjectId == this.CurrUser.LoginProjectId select x;
|
||||
decimal totalNum = 0, finishNum = 0;
|
||||
foreach (var item in totalQuantity)
|
||||
{
|
||||
totalNum += item.TotalNum ?? 0;
|
||||
finishNum += item.FinishNum ?? 0;
|
||||
totalNum += !string.IsNullOrEmpty(item.TotalWeldQuantity) ? Convert.ToDecimal(item.TotalWeldQuantity) : 0;
|
||||
finishNum += !string.IsNullOrEmpty(item.TotalCompleted) ? Convert.ToDecimal(item.TotalCompleted) : 0;
|
||||
}
|
||||
int notFinishNum = totalNum - finishNum;
|
||||
num.num1 = finishNum;
|
||||
num.num2 = notFinishNum;
|
||||
decimal notFinishNum = totalNum - finishNum;
|
||||
num.num10 = finishNum;
|
||||
num.num11 = notFinishNum;
|
||||
return JsonConvert.SerializeObject(num);
|
||||
}
|
||||
}
|
||||
@@ -69,40 +64,47 @@ namespace FineUIPro.Web
|
||||
{
|
||||
get
|
||||
{
|
||||
List<Model.SingleSerie2> series = new List<Model.SingleSerie2>();
|
||||
List<Model.SingleSerie> series = new List<Model.SingleSerie>();
|
||||
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
|
||||
List<string> listCategories = new List<string>();
|
||||
businessColumn.title = "一次合格率";
|
||||
var views = (from x in Funs.DB.HJGL_FirstOKRate where x.ProjectId == this.CurrUser.LoginProjectId && x.Type == "unit" orderby x.Months select x).ToList();
|
||||
var months = views.Select(x => x.Months).Distinct().ToList();
|
||||
var units = views.Select(x => x.Name).Distinct().ToList();
|
||||
for (int i = 0; i < months.Count; i++)
|
||||
{
|
||||
listCategories.Add(string.Format("{0:yyyy-MM}", views[i].Months));
|
||||
}
|
||||
var views = (from x in Funs.DB.HJGL_FL_OneOKRate where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
|
||||
var units = views.Select(x => x.UnitName).Distinct().ToList();
|
||||
for (int i = 0; i < units.Count; i++)
|
||||
{
|
||||
listCategories.Add(units[i]);
|
||||
}
|
||||
int totalNum = 0, oKNum = 0;
|
||||
Model.SingleSerie s = new Model.SingleSerie();
|
||||
List<double> listdata = new List<double>();
|
||||
for (int i = 0; i < units.Count; i++)
|
||||
{
|
||||
Model.SingleSerie2 s = new Model.SingleSerie2();
|
||||
s.name = units[i];
|
||||
s.type = "line";
|
||||
List<double?> listdata = new List<double?>();
|
||||
for (int j = 0; j < months.Count; j++)
|
||||
|
||||
var items = views.Where(x => x.UnitName == units[i]);
|
||||
totalNum = 0;
|
||||
oKNum = 0;
|
||||
foreach (var item in items)
|
||||
{
|
||||
var item = views.FirstOrDefault(x => x.Name == units[i] && x.Months == months[j]);
|
||||
if (item != null)
|
||||
{
|
||||
listdata.Add(Convert.ToDouble(item.Rate.Replace("%", "")));
|
||||
}
|
||||
else
|
||||
{
|
||||
listdata.Add(null);
|
||||
}
|
||||
totalNum += !string.IsNullOrEmpty(item.TestWeldAmount) ? Convert.ToInt32(item.TestWeldAmount) : 0;
|
||||
oKNum += !string.IsNullOrEmpty(item.OnceQualifiedQuantity) ? Convert.ToInt32(item.OnceQualifiedQuantity) : 0;
|
||||
}
|
||||
if (totalNum > 0)
|
||||
{
|
||||
var a = Convert.ToDouble(oKNum);
|
||||
var b = Convert.ToDouble(totalNum);
|
||||
listdata.Add(Convert.ToDouble(decimal.Round(decimal.Parse((a / b * 100).ToString()), 2)));
|
||||
}
|
||||
else
|
||||
{
|
||||
listdata.Add(0);
|
||||
}
|
||||
s.data = listdata;
|
||||
series.Add(s);
|
||||
}
|
||||
s.data = listdata;
|
||||
series.Add(s);
|
||||
businessColumn.categories = listCategories;
|
||||
businessColumn.series3 = series;
|
||||
businessColumn.series = series;
|
||||
return JsonConvert.SerializeObject(businessColumn);
|
||||
}
|
||||
}
|
||||
@@ -111,40 +113,46 @@ namespace FineUIPro.Web
|
||||
{
|
||||
get
|
||||
{
|
||||
List<Model.SingleSerie2> series = new List<Model.SingleSerie2>();
|
||||
List<Model.SingleSerie> series = new List<Model.SingleSerie>();
|
||||
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
|
||||
List<string> listCategories = new List<string>();
|
||||
businessColumn.title = "一次合格率";
|
||||
var views = (from x in Funs.DB.HJGL_FirstOKRate where x.ProjectId == this.CurrUser.LoginProjectId && x.Type == "device" orderby x.Months select x).ToList();
|
||||
var months = views.Select(x => x.Months).Distinct().ToList();
|
||||
var devices = views.Select(x => x.Name).Distinct().ToList();
|
||||
for (int i = 0; i < months.Count; i++)
|
||||
{
|
||||
listCategories.Add(string.Format("{0:yyyy-MM}", views[i].Months));
|
||||
}
|
||||
var views = (from x in Funs.DB.HJGL_FL_OneOKRate where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
|
||||
var devices = views.Select(x => x.DeviceName).Distinct().ToList();
|
||||
for (int i = 0; i < devices.Count; i++)
|
||||
{
|
||||
listCategories.Add(devices[i]);
|
||||
}
|
||||
int totalNum = 0, oKNum = 0;
|
||||
Model.SingleSerie s = new Model.SingleSerie();
|
||||
List<double> listdata = new List<double>();
|
||||
for (int i = 0; i < devices.Count; i++)
|
||||
{
|
||||
Model.SingleSerie2 s = new Model.SingleSerie2();
|
||||
s.name = devices[i];
|
||||
s.type = "line";
|
||||
List<double?> listdata = new List<double?>();
|
||||
for (int j = 0; j < months.Count; j++)
|
||||
var items = views.Where(x => x.DeviceName == devices[i]);
|
||||
totalNum = 0;
|
||||
oKNum = 0;
|
||||
foreach (var item in items)
|
||||
{
|
||||
var item = views.FirstOrDefault(x => x.Name == devices[i] && x.Months == months[j]);
|
||||
if (item != null)
|
||||
{
|
||||
listdata.Add(Convert.ToDouble(item.Rate.Replace("%", "")));
|
||||
}
|
||||
else
|
||||
{
|
||||
listdata.Add(null);
|
||||
}
|
||||
totalNum += !string.IsNullOrEmpty(item.TestWeldAmount) ? Convert.ToInt32(item.TestWeldAmount) : 0;
|
||||
oKNum += !string.IsNullOrEmpty(item.OnceQualifiedQuantity) ? Convert.ToInt32(item.OnceQualifiedQuantity) : 0;
|
||||
}
|
||||
if (totalNum > 0)
|
||||
{
|
||||
var a = Convert.ToDouble(oKNum);
|
||||
var b = Convert.ToDouble(totalNum);
|
||||
listdata.Add(Convert.ToDouble(decimal.Round(decimal.Parse((a / b * 100).ToString()), 2)));
|
||||
}
|
||||
else
|
||||
{
|
||||
listdata.Add(0);
|
||||
}
|
||||
s.data = listdata;
|
||||
series.Add(s);
|
||||
}
|
||||
s.data = listdata;
|
||||
series.Add(s);
|
||||
businessColumn.categories = listCategories;
|
||||
businessColumn.series3 = series;
|
||||
businessColumn.series = series;
|
||||
return JsonConvert.SerializeObject(businessColumn);
|
||||
}
|
||||
}
|
||||
@@ -160,16 +168,26 @@ namespace FineUIPro.Web
|
||||
List<string> listCategories = new List<string>();
|
||||
businessColumn.title = "焊接完成量";
|
||||
businessColumn.xFontNum = 7;
|
||||
var views = (from x in Funs.DB.HJGL_FinishRate where x.ProjectId == this.CurrUser.LoginProjectId && x.Type == "unit" orderby x.Code select x).ToList();
|
||||
var views = (from x in Funs.DB.HJGL_FL_TotalQuantity where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
|
||||
Model.SingleSerie s = new Model.SingleSerie();
|
||||
Model.SingleSerie s2 = new Model.SingleSerie();
|
||||
List<double> listdata = new List<double>();
|
||||
List<double> listdata2 = new List<double>();
|
||||
foreach (var item in views)
|
||||
double totalCompleted = 0, totalNoCompleted = 0;
|
||||
var units = views.Select(x => x.Unit).Distinct().ToList();
|
||||
foreach (var unit in units)
|
||||
{
|
||||
listCategories.Add(item.Name);
|
||||
listdata.Add(item.FinishNum ?? 0);
|
||||
listdata2.Add((item.TotalNum ?? 0) - (item.FinishNum ?? 0));
|
||||
totalCompleted = 0;
|
||||
totalNoCompleted = 0;
|
||||
listCategories.Add(unit);
|
||||
var unitViews = views.Where(x => x.Unit == unit);
|
||||
foreach (var item in unitViews)
|
||||
{
|
||||
totalCompleted += Convert.ToDouble(!string.IsNullOrEmpty(item.TotalCompleted) ? Convert.ToDecimal(item.TotalCompleted) : 0);
|
||||
totalNoCompleted += Convert.ToDouble(!string.IsNullOrEmpty(item.TotalWeldQuantity) ? Convert.ToDecimal(item.TotalWeldQuantity) : 0) - Convert.ToDouble(!string.IsNullOrEmpty(item.TotalCompleted) ? Convert.ToDecimal(item.TotalCompleted) : 0);
|
||||
}
|
||||
listdata.Add(totalCompleted);
|
||||
listdata2.Add(totalNoCompleted);
|
||||
}
|
||||
s.data = listdata;
|
||||
s2.data = listdata2;
|
||||
@@ -190,16 +208,26 @@ namespace FineUIPro.Web
|
||||
List<string> listCategories = new List<string>();
|
||||
businessColumn.title = "焊接完成量";
|
||||
businessColumn.xFontNum = 7;
|
||||
var views = (from x in Funs.DB.HJGL_FinishRate where x.ProjectId == this.CurrUser.LoginProjectId && x.Type == "device" orderby x.Code select x).ToList();
|
||||
var views = (from x in Funs.DB.HJGL_FL_TotalQuantity where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
|
||||
Model.SingleSerie s = new Model.SingleSerie();
|
||||
Model.SingleSerie s2 = new Model.SingleSerie();
|
||||
List<double> listdata = new List<double>();
|
||||
List<double> listdata2 = new List<double>();
|
||||
foreach (var item in views)
|
||||
double totalCompleted = 0, totalNoCompleted = 0;
|
||||
var deviceNames = views.Select(x => x.DeviceName).Distinct().ToList();
|
||||
foreach (var deviceName in deviceNames)
|
||||
{
|
||||
listCategories.Add(item.Name);
|
||||
listdata.Add(item.FinishNum ?? 0);
|
||||
listdata2.Add((item.TotalNum ?? 0) - (item.FinishNum ?? 0));
|
||||
totalCompleted = 0;
|
||||
totalNoCompleted = 0;
|
||||
listCategories.Add(deviceName);
|
||||
var deviceNameViews = views.Where(x => x.DeviceName == deviceName);
|
||||
foreach (var item in deviceNameViews)
|
||||
{
|
||||
totalCompleted += Convert.ToDouble(!string.IsNullOrEmpty(item.TotalCompleted) ? Convert.ToDecimal(item.TotalCompleted) : 0);
|
||||
totalNoCompleted += Convert.ToDouble(!string.IsNullOrEmpty(item.TotalWeldQuantity) ? Convert.ToDecimal(item.TotalWeldQuantity) : 0) - Convert.ToDouble(!string.IsNullOrEmpty(item.TotalCompleted) ? Convert.ToDecimal(item.TotalCompleted) : 0);
|
||||
}
|
||||
listdata.Add(totalCompleted);
|
||||
listdata2.Add(totalNoCompleted);
|
||||
}
|
||||
s.data = listdata;
|
||||
s2.data = listdata2;
|
||||
|
||||
@@ -238,7 +238,7 @@
|
||||
show: false
|
||||
},
|
||||
tooltip: {
|
||||
formatter: '{a}<br />{b}: {c}%'
|
||||
formatter: '{a}<br />{b}: {c}'
|
||||
},
|
||||
legend: {
|
||||
show: true,
|
||||
@@ -280,7 +280,7 @@
|
||||
textStyle: {
|
||||
color: 'rgba(255, 255, 255, 0.8)'
|
||||
},
|
||||
formatter: '{value} %'
|
||||
//formatter: '{value} %'
|
||||
}
|
||||
},
|
||||
series: data,
|
||||
@@ -308,20 +308,25 @@
|
||||
var two =<%=Two %>;
|
||||
var xArr1 = two.categories
|
||||
var data1 = [{
|
||||
name: '计划值',
|
||||
name: '本月计划工作预算费用-BCWS',
|
||||
type: 'bar',
|
||||
//smooth: true,
|
||||
data: two.series[0].data,
|
||||
lineStyle: {
|
||||
//color: 'rgba(200,201,10, 1)'
|
||||
color: 'rgba(200,201,10, 1)'
|
||||
}
|
||||
}, {
|
||||
name: '实际值',
|
||||
name: '本月已完工作预算费用-BCWP',
|
||||
type: 'bar',
|
||||
//smooth: true,
|
||||
data: two.series[2].data,
|
||||
}, {
|
||||
name: '累计计划值',
|
||||
name: '本月已完工作实际费用-ACWP',
|
||||
type: 'bar',
|
||||
//smooth: true,
|
||||
data: two.series[4].data,
|
||||
}, {
|
||||
name: '累计计划工作预算费用-BCWS',
|
||||
type: 'line',
|
||||
//smooth: true,
|
||||
data: two.series[1].data,
|
||||
@@ -329,10 +334,23 @@
|
||||
//color: 'rgba(200,201,10, 1)'
|
||||
}
|
||||
}, {
|
||||
name: '累计实际值',
|
||||
name: '累计已完工作预算费用-BCWP',
|
||||
type: 'line',
|
||||
//smooth: true,
|
||||
data: two.series[3].data,
|
||||
}, {
|
||||
name: '累计已完工作实际费用-ACWP',
|
||||
type: 'line',
|
||||
//smooth: true,
|
||||
data: two.series[5].data,
|
||||
lineStyle: {
|
||||
color: 'rgba(200,201,10, 1)'
|
||||
},
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: 'rgba(200,201,10, 1)'
|
||||
}
|
||||
}
|
||||
}]
|
||||
line('two', xArr1, data1)
|
||||
</script>
|
||||
|
||||
@@ -7,6 +7,7 @@ using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using BLL;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace FineUIPro.Web
|
||||
{
|
||||
@@ -42,34 +43,144 @@ namespace FineUIPro.Web
|
||||
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
|
||||
List<string> listCategories = new List<string>();
|
||||
businessColumn.title = "赢得值曲线";
|
||||
var views = (from x in Funs.DB.View_JDGL_ProgressCompletion where x.ProjectId == this.CurrUser.LoginProjectId orderby x.Months select x).ToList();
|
||||
Model.SingleSerie s = new Model.SingleSerie();
|
||||
Model.SingleSerie s2 = new Model.SingleSerie();
|
||||
Model.SingleSerie s3 = new Model.SingleSerie();
|
||||
Model.SingleSerie s4 = new Model.SingleSerie();
|
||||
List<double> listdata = new List<double>();
|
||||
List<double> listdata2 = new List<double>();
|
||||
List<double> listdata3 = new List<double>();
|
||||
List<double> listdata4 = new List<double>();
|
||||
for (int i = 0; i < views.Count; i++)
|
||||
Model.Project_Installation installation = BLL.Project_InstallationService.GetProjectInstallationByProjectId(this.CurrUser.LoginProjectId);
|
||||
if (installation != null)
|
||||
{
|
||||
listCategories.Add(views[i].MonthStr);
|
||||
listdata.Add(Convert.ToDouble(views[i].PlanNum));
|
||||
listdata2.Add(Convert.ToDouble(views[i].TotalPlanNum));
|
||||
listdata3.Add(Convert.ToDouble(views[i].RealNum));
|
||||
listdata4.Add(Convert.ToDouble(views[i].TotalRealNum));
|
||||
Model.SingleSerie s = new Model.SingleSerie();
|
||||
Model.SingleSerie s2 = new Model.SingleSerie();
|
||||
Model.SingleSerie s3 = new Model.SingleSerie();
|
||||
Model.SingleSerie s4 = new Model.SingleSerie();
|
||||
Model.SingleSerie s5 = new Model.SingleSerie();
|
||||
Model.SingleSerie s6 = new Model.SingleSerie();
|
||||
List<double> listdata = new List<double>();
|
||||
List<double> listdata2 = new List<double>();
|
||||
List<double> listdata3 = new List<double>();
|
||||
List<double> listdata4 = new List<double>();
|
||||
List<double> listdata5 = new List<double>();
|
||||
List<double> listdata6 = new List<double>();
|
||||
string strSql = "select distinct (cast(YEAR(Months) as varchar(4))+'.'+cast(MONTH(Months) as varchar(2))) as 月份,t.Months," +
|
||||
"ThisRealCost as '本月已完工作实际费用-ACWP',ThisPlanCost as '本月已完工作预算费用-BCWP',ThisPlanValue as '本月计划工作预算费用-BCWS',TotalPlanValue as '累计计划工作预算费用-BCWS',TotalRealCost as '累计已完工作实际费用-ACWP',TotalPlanCost as '累计已完工作预算费用-BCWP' " +
|
||||
"from dbo.View_WBS_CostControlParentDetail as t where ParentId=@Id order by t.Months";
|
||||
//string date = DateTime.Now.Year + "-" + DateTime.Now.Month + "-01";
|
||||
SqlParameter[] parameter = new SqlParameter[]
|
||||
{
|
||||
new SqlParameter("@Id",installation.InstallationId),
|
||||
//new SqlParameter("@Months",date),
|
||||
};
|
||||
DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
decimal lastbcws = 0, bcws = 0, lastacwp = 0, acwp = 0, lastbcwp = 0, bcwp = 0;
|
||||
for (int i = 0; i < dt.Rows.Count; i++)
|
||||
{
|
||||
dt.Rows[i]["本月已完工作实际费用-ACWP"] = Funs.GetNewDecimalOrZero(dt.Rows[i]["本月已完工作实际费用-ACWP"].ToString()) / 10000;
|
||||
dt.Rows[i]["本月已完工作预算费用-BCWP"] = Funs.GetNewDecimalOrZero(dt.Rows[i]["本月已完工作预算费用-BCWP"].ToString()) / 10000;
|
||||
dt.Rows[i]["本月计划工作预算费用-BCWS"] = Funs.GetNewDecimalOrZero(dt.Rows[i]["本月计划工作预算费用-BCWS"].ToString()) / 10000;
|
||||
bcws = Funs.GetNewDecimalOrZero(dt.Rows[i]["累计计划工作预算费用-BCWS"].ToString());
|
||||
acwp = Funs.GetNewDecimalOrZero(dt.Rows[i]["累计已完工作实际费用-ACWP"].ToString());
|
||||
bcwp = Funs.GetNewDecimalOrZero(dt.Rows[i]["累计已完工作预算费用-BCWP"].ToString());
|
||||
if (bcws == lastbcws)
|
||||
{
|
||||
if (Funs.GetNewDateTimeOrNow(dt.Rows[i]["Months"].ToString()) > DateTime.Now)
|
||||
{
|
||||
dt.Rows[i]["累计计划工作预算费用-BCWS"] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
dt.Rows[i]["累计计划工作预算费用-BCWS"] = bcws / 10000;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dt.Rows[i]["累计计划工作预算费用-BCWS"] = bcws / 10000;
|
||||
}
|
||||
if (acwp == lastacwp)
|
||||
{
|
||||
if (Funs.GetNewDateTimeOrNow(dt.Rows[i]["Months"].ToString()) > DateTime.Now)
|
||||
{
|
||||
dt.Rows[i]["累计已完工作实际费用-ACWP"] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
dt.Rows[i]["累计已完工作实际费用-ACWP"] = acwp / 10000;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dt.Rows[i]["累计已完工作实际费用-ACWP"] = acwp / 10000;
|
||||
}
|
||||
if (bcwp == lastbcwp)
|
||||
{
|
||||
if (Funs.GetNewDateTimeOrNow(dt.Rows[i]["Months"].ToString()) > DateTime.Now)
|
||||
{
|
||||
dt.Rows[i]["累计已完工作预算费用-BCWP"] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
dt.Rows[i]["累计已完工作预算费用-BCWP"] = bcwp / 10000;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dt.Rows[i]["累计已完工作预算费用-BCWP"] = bcwp / 10000;
|
||||
}
|
||||
lastbcws = bcws;
|
||||
lastacwp = acwp;
|
||||
lastbcwp = bcwp;
|
||||
|
||||
listCategories.Add(dt.Rows[i]["月份"].ToString());
|
||||
if (Funs.GetNewDateTimeOrNow(dt.Rows[i]["Months"].ToString()) <= DateTime.Now)
|
||||
{
|
||||
listdata.Add(Convert.ToDouble(dt.Rows[i]["本月计划工作预算费用-BCWS"]));
|
||||
listdata2.Add(Convert.ToDouble(dt.Rows[i]["累计计划工作预算费用-BCWS"]));
|
||||
listdata3.Add(Convert.ToDouble(dt.Rows[i]["本月已完工作预算费用-BCWP"]));
|
||||
listdata4.Add(Convert.ToDouble(dt.Rows[i]["累计已完工作预算费用-BCWP"]));
|
||||
listdata5.Add(Convert.ToDouble(dt.Rows[i]["本月已完工作实际费用-ACWP"]));
|
||||
listdata6.Add(Convert.ToDouble(dt.Rows[i]["累计已完工作实际费用-ACWP"]));
|
||||
}
|
||||
}
|
||||
s.data = listdata;
|
||||
s2.data = listdata2;
|
||||
s3.data = listdata3;
|
||||
s4.data = listdata4;
|
||||
s5.data = listdata5;
|
||||
s6.data = listdata6;
|
||||
series.Add(s);
|
||||
series.Add(s2);
|
||||
series.Add(s3);
|
||||
series.Add(s4);
|
||||
series.Add(s5);
|
||||
series.Add(s6);
|
||||
businessColumn.categories = listCategories;
|
||||
businessColumn.series = series;
|
||||
}
|
||||
s.data = listdata;
|
||||
s2.data = listdata2;
|
||||
s3.data = listdata3;
|
||||
s4.data = listdata4;
|
||||
series.Add(s);
|
||||
series.Add(s2);
|
||||
series.Add(s3);
|
||||
series.Add(s4);
|
||||
businessColumn.categories = listCategories;
|
||||
businessColumn.series = series;
|
||||
return JsonConvert.SerializeObject(businessColumn);
|
||||
//var views = (from x in Funs.DB.View_JDGL_ProgressCompletion where x.ProjectId == this.CurrUser.LoginProjectId orderby x.Months select x).ToList();
|
||||
//Model.SingleSerie s = new Model.SingleSerie();
|
||||
//Model.SingleSerie s2 = new Model.SingleSerie();
|
||||
//Model.SingleSerie s3 = new Model.SingleSerie();
|
||||
//Model.SingleSerie s4 = new Model.SingleSerie();
|
||||
//List<double> listdata = new List<double>();
|
||||
//List<double> listdata2 = new List<double>();
|
||||
//List<double> listdata3 = new List<double>();
|
||||
//List<double> listdata4 = new List<double>();
|
||||
//for (int i = 0; i < views.Count; i++)
|
||||
//{
|
||||
// listCategories.Add(views[i].MonthStr);
|
||||
// listdata.Add(Convert.ToDouble(views[i].PlanNum));
|
||||
// listdata2.Add(Convert.ToDouble(views[i].TotalPlanNum));
|
||||
// listdata3.Add(Convert.ToDouble(views[i].RealNum));
|
||||
// listdata4.Add(Convert.ToDouble(views[i].TotalRealNum));
|
||||
//}
|
||||
//s.data = listdata;
|
||||
//s2.data = listdata2;
|
||||
//s3.data = listdata3;
|
||||
//s4.data = listdata4;
|
||||
//series.Add(s);
|
||||
//series.Add(s2);
|
||||
//series.Add(s3);
|
||||
//series.Add(s4);
|
||||
//businessColumn.categories = listCategories;
|
||||
//businessColumn.series = series;
|
||||
//return JsonConvert.SerializeObject(businessColumn);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user