材料匹配生成焊接任务单修改

This commit is contained in:
2024-12-26 14:42:15 +08:00
parent 0a2f9ea3a7
commit 9c2b6d962a
14 changed files with 272 additions and 56 deletions
@@ -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=="")
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="11/30/2023 10:26:25" ReportInfo.CreatorVersion="2017.1.16.0">
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="12/17/2024 19:27:14" ReportInfo.CreatorVersion="2017.1.16.0">
<ScriptText>using System;
using System.Collections;
using System.Collections.Generic;
@@ -89,7 +89,7 @@ namespace FastReport
}
</ScriptText>
<Dictionary>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWREC3I52kLS76GZ92OXWS6NB">
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWREru9g6JqYbbf0PYErYyKgC">
<TableDataSource Name="Table1" Alias="Head" DataType="System.Int32" Enabled="true" SelectCommand="select * from CH_Trust where CH_TrustID=@CH_TrustID">
<Column Name="CH_TrustID" DataType="System.String"/>
<Column Name="CH_TrustCode" DataType="System.String"/>
@@ -122,7 +122,7 @@ namespace FastReport
<Column Name="ToIso_Id" DataType="System.String"/>
<CommandParameter Name="CH_TrustID" DataType="22" Expression="[CH_TrustID]"/>
</TableDataSource>
<TableDataSource Name="Table3" Alias="Data" DataType="System.Int32" Enabled="true" SelectCommand=" SELECT batch.PipelineCode ,batch.WeldJointCode,batch.WelderCode,joint.Specification , joint.MaterialCode,joint.Remark &#13;&#10; FROM dbo.View_Batch_BatchTrustItem as batch&#13;&#10; left join View_HJGL_WeldJoint joint on batch .WeldJointId=joint.WeldJointId&#13;&#10; where batch.TrustBatchId=@TrustBatchId">
<TableDataSource Name="Table3" Alias="Data" DataType="System.Int32" Enabled="true" SelectCommand=" SELECT batch.PipelineCode ,batch.WeldJointCode,batch.WelderCode,joint.Specification , joint.MaterialCode,joint.Remark &#13;&#10; FROM dbo.View_Batch_BatchTrustItem as batch&#13;&#10; left join View_HJGL_WeldJoint joint on batch .WeldJointId=joint.WeldJointId&#13;&#10; where batch.TrustBatchId=@TrustBatchId order by batch.PipelineCode,batch.WeldJointCode">
<Column Name="Remark" DataType="System.Int32" PropName="Column" Calculated="true" Expression=""/>
<Column Name="PipelineCode" DataType="System.String"/>
<Column Name="WeldJointCode" DataType="System.String"/>
@@ -241,7 +241,7 @@ namespace FastReport
</TableRow>
</TableObject>
</PageHeaderBand>
<DataBand Name="Data1" Top="287.5" Width="718.2" Height="71.82">
<DataBand Name="Data1" Top="287.54" Width="718.2" Height="71.82">
<TableObject Name="Tabel_Data" Left="18.9" Width="699.18" Height="71.82" Border.Lines="Top" ManualBuildEvent="Tabel_Data_ManualBuild">
<TableColumn Name="Column21" Width="69.91"/>
<TableColumn Name="Column22" Width="117.16"/>
@@ -272,8 +272,8 @@ namespace FastReport
<TableCell Name="Cell144" Border.Lines="All" Text="[Data.Remark]" HorzAlign="Center" VertAlign="Center"/>
</TableRow>
</TableObject>
<DataFooterBand Name="DataFooter1" Top="416.46" Width="718.2">
<ChildBand Name="Child2" Top="363.32" Width="718.2" Height="49.14" FillUnusedSpace="true">
<DataFooterBand Name="DataFooter1" Top="416.58" Width="718.2">
<ChildBand Name="Child2" Top="363.4" Width="718.2" Height="49.14" FillUnusedSpace="true">
<TableObject Name="Table6" Left="18.9" Width="699.18" Height="49.14" Border.Lines="Top">
<TableColumn Name="Column53" Width="69.91"/>
<TableColumn Name="Column54" Width="117.16"/>
@@ -297,7 +297,7 @@ namespace FastReport
</ChildBand>
</DataFooterBand>
</DataBand>
<PageFooterBand Name="PageFooter1" Top="420.46" Width="718.2" Height="181.43">
<PageFooterBand Name="PageFooter1" Top="420.62" Width="718.2" Height="181.43">
<TableObject Name="Table5" Left="18.9" Width="699.21" Height="135.6" Border.Lines="All" RepeatHeaders="false">
<TableColumn Name="Column37" Width="99.45"/>
<TableColumn Name="Column38" Width="90"/>
@@ -338,7 +338,7 @@ namespace FastReport
<TableCell Name="Cell192" Border.Lines="All"/>
</TableRow>
</TableObject>
<ChildBand Name="Child1" Top="605.89" Width="718.2" Height="17.77" PrintOnBottom="true"/>
<ChildBand Name="Child1" Top="606.09" Width="718.2" Height="17.77" PrintOnBottom="true"/>
</PageFooterBand>
</ReportPage>
</Report>
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="12/10/2024 09:49:49" ReportInfo.CreatorVersion="2017.1.16.0">
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="12/20/2024 20:21:18" ReportInfo.CreatorVersion="2017.1.16.0">
<ScriptText>using System;
using System.Collections;
using System.Collections.Generic;
@@ -59,7 +59,7 @@ namespace FastReport
}
</ScriptText>
<Dictionary>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRHWPVF4cawdM/E/6wxiBHsP"/>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRFnv70ikz3Acipe8KbCgMqz"/>
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true">
<Column Name="BillName" DataType="System.String" PropName="CH_TrustCode"/>
<Column Name="ReqUnitName" DataType="System.String" PropName="CH_TrustUnit"/>
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="11/20/2024 15:38:28" ReportInfo.CreatorVersion="2017.1.16.0">
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="12/20/2024 20:20:57" ReportInfo.CreatorVersion="2017.1.16.0">
<ScriptText>using System;
using System.Collections;
using System.Collections.Generic;
@@ -99,7 +99,7 @@ namespace FastReport
}
</ScriptText>
<Dictionary>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRHVgk6b+r2VCyzjwcPrtgCH"/>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRE1ChH6wUKa5kJPPhfRyqPI"/>
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true">
<Column Name="PipelineComponentId" DataType="System.String"/>
<Column Name="PipelineComponentCode" DataType="System.String"/>
@@ -241,7 +241,7 @@
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu2" />
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu3" />
</Listeners>
</f:Grid>
</Items>
@@ -282,13 +282,13 @@
</f:MenuButton>
</f:Menu>
<f:Menu ID="Menu2" runat="server">
<f:MenuButton ID="btnDelMat" OnClick="btnDelMat_Click" EnablePostBack="true"
<f:MenuButton ID="btnDelMat" OnClick="btnDelMatGrid2_Click" EnablePostBack="true"
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server"
Text="删除" Icon="Delete">
</f:MenuButton>
</f:Menu>
<f:Menu ID="Menu3" runat="server">
<f:MenuButton ID="btnDelMat2" OnClick="btnDelMat_Click" EnablePostBack="true"
<f:MenuButton ID="btnDelMat2" OnClick="btnDelMatGrid3_Click" EnablePostBack="true"
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server"
Text="删除" Icon="Delete">
</f:MenuButton>
@@ -487,7 +487,7 @@ namespace FineUIPro.Web.HJGL.DataImport
#region
protected void btnDelMat_Click(object sender, EventArgs e)
protected void btnDelMatGrid2_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_WeldJointMenuId, Const.BtnDelete))
{
@@ -517,6 +517,38 @@ namespace FineUIPro.Web.HJGL.DataImport
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
protected void btnDelMatGrid3_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_WeldJointMenuId, Const.BtnDelete))
{
if (Grid3.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
return;
}
foreach (int rowIndex in Grid3.SelectedRowIndexArray)
{
string rowID = Grid3.DataKeys[rowIndex][0].ToString();
BLL.PipelineMatService.DeletePipeLineMat(rowID);
//BLL.Sys_LogService.AddLog(BLL.Const.System_6, this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_PipelineMenuId, Const.BtnDelete, rowID);
ShowNotify("删除成功!", MessageBoxIcon.Success);
}
this.BindGrid1(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text);
this.BindGrid2(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text);
this.BindGrid3(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text);
}
else
{
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
protected void btnDelMatGrid1_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_WeldJointMenuId, Const.BtnDelete))
@@ -42,7 +42,17 @@ namespace FineUIPro.Web.HJGL.WeldingManage
ViewState["UnitWorkId"] = value;
}
}
public string SerialNumber
{
get
{
return (string)ViewState["SerialNumber"];
}
set
{
ViewState["SerialNumber"] = value;
}
}
// 任务日期
public string TaskDate
{
@@ -123,12 +133,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
string strList = Request.Params["strList"];
List<string> list = Funs.GetStrListByStr(strList, '|');
if (list.Count() == 3)
if (list.Count() == 4)
{
this.UnitWorkId = list[0];
string unitId = list[1];
TaskDate = list[2];
SerialNumber = list[3];
InitDropList();
Model.WBS_UnitWork UnitWork = BLL.UnitWorkService.getUnitWorkByUnitWorkId(this.UnitWorkId);
@@ -142,7 +152,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
txtTaskDate.Enabled = false;
var task = (from x in Funs.DB.HJGL_WeldTask
where x.UnitWorkId == UnitWorkId && x.UnitId == unitId
&& x.TaskDate.Value.Date.ToString() == Convert.ToDateTime(txtTaskDate.Text.Trim()).ToString("yyyy-MM-dd")
&& x.TaskDate.Value.Date.ToString() == Convert.ToDateTime(txtTaskDate.Text.Trim()).ToString("yyyy-MM-dd") && x.SerialNumber==SerialNumber
select x).FirstOrDefault();
if (task != null)
{
@@ -169,14 +179,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
Model.WBS_UnitWork UnitWork = BLL.UnitWorkService.getUnitWorkByUnitWorkId(this.UnitWorkId);
BLL.UnitService.InitUnitDropDownListByUnitIds(this.drpUnit, UnitWork.UnitId, false);//单位
this.txtTaskCode.Text = BLL.WeldTaskService.GetTaskCodeByDate(this.CurrUser.LoginProjectId, this.txtTaskDate.Text, list[0], drpUnit.SelectedValue);
SerialNumber= BLL.WeldTaskService.GetSerialNumberByDate(this.CurrUser.LoginProjectId, this.txtTaskDate.Text, list[0], drpUnit.SelectedValue);
if (!string.IsNullOrEmpty(TaskDate))
{
txtTaskDate.Text = TaskDate;
txtTaskDate.Enabled = false;
var task = (from x in Funs.DB.HJGL_WeldTask
where x.UnitWorkId == UnitWorkId
&& x.TaskDate.Value.Date.ToString() == Convert.ToDateTime(txtTaskDate.Text.Trim()).ToString("yyyy-MM-dd")
&& x.TaskDate.Value.Date.ToString() == Convert.ToDateTime(txtTaskDate.Text.Trim()).ToString("yyyy-MM-dd") && x.SerialNumber == SerialNumber
select x).FirstOrDefault();
if (task != null)
{
@@ -540,6 +550,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
NewTask.UnitId = drpUnit.SelectedValue;
NewTask.TaskCode = this.txtTaskCode.Text.Trim();
NewTask.SerialNumber = SerialNumber;
NewTask.WeldTaskId = SQLHelper.GetNewID();
NewTask.WeldJointId = selectRowId[i];
var oldWeldTask = BLL.WeldTaskService.GetWeldTaskByWeldJointId(NewTask.WeldJointId);
@@ -91,7 +91,7 @@
</f:Panel>
<f:Panel runat="server" ID="panel3" RegionPosition="Left" RegionSplit="true" EnableCollapse="true"
Width="230px" Title="匹配管线(棕色为正在出库中管线)" ShowBorder="true" ShowHeader="true"
BodyPadding="10px">
BodyPadding="10px" AutoScroll="true">
<Toolbars>
<f:Toolbar ID="Toolbar4" Position="Bottom" runat="server" ToolbarAlign="Left">
<Items>
@@ -104,7 +104,7 @@
</f:Toolbar>
</Toolbars>
<Items>
<f:Grid ID="Grid3" ShowBorder="false" ShowHeader="false" runat="server" EnableCollapse="false"
<f:Grid ID="Grid3" ShowBorder="false" ShowHeader="false" runat="server" EnableCollapse="false"
DataKeyNames="Key" DataIDField="Key" ShowGridHeader="false" EnableRowLines="false" EnableAlternateRowColor="false">
<Columns>
<f:RenderField Width="200px" ColumnID="Value" DataField="Value" SortField="Value"
@@ -620,6 +620,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
where Grid2.SelectedRowIDArray.ToList().Contains(x.PipelineId) && x.WeldingDailyId == null &&
x.WeldTaskId == null && x.WeldingMethodCode != null
select x).ToList();
Dictionary<string, string> unitworkTaskCode = new Dictionary<string, string>();
Dictionary<string, string> unitworkSerialNumber = new Dictionary<string, string>();
Dictionary<int, string> matchPipeline = new Dictionary<int, string>();
foreach (var rowIndex in Grid2.SelectedRowIndexArray)
{
matchPipeline.Add(rowIndex+1, Grid2.Rows[rowIndex].RowID);
}
if (PipeArea=="1") //工厂预制的管线,则只选择预制口
{
selectRowId = selectRowId.Where(x => x.JointAttribute == "预制口").ToList();
@@ -632,8 +640,26 @@ namespace FineUIPro.Web.HJGL.WeldingManage
NewTask.ProjectId = this.CurrUser.LoginProjectId;
NewTask.UnitWorkId = PipelineService.GetPipelineByPipelineId(weldjoint.PipelineId)?.UnitWorkId;
NewTask.UnitId = this.CurrUser.UnitId;
if (unitworkTaskCode.FirstOrDefault(x=>x.Key== NewTask.UnitWorkId).Value!=null)
{
NewTask.TaskCode = unitworkTaskCode.FirstOrDefault(x => x.Key == NewTask.UnitWorkId).Value;
}
else
{
NewTask.TaskCode = BLL.WeldTaskService.GetTaskCodeByDate(this.CurrUser.LoginProjectId, DateTime.Now.Date.ToString("yyyy-MM-dd"), NewTask.UnitWorkId, this.CurrUser.UnitId);
unitworkTaskCode.Add(NewTask.UnitWorkId, NewTask.TaskCode);
}
if (unitworkSerialNumber.FirstOrDefault(x => x.Key == NewTask.UnitWorkId).Value != null)
{
NewTask.SerialNumber = unitworkSerialNumber.FirstOrDefault(x => x.Key == NewTask.UnitWorkId).Value;
}
else
{
NewTask.SerialNumber = BLL.WeldTaskService.GetSerialNumberByDate(this.CurrUser.LoginProjectId, DateTime.Now.Date.ToString("yyyy-MM-dd"), NewTask.UnitWorkId, this.CurrUser.UnitId);
unitworkSerialNumber.Add(NewTask.UnitWorkId, NewTask.SerialNumber);
}
NewTask.TaskCode = BLL.WeldTaskService.GetTaskCodeByDate(this.CurrUser.LoginProjectId, DateTime.Now.Date.ToString("yyyy-MM-dd"), NewTask.UnitWorkId, this.CurrUser.UnitId);
NewTask.WeldTaskId = SQLHelper.GetNewID();
NewTask.WeldJointId = weldjoint.WeldJointId;
var oldWeldTask = BLL.WeldTaskService.GetWeldTaskByWeldJointId(NewTask.WeldJointId);
@@ -645,6 +671,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
Model.HJGL_WeldJoint weldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(NewTask.WeldJointId);
if (weldJoint != null)
{
NewTask.PipeLineSortIndex = matchPipeline.FirstOrDefault(x => x.Value == weldJoint.PipelineId).Key;
NewTask.WeldingRod = weldJoint.WeldingRod;
NewTask.WeldingWire = weldJoint.WeldingWire;
//获取可替代焊丝焊条
@@ -235,15 +235,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
where x.UnitWorkId == node.NodeID
&& x.TaskDate < Convert.ToDateTime(this.txtTaskDateMonth.Text.Trim() + "-01").AddMonths(1)
&& x.TaskDate >= Convert.ToDateTime(this.txtTaskDateMonth.Text.Trim() + "-01")
select new { x.TaskDate.Value.Date, x.UnitId }).Distinct().ToList().OrderByDescending(x => x.Date);
select new { x.TaskDate.Value.Date, x.UnitId,x.SerialNumber }).Distinct().ToList().OrderByDescending(x => x.Date);
if (p.Count() > 0)
{
foreach (var item in p)
{
TreeNode newNode = new TreeNode();
newNode.CommandName = "Date";
newNode.Text = string.Format("{0:yyyy-MM-dd}", item.Date) + "(" + BLL.UnitService.getUnitNamesUnitIds(item.UnitId) + ")";
newNode.NodeID = node.NodeID + "|" + item.UnitId + "|" + string.Format("{0:yyyy-MM-dd}", item.Date);
newNode.Text = string.Format("{0:yyyy-MM-dd}", item.Date)+"-"+ item.SerialNumber + "(" + BLL.UnitService.getUnitNamesUnitIds(item.UnitId) + ")";
newNode.NodeID = node.NodeID + "|" + item.UnitId + "|" + string.Format("{0:yyyy-MM-dd}", item.Date) + "|" + item.SerialNumber;
newNode.EnableClickEvent = true;
node.Nodes.Add(newNode);
}
@@ -255,15 +255,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
join y in Funs.DB.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
where x.UnitWorkId == node.NodeID && y.WeldJointCode.Contains(this.txtWeldJointCode.Text.Trim())
orderby x.TaskDate descending
select new { x.TaskDate.Value.Date, x.UnitId }).Distinct().ToList().OrderByDescending(x => x.Date);
select new { x.TaskDate.Value.Date, x.UnitId, x.SerialNumber }).Distinct().ToList().OrderByDescending(x => x.Date);
if (p.Count() > 0)
{
foreach (var item in p)
{
TreeNode newNode = new TreeNode();
newNode.CommandName = "Date";
newNode.Text = string.Format("{0:yyyy-MM-dd}", item.Date) + "(" + BLL.UnitService.getUnitNamesUnitIds(item.UnitId) + ")";
newNode.NodeID = node.NodeID + "|" + item.UnitId + "|" + string.Format("{0:yyyy-MM-dd}", item.Date);
// newNode.Text = string.Format("{0:yyyy-MM-dd}", item.Date) + "(" + BLL.UnitService.getUnitNamesUnitIds(item.UnitId) + ")";
newNode.Text = string.Format("{0:yyyy-MM-dd}", item.Date) + "-" + item.SerialNumber + "(" + BLL.UnitService.getUnitNamesUnitIds(item.UnitId) + ")";
newNode.NodeID = node.NodeID + "|" + item.UnitId + "|" + string.Format("{0:yyyy-MM-dd}", item.Date)+"|"+item.SerialNumber;
newNode.EnableClickEvent = true;
node.Nodes.Add(newNode);
}
@@ -618,19 +619,20 @@ namespace FineUIPro.Web.HJGL.WeldingManage
//GetCanWelderDropDownList(GetWeldingTaskList);
}
string unitWorkId = string.Empty, unitId2 = string.Empty; string taskdate = string.Empty;
string unitWorkId = string.Empty, unitId2 = string.Empty; string taskdate = string.Empty;string serialNumber=string.Empty;
if (tvControlItem.SelectedNodeID.Contains("|"))
{
unitWorkId = tvControlItem.SelectedNodeID.Split('|')[0];
unitId2 = tvControlItem.SelectedNodeID.Split('|')[1];
taskdate = tvControlItem.SelectedNodeID.Split('|')[2];
serialNumber= tvControlItem.SelectedNodeID.Split('|')[3];
}
else
{
unitWorkId = tvControlItem.SelectedNodeID;
}
List<Model.View_HJGL_WeldingTask> GetWeldingTaskList = null;
GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, unitWorkId, unitId2, Convert.ToDateTime(taskdate), this.rbIsAudit.SelectedValue);
GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, unitWorkId, unitId2, Convert.ToDateTime(taskdate), this.rbIsAudit.SelectedValue, serialNumber);
this.BindGrid(GetWeldingTaskList);
Alert.ShowInTop("已生成可焊焊工!", MessageBoxIcon.Success);
@@ -985,19 +987,20 @@ namespace FineUIPro.Web.HJGL.WeldingManage
}
}
}
string unitWorkId = string.Empty, unitId = string.Empty;
string unitWorkId = string.Empty, unitId = string.Empty; string serialNumber = string.Empty;
if (tvControlItem.SelectedNodeID.Contains("|"))
{
unitWorkId = tvControlItem.SelectedNodeID.Split('|')[0];
unitId = tvControlItem.SelectedNodeID.Split('|')[1];
serialNumber = tvControlItem.SelectedNodeID.Split('|')[3];
}
else
{
unitWorkId = tvControlItem.SelectedNodeID;
}
List<Model.View_HJGL_WeldingTask> GetWeldingTaskList = null;
GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, unitWorkId, unitId, Convert.ToDateTime(hdTaskWeldJoint.Text.Trim()), this.rbIsAudit.SelectedValue);
GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, unitWorkId, unitId, Convert.ToDateTime(hdTaskWeldJoint.Text.Trim()), this.rbIsAudit.SelectedValue, serialNumber);
this.BindGrid(GetWeldingTaskList);
}
@@ -1083,7 +1086,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
DateTime? taskTime = Funs.GetNewDateTime(tvControlItem.SelectedNodeID.Split('|')[2]);
if (taskTime != null)
{
List<Model.View_HJGL_WeldingTask> GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID.Split('|')[0], tvControlItem.SelectedNodeID.Split('|')[1], Convert.ToDateTime(taskTime), this.rbIsAudit.SelectedValue);
List<Model.View_HJGL_WeldingTask> GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID.Split('|')[0], tvControlItem.SelectedNodeID.Split('|')[1], Convert.ToDateTime(taskTime), this.rbIsAudit.SelectedValue, tvControlItem.SelectedNodeID.Split('|')[3]);
this.BindGrid(GetWeldingTaskList);
}
@@ -1142,7 +1145,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
unitWorkId = tvControlItem.SelectedNodeID;
}
List<Model.View_HJGL_WeldingTask> GetWeldingTaskList = null;
GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, unitWorkId, unitId, Convert.ToDateTime(txtTaskDate.Text), this.rbIsAudit.SelectedValue);
GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, unitWorkId, unitId, Convert.ToDateTime(txtTaskDate.Text), this.rbIsAudit.SelectedValue, tvControlItem.SelectedNodeID.Split('|')[3]);
this.BindGrid(GetWeldingTaskList);
drpCanWelder.Items.Clear();
//GetCanWelderDropDownList(GetWeldingTaskList);
@@ -1205,7 +1208,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
DateTime? taskTime = Funs.GetNewDateTime(tvControlItem.SelectedNodeID.Split('|')[2]);
if (taskTime != null)
{
List<Model.View_HJGL_WeldingTask> GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID.Split('|')[0], tvControlItem.SelectedNodeID.Split('|')[1], Convert.ToDateTime(taskTime), this.rbIsAudit.SelectedValue);
List<Model.View_HJGL_WeldingTask> GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID.Split('|')[0], tvControlItem.SelectedNodeID.Split('|')[1], Convert.ToDateTime(taskTime), this.rbIsAudit.SelectedValue, tvControlItem.SelectedNodeID.Split('|')[3]);
this.BindGrid(GetWeldingTaskList);
}
}
@@ -1215,7 +1218,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
DateTime? taskTime = Funs.GetNewDateTime(tvControlItem.SelectedNodeID.Split('|')[2]);
if (taskTime != null)
{
var pipelines = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID.Split('|')[0], tvControlItem.SelectedNodeID.Split('|')[1], Convert.ToDateTime(taskTime), this.rbIsAudit.SelectedValue).Select(x => x.PipelineId).Distinct().ToList();
var pipelines = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID.Split('|')[0], tvControlItem.SelectedNodeID.Split('|')[1], Convert.ToDateTime(taskTime), this.rbIsAudit.SelectedValue, tvControlItem.SelectedNodeID.Split('|')[3]).Select(x => x.PipelineId).Distinct().ToList();
if (pipelines.Any())
{
@@ -1265,7 +1268,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
DateTime? taskTime = Funs.GetNewDateTime(tvControlItem.SelectedNodeID.Split('|')[2]);
if (taskTime != null)
{
List<Model.View_HJGL_WeldingTask> GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID.Split('|')[0], tvControlItem.SelectedNodeID.Split('|')[1], Convert.ToDateTime(taskTime), this.rbIsAudit.SelectedValue);
List<Model.View_HJGL_WeldingTask> GetWeldingTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID.Split('|')[0], tvControlItem.SelectedNodeID.Split('|')[1], Convert.ToDateTime(taskTime), this.rbIsAudit.SelectedValue, tvControlItem.SelectedNodeID.Split('|')[3]);
this.BindGrid(GetWeldingTaskList);
}
}
@@ -1275,12 +1278,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
{
string unitWorkId = string.Empty, unitId2 = string.Empty; string taskdate = string.Empty;
string serialNumber = string.Empty;
if (tvControlItem.SelectedNodeID.Contains("|"))
{
unitWorkId = tvControlItem.SelectedNodeID.Split('|')[0];
unitId2 = tvControlItem.SelectedNodeID.Split('|')[1];
taskdate = tvControlItem.SelectedNodeID.Split('|')[2];
TwInOutplanmasterService.GenOutPlanmasterByWeldTaskId(unitWorkId, unitId2, Convert.ToDateTime(taskdate), this.CurrUser.PersonId);
serialNumber = tvControlItem.SelectedNodeID.Split('|')[3];
TwInOutplanmasterService.GenOutPlanmasterByWeldTaskId(unitWorkId, unitId2, Convert.ToDateTime(taskdate), serialNumber, this.CurrUser.PersonId);
ShowNotify("生成出库申请单成功", MessageBoxIcon.Success);
}
else
@@ -1343,7 +1348,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
DateTime? taskTime = Funs.GetNewDateTime(tvControlItem.SelectedNodeID.Split('|')[2]);
if (taskTime != null)
{
var weldTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID.Split('|')[0], tvControlItem.SelectedNodeID.Split('|')[1], Convert.ToDateTime(taskTime), this.rbIsAudit.SelectedValue);
var weldTaskList = BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID.Split('|')[0], tvControlItem.SelectedNodeID.Split('|')[1], Convert.ToDateTime(taskTime), this.rbIsAudit.SelectedValue, tvControlItem.SelectedNodeID.Split('|')[3]);
var pipelines = weldTaskList.Select(x => x.PipelineId).Distinct().ToList();
if (pipelines.Any())