抛光记录数据批量插入
This commit is contained in:
@@ -178,10 +178,12 @@ namespace ZR.Service.mes.wms
|
||||
.ToList();
|
||||
#endregion
|
||||
|
||||
//int totalcount = qcQualityStatisticsFirsts.Count + wmPolishQualityStatistics.Count + qcGp12ServiceStatistics.Count + wmGp12QualityStatistics.Count
|
||||
// + wmPolishWorkQualityStatistics.Count;
|
||||
|
||||
#region 组装 WmPolishRecord 实体
|
||||
// 组装 WmPolishRecord 实体
|
||||
List<WmPolishRecord> wmPolishRecords = new List<WmPolishRecord>();
|
||||
#region 组装 WmPolishRecord 实体
|
||||
// 组装 WmPolishRecord 实体
|
||||
List<WmPolishRecord> wmPolishRecords = new List<WmPolishRecord>();
|
||||
|
||||
foreach (var item in qcQualityStatisticsFirsts)
|
||||
{
|
||||
@@ -189,7 +191,7 @@ namespace ZR.Service.mes.wms
|
||||
new WmPolishRecord
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId().ToString(),
|
||||
FkInventoryId = SnowFlakeSingle.Instance.NextId().ToString(),
|
||||
FkInventoryId = item.Id,
|
||||
Code = "自动",
|
||||
Partnumber = item.FinishedPartNumber,
|
||||
ChangeType = 1,
|
||||
@@ -207,7 +209,7 @@ namespace ZR.Service.mes.wms
|
||||
new WmPolishRecord
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId().ToString(),
|
||||
FkInventoryId = SnowFlakeSingle.Instance.NextId().ToString(),
|
||||
FkInventoryId = item.Id,
|
||||
Code = "自动",
|
||||
Partnumber = item.Partnumber,
|
||||
ChangeType = 1,
|
||||
@@ -225,8 +227,8 @@ namespace ZR.Service.mes.wms
|
||||
new WmPolishRecord
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId().ToString(),
|
||||
FkInventoryId = SnowFlakeSingle.Instance.NextId().ToString(),
|
||||
Code = "自动",
|
||||
FkInventoryId = item.Id,
|
||||
Code = "自动",
|
||||
Partnumber = item.PartNumber,
|
||||
ChangeType = 1,
|
||||
ChangeQuantity = item.PolishNumber,
|
||||
@@ -243,8 +245,8 @@ namespace ZR.Service.mes.wms
|
||||
new WmPolishRecord
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId().ToString(),
|
||||
FkInventoryId = SnowFlakeSingle.Instance.NextId().ToString(),
|
||||
Code = "自动",
|
||||
FkInventoryId = item.Id,
|
||||
Code = "自动",
|
||||
Partnumber = item.Partnumber,
|
||||
ChangeType = 1,
|
||||
ChangeQuantity = item.PaoguangTotal,
|
||||
@@ -261,14 +263,14 @@ namespace ZR.Service.mes.wms
|
||||
new WmPolishRecord
|
||||
{
|
||||
Id = SnowFlakeSingle.Instance.NextId().ToString(),
|
||||
FkInventoryId = SnowFlakeSingle.Instance.NextId().ToString(),
|
||||
FkInventoryId = item.Id,
|
||||
Code = "自动",
|
||||
Partnumber = item.Partnumber,
|
||||
ChangeType = 2,
|
||||
ChangeQuantity = item.RequireNumber,
|
||||
ActionTime = item.StartTime,
|
||||
Status = 1,
|
||||
Remark = " 根据日期范围 去取抛光操作出库的数据"
|
||||
Remark = " 根据日期范围 去取抛光操作出库的数据"
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -280,7 +282,7 @@ namespace ZR.Service.mes.wms
|
||||
List<WmPolishRecord> delwmPolishRecords = Context
|
||||
.Queryable<WmPolishRecord>()
|
||||
.Where(it => it.Code == "自动")
|
||||
.Where(it => it.CreatedTime >= parm.StartTime && it.CreatedTime <= parm.EndTime)
|
||||
.Where(it => it.ActionTime >= parm.StartTime && it.ActionTime <= parm.EndTime)
|
||||
.ToList();
|
||||
Context.Deleteable(delwmPolishRecords).ExecuteCommand();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user