feat(工单管理): 新增批量删除工单和批量领料功能
- 在工单DTO中增加领料数和成品在库数字段 - 实现批量删除工单功能并进行前置校验 - 实现根据工单ID批量领料功能 - 优化原材料领料外联查询显示炉号 - 修复领料查询条件忽略备注为null的记录问题
This commit is contained in:
@@ -131,6 +131,29 @@ namespace DOAN.Admin.WebApi.Controllers
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量安全删除工单
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("BatchDeleteWorkOrder")]
|
||||
[ActionPermissionFilter(Permission = "productManagement:proworkorder:add")]
|
||||
[Log(Title = "删除工单", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult BatchDeleteWorkOrder([FromBody] WorkOrderBatchDto parm)
|
||||
{
|
||||
try
|
||||
{
|
||||
var response = _ProWorkorderService.BatchDeleteWorkOrder(parm);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
return ToResponse(new ApiResult(500,ex.Message));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// 生成工单号
|
||||
///// </summary>
|
||||
@@ -553,6 +576,32 @@ namespace DOAN.Admin.WebApi.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量领料接口
|
||||
/// </summary>
|
||||
/// <param name="request">领料请求参数</param>
|
||||
/// <returns>操作结果</returns>
|
||||
[HttpPost("BatchTakeMaterialByIds")]
|
||||
[ActionPermissionFilter(Permission = "productManagement:proworkorder:edit")]
|
||||
[Log(Title = "批量领料", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult BatchTakeMaterialByIds([FromBody] WorkOrderBatchDto parm)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (parm == null)
|
||||
{
|
||||
return ToResponse(ApiResult.Error($"领料请求参数不能为空"));
|
||||
}
|
||||
|
||||
var response = _ProWorkorderMaterialService.BatchTakeMaterialByIds(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ToResponse(new ApiResult(500, ex.Message));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 成品入库接口
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user