焊接材料修改

This commit is contained in:
李鹏飞 2025-02-18 17:38:49 +08:00
parent d8cd15555d
commit 96d8567515
18 changed files with 161 additions and 75 deletions

Binary file not shown.

View File

@ -11,6 +11,10 @@
"DockedWidth": 386,
"SelectedChildIndex": -1,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{e506b91c-c606-466a-90a9-123d1d1e12b3}"
@ -59,10 +63,6 @@
"$type": "Bookmark",
"Name": "ST:131:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{1a46fd64-28d5-434c-8eb3-17a02d419b53}"
@ -70,6 +70,10 @@
{
"$type": "Bookmark",
"Name": "ST:0:0:{5726b0e3-1012-5233-81f9-d1fad48e7a56}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
}
]
}

View File

@ -172,13 +172,27 @@ namespace BLL
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var results = new List<Tw_PipeMatMatchOutput>();
string [] taskPipeLineList= null;
var inoutPlanMasterl = db.Tw_InOutPlanMaster.FirstOrDefault(x => x.Id == outPlanMasterId);
if (inoutPlanMasterl!=null)
{
if (inoutPlanMasterl.WeldTaskId.Split('|').Length==4)
{
taskPipeLineList = Funs.DB.View_HJGL_WeldingTask.Where(e =>
e.UnitWorkId == inoutPlanMasterl.WeldTaskId.Split('|')[0].ToString()
&& e.UnitId == inoutPlanMasterl.WeldTaskId.Split('|')[1].ToString()
&& e.TaskDate.Value.Date == DateTime
.ParseExact(inoutPlanMasterl.WeldTaskId.Split('|')[2].ToString(), "yyyyMMdd", null).Date
&& e.SerialNumber == inoutPlanMasterl.WeldTaskId.Split('|')[3].ToString()
).Distinct().OrderBy(x => x.PipeLineSortIndex).Select(x => x.PipelineId).ToArray();
}
}
// 获取所需材料列表
var requiredMaterials = (from x in db.Tw_InOutPlanDetail_Relation
join master in db.Tw_InOutPlanMaster on x.InOutPlanMasterId equals master.Id
join y in db.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode
join z in db.HJGL_Pipeline on x.PipelineId equals z.PipelineId
join t in db.HJGL_WeldTask on master.WeldTaskId equals t.WeldTaskId
where x.InOutPlanMasterId == outPlanMasterId
select new Tw_PipeMatMatchOutput
{
@ -191,12 +205,17 @@ namespace BLL
MaterialSpec = y.MaterialSpec,
MaterialUnit = y.MaterialUnit,
MaterialDef = y.MaterialDef,
NeedNum = x.Number,
PipeLineSortIndex=t.PipeLineSortIndex
NeedNum = x.Number
}
).ToList();
if (taskPipeLineList != null && taskPipeLineList.Any())
{
requiredMaterials = requiredMaterials.OrderBy(x => Array.IndexOf(taskPipeLineList, x.PipelineId.ToString())).ToList();
}
var masterModle = db.Tw_InOutPlanMaster.FirstOrDefault(x => x.Id == outPlanMasterId);
results = GetMatMatchOutput(requiredMaterials.OrderBy(x=>x.PipelineId).ThenBy(x=>x.MaterialCode).ToList(), masterModle.WarehouseCode, masterModle.ProjectId);
results = GetMatMatchOutput(requiredMaterials, masterModle.WarehouseCode, masterModle.ProjectId);
return results;
}

View File

