姜鹏 1 year ago
parent
commit
36e46adda3
  1. 30
      ICSSoft.WMS.WebAPI/ICSSoft.Common/EnumHelper.cs
  2. 1
      ICSSoft.WMS.WebAPI/ICSSoft.Common/ICSSoft.Common.csproj
  3. 35
      ICSSoft.WMS.WebAPI/ICSSoft.Common/NewTransType.cs

30
ICSSoft.WMS.WebAPI/ICSSoft.Common/EnumHelper.cs

@ -19,23 +19,27 @@ namespace ICSSoft.Common
/// <returns></returns>
public static bool HasDescriptions(Type enumType,string desc)
{
if (enumType != null && enumType.IsEnum)
{
FieldInfo[] fields = enumType.GetFields();
//if (enumType != null && enumType.IsEnum)
//{
// FieldInfo[] fields = enumType.GetFields();
for (int i = 1; i < fields.Length; ++i)
{
//object fieldValue = Enum.Parse(enumType, fields[i].Name);
object[] attrs = fields[i].GetCustomAttributes(true);
foreach (object attr in attrs)
{
if (typeof(DescriptionAttribute).IsAssignableFrom(attr.GetType()) && ((DescriptionAttribute)attr).Description.Equals(desc))
// for (int i = 1; i < fields.Length; ++i)
// {
// //object fieldValue = Enum.Parse(enumType, fields[i].Name);
// object[] attrs = fields[i].GetCustomAttributes(true);
// foreach (object attr in attrs)
// {
// if (typeof(DescriptionAttribute).IsAssignableFrom(attr.GetType()) && ((DescriptionAttribute)attr).Description.Equals(desc))
// {
// return true;
// }
// }
// }
//}
if (NewTransType.list.Contains(desc))
{
return true;
}
}
}
}
return false;
}

1
ICSSoft.WMS.WebAPI/ICSSoft.Common/ICSSoft.Common.csproj

@ -57,6 +57,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="NewTransType.cs" />
<Compile Include="DataToJsonHelper.cs" />
<Compile Include="DbFactory.cs" />
<Compile Include="DESEncrypt.cs" />

35
ICSSoft.WMS.WebAPI/ICSSoft.Common/NewTransType.cs

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ICSSoft.Common
{
public static class NewTransType
{
public static readonly List<string> list = new List<string>() { "采购入库-采购订单", "采购入库-采购到货单", "采购拒收",
"采购退货-采购退货单","工单关联","采购退货-红字采购入库单",
"采购退货-库位维度","委外发料-委外订单备料表","委外发料-库位维度",
"委外发料-委外领料申请单","委外发料-委外材料出库单","委外退料-委外退料单",
"委外退料-委外退料单-领料申请单","委外退料-委外退料单-材料出库单","委外入库-委外订单",
"委外入库-委外到货单","委外拒收","委外退货-委外退货单",
"委外退货-红字委外入库单","生产发料-生产订单备料表","生产发料-领料申请单",
"生产发料-库位维度","生产发料-无工单领料申请单","生产发料-材料出库单",
"生产退料-生产退料单","生产退料-生产退料单-领料申请单","生产退料-生产退料单-材料出库单",
"产成品入库-生产订单","产成品入库-产成品入库单","返工工单",
"销售发货-销售发货单","销售退货-销售退货单","一步调拨",
"调拨","两步调出","两步调入",
"销售退货-原条码","销售退货-生成","杂发",
"杂发-库位维度","杂收","借用",
"归还","盘点","移库",
"拆卸单","发货分配","送货单",
"委外送货单","拆分","拆分前",
"拆分后","合并","库位查询",
"合并前","合并后","修改前",
"修改后","调拨申请单","不合格条码",
"生产发料-补料申请单","副产品入库-生产订单"};
}
}
Loading…
Cancel
Save