20230221焊接修改
This commit is contained in:
@@ -132,11 +132,11 @@ namespace BLL
|
||||
lib.MaterialMade,
|
||||
-sum( pipe.Number) AS num
|
||||
FROM dbo.HJGL_PipeLineMat pipe
|
||||
LEFT JOIN HJGL_Pipeline_ComponentJoint comjoint
|
||||
ON comjoint.PipelineComponentCode =pipe.PrefabricatedComponents
|
||||
LEFT JOIN HJGL_Pipeline_Component com
|
||||
ON com.PipelineComponentCode =pipe.PrefabricatedComponents
|
||||
LEFT JOIN HJGL_MaterialCodeLib lib
|
||||
ON lib.MaterialCode = pipe.MaterialCode
|
||||
WHERE comjoint.State=1
|
||||
WHERE com.ProductionState=1
|
||||
GROUP BY lib.MaterialCode,lib.MaterialName,lib.MaterialUnit, lib.MaterialSpec,lib.MaterialMade
|
||||
UNION
|
||||
SELECT lib.MaterialCode,
|
||||
|
||||
@@ -14,6 +14,11 @@ namespace BLL
|
||||
{
|
||||
return Funs.DB.HJGL_YardPlanning.FirstOrDefault(e => e.YardPlanningId == YardPlanningId);
|
||||
}
|
||||
public static List<Model.HJGL_YardPlanning> GetHJGL_YardPlanningBySurperId(string SurperId)
|
||||
{
|
||||
var q= (from x in Funs.DB.HJGL_YardPlanning where x.SurperId== SurperId select x ) .ToList();
|
||||
return q;
|
||||
}
|
||||
public static Model.HJGL_YardPlanning GetHJGL_YardPlanningByProjectId(string projectId,string unitworkid)
|
||||
|
||||
{
|
||||
@@ -44,7 +49,15 @@ namespace BLL
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
public static void SavePic(string YardPlanningId, string imgurl)
|
||||
{
|
||||
var model = Funs.DB.HJGL_YardPlanning.FirstOrDefault(e => e.YardPlanningId== YardPlanningId);
|
||||
if (model != null)
|
||||
{
|
||||
model.FlowChartPic = imgurl;
|
||||
UpdateHJGL_YardPlanning(model);
|
||||
}
|
||||
}
|
||||
public static void AddHJGL_YardPlanning(Model.HJGL_YardPlanning newtable)
|
||||
{
|
||||
Model.HJGL_YardPlanning table = new Model.HJGL_YardPlanning();
|
||||
@@ -53,6 +66,8 @@ namespace BLL
|
||||
table.Remark = newtable.Remark;
|
||||
table.FlowChartPic = newtable.FlowChartPic;
|
||||
table.UnitWorkId = newtable.UnitWorkId;
|
||||
table.YardPlanName=newtable.YardPlanName;
|
||||
table.SurperId = newtable.SurperId;
|
||||
Funs.DB.HJGL_YardPlanning.InsertOnSubmit(table);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
@@ -69,6 +84,8 @@ namespace BLL
|
||||
table.Remark = newtable.Remark;
|
||||
table.FlowChartPic = newtable.FlowChartPic;
|
||||
table.UnitWorkId = newtable.UnitWorkId;
|
||||
table.YardPlanName = newtable.YardPlanName;
|
||||
table.SurperId = newtable.SurperId;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
@@ -83,6 +100,31 @@ namespace BLL
|
||||
}
|
||||
|
||||
}
|
||||
public static void DeleteHJGL_YardPlanningBySurperId(string SurperId)
|
||||
{
|
||||
var q= GetHJGL_YardPlanningBySurperId(SurperId);
|
||||
if (q.Count >0)
|
||||
{
|
||||
Funs.DB.HJGL_YardPlanning.DeleteAllOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
public static void DleteAllById(string YardPlanningId)
|
||||
{
|
||||
var q = GetHJGL_YardPlanningById(YardPlanningId);
|
||||
var id = q.YardPlanningId;
|
||||
DeleteHJGL_YardPlanningById(YardPlanningId);
|
||||
var chirdList = GetHJGL_YardPlanningBySurperId(id);
|
||||
if (chirdList.Count>0)
|
||||
{
|
||||
foreach (var item in chirdList)
|
||||
{
|
||||
DleteAllById(item.YardPlanningId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -209,5 +209,6 @@ namespace BLL
|
||||
|
||||
return decimal.Truncate(result);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -290,5 +290,7 @@ namespace BLL
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -310,6 +310,15 @@ namespace BLL
|
||||
|
||||
return list;
|
||||
}
|
||||
public static List<Model.HJGL_WeldingDaily> GetPipelineDailyListByUnitWorkId(string UnitWorkId)
|
||||
{
|
||||
var list = (from x in Funs.DB.HJGL_WeldingDaily
|
||||
where x.UnitWorkId == UnitWorkId
|
||||
orderby x.WeldingDailyCode
|
||||
select x).ToList();
|
||||
|
||||
return list;
|
||||
}
|
||||
public static Dictionary<string, object> GetFileOutValueById(string WeldingDailyId)
|
||||
{
|
||||
var value = new Dictionary<string, object>();
|
||||
@@ -375,7 +384,7 @@ namespace BLL
|
||||
/// <param name="dropName">下拉框名称</param>
|
||||
/// <param name="isShowPlease">是否显示请选择</param>
|
||||
/// <param name="WeldingDailyType">耗材类型</param>
|
||||
public static void InitWeldingDailyDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease, string unitId)
|
||||
public static void InitDropDownListByUnitId(FineUIPro.DropDownList dropName, bool isShowPlease, string unitId)
|
||||
{
|
||||
dropName.DataValueField = "WeldingDailyId";
|
||||
dropName.DataTextField = "WeldingDailyCode";
|
||||
@@ -386,6 +395,17 @@ namespace BLL
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
public static void InitDownListByUnitWortId(FineUIPro.DropDownList dropName, bool isShowPlease, string UnitWortId)
|
||||
{
|
||||
dropName.DataValueField = "WeldingDailyId";
|
||||
dropName.DataTextField = "WeldingDailyCode";
|
||||
dropName.DataSource = GetPipelineDailyListByUnitWorkId(UnitWortId);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user