计划于物流结束
This commit is contained in:
@@ -20,6 +20,7 @@ using static System.Net.WebRequestMethods;
|
||||
using JinianNet.JNTemplate;
|
||||
using static Aliyun.OSS.Model.LiveChannelStat;
|
||||
using ZR.Model.MES.pro.DTO;
|
||||
using ZR.Model.MES.qu;
|
||||
|
||||
namespace ZR.Service.mes.pro
|
||||
{
|
||||
@@ -97,7 +98,6 @@ namespace ZR.Service.mes.pro
|
||||
// 生成领料单
|
||||
// 若没有此零件号的领料单,就新增,否则,修改累加
|
||||
|
||||
|
||||
bool isExit = Context.Queryable<WmWorkorderMr>().Where(it => it.WorkorderId == workorder.Id).Any();
|
||||
if (!isExit)
|
||||
{
|
||||
@@ -121,6 +121,17 @@ namespace ZR.Service.mes.pro
|
||||
mr.CreatedBy = context.User?.Identity?.Name;
|
||||
mr.CreatedTime = DateTime.Now;
|
||||
Context.Insertable(mr).ExecuteCommandAsync();
|
||||
|
||||
//新增领料单统计表
|
||||
QcRough qcRough=new QcRough ();
|
||||
qcRough.Id = DateTime.Now.ToString("yyyyMMddHHmmss");
|
||||
qcRough.FkMaterialrequisitionId= materialrequisition.Id;
|
||||
qcRough.RequireNum = materialrequisition.Requirenum;
|
||||
qcRough.ActualNumber = materialrequisition.Requirenum;
|
||||
qcRough.CreatedBy= context.User?.Identity?.Name;
|
||||
qcRough.CreatedTime= DateTime.Now;
|
||||
qcRough.OksRatio = 10;
|
||||
Context.Insertable (qcRough).ExecuteCommandAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -139,7 +150,10 @@ namespace ZR.Service.mes.pro
|
||||
wm[0].UpdatedBy = context.User?.Identity?.Name;
|
||||
//更新领料单
|
||||
Context.Updateable(wm[0]);
|
||||
|
||||
//更新检验表
|
||||
Context.Updateable<QcRough>().SetColumns(it => it.RequireNum == wm[0].Requirenum)
|
||||
.SetColumns(it => it.ActualNumber == wm[0].Requirenum)
|
||||
.Where(it => it.FkMaterialrequisitionId == wm[0].Id).ExecuteCommandAsync();
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user