feat: 添加报废记录功能及相关字段扩展
- 新增报废记录表及相关服务、控制器 - 扩展工单报表DTO,增加炉号、领料批次等字段 - 修改报表查询服务,关联工单表获取更多信息 - 在物料入库DTO中添加工单号字段 - 新增IQC文件夹结构
This commit is contained in:
@@ -30,6 +30,7 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
|
||||
return Context
|
||||
.Queryable<ProWorkorder>()
|
||||
.Where(it => it.WorkorderDate >= startDate && it.WorkorderDate <= endDate)
|
||||
.Where(it => it.PlanNum > 0)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
@@ -149,7 +150,9 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
|
||||
Remarks = $"生产领料,工单号:{workorder}",
|
||||
};
|
||||
MmInventoryService mmInventoryService = new();
|
||||
string createReceiptresult = mmInventoryService.CreateOutboundReceipt(revokeRecepitDto);
|
||||
string createReceiptresult = mmInventoryService.CreateOutboundReceipt(
|
||||
revokeRecepitDto
|
||||
);
|
||||
if (createReceiptresult != "ok")
|
||||
{
|
||||
Context.Ado.RollbackTran();
|
||||
@@ -177,7 +180,6 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
|
||||
Context.Ado.RollbackTran();
|
||||
throw;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -269,7 +271,9 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
|
||||
if (mmMaterial == null)
|
||||
{
|
||||
Context.Ado.RollbackTran();
|
||||
throw new Exception($"物料档案不存在,无法成品入库:{proWorkorder.productionCode}");
|
||||
throw new Exception(
|
||||
$"物料档案不存在,无法成品入库:{proWorkorder.productionCode}"
|
||||
);
|
||||
}
|
||||
if (inboundRecord == null)
|
||||
{
|
||||
@@ -316,7 +320,6 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
|
||||
Context.Ado.RollbackTran();
|
||||
throw;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -440,7 +443,7 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
|
||||
string createReceiptresult = mmInventoryService.CreateOutboundReceipt(
|
||||
revokeRecepitDto
|
||||
);
|
||||
if(createReceiptresult != "ok")
|
||||
if (createReceiptresult != "ok")
|
||||
{
|
||||
Context.Ado.RollbackTran();
|
||||
throw new Exception(createReceiptresult);
|
||||
@@ -500,9 +503,19 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
|
||||
return Context
|
||||
.Queryable<ProReportwork01>()
|
||||
.LeftJoin<BaseWorkProcesses>((rw, wp) => rw.ProcessId == wp.Id)
|
||||
.LeftJoin<ProWorkorder>((rw, wp, wo) => rw.Workorder == wo.Workorder)
|
||||
.Where((rw, wp) => rw.Workorder == workorder)
|
||||
.OrderBy(rw => rw.ProcessId)
|
||||
.Select((rw, wp) => new ProReportWorkDetialDto() { ProcessName = wp.Name }, true)
|
||||
.Select(
|
||||
(rw, wp, wo) =>
|
||||
new ProReportWorkDetialDto()
|
||||
{
|
||||
ProcessName = wp.Name,
|
||||
StoveCode = wo.StoveCode,
|
||||
FeedOrder = wo.FeedOrder,
|
||||
},
|
||||
true
|
||||
)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
@@ -518,6 +531,7 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
|
||||
return Context
|
||||
.Queryable<ProReportwork01>()
|
||||
.LeftJoin<BaseWorkProcesses>((rw, wp) => rw.ProcessId == wp.Id)
|
||||
.LeftJoin<ProWorkorder>((rw, wp, wo) => rw.Workorder == wo.Workorder)
|
||||
.Where(
|
||||
(rw, wp) =>
|
||||
rw.Worker == query.name
|
||||
@@ -525,7 +539,16 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
|
||||
&& rw.JobDateTime < DateTime.Today.AddDays(1)
|
||||
)
|
||||
.OrderBy(rw => rw.ProcessId)
|
||||
.Select((rw, wp) => new ProReportWorkDetialDto() { ProcessName = wp.Name }, true)
|
||||
.Select(
|
||||
(rw, wp, wo) =>
|
||||
new ProReportWorkDetialDto()
|
||||
{
|
||||
ProcessName = wp.Name,
|
||||
StoveCode = wo.StoveCode,
|
||||
FeedOrder = wo.FeedOrder,
|
||||
},
|
||||
true
|
||||
)
|
||||
.ToPage_NO_Convert(query);
|
||||
}
|
||||
|
||||
@@ -545,14 +568,24 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
|
||||
return Context
|
||||
.Queryable<ProReportwork01>()
|
||||
.LeftJoin<BaseWorkProcesses>((rw, wp) => rw.ProcessId == wp.Id)
|
||||
.LeftJoin<ProWorkorder>((rw, wp, wo) => rw.Workorder == wo.Workorder)
|
||||
.Where(
|
||||
(rw, wp) =>
|
||||
(rw, wp, wo) =>
|
||||
rw.ProcessId == query.processId
|
||||
&& rw.JobDateTime >= DateTime.Today
|
||||
&& rw.JobDateTime < DateTime.Today.AddDays(1)
|
||||
)
|
||||
.OrderBy(rw => rw.ProcessId)
|
||||
.Select((rw, wp) => new ProReportWorkDetialDto() { ProcessName = wp.Name }, true)
|
||||
.Select(
|
||||
(rw, wp, wo) =>
|
||||
new ProReportWorkDetialDto()
|
||||
{
|
||||
ProcessName = wp.Name,
|
||||
StoveCode = wo.StoveCode,
|
||||
FeedOrder = wo.FeedOrder,
|
||||
},
|
||||
true
|
||||
)
|
||||
.ToPage_NO_Convert(query);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user