调整成品入库单上传
This commit is contained in:
@@ -1235,6 +1235,41 @@ namespace ZR.Service.Business
|
|||||||
Context.Insertable(qcBackEndLog).ExecuteCommand();
|
Context.Insertable(qcBackEndLog).ExecuteCommand();
|
||||||
// 提交事务
|
// 提交事务
|
||||||
Context.Ado.CommitTran();
|
Context.Ado.CommitTran();
|
||||||
|
// 插入成品入库单
|
||||||
|
_ = Task.Run(() =>
|
||||||
|
{
|
||||||
|
ProFinishedProductReceiptService proFinishedProductReceiptService = new ProFinishedProductReceiptService();
|
||||||
|
ProFinishedProductReceipt newModel = new()
|
||||||
|
{
|
||||||
|
ReceiptNo = "1",
|
||||||
|
SiteNo = qcBackEndWorkorder.SiteNo,
|
||||||
|
WorkOrder = qcBackEndWorkorder.WorkOrder,
|
||||||
|
WarehouseCode = "LS",
|
||||||
|
ReceiptType = "正常入库",
|
||||||
|
Status = "已提交",
|
||||||
|
PartNumber = qcBackEndWorkorder.PartNumber,
|
||||||
|
Description = qcBackEndWorkorder.Description,
|
||||||
|
Color = qcBackEndWorkorder.Color,
|
||||||
|
Specification = qcBackEndWorkorder.Specification,
|
||||||
|
ProductionLine = "00",
|
||||||
|
Team = qcBackEndWorkorder.Team,
|
||||||
|
ShiftNo = "-",
|
||||||
|
LabelFrom = "后道",
|
||||||
|
ProductionTime = nowTime,
|
||||||
|
BatchCode = nowTime.ToString("yyyyMMdd"),
|
||||||
|
Unit = "个",
|
||||||
|
PackageCode = qcBackEndWorkorder.WorkOrder,
|
||||||
|
PackageCount = 1,
|
||||||
|
PackageNum = qcBackEndWorkorder.QualifiedNumber,
|
||||||
|
LabelCode = "",
|
||||||
|
LabelPrintStatus = "未打印",
|
||||||
|
StorageLocation = "LS",
|
||||||
|
QcStatus = "待检验",
|
||||||
|
CreatedBy = qcBackEndWorkorder.CreatedBy,
|
||||||
|
CreatedTime = nowTime
|
||||||
|
};
|
||||||
|
proFinishedProductReceiptService.AddProFinishedProductReceipt(newModel);
|
||||||
|
});
|
||||||
return "ok";
|
return "ok";
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using SqlSugar;
|
|||||||
using System;
|
using System;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using ZR.Model.Business;
|
using ZR.Model.Business;
|
||||||
using ZR.Model.Dto;
|
using ZR.Model.Dto;
|
||||||
using ZR.Model.MES.wms;
|
using ZR.Model.MES.wms;
|
||||||
@@ -733,6 +734,41 @@ namespace ZR.Service.Business
|
|||||||
Context.Insertable(qcGp12Log).ExecuteCommand();
|
Context.Insertable(qcGp12Log).ExecuteCommand();
|
||||||
// 提交事务
|
// 提交事务
|
||||||
Context.Ado.CommitTran();
|
Context.Ado.CommitTran();
|
||||||
|
// 插入成品入库单
|
||||||
|
_ = Task.Run(() =>
|
||||||
|
{
|
||||||
|
ProFinishedProductReceiptService proFinishedProductReceiptService = new ProFinishedProductReceiptService();
|
||||||
|
ProFinishedProductReceipt newModel = new() {
|
||||||
|
ReceiptNo = "1",
|
||||||
|
SiteNo = qcGp12Workorder.SiteNo,
|
||||||
|
WorkOrder = qcGp12Workorder.WorkOrder,
|
||||||
|
WarehouseCode = "LS",
|
||||||
|
ReceiptType = "正常入库",
|
||||||
|
Status = "已提交",
|
||||||
|
PartNumber = qcGp12Workorder.PartNumber,
|
||||||
|
Description = qcGp12Workorder.Description,
|
||||||
|
Color = qcGp12Workorder.Color,
|
||||||
|
Specification = qcGp12Workorder.Specification,
|
||||||
|
ProductionLine = "00",
|
||||||
|
Team = qcGp12Workorder.Team,
|
||||||
|
ShiftNo = "-",
|
||||||
|
LabelFrom = "GP12",
|
||||||
|
ProductionTime = nowTime,
|
||||||
|
BatchCode = nowTime.ToString("yyyyMMdd"),
|
||||||
|
Unit = "个",
|
||||||
|
PackageCode = qcGp12Workorder.WorkOrder,
|
||||||
|
PackageCount = 1,
|
||||||
|
PackageNum = qcGp12Workorder.QualifiedNumber,
|
||||||
|
LabelCode = "",
|
||||||
|
LabelPrintStatus = "未打印",
|
||||||
|
StorageLocation = "LS",
|
||||||
|
QcStatus = "待检验",
|
||||||
|
CreatedBy = qcGp12Workorder.CreatedBy,
|
||||||
|
CreatedTime = nowTime
|
||||||
|
};
|
||||||
|
proFinishedProductReceiptService.AddProFinishedProductReceipt(newModel);
|
||||||
|
});
|
||||||
|
|
||||||
return "ok";
|
return "ok";
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
Reference in New Issue
Block a user