2023-02-20 001 焊接修改

This commit is contained in:
2023-02-20 10:49:51 +08:00
parent 7e66339f48
commit ef6bbc170e
37 changed files with 1649 additions and 306 deletions
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.UI.WebControls;
@@ -18,6 +19,8 @@ namespace BLL
/// 已装箱
/// </summary>
public static int state_2 = 2;
public static ListItem[] GetState()
{
ListItem[] list = new ListItem[3];
@@ -26,6 +29,14 @@ namespace BLL
list[2] = new ListItem("已出库", state_2.ToString());
return list;
}
public static ListItem[] GetProductionState()
{
ListItem[] list = new ListItem[3];
list[0] = new ListItem("未开始", "0");
list[1] = new ListItem("已开始", "1");
list[2] = new ListItem("已完成", "2");
return list;
}
/// <summary>
/// 根据ID获取组件信息
/// </summary>
@@ -95,6 +106,7 @@ namespace BLL
model.PipelineComponentCode = model_mat.PrefabricatedComponents;
model.DrawingName = model_mat.PrefabricatedComponents.Substring(0, model_mat.PrefabricatedComponents.LastIndexOf('-')).Replace("\"", "");
model.State = state_0;
model.ProductionState = 0;
UpdatePipelineComponent(model);
}
else
@@ -105,6 +117,7 @@ namespace BLL
model.PipelineComponentCode = model_mat.PrefabricatedComponents;
model.DrawingName = model_mat.PrefabricatedComponents.Substring(0, model_mat.PrefabricatedComponents.LastIndexOf('-')).Replace("\"", "");
model.State = state_0;
model.ProductionState = 0;
AddPipelineComponent(model);
}
@@ -135,6 +148,7 @@ namespace BLL
newPipeline.DrawingName = pipeline.DrawingName;
newPipeline.ReceiveMan= pipeline.ReceiveMan;
newPipeline.ReceiveDate= pipeline.ReceiveDate;
newPipeline.ProductionState= pipeline.ProductionState;
db.HJGL_Pipeline_Component.InsertOnSubmit(newPipeline);
db.SubmitChanges();
}
@@ -164,6 +178,7 @@ namespace BLL
newPipeline.DrawingName = pipeline.DrawingName;
newPipeline.ReceiveMan = pipeline.ReceiveMan;
newPipeline.ReceiveDate = pipeline.ReceiveDate;
newPipeline.ProductionState = pipeline.ProductionState;
db.SubmitChanges();
}
@@ -179,6 +194,40 @@ namespace BLL
}
}
/// <summary>
/// 修改生产状态
/// </summary>
/// <param name="pipelineComponentId"></param>
/// <param name="BoxNumber"></param>
public static void UpdateProductionState(string pipelineComponentId, int state, DateTime TaskDate)
{
var q = GetPipelineComponentById(pipelineComponentId);
if (q!=null)
{
q.ProductionState = state;
if (state==2)
{
q.ActEndDate = TaskDate;
}
else if(state==1)
{
if (q.ActStartDate ==null)
{
q.ActStartDate = TaskDate;
}
else
{
if (DateTime.Compare(TaskDate,q.ActStartDate.Value) < 0)
{
q.ActStartDate = TaskDate;
}
}
}
UpdatePipelineComponent(q);
}
}
/// <summary>
/// 根据作业管线Id删除一个作业管线信息
@@ -275,5 +324,16 @@ namespace BLL
Funs.FineUIPleaseSelect(dropName);
}
}
public static void InitMainItemDownProductionStateList(FineUIPro.DropDownList dropName, bool isShowPlease)
{
dropName.DataValueField = "Value";
dropName.DataTextField = "Text";
dropName.DataSource = GetProductionState();
dropName.DataBind();
if (isShowPlease)
{
Funs.FineUIPleaseSelect(dropName);
}
}
}
}