diff --git a/WMS-BS/NFine.Application/WMS/RevokeBusinessApp.cs b/WMS-BS/NFine.Application/WMS/RevokeBusinessApp.cs index 07b5f0b..1d1c042 100644 --- a/WMS-BS/NFine.Application/WMS/RevokeBusinessApp.cs +++ b/WMS-BS/NFine.Application/WMS/RevokeBusinessApp.cs @@ -194,7 +194,7 @@ namespace NFine.Application.WMS sql += string.Format(@"update ICSWareHouseLotInfo set Quantity=Quantity+'{0}',MUSER='{1}',MUSERName='{2}' where LotNo='{3}' and WorkPoint='{4}'", jo["Quantity"].ToString(), MUSER, MUSERNAME, jo["LotNo"].ToString(), WorkPoint); sql += string.Format(@"update ICSMOIssue set IssueQuantity =IssueQuantity-'{0}' where IssueCode='{1}' and Sequence='{2}' and WorkPoint='{3}' and Type='1' and Status='2'", jo["Quantity"].ToString(), jo["TransCode"].ToString(), jo["TransSequence"].ToString(), WorkPoint); sql += string.Format(@"update ICSWareHouseLotInfoLog set EATTRIBUTE1 ='1' where ID='{0}' and WorkPoint='{1}'", jo["ID"].ToString(), WorkPoint); - + } try { @@ -872,7 +872,37 @@ namespace NFine.Application.WMS } + //联产品入库 + public string RevocationLCPRK(string keyValue) + { + string MUSER = NFine.Code.OperatorProvider.Provider.GetCurrent().UserCode; + string MUSERNAME = NFine.Code.OperatorProvider.Provider.GetCurrent().UserName; + string WorkPoint = NFine.Code.OperatorProvider.Provider.GetCurrent().Location; + string msg = ""; + string sql = string.Empty; + JArray res = (JArray)JsonConvert.DeserializeObject(keyValue); + foreach (var item in res) + { + JObject jo = (JObject)item; + sql += string.Format(@"delete from ICSWareHouseLotInfo where LotNo='{0}' and WorkPoint='{1}'", jo["LotNo"].ToString(), WorkPoint); + sql += string.Format(@" update a set IssueQuantity =IssueQuantity-'{0}' from ICSMOPick a left join ICSMO b on a.MODetailID=b.MODetailID and a.WorkPoint=b.WorkPoint + where b.MOCode='{1}' and b.Sequence+'~'+a.Sequence='{2}' and a.WorkPoint='{3}'", jo["Quantity"].ToString(), jo["TransCode"].ToString(), jo["TransSequence"].ToString(), WorkPoint); + sql += string.Format(@"update ICSWareHouseLotInfoLog set EATTRIBUTE1 ='1' where ID='{0}' and WorkPoint='{1}'", MUSER, MUSERNAME, jo["ID"].ToString(), WorkPoint); + } + try + { + if (SqlHelper.CmdExecuteNonQueryLi(sql) > 0) + { + + } + } + catch (Exception ex) + { + msg = ex.Message; + } + return msg; + } } diff --git a/WMS-BS/NFine.Web/Areas/WMS/Controllers/RevokeBusinessController.cs b/WMS-BS/NFine.Web/Areas/WMS/Controllers/RevokeBusinessController.cs index 313aaa2..bc3be2c 100644 --- a/WMS-BS/NFine.Web/Areas/WMS/Controllers/RevokeBusinessController.cs +++ b/WMS-BS/NFine.Web/Areas/WMS/Controllers/RevokeBusinessController.cs @@ -129,6 +129,10 @@ namespace NFine.Web.Areas.WMS.Controllers { msg = App.RevocationWWProduceStrippingCLCK(keyValue); } + else if (BusinessCode == "50") + { + msg = App.RevocationLCPRK(keyValue); + } else { msg = "该类型单据暂不支持撤销,请联系管理员";