feat(工单管理): 新增工单物料查询及生产进度功能
新增工单物料服务接口及实现,包括领料清单、成品入库清单和出货清单查询 添加工单生产进度查询功能及相关DTO定义 完善工单修改日志记录功能 规范工单号字段使用,区分原材料工单号和当前工单号
This commit is contained in:
@@ -22,9 +22,15 @@ namespace DOAN.Admin.WebApi.Controllers
|
||||
/// </summary>
|
||||
private readonly IProWorkorderService _ProWorkorderService;
|
||||
|
||||
public ProWorkorderController(IProWorkorderService ProWorkorderService)
|
||||
/// <summary>
|
||||
/// 工单物料接口
|
||||
/// </summary>
|
||||
private readonly IProWorkorderMaterialService _ProWorkorderMaterialService;
|
||||
|
||||
public ProWorkorderController(IProWorkorderService ProWorkorderService, IProWorkorderMaterialService ProWorkorderMaterialService)
|
||||
{
|
||||
_ProWorkorderService = ProWorkorderService;
|
||||
_ProWorkorderMaterialService = ProWorkorderMaterialService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -397,5 +403,102 @@ namespace DOAN.Admin.WebApi.Controllers
|
||||
return ToResponse(500, ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取工单生产进度
|
||||
/// </summary>
|
||||
/// <param name="workorder">工单号</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("getWorkorderWithProgress/{workorder}")]
|
||||
[ActionPermissionFilter(Permission = "productManagement:proworkorder:query")]
|
||||
public IActionResult GetWorkorderWithProgress(string workorder)
|
||||
{
|
||||
try
|
||||
{
|
||||
var response = _ProWorkorderService.GetWorkorderWithProgress(workorder);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
return ToResponse(500, ex.Message);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据工单号查询领料清单
|
||||
/// </summary>
|
||||
/// <param name="workorder">工单号</param>
|
||||
/// <returns>领料清单数据</returns>
|
||||
[HttpGet("GetMaterialTakeList/{workorder}")]
|
||||
[ActionPermissionFilter(Permission = "productManagement:proworkorder:query")]
|
||||
public IActionResult GetMaterialTakeList(string workorder)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(workorder))
|
||||
{
|
||||
return ToResponse(ApiResult.Error($"工单号不能为空"));
|
||||
}
|
||||
|
||||
var response = _ProWorkorderMaterialService.GetMaterialTakeList(workorder);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ToResponse(500, ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据工单号查询成品入库清单
|
||||
/// </summary>
|
||||
/// <param name="workorder">工单号</param>
|
||||
/// <returns>成品入库清单数据</returns>
|
||||
[HttpGet("GetProductStorageList/{workorder}")]
|
||||
[ActionPermissionFilter(Permission = "productManagement:proworkorder:query")]
|
||||
public IActionResult GetProductStorageList(string workorder)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(workorder))
|
||||
{
|
||||
return ToResponse(ApiResult.Error($"工单号不能为空"));
|
||||
}
|
||||
|
||||
var response = _ProWorkorderMaterialService.GetProductStorageList(workorder);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ToResponse(500, ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据工单号查询出货清单
|
||||
/// </summary>
|
||||
/// <param name="workorder">工单号</param>
|
||||
/// <returns>出货清单数据</returns>
|
||||
[HttpGet("GetShipmentList/{workorder}")]
|
||||
[ActionPermissionFilter(Permission = "productManagement:proworkorder:query")]
|
||||
public IActionResult GetShipmentList(string workorder)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(workorder))
|
||||
{
|
||||
return ToResponse(ApiResult.Error($"工单号不能为空"));
|
||||
}
|
||||
|
||||
var response = _ProWorkorderMaterialService.GetShipmentList(workorder);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return ToResponse(500, ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user