This commit is contained in:
2024-05-23 11:20:42 +08:00
parent 08ef405174
commit 0a06a9f562
10 changed files with 220 additions and 519 deletions
@@ -752,8 +752,8 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
protected void btnDownLoad_Click(object sender, EventArgs e)
{
string rootPath = Server.MapPath("~/");
string uploadfilepath = rootPath + Const.HJGL_DataInTemplateUrl;
string filePath = Const.HJGL_DataInTemplateUrl;
string uploadfilepath = rootPath + Const.HJGL_TestTemplateUrl;
string filePath = Const.HJGL_TestTemplateUrl;
string fileName = Path.GetFileName(filePath);
FileInfo info = new FileInfo(uploadfilepath);
long fileSize = info.Length;
@@ -234,7 +234,8 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
FROM dbo.Pipeline_Pipeline AS IsoInfo
LEFT JOIN DBO.Project_WorkArea AS WorkArea ON IsoInfo.WorkAreaId =WorkArea.WorkAreaId
LEFT JOIN dbo.Base_Medium AS bs ON bs.MediumId = IsoInfo.MediumId
LEFT JOIN dbo.PTP_PipelineList AS IsoList ON IsoList.PipelineId = IsoInfo.PipelineId and IsoInfo.WorkAreaId=IsoList.WorkAreaId
LEFT JOIN dbo.PTP_PipelineList AS IsoList ON IsoList.PipelineId = IsoInfo.PipelineId
and IsoInfo.WorkAreaId=IsoList.WorkAreaId and IsoList.PTP_ID=@PTP_ID
WHERE IsoInfo.ProjectId= @ProjectId AND IsoInfo.UnitId= @UnitId
AND WorkArea.InstallationId= @InstallationId ";
}
@@ -244,11 +245,10 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
listStr.Add(new SqlParameter("@UnitId", this.drpUnit.SelectedValue));
listStr.Add(new SqlParameter("@InstallationId", this.drpInstallation.SelectedValue));
//if (!string.IsNullOrEmpty(this.PTP_ID))
//{
// strSql += " AND IsoList.PTP_ID=@PTP_ID";
// listStr.Add(new SqlParameter("@PTP_ID", this.PTP_ID));
//}
if (!string.IsNullOrEmpty(this.PTP_ID))
{
listStr.Add(new SqlParameter("@PTP_ID", this.PTP_ID));
}
if (this.drpWorkArea.SelectedValue != Const._Null && drpWorkArea.SelectedValue!=null)
{
@@ -541,6 +541,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
{
string PipelineId = teamGroupRow["id"].ToString();
string status = teamGroupRow.Value<string>("status");
if (listSelects.Contains(PipelineId))
{
JObject values = teamGroupRow.Value<JObject>("values");
@@ -548,6 +549,27 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
string workAreaId = values.Value<string>("WorkAreaId");
if (string.IsNullOrEmpty(WeldJonintCodes))
WeldJonintCodes = "全部";
//处理剩下来的口
List<string> listJointCode = new List<string>();
var tempData = Funs.DB.PTP_PipelineList.Where(t=>t.PipelineId== PipelineId && t.IsAll==false).Select(t => t.WeldJonintCode).ToList();
foreach (var item in tempData)
{
if (!string.IsNullOrEmpty(item))
{
string[] arr=item.Split(',');
for (int i = 0; i < arr.Length; i++)
{
listJointCode.Add(arr[i]);
}
}
}
if(WeldJonintCodes=="全部" && listJointCode.Count > 0)
{
var nextJointCode = Funs.DB.Pipeline_WeldJoint.Where(t => t.PipelineId == PipelineId && !listJointCode.Contains(t.WeldJointCode))
.Select(t => t.WeldJointCode).ToList().ToArray();
WeldJonintCodes = String.Join(",", nextJointCode.ToArray());
}
Model.PTP_PipelineList newitem = new Model.PTP_PipelineList();
newitem.PTP_ID = this.PTP_ID;
newitem.PipelineId = PipelineId;
@@ -55,19 +55,30 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
}
private List<Pipeline_WeldJoint> GetDataJointGrid2(string PipelineID)
{
string[] arr = null;
List<string> listData = new List<string>();
var tempData = Funs.DB.PTP_PipelineList.Where(t => t.PipelineId == PipelineID && t.IsAll == false)
.Select(t => t.WeldJonintCode).FirstOrDefault();
.Select(t => t.WeldJonintCode).ToList();
if (tempData != null)
foreach (var item in tempData)
{
arr = tempData.Split(',');
if (!string.IsNullOrEmpty(item))
{
string[] strcode = item.Split(',');
for (int i = 0; i < strcode.Length; i++)
{
if (!listData.Contains(strcode[i]))
{
listData.Add(strcode[i]);
}
}
}
}
var query = Funs.DB.Pipeline_WeldJoint.Where(t => t.PipelineId == PipelineID)
.OrderBy(t => t.WeldJointCode).AsQueryable();
if (arr != null)
if (listData.Count>0)
{
query = query.Where(t => !arr.Contains(t.WeldJointCode));
query = query.Where(t => !listData.Contains(t.WeldJointCode));
}
return query.ToList();