调整成品入库单上传

This commit is contained in:
2025-11-18 09:46:44 +08:00
parent 196b9b48e5
commit 12a32e1942
2 changed files with 71 additions and 0 deletions

View File

@@ -1235,6 +1235,41 @@ namespace ZR.Service.Business
Context.Insertable(qcBackEndLog).ExecuteCommand();
// 提交事务
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";
}
catch (Exception ex)

View File

@@ -3,6 +3,7 @@ using SqlSugar;
using System;
using System.Text.Json;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using ZR.Model.Business;
using ZR.Model.Dto;
using ZR.Model.MES.wms;
@@ -733,6 +734,41 @@ namespace ZR.Service.Business
Context.Insertable(qcGp12Log).ExecuteCommand();
// 提交事务
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";
}
catch (Exception ex)