代码无效引用清理,试压包资料界面看板修改
This commit is contained in:
@@ -3,7 +3,6 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
|
||||
namespace BLL
|
||||
@@ -11,7 +10,7 @@ namespace BLL
|
||||
|
||||
public static class HJGL_PipelineComponentjointService
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
#region 获取列表
|
||||
@@ -31,7 +30,7 @@ namespace BLL
|
||||
(string.IsNullOrEmpty(table.PipelineComponentId) || x.PipelineComponentId.Contains(table.PipelineComponentId)) &&
|
||||
(string.IsNullOrEmpty(table.PipelineComponentCode) || x.PipelineComponentCode.Contains(table.PipelineComponentCode)) &&
|
||||
(string.IsNullOrEmpty(table.WeldJointId) || x.WeldJointId.Contains(table.WeldJointId)) &&
|
||||
(string.IsNullOrEmpty(table.WeldJointCode) || x.WeldJointCode.Contains(table.WeldJointCode))
|
||||
(string.IsNullOrEmpty(table.WeldJointCode) || x.WeldJointCode.Contains(table.WeldJointCode))
|
||||
select x
|
||||
;
|
||||
|
||||
@@ -120,13 +119,13 @@ namespace BLL
|
||||
/// 根据焊口号更改状态
|
||||
/// </summary>
|
||||
/// <param name="WeldJointId"></param>
|
||||
public static void UpdateStateByWeldJointId(string WeldJointId,DateTime TaskDate)
|
||||
public static void UpdateStateByWeldJointId(string WeldJointId, DateTime TaskDate)
|
||||
{
|
||||
|
||||
Model.HJGL_Pipeline_ComponentJoint table = Funs.DB.HJGL_Pipeline_ComponentJoint.FirstOrDefault(x => x.WeldJointId == WeldJointId);
|
||||
if (table != null)
|
||||
{
|
||||
table.State =1;
|
||||
{
|
||||
table.State = 1;
|
||||
Funs.DB.SubmitChanges();
|
||||
GetProductionByPipelineComponentId(table.PipelineComponentId, TaskDate);
|
||||
}
|
||||
@@ -134,10 +133,10 @@ namespace BLL
|
||||
}
|
||||
public static void GetProductionByPipelineComponentId(string PipelineComponentId, DateTime TaskDate)
|
||||
{
|
||||
var q = Funs.DB.HJGL_Pipeline_ComponentJoint.Where(x => x.PipelineComponentId == PipelineComponentId).ToList();
|
||||
if (q.Count!=0)
|
||||
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||x.State ==null 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) //全部完成
|
||||
{
|
||||
@@ -154,10 +153,10 @@ namespace BLL
|
||||
HJGL_PipelineComponentService.UpdateProductionState(PipelineComponentId, 1, TaskDate);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static void DeleteHJGL_Pipeline_ComponentJointById(string Id)
|
||||
{
|
||||
|
||||
@@ -172,7 +171,7 @@ namespace BLL
|
||||
public static void DeleteHJGL_Pipeline_ComponentJointByPipelineComponentId(string PipelineComponentId)
|
||||
{
|
||||
|
||||
var table = Funs.DB.HJGL_Pipeline_ComponentJoint.Where(x => x.PipelineComponentId == PipelineComponentId);
|
||||
var table = Funs.DB.HJGL_Pipeline_ComponentJoint.Where(x => x.PipelineComponentId == PipelineComponentId);
|
||||
if (table != null)
|
||||
{
|
||||
Funs.DB.HJGL_Pipeline_ComponentJoint.DeleteAllOnSubmit(table);
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
@@ -15,7 +10,7 @@ namespace BLL
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="type">0总达因,1预制口总达因,2安装口总达因</param>
|
||||
/// <returns></returns>
|
||||
public static decimal GetSumSize(string projectId,int type)
|
||||
public static decimal GetSumSize(string projectId, int type)
|
||||
{
|
||||
decimal result = 0;
|
||||
|
||||
@@ -42,7 +37,7 @@ namespace BLL
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -56,7 +51,7 @@ namespace BLL
|
||||
var getWelds = Funs.DB.HJGL_WeldJoint.Where(x => x.ProjectId == projectId);
|
||||
if (getWelds.Count() > 0)
|
||||
{
|
||||
|
||||
|
||||
var getWeldsOk = getWelds.Where(x => x.WeldingDailyId != null);
|
||||
if (getWeldsOk.Count() > 0)
|
||||
{
|
||||
@@ -64,9 +59,9 @@ namespace BLL
|
||||
if (GCModel.Count() > 0)
|
||||
{
|
||||
result = GCModel.Sum(x => x.Size ?? 0);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
return result;
|
||||
@@ -146,23 +141,23 @@ namespace BLL
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static decimal GetWelderEfficacy(string projectId)
|
||||
public static decimal GetWelderEfficacy(string projectId)
|
||||
{
|
||||
decimal result = 0;
|
||||
var db = Funs.DB;
|
||||
var q = (from x in db.HJGL_WeldJoint
|
||||
join y in db.HJGL_WeldingDaily on x.WeldingDailyId equals y.WeldingDailyId
|
||||
where x.ProjectId ==projectId
|
||||
where x.ProjectId == projectId
|
||||
group x by x.ProjectId into g
|
||||
select new
|
||||
select new
|
||||
{
|
||||
TotalDin = g.Sum(x => x.Size),
|
||||
worktime = g.Select(x=>x.WeldingDailyId).Distinct().Count(),
|
||||
}) ;
|
||||
worktime = g.Select(x => x.WeldingDailyId).Distinct().Count(),
|
||||
});
|
||||
foreach (var item in q)
|
||||
{
|
||||
result = decimal.Divide((decimal)item.TotalDin, item.worktime) ;
|
||||
|
||||
result = decimal.Divide((decimal)item.TotalDin, item.worktime);
|
||||
|
||||
}
|
||||
|
||||
return decimal.Truncate(result);
|
||||
@@ -173,7 +168,7 @@ namespace BLL
|
||||
var db = Funs.DB;
|
||||
var q = (from x in db.HJGL_WeldJoint
|
||||
join y in db.HJGL_WeldingDaily on x.WeldingDailyId equals y.WeldingDailyId
|
||||
where x.ProjectId == projectId && x.JointAttribute=="预制口"
|
||||
where x.ProjectId == projectId && x.JointAttribute == "预制口"
|
||||
group x by x.ProjectId into g
|
||||
select new
|
||||
{
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
using Model;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
@@ -33,7 +31,7 @@ namespace BLL
|
||||
/// 已装箱
|
||||
/// </summary>
|
||||
public static int State2 = 2;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取状态名称
|
||||
@@ -44,9 +42,9 @@ namespace BLL
|
||||
ListItem[] list = new ListItem[5];
|
||||
list[0] = new ListItem("未验收", State0.ToString());
|
||||
list[1] = new ListItem("已验收", State1.ToString());
|
||||
list[2] = new ListItem("已出库", State2.ToString());
|
||||
list[3] = new ListItem("待整改", StatePenRec.ToString());
|
||||
list[4] = new ListItem("已整改", StateRec.ToString());
|
||||
list[2] = new ListItem("已出库", State2.ToString());
|
||||
list[3] = new ListItem("待整改", StatePenRec.ToString());
|
||||
list[4] = new ListItem("已整改", StateRec.ToString());
|
||||
return list;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -72,7 +70,7 @@ namespace BLL
|
||||
}
|
||||
public static Model.HJGL_Pipeline_Component GetPipelineComponentByCodeandpipelineId(string pipelineComponentCode, string pipelineId)
|
||||
{
|
||||
var q = Funs.DB.HJGL_Pipeline_Component.FirstOrDefault(x => x.PipelineComponentCode == pipelineComponentCode && x.PipelineId == pipelineId);
|
||||
var q = Funs.DB.HJGL_Pipeline_Component.FirstOrDefault(x => x.PipelineComponentCode == pipelineComponentCode && x.PipelineId == pipelineId);
|
||||
return q;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -121,7 +119,7 @@ namespace BLL
|
||||
|
||||
query = query.OrderBy(x => x.PrefabricatedComponents);
|
||||
|
||||
|
||||
|
||||
return query.ToList();
|
||||
}
|
||||
/// <summary>
|
||||
@@ -136,7 +134,7 @@ namespace BLL
|
||||
from libItem in libJoin.DefaultIfEmpty()
|
||||
join line in Funs.DB.HJGL_Pipeline on pipe.PipelineId equals line.PipelineId into lineJoin
|
||||
from lineItem in lineJoin.DefaultIfEmpty()
|
||||
where lineItem != null && lineItem.PipeArea == "1"
|
||||
where lineItem != null && lineItem.PipeArea == "1"
|
||||
&& (pipe.PrefabricatedComponents == null || pipe.PrefabricatedComponents == "")
|
||||
select new PipelinePrefabricatedComponentsItem
|
||||
{
|
||||
@@ -159,7 +157,7 @@ namespace BLL
|
||||
|
||||
query = query.OrderBy(x => x.PrefabricatedComponents);
|
||||
|
||||
var inoutplandetail = (from x in Funs.DB.HJGL_PackagingManageDetail
|
||||
var inoutplandetail = (from x in Funs.DB.HJGL_PackagingManageDetail
|
||||
where x.PipelineId == pipelineId
|
||||
&& (x.PipelineComponentId == null || x.PipelineComponentId == "")
|
||||
select x).ToList();
|
||||
@@ -278,22 +276,22 @@ namespace BLL
|
||||
var model_mat = BLL.PipelineMatService.GetPipeLineMat(pipeLineMatId);
|
||||
var PipelineId = model_mat.PipelineId;
|
||||
var PipeArea = BLL.PipelineService.GetPipelineByPipelineId(PipelineId).PipeArea;
|
||||
if (PipeArea=="1" &&!string.IsNullOrEmpty(model_mat.PrefabricatedComponents))
|
||||
if (PipeArea == "1" && !string.IsNullOrEmpty(model_mat.PrefabricatedComponents))
|
||||
{
|
||||
// var model = GetPipelineComponentByMatId(pipeLineMatId);
|
||||
var model = GetPipelineComponentByCodeandpipelineId(model_mat.PrefabricatedComponents,PipelineId);
|
||||
if (model!=null)
|
||||
// var model = GetPipelineComponentByMatId(pipeLineMatId);
|
||||
var model = GetPipelineComponentByCodeandpipelineId(model_mat.PrefabricatedComponents, PipelineId);
|
||||
if (model != null)
|
||||
{
|
||||
model.PipelineId = PipelineId;
|
||||
model.PipelineComponentCode = model_mat.PrefabricatedComponents;
|
||||
model.DrawingName = model_mat.PrefabricatedComponents.Substring(0, model_mat.PrefabricatedComponents.LastIndexOf('-')).Replace("\"", "");
|
||||
model.DrawingName = model_mat.PrefabricatedComponents.Substring(0, model_mat.PrefabricatedComponents.LastIndexOf('-')).Replace("\"", "");
|
||||
model.State = State0;
|
||||
model.ProductionState = 0;
|
||||
UpdatePipelineComponent(model);
|
||||
}
|
||||
else
|
||||
{
|
||||
model=new Model.HJGL_Pipeline_Component();
|
||||
model = new Model.HJGL_Pipeline_Component();
|
||||
model.PipelineComponentId = SQLHelper.GetNewID();
|
||||
model.PipelineId = PipelineId;
|
||||
model.PipelineComponentCode = model_mat.PrefabricatedComponents;
|
||||
@@ -326,17 +324,17 @@ namespace BLL
|
||||
newPipeline.BoxNumber = pipeline.BoxNumber;
|
||||
newPipeline.AssembleUnit = pipeline.AssembleUnit;
|
||||
newPipeline.PipeLineMatId = pipeline.PipeLineMatId;
|
||||
newPipeline.State= pipeline.State;
|
||||
newPipeline.QRCode= pipeline.QRCode;
|
||||
newPipeline.State = pipeline.State;
|
||||
newPipeline.QRCode = pipeline.QRCode;
|
||||
newPipeline.PlanStartDate = pipeline.PlanStartDate;
|
||||
newPipeline.PlanEndDate = pipeline.PlanEndDate;
|
||||
newPipeline.ActStartDate = pipeline.ActStartDate;
|
||||
newPipeline.ActEndDate = pipeline.ActEndDate;
|
||||
newPipeline.DrawingName = pipeline.DrawingName;
|
||||
newPipeline.ReceiveMan= pipeline.ReceiveMan;
|
||||
newPipeline.ReceiveDate= pipeline.ReceiveDate;
|
||||
newPipeline.ProductionState= pipeline.ProductionState;
|
||||
newPipeline.IsPrint= pipeline.IsPrint;
|
||||
newPipeline.ReceiveMan = pipeline.ReceiveMan;
|
||||
newPipeline.ReceiveDate = pipeline.ReceiveDate;
|
||||
newPipeline.ProductionState = pipeline.ProductionState;
|
||||
newPipeline.IsPrint = pipeline.IsPrint;
|
||||
newPipeline.Remark = pipeline.Remark;
|
||||
db.HJGL_Pipeline_Component.InsertOnSubmit(newPipeline);
|
||||
db.SubmitChanges();
|
||||
@@ -368,7 +366,7 @@ namespace BLL
|
||||
newPipeline.ReceiveMan = pipeline.ReceiveMan;
|
||||
newPipeline.ReceiveDate = pipeline.ReceiveDate;
|
||||
newPipeline.ProductionState = pipeline.ProductionState;
|
||||
newPipeline.IsPrint=pipeline.IsPrint;
|
||||
newPipeline.IsPrint = pipeline.IsPrint;
|
||||
newPipeline.Remark = pipeline.Remark;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
@@ -378,17 +376,17 @@ namespace BLL
|
||||
/// </summary>
|
||||
/// <param name="pipelineComponentId"></param>
|
||||
/// <param name="BoxNumber"></param>
|
||||
public static void UpdateOutState(string pipelineComponentId,string BoxNumber)
|
||||
public static void UpdateOutState(string pipelineComponentId, string BoxNumber)
|
||||
{
|
||||
var q=GetPipelineComponentById(pipelineComponentId);
|
||||
if (q.State==State1)
|
||||
var q = GetPipelineComponentById(pipelineComponentId);
|
||||
if (q.State == State1)
|
||||
{
|
||||
q.State = State2;
|
||||
q.BoxNumber=BoxNumber;
|
||||
q.BoxNumber = BoxNumber;
|
||||
UpdatePipelineComponent(q);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 修改组件打印状态
|
||||
@@ -416,22 +414,22 @@ namespace BLL
|
||||
public static void UpdateProductionState(string pipelineComponentId, int state, DateTime TaskDate)
|
||||
{
|
||||
var q = GetPipelineComponentById(pipelineComponentId);
|
||||
if (q!=null)
|
||||
if (q != null)
|
||||
{
|
||||
q.ProductionState = state;
|
||||
if (state==2)
|
||||
if (state == 2)
|
||||
{
|
||||
q.ActEndDate = TaskDate;
|
||||
}
|
||||
else if(state==1)
|
||||
else if (state == 1)
|
||||
{
|
||||
if (q.ActStartDate ==null)
|
||||
if (q.ActStartDate == null)
|
||||
{
|
||||
q.ActStartDate = TaskDate;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (DateTime.Compare(TaskDate,q.ActStartDate.Value) < 0)
|
||||
if (DateTime.Compare(TaskDate, q.ActStartDate.Value) < 0)
|
||||
{
|
||||
q.ActStartDate = TaskDate;
|
||||
}
|
||||
@@ -494,13 +492,13 @@ namespace BLL
|
||||
/// <param name="pipelineComponentCode"></param>
|
||||
/// <returns></returns>
|
||||
public static List<HJGL_Pipeline_Component> GetAcceptedPipelineComponent(string projectId, string pipelineCode,
|
||||
string pipelineComponentCode,string flowingSection)
|
||||
string pipelineComponentCode, string flowingSection)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = (from x in db.HJGL_Pipeline_Component
|
||||
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
|
||||
where y.ProjectId.Contains(projectId) && x.State.Equals(State1) &&
|
||||
(string.IsNullOrEmpty(pipelineCode) || y.PipelineCode.Contains(pipelineCode)) &&
|
||||
(string.IsNullOrEmpty(pipelineCode) || y.PipelineCode.Contains(pipelineCode)) &&
|
||||
(string.IsNullOrEmpty(pipelineComponentCode) || x.PipelineComponentCode.Contains(pipelineComponentCode)) &&
|
||||
(string.IsNullOrEmpty(flowingSection) || y.FlowingSection.Contains(flowingSection))
|
||||
select x).ToList();
|
||||
@@ -513,7 +511,7 @@ namespace BLL
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = (from x in db.HJGL_Pipeline_Component
|
||||
where x.PipelineId == PipelineId
|
||||
select x).OrderBy(x=>x.PlanStartDate).ToList();
|
||||
select x).OrderBy(x => x.PlanStartDate).ToList();
|
||||
return q;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Microsoft.Office.Interop.Word;
|
||||
using MiniExcelLibs;
|
||||
using MiniExcelLibs;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -7,10 +6,7 @@ using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web.UI.DataVisualization.Charting;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Windows.Media.Animation;
|
||||
using static BLL.PipelineService;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
@@ -258,7 +254,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_Pipeline GetPipelineByPipelineCode(string projectId, string pipelineCode)
|
||||
{
|
||||
return Funs.DB.HJGL_Pipeline.FirstOrDefault(e => e.PipelineCode == pipelineCode&&e.ProjectId==projectId );
|
||||
return Funs.DB.HJGL_Pipeline.FirstOrDefault(e => e.PipelineCode == pipelineCode && e.ProjectId == projectId);
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据管线信息筛选管线
|
||||
@@ -624,7 +620,7 @@ namespace BLL
|
||||
newPipeline.FlowingSection = pipeline.FlowingSection;
|
||||
db.HJGL_Pipeline.InsertOnSubmit(newPipeline);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
using Model;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Numerics;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
@@ -32,12 +29,12 @@ namespace BLL
|
||||
///获取焊接任务单编号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static string GetTaskCodeByDate(string projectId, string date,string unitworkid,string unitid)
|
||||
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.UnitWorkId== unitworkid && x.UnitId== unitid && x.TaskDate == Convert.ToDateTime(date) orderby x.TaskCode descending select x.TaskCode).Distinct().ToList();
|
||||
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;
|
||||
code = date + "-" + (count + 1).ToString("D3") + UnitService.GetUnitCodeByUnitId(unitid) + "-" + UnitWorkService.getUnitWorkByUnitWorkId(unitworkid)?.UnitWorkCode;
|
||||
/*if (list.Count > 0)
|
||||
{
|
||||
string oldCode = list[0];
|
||||
@@ -74,26 +71,26 @@ namespace BLL
|
||||
|
||||
public static string GetSerialNumberByDate(string projectId, string date, string unitworkid, string unitid)
|
||||
{
|
||||
string code = string.Empty;
|
||||
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");
|
||||
code = (count + 1).ToString("D3");
|
||||
return code;
|
||||
}
|
||||
public static string GetSerialNumberByDate(string projectId,string taskCode)
|
||||
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();
|
||||
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<Model.View_HJGL_WeldingTask> GetWeldingTaskList(string ProjectId, string UnitWorkId, string unitId, DateTime taskDate, string canWelder,string serialNumber)
|
||||
public static List<Model.View_HJGL_WeldingTask> 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
|
||||
select x;
|
||||
|
||||
if (!string.IsNullOrEmpty(unitId))
|
||||
@@ -173,8 +170,8 @@ namespace BLL
|
||||
newWeldTask.TableDate = WeldTask.TableDate;
|
||||
newWeldTask.WeldingMode = WeldTask.WeldingMode;
|
||||
newWeldTask.IsSaved = WeldTask.IsSaved;
|
||||
newWeldTask.SerialNumber= WeldTask.SerialNumber;
|
||||
newWeldTask.PipeLineSortIndex= WeldTask.PipeLineSortIndex;
|
||||
newWeldTask.SerialNumber = WeldTask.SerialNumber;
|
||||
newWeldTask.PipeLineSortIndex = WeldTask.PipeLineSortIndex;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
using Aspose.Words;
|
||||
using Model;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using WIA;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
@@ -47,29 +45,29 @@ namespace BLL
|
||||
{
|
||||
List<Model.SpWeldingDailyItem> returnViewMatch = new List<Model.SpWeldingDailyItem>();
|
||||
var weldlineLists = (from x in Funs.DB.View_HJGL_WeldJoint
|
||||
where x.WeldingDailyId == weldingDailyId
|
||||
select new SpWeldingDailyItem
|
||||
{
|
||||
WeldJointId = x.WeldJointId,
|
||||
WeldJointCode = x.WeldJointCode,
|
||||
PipelineCode = x.PipelineCode,
|
||||
CoverWelderCode = x.CoverWelderCode,
|
||||
CoverWelderId = x.CoverWelderId,
|
||||
BackingWelderCode = x.BackingWelderCode,
|
||||
BackingWelderId = x.BackingWelderId,
|
||||
WeldTypeId = x.WeldTypeCode,
|
||||
JointArea = x.JointArea,
|
||||
WeldingLocationId = x.WeldingLocationId,
|
||||
WeldingLocationCode = x.WeldingLocationCode,
|
||||
JointAttribute = x.JointAttribute,
|
||||
Size = x.Size,
|
||||
Dia = x.Dia,
|
||||
Thickness = x.Thickness,
|
||||
WeldingMethodCode = x.WeldingMethodCode,
|
||||
WeldingWireCode = x.WeldingWireCode,
|
||||
WeldingRodCode = x.WeldingRodCode
|
||||
where x.WeldingDailyId == weldingDailyId
|
||||
select new SpWeldingDailyItem
|
||||
{
|
||||
WeldJointId = x.WeldJointId,
|
||||
WeldJointCode = x.WeldJointCode,
|
||||
PipelineCode = x.PipelineCode,
|
||||
CoverWelderCode = x.CoverWelderCode,
|
||||
CoverWelderId = x.CoverWelderId,
|
||||
BackingWelderCode = x.BackingWelderCode,
|
||||
BackingWelderId = x.BackingWelderId,
|
||||
WeldTypeId = x.WeldTypeCode,
|
||||
JointArea = x.JointArea,
|
||||
WeldingLocationId = x.WeldingLocationId,
|
||||
WeldingLocationCode = x.WeldingLocationCode,
|
||||
JointAttribute = x.JointAttribute,
|
||||
Size = x.Size,
|
||||
Dia = x.Dia,
|
||||
Thickness = x.Thickness,
|
||||
WeldingMethodCode = x.WeldingMethodCode,
|
||||
WeldingWireCode = x.WeldingWireCode,
|
||||
WeldingRodCode = x.WeldingRodCode
|
||||
|
||||
}).ToList();
|
||||
}).ToList();
|
||||
returnViewMatch = weldlineLists;
|
||||
//if (weldlineLists.Count() > 0)
|
||||
//{
|
||||
@@ -409,7 +407,7 @@ namespace BLL
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
var WeldingDailyCode = (from x in Funs.DB.HJGL_WeldingDaily
|
||||
where x.WeldingDailyId == WeldingDailyId
|
||||
where x.WeldingDailyId == WeldingDailyId
|
||||
select x.WeldingDailyCode).FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(WeldingDailyCode))
|
||||
{
|
||||
@@ -417,7 +415,7 @@ namespace BLL
|
||||
}
|
||||
return value;
|
||||
}
|
||||
public static Dictionary<string, object> GetFileOutValueByUnitWorkId(string UnitWorkId,string Month)
|
||||
public static Dictionary<string, object> GetFileOutValueByUnitWorkId(string UnitWorkId, string Month)
|
||||
{
|
||||
var value = new Dictionary<string, object>();
|
||||
var p = from x in Funs.DB.HJGL_WeldingDaily
|
||||
@@ -435,7 +433,7 @@ namespace BLL
|
||||
|
||||
}
|
||||
}
|
||||
return value;
|
||||
return value;
|
||||
}
|
||||
#region 焊接日报下拉项
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user