This commit is contained in:
2026-04-04 19:41:27 +08:00
14 changed files with 200 additions and 90 deletions
+21 -10
View File
@@ -280,17 +280,28 @@ namespace FineUIPro.Web.CLGL
}
string planId = Grid1.SelectedRowID;
var planMaster = BLL.TwInOutplanmasterService.GetById(planId);
if (planMaster.State != (int)TwConst.State.)
switch (planMaster.State)
{
Alert.ShowInTop("请选择有效的计划!", MessageBoxIcon.Warning);
return;
}
else
{
TwInputmasterService.RevokeGenInMasterByPlanId(planId);
BindGrid();
ShowNotify("撤销入库单成功!", MessageBoxIcon.Success);
}
case (int)TwConst.State.:
planMaster.State= (int)TwConst.State.;
planMaster.AuditMan = null;
planMaster.AuditDate = null;
TwInOutplanmasterService.Update(planMaster);
BindGrid();
ShowNotify("撤销审核成功!", MessageBoxIcon.Success);
break;
case (int)TwConst.State.:
TwInputmasterService.RevokeGenInMasterByPlanId(planId);
BindGrid();
ShowNotify("撤销入库单成功!", MessageBoxIcon.Success);
break;
default:
Alert.ShowInTop("请选择有效的计划!", MessageBoxIcon.Warning);
break;
}
}
protected void btnSearch_Click(object sender, EventArgs e)
+4
View File
@@ -17017,7 +17017,11 @@
</COMReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<<<<<<< HEAD
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v17.0\WebApplications\Microsoft.WebApplication.targets" />
=======
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v18.0\WebApplications\Microsoft.WebApplication.targets" />
>>>>>>> 15b3c87ac1c4cf4a496def63cba87a1de5c899b2
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
@@ -1316,8 +1316,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
}
protected void btnPrintJoint_Click(object sender, EventArgs e)
{
var rows = Grid1.SelectedRowIndexArray;
@@ -69,6 +69,7 @@
</f:ToolbarFill>
<f:HiddenField runat="server" ID="hdRemark">
</f:HiddenField>
<%--<f:Button ID="btnPull" runat="server" OnClick="btnPull_Click" ToolTip="获取" Text="获取" >
</f:Button>--%>
<f:Button ID="btnNew" Icon="Add" runat="server" OnClick="btnNew_Click" ToolTip="编制" Hidden="true">
@@ -64,7 +64,7 @@ namespace FineUIPro.Web.HSSE.License
/// </summary>
private void BindGrid()
{
string strSql = "SELECT LicenseManager.LicenseManagerId,LicenseManager.ProjectId,LicenseManager.LicenseTypeId,CodeRecords.Code AS LicenseManagerCode,LicenseManager.LicenseManageName,LicenseManager.UnitId,LicenseManager.LicenseManageContents,LicenseManager.CompileMan,LicenseManager.CompileDate,LicenseManager.States,LicenseManager.ProjectCode,LicenseManager.ProjectName,LicenseManager.LicenseTypeName,LicenseManager.UnitName,LicenseManager.PersonName,LicenseManager.WorkAreaName,LicenseManager.StartDate,LicenseManager.EndDate"
string strSql = "SELECT LicenseManager.LicenseManagerId,LicenseManager.ProjectId,LicenseManager.LicenseTypeId,CodeRecords.Code AS LicenseManagerCode,LicenseManager.LicenseManageName,LicenseManager.UnitId,LicenseManager.LicenseManageContents,LicenseManager.CompileMan,LicenseManager.CompileDate,LicenseManager.States,LicenseManager.ProjectCode,LicenseManager.ProjectName,LicenseManager.LicenseTypeName,LicenseManager.UnitName,LicenseManager.UserName,LicenseManager.WorkAreaName,LicenseManager.StartDate,LicenseManager.EndDate"
+ @" ,(CASE WHEN LicenseManager.States = " + BLL.Const.State_0 + " OR LicenseManager.States IS NULL THEN '待['+OperatePerson.PersonName+']提交' WHEN LicenseManager.States = " + BLL.Const.State_2 + " THEN '审核/审批完成' ELSE '待['+OperatePerson.PersonName+']办理' END) AS FlowOperateName,LicenseManager.SourceDes"
+ @" FROM View_License_LicenseManager AS LicenseManager "
+ @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON LicenseManager.LicenseManagerId=CodeRecords.DataId "
@@ -120,35 +120,38 @@ namespace FineUIPro.Web.HSSE.SitePerson
{
try
{
string oleDBConnString = String.Empty;
oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
oleDBConnString += "Data Source=";
oleDBConnString += fileName;
oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable();
DataSet ds = new DataSet();
//string oleDBConnString = String.Empty;
//oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
//oleDBConnString += "Data Source=";
//oleDBConnString += fileName;
//oleDBConnString += ";Extended Properties=Excel 8.0;";
//OleDbConnection oleDBConn = null;
//OleDbDataAdapter oleAdMaster = null;
//DataTable m_tableName = new DataTable();
//DataSet ds = new DataSet();
oleDBConn = new OleDbConnection(oleDBConnString);
oleDBConn.Open();
m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
//oleDBConn = new OleDbConnection(oleDBConnString);
//oleDBConn.Open();
//m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
if (m_tableName != null && m_tableName.Rows.Count > 0)
{
//if (m_tableName != null && m_tableName.Rows.Count > 0)
//{
m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
// m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
}
string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose();
oleDBConn.Close();
oleDBConn.Dispose();
//}
//string sqlMaster;
//sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
//oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
//oleAdMaster.Fill(ds, "m_tableName");
//oleAdMaster.Dispose();
//oleDBConn.Close();
//oleDBConn.Dispose();
AddDatasetToSQL(ds.Tables[0]);
//AddDatasetToSQL(ds.Tables[0]);
DataTable dt = NPOIHelper.ExcelToDataTable1(fileName);
this.AddDatasetToSQL(dt);
}
catch (Exception ex)
{
@@ -304,33 +307,35 @@ namespace FineUIPro.Web.HSSE.SitePerson
{
try
{
string oleDBConnString = String.Empty;
oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
oleDBConnString += "Data Source=";
oleDBConnString += fileName;
oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable();
DataSet ds = new DataSet();
//string oleDBConnString = String.Empty;
//oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
//oleDBConnString += "Data Source=";
//oleDBConnString += fileName;
//oleDBConnString += ";Extended Properties=Excel 8.0;";
//OleDbConnection oleDBConn = null;
//OleDbDataAdapter oleAdMaster = null;
//DataTable m_tableName = new DataTable();
//DataSet ds = new DataSet();
oleDBConn = new OleDbConnection(oleDBConnString);
oleDBConn.Open();
m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
//oleDBConn = new OleDbConnection(oleDBConnString);
//oleDBConn.Open();
//m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
if (m_tableName != null && m_tableName.Rows.Count > 0)
{
//if (m_tableName != null && m_tableName.Rows.Count > 0)
//{
m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
// m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
}
string sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose();
oleDBConn.Close();
oleDBConn.Dispose();
AddDatasetToSQL2(ds.Tables[0]);
//}
//string sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
//oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
//oleAdMaster.Fill(ds, "m_tableName");
//oleAdMaster.Dispose();
//oleDBConn.Close();
//oleDBConn.Dispose();
DataTable dt = NPOIHelper.ExcelToDataTable1(fileName);
this.AddDatasetToSQL2(dt);
}
catch (Exception ex)
{
@@ -51,11 +51,11 @@ namespace FineUIPro.Web.common
this.tvControlItem.Nodes.Add(rootNode2);
// 优化:一次性获取所有管线统计数据,避免 N+1 查询
var pipelineCountByUnitWork = (from x in Funs.DB.HJGL_Pipeline
var pipelineCountByUnitWork = (from x in Funs.DB.View_HJGL_Pipeline
where x.ProjectId == this.CurrUser.LoginProjectId
group x by x.UnitWorkId into g
select new { UnitWorkId = g.Key, Count = g.Count() })
.ToDictionary(x => x.UnitWorkId, x => x.Count);
select new { UnitWorkId = g.Key, Count = g.Count(), TotalDin = g.Sum(x => x.TotalDin) })
.ToDictionary(x => x.UnitWorkId, x => new { x.Count, x.TotalDin });
var pUnits = (from x in Funs.DB.Project_ProjectUnit where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
// 获取当前用户所在单位
@@ -74,14 +74,14 @@ namespace FineUIPro.Web.common
if (unitWork1.Count() > 0)
{
foreach (var q in unitWork1)
foreach (var q in unitWork1)
{
// 优化:从内存字典中获取管线数量,避免数据库查询
int a = pipelineCountByUnitWork.ContainsKey(q.UnitWorkId) ? pipelineCountByUnitWork[q.UnitWorkId] : 0;
int a = pipelineCountByUnitWork.ContainsKey(q.UnitWorkId) ? pipelineCountByUnitWork[q.UnitWorkId].Count : 0;
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
TreeNode tn1 = new TreeNode();
tn1.NodeID = q.UnitWorkId;
tn1.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
tn1.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线" ;
tn1.ToolTip = "施工单位:" + unitNamesUnitIds;
tn1.EnableClickEvent = true;
rootNode1.Nodes.Add(tn1);
@@ -92,11 +92,11 @@ namespace FineUIPro.Web.common
foreach (var q in unitWork2)
{
// 优化:从内存字典中获取管线数量,避免数据库查询
int a = pipelineCountByUnitWork.ContainsKey(q.UnitWorkId) ? pipelineCountByUnitWork[q.UnitWorkId] : 0;
int a = pipelineCountByUnitWork.ContainsKey(q.UnitWorkId) ? pipelineCountByUnitWork[q.UnitWorkId].Count : 0;
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
TreeNode tn2 = new TreeNode();
tn2.NodeID = q.UnitWorkId;
tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线" ;
tn2.ToolTip = "施工单位:" + unitNamesUnitIds;
tn2.EnableClickEvent = true;
rootNode2.Nodes.Add(tn2);
@@ -257,6 +257,7 @@ JointData AS (
j.Size,
j.WeldingDailyId,
j.JointAttribute,
j.PipelineId,
p.PipeArea,
p.UnitWorkId
FROM dbo.HJGL_WeldJoint j
@@ -323,6 +324,7 @@ JointData AS (
j.Size,
j.WeldingDailyId,
j.JointAttribute,
j.PipelineId,
p.PipeArea,
p.UnitWorkId
FROM dbo.HJGL_WeldJoint j