diff --git a/.vs/SGGL_SeDin_New/v17/.wsuo b/.vs/SGGL_SeDin_New/v17/.wsuo
index 49c98172..f619c8e5 100644
Binary files a/.vs/SGGL_SeDin_New/v17/.wsuo and b/.vs/SGGL_SeDin_New/v17/.wsuo differ
diff --git a/SGGL/BLL/CLGL/TwInOutplanmasterService.cs b/SGGL/BLL/CLGL/TwInOutplanmasterService.cs
index 3cd7dc75..f08c9d5a 100644
--- a/SGGL/BLL/CLGL/TwInOutplanmasterService.cs
+++ b/SGGL/BLL/CLGL/TwInOutplanmasterService.cs
@@ -181,7 +181,7 @@ namespace BLL
ReqUnitId = x.ReqUnitId,
ReqUnitName = x.ReqUnitName,
UnitWorkId = x.UnitWorkId,
- WeldTaskCode = x.WeldTaskId != null ? x.WeldTaskId.Contains('|') ? Funs.DB.HJGL_WeldTask.FirstOrDefault(e => e.UnitWorkId == x.WeldTaskId.Split('|')[0].ToString() && e.UnitId == x.WeldTaskId.Split('|')[1].ToString() && e.TaskDate.Value.Date == DateTime.ParseExact(x.WeldTaskId.Split('|')[2].ToString(), "yyyyMMdd", null).Date)?.TaskCode : "" : "",
+ WeldTaskCode = GetWeldTaskCode(x.WeldTaskId),
CategoryString = TwConst.CategoryMap.FirstOrDefault(y => y.Value == x.Category).Key,
TypeString = TwConst.TypeIntMap.FirstOrDefault(y => y.Value == x.TypeInt).Key,
StateString = TwConst.StateMap.FirstOrDefault(y => y.Value == x.State).Key,
@@ -198,6 +198,38 @@ namespace BLL
};
}
+ public static string GetWeldTaskCode( string WeldTaskId)
+ {
+ string result=String.Empty;
+
+ if (string.IsNullOrEmpty(WeldTaskId)) return result;
+
+ if (WeldTaskId.Split('|').Length==3) //用于处理历史数据
+ {
+ result = (from x in Funs.DB.HJGL_WeldTask
+ where x.UnitWorkId == WeldTaskId.Split('|')[0].ToString()
+ && x.UnitId == WeldTaskId.Split('|')[1].ToString()
+ && x.TaskDate.Value.Date ==
+ DateTime.ParseExact(WeldTaskId.Split('|')[2].ToString(), "yyyyMMdd", null)
+ select x.TaskCode).FirstOrDefault()
+ ?.ToString();
+
+ }
+ else if (WeldTaskId.Split('|').Length == 4)
+ {
+ result = (from x in Funs.DB.HJGL_WeldTask
+ where x.UnitWorkId == WeldTaskId.Split('|')[0].ToString()
+ && x.UnitId == WeldTaskId.Split('|')[1].ToString()
+ && x.TaskDate.Value.Date ==
+ DateTime.ParseExact(WeldTaskId.Split('|')[2].ToString(), "yyyyMMdd", null)
+ && x.SerialNumber== WeldTaskId.Split('|')[3]
+ select x.TaskCode).FirstOrDefault()
+ ?.ToString();
+ }
+
+ return result;
+
+ }
#endregion
@@ -560,15 +592,15 @@ namespace BLL
///
///
///
- public static void GenOutPlanmasterByWeldTaskId(string unitworkid,string unitid,DateTime date,string Personid)
+ public static void GenOutPlanmasterByWeldTaskId(string unitworkid,string unitid,DateTime date,string serialNumber, string Personid)
{
Model.SGGLDB db = Funs.DB;
- Model.View_HJGL_WeldingTask weldTask = db.View_HJGL_WeldingTask.FirstOrDefault(e => e.UnitWorkId==unitworkid && e.UnitId==unitid&& e.TaskDate.Value.Date==date.Date);
+ Model.View_HJGL_WeldingTask weldTask = db.View_HJGL_WeldingTask.FirstOrDefault(e => e.UnitWorkId==unitworkid && e.UnitId==unitid&& e.TaskDate.Value.Date==date.Date && e.SerialNumber==serialNumber);
if (weldTask==null)
{
return;
}
- string WeldTaskId= unitworkid+"|"+unitid+ "|" + string.Format("{0:yyyyMMdd}", date);
+ string WeldTaskId= unitworkid+"|"+unitid+ "|" + string.Format("{0:yyyyMMdd}", date)+"|"+serialNumber;
//判断是否已经生成过出库计划单
var queryIsExitInMaster = new Tw_InOutMasterOutput();
queryIsExitInMaster.WeldTaskId = WeldTaskId;
@@ -579,7 +611,7 @@ namespace BLL
{
return;
}
- var pipelineList = db.View_HJGL_WeldingTask.Where(e => e.UnitWorkId == unitworkid && e.UnitId == unitid && e.TaskDate.Value.Date == date.Date).Select(x=>x.PipelineId).Distinct().ToList();
+ var pipelineList = db.View_HJGL_WeldingTask.Where(e => e.UnitWorkId == unitworkid && e.UnitId == unitid && e.TaskDate.Value.Date == date.Date && e.SerialNumber == serialNumber).Select(x=>x.PipelineId).Distinct().ToList();
var MaterDatial= from x in db.HJGL_PipeLineMat
join y in db.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode
@@ -700,5 +732,5 @@ namespace BLL
}
- }
+ }
}
\ No newline at end of file
diff --git a/SGGL/BLL/HJGL/WeldingManage/WeldTaskService.cs b/SGGL/BLL/HJGL/WeldingManage/WeldTaskService.cs
index 222195ed..188a9ede 100644
--- a/SGGL/BLL/HJGL/WeldingManage/WeldTaskService.cs
+++ b/SGGL/BLL/HJGL/WeldingManage/WeldTaskService.cs
@@ -35,10 +35,13 @@ namespace BLL
public static string GetTaskCodeByDate(string projectId, string date,string unitworkid,string unitid)
{
string code = string.Empty;
- var list = (from x in Funs.DB.HJGL_WeldTask where x.ProjectId == projectId && x.TaskDate == Convert.ToDateTime(date) orderby x.TaskCode descending select x.TaskCode).Distinct().ToList();
- if (list.Count > 0)
+ var list = (from x in Funs.DB.HJGL_WeldTask where x.ProjectId == projectId && x.UnitWorkId== unitworkid && x.UnitId== unitid && x.TaskDate == Convert.ToDateTime(date) orderby x.TaskCode descending select x.TaskCode).Distinct().ToList();
+ var count = list.Count;
+ code = date +"-"+ (count + 1).ToString("D3") + UnitService.GetUnitCodeByUnitId(unitid) + "-" + UnitWorkService.getUnitWorkByUnitWorkId(unitworkid)?.UnitWorkCode;
+ /*if (list.Count > 0)
{
string oldCode = list[0];
+
if (oldCode.Length > 4)
{
string partCode = oldCode.Substring(8,3);
@@ -65,15 +68,32 @@ namespace BLL
{
code = date + "-001";
}
- code = code.Replace("-", "") + "-" + UnitService.GetUnitCodeByUnitId(unitid) + "-" + UnitWorkService.getUnitWorkByUnitWorkId(unitworkid)?.UnitWorkCode;
+ code = code.Replace("-", "") + "-" + UnitService.GetUnitCodeByUnitId(unitid) + "-" + UnitWorkService.getUnitWorkByUnitWorkId(unitworkid)?.UnitWorkCode;*/
return code;
}
- public static List GetWeldingTaskList(string ProjectId, string UnitWorkId, string unitId, DateTime taskDate, string canWelder)
+ public static string GetSerialNumberByDate(string projectId, string date, string unitworkid, string unitid)
+ {
+ string code = string.Empty;
+ var list = (from x in Funs.DB.HJGL_WeldTask where x.ProjectId == projectId && x.UnitWorkId == unitworkid && x.UnitId == unitid && x.TaskDate == Convert.ToDateTime(date) orderby x.TaskCode descending select x.TaskCode).Distinct().ToList();
+ var count = list.Count;
+ code = (count + 1).ToString("D3");
+ return code;
+ }
+ public static string GetSerialNumberByDate(string projectId,string taskCode)
+ {
+ string result = string.Empty;
+ var list = (from x in Funs.DB.HJGL_WeldTask where x.ProjectId == projectId && x.TaskCode == taskCode orderby x.SerialNumber descending select x.SerialNumber).FirstOrDefault();
+
+ result = list?.ToString();
+ return result;
+ }
+
+ public static List GetWeldingTaskList(string ProjectId, string UnitWorkId, string unitId, DateTime taskDate, string canWelder,string serialNumber)
{
var q = from x in Funs.DB.View_HJGL_WeldingTask
where x.ProjectId == ProjectId && x.UnitWorkId == UnitWorkId
- && x.TaskDate.Value.Date == taskDate.Date
+ && x.TaskDate.Value.Date == taskDate.Date && x.SerialNumber==serialNumber
select x;
if (!string.IsNullOrEmpty(unitId))
{
@@ -115,7 +135,9 @@ namespace BLL
WeldingRod = WeldTask.WeldingRod,
WeldingWire = WeldTask.WeldingWire,
CanWeldingRodName = WeldTask.CanWeldingRodName,
- CanWeldingWireName = WeldTask.CanWeldingWireName
+ CanWeldingWireName = WeldTask.CanWeldingWireName,
+ PipeLineSortIndex = WeldTask.PipeLineSortIndex,
+ SerialNumber = WeldTask.SerialNumber
};
@@ -146,7 +168,8 @@ namespace BLL
newWeldTask.TableDate = WeldTask.TableDate;
newWeldTask.WeldingMode = WeldTask.WeldingMode;
newWeldTask.IsSaved = WeldTask.IsSaved;
-
+ newWeldTask.SerialNumber= WeldTask.SerialNumber;
+ newWeldTask.PipeLineSortIndex= WeldTask.PipeLineSortIndex;
db.SubmitChanges();
}
}
diff --git a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterSelect.aspx.cs b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterSelect.aspx.cs
index 7b8d0010..6f441cfc 100644
--- a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterSelect.aspx.cs
+++ b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterSelect.aspx.cs
@@ -224,6 +224,7 @@ namespace FineUIPro.Web.CLGL
from z in zz.DefaultIfEmpty()
join lib in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals lib.MaterialCode
where y.ProjectId == this.CurrUser.LoginProjectId
+ && z.ProjectId == this.CurrUser.LoginProjectId
&& y.UnitWorkId == this.UnitWorkId
&& y.PipelineId == this.tvControlItem.SelectedNodeID
&& (x.PrefabricatedComponents==null||x.PrefabricatedComponents=="")
diff --git a/SGGL/FineUIPro.Web/File/Fastreport/管道焊口检测委托单NoPic.frx b/SGGL/FineUIPro.Web/File/Fastreport/管道焊口检测委托单NoPic.frx
index a5fedbe1..e84a3140 100644
--- a/SGGL/FineUIPro.Web/File/Fastreport/管道焊口检测委托单NoPic.frx
+++ b/SGGL/FineUIPro.Web/File/Fastreport/管道焊口检测委托单NoPic.frx
@@ -1,5 +1,5 @@
-
+
using System;
using System.Collections;
using System.Collections.Generic;
@@ -89,7 +89,7 @@ namespace FastReport
}
-
+
@@ -122,7 +122,7 @@ namespace FastReport
-
+
@@ -241,7 +241,7 @@ namespace FastReport
-
+
@@ -272,8 +272,8 @@ namespace FastReport
-
-
+
+
@@ -297,7 +297,7 @@ namespace FastReport
-
+
@@ -338,7 +338,7 @@ namespace FastReport
-
+
diff --git a/SGGL/FineUIPro.Web/File/Fastreport/管道焊接任务单.frx b/SGGL/FineUIPro.Web/File/Fastreport/管道焊接任务单.frx
index 78ec0792..2bc28a83 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;
@@ -59,7 +59,7 @@ namespace FastReport
}
-
+
diff --git a/SGGL/FineUIPro.Web/File/Fastreport/组件打印.frx b/SGGL/FineUIPro.Web/File/Fastreport/组件打印.frx
index 5777f8af..ccf889e3 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;
@@ -99,7 +99,7 @@ namespace FastReport
}
-
+
diff --git a/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformation.aspx b/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformation.aspx
index 0dca75f9..053453af 100644
--- a/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformation.aspx
+++ b/SGGL/FineUIPro.Web/HJGL/DataImport/MaterialInformation.aspx
@@ -241,7 +241,7 @@
-
+
@@ -282,13 +282,13 @@