2024-07-25 17:36:22 +08:00
|
|
|
|
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-07-25
|
|
|
|
|
|
namespace ZR.Admin.WebApi.Controllers
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 工艺路线-抛光 库存变动表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Verify]
|
|
|
|
|
|
[Route("/mes/wm/WmPolishRecord")]
|
|
|
|
|
|
public class WmPolishRecordController : BaseController
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 工艺路线-抛光 库存变动表接口
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private readonly IWmPolishRecordService _WmPolishRecordService;
|
|
|
|
|
|
|
|
|
|
|
|
public WmPolishRecordController(IWmPolishRecordService WmPolishRecordService)
|
|
|
|
|
|
{
|
|
|
|
|
|
_WmPolishRecordService = WmPolishRecordService;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询工艺路线-抛光 库存变动表列表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="parm"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet("list")]
|
2024-11-15 18:51:05 +08:00
|
|
|
|
// [ActionPermissionFilter(Permission = "business:wmpolishrecord:list")]
|
2024-07-25 17:36:22 +08:00
|
|
|
|
public IActionResult QueryWmPolishRecord([FromQuery] WmPolishRecordQueryDto parm)
|
|
|
|
|
|
{
|
|
|
|
|
|
var response = _WmPolishRecordService.GetList(parm);
|
|
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询工艺路线-抛光 库存变动表详情
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="Id"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet("{Id}")]
|
2024-11-15 18:51:05 +08:00
|
|
|
|
// [ActionPermissionFilter(Permission = "business:wmpolishrecord:query")]
|
2024-07-25 17:36:22 +08:00
|
|
|
|
public IActionResult GetWmPolishRecord(string Id)
|
|
|
|
|
|
{
|
|
|
|
|
|
var response = _WmPolishRecordService.GetInfo(Id);
|
|
|
|
|
|
|
|
|
|
|
|
var info = response.Adapt<WmPolishRecord>();
|
|
|
|
|
|
return SUCCESS(info);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 添加工艺路线-抛光 库存变动表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost]
|
2024-11-15 18:51:05 +08:00
|
|
|
|
// [ActionPermissionFilter(Permission = "business:wmpolishrecord:add")]
|
2024-07-25 17:36:22 +08:00
|
|
|
|
[Log(Title = "工艺路线-抛光 库存变动表", BusinessType = BusinessType.INSERT)]
|
|
|
|
|
|
public IActionResult AddWmPolishRecord([FromBody] WmPolishRecordDto parm)
|
|
|
|
|
|
{
|
|
|
|
|
|
var modal = parm.Adapt<WmPolishRecord>().ToCreate(HttpContext);
|
|
|
|
|
|
|
|
|
|
|
|
var response = _WmPolishRecordService.AddWmPolishRecord(modal);
|
|
|
|
|
|
|
|
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 更新工艺路线-抛光 库存变动表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPut]
|
2024-11-15 18:51:05 +08:00
|
|
|
|
// [ActionPermissionFilter(Permission = "business:wmpolishrecord:edit")]
|
2024-07-25 17:36:22 +08:00
|
|
|
|
[Log(Title = "工艺路线-抛光 库存变动表", BusinessType = BusinessType.UPDATE)]
|
|
|
|
|
|
public IActionResult UpdateWmPolishRecord([FromBody] WmPolishRecordDto parm)
|
|
|
|
|
|
{
|
|
|
|
|
|
var modal = parm.Adapt<WmPolishRecord>().ToUpdate(HttpContext);
|
|
|
|
|
|
var response = _WmPolishRecordService.UpdateWmPolishRecord(modal);
|
|
|
|
|
|
|
|
|
|
|
|
return ToResponse(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 删除工艺路线-抛光 库存变动表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpDelete("{ids}")]
|
2024-11-15 18:51:05 +08:00
|
|
|
|
// [ActionPermissionFilter(Permission = "business:wmpolishrecord:delete")]
|
2024-07-25 17:36:22 +08:00
|
|
|
|
[Log(Title = "工艺路线-抛光 库存变动表", BusinessType = BusinessType.DELETE)]
|
|
|
|
|
|
public IActionResult DeleteWmPolishRecord(string ids)
|
|
|
|
|
|
{
|
|
|
|
|
|
int[] idsArr = Tools.SpitIntArrary(ids);
|
|
|
|
|
|
if (idsArr.Length <= 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
return ToResponse(ApiResult.Error($"删除失败Id 不能为空"));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var response = _WmPolishRecordService.Delete(idsArr);
|
|
|
|
|
|
|
|
|
|
|
|
return ToResponse(response);
|
|
|
|
|
|
}
|
2025-03-24 08:43:33 +08:00
|
|
|
|
|
2025-03-24 08:45:29 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 根据日期获取抛光记录表数据
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
2025-03-24 10:09:16 +08:00
|
|
|
|
[HttpPost("GetWmPolishRecordByDate")]
|
2025-03-24 08:43:33 +08:00
|
|
|
|
public IActionResult GetWmPolishRecordByDate([FromBody] WmPolishRecordGenerateDto parm)
|
|
|
|
|
|
{
|
|
|
|
|
|
|
2025-06-02 09:07:55 +08:00
|
|
|
|
var response = _WmPolishRecordService.GenerateWmPolishRecord02(parm);
|
2025-03-24 08:43:33 +08:00
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-07-25 17:36:22 +08:00
|
|
|
|
}
|