出入库调整
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using Azure;
|
||||
using DOAN.Model.Mobile.ReportFlow.Dto;
|
||||
using DOAN.Service.Mobile.IService;
|
||||
using Infrastructure.Converter;
|
||||
@@ -92,6 +93,8 @@ public class ReportFlowController : BaseController
|
||||
string feed_order,
|
||||
string process_operator
|
||||
)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(workorder))
|
||||
{
|
||||
@@ -109,6 +112,13 @@ public class ReportFlowController : BaseController
|
||||
)
|
||||
);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
return ToResponse(new ApiResult(500, e.Message));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//TODO 工序报工
|
||||
/// <summary>
|
||||
@@ -122,6 +132,8 @@ public class ReportFlowController : BaseController
|
||||
/// <exception cref="CustomException"></exception>
|
||||
[HttpGet("process_reportwork")]
|
||||
public IActionResult ProcessReportWork([FromQuery] ProReportWorkDto proReportWorkDto)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(proReportWorkDto.workorder))
|
||||
{
|
||||
@@ -138,6 +150,13 @@ public class ReportFlowController : BaseController
|
||||
)
|
||||
);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
return ToResponse(new ApiResult(500, e.Message));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//TODO 出货工序
|
||||
[HttpGet("shipment_process_reportwork")]
|
||||
@@ -149,6 +168,8 @@ public class ReportFlowController : BaseController
|
||||
string customer_order,
|
||||
string process_operator
|
||||
)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(workorder))
|
||||
{
|
||||
@@ -189,6 +210,12 @@ public class ReportFlowController : BaseController
|
||||
}
|
||||
return SUCCESS(data);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return ToResponse(new ApiResult(500, e.Message));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//TODO 获取工单下的报工列表
|
||||
[HttpGet("get_workorder_reportwork_list")]
|
||||
|
||||
@@ -304,12 +304,9 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (inboundRecord.Quantity != finish_num)
|
||||
{
|
||||
Context.Ado.RollbackTran();
|
||||
throw new Exception("修改数量前请先撤销已有生产入库记录!");
|
||||
}
|
||||
throw new Exception("重新成品入库前请先撤销已有物料生产入库记录!");
|
||||
}
|
||||
}
|
||||
Context.Ado.CommitTran();
|
||||
@@ -450,12 +447,9 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (outboundDto.Quantity != finish_num)
|
||||
{
|
||||
Context.Ado.RollbackTran();
|
||||
throw new Exception("修改数量前请先撤销出货出库记录");
|
||||
}
|
||||
throw new Exception("重新出货前请先撤销物料出货出库记录");
|
||||
}
|
||||
|
||||
// 修改工单信息
|
||||
|
||||
Reference in New Issue
Block a user