sqlsugar的PostgreSQL数据库 时间格式化分钟mm改为mi
This commit is contained in:
@@ -320,13 +320,13 @@ namespace Tnb.ProductionMgr
|
||||
eqp_name = e.name,
|
||||
eqp_type_code = SqlFunc.Subqueryable<EqpEquipType>().Where(it => it.id == e.equip_type_id).Select(it => it.code),
|
||||
mo_task_qty = SqlFunc.Subqueryable<PrdMoTask>().Where(a => a.mo_id == moId).Count(),
|
||||
estimated_start_date = a.estimated_start_date.Value.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
estimated_end_date = a.estimated_end_date.Value.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
estimated_start_date = a.estimated_start_date.Value.ToString(DbTimeFormat.SS),
|
||||
estimated_end_date = a.estimated_end_date.Value.ToString(DbTimeFormat.SS),
|
||||
plan_qty = a.scheduled_qty,
|
||||
complete_qty = SqlFunc.IsNull(a.reported_work_qty,0)+SqlFunc.IsNull(a.scrap_qty,0),
|
||||
process_code = SqlFunc.Subqueryable<BasProcess>().Where(it => it.id == a.process_id).Select(it => it.process_code),
|
||||
process_name = SqlFunc.Subqueryable<BasProcess>().Where(it => it.id == a.process_id).Select(it => it.process_name),
|
||||
create_time = a.create_time==null ? "" : a.create_time.Value.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
create_time = a.create_time==null ? "" : a.create_time.Value.ToString(DbTimeFormat.SS),
|
||||
})
|
||||
.Mapper(it =>
|
||||
{
|
||||
@@ -353,11 +353,11 @@ namespace Tnb.ProductionMgr
|
||||
process_code = e.process_code,
|
||||
process_name = e.process_name,
|
||||
mo_task_qty = SqlFunc.Subqueryable<PrdMoTask>().Where(a => a.mo_id == moId).Count(),
|
||||
estimated_start_date = a.estimated_start_date.Value.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
estimated_end_date = a.estimated_end_date.Value.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
estimated_start_date = a.estimated_start_date.Value.ToString(DbTimeFormat.SS),
|
||||
estimated_end_date = a.estimated_end_date.Value.ToString(DbTimeFormat.SS),
|
||||
plan_qty = a.scheduled_qty,
|
||||
complete_qty = SqlFunc.IsNull(a.reported_work_qty,0)+SqlFunc.IsNull(a.scrap_qty,0),
|
||||
create_time = a.create_time==null ? "" : a.create_time.Value.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
create_time = a.create_time==null ? "" : a.create_time.Value.ToString(DbTimeFormat.SS),
|
||||
})
|
||||
.Mapper(it =>
|
||||
{
|
||||
@@ -399,8 +399,8 @@ namespace Tnb.ProductionMgr
|
||||
scheduled_qty = a.scheduled_qty,
|
||||
plan_qty = SqlFunc.Subqueryable<PrdMo>().Where(it => it.id == a.mo_id).Select(it => it.plan_qty),
|
||||
complete_qty = a.last_process_complete_qty,
|
||||
estimated_start_date = a.estimated_start_date==null ? null : a.estimated_start_date.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||
estimated_end_date = a.estimated_end_date==null ? null : a.estimated_end_date.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||
estimated_start_date = a.estimated_start_date==null ? null : a.estimated_start_date.Value.ToString(DbTimeFormat.MM),
|
||||
estimated_end_date = a.estimated_end_date==null ? null : a.estimated_end_date.Value.ToString(DbTimeFormat.MM),
|
||||
bom_id = d.id,
|
||||
bom_version = d.version
|
||||
})
|
||||
@@ -436,8 +436,8 @@ namespace Tnb.ProductionMgr
|
||||
plan_qty = d.plan_qty,
|
||||
process_task_qty = a.process_task_qty,
|
||||
complete_qty = SqlFunc.IsNull(a.reported_work_qty,0)+SqlFunc.IsNull(a.scrap_qty,0),
|
||||
estimated_start_date = a.estimated_start_date==null ? null : a.estimated_start_date.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||
estimated_end_date = a.estimated_end_date==null ? null : a.estimated_end_date.Value.ToString("yyyy-MM-dd HH:mm"),
|
||||
estimated_start_date = a.estimated_start_date==null ? null : a.estimated_start_date.Value.ToString(DbTimeFormat.MM),
|
||||
estimated_end_date = a.estimated_end_date==null ? null : a.estimated_end_date.Value.ToString(DbTimeFormat.MM),
|
||||
process_name = e.process_name,
|
||||
bom_version = SqlFunc.Subqueryable<BasMbom>().Where(it => it.material_id == a.material_id).Select(it => it.version)
|
||||
})
|
||||
@@ -1163,6 +1163,10 @@ namespace Tnb.ProductionMgr
|
||||
{
|
||||
prdTaskList.ForEach(x => x.act_start_date = DateTime.Now);
|
||||
}
|
||||
if (behavior == PrdTaskBehavior.Compled)
|
||||
{
|
||||
prdTaskList.ForEach(x => x.act_end_date = DateTime.Now);
|
||||
}
|
||||
row = await db.Updateable(prdTaskList).ExecuteCommandAsync();
|
||||
foreach (var item in prdTaskList)
|
||||
{
|
||||
@@ -2080,7 +2084,7 @@ namespace Tnb.ProductionMgr
|
||||
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_id = a.eqp_id,
|
||||
create_time = a.create_time==null ? "" :a.create_time.Value.ToString("yyyy-MM-dd HH:mm:ss")
|
||||
create_time = a.create_time==null ? "" :a.create_time.Value.ToString(DbTimeFormat.SS)
|
||||
}).OrderByDescending(a => a.create_time).ToPagedListAsync(input.currentPage, input.pageSize);
|
||||
return PageResult<WorkOrderAdjustmentListOutput>.SqlSugarPageResult(result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user