1
This commit is contained in:
@@ -82,6 +82,10 @@ public static class DictConst
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public const string MoCloseId = "25501969636645";
|
public const string MoCloseId = "25501969636645";
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// 工单状态-完工
|
||||||
|
/// </summary>
|
||||||
|
public const string MoCompleteId = "25501960891941";
|
||||||
|
/// <summary>
|
||||||
/// 工单状态-code
|
/// 工单状态-code
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string MoTaskStatusCode = "OrderStatus";
|
public const string MoTaskStatusCode = "OrderStatus";
|
||||||
|
|||||||
@@ -22,5 +22,7 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
|
|||||||
public string eqp_id { get; set; }
|
public string eqp_id { get; set; }
|
||||||
public string eqp_id_id { get; set; }
|
public string eqp_id_id { get; set; }
|
||||||
public string create_time { get; set; }
|
public string create_time { get; set; }
|
||||||
|
|
||||||
|
public int? schedule_type { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -652,6 +652,8 @@ namespace Tnb.ProductionMgr
|
|||||||
if (input.schedule_type.Value == 1) //注塑、基础排产
|
if (input.schedule_type.Value == 1) //注塑、基础排产
|
||||||
{
|
{
|
||||||
PrdMo? mo = await db.Queryable<PrdMo>().FirstAsync(it => it.id == input.mo_id);
|
PrdMo? mo = await db.Queryable<PrdMo>().FirstAsync(it => it.id == input.mo_id);
|
||||||
|
if (mo.mo_status == DictConst.MoCloseId || mo.mo_status == DictConst.MoCompleteId)
|
||||||
|
throw Oops.Bah("状态错误");
|
||||||
BasMbomProcess? basMbomProcess = null;
|
BasMbomProcess? basMbomProcess = null;
|
||||||
if (!string.IsNullOrEmpty(input.bom_id))
|
if (!string.IsNullOrEmpty(input.bom_id))
|
||||||
{
|
{
|
||||||
@@ -813,6 +815,8 @@ namespace Tnb.ProductionMgr
|
|||||||
moTask.estimated_end_date = input.estimated_end_date;
|
moTask.estimated_end_date = input.estimated_end_date;
|
||||||
moTask.scheduled_qty = input.scheduled_qty;
|
moTask.scheduled_qty = input.scheduled_qty;
|
||||||
PrdMo? mo = await _db.Queryable<PrdMo>().FirstAsync(it => it.id == input.mo_id);
|
PrdMo? mo = await _db.Queryable<PrdMo>().FirstAsync(it => it.id == input.mo_id);
|
||||||
|
if (mo.mo_status == DictConst.MoCloseId || mo.mo_status == DictConst.MoCompleteId)
|
||||||
|
throw Oops.Bah("状态错误");
|
||||||
// moTask.unit_id = mo.unit_id;
|
// moTask.unit_id = mo.unit_id;
|
||||||
string? moCode = mo?.mo_code;
|
string? moCode = mo?.mo_code;
|
||||||
// var taskCode = await _db.Queryable<PrdMoTask>().Where(it => string.IsNullOrEmpty(it.parent_id) && !string.IsNullOrEmpty(it.mo_task_code) && it.mo_task_code.Contains(moCode))
|
// var taskCode = await _db.Queryable<PrdMoTask>().Where(it => string.IsNullOrEmpty(it.parent_id) && !string.IsNullOrEmpty(it.mo_task_code) && it.mo_task_code.Contains(moCode))
|
||||||
@@ -2106,7 +2110,8 @@ namespace Tnb.ProductionMgr
|
|||||||
estimated_end_date = a.estimated_end_date == null ? "" : a.estimated_end_date.Value.ToString("yyyy-MM-dd"),
|
estimated_end_date = a.estimated_end_date == null ? "" : a.estimated_end_date.Value.ToString("yyyy-MM-dd"),
|
||||||
eqp_id = a.eqp_id == null ? "" : h.code + "/" + h.name,
|
eqp_id = a.eqp_id == null ? "" : h.code + "/" + h.name,
|
||||||
eqp_id_id = a.eqp_id,
|
eqp_id_id = a.eqp_id,
|
||||||
create_time = a.create_time == null ? "" : a.create_time.Value.ToString(DbTimeFormat.SS)
|
create_time = a.create_time == null ? "" : a.create_time.Value.ToString(DbTimeFormat.SS),
|
||||||
|
schedule_type = a.schedule_type,
|
||||||
}).OrderByDescending(a => a.create_time).ToPagedListAsync(input.currentPage, input.pageSize);
|
}).OrderByDescending(a => a.create_time).ToPagedListAsync(input.currentPage, input.pageSize);
|
||||||
return PageResult<WorkOrderAdjustmentListOutput>.SqlSugarPageResult(result);
|
return PageResult<WorkOrderAdjustmentListOutput>.SqlSugarPageResult(result);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user