diff --git a/.vs/SGGL_SeDin_New/v17/.wsuo b/.vs/SGGL_SeDin_New/v17/.wsuo index aac61614..a6886c55 100644 Binary files a/.vs/SGGL_SeDin_New/v17/.wsuo and b/.vs/SGGL_SeDin_New/v17/.wsuo differ diff --git a/SGGL/BLL/API/HJGL/APIPipelineComponentService.cs b/SGGL/BLL/API/HJGL/APIPipelineComponentService.cs index 34858eb9..e50ffbb2 100644 --- a/SGGL/BLL/API/HJGL/APIPipelineComponentService.cs +++ b/SGGL/BLL/API/HJGL/APIPipelineComponentService.cs @@ -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; diff --git a/SGGL/BLL/HJGL/WeldingManage/PipelineComponentService.cs b/SGGL/BLL/HJGL/WeldingManage/PipelineComponentService.cs index 091b54e0..1eb1927d 100644 --- a/SGGL/BLL/HJGL/WeldingManage/PipelineComponentService.cs +++ b/SGGL/BLL/HJGL/WeldingManage/PipelineComponentService.cs @@ -12,23 +12,27 @@ namespace BLL public class HJGL_PipelineComponentService { /// - /// 验收不合格 + /// 待整改 /// - public static int state_Msg = -1; + public static int StatePenRec = -2; + /// + /// 已整改 + /// + public static int StateRec = -1; /// /// 未验收 /// - public static int state_0 = 0; + public static int State0 = 0; /// /// 已验收 /// - public static int state_1 = 1; + public static int State1 = 1; /// /// 已装箱 /// - public static int state_2 = 2; + public static int State2 = 2; /// @@ -37,11 +41,12 @@ namespace BLL /// 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; } /// @@ -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)) diff --git a/SGGL/Model/APIItem/HJGL/PipelineComponentItem.cs b/SGGL/Model/APIItem/HJGL/PipelineComponentItem.cs index 3f2c824c..bc9a91a7 100644 --- a/SGGL/Model/APIItem/HJGL/PipelineComponentItem.cs +++ b/SGGL/Model/APIItem/HJGL/PipelineComponentItem.cs @@ -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 {