入库管理
This commit is contained in:
@@ -0,0 +1,109 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ZR.Model.Dto;
|
||||
using ZR.Model.Business;
|
||||
using ZR.Service.Business.IBusinessService;
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Admin.WebApi.Filters;
|
||||
|
||||
//创建时间:2025-11-14
|
||||
namespace ZR.Admin.WebApi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// MES成品入库单主表(含产品信息及标签打印状态)
|
||||
/// </summary>
|
||||
[Verify]
|
||||
[Route("productManagement/ProFinishedProductReceipt")]
|
||||
public class ProFinishedProductReceiptController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// MES成品入库单主表(含产品信息及标签打印状态)接口
|
||||
/// </summary>
|
||||
private readonly IProFinishedProductReceiptService _ProFinishedProductReceiptService;
|
||||
|
||||
public ProFinishedProductReceiptController(IProFinishedProductReceiptService ProFinishedProductReceiptService)
|
||||
{
|
||||
_ProFinishedProductReceiptService = ProFinishedProductReceiptService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询MES成品入库单主表(含产品信息及标签打印状态)列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "productManagement:profinishedproductreceipt:list")]
|
||||
public IActionResult QueryProFinishedProductReceipt([FromQuery] ProFinishedProductReceiptQueryDto parm)
|
||||
{
|
||||
var response = _ProFinishedProductReceiptService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询MES成品入库单主表(含产品信息及标签打印状态)详情
|
||||
/// </summary>
|
||||
/// <param name="ReceiptNo"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{ReceiptNo}")]
|
||||
[ActionPermissionFilter(Permission = "productManagement:profinishedproductreceipt:query")]
|
||||
public IActionResult GetProFinishedProductReceipt(string ReceiptNo)
|
||||
{
|
||||
var response = _ProFinishedProductReceiptService.GetInfo(ReceiptNo);
|
||||
|
||||
var info = response.Adapt<ProFinishedProductReceipt>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加MES成品入库单主表(含产品信息及标签打印状态)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "productManagement:profinishedproductreceipt:add")]
|
||||
[Log(Title = "MES成品入库单主表(含产品信息及标签打印状态)", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddProFinishedProductReceipt([FromBody] ProFinishedProductReceiptDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<ProFinishedProductReceipt>().ToCreate(HttpContext);
|
||||
|
||||
var response = _ProFinishedProductReceiptService.AddProFinishedProductReceipt(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新MES成品入库单主表(含产品信息及标签打印状态)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "productManagement:profinishedproductreceipt:edit")]
|
||||
[Log(Title = "MES成品入库单主表(含产品信息及标签打印状态)", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateProFinishedProductReceipt([FromBody] ProFinishedProductReceiptDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<ProFinishedProductReceipt>().ToUpdate(HttpContext);
|
||||
var response = _ProFinishedProductReceiptService.UpdateProFinishedProductReceipt(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除MES成品入库单主表(含产品信息及标签打印状态)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{ids}")]
|
||||
[ActionPermissionFilter(Permission = "productManagement:profinishedproductreceipt:delete")]
|
||||
[Log(Title = "MES成品入库单主表(含产品信息及标签打印状态)", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteProFinishedProductReceipt(string ids)
|
||||
{
|
||||
int[] idsArr = Tools.SpitIntArrary(ids);
|
||||
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
|
||||
|
||||
var response = _ProFinishedProductReceiptService.Delete(idsArr);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ZR.Model.Dto;
|
||||
using ZR.Model.Business;
|
||||
using ZR.Service.Business.IBusinessService;
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Admin.WebApi.Filters;
|
||||
|
||||
//创建时间:2025-11-14
|
||||
namespace ZR.Admin.WebApi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// MES成品入库单操作日志表
|
||||
/// </summary>
|
||||
[Verify]
|
||||
[Route("productManagement/ProFinishedProductReceiptLog")]
|
||||
public class ProFinishedProductReceiptLogController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// MES成品入库单操作日志表接口
|
||||
/// </summary>
|
||||
private readonly IProFinishedProductReceiptLogService _ProFinishedProductReceiptLogService;
|
||||
|
||||
public ProFinishedProductReceiptLogController(IProFinishedProductReceiptLogService ProFinishedProductReceiptLogService)
|
||||
{
|
||||
_ProFinishedProductReceiptLogService = ProFinishedProductReceiptLogService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询MES成品入库单操作日志表列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "productManagement:profinishedproductreceiptlog:list")]
|
||||
public IActionResult QueryProFinishedProductReceiptLog([FromQuery] ProFinishedProductReceiptLogQueryDto parm)
|
||||
{
|
||||
var response = _ProFinishedProductReceiptLogService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询MES成品入库单操作日志表详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "productManagement:profinishedproductreceiptlog:query")]
|
||||
public IActionResult GetProFinishedProductReceiptLog(long Id)
|
||||
{
|
||||
var response = _ProFinishedProductReceiptLogService.GetInfo(Id);
|
||||
|
||||
var info = response.Adapt<ProFinishedProductReceiptLog>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加MES成品入库单操作日志表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "productManagement:profinishedproductreceiptlog:add")]
|
||||
[Log(Title = "MES成品入库单操作日志表", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddProFinishedProductReceiptLog([FromBody] ProFinishedProductReceiptLogDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<ProFinishedProductReceiptLog>().ToCreate(HttpContext);
|
||||
|
||||
var response = _ProFinishedProductReceiptLogService.AddProFinishedProductReceiptLog(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新MES成品入库单操作日志表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "productManagement:profinishedproductreceiptlog:edit")]
|
||||
[Log(Title = "MES成品入库单操作日志表", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateProFinishedProductReceiptLog([FromBody] ProFinishedProductReceiptLogDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<ProFinishedProductReceiptLog>().ToUpdate(HttpContext);
|
||||
var response = _ProFinishedProductReceiptLogService.UpdateProFinishedProductReceiptLog(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除MES成品入库单操作日志表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{ids}")]
|
||||
[ActionPermissionFilter(Permission = "productManagement:profinishedproductreceiptlog:delete")]
|
||||
[Log(Title = "MES成品入库单操作日志表", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteProFinishedProductReceiptLog(string ids)
|
||||
{
|
||||
int[] idsArr = Tools.SpitIntArrary(ids);
|
||||
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
|
||||
|
||||
var response = _ProFinishedProductReceiptLogService.Delete(idsArr);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user