获取工艺路线。获取班组
This commit is contained in:
parent
cc5e008f2b
commit
ae795af825
@ -193,8 +193,6 @@ namespace DOAN.Admin.WebApi.Controllers
|
||||
{
|
||||
if (string.IsNullOrEmpty(group_schedule_id)) { return SUCCESS(null); }
|
||||
if (string.IsNullOrEmpty(person_id)) { return SUCCESS(null); }
|
||||
|
||||
|
||||
var response = _GroupScheduleService
|
||||
.GroupAddPerson(group_schedule_id, person_id, HttpContext.GetName());
|
||||
|
||||
|
||||
@ -13,6 +13,7 @@ using DOAN.Model.System.Dto;
|
||||
using DOAN.Model;
|
||||
using DOAN.Model.MES.base_.Dto;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Aliyun.OSS;
|
||||
|
||||
//创建时间:2024-07-16
|
||||
namespace DOAN.Admin.WebApi.Controllers
|
||||
@ -55,10 +56,10 @@ namespace DOAN.Admin.WebApi.Controllers
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "productManagement:proworkorder:query")]
|
||||
public IActionResult GetProWorkorder(string Id)
|
||||
public IActionResult GetProWorkorder(string Id)
|
||||
{
|
||||
var response = _ProWorkorderService.GetInfo(Id);
|
||||
|
||||
|
||||
var info = response.Adapt<ProWorkorder>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
@ -134,14 +135,14 @@ namespace DOAN.Admin.WebApi.Controllers
|
||||
/// <param name="parm"></param>
|
||||
/// <returns>1成功 0失败</returns>
|
||||
[HttpPost("insert_workorder")]
|
||||
public IActionResult Insert_workOrder([FromBody] ProWorkorderDto2 parm)
|
||||
public IActionResult Insert_workOrder([FromBody] ProWorkorderDto2 parm)
|
||||
{
|
||||
if (parm == null)
|
||||
{
|
||||
return SUCCESS(null);
|
||||
}
|
||||
ProWorkorder newparm= parm.Adapt<ProWorkorder>().ToCreate(HttpContext);
|
||||
var response = _ProWorkorderService.Insert_workOrder(newparm,parm.next_id);
|
||||
ProWorkorder newparm = parm.Adapt<ProWorkorder>().ToCreate(HttpContext);
|
||||
var response = _ProWorkorderService.Insert_workOrder(newparm, parm.next_id);
|
||||
|
||||
return SUCCESS(response);
|
||||
|
||||
@ -154,9 +155,9 @@ namespace DOAN.Admin.WebApi.Controllers
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("move_workorder")]
|
||||
public IActionResult MoveWorkorder(string id,int type)
|
||||
public IActionResult MoveWorkorder(string id, int type)
|
||||
{
|
||||
if(string.IsNullOrEmpty(id))
|
||||
if (string.IsNullOrEmpty(id))
|
||||
{
|
||||
return SUCCESS(null);
|
||||
}
|
||||
@ -187,12 +188,12 @@ namespace DOAN.Admin.WebApi.Controllers
|
||||
[AllowAnonymous]
|
||||
public IActionResult ImportData([FromForm(Name = "file")] IFormFile formFile)
|
||||
{
|
||||
|
||||
|
||||
if (formFile == null)
|
||||
{
|
||||
return SUCCESS(null);
|
||||
}
|
||||
var response = _ProWorkorderService.ImportData(formFile,HttpContext.GetName());
|
||||
var response = _ProWorkorderService.ImportData(formFile, HttpContext.GetName());
|
||||
return SUCCESS(response);
|
||||
|
||||
|
||||
@ -210,9 +211,9 @@ namespace DOAN.Admin.WebApi.Controllers
|
||||
[AllowAnonymous]
|
||||
public IActionResult WorkOrderExport([FromQuery] DateTime extportDate)
|
||||
{
|
||||
if(extportDate==DateTime.MinValue)
|
||||
if (extportDate == DateTime.MinValue)
|
||||
{
|
||||
return SUCCESS(null);
|
||||
return SUCCESS(null);
|
||||
}
|
||||
var list = _ProWorkorderService.WorkOrderExport(extportDate, new PagerInfo(1, 10000));
|
||||
|
||||
@ -245,5 +246,31 @@ namespace DOAN.Admin.WebApi.Controllers
|
||||
var response = _ProWorkorderService.GetCustomInfo(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//TODO 获取工艺路线
|
||||
[HttpGet("get_process_route")]
|
||||
public IActionResult GetProcessRoute(DateTime dateTime)
|
||||
{
|
||||
if (dateTime == DateTime.MinValue)
|
||||
{
|
||||
return SUCCESS(null);
|
||||
|
||||
}
|
||||
|
||||
var response = _ProWorkorderService.GetProcessRoute(dateTime);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
//TODO 获取组
|
||||
[HttpGet("get_groups")]
|
||||
public IActionResult GetGroupList(string route_code)
|
||||
{
|
||||
if (string.IsNullOrEmpty(route_code)) { return SUCCESS(null); }
|
||||
|
||||
var response = _ProWorkorderService.GetGroupList(route_code);
|
||||
return SUCCESS(response);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ namespace DOAN.Model.MES.group.Dto
|
||||
|
||||
public string GroupCode { get; set; }
|
||||
|
||||
public int FkBelongRoute { get; set; }
|
||||
public string FkBelongRouteCode { get; set; }
|
||||
|
||||
public int FkShift { get; set; }
|
||||
public string ShiftName { get; set; }
|
||||
|
||||
@ -34,8 +34,8 @@ namespace DOAN.Model.MES.group
|
||||
/// <summary>
|
||||
/// 归属线
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "fk_belong_route")]
|
||||
public int FkBelongRoute { get; set; }
|
||||
[SugarColumn(ColumnName = "fk_belong_route_code")]
|
||||
public string FkBelongRouteCode { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -9,6 +9,8 @@ using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using DOAN.Model.MES.base_;
|
||||
using DOAN.Model.MES.base_.Dto;
|
||||
using SqlSugar;
|
||||
using DOAN.Model.MES.group;
|
||||
|
||||
|
||||
namespace DOAN.Service.MES.product.IService
|
||||
@ -39,5 +41,12 @@ namespace DOAN.Service.MES.product.IService
|
||||
List<BaseMaterialList> GetMaterialInfo(BaseMaterialListQueryDto5 parm);
|
||||
List<BaseCustom> GetCustomInfo(BaseCustomQueryDto2 parm);
|
||||
|
||||
// List<Group> GetGroupList(DateTime dateTime);
|
||||
|
||||
List<BaseWorkRoute> GetProcessRoute(DateTime dateTime);
|
||||
|
||||
|
||||
List<GroupSchedule> GetGroupList(string route_code);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,6 +28,7 @@ using System.ComponentModel;
|
||||
using NPOI.Util;
|
||||
using DOAN.Model.MES.base_.Dto;
|
||||
using Aliyun.OSS;
|
||||
using DOAN.Model.MES.group;
|
||||
|
||||
namespace DOAN.Service.MES.product
|
||||
{
|
||||
@ -597,5 +598,29 @@ namespace DOAN.Service.MES.product
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取工艺路线
|
||||
/// </summary>
|
||||
/// <param name="dateTime"></param>
|
||||
/// <returns></returns>
|
||||
public List<BaseWorkRoute> GetProcessRoute(DateTime dateTime)
|
||||
{
|
||||
var query= Context.Queryable<GroupSchedule>().Where(it => it.ScheduleDate == dateTime.ToLocalTime().Date);
|
||||
|
||||
return Context.Queryable(query).LeftJoin<BaseWorkRoute>((q, p) => q.FkBelongRouteCode == p.Code).Select((q, p) => p).ToList();
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取班组
|
||||
/// </summary>
|
||||
/// <param name="route_code"></param>
|
||||
/// <returns></returns>
|
||||
public List<GroupSchedule> GetGroupList(string route_code)
|
||||
{
|
||||
|
||||
return Context.Queryable<GroupSchedule>().Where(it => it.FkBelongRouteCode == route_code).ToList();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user