This commit is contained in:
李鹏飞 2024-11-06 09:59:54 +08:00
parent bfdffc4ccf
commit 92f20a5913
4 changed files with 26 additions and 17 deletions

Binary file not shown.

View File

@ -63,11 +63,13 @@ namespace BLL
DrawingName = x.DrawingName,
BoxNumber = x.BoxNumber,
State = x.State,
StateStr = HJGL_PipelineComponentService.GetState().FirstOrDefault(q=>q.Value==x.State.ToString()).Text.Trim(),
PlanStartDate = string.Format("{0:g}", y.PlanStartDate),
QRCode = x.QRCode,
ReceiveMan = p.PersonName,
ReceiveDate = string.Format("{0:g}", x.ReceiveDate),
UnitWorkName=unitwork.UnitWorkName,
Remark = x.Remark
}).FirstOrDefault();
bool isPower = Person_PersonsService.IsGeneralUnitByPersonId(personId, projectId);
pipelineComponentDetail.pipelineComponentItem = q;
@ -83,12 +85,12 @@ namespace BLL
{
if (!string.IsNullOrEmpty(message))
{
q.State = HJGL_PipelineComponentService.state_Msg;
q.State = HJGL_PipelineComponentService.StatePenRec;
q.Remark=message;
}
else
{
q.State = HJGL_PipelineComponentService.state_1;
q.State = HJGL_PipelineComponentService.State1;
}
q.ReceiveMan = PersonId;

View File

@ -12,23 +12,27 @@ namespace BLL
public class HJGL_PipelineComponentService
{
/// <summary>
/// 验收不合格
/// 待整改
/// </summary>
public static int state_Msg = -1;
public static int StatePenRec = -2;
/// <summary>
/// 已整改
/// </summary>
public static int StateRec = -1;
/// <summary>
/// 未验收
/// </summary>
public static int state_0 = 0;
public static int State0 = 0;
/// <summary>
/// 已验收
/// </summary>
public static int state_1 = 1;
public static int State1 = 1;
/// <summary>
/// 已装箱
/// </summary>
public static int state_2 = 2;
public static int State2 = 2;
/// <summary>
@ -37,11 +41,12 @@ namespace BLL
/// <returns></returns>
public static ListItem[] GetState()
{
ListItem[] list = new ListItem[4];
list[0] = new ListItem("未验收", state_0.ToString());
list[1] = new ListItem("已验收", state_1.ToString());
list[2] = new ListItem("已出库", state_2.ToString());
list[3] = new ListItem("验收不合格", state_Msg.ToString());
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());
return list;
}
/// <summary>
@ -199,7 +204,7 @@ namespace BLL
model.PipelineId = PipelineId;
model.PipelineComponentCode = model_mat.PrefabricatedComponents;
model.DrawingName = model_mat.PrefabricatedComponents.Substring(0, model_mat.PrefabricatedComponents.LastIndexOf('-')).Replace("\"", "");
model.State = state_0;
model.State = State0;
model.ProductionState = 0;
UpdatePipelineComponent(model);
}
@ -210,7 +215,7 @@ namespace BLL
model.PipelineId = PipelineId;
model.PipelineComponentCode = model_mat.PrefabricatedComponents;
model.DrawingName = model_mat.PrefabricatedComponents?.Substring(0, model_mat.PrefabricatedComponents.LastIndexOf('-')).Replace("\"", "");
model.State = state_0;
model.State = State0;
model.ProductionState = 0;
model.IsPrint = false;
AddPipelineComponent(model);
@ -290,9 +295,9 @@ namespace BLL
public static void UpdateOutState(string pipelineComponentId,string BoxNumber)
{
var q=GetPipelineComponentById(pipelineComponentId);
if (q.State==state_1)
if (q.State==State1)
{
q.State = state_2;
q.State = State2;
q.BoxNumber=BoxNumber;
UpdatePipelineComponent(q);
@ -408,7 +413,7 @@ namespace BLL
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(state_1) &&
where y.ProjectId.Contains(projectId) && x.State.Equals(State1) &&
(string.IsNullOrEmpty(pipelineCode) || y.PipelineCode.Contains(pipelineCode)) &&
(string.IsNullOrEmpty(pipelineComponentCode) || x.PipelineComponentCode.Contains(pipelineComponentCode)) &&
(string.IsNullOrEmpty(flowingSection) || y.FlowingSection.Contains(flowingSection))

View File

@ -14,11 +14,13 @@ namespace Model
public string DrawingName { get; set; }
public string BoxNumber { get; set; }
public int? State { get; set; }
public string StateStr { get; set; }
public string PlanStartDate { get; set; }
public string QRCode { get; set; }
public string ReceiveMan { get; set; }
public string ReceiveDate { get; set; }
public string UnitWorkName { get; set; }
public string Remark { get; set; }
}
public class PipelineComponentDetail
{