1
This commit is contained in:
@@ -14,6 +14,7 @@ using JNPF.Systems.Interfaces.System;
|
||||
using JNPF.VisualDev;
|
||||
using JNPF.VisualDev.Entitys.Dto.VisualDevModelData;
|
||||
using JNPF.VisualDev.Interfaces;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using SqlSugar;
|
||||
@@ -432,7 +433,25 @@ namespace Tnb.ProductionMgr
|
||||
|
||||
return PageResult<PrdMoStatisticsOutput>.SqlSugarPageResult(result);
|
||||
}
|
||||
|
||||
public class data
|
||||
{
|
||||
public string mo_code { get; set; }
|
||||
public string f_fullname { get; set; }
|
||||
public string material_name { get; set; }
|
||||
public string plan_qty { get; set; }
|
||||
public string scheduled_qty { get; set; }
|
||||
public string tobe_scheduled_qty { get; set; }
|
||||
public string reported_work_qty { get; set; }
|
||||
public string complete_rate { get; set; }
|
||||
public string orderby_field { get; set; }
|
||||
}
|
||||
[HttpPost]
|
||||
[AllowAnonymous]
|
||||
public async Task<dynamic> GetPrdTask()
|
||||
{
|
||||
var result= _db.Ado.SqlQuery<data>("select a.mo_code,b.f_fullname,c.name as material_name,a.plan_qty,a.scheduled_qty,(a.plan_qty-a.scheduled_qty) as tobe_scheduled_qty, a.reported_work_qty,(case when a.scheduled_qty is null or a.scheduled_qty<=0 or a.reported_work_qty is null or a.reported_work_qty<=0 then null else round(a.reported_work_qty*100::numeric/a.plan_qty, 1)||'%' end) as complete_rate,(case when a.scheduled_qty is null or a.scheduled_qty<=0 or a.reported_work_qty is null or a.reported_work_qty<=0 then 0 else round(a.reported_work_qty*100::numeric/a.plan_qty, 1) end) as orderby_field from prd_mo a left join base_dictionarydata b on a.mo_status=b.f_id left join bas_material c on a.material_id=c.id where a.mo_status not in ('25501969636645','25501960891941');");
|
||||
return result;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 正向工单追溯相关
|
||||
|
||||
Reference in New Issue
Block a user