提交代码
This commit is contained in:
@@ -524,49 +524,49 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// <param name="e"></param>
|
||||
protected void btnAutoInput_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpUnit.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
ShowNotify("请选择工艺规程编制单位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
|
||||
{
|
||||
var jotList = from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == tvControlItem.SelectedNodeID && x.WPQId == null && x.IsTwoJoint == true select x;
|
||||
if (jotList.Count() > 0)
|
||||
{
|
||||
foreach (var jot in jotList)
|
||||
{
|
||||
List<Model.View_HJGL_WPQ> wpqList = BLL.WPQListServiceService.GetMatchWPQ(jot, this.CurrUser.LoginProjectId, drpUnit.SelectedValue);
|
||||
if (wpqList != null)
|
||||
{
|
||||
Model.HJGL_WeldJoint newJot = WeldJointService.GetWeldJointByWeldJointId(jot.WeldJointId);
|
||||
Model.WPQ_WPQList wps = new Model.WPQ_WPQList();
|
||||
var a = wpqList.FirstOrDefault(x => x.WeldingMethodId == "feb1234c-a538-476f-99ac-7b3ab15997c1"); //优先匹配GTAW+SMAW的焊评
|
||||
if (a == null)
|
||||
{
|
||||
wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId);
|
||||
}
|
||||
else
|
||||
{
|
||||
wps = BLL.WPQListServiceService.GetWPQById(a.WPQId);
|
||||
}
|
||||
//if (this.drpUnit.SelectedValue == BLL.Const._Null)
|
||||
//{
|
||||
// ShowNotify("请选择工艺规程编制单位!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
//if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
|
||||
//{
|
||||
// var jotList = from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == tvControlItem.SelectedNodeID && x.WPQId == null && x.IsTwoJoint == true select x;
|
||||
// if (jotList.Count() > 0)
|
||||
// {
|
||||
// foreach (var jot in jotList)
|
||||
// {
|
||||
// List<Model.View_HJGL_WPQ> wpqList = BLL.WPQListServiceService.GetMatchWPQ(jot, this.CurrUser.LoginProjectId, drpUnit.SelectedValue);
|
||||
// if (wpqList != null)
|
||||
// {
|
||||
// Model.HJGL_WeldJoint newJot = WeldJointService.GetWeldJointByWeldJointId(jot.WeldJointId);
|
||||
// Model.WPQ_WPQList wps = new Model.WPQ_WPQList();
|
||||
// var a = wpqList.FirstOrDefault(x => x.WeldingMethodId == "feb1234c-a538-476f-99ac-7b3ab15997c1"); //优先匹配GTAW+SMAW的焊评
|
||||
// if (a == null)
|
||||
// {
|
||||
// wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// wps = BLL.WPQListServiceService.GetWPQById(a.WPQId);
|
||||
// }
|
||||
|
||||
newJot.WPQId = wps.WPQId;
|
||||
newJot.WeldJointId = jot.WeldJointId;
|
||||
newJot.WeldingRod = wps.WeldingRod;
|
||||
newJot.WeldingWire = wps.WeldingWire;
|
||||
newJot.WeldingMethodId = wps.WeldingMethodId;
|
||||
newJot.GrooveTypeId = wps.GrooveType;
|
||||
newJot.PreTemperature = wps.PreTemperature;
|
||||
newJot.IsHotProess = wps.IsHotProess;
|
||||
newJot.MatchableWPQ = string.Join(",", wpqList.Select(x => x.WPQCode));
|
||||
BLL.WeldJointService.UpdateConWeldJoint(newJot);
|
||||
}
|
||||
}
|
||||
}
|
||||
BindGrid();
|
||||
ShowNotify("该管线焊口已完成自动录入!", MessageBoxIcon.Success);
|
||||
}
|
||||
// newJot.WPQId = wps.WPQId;
|
||||
// newJot.WeldJointId = jot.WeldJointId;
|
||||
// newJot.WeldingRod = wps.WeldingRod;
|
||||
// newJot.WeldingWire = wps.WeldingWire;
|
||||
// newJot.WeldingMethodId = wps.WeldingMethodId;
|
||||
// newJot.GrooveTypeId = wps.GrooveType;
|
||||
// newJot.PreTemperature = wps.PreTemperature;
|
||||
// newJot.IsHotProess = wps.IsHotProess;
|
||||
// newJot.MatchableWPQ = string.Join(",", wpqList.Select(x => x.WPQCode));
|
||||
// BLL.WeldJointService.UpdateConWeldJoint(newJot);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// BindGrid();
|
||||
// ShowNotify("该管线焊口已完成自动录入!", MessageBoxIcon.Success);
|
||||
//}
|
||||
}
|
||||
/// <summary>
|
||||
/// 焊口信息编辑
|
||||
@@ -609,6 +609,52 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
BLL.WeldJointService.UpdateJointAudit(jot, CurrUser.PersonId, DateTime.Now);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
|
||||
{
|
||||
var jotList = from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == tvControlItem.SelectedNodeID && x.WPQId == null && x.IsTwoJoint == true select x;
|
||||
if (jotList.Count() > 0)
|
||||
{
|
||||
foreach (var jot in jotList)
|
||||
{
|
||||
string unitId = string.Empty;
|
||||
Model.Person_Persons person = BLL.Person_PersonsService.GetPerson_PersonsById(jot.SubmitMan);
|
||||
if (person != null)
|
||||
{
|
||||
unitId = person.UnitId;
|
||||
}
|
||||
List<Model.View_HJGL_WPQ> wpqList = BLL.WPQListServiceService.GetMatchWPQ(jot, this.CurrUser.LoginProjectId, unitId);
|
||||
if (wpqList != null)
|
||||
{
|
||||
Model.HJGL_WeldJoint newJot = WeldJointService.GetWeldJointByWeldJointId(jot.WeldJointId);
|
||||
Model.WPQ_WPQList wps = new Model.WPQ_WPQList();
|
||||
var a = wpqList.FirstOrDefault(x => x.WeldingMethodId == "feb1234c-a538-476f-99ac-7b3ab15997c1"); //优先匹配GTAW+SMAW的焊评
|
||||
if (a == null)
|
||||
{
|
||||
wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId);
|
||||
}
|
||||
else
|
||||
{
|
||||
wps = BLL.WPQListServiceService.GetWPQById(a.WPQId);
|
||||
}
|
||||
|
||||
newJot.WPQId = wps.WPQId;
|
||||
newJot.WeldJointId = jot.WeldJointId;
|
||||
newJot.WeldingRod = wps.WeldingRod;
|
||||
newJot.WeldingWire = wps.WeldingWire;
|
||||
newJot.WeldingMethodId = wps.WeldingMethodId;
|
||||
newJot.GrooveTypeId = wps.GrooveType;
|
||||
newJot.PreTemperature = wps.PreTemperature;
|
||||
newJot.IsHotProess = wps.IsHotProess;
|
||||
newJot.MatchableWPQ = string.Join(",", wpqList.Select(x => x.WPQCode));
|
||||
BLL.WeldJointService.UpdateConWeldJoint(newJot);
|
||||
}
|
||||
}
|
||||
}
|
||||
//BindGrid();
|
||||
//ShowNotify("该管线焊口已完成自动录入!", MessageBoxIcon.Success);
|
||||
}
|
||||
|
||||
ShowNotify("所选口审核成功!", MessageBoxIcon.Success);
|
||||
BindGrid();
|
||||
//string weldJointIdList = string.Join("|", Grid1.SelectedRowIDArray);
|
||||
|
||||
Reference in New Issue
Block a user