From eeddc369390f605c5d31e1da6a4b554ea55c9161 Mon Sep 17 00:00:00 2001
From: fly-l <1420031550@qq.com>
Date: Tue, 1 Nov 2022 17:11:30 +0800
Subject: [PATCH] =?UTF-8?q?2022-11-01=20=E7=84=8A=E6=8E=A5=E5=8C=85?=
=?UTF-8?q?=E8=A3=85=E7=AE=A1=E7=90=86=E7=BB=91=E5=80=BC=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=EF=BC=8C=E4=B8=89=E7=BB=B4=E4=BC=A0=E5=8F=82=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../HJGL/PreDesign/PackagingManageService .cs | 62 ++++++++++++++++-
SGGL/FineUIPro.Web/File/Fastreport/装箱单.frx | 4 +-
.../HJGL/InfoQuery/JointQuery.aspx.cs | 4 +-
.../HJGL/InfoQuery/PipelineQuery.aspx.cs | 52 +++++++--------
.../HJGL/PreDesign/PackagingManage.aspx.cs | 66 ++++++++++---------
5 files changed, 125 insertions(+), 63 deletions(-)
diff --git a/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs b/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs
index f5767c4a..20b0e391 100644
--- a/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs
+++ b/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs
@@ -12,8 +12,28 @@ using System.Text;
namespace BLL
{
+
public static class HJGL_PackagingmanageService
{
+ public class PackagingManageItem
+ {
+ public string PackagingManageId { get; set; }
+ public string PackagingCode { get; set; }
+ public string ProjectId { get; set; }
+ public string ProjectName { get; set; }
+ public string ContactName { get; set; }
+ public string ContactPhone { get; set; }
+ public string StackingPosition { get; set; }
+ public int? State { get; set; }
+
+ public string ReceiveMan { get; set; }
+ public string ReceiveDate { get; set; }
+ public string PlanStartDate { get; set; }
+
+
+
+
+ }
public static Model.SGGLDB db = Funs.DB;
///
/// 未到场
@@ -87,6 +107,46 @@ namespace BLL
{
return db.HJGL_PackagingManage.FirstOrDefault(x => x.PackagingManageId == PackagingManageId);
}
+ public static string GetMinPlanStartDate(string PackagingManageId)
+ {
+ string PlanStartDate = "";
+ DataTable tb = BLL.HJGL_PackagingmanageService.GetPackagingDetailById(PackagingManageId);
+ var dtTable = tb.AsEnumerable().OrderBy(o => o["PlanStartDate"]).CopyToDataTable();
+ if (dtTable.Rows != null && dtTable.Rows.Count > 0)
+ {
+ PlanStartDate = dtTable.Rows[0]["PlanStartDate"].ToString();
+ }
+ return PlanStartDate;
+ }
+ public static List GetPackagingManageList(string projectId,string PackagingCode)
+ {
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+
+ var q = (from x in db.HJGL_PackagingManage
+ join n in db.Base_Project on x.ProjectId equals n.ProjectId
+ join m in db.Person_Persons on x.ReceiveMan equals m.PersonId into tt
+ from t in tt.DefaultIfEmpty()
+ where x.ProjectId == projectId
+ &&(string.IsNullOrEmpty(PackagingCode)|| x.PackagingCode.Contains(PackagingCode) )
+ select new PackagingManageItem
+ {
+ PackagingManageId = x.PackagingManageId,
+ PackagingCode = x.PackagingCode,
+ ProjectName = n.ProjectName,
+ ContactName = x.ContactName,
+ ContactPhone = x.ContactPhone,
+ StackingPosition = x.StackingPosition,
+ State = x.State,
+ ReceiveMan = t.PersonName,
+ ReceiveDate = string.Format("{0:g}", x.ReceiveDate),
+ PlanStartDate = GetMinPlanStartDate(x.PackagingManageId),
+
+ }).Distinct();
+ return q.ToList();
+
+ }
+ }
///
/// 形成出库单
///
@@ -113,7 +173,7 @@ namespace BLL
if (!string .IsNullOrEmpty(model.PipelineComponentId))
{
var PipelineComponentIds = model.PipelineComponentId.Split(',');
- string strSql = @"select com.PipelineComponentId, com.PipelineComponentCode,com.PlanStartDate,unitwork.UnitWorkName,'1' as num ,'个' as CU
+ string strSql = @"select com.PipelineComponentId, com.PipelineComponentCode,pipe.PlanStartDate,unitwork.UnitWorkName,'1' as num ,'个' as CU
from HJGL_Pipeline_Component com
left join HJGL_Pipeline pipe on com.PipelineId=pipe.PipelineId
left join WBS_UnitWork unitwork on pipe.UnitWorkId=unitwork.UnitWorkId
diff --git a/SGGL/FineUIPro.Web/File/Fastreport/装箱单.frx b/SGGL/FineUIPro.Web/File/Fastreport/装箱单.frx
index 3185a683..8e28c107 100644
--- a/SGGL/FineUIPro.Web/File/Fastreport/装箱单.frx
+++ b/SGGL/FineUIPro.Web/File/Fastreport/装箱单.frx
@@ -1,5 +1,5 @@
-
+
using System;
using System.Collections;
using System.Collections.Generic;
@@ -42,7 +42,7 @@ namespace FastReport
}
-
+
diff --git a/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx.cs b/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx.cs
index 9c74892c..a69f6e9a 100644
--- a/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx.cs
+++ b/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx.cs
@@ -242,7 +242,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
parameter3D.ColorModel = colorModel;
parameter3D.TagNum = "";
- parameter3D.ButtonType = "0,2";
+ parameter3D.ButtonType = "0,2.1";
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
parameter3D.Completed_weldedjunction = Completed_weldedjunction;
parameter3D.Incomplete_weldjunction = Incomplete_weldjunction;
@@ -525,7 +525,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
parameter3D.ColorModel = colorModel;
parameter3D.TagNum = pipecode;
- parameter3D.ButtonType = "0,2";
+ parameter3D.ButtonType = "0,2.1";
parameter3D.Completed_weldedjunction = Completed_weldedjunction;
parameter3D.Incomplete_weldjunction=Incomplete_weldjunction;
if (this.tvControlItem.SelectedNode.CommandName == "单位工程")
diff --git a/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx.cs b/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx.cs
index 8be07d64..15551094 100644
--- a/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx.cs
+++ b/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx.cs
@@ -10,7 +10,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
{
public partial class PipelineQuery : PageBase
{
- public string Completed_pipeline
+ public string Line_No
{
get
{
@@ -21,17 +21,17 @@ namespace FineUIPro.Web.HJGL.InfoQuery
ViewState["Completed_pipeline"] = value;
}
}
- public string Incomplete_pipeline
- {
- get
- {
- return (string)ViewState["Incomplete_pipeline"];
- }
- set
- {
- ViewState["Incomplete_pipeline"] = value;
- }
- }
+ //public string Incomplete_pipeline
+ //{
+ // get
+ // {
+ // return (string)ViewState["Incomplete_pipeline"];
+ // }
+ // set
+ // {
+ // ViewState["Incomplete_pipeline"] = value;
+ // }
+ //}
protected void Page_Load(object sender, EventArgs e)
{
ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId);
@@ -141,8 +141,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
parameter3D.TagNum = "";
parameter3D.ButtonType = "0,2";
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
- parameter3D.Completed_pipeline = Completed_pipeline;
- parameter3D.Incomplete_pipeline = Incomplete_pipeline;
+ parameter3D.Line_No = Line_No;
parameter3D.Transparency = colorModel.PipelineComplete;
parameter3D.Finished_color = colorModel.JointCompleteColor;
parameter3D.Incomplete_color = colorModel.JointNOCompleteColor;
@@ -226,19 +225,19 @@ namespace FineUIPro.Web.HJGL.InfoQuery
{
Completed_pipelineList.Add("/" + item.PipelineCode);
}
- Completed_pipeline = string.Join(",", Completed_pipelineList);
+ Line_No = string.Join(",", Completed_pipelineList);
}
- var q1 = view_HJGL_Pipelines.Where(x => x.IsFinished != true);//获取未完成管线
- if (q1.Any())
- {
- List Incomplete_pipelineList = new List();
- foreach (var item in q1)
- {
- Incomplete_pipelineList.Add("/" + item.PipelineCode);
- }
- Incomplete_pipeline = string.Join(",", Incomplete_pipelineList);
- }
+ //var q1 = view_HJGL_Pipelines.Where(x => x.IsFinished != true);//获取未完成管线
+ //if (q1.Any())
+ //{
+ // List Incomplete_pipelineList = new List();
+ // foreach (var item in q1)
+ // {
+ // Incomplete_pipelineList.Add("/" + item.PipelineCode);
+ // }
+ // Incomplete_pipeline = string.Join(",", Incomplete_pipelineList);
+ //}
}
@@ -455,8 +454,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
parameter3D.TagNum = pipecode;
parameter3D.ButtonType = "0,2";
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
- parameter3D.Completed_pipeline = Completed_pipeline;
- parameter3D.Incomplete_pipeline = Incomplete_pipeline;
+ parameter3D.Line_No = Line_No;
parameter3D.Transparency = colorModel.PipelineComplete;
parameter3D.Finished_color = colorModel.JointCompleteColor;
parameter3D.Incomplete_color = colorModel.JointNOCompleteColor;
diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx.cs
index e5aa63ae..6a822746 100644
--- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx.cs
+++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx.cs
@@ -33,38 +33,42 @@ namespace FineUIPro.Web.HJGL.PreDesign
///
private void BindGrid()
{
- string strSql = @"select pack.PackagingManageId,
- pack.PackagingCode,
- com.PipelineComponentCode,
- unit.UnitWorkName,
- pipe.PlanStartDate,
- pack.ProjectId,
- pack.StackingPosition,
- pack.State,
- pack.ContactName,
- pack.ContactPhone,
- pack.ReceiveDate,
- person.PersonName
- from HJGL_PackagingManage as pack
- left join HJGL_Pipeline_Component com on com.PipelineComponentId=pack.PipelineComponentId
- left join HJGL_Pipeline pipe on pipe.PipelineId =com.PipelineId
- left join WBS_UnitWork unit on pipe.UnitWorkId=unit.UnitWorkId
- left join Person_Persons person on pack.ReceiveMan=person.PersonId
- WHERE pack.ProjectId = @ProjectId ";
- List listStr = new List();
- listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
- if (!string.IsNullOrEmpty(this.txtPackagingCode.Text.Trim()))
- {
- strSql += " AND pack.PackagingCode LIKE @PackagingCode";
- listStr.Add(new SqlParameter("@PackagingCode", "%" + this.txtPackagingCode.Text.Trim() + "%"));
- }
- SqlParameter[] parameter = listStr.ToArray();
- DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
+ // string strSql = @"select pack.PackagingManageId,
+ // pack.PackagingCode,
+ // com.PipelineComponentCode,
+ // unit.UnitWorkName,
+ // pipe.PlanStartDate,
+ // pack.ProjectId,
+ // pack.StackingPosition,
+ // pack.State,
+ // pack.ContactName,
+ // pack.ContactPhone,
+ //pack.ReceiveDate,
+ //person.PersonName
+ // from HJGL_PackagingManage as pack
+ // left join HJGL_Pipeline_Component com on com.PipelineComponentId=pack.PipelineComponentId
+ // left join HJGL_Pipeline pipe on pipe.PipelineId =com.PipelineId
+ // left join WBS_UnitWork unit on pipe.UnitWorkId=unit.UnitWorkId
+ // left join Person_Persons person on pack.ReceiveMan=person.PersonId
+ // WHERE pack.ProjectId = @ProjectId ";
+ // List listStr = new List();
+ // listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
+ // if (!string.IsNullOrEmpty(this.txtPackagingCode.Text.Trim()))
+ // {
+ // strSql += " AND pack.PackagingCode LIKE @PackagingCode";
+ // listStr.Add(new SqlParameter("@PackagingCode", "%" + this.txtPackagingCode.Text.Trim() + "%"));
+ // }
+ // SqlParameter[] parameter = listStr.ToArray();
+ // DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
- Grid1.RecordCount = tb.Rows.Count;
- tb = GetFilteredTable(Grid1.FilteredData, tb);
- var table = this.GetPagedDataTable(Grid1, tb);
- Grid1.DataSource = table;
+ //Grid1.RecordCount = tb.Rows.Count;
+ //tb = GetFilteredTable(Grid1.FilteredData, tb);
+ //var table = this.GetPagedDataTable(Grid1, tb);
+ //Grid1.DataSource = table;
+ //Grid1.DataBind();
+ var list= BLL.HJGL_PackagingmanageService.GetPackagingManageList(this.CurrUser.LoginProjectId, this.txtPackagingCode.Text.Trim());
+ Grid1.RecordCount = list.Count;
+ Grid1.DataSource = list;
Grid1.DataBind();
}
#endregion