😎优化返回信息
This commit is contained in:
parent
f68afb05f4
commit
9bad46f77f
@ -229,10 +229,13 @@ public class DataValidationService : IDynamicApiController, ITransient
|
||||
}
|
||||
|
||||
// 创建新的 EcnItemData 对象并添加到列表中
|
||||
encodingList.Add(new EcnItemData
|
||||
if (data != null)
|
||||
{
|
||||
Matnr = data._System_objNBS
|
||||
});
|
||||
encodingList.Add(new EcnItemData
|
||||
{
|
||||
Matnr = data._System_objNBS
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 返回编码列表
|
||||
@ -406,17 +409,17 @@ public class DataValidationService : IDynamicApiController, ITransient
|
||||
var data = await db.CopyNew().Queryable<Obj137>().Where(x => x.RecordGuid == recordGuid && x.deleted == false).OrderByDescending(x => x.idRecord).FirstAsync();
|
||||
if (data != null)
|
||||
{
|
||||
db.CopyNew().Updateable<Obj137>()
|
||||
.SetColumns(it => new Obj137
|
||||
{
|
||||
fld006530 = Bdmng,
|
||||
fld005623 = Labst,
|
||||
fld006531 = ZwqslPo,
|
||||
fld006532 = ZwqslPr,
|
||||
fld005624 = dateUpdated
|
||||
})
|
||||
.Where(it => it.idRecord == data.idRecord)
|
||||
.ExecuteCommand();
|
||||
db.CopyNew().Updateable<Obj137>()
|
||||
.SetColumns(it => new Obj137
|
||||
{
|
||||
fld006530 = Bdmng,
|
||||
fld005623 = Labst,
|
||||
fld006531 = ZwqslPo,
|
||||
fld006532 = ZwqslPr,
|
||||
fld005624 = dateUpdated
|
||||
})
|
||||
.Where(it => it.idRecord == data.idRecord)
|
||||
.ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
||||
@ -463,17 +466,17 @@ public class DataValidationService : IDynamicApiController, ITransient
|
||||
var data = await db.CopyNew().Queryable<Obj112>().Where(x => x.RecordGuid == recordGuid && x.deleted == false).FirstAsync();
|
||||
if (data != null)
|
||||
{
|
||||
db.CopyNew().Updateable<Obj112>()
|
||||
.SetColumns(it => new Obj112
|
||||
{
|
||||
fld006750 = "",
|
||||
fld006751 = "",
|
||||
fld006752 = "",
|
||||
fld006753 = "",
|
||||
fld006755 = dateUpdated
|
||||
})
|
||||
.Where(it => it.idRecord == data.idRecord)
|
||||
.ExecuteCommand();
|
||||
db.CopyNew().Updateable<Obj112>()
|
||||
.SetColumns(it => new Obj112
|
||||
{
|
||||
fld006750 = "",
|
||||
fld006751 = "",
|
||||
fld006752 = "",
|
||||
fld006753 = "",
|
||||
fld006755 = dateUpdated
|
||||
})
|
||||
.Where(it => it.idRecord == data.idRecord)
|
||||
.ExecuteCommand();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,16 +39,16 @@ public class EcnVarianceList : IJob
|
||||
|
||||
DateTime startTime = DateTime.Now;
|
||||
var sapOutputs = await _changeNoticeEcn.EcnVarianceList();
|
||||
var json = JsonConvert.SerializeObject(sapOutputs);
|
||||
//var json = JsonConvert.SerializeObject(sapOutputs);
|
||||
|
||||
string output = json;
|
||||
//string output = json;
|
||||
var elapsedMilliseconds = (DateTime.Now - startTime).TotalMilliseconds;
|
||||
|
||||
db.CopyNew().Insertable<ScheduledTaskLog>(new
|
||||
{
|
||||
TaskName = "生成ECN差异清单",
|
||||
LogDateTime = DateTime.Now,
|
||||
ReturnResult = output,
|
||||
ReturnResult = sapOutputs,
|
||||
Elapsed = elapsedMilliseconds.ToLong()
|
||||
}).ExecuteCommand();
|
||||
|
||||
|
@ -275,6 +275,7 @@ public class ChangeNoticeEcnService : IDynamicApiController, ITransient
|
||||
var output = new SapOutput()
|
||||
{
|
||||
parameter = apiOutput.parameter,
|
||||
materialCode = input[i]._System_objNBS,
|
||||
code = codeVal,
|
||||
msg = msg,
|
||||
result = apiOutput.result
|
||||
@ -305,9 +306,14 @@ public class ChangeNoticeEcnService : IDynamicApiController, ITransient
|
||||
var ecnList = list.GroupBy(x => x.RecordGuid)
|
||||
.Select(group => group.OrderByDescending(item => item.idRecord).First())
|
||||
.ToList();
|
||||
|
||||
if (ecnList.Count==0)
|
||||
{
|
||||
return "未查询到符合条件的记录";
|
||||
}
|
||||
string output="";
|
||||
foreach (var ecnListItem in ecnList)
|
||||
{
|
||||
output = output+ecnListItem._System_objNBS+"、";
|
||||
//ecn表对比结果
|
||||
var ecnComparisonResult = "成功";
|
||||
//条目对比结果
|
||||
@ -624,6 +630,6 @@ public class ChangeNoticeEcnService : IDynamicApiController, ITransient
|
||||
.Where(it => it.idRecord == ecnListItem.idRecord)
|
||||
.ExecuteCommand();
|
||||
}
|
||||
return "对比完成,请到前端查看结果";
|
||||
return output+"对比完成,请到前端查看结果";
|
||||
}
|
||||
}
|
||||
|
@ -1090,6 +1090,7 @@ public class ProductDesignLibraryService : IDynamicApiController, ITransient
|
||||
}
|
||||
var output = new SapOutput()
|
||||
{
|
||||
materialCode= data._System_objNBS,
|
||||
parameter = apiOutput.parameter,
|
||||
code = codeVal,
|
||||
msg = msg,
|
||||
|
Loading…
Reference in New Issue
Block a user