1118-gaofei-焊接首页
This commit is contained in:
parent
0aa91d6a8f
commit
ed3517280a
|
@ -42,8 +42,9 @@
|
|||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Apache.NMS.ActiveMQ">
|
||||
<HintPath>..\packages\Apache.NMS.ActiveMQ.1.7.2\lib\net40\Apache.NMS.ActiveMQ.dll</HintPath>
|
||||
<Reference Include="Apache.NMS.ActiveMQ, Version=1.7.2.4108, Culture=neutral, PublicKeyToken=82756feee3957618, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>bin\Debug\Apache.NMS.ActiveMQ.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EmitMapper, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\EmitMapper.1.0.0\lib\EmitMapper.dll</HintPath>
|
||||
|
|
|
@ -57,7 +57,8 @@
|
|||
</Target>
|
||||
<ItemGroup>
|
||||
<Reference Include="Apache.NMS, Version=1.8.0.0, Culture=neutral, PublicKeyToken=82756feee3957618, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Apache.NMS.1.8.0\lib\net40\Apache.NMS.dll</HintPath>
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>bin\Apache.NMS.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Apache.NMS.ActiveMQ, Version=1.7.2.4108, Culture=neutral, PublicKeyToken=82756feee3957618, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Apache.NMS.ActiveMQ.1.7.2\lib\net40\Apache.NMS.ActiveMQ.dll</HintPath>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -4,6 +4,8 @@ using System.Linq;
|
|||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using BLL;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace FineUIPro.Web
|
||||
{
|
||||
|
@ -11,7 +13,203 @@ namespace FineUIPro.Web
|
|||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
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)
|
||||
{
|
||||
int totalNum = 0, oKNum = 0;
|
||||
foreach (var item in units)
|
||||
{
|
||||
var f = firstOKRates.FirstOrDefault(x => x.Name == item); //取每个单位最后一个月的一次合格率数据进行汇总
|
||||
if (f != null)
|
||||
{
|
||||
totalNum += f.TotalNum ?? 0;
|
||||
oKNum += f.OKNum ?? 0;
|
||||
}
|
||||
}
|
||||
if (totalNum > 0)
|
||||
{
|
||||
var a = Convert.ToDouble(oKNum);
|
||||
var b = Convert.ToDouble(totalNum);
|
||||
this.divFirstOKRate.InnerHtml = Convert.ToDouble(decimal.Round(decimal.Parse((a / b * 100).ToString()), 2)).ToString();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.divFirstOKRate.InnerHtml = "0";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region 项目焊接工程量统计
|
||||
protected string Two
|
||||
{
|
||||
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)
|
||||
{
|
||||
totalNum += item.TotalNum ?? 0;
|
||||
finishNum += item.FinishNum ?? 0;
|
||||
}
|
||||
int notFinishNum = totalNum - finishNum;
|
||||
num.num1 = finishNum;
|
||||
num.num2 = notFinishNum;
|
||||
return JsonConvert.SerializeObject(num);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 一次合格率
|
||||
protected string Four
|
||||
{
|
||||
get
|
||||
{
|
||||
List<Model.SingleSerie2> series = new List<Model.SingleSerie2>();
|
||||
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));
|
||||
}
|
||||
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 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);
|
||||
}
|
||||
}
|
||||
s.data = listdata;
|
||||
series.Add(s);
|
||||
}
|
||||
businessColumn.categories = listCategories;
|
||||
businessColumn.series3 = series;
|
||||
return JsonConvert.SerializeObject(businessColumn);
|
||||
}
|
||||
}
|
||||
|
||||
protected string Four2
|
||||
{
|
||||
get
|
||||
{
|
||||
List<Model.SingleSerie2> series = new List<Model.SingleSerie2>();
|
||||
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));
|
||||
}
|
||||
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 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);
|
||||
}
|
||||
}
|
||||
s.data = listdata;
|
||||
series.Add(s);
|
||||
}
|
||||
businessColumn.categories = listCategories;
|
||||
businessColumn.series3 = series;
|
||||
return JsonConvert.SerializeObject(businessColumn);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 焊接完成量
|
||||
protected string Three
|
||||
{
|
||||
get
|
||||
{
|
||||
List<Model.SingleSerie> series = new List<Model.SingleSerie>();
|
||||
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
|
||||
List<string> listCategories = new List<string>();
|
||||
businessColumn.title = "焊接完成量";
|
||||
businessColumn.xFontNum = 18;
|
||||
var views = (from x in Funs.DB.HJGL_FinishRate where x.ProjectId == this.CurrUser.LoginProjectId && x.Type == "unit" orderby x.Code 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)
|
||||
{
|
||||
listCategories.Add(item.Name);
|
||||
listdata.Add(item.FinishNum ?? 0);
|
||||
listdata2.Add((item.TotalNum ?? 0) - (item.FinishNum ?? 0));
|
||||
}
|
||||
s.data = listdata;
|
||||
s2.data = listdata2;
|
||||
series.Add(s);
|
||||
series.Add(s2);
|
||||
businessColumn.categories = listCategories;
|
||||
businessColumn.series = series;
|
||||
return JsonConvert.SerializeObject(businessColumn);
|
||||
}
|
||||
}
|
||||
|
||||
protected string Three2
|
||||
{
|
||||
get
|
||||
{
|
||||
List<Model.SingleSerie> series = new List<Model.SingleSerie>();
|
||||
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
|
||||
List<string> listCategories = new List<string>();
|
||||
businessColumn.title = "焊接完成量";
|
||||
businessColumn.xFontNum = 18;
|
||||
var views = (from x in Funs.DB.HJGL_FinishRate where x.ProjectId == this.CurrUser.LoginProjectId && x.Type == "device" orderby x.Code 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)
|
||||
{
|
||||
listCategories.Add(item.Name);
|
||||
listdata.Add(item.FinishNum ?? 0);
|
||||
listdata2.Add((item.TotalNum ?? 0) - (item.FinishNum ?? 0));
|
||||
}
|
||||
s.data = listdata;
|
||||
s2.data = listdata2;
|
||||
series.Add(s);
|
||||
series.Add(s2);
|
||||
businessColumn.categories = listCategories;
|
||||
businessColumn.series = series;
|
||||
return JsonConvert.SerializeObject(businessColumn);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -20,5 +20,14 @@ namespace FineUIPro.Web {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
|
||||
|
||||
/// <summary>
|
||||
/// divFirstOKRate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divFirstOKRate;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,5 +16,6 @@ namespace Model
|
|||
public List<SingleSerie> series { get; set; }
|
||||
|
||||
public List<SingleSerie> series2 { get; set; }
|
||||
public List<SingleSerie2> series3 { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71204,7 +71204,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QualifiedProjectCode", DbType="NVarChar(50)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QualifiedProjectCode", DbType="NVarChar(500)")]
|
||||
public string QualifiedProjectCode
|
||||
{
|
||||
get
|
||||
|
@ -245489,7 +245489,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(2000)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(200)")]
|
||||
public string Address
|
||||
{
|
||||
get
|
||||
|
@ -245553,7 +245553,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaName", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaName", DbType="NVarChar(200)")]
|
||||
public string WorkAreaName
|
||||
{
|
||||
get
|
||||
|
@ -327152,7 +327152,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(2000)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(200)")]
|
||||
public string Address
|
||||
{
|
||||
get
|
||||
|
@ -327168,7 +327168,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaName", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaName", DbType="NVarChar(200)")]
|
||||
public string WorkAreaName
|
||||
{
|
||||
get
|
||||
|
@ -334640,7 +334640,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(100)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(102)")]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
|
|
|
@ -184,6 +184,7 @@
|
|||
<Compile Include="PieData.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SingleSerie.cs" />
|
||||
<Compile Include="SingleSerie2.cs" />
|
||||
<Compile Include="SpSysMenuItem.cs" />
|
||||
<Compile Include="SpSysUserItem.cs" />
|
||||
<Compile Include="APIItem\ResponeData.cs" />
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Model
|
||||
{
|
||||
public class SingleSerie2
|
||||
{
|
||||
public string name { get; set; }
|
||||
public string type { get; set; }
|
||||
public List<double?> data { get; set; }
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue