|
|
@@ -621,34 +621,37 @@ namespace Business.SystemJobManagement
|
|
|
for (int i = 0; i < custList.Count; i++)
|
|
|
{
|
|
|
var ic_item = ic_itemList.Find(x => x.number == custList[i].ItemNum);
|
|
|
- if (ic_item == null)
|
|
|
+ int erpcls = 0;
|
|
|
+ string erpclsText = "配置类";
|
|
|
+ long itemId = help.NextId();
|
|
|
+ if (custList[i].PurMfg == "P")
|
|
|
{
|
|
|
- int erpcls = 0;
|
|
|
- string erpclsText = "配置类";
|
|
|
- long itemId = help.NextId();
|
|
|
- if (custList[i].PurMfg == "P")
|
|
|
+ if (custList[i].EMTType == "50")
|
|
|
{
|
|
|
- if (custList[i].EMTType == "50")
|
|
|
- {
|
|
|
- erpcls = 4;
|
|
|
- erpclsText = "虚拟";
|
|
|
- }
|
|
|
- else {
|
|
|
- erpcls = 3;
|
|
|
- erpclsText = "外购";
|
|
|
- }
|
|
|
+ erpcls = 4;
|
|
|
+ erpclsText = "虚拟";
|
|
|
}
|
|
|
- else {
|
|
|
- if (custList[i].EMTType == "30")
|
|
|
- {
|
|
|
- erpcls = 2;
|
|
|
- erpclsText = "委外";
|
|
|
- }
|
|
|
- else {
|
|
|
- erpcls = 1;
|
|
|
- erpclsText = "自制";
|
|
|
- }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ erpcls = 3;
|
|
|
+ erpclsText = "外购";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (custList[i].EMTType == "30")
|
|
|
+ {
|
|
|
+ erpcls = 2;
|
|
|
+ erpclsText = "委外";
|
|
|
}
|
|
|
+ else
|
|
|
+ {
|
|
|
+ erpcls = 1;
|
|
|
+ erpclsText = "自制";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (ic_item == null)
|
|
|
+ {
|
|
|
ItemsAdd.Add(new ic_item(itemId)
|
|
|
{
|
|
|
number = custList[i].ItemNum, //物料编码
|
|
|
@@ -749,8 +752,8 @@ namespace Business.SystemJobManagement
|
|
|
ic_item.name = custList[i].Descr;
|
|
|
ic_item.model = custList[i].Descr1;//规格型号
|
|
|
ic_item.fversion = custList[i].Rev;//版本号
|
|
|
- ic_item.erp_cls = custList[i].PurMfg == "P" ? 3 : 1;//物料属性
|
|
|
- ic_item.erp_cls_name = custList[i].PurMfg == "P" ? "外购" : "自制";//物料属性名称
|
|
|
+ ic_item.erp_cls = erpcls;//物料属性
|
|
|
+ ic_item.erp_cls_name = erpclsText;//物料属性名称
|
|
|
ic_item.unit = custList[i].UM;//单位
|
|
|
ic_item.clean_leadtime = custList[i].MFGMTTR;
|
|
|
ic_item.PurLT = custList[i].PurLT;
|