|
@ -8056,9 +8056,9 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
|
|
|
|
|
|
// 工單 KeyParts WipKp
|
|
|
// 工單 KeyParts WipKp
|
|
|
// 判斷料號KP有資料 沒有資料時 一起新增到料號KP
|
|
|
// 判斷料號KP有資料 沒有資料時 一起新增到料號KP
|
|
|
// 2022.10.12 取消判斷 刪除料號KP,在逐一新增
|
|
|
// 2022.10.12 取消判斷 刪除料號KP,在逐一新增 排除重工工單
|
|
|
var materialItem = await _pcsApi.GetMaterialItemByItemNO(model.wipAtt.ItemNO); |
|
|
var materialItem = await _pcsApi.GetMaterialItemByItemNO(model.wipAtt.ItemNO); |
|
|
if (materialItem != null) |
|
|
if (materialItem != null && model.wipInfo.WipType != "R") |
|
|
{ |
|
|
{ |
|
|
await _pcsApi.DeleteMaterialKpByItem(materialItem.ItemID); |
|
|
await _pcsApi.DeleteMaterialKpByItem(materialItem.ItemID); |
|
|
} |
|
|
} |
|
@ -8087,7 +8087,9 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
Msg += result.Msg; |
|
|
Msg += result.Msg; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 新增到料號KP檔 MaterialKp
|
|
|
// 新增到料號KP檔 MaterialKp 排除重工工單
|
|
|
|
|
|
if (model.wipInfo.WipType != "R") |
|
|
|
|
|
{ |
|
|
result = await _pcsApi.PostMaterialKp(JsonConvert.SerializeObject(new MaterialKp |
|
|
result = await _pcsApi.PostMaterialKp(JsonConvert.SerializeObject(new MaterialKp |
|
|
{ |
|
|
{ |
|
|
ItemID = materialItem.ItemID, |
|
|
ItemID = materialItem.ItemID, |
|
@ -8101,6 +8103,7 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
CreateUserID = UserID, |
|
|
CreateUserID = UserID, |
|
|
UpdateUserID = UserID |
|
|
UpdateUserID = UserID |
|
|
})); |
|
|
})); |
|
|
|
|
|
} |
|
|
if (!result.Success) |
|
|
if (!result.Success) |
|
|
{ |
|
|
{ |
|
|
Msg += result.Msg; |
|
|
Msg += result.Msg; |
|
|