代码无效引用清理,试压包资料界面看板修改

This commit is contained in:
2025-10-10 14:33:21 +08:00
parent 87fb529521
commit 55b798135c
933 changed files with 5897 additions and 7541 deletions
@@ -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;
}