修正
This commit is contained in:
@@ -0,0 +1,102 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using DOAN.Model.PBL.Dto;
|
||||
using DOAN.Model.PBL;
|
||||
using DOAN.Service.PBL.IService;
|
||||
using DOAN.Admin.WebApi.Filters;
|
||||
|
||||
//创建时间:2024-09-23
|
||||
namespace DOAN.Admin.WebApi.Controllers.PBL
|
||||
{
|
||||
/// <summary>
|
||||
/// 库存日志
|
||||
/// </summary>
|
||||
[Verify]
|
||||
[Route("PBL/Inventorylog")]
|
||||
public class InventorylogController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// 库存日志接口
|
||||
/// </summary>
|
||||
private readonly IInventorylogService _InventorylogService;
|
||||
|
||||
public InventorylogController(IInventorylogService InventorylogService)
|
||||
{
|
||||
_InventorylogService = InventorylogService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询库存日志列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "inventorylog:list")]
|
||||
public IActionResult QueryInventorylog([FromQuery] InventorylogQueryDto parm)
|
||||
{
|
||||
var response = _InventorylogService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询库存日志详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "inventorylog:query")]
|
||||
public IActionResult GetInventorylog(string Id)
|
||||
{
|
||||
var response = _InventorylogService.GetInfo(Id);
|
||||
|
||||
var info = response.Adapt<InventorylogDto>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加库存日志
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "inventorylog:add")]
|
||||
[Log(Title = "库存日志", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddInventorylog([FromBody] InventorylogDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<Inventorylog>().ToCreate(HttpContext);
|
||||
|
||||
var response = _InventorylogService.AddInventorylog(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新库存日志
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "inventorylog:edit")]
|
||||
[Log(Title = "库存日志", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateInventorylog([FromBody] InventorylogDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<Inventorylog>().ToUpdate(HttpContext);
|
||||
var response = _InventorylogService.UpdateInventorylog(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除库存日志
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("delete/{ids}")]
|
||||
[ActionPermissionFilter(Permission = "inventorylog:delete")]
|
||||
[Log(Title = "库存日志", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteInventorylog([FromRoute]string ids)
|
||||
{
|
||||
var idArr = Tools.SplitAndConvert<string>(ids);
|
||||
|
||||
return ToResponse(_InventorylogService.Delete(idArr));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using DOAN.Model.PBL.Dto;
|
||||
using DOAN.Model.PBL;
|
||||
using DOAN.Service.PBL.IPBLService;
|
||||
using DOAN.Admin.WebApi.Filters;
|
||||
using Infrastructure.Converter;
|
||||
|
||||
//创建时间:2024-11-01
|
||||
namespace DOAN.Admin.WebApi.Controllers.PBL
|
||||
@@ -33,6 +34,9 @@ namespace DOAN.Admin.WebApi.Controllers.PBL
|
||||
[ActionPermissionFilter(Permission = "lightlog:list")]
|
||||
public IActionResult QueryLightLog([FromQuery] LightLogQueryDto parm)
|
||||
{
|
||||
parm.TimeRange[0]= DOANConvertDateTime.ConvertLocalDateTime(parm.TimeRange[0]??DateTime.MinValue);
|
||||
parm.TimeRange[1]= DOANConvertDateTime.ConvertLocalDateTime(parm.TimeRange[1]??DateTime.MinValue);
|
||||
|
||||
var response = _LightLogService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using DOAN.Model.PBL.Dto;
|
||||
using DOAN.Model.PBL;
|
||||
using DOAN.Service.PBL.IService;
|
||||
using DOAN.Admin.WebApi.Filters;
|
||||
|
||||
//创建时间:2024-09-23
|
||||
namespace DOAN.Admin.WebApi.Controllers.PBL
|
||||
{
|
||||
/// <summary>
|
||||
/// 与MES交互
|
||||
/// </summary>
|
||||
[AllowAnonymous]
|
||||
[Route("PBL/mes_interation")]
|
||||
public class MESInteractionController : BaseController
|
||||
{
|
||||
private readonly IMESInteractionServcie mesInteraction;
|
||||
public MESInteractionController(IMESInteractionServcie mesInteraction)
|
||||
{
|
||||
this.mesInteraction = mesInteraction;
|
||||
}
|
||||
|
||||
//TODO 接受工单 亮灯
|
||||
|
||||
[HttpPost("mes_light_up")]
|
||||
public IActionResult MESLightUp([FromBody] LightUpDto light)
|
||||
{
|
||||
var response= mesInteraction.MESLightUp(light);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
//TODO 扫码灭灯
|
||||
[HttpGet("mes_light_down")]
|
||||
public IActionResult MESLightDown(string scan_code)
|
||||
{
|
||||
var response = mesInteraction.MESLightDown(scan_code);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ using DOAN.Model.PBL.Dto;
|
||||
using DOAN.Model.PBL;
|
||||
using DOAN.Service.PBL.IPBLService;
|
||||
using DOAN.Admin.WebApi.Filters;
|
||||
using Infrastructure.Converter;
|
||||
|
||||
//创建时间:2024-11-01
|
||||
namespace DOAN.Admin.WebApi.Controllers.PBL
|
||||
@@ -33,6 +34,11 @@ namespace DOAN.Admin.WebApi.Controllers.PBL
|
||||
[ActionPermissionFilter(Permission = "mesinterationlog:list")]
|
||||
public IActionResult QueryMesInterationLog([FromQuery] MesInterationLogQueryDto parm)
|
||||
{
|
||||
parm.TimeRange[0]= DOANConvertDateTime.ConvertLocalDateTime(parm.TimeRange[0]??DateTime.MinValue);
|
||||
parm.TimeRange[1]= DOANConvertDateTime.ConvertLocalDateTime(parm.TimeRange[1]??DateTime.MinValue);
|
||||
|
||||
|
||||
|
||||
var response = _MesInterationLogService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user