获取工单下的报工列表
This commit is contained in:
@@ -19,14 +19,32 @@ public class ReportFlowController : BaseController
|
||||
}
|
||||
|
||||
//TODO 查询工单详情
|
||||
/// <summary>
|
||||
/// 查询工单详情
|
||||
/// </summary>
|
||||
/// <param name="workOrder">工单号</param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="CustomException"></exception>
|
||||
[HttpGet("get_workorder_detail")]
|
||||
public IActionResult GetWorkOrderDetail(string workOrder)
|
||||
{
|
||||
if (string.IsNullOrEmpty(workOrder))
|
||||
throw new CustomException("workOrderId 是空");
|
||||
return SUCCESS(_reportFlowService.GetWorkOrderDetail(workOrder));
|
||||
var response = _reportFlowService.GetWorkOrderDetail(workOrder);
|
||||
if (response == null)
|
||||
{
|
||||
return ToResponse(ResultCode.NO_DATA, "工单不存在");
|
||||
}
|
||||
return SUCCESS(response);
|
||||
}
|
||||
//TODO 查询工序报工详情
|
||||
/// <summary>
|
||||
/// 查询某个工序报工详情
|
||||
/// </summary>
|
||||
/// <param name="workorder"></param>
|
||||
/// <param name="process"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="CustomException"></exception>
|
||||
[HttpGet("get_process_reportwork_detail")]
|
||||
public IActionResult GetProcessReportWorkDetail(string workorder, string process)
|
||||
{
|
||||
@@ -38,6 +56,15 @@ public class ReportFlowController : BaseController
|
||||
}
|
||||
|
||||
//TODO 工序报工
|
||||
/// <summary>
|
||||
/// 工序报工
|
||||
/// </summary>
|
||||
/// <param name="workorder"></param>
|
||||
/// <param name="process"></param>
|
||||
/// <param name="finish_num"></param>
|
||||
/// <param name="bad_num"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="CustomException"></exception>
|
||||
[HttpGet("process_reportwork")]
|
||||
public IActionResult ProcessReportWork(string workorder, string process, int finish_num,int bad_num)
|
||||
{
|
||||
@@ -49,6 +76,18 @@ public class ReportFlowController : BaseController
|
||||
return SUCCESS(_reportFlowService.ProcessReportWork(workorder, process, finish_num,bad_num,HttpContext.GetNickName()));
|
||||
}
|
||||
|
||||
//TODO 获取工单下的报工列表
|
||||
[HttpGet("get_workorder_reportwork_list")]
|
||||
public IActionResult GetWorkOrderReportWorkList(string workorder)
|
||||
{
|
||||
if (string.IsNullOrEmpty(workorder))
|
||||
{
|
||||
throw new CustomException("workorder is null");
|
||||
}
|
||||
|
||||
return SUCCESS(_reportFlowService.GetWorkOrderReportWorkList(workorder));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -11,4 +11,6 @@ public interface IReportFlowService: IBaseService<ProReportwork01>
|
||||
|
||||
bool ProcessReportWork(string workorder, string process, int finish_num,int bad_num,string Worker);
|
||||
|
||||
List<ProReportwork01> GetWorkOrderReportWorkList(string workorder);
|
||||
|
||||
}
|
||||
@@ -56,6 +56,11 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
|
||||
}
|
||||
return result>0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public List<ProReportwork01> GetWorkOrderReportWorkList(string workorder)
|
||||
{
|
||||
return Context.Queryable<ProReportwork01>().Where(x => x.Workorder == workorder).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user