仓库模块_出库货物记录:init
This commit is contained in:
@@ -0,0 +1,111 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Admin.WebApi.Filters;
|
||||
using ZR.Model.MES.wms;
|
||||
using ZR.Model.MES.wms.Dto;
|
||||
using ZR.Service.mes.wms.IService;
|
||||
|
||||
//创建时间:2024-03-22
|
||||
namespace ZR.Admin.WebApi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 出库货物记录表
|
||||
/// </summary>
|
||||
[Verify]
|
||||
[Route("/mes/wm/WmGoodsOutProduction")]
|
||||
public class WmGoodsOutProductionController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// 出库货物记录表接口
|
||||
/// </summary>
|
||||
private readonly IWmGoodsOutProductionService _WmGoodsOutProductionService;
|
||||
|
||||
public WmGoodsOutProductionController(IWmGoodsOutProductionService WmGoodsOutProductionService)
|
||||
{
|
||||
_WmGoodsOutProductionService = WmGoodsOutProductionService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询出库货物记录表列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "business:wmgoodsoutproduction:list")]
|
||||
public IActionResult QueryWmGoodsOutProduction([FromQuery] WmGoodsOutProductionQueryDto parm)
|
||||
{
|
||||
var response = _WmGoodsOutProductionService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询出库货物记录表详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "business:wmgoodsoutproduction:query")]
|
||||
public IActionResult GetWmGoodsOutProduction(string Id)
|
||||
{
|
||||
var response = _WmGoodsOutProductionService.GetInfo(Id);
|
||||
|
||||
var info = response.Adapt<WmGoodsOutProduction>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加出库货物记录表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "business:wmgoodsoutproduction:add")]
|
||||
[Log(Title = "出库货物记录表", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddWmGoodsOutProduction([FromBody] WmGoodsOutProductionDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<WmGoodsOutProduction>().ToCreate(HttpContext);
|
||||
|
||||
var response = _WmGoodsOutProductionService.AddWmGoodsOutProduction(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新出库货物记录表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "business:wmgoodsoutproduction:edit")]
|
||||
[Log(Title = "出库货物记录表", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateWmGoodsOutProduction([FromBody] WmGoodsOutProductionDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<WmGoodsOutProduction>().ToUpdate(HttpContext);
|
||||
var response = _WmGoodsOutProductionService.UpdateWmGoodsOutProduction(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除出库货物记录表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{ids}")]
|
||||
[ActionPermissionFilter(Permission = "business:wmgoodsoutproduction:delete")]
|
||||
[Log(Title = "出库货物记录表", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteWmGoodsOutProduction(string ids)
|
||||
{
|
||||
int[] idsArr = Tools.SpitIntArrary(ids);
|
||||
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
|
||||
|
||||
var response = _WmGoodsOutProductionService.Delete(idsArr);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -135,6 +135,37 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 生成出货单的物料信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("getoutorder_matrials")]
|
||||
public IActionResult Queryoutoder_matrials(string shipment_num)
|
||||
{
|
||||
if (shipment_num == null)
|
||||
{
|
||||
return SUCCESS(null);
|
||||
|
||||
}
|
||||
List<WmMaterialQuery_print> data = _WmOutOrderService.Queryoutoder_matrials(shipment_num);
|
||||
return SUCCESS(data);
|
||||
}
|
||||
/// <summary>
|
||||
/// 生成出货单的出货计划
|
||||
/// </summary>
|
||||
/// <param name="shipment_num"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("generate_outorderplan")]
|
||||
public IActionResult Generate_outorderplan(string shipment_num)
|
||||
{
|
||||
if (shipment_num == null)
|
||||
{
|
||||
return SUCCESS(null);
|
||||
}
|
||||
List<WmOutOrderPlan> WmOutOrderPlanList= _WmOutOrderService.Generate_outorderplan(shipment_num);
|
||||
|
||||
return SUCCESS(WmOutOrderPlanList);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user