@ -284,8 +284,14 @@ namespace BLL
return responeData;
}
}
var typeString = temeplateDtoIns.Select(x => x.TypeString).Distinct().ToList(); //获取导入文件的材料编码
if (typeString.Contains("采购入库") && typeString.Contains("退料入库"))
var typeString = temeplateDtoIns.Select(x => x.TypeString).Distinct().ToList(); //获取导入文件的类型
if (typeString.Where(x=>string.IsNullOrEmpty(x)).Count()>0)
{
responeData.code = 0;
responeData.message ="导入数据中类型列不能为空!";
return responeData;
}
if (typeString.Contains("采购入库") && typeString.Contains("其他入库"))
{
responeData.code = 0;
responeData.message = errorWarehouseCode + "每次只能导入一种类型!";
@ -350,9 +356,9 @@ namespace BLL
twInOutPlanMaster.TypeInt = (int)TwConst.TypeInt.;
}
else if ("退料入库".Equals(FirstCusBillCodeDtoIns.TypeString))
else if ("其他入库".Equals(FirstCusBillCodeDtoIns.TypeString))
{
twInOutPlanMaster.TypeInt = (int)TwConst.TypeInt.退;
twInOutPlanMaster.TypeInt = (int)TwConst.TypeInt.;
}
else
{
@ -555,7 +561,13 @@ namespace BLL
TwInOutplandetailService.AddList(details, planMasterModel.Id);
return message;
}
/// <summary>
/// 获取出库申请单编号
/// </summary>
/// <param name="taskCode"></param>
/// <param name="typeInt"></param>
/// <param name="category"></param>
/// <returns></returns>
public static string GetCusBillCodeByTaskCode(string taskCode,TwConst.TypeInt typeInt,TwConst.Category category )
{
string cusBillCode = "";
@ -601,17 +613,17 @@ namespace BLL
public static string GetDataInCusBillCode(string projectid, string unitcode,string typeString,string unitWorkCode="",string Category = "")
{
if (typeString == TwConst.TypeInt.退.ToString())
if (typeString == TwConst.TypeInt..ToString())
{
//生成规则是20240919-unitcode-AP-GR01
string cusBillCode = string.Format("{0:yyyyMMdd}", DateTime.Now) + "-" + unitcode + "-AP-GR";
string cusBillCode = string.Format("{0:yyyyMMdd}", DateTime.Now) ;
var queryAll = new Tw_InOutMasterOutput()
{
ProjectId = projectid,
CusBillCode = cusBillCode,
};
var queryAllresult = GetModle(queryAll).Count();
cusBillCode = cusBillCode + (queryAllresult + 1).ToString().PadLeft(2, '0');
cusBillCode = cusBillCode + "-AP-" + (queryAllresult + 1).ToString().PadLeft(2, '0');
return cusBillCode;
}
else if (typeString == TwConst.TypeInt..ToString())
@ -628,15 +640,30 @@ namespace BLL
var queryAllresult = GetModle(queryAll).Count();
if (Category == TwConst.Category..ToString())
{
cusBillCode = cusBillCode + (queryAllresult + 1).ToString().PadLeft(2, '0') + "-GI-P01";
cusBillCode = cusBillCode + (queryAllresult + 1).ToString().PadLeft(2, '0') + "-AP-P01";
}
else
{
cusBillCode = cusBillCode + (queryAllresult + 1).ToString().PadLeft(2, '0') + "-GI-PF01";
cusBillCode = cusBillCode + (queryAllresult + 1).ToString().PadLeft(2, '0') + "-AP-PF01";
}
return cusBillCode;
}
else if (typeString == TwConst.TypeInt..ToString())
{
//生成规则是20240919-01
string cusBillCode = string.Format("{0:yyyyMMdd}", DateTime.Now);
var queryAll = new Tw_InOutMasterOutput()
{
ProjectId = projectid,
CusBillCode = cusBillCode,
TypeInt = (int)TwConst.TypeInt.,
};
var queryAllresult = GetModle(queryAll).Count();
cusBillCode = cusBillCode +"-AP-"+ (queryAllresult + 1).ToString().PadLeft(2, '0');
return cusBillCode;
}
else
{
//生成规则是20240919-unitcode-AP-GR01
@ -678,11 +705,11 @@ namespace BLL
{
return;
}
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 pipelineList = db.View_HJGL_WeldingTask.Where(e => e.UnitWorkId == unitworkid && e.UnitId == unitid && e.TaskDate.Value.Date == date.Date && e.SerialNumber == serialNumber).OrderBy(x=>x.PipeLineSortIndex).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
where pipelineList.Contains(x.PipelineId)
where pipelineList.Contains(x.PipelineId) && x.PrefabricatedComponents !=null
select new
{
x.PipelineId,

View File

@ -273,16 +273,8 @@ namespace BLL
WarehouseMan = plan.WarehouseMan,
WarehouseDate = plan.WarehouseDate
};
if ((TwConst.TypeInt)plan.TypeInt!= TwConst.TypeInt.)
{
master.CusBillCode = GetCusBillCodeByTaskCode(plan.WeldTaskCode, (TwConst.TypeInt)plan.TypeInt,
(BLL.TwConst.Category)plan.Category);
}
else
{
master.CusBillCode= plan.CusBillCode.Replace("-AP", "");
}
master.CusBillCode = GetCusBillCode(plan.WeldTaskCode, (TwConst.TypeInt)plan.TypeInt,
(BLL.TwConst.Category)plan.Category, plan.CusBillCode);
Add(master);
//生成明细
foreach (var detail in detailLists)
@ -338,7 +330,15 @@ namespace BLL
TwInOutplanmasterService.Update(plan);
}
public static string GetCusBillCodeByTaskCode(string taskCode, TwConst.TypeInt typeInt, TwConst.Category category)
/// <summary>
/// 获取入库单编号
/// </summary>
/// <param name="taskCode"></param>
/// <param name="typeInt"></param>
/// <param name="category"></param>
/// <returns></returns>
/// <param name="planCusBillCode"></param>
public static string GetCusBillCode(string taskCode, TwConst.TypeInt typeInt, TwConst.Category category, string planCusBillCode = "")
{
string cusBillCode = "";
switch (typeInt)
@ -353,6 +353,12 @@ namespace BLL
cusBillCode = taskCode + "-GI-PF01-RE01";
}
break;
case TwConst.TypeInt.:
cusBillCode = planCusBillCode.Replace("-AP-", "-GI-");
break;
case TwConst.TypeInt.:
cusBillCode = planCusBillCode.Replace("-AP", ""); ;
break;
}
return cusBillCode;

View File

@ -78,7 +78,8 @@ namespace BLL
AuditDate2 = x.AuditDate2,
WarehouseMan = x.WarehouseMan,
WarehouseDate = x.WarehouseDate,
WarehouseManName = warehouseperson.PersonName
WarehouseManName = warehouseperson.PersonName,
Remark=y.Remark
};
return q;
@ -281,7 +282,7 @@ namespace BLL
Id = Guid.NewGuid().ToString(),
InOutPlanMasterId = plan.Id,
ProjectId = plan.ProjectId,
CusBillCode = GetCusBillCodeByTaskCode(plan.WeldTaskCode, (TwConst.TypeInt)plan.TypeInt, (BLL.TwConst.Category)plan.Category),
CusBillCode = GetCusBillCode(plan.WeldTaskCode, (TwConst.TypeInt)plan.TypeInt, (BLL.TwConst.Category)plan.Category,plan.CusBillCode),
WarehouseCode = plan.WarehouseCode,
Category = plan.Category,
Source = plan.Source,
@ -295,7 +296,8 @@ namespace BLL
AuditMan2 = plan.AuditMan2,
AuditDate2 = plan.AuditDate2,
WarehouseMan = plan.WarehouseMan,
WarehouseDate = plan.WarehouseDate
WarehouseDate = plan.WarehouseDate,
};
Add(master);
//生成出库单明细
@ -350,7 +352,15 @@ namespace BLL
return result;
}
public static string GetCusBillCodeByTaskCode(string taskCode, TwConst.TypeInt typeInt, TwConst.Category category)
/// <summary>
/// 获取出库单编号
/// </summary>
/// <param name="taskCode"></param>
/// <param name="typeInt"></param>
/// <param name="category"></param>
/// <returns></returns>
/// <param name="planCusBillCode"></param>
public static string GetCusBillCode(string taskCode, TwConst.TypeInt typeInt, TwConst.Category category, string planCusBillCode = "")
{
string cusBillCode = "";
switch (typeInt)
@ -377,6 +387,12 @@ namespace BLL
}
break;
case TwConst.TypeInt.:
cusBillCode = planCusBillCode.Replace("-AP-", "-GI-");
break;
case TwConst.TypeInt.:
cusBillCode = planCusBillCode.Replace("-AP-", "-GI-");
break;
}
return cusBillCode;

View File

@ -137,7 +137,7 @@ namespace BLL
var q = Funs.DB.HJGL_Pipeline_ComponentJoint.Where(x => x.PipelineComponentId == PipelineComponentId).ToList();
if (q.Count!=0)
{
var NotProductionNum = (from x in q where x.State == 0 select x).Count(); //未生产数量
var NotProductionNum = (from x in q where x.State == 0||x.State ==null select x).Count(); //未生产数量
var ProductionNum = (from x in q where x.State == 1 select x).Count(); //已生产数量
if (NotProductionNum == 0) //全部完成
{

View File

@ -98,28 +98,20 @@ namespace BLL
var db = Funs.DB;
var query =
from com in db.HJGL_Pipeline_Component
join mat in db.HJGL_PipeLineMat on com.PipeLineMatId equals mat.PipeLineMatId into matJoin
from mat in matJoin.DefaultIfEmpty()
join pipe in db.HJGL_Pipeline on com.PipelineId equals pipe.PipelineId into pipeJoin
from pipe in pipeJoin.DefaultIfEmpty()
join punit in db.Base_Unit on com.PreUnit equals punit.UnitId into punitJoin
from punit in punitJoin.DefaultIfEmpty()
join aunit in db.Base_Unit on com.AssembleUnit equals aunit.UnitId into aunitJoin
from aunit in aunitJoin.DefaultIfEmpty()
join unitwork in db.WBS_UnitWork on pipe.UnitWorkId equals unitwork.UnitWorkId into unitworkJoin
from unitwork in unitworkJoin.DefaultIfEmpty()
join mater in db.Base_Material on pipe.MaterialId equals mater.MaterialId into materJoin
from mater in materJoin.DefaultIfEmpty()
where com.QRCode != ""
orderby com.PipelineComponentCode,com.PipelineId
orderby com.PipelineComponentCode, com.PipelineId
select new PipelineComponentPrintDto
{
PipelineComponentId = com.PipelineComponentId,
@ -138,27 +130,33 @@ namespace BLL
QRCode2 = "PrePipeline$" + com.PipelineComponentId,
MaterialCode = mater.MaterialCode,
IsPrint = com.IsPrint
};
var result = query.ToList();
if (PipelineComponentId!=null &&PipelineComponentId.Length > 0)
if (PipelineComponentId != null && PipelineComponentId.Length > 0)
{
result = result.Where(x => PipelineComponentId.Contains(x.PipelineComponentId.ToString())).ToList();
}
if (PipelineId != null && PipelineId.Length > 0)
{
result = result.Where(x => PipelineId.Contains(x.PipelineId.ToString())).ToList();
// 按照传入的 PipelineId 顺序排序
result = result.OrderBy(x => Array.IndexOf(PipelineId, x.PipelineId.ToString())).ToList();
}
//if (IsCheckPrint != null & IsCheckPrint ==true)
//{
// result = result.Where(x => x.IsPrint==false||x.IsPrint==null).ToList();
//}
// if (IsCheckPrint != null & IsCheckPrint == true)
// {
// result = result.Where(x => x.IsPrint == false || x.IsPrint == null).ToList();
// }
return result;
}
/// <summary>
/// 判断管线组件Code是否存在
/// </summary>

View File

@ -35,7 +35,7 @@ namespace FineUIPro.Web.CLGL
table.Id = Id;
var model = TwInOutplanmasterService.GetListData(table).FirstOrDefault();
txtCusBillCode.Text = TwOutputmasterService.GetCusBillCodeByTaskCode(model.WeldTaskCode, (TwConst.TypeInt)model.TypeInt, (BLL.TwConst.Category)model.Category);
txtCusBillCode.Text = TwOutputmasterService.GetCusBillCode(model.WeldTaskCode, (TwConst.TypeInt)model.TypeInt, (BLL.TwConst.Category)model.Category);
txtWarehouseCode.Text = model.WarehouseCode;
txtCreateDate.Text = string.Format("{0:yyyy-MM-dd}", model.CreateDate);
txtCreateMan.Text = Person_PersonsService.GetPersonsNameById(model.CreateMan);

View File

@ -255,6 +255,7 @@ namespace FineUIPro.Web.CLGL
var inoutplandetail = (from x in Funs.DB.Tw_InOutPlanDetail_Relation
//where x.InOutPlanMasterId == Id && x.PipelineId == this.tvControlItem.SelectedNodeID
where x.PipelineId == this.tvControlItem.SelectedNodeID
&& (x.PrefabricatedComponents == null || x.PrefabricatedComponents == "")
select x).ToList();
// 优化 Linq 过滤条件

View File

@ -304,6 +304,11 @@ namespace FineUIPro.Web.CLGL
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
/// <summary>
/// 生成退料通知单
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnGenInPlanMaster_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.Tw_OutputMasterMenuId, Const.BtnModify))
@ -329,7 +334,11 @@ namespace FineUIPro.Web.CLGL
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
}
}
/// <summary>
/// 生成补料通知单
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnGenOutPlanMaster_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.Tw_OutputMasterMenuId, Const.BtnModify))

View File

@ -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/05/2024 15:40:34" ReportInfo.CreatorVersion="2017.1.16.0">
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="02/14/2025 15:25:56" 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/9ZLpp1NuxWRFZYev4O4t/luX5wZaXxxBH"/>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRFMchzse3CjVTAfySORKU+B"/>
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true">
<Column Name="pipelineCode" DataType="System.String" PropName="PipelineComponentId"/>
<Column Name="Mat" DataType="System.String" PropName="PipelineComponentCode"/>

View File

@ -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/20/2024 20:21:18" ReportInfo.CreatorVersion="2017.1.16.0">
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="02/17/2025 14:06:06" 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/9ZLpp1NuxWRFnv70ikz3Acipe8KbCgMqz"/>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRGiO7cTLPe8v5xBwmG3HQEl"/>
<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"/>

View File

@ -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/20/2024 20:20:57" ReportInfo.CreatorVersion="2017.1.16.0">
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="02/14/2025 15:25:26" 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/9ZLpp1NuxWRE1ChH6wUKa5kJPPhfRyqPI"/>
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRHphOkRPB8TewDYcFP4HzUI"/>
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true">
<Column Name="PipelineComponentId" DataType="System.String"/>
<Column Name="PipelineComponentCode" DataType="System.String"/>

View File

@ -360,6 +360,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
hJGL_Pipeline_ComponentJoint.PipelineComponentId = item.PipelineComponentId;
hJGL_Pipeline_ComponentJoint.WeldJointCode = joint.WeldJointCode;
hJGL_Pipeline_ComponentJoint.WeldJointId=joint.WeldJointId;
hJGL_Pipeline_ComponentJoint.State = 0;
HJGL_PipelineComponentjointService.AddHJGL_Pipeline_ComponentJoint(hJGL_Pipeline_ComponentJoint);
}

View File

@ -235,7 +235,7 @@ 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,x.SerialNumber, x.PipeLineSortIndex }).Distinct().ToList().OrderBy(x => x.PipeLineSortIndex);
select new { x.TaskDate.Value.Date, x.UnitId,x.SerialNumber }).Distinct().ToList().OrderBy(x => x.SerialNumber);
if (p.Count() > 0)
{
foreach (var item in p)
@ -255,7 +255,7 @@ 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, x.SerialNumber ,x.PipeLineSortIndex}).Distinct().ToList().OrderBy(x => x.PipeLineSortIndex);
select new { x.TaskDate.Value.Date, x.UnitId, x.SerialNumber }).Distinct().ToList().OrderBy(x => x.SerialNumber);
if (p.Count() > 0)
{
foreach (var item in p)
@ -282,7 +282,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
if (!string.IsNullOrEmpty(this.txtPipelineCode.Text.Trim()))
{
weldingTask = weldingTask.Where(e => e.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())).ToList();
weldingTask = weldingTask.Where(e => e.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())).OrderBy(x=>x.PipeLineSortIndex).ToList();
}
DataTable tb = this.LINQToDataTable(weldingTask);
@ -1223,7 +1223,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, tvControlItem.SelectedNodeID.Split('|')[3]).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]).OrderBy(z=>z.PipeLineSortIndex).Select(x => x.PipelineId).Distinct().ToList();
if (pipelines.Any())
{
@ -1277,7 +1277,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
this.BindGrid(GetWeldingTaskList);
}
}
/// <summary>
/// 生成出库申请单
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnGenOutPlanMaster_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
@ -1354,7 +1358,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
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, tvControlItem.SelectedNodeID.Split('|')[3]);
var pipelines = weldTaskList.Select(x => x.PipelineId).Distinct().ToList();
var pipelines = weldTaskList.OrderBy(x=>x.PipeLineSortIndex).Select(x => x.PipelineId).Distinct().ToList();
if (pipelines.Any())
{

View File

@ -19,6 +19,7 @@ namespace Model
public string ReqUnitName { get; set; }
public string UnitWorkId { get; set; }
public string WeldTaskCode { get; set; }
public string Remark { get; set; }
public int? PipeLineSortIndex { get; set; }
}