This commit is contained in:
2024-04-23 16:41:35 +08:00
10 changed files with 1349 additions and 1393 deletions
@@ -949,6 +949,38 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//自动设置表格样式 //自动设置表格样式
table.AutoFit(AutoFitBehavior.FixedColumnWidths); table.AutoFit(AutoFitBehavior.FixedColumnWidths);
} }
else {
isYm = true;
numberIndex = 1;
whileIndex += 1;
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
//跳过页眉的表头
while (isYm)
{
if (table.Range.Text.Substring(0, 2) != "序号")
{
whileIndex += 1;
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
}
else
{
isYm = false;
}
}
//创建合计
Row rowhj = new Row(doc);
double numcount0 = table.FirstRow.Cells[0].CellFormat.Width;
double numcount1 = table.FirstRow.Cells[1].CellFormat.Width;
double numcount2 = table.FirstRow.Cells[2].CellFormat.Width;
double numcount3 = table.FirstRow.Cells[3].CellFormat.Width;
double numcount4 = table.FirstRow.Cells[4].CellFormat.Width;
double numcount = numcount0 + numcount1 + numcount2 + numcount3 + numcount4;
rowhj.Cells.Add(CreateCell("暂无数据", doc, numcount));
table.Rows.Insert(numberIndex + 1, rowhj);
//自动设置表格样式
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
}
#endregion #endregion
#region 7.3 #region 7.3
@@ -1193,7 +1225,38 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
table.AutoFit(AutoFitBehavior.FixedColumnWidths); table.AutoFit(AutoFitBehavior.FixedColumnWidths);
} }
else { else {
isYm = true;
numberIndex = 1;
whileIndex += 1; whileIndex += 1;
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
//跳过页眉的表头
while (isYm)
{
if (table.Range.Text.Substring(0, 2) != "序号")
{
whileIndex += 1;
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
}
else
{
isYm = false;
}
}
//创建合计
Row rowhj = new Row(doc);
double numcount0 = table.Rows[0].Cells[0].CellFormat.Width;
double numcount1 = table.Rows[0].Cells[1].CellFormat.Width;
double numcount2 = table.Rows[0].Cells[2].CellFormat.Width;
double numcount3 = table.Rows[0].Cells[3].CellFormat.Width;
double numcount4 = table.Rows[0].Cells[4].CellFormat.Width;
double numcount5 = table.Rows[0].Cells[5].CellFormat.Width;
double numcount6 = table.Rows[0].Cells[6].CellFormat.Width;
double numcount = numcount0 + numcount1 + numcount2 + numcount3 + numcount4 + numcount5 + numcount6;
rowhj.Cells.Add(CreateCell("暂无数据", doc, numcount));
table.Rows.Insert(numberIndex + 1, rowhj);
//自动设置表格样式
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
} }
#endregion #endregion
@@ -1252,6 +1315,39 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
//自动设置表格样式 //自动设置表格样式
table.AutoFit(AutoFitBehavior.FixedColumnWidths); table.AutoFit(AutoFitBehavior.FixedColumnWidths);
} }
else {
isYm = true;
numberIndex = 1;
whileIndex += 1;
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
//跳过页眉的表头
while (isYm)
{
if (table.Range.Text.Substring(0, 2) != "序号")
{
whileIndex += 1;
table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true);
}
else
{
isYm = false;
}
}
//创建合计
Row rowhj = new Row(doc);
double numcount0 = table.Rows[0].Cells[0].CellFormat.Width;
double numcount1 = table.Rows[0].Cells[1].CellFormat.Width;
double numcount2 = table.Rows[0].Cells[2].CellFormat.Width;
double numcount3 = table.Rows[0].Cells[3].CellFormat.Width;
double numcount4 = table.Rows[0].Cells[4].CellFormat.Width;
double numcount5 = table.Rows[0].Cells[5].CellFormat.Width;
double numcount = numcount0 + numcount1 + numcount2 + numcount3 + numcount4 + numcount5;
rowhj.Cells.Add(CreateCell("暂无数据", doc, numcount));
table.Rows.Insert(numberIndex + 1, rowhj);
//自动设置表格样式
table.AutoFit(AutoFitBehavior.FixedColumnWidths);
}
#endregion #endregion
@@ -2022,6 +2022,9 @@
<f:ToolbarFill ID="ToolbarFill1" runat="server"> <f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill> </f:ToolbarFill>
<f:Button ID="Button1" Icon="SystemSave" runat="server" ToolTip="保存" Text="保存" OnClick="btnSave_Click"> <f:Button ID="Button1" Icon="SystemSave" runat="server" ToolTip="保存" Text="保存" OnClick="btnSave_Click">
</f:Button>
<f:Button ID="Button5" Icon="SystemSave" runat="server" ToolTip="保存" Text="保存" OnClick="btnLoad_Click" Hidden="true">
</f:Button> </f:Button>
<f:HiddenField ID="hdId" runat="server"> <f:HiddenField ID="hdId" runat="server">
</f:HiddenField> </f:HiddenField>
@@ -2048,4 +2051,18 @@
function onGrid10DataLoad(event) { function onGrid10DataLoad(event) {
this.mergeColumns(['CreateMan']); this.mergeColumns(['CreateMan']);
} }
var Window1ClientID = '<%= ContentPanel1.ClientID %>';
function refresh() {
// 第一个参数: 遮罩层的透明度
F(Window1ClientID).showLoading(0.8);
$('[id$="_Button5"]').click();
}
function rehiden() {
F(Window1ClientID).hideLoading();
}
</script> </script>
@@ -6,6 +6,7 @@ using System.Web.UI;
using System.Web.UI.WebControls; using System.Web.UI.WebControls;
using BLL; using BLL;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using System.Threading;
namespace FineUIPro.Web.CQMS.ManageReportNew namespace FineUIPro.Web.CQMS.ManageReportNew
{ {
@@ -308,22 +309,28 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{ {
if (!string.IsNullOrEmpty(this.txtStartDate.Text.Trim()) && !string.IsNullOrEmpty(this.txtEndDate.Text.Trim())) if (!string.IsNullOrEmpty(this.txtStartDate.Text.Trim()) && !string.IsNullOrEmpty(this.txtEndDate.Text.Trim()))
{ {
if (Funs.GetNewDateTime(this.txtStartDate.Text.Trim()) > Funs.GetNewDateTime(this.txtEndDate.Text.Trim())) if (Funs.GetNewDateTime(this.txtStartDate.Text.Trim()) > Funs.GetNewDateTime(this.txtEndDate.Text.Trim()))
{ {
Alert.ShowInTop("开始时间不能大于结束时间!", MessageBoxIcon.Warning); Alert.ShowInTop("开始时间不能大于结束时间!", MessageBoxIcon.Warning);
return; return;
} }
if (AddOrUpdate == "update") PageContext.RegisterStartupScript("refresh();");
{
lodAllGrid("1");
}
else
{
lodAllGrid("0");
}
} }
} }
protected void btnLoad_Click(object sender, EventArgs e) {
if (AddOrUpdate == "update")
{
lodAllGrid("1");
PageContext.RegisterStartupScript("rehiden();");
}
else
{
lodAllGrid("0");
PageContext.RegisterStartupScript("rehiden();");
}
}
#endregion #endregion
#region Grid1方法 #region Grid1方法
File diff suppressed because it is too large Load Diff
+136
View File
@@ -0,0 +1,136 @@
错误信息开始=====>
错误类型:SqlException
错误信息:过程或函数 'Sp_GJSX_getlist' 需要参数 '@ProjectId',但未提供该参数。
错误堆栈:
在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
在 System.Data.SqlClient.SqlDataReader.get_MetaData()
在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
在 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
在 BLL.SQLHelper.GetDataTableRunProc(String storedProcName, SqlParameter[] parameters) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\SQLHelper.cs:行号 276
在 FineUIPro.Web.PZHGL.GJSX.GJSXList.BindGrid() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\PZHGL\GJSX\GJSXList.aspx.cs:行号 60
在 FineUIPro.Web.PZHGL.GJSX.GJSXList.Page_Load(Object sender, EventArgs e) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\PZHGL\GJSX\GJSXList.aspx.cs:行号 35
在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
在 System.EventHandler.Invoke(Object sender, EventArgs e)
在 System.Web.UI.Control.OnLoad(EventArgs e)
在 System.Web.UI.Control.LoadRecursive()
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
出错时间:04/22/2024 11:27:38
出错文件:http://localhost:8579/PZHGL/GJSX/GJSXList.aspx
IP地址:::1
操作人员:JT
出错时间:04/22/2024 11:27:38
错误信息开始=====>
错误类型:ArgumentException
错误信息:提供的 URI 方案“http”无效,应为“https”。
参数名: via
错误堆栈:
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
在 System.ServiceModel.ClientBase`1.get_Channel()
在 BLL.CNCECHSSEWebService.getSupervise_SubUnitReport() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2180
出错时间:04/22/2024 13:27:34
出错时间:04/22/2024 13:27:34
错误信息开始=====>
错误类型:ArgumentException
错误信息:提供的 URI 方案“http”无效,应为“https”。
参数名: via
错误堆栈:
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
在 System.ServiceModel.ClientBase`1.get_Channel()
在 BLL.CNCECHSSEWebService.getCheck_CheckInfo_Table8Item() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2045
出错时间:04/22/2024 13:27:34
出错时间:04/22/2024 13:27:34
错误信息开始=====>
错误类型:ArgumentException
错误信息:提供的 URI 方案“http”无效,应为“https”。
参数名: via
错误堆栈:
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
在 System.ServiceModel.ClientBase`1.get_Channel()
在 BLL.CNCECHSSEWebService.getCheck_CheckRectify() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1941
出错时间:04/22/2024 13:27:34
出错时间:04/22/2024 13:27:34
错误信息开始=====>
错误类型:ArgumentException
错误信息:提供的 URI 方案“http”无效,应为“https”。
参数名: via
错误堆栈:
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
在 System.ServiceModel.ClientBase`1.get_Channel()
在 BLL.CNCECHSSEWebService.getInformation_UrgeReport() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1883
出错时间:04/22/2024 13:27:34
出错时间:04/22/2024 13:27:34
+56 -50
View File
@@ -105,7 +105,7 @@ namespace FineUIPro.Web.common
divCqmsPxNum.InnerHtml = CqmsPxNum.ToString(); divCqmsPxNum.InnerHtml = CqmsPxNum.ToString();
//施工审批量 //施工审批量
int sgspl = Funs.DB.Solution_CQMSConstructSolution.Where(x => x.ProjectId == ProjectId && x.State == "1").Count(); int sgspl = Funs.DB.Solution_CQMSConstructSolution.Where(x => x.ProjectId == ProjectId && x.State == Const.CQMSConstructSolution_Complete).Count();
div_sgfaSpl.InnerHtml = sgspl.ToString(); div_sgfaSpl.InnerHtml = sgspl.ToString();
GetJD(); GetJD();
//质量共检 //质量共检
@@ -405,12 +405,13 @@ namespace FineUIPro.Web.common
{ {
int result = 0; int result = 0;
//机具报验的到期提醒和过期提醒记录数加一起 //机具报验的到期提醒和过期提醒记录数加一起
//机具报验的到期提醒数 ////机具报验的到期提醒数
var num1 = Funs.DB.Comprehensive_InspectionMachine.Where(x => x.IsOnSite == true && DateTime.Now < x.NextTestDate && x.ProjectId == ProjectId //var num1 = Funs.DB.Comprehensive_InspectionMachine.Where(x => x.IsOnSite == true && DateTime.Now < x.NextTestDate && x.ProjectId == ProjectId
&& ((DateTime)x.NextTestDate).AddDays(-15) < DateTime.Now).Count(); // && ((DateTime)x.NextTestDate).AddDays(-15) < DateTime.Now).Count();
//过期提醒记录数 //过期提醒记录数
var num2 = Funs.DB.Comprehensive_InspectionMachine.Where(x => x.IsOnSite == true && x.NextTestDate < DateTime.Now && x.ProjectId == ProjectId).Count(); var num2 = Funs.DB.Comprehensive_InspectionMachine.Where(x => x.IsOnSite == true && x.NextTestDate < DateTime.Now && x.ProjectId == ProjectId).Count();
result = num1 + num2; //result = num1 + num2;
result = num2;
return result; return result;
} }
@@ -636,59 +637,64 @@ namespace FineUIPro.Web.common
List<double> listdata = new List<double>(); List<double> listdata = new List<double>();
double result = 0; double result = 0;
Model.SGGLDB db = Funs.DB; Model.SGGLDB db = Funs.DB;
var ndtLists = from x in db.HJGL_FL_NdtList where x.ProjectId == ProjectId select x; var ndtList = (from x in db.ProcessControl_NondestructiveTest_New where x.ProfessionalName == "工艺管道" && x.ProjectId == ProjectId orderby x.CreateDate descending select x).FirstOrDefault();
////一次检测合格焊口数 decimal a = 0, b = 0;
//int oneCheckJotNum = (from x in db.HJGL_Batch_NDEItem if (ndtList != null)
// join y in db.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals y.TrustBatchItemId
// join z in db.HJGL_Batch_PointBatchItem on y.PointBatchItemId equals z.PointBatchItemId
// join a in db.HJGL_Batch_NDE on x.NDEID equals a.NDEID
// where z.PointDate != null && z.PointState == "1" && y.RepairRecordId == null
// && a.ProjectId == ProjectId
// select x.NDEItemID).Count();
////一次检测返修焊口数
//int oneCheckRepairJotNum = (from x in db.HJGL_Batch_NDEItem
// join y in db.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals y.TrustBatchItemId
// join z in db.HJGL_Batch_PointBatchItem on y.PointBatchItemId equals z.PointBatchItemId
// join a in db.HJGL_Batch_NDE on x.NDEID equals a.NDEID
// where z.PointDate != null && z.PointState == "1" && y.RepairRecordId == null && x.CheckResult == "2"
// && a.ProjectId == ProjectId
// select x.NDEItemID).Count();
if (ndtLists.Count() > 0)
{ {
decimal a = 0, b = 0; if (ndtList.TotalQuantity.HasValue)
foreach (var item in ndtLists)
{ {
a += Funs.GetNewDecimalOrZero(item.OneTimeFilmQualifiedAmount); a += Math.Floor(ndtList.TotalQuantity.Value * Funs.GetNewDecimalOrZero(ndtList.TotalRate) / 100);
b += Funs.GetNewDecimalOrZero(item.OneTimeFilmAmount); b += ndtList.TotalQuantity.Value;
} }
if (b > 0) if (!string.IsNullOrEmpty(ndtList.TotalRate))
{ {
result = Convert.ToDouble(decimal.Round(decimal.Parse((a / b * 100).ToString()), 2)); result = Convert.ToDouble(ndtList.TotalRate);
hjallNumber = b.ToString();
hjfinishNumber = a.ToString();
hjzgl = result.ToString();
hjDataValue = (100 - result).ToString();
} }
} }
else if (b > 0)
{ {
var data = (from x in db.HJGL_FL_Data where x.ProjectId == ProjectId orderby x.CompileDate descending select x).FirstOrDefault(); hjallNumber = b.ToString();
if (data != null) hjfinishNumber = a.ToString();
{ hjzgl = result.ToString();
decimal a = Funs.GetNewDecimalOrZero(data.OneTimeFilmQualifiedAmount); hjDataValue = (100 - result).ToString();
decimal b = Funs.GetNewDecimalOrZero(data.OneTimeFilmAmount);
if (b > 0)
{
result = Convert.ToDouble(decimal.Round(decimal.Parse((a / b * 100).ToString()), 2));
hjallNumber = b.ToString();
hjfinishNumber = a.ToString();
hjzgl = result.ToString();
hjDataValue = (100 - result).ToString();
}
}
} }
//var ndtLists = from x in db.HJGL_FL_NdtList where x.ProjectId == ProjectId select x;
//if (ndtLists.Count() > 0)
//{
// decimal a = 0, b = 0;
// foreach (var item in ndtLists)
// {
// a += Funs.GetNewDecimalOrZero(item.OneTimeFilmQualifiedAmount);
// b += Funs.GetNewDecimalOrZero(item.OneTimeFilmAmount);
// }
// if (b > 0)
// {
// result = Convert.ToDouble(decimal.Round(decimal.Parse((a / b * 100).ToString()), 2));
// hjallNumber = b.ToString();
// hjfinishNumber = a.ToString();
// hjzgl = result.ToString();
// hjDataValue = (100 - result).ToString();
// }
//}
//else
//{
// var data = (from x in db.HJGL_FL_Data where x.ProjectId == ProjectId orderby x.CompileDate descending select x).FirstOrDefault();
// if (data != null)
// {
// decimal a = Funs.GetNewDecimalOrZero(data.OneTimeFilmQualifiedAmount);
// decimal b = Funs.GetNewDecimalOrZero(data.OneTimeFilmAmount);
// if (b > 0)
// {
// result = Convert.ToDouble(decimal.Round(decimal.Parse((a / b * 100).ToString()), 2));
// hjallNumber = b.ToString();
// hjfinishNumber = a.ToString();
// hjzgl = result.ToString();
// hjDataValue = (100 - result).ToString();
// }
// }
//}
} }
#endregion #endregion
+6 -6
View File
@@ -162,11 +162,12 @@ namespace FineUIPro.Web.common
int result = 0; int result = 0;
//机具报验的到期提醒和过期提醒记录数加一起 //机具报验的到期提醒和过期提醒记录数加一起
//机具报验的到期提醒数 //机具报验的到期提醒数
var num1 = Funs.DB.Comprehensive_InspectionMachine.Where(x => x.IsOnSite == true && DateTime.Now < x.NextTestDate //var num1 = Funs.DB.Comprehensive_InspectionMachine.Where(x => x.IsOnSite == true && DateTime.Now < x.NextTestDate
&& ((DateTime)x.NextTestDate).AddDays(-15) < DateTime.Now).Count(); // && ((DateTime)x.NextTestDate).AddDays(-15) < DateTime.Now).Count();
//过期提醒记录数 //过期提醒记录数
var num2 = Funs.DB.Comprehensive_InspectionMachine.Where(x => x.IsOnSite == true && x.NextTestDate < DateTime.Now).Count(); var num2 = Funs.DB.Comprehensive_InspectionMachine.Where(x => x.IsOnSite == true && x.NextTestDate < DateTime.Now).Count();
result = num1 + num2; //result = num1 + num2;
result = num2;
return result; return result;
} }
@@ -200,9 +201,8 @@ namespace FineUIPro.Web.common
private void getEarlyWarningCounts() private void getEarlyWarningCounts()
{ {
int allCount = 0; int allCount = 0;
var getPersonQualitys = from x in Funs.DB.QualityAudit_PersonQuality var getPersonQualitys = from x in Funs.DB.Comprehensive_InspectionPerson
join y in Funs.DB.SitePerson_Person on x.PersonId equals y.PersonId where x.ValidityDate.HasValue && x.ValidityDate < DateTime.Now && x.IsOnSite == true
where x.LimitDate.HasValue && x.LimitDate < DateTime.Now
select x; select x;
//// 预警人数 //// 预警人数
allCount = getPersonQualitys.Count(); allCount = getPersonQualitys.Count();
Binary file not shown.

After

Width:  |  Height:  |  Size: 13 MiB

+798 -1115
View File
File diff suppressed because it is too large Load Diff