查询工单下的扫描条码信息
This commit is contained in:
parent
430c9ec669
commit
f6fadc36f6
@ -195,4 +195,17 @@ public class WorkOrderProgressController : BaseController
|
||||
var response = workorderProgressService.GetWorkOrderTime(workorder);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
//TODO 查询工单下的扫描条码信息
|
||||
[HttpGet("get_san_code_info)")]
|
||||
public IActionResult GetWorkOrderScanCodeInfo(string workorder)
|
||||
{
|
||||
if (string.IsNullOrEmpty(workorder)) throw new CustomException("workorder is null");
|
||||
var response = workorderProgressService.GetWorkOrderScanCodeInfo(workorder);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -37,5 +37,7 @@ namespace DOAN.Service.JobKanban.IService
|
||||
|
||||
(int ,int) GetWorkOrderProgress(string workorder);
|
||||
(DateTime, float) GetWorkOrderTime(string workorder);
|
||||
|
||||
List<ProReportworkDetail> GetWorkOrderScanCodeInfo(string workorder);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ using DOAN.Model.MES.product;
|
||||
using DOAN.Model.MES.product.Dto;
|
||||
using DOAN.Service.JobKanban.IService;
|
||||
using Infrastructure.Attribute;
|
||||
using Mapster;
|
||||
using SqlSugar.SplitTableExtensions;
|
||||
|
||||
namespace DOAN.Service.JobKanban;
|
||||
@ -25,13 +26,20 @@ public class WorkorderProgressService : BaseService<ProWorkorder>, IWorkorderPro
|
||||
|
||||
public List<ProReportwork> GetReportWorkRecord(string group_code, string line_code, DateTime handleDate)
|
||||
{
|
||||
handleDate = handleDate.ToLocalTime().Date;
|
||||
|
||||
return Context.Queryable<ProWorkorder>().LeftJoin<ProReportwork>((w, r) => w.Workorder == r.FkWorkorder)
|
||||
.Where((w, r) => w.GroupCode == group_code)
|
||||
.Where((w, r) => w.LineCode == line_code)
|
||||
.Where((w, r) => w.WorkorderDate == handleDate)
|
||||
.Select((w, r) => r)
|
||||
.ToList();
|
||||
.Select((w, r) => new
|
||||
{
|
||||
FkWorkorder = w.Workorder,
|
||||
DispatchNum = w.DeliveryNum,
|
||||
FinishedNum = r.FinishedNum,
|
||||
|
||||
|
||||
})
|
||||
.ToList().Adapt<List<ProReportwork>>();
|
||||
|
||||
|
||||
}
|
||||
@ -292,4 +300,12 @@ public class WorkorderProgressService : BaseService<ProWorkorder>, IWorkorderPro
|
||||
|
||||
return progress;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//查询工单下的扫描条码信息
|
||||
public List<ProReportworkDetail> GetWorkOrderScanCodeInfo(string workorder)
|
||||
{
|
||||
return Context.Queryable<ProReportworkDetail>().Where(it => it.Workorder == workorder).ToList();
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user