|
@ -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,20 +8087,23 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
Msg += result.Msg; |
|
|
Msg += result.Msg; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 新增到料號KP檔 MaterialKp
|
|
|
// 新增到料號KP檔 MaterialKp 排除重工工單
|
|
|
result = await _pcsApi.PostMaterialKp(JsonConvert.SerializeObject(new MaterialKp |
|
|
if (model.wipInfo.WipType != "R") |
|
|
{ |
|
|
{ |
|
|
ItemID = materialItem.ItemID, |
|
|
result = await _pcsApi.PostMaterialKp(JsonConvert.SerializeObject(new MaterialKp |
|
|
KpName = item.KpName, |
|
|
{ |
|
|
KpNo = item.KpNo, |
|
|
ItemID = materialItem.ItemID, |
|
|
KpSeq = Convert.ToInt32(item.KpSeq), |
|
|
KpName = item.KpName, |
|
|
Length = item.Length, |
|
|
KpNo = item.KpNo, |
|
|
StationType = item.UnitNo, |
|
|
KpSeq = Convert.ToInt32(item.KpSeq), |
|
|
IsRepeat = "N", |
|
|
Length = item.Length, |
|
|
Title = item.Title, |
|
|
StationType = item.UnitNo, |
|
|
CreateUserID = UserID, |
|
|
IsRepeat = "N", |
|
|
UpdateUserID = UserID |
|
|
Title = item.Title, |
|
|
})); |
|
|
CreateUserID = UserID, |
|
|
|
|
|
UpdateUserID = UserID |
|
|
|
|
|
})); |
|
|
|
|
|
} |
|
|
if (!result.Success) |
|
|
if (!result.Success) |
|
|
{ |
|
|
{ |
|
|
Msg += result.Msg; |
|
|
Msg += result.Msg; |
|
@ -8286,7 +8289,7 @@ namespace AMESCoreStudio.Web.Controllers |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var user_info = await _sysApi.GetUserInfo(user_id); |
|
|
var user_info = await _sysApi.GetUserInfo(user_id); |
|
|
|
|
|
|
|
|
ViewBag.UserName = user_info[0].UserName; |
|
|
ViewBag.UserName = user_info[0].UserName; |
|
|
|
|
|
|
|
|
ViewBag.ClearID = id; |
|
|
ViewBag.ClearID = id; |
|
|