diff --git a/DOAN.Admin.WebApi/Controllers/MES/product/ProWorkorderController.cs b/DOAN.Admin.WebApi/Controllers/MES/product/ProWorkorderController.cs index 2d368a6..9271c62 100644 --- a/DOAN.Admin.WebApi/Controllers/MES/product/ProWorkorderController.cs +++ b/DOAN.Admin.WebApi/Controllers/MES/product/ProWorkorderController.cs @@ -362,17 +362,6 @@ namespace DOAN.Admin.WebApi.Controllers return SUCCESS(response); } - // TODO 如果没有id 传入工单 手动生成报工记录 - [HttpGet("manual_generation_reportwork")] - public IActionResult ManualGenerationOfReportWork(string workorder) - { - if (string.IsNullOrEmpty(workorder)) { - throw new CustomException("workorder is null"); - } - - var response = _ProWorkorderService.ManualGenerationOfReportWork(workorder,HttpContext.GetName()); - return SUCCESS(response); - } } diff --git a/DOAN.Service/MES/product/IService/IProReportworkService.cs b/DOAN.Service/MES/product/IService/IProReportworkService.cs index b47e9c9..3c2a710 100644 --- a/DOAN.Service/MES/product/IService/IProReportworkService.cs +++ b/DOAN.Service/MES/product/IService/IProReportworkService.cs @@ -25,5 +25,7 @@ namespace DOAN.Service.MES.product.IService List UserExport(DateTime handleDate); + int ManualGenerationOfReportWork(string workorder, string CreatedBy); + } } diff --git a/DOAN.Service/MES/product/IService/IProWorkorderService.cs b/DOAN.Service/MES/product/IService/IProWorkorderService.cs index e4d9ba8..2f0ad82 100644 --- a/DOAN.Service/MES/product/IService/IProWorkorderService.cs +++ b/DOAN.Service/MES/product/IService/IProWorkorderService.cs @@ -61,7 +61,7 @@ namespace DOAN.Service.MES.product.IService int WorkOrderLog(string workorder, string log, string Operator); - int ManualGenerationOfReportWork(string workorder, string CreatedBy); + } } diff --git a/DOAN.Service/MES/product/ProWorkorderService.cs b/DOAN.Service/MES/product/ProWorkorderService.cs index 03912e6..8762558 100644 --- a/DOAN.Service/MES/product/ProWorkorderService.cs +++ b/DOAN.Service/MES/product/ProWorkorderService.cs @@ -1224,37 +1224,7 @@ namespace DOAN.Service.MES.product return result; } - /// - /// 如果没有id 传入工单 手动生成报工记录 - /// - /// - /// - public int ManualGenerationOfReportWork(string workorder,string CreatedBy) - { - bool isEXsit= Context.Queryable().Where(it => it.FkWorkorder == workorder).Any(); - - if (isEXsit) { - return -1; - - } - ProWorkorder handleWorkorder= Context.Queryable().Where(it => it.Workorder == workorder).First(); - ProReportwork proReportwork =new - ProReportwork(); - proReportwork.Id = XueHua; - proReportwork.FkWorkorder = workorder; - proReportwork.DispatchNum = handleWorkorder.DeliveryNum; - proReportwork.FinishedNum = null; - proReportwork.GroupCode = handleWorkorder.GroupCode; - proReportwork.LineCode = handleWorkorder.LineCode; - proReportwork.CreatedBy = CreatedBy; - proReportwork.CreatedTime = DateTime.Now; - - return Context.Insertable(proReportwork).ExecuteCommand(); - - - - - } + }