|
|
@ -1,3 +1,5 @@ |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Volo.Abp.Domain.Repositories; |
|
|
|
using Volo.Abp.EventBus; |
|
|
@ -81,8 +83,8 @@ public class UnplannedIssueJobEventHandler : |
|
|
|
createInput.BuildDate=DateTime.Now; |
|
|
|
createInput.ActiveDate=DateTime.Now; |
|
|
|
createInput.Details.RemoveAll(p => p.Qty == 0); |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
createInput.Details = new List<UnplannedIssueNoteDetailInput>(); |
|
|
|
|
|
|
|
//var strs= GetDifferentPropertyNames(typeof(UnplannedIssueJobDetail), typeof(UnplannedIssueNoteDetailInput));
|
|
|
@ -133,22 +135,22 @@ public class UnplannedIssueJobEventHandler : |
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
public static string[] GetDifferentPropertyNames(Type type1, Type type2) |
|
|
|
{ |
|
|
|
// 获取两个类型的属性
|
|
|
|
var properties1 = type1.GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static); |
|
|
|
var properties2 = type2.GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static); |
|
|
|
//public static string[] GetDifferentPropertyNames(Type type1, Type type2)
|
|
|
|
//{
|
|
|
|
// // 获取两个类型的属性
|
|
|
|
// var properties1 = type1.GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static);
|
|
|
|
// var properties2 = type2.GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static);
|
|
|
|
|
|
|
|
// 获取属性名称
|
|
|
|
var propertyNames1 = properties1.Select(p => p.Name).ToArray(); |
|
|
|
var propertyNames2 = properties2.Select(p => p.Name).ToArray(); |
|
|
|
// // 获取属性名称
|
|
|
|
// var propertyNames1 = properties1.Select(p => p.Name).ToArray();
|
|
|
|
// var propertyNames2 = properties2.Select(p => p.Name).ToArray();
|
|
|
|
|
|
|
|
// 找出不同的属性名称
|
|
|
|
var differentProperties = propertyNames1.Except(propertyNames2) |
|
|
|
.ToArray(); |
|
|
|
// // 找出不同的属性名称
|
|
|
|
// var differentProperties = propertyNames1.Except(propertyNames2)
|
|
|
|
// .ToArray();
|
|
|
|
|
|
|
|
return differentProperties; |
|
|
|
} |
|
|
|
// return differentProperties;
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|