报工查询调整
This commit is contained in:
@@ -27,6 +27,28 @@ namespace DOAN.Admin.WebApi.Controllers
|
|||||||
_ProReportworkService = ProReportworkService;
|
_ProReportworkService = ProReportworkService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO 查询工艺路线
|
||||||
|
[HttpGet("get_route")]
|
||||||
|
public IActionResult GetRoute()
|
||||||
|
{
|
||||||
|
var response = _ProReportworkService.GetRoute();
|
||||||
|
|
||||||
|
return SUCCESS(response);
|
||||||
|
}
|
||||||
|
//TODO 根据工艺路线查询工序
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="route_id">工艺路线id</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet("get_process_by_route")]
|
||||||
|
public IActionResult GetProcessByRoute(int route_id)
|
||||||
|
{
|
||||||
|
var response = _ProReportworkService.GetProcessByRoute(route_id);
|
||||||
|
|
||||||
|
return SUCCESS(response);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查询报工列表
|
/// 查询报工列表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -53,7 +75,7 @@ namespace DOAN.Admin.WebApi.Controllers
|
|||||||
public IActionResult GetProReportwork(string Id)
|
public IActionResult GetProReportwork(string Id)
|
||||||
{
|
{
|
||||||
var response = _ProReportworkService.GetInfo(Id);
|
var response = _ProReportworkService.GetInfo(Id);
|
||||||
|
|
||||||
var info = response.Adapt<ProReportworkDto>();
|
var info = response.Adapt<ProReportworkDto>();
|
||||||
return SUCCESS(info);
|
return SUCCESS(info);
|
||||||
}
|
}
|
||||||
@@ -96,14 +118,14 @@ namespace DOAN.Admin.WebApi.Controllers
|
|||||||
[HttpPost("delete/{ids}")]
|
[HttpPost("delete/{ids}")]
|
||||||
[ActionPermissionFilter(Permission = "proreportwork:delete")]
|
[ActionPermissionFilter(Permission = "proreportwork:delete")]
|
||||||
[Log(Title = "报工", BusinessType = BusinessType.DELETE)]
|
[Log(Title = "报工", BusinessType = BusinessType.DELETE)]
|
||||||
public IActionResult DeleteProReportwork([FromRoute]string ids)
|
public IActionResult DeleteProReportwork([FromRoute] string ids)
|
||||||
{
|
{
|
||||||
var idArr = Tools.SplitAndConvert<string>(ids);
|
var idArr = Tools.SplitAndConvert<string>(ids);
|
||||||
|
|
||||||
return ToResponse(_ProReportworkService.Delete(idArr));
|
return ToResponse(_ProReportworkService.Delete(idArr));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
using DOAN.Model.BZFM.Dto;
|
using DOAN.Model.BZFM.Dto;
|
||||||
using DOAN.Model.BZFM;
|
using DOAN.Model.BZFM;
|
||||||
using DOAN.Model.MES.product;
|
using DOAN.Model.MES.product;
|
||||||
|
using DOAN.Model.MES.base_;
|
||||||
|
|
||||||
namespace DOAN.Service.MES.product.IService
|
namespace DOAN.Service.MES.product.IService
|
||||||
{
|
{
|
||||||
@@ -9,6 +10,8 @@ namespace DOAN.Service.MES.product.IService
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IProReportworkService : IBaseService<ProReportwork01>
|
public interface IProReportworkService : IBaseService<ProReportwork01>
|
||||||
{
|
{
|
||||||
|
List<BaseWorkRoute> GetRoute();
|
||||||
|
List<BaseWorkProcesses> GetProcessByRoute(int route_id);
|
||||||
PagedInfo<ProReportworkDto> GetList(ProReportworkQueryDto parm);
|
PagedInfo<ProReportworkDto> GetList(ProReportworkQueryDto parm);
|
||||||
|
|
||||||
ProReportwork01 GetInfo(string Id);
|
ProReportwork01 GetInfo(string Id);
|
||||||
|
|||||||
@@ -15,6 +15,19 @@ namespace DOAN.Service.MES.product;
|
|||||||
[AppService(ServiceType = typeof(IProReportworkService), ServiceLifetime = LifeTime.Transient)]
|
[AppService(ServiceType = typeof(IProReportworkService), ServiceLifetime = LifeTime.Transient)]
|
||||||
public class ProReportworkService : BaseService<ProReportwork01>, IProReportworkService
|
public class ProReportworkService : BaseService<ProReportwork01>, IProReportworkService
|
||||||
{
|
{
|
||||||
|
List<BaseWorkRoute> GetRoute()
|
||||||
|
{
|
||||||
|
return Context.Queryable<BaseWorkRoute>().ToList();
|
||||||
|
|
||||||
|
}
|
||||||
|
List<BaseWorkProcesses> GetProcessByRoute(int route_id)
|
||||||
|
{
|
||||||
|
return Context.Queryable<BaseRelWorkRouteProcesses>()
|
||||||
|
.LeftJoin<BaseWorkProcesses>((rel,pro)=>rel.FkWorkProcesses==pro.Id)
|
||||||
|
.Where((rel,pro)=>rel.FkWorkRoute==route_id)
|
||||||
|
.Select((rel,pro)=>pro)
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查询报工列表
|
/// 查询报工列表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user