抛光记录数据批量插入
This commit is contained in:
@@ -178,6 +178,8 @@ namespace ZR.Service.mes.wms
|
||||
.ToList();
|
||||
#endregion
|
||||
|
||||
//int totalcount = qcQualityStatisticsFirsts.Count + wmPolishQualityStatistics.Count + qcGp12ServiceStatistics.Count + wmGp12QualityStatistics.Count
|
||||
// + wmPolishWorkQualityStatistics.Count;
|
||||
|
||||
#region 组装 WmPolishRecord 实体
|
||||
// 组装 WmPolishRecord 实体
|
||||
@@ -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,7 +227,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,
|
||||
@@ -243,7 +245,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,
|
||||
@@ -261,7 +263,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 = 2,
|
||||
@@ -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