Browse Source

1. 工單維護儲存時 工單KP回寫到料號KP 排除重工工單

PTD
Ray 2 years ago
parent
commit
d3211fcddd
  1. 9
      AMESCoreStudio.Web/Controllers/PCSController.cs

9
AMESCoreStudio.Web/Controllers/PCSController.cs

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

Loading…
Cancel
Save