diff --git a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/ProductionSchedulingCrInput.cs b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/ProductionSchedulingCrInput.cs index dbf0f85d..9d9ba5ae 100644 --- a/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/ProductionSchedulingCrInput.cs +++ b/ProductionMgr/Tnb.ProductionMgr.Entities/Dto/PrdManage/ProductionSchedulingCrInput.cs @@ -37,33 +37,33 @@ namespace Tnb.ProductionMgr.Entities.Dto /// public DateTime? plan_end_date { get; set; } + /// + /// Desc:预计开始时间 + /// Default: + /// Nullable:True + /// + public DateTime? estimated_start_date { get; set; } + + /// + /// Desc:预计结束时间 + /// Default: + /// Nullable:True + /// + public DateTime? estimated_end_date { get; set; } + // /// // /// Desc:预计开始时间 // /// Default: // /// Nullable:True // /// - // public DateTime? estimated_start_date { get; set; } + // public string? estimated_start_date { get; set; } // // /// // /// Desc:预计结束时间 // /// Default: // /// Nullable:True // /// - // public DateTime? estimated_end_date { get; set; } - - /// - /// Desc:预计开始时间 - /// Default: - /// Nullable:True - /// - public string? estimated_start_date { get; set; } - - /// - /// Desc:预计结束时间 - /// Default: - /// Nullable:True - /// - public string? estimated_end_date { get; set; } + // public string? estimated_end_date { get; set; } diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs index 55151c3d..0bcd8872 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMoTaskService.cs @@ -1124,7 +1124,7 @@ namespace Tnb.ProductionMgr throw Oops.Bah("已开始的不能再开始"); } - if (item.mo_task_status!=DictConst.ToBeStartedEnCode || item.mo_task_status!=DictConst.MoStatusPauseCode) + if (item.mo_task_status!=DictConst.ToBeStartedEnCode && item.mo_task_status!=DictConst.MoStatusPauseCode) { throw Oops.Bah("状态错误无法开始"); } @@ -1144,7 +1144,7 @@ namespace Tnb.ProductionMgr { throw Oops.Bah("已完成的不能再完成"); } - if (item.mo_task_status!=DictConst.InProgressEnCode || item.mo_task_status!=DictConst.MoStatusPauseCode) + if (item.mo_task_status!=DictConst.InProgressEnCode && item.mo_task_status!=DictConst.MoStatusPauseCode) { throw Oops.Bah("状态错误无法完成"); } diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs index 64b2f576..4d9a4742 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs @@ -361,7 +361,27 @@ namespace Tnb.ProductionMgr Dictionary queryJson = string.IsNullOrEmpty(input.queryJson) ? new Dictionary() : input.queryJson.ToObject>(); string mo_task_code = queryJson.ContainsKey("mo_task_code") ? queryJson["mo_task_code"].ToString() : ""; - string mo_task_status = queryJson.ContainsKey("mo_task_status") ? queryJson["mo_task_status"].ToString() : ""; + string status = queryJson.ContainsKey("status") ? queryJson["status"].ToString() : ""; + List statusList = new List(); + if (!string.IsNullOrEmpty(status)) + { + switch (status) + { + case "1": + statusList.Add(DictConst.InProgressEnCode); + statusList.Add(DictConst.MoStatusPauseCode); + break; + case "2": + statusList.Add(DictConst.ToBeScheduledEncode); + statusList.Add(DictConst.ToBeStartedEnCode); + break; + case "3": + statusList.Add(DictConst.ComplatedEnCode); + statusList.Add(DictConst.ClosedEnCode); + break; + } + } + // string mo_task_status = queryJson.ContainsKey("mo_task_status") ? queryJson["mo_task_status"].ToString() : ""; if (string.IsNullOrEmpty(input.sidx)) { input.sidx = "create_time"; @@ -380,7 +400,8 @@ namespace Tnb.ProductionMgr .LeftJoin((a,b,c,d,e,f,g,h,i,j)=>a.mo_id==j.id) .Where((a, b) => a.workstation_id == input.stationId && (a.mo_task_status == DictConst.ToBeStartedEnCode || a.mo_task_status == DictConst.MoStatusPauseCode || a.mo_task_status == DictConst.ComplatedEnCode || a.mo_task_status == DictConst.InProgressEnCode) ) .WhereIF(!string.IsNullOrEmpty(mo_task_code),a=>a.mo_task_code.Contains(mo_task_code)) - .WhereIF(!string.IsNullOrEmpty(mo_task_status),a=>a.mo_task_status==mo_task_status) + //.WhereIF(!string.IsNullOrEmpty(mo_task_status),a=>a.mo_task_status==mo_task_status) + .WhereIF(statusList.Count>0,a=>statusList.Contains(a.mo_task_status)) .Select((a, b, c, d, e,f,g,h,i,j) => new PADPackageTaskPageOutput { id = a.id,