diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.Common/HTTPHelper.cs b/ICSSoft.WMS.WebAPI/ICSSoft.Common/HTTPHelper.cs index a14b11d..533834f 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.Common/HTTPHelper.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.Common/HTTPHelper.cs @@ -14,6 +14,7 @@ namespace ICSSoft.Common { try { + //log.Debug(url + Environment.NewLine + body); Encoding encoding = Encoding.UTF8; System.Net.HttpWebRequest request = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(url); request.Method = "POST"; diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs index 884f6df..5a5c328 100644 --- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs +++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs @@ -959,9 +959,9 @@ namespace ICSSoft.DataProject //1 - 不管控 //2 - 提醒 //3 - 限制 - if(resultEffective == "2") + if (resultEffective == "2") { - msg += string.Format(language.GetNameByCode("WMSAPIInfo181"), Lot)+Environment.NewLine; + msg += string.Format(language.GetNameByCode("WMSAPIInfo181"), Lot) + Environment.NewLine; } else if (resultEffective == "3") { @@ -974,9 +974,9 @@ namespace ICSSoft.DataProject //1 - 不管控 //2 - 提醒 //3 - 限制 - if(result=="2") + if (result == "2") { - msg += string.Format(language.GetNameByCode("WMSAPIInfo178"), Lot)+Environment.NewLine; + msg += string.Format(language.GetNameByCode("WMSAPIInfo178"), Lot) + Environment.NewLine; } else if (result == "3") { @@ -990,7 +990,7 @@ namespace ICSSoft.DataProject Result res = new Result(); res.Success = true; res.Message = msg;// "接口调用成功!"; - if(!isLimit) + if (!isLimit) res.Data = table; return res; //出库时 @@ -1119,7 +1119,7 @@ namespace ICSSoft.DataProject || TransType == TransTypeEnum.ICSOutsourcingIssueDoNegativeIssue.GetDescription()) { //更新源头单据数量 - ICSOutsourcingService.OutsourcingIssueDoNegative(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd,language); + ICSOutsourcingService.OutsourcingIssueDoNegative(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd, language); BusinessCode = TransTypeEnum.ICSOutsourcingIssueDoNegative.GetDescription(); } #endregion @@ -1127,7 +1127,7 @@ namespace ICSSoft.DataProject else if (TransType == TransTypeEnum.OutsourcingReceiveDoc.GetDescription()) { //更新源头单据数量 - ICSOutsourcingService.OutsourcingReceiveDoc(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd,language); + ICSOutsourcingService.OutsourcingReceiveDoc(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd, language); BusinessCode = TransTypeEnum.OutsourcingReceiveDoc.GetDescription(); } #endregion @@ -1137,7 +1137,7 @@ namespace ICSSoft.DataProject || TransType == TransTypeEnum.MOIssueDocNegativeIssue.GetDescription()) { //更新源头单据数量 - ICSManufactureService.MOIssueDocNegative(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd,language); + ICSManufactureService.MOIssueDocNegative(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd, language); BusinessCode = TransTypeEnum.MOIssueDocNegative.GetDescription(); } #endregion @@ -1145,7 +1145,7 @@ namespace ICSSoft.DataProject else if (TransType == TransTypeEnum.ManufactureReceiveDoc.GetDescription()) { //更新源头单据数量 - ICSManufactureService.ManufactureReceiveDoc(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd,language); + ICSManufactureService.ManufactureReceiveDoc(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd, language); BusinessCode = TransTypeEnum.ManufactureReceiveDoc.GetDescription(); } #endregion @@ -1153,7 +1153,7 @@ namespace ICSSoft.DataProject else if (TransType == TransTypeEnum.ManufactureReceive.GetDescription()) { //更新源头单据数量 - ICSManufactureService.ManufactureReceive(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd,language); + ICSManufactureService.ManufactureReceive(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd, language); BusinessCode = TransTypeEnum.ManufactureReceive.GetDescription(); } #endregion @@ -1161,7 +1161,7 @@ namespace ICSSoft.DataProject else if (TransType == TransTypeEnum.SalesShipmentDocNegative.GetDescription()) { //更新源头单据数量 - ICSSalesService.SalesShipmentDocNegative(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd,language); + ICSSalesService.SalesShipmentDocNegative(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd, language); BusinessCode = TransTypeEnum.SalesShipmentDocNegative.GetDescription(); } #endregion @@ -1169,14 +1169,14 @@ namespace ICSSoft.DataProject else if (TransType == TransTypeEnum.OtherInDoc.GetDescription()) { //更新源头单据数量 - ICSWareHouseService.OtherInDoc(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd,language); + ICSWareHouseService.OtherInDoc(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd, language); BusinessCode = TransTypeEnum.OtherInDoc.GetDescription(); } #endregion #region 拆卸单 else if (TransType == TransTypeEnum.DisassemblyDoc.GetDescription()) { - ICSWareHouseService.DisassemblyDoc(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd,language); + ICSWareHouseService.DisassemblyDoc(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd, language); WHTransType = "11"; BusinessCode = TransTypeEnum.DisassemblyDoc.GetDescription(); } @@ -1185,7 +1185,7 @@ namespace ICSSoft.DataProject else if (TransType == TransTypeEnum.ReturnDoc.GetDescription()) { //更新源头单据数量 - ICSWareHouseService.ReturnDoc(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd,language); + ICSWareHouseService.ReturnDoc(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd, language); BusinessCode = TransTypeEnum.ReturnDoc.GetDescription(); } #endregion @@ -1193,7 +1193,7 @@ namespace ICSSoft.DataProject else if (TransType == TransTypeEnum.SalesReturnBack.GetDescription()) { //更新源头单据数量 - ICSSalesService.SalesReturnBackIn(itemInfo.TransCode, itemInfo.TransSequence, itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd,language); + ICSSalesService.SalesReturnBackIn(itemInfo.TransCode, itemInfo.TransSequence, itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd, language); //入库 BusinessCode = TransTypeEnum.SalesReturnBack.GetDescription(); @@ -1209,7 +1209,7 @@ namespace ICSSoft.DataProject if (TransType == TransTypeEnum.DisassemblyDoc.GetDescription()) { //更新套件锁定数量 - ICSWareHouseService.DisassemblyDoc(Identification, cmd,language); + ICSWareHouseService.DisassemblyDoc(Identification, cmd, language); } #endregion} } @@ -1227,47 +1227,47 @@ namespace ICSSoft.DataProject ICSPurchaseService.PurchaseRejectDocInERP(TransType, Identification, cmd, language); //审核的委外到货单 else if (TransType == TransTypeEnum.ODeliveryNotice.GetDescription()) - ICSOutsourcingService.ODeliveryNoticeInERP(TransType, Identification, cmd,language); + ICSOutsourcingService.ODeliveryNoticeInERP(TransType, Identification, cmd, language); //委外拒收 else if (TransType == TransTypeEnum.OutsourcingRejectDoc.GetDescription()) - ICSOutsourcingService.OutsourcingRejectDocInERP(TransType, Identification, cmd,language); + ICSOutsourcingService.OutsourcingRejectDocInERP(TransType, Identification, cmd, language); //委外退料 else if (TransType == TransTypeEnum.ICSOutsourcingIssueDoNegative.GetDescription() || TransType == TransTypeEnum.ICSOutsourcingIssueDoNegativeApply.GetDescription() || TransType == TransTypeEnum.ICSOutsourcingIssueDoNegativeIssue.GetDescription()) - ICSOutsourcingService.OutsourcingIssueDoNegativeERP(TransType, Identification, cmd,language); + ICSOutsourcingService.OutsourcingIssueDoNegativeERP(TransType, Identification, cmd, language); //委外入库 else if (TransType == TransTypeEnum.OutsourcingReceiveDoc.GetDescription()) - ICSOutsourcingService.OutsourcingReceiveDocERP(TransType, Identification, cmd,language); + ICSOutsourcingService.OutsourcingReceiveDocERP(TransType, Identification, cmd, language); //生产退料 else if (TransType == TransTypeEnum.MOIssueDocNegative.GetDescription() || TransType == TransTypeEnum.MOIssueDocNegativeApply.GetDescription() || TransType == TransTypeEnum.MOIssueDocNegativeIssue.GetDescription()) - ICSManufactureService.MOIssueDocNegativeERP(TransType, Identification, cmd,language); + ICSManufactureService.MOIssueDocNegativeERP(TransType, Identification, cmd, language); //生产入库 else if (TransType == TransTypeEnum.ManufactureReceiveDoc.GetDescription()) - ICSManufactureService.ManufactureReceiveDocERP(TransType, Identification, cmd,language); + ICSManufactureService.ManufactureReceiveDocERP(TransType, Identification, cmd, language); //开立的生产入库单 else if (TransType == TransTypeEnum.ManufactureReceive.GetDescription()) - ICSManufactureService.ManufactureReceiveERP(TransType, Identification, cmd,language); + ICSManufactureService.ManufactureReceiveERP(TransType, Identification, cmd, language); //销售退货 else if (TransType == TransTypeEnum.SalesShipmentDocNegative.GetDescription()) - ICSSalesService.SalesShipmentDocNegativeERP(TransType, Identification, cmd,language); + ICSSalesService.SalesShipmentDocNegativeERP(TransType, Identification, cmd, language); //两步调入 else if (TransType == TransTypeEnum.TwoStepTransferDocIn.GetDescription()) - ICSWareHouseService.TwoStepTransferDocInERP(TransType, Identification, cmd,language); + ICSWareHouseService.TwoStepTransferDocInERP(TransType, Identification, cmd, language); //销售退货-原条码 else if (TransType == TransTypeEnum.SalesReturnBack.GetDescription()) - ICSSalesService.SalesReturnBackInERP(TransType, Identification, cmd,language); + ICSSalesService.SalesReturnBackInERP(TransType, Identification, cmd, language); //其他入库 else if (TransType == TransTypeEnum.OtherInDoc.GetDescription()) - ICSWareHouseService.OtherInDocERP(TransType, Identification, cmd,language); + ICSWareHouseService.OtherInDocERP(TransType, Identification, cmd, language); //拆卸单 if (TransType == TransTypeEnum.DisassemblyDoc.GetDescription()) - ICSWareHouseService.DisassemblyDocERP(TransType, Identification, cmd,language); + ICSWareHouseService.DisassemblyDocERP(TransType, Identification, cmd, language); //归还 else if (TransType == TransTypeEnum.ReturnDoc.GetDescription()) - ICSWareHouseService.ReturnDocERP(TransType, Identification, cmd,language); + ICSWareHouseService.ReturnDocERP(TransType, Identification, cmd, language); } DataTable table = GetData(Identification, 1, cmd); cmd.Transaction.Commit(); @@ -1330,7 +1330,7 @@ namespace ICSSoft.DataProject foreach (var itemInfo in item.detail) { //出库 - ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, + ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, item.User, item.WorkPoint, "3", TransTypeEnum.PurchaseReceiveDoctNegative.GetDescription(), cmd, language); } } @@ -1339,12 +1339,12 @@ namespace ICSSoft.DataProject else if (TransType == TransTypeEnum.OutsourcingIssueDoc.GetDescription()) { //更新源头单据数量 - ICSOutsourcingService.OutsourcingIssueDoc(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd,language); + ICSOutsourcingService.OutsourcingIssueDoc(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd, language); foreach (var itemInfo in item.detail) { //出库 - ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, + ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, item.User, item.WorkPoint, "3", TransTypeEnum.OutsourcingIssueDoc.GetDescription(), cmd, language); } } @@ -1353,12 +1353,12 @@ namespace ICSSoft.DataProject else if (TransType == TransTypeEnum.OutsourcingReturnBack.GetDescription()) { //更新源头单据数量 - ICSOutsourcingService.OutsourcingReturnBack(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd,language); + ICSOutsourcingService.OutsourcingReturnBack(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd, language); foreach (var itemInfo in item.detail) { //出库 - ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, + ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, item.User, item.WorkPoint, "3", TransTypeEnum.OutsourcingReturnBack.GetDescription(), cmd, language); } } @@ -1367,12 +1367,12 @@ namespace ICSSoft.DataProject else if (TransType == TransTypeEnum.MOIssueDoc.GetDescription()) { //更新源头单据数量 - ICSManufactureService.MOIssueDoc(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd,language); + ICSManufactureService.MOIssueDoc(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd, language); foreach (var itemInfo in item.detail) { //出库 - ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, + ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, item.User, item.WorkPoint, "3", TransTypeEnum.MOIssueDoc.GetDescription(), cmd, language); } } @@ -1381,12 +1381,12 @@ namespace ICSSoft.DataProject else if (TransType == TransTypeEnum.SalesShipmentDoc.GetDescription()) { //更新源头单据数量 - ICSSalesService.SalesShipmentDoc(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd,language); + ICSSalesService.SalesShipmentDoc(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd, language); foreach (var itemInfo in item.detail) { //出库 - ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, + ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, item.User, item.WorkPoint, "3", TransTypeEnum.SalesShipmentDoc.GetDescription(), cmd, language); } } @@ -1395,12 +1395,12 @@ namespace ICSSoft.DataProject else if (TransType == TransTypeEnum.TwoStepTransferDocOut.GetDescription()) { //更新源头单据数量 - ICSWareHouseService.TwoStepTransferDocOut(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd,language); + ICSWareHouseService.TwoStepTransferDocOut(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd, language); foreach (var itemInfo in item.detail) { //出库 - ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, + ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, item.User, item.WorkPoint, "6", TransTypeEnum.TwoStepTransferDocOut.GetDescription(), cmd, language); } } @@ -1409,12 +1409,12 @@ namespace ICSSoft.DataProject else if (TransType == TransTypeEnum.OtherOutDoc.GetDescription()) { //更新源头单据数量 - ICSWareHouseService.OtherOutDoc(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd,language); + ICSWareHouseService.OtherOutDoc(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd, language); foreach (var itemInfo in item.detail) { //出库 - ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, + ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, item.User, item.WorkPoint, "3", TransTypeEnum.OtherOutDoc.GetDescription(), cmd, language); } } @@ -1423,12 +1423,12 @@ namespace ICSSoft.DataProject else if (TransType == TransTypeEnum.MOApply.GetDescription()) { //更新源头单据数量 - ICSManufactureService.MOApply(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd,language); + ICSManufactureService.MOApply(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd, language); foreach (var itemInfo in item.detail) { //出库 - ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, + ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, item.User, item.WorkPoint, "3", TransTypeEnum.MOApply.GetDescription(), cmd, language); } } @@ -1437,12 +1437,12 @@ namespace ICSSoft.DataProject else if (TransType == TransTypeEnum.OOApply.GetDescription()) { //更新源头单据数量 - ICSOutsourcingService.OOApply(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd,language); + ICSOutsourcingService.OOApply(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd, language); foreach (var itemInfo in item.detail) { //出库 - ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, + ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, item.User, item.WorkPoint, "3", TransTypeEnum.OOApply.GetDescription(), cmd, language); } } @@ -1451,12 +1451,12 @@ namespace ICSSoft.DataProject else if (TransType == TransTypeEnum.MOIssue.GetDescription()) { //更新源头单据数量 - ICSManufactureService.MOIssue(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd,language); + ICSManufactureService.MOIssue(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd, language); foreach (var itemInfo in item.detail) { //出库 - ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, + ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, item.User, item.WorkPoint, "3", TransTypeEnum.MOIssue.GetDescription(), cmd, language); } } @@ -1465,12 +1465,12 @@ namespace ICSSoft.DataProject else if (TransType == TransTypeEnum.OOIssue.GetDescription()) { //更新源头单据数量 - ICSOutsourcingService.OOIssue(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd,language); + ICSOutsourcingService.OOIssue(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd, language); foreach (var itemInfo in item.detail) { //出库 - ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, + ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, item.User, item.WorkPoint, "3", TransTypeEnum.OOIssue.GetDescription(), cmd, language); } } @@ -1484,7 +1484,7 @@ namespace ICSSoft.DataProject foreach (var itemInfo in item.detail) { //出库 - ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, + ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, item.User, item.WorkPoint, "3", TransTypeEnum.PurchaseReceive.GetDescription(), cmd, language); } } @@ -1493,12 +1493,12 @@ namespace ICSSoft.DataProject else if (TransType == TransTypeEnum.OutsourcingReceiveDocNegative.GetDescription()) { //更新源头单据数量 - ICSOutsourcingService.OutsourcingReceiveDocNegative(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd,language); + ICSOutsourcingService.OutsourcingReceiveDocNegative(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd, language); foreach (var itemInfo in item.detail) { //出库 - ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, + ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, item.User, item.WorkPoint, "3", TransTypeEnum.OutsourcingReceiveDocNegative.GetDescription(), cmd, language); } } @@ -1507,12 +1507,12 @@ namespace ICSSoft.DataProject else if (TransType == TransTypeEnum.BrrowDoc.GetDescription()) { //更新源头单据数量 - ICSWareHouseService.BrrowDoc(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd,language); + ICSWareHouseService.BrrowDoc(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd, language); foreach (var itemInfo in item.detail) { //出库 - ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, + ICSWareHouseLotInfoService.WareHouseLotInfoDown(Identification, item.TransCode, item.TransSequence, itemInfo.LotNo, itemInfo.CurrentQuantity, item.User, item.WorkPoint, "3", TransTypeEnum.BrrowDoc.GetDescription(), cmd, language); } } @@ -1526,43 +1526,43 @@ namespace ICSSoft.DataProject ICSPurchaseService.PurchaseReceiveDoctNegativeERP(TransType, Identification, cmd, language); //委外发料 else if (TransType == TransTypeEnum.OutsourcingIssueDoc.GetDescription()) - ICSOutsourcingService.OutsourcingIssueDocERP(TransType, Identification, cmd,language); + ICSOutsourcingService.OutsourcingIssueDocERP(TransType, Identification, cmd, language); //委外退货 else if (TransType == TransTypeEnum.OutsourcingReturnBack.GetDescription()) - ICSOutsourcingService.OutsourcingReturnBackERP(TransType, Identification, cmd,language); + ICSOutsourcingService.OutsourcingReturnBackERP(TransType, Identification, cmd, language); //生产发料 else if (TransType == TransTypeEnum.MOIssueDoc.GetDescription()) - ICSManufactureService.MOIssueDocERP(TransType, Identification, cmd,language); + ICSManufactureService.MOIssueDocERP(TransType, Identification, cmd, language); //销售出库 else if (TransType == TransTypeEnum.SalesShipmentDoc.GetDescription()) - ICSSalesService.SalesShipmentDocERP(TransType, Identification, cmd,language); + ICSSalesService.SalesShipmentDocERP(TransType, Identification, cmd, language); //两步调出 else if (TransType == TransTypeEnum.TwoStepTransferDocOut.GetDescription()) - ICSWareHouseService.TwoStepTransferDocOutERP(TransType, Identification, cmd,language); + ICSWareHouseService.TwoStepTransferDocOutERP(TransType, Identification, cmd, language); //其他出库 else if (TransType == TransTypeEnum.OtherOutDoc.GetDescription()) - ICSWareHouseService.OtherOutDocERP(TransType, Identification, cmd,language); + ICSWareHouseService.OtherOutDocERP(TransType, Identification, cmd, language); //领料申请单发料 if (TransType == TransTypeEnum.MOApply.GetDescription()) - ICSManufactureService.MOApplyERP(TransType, Identification, cmd,language); + ICSManufactureService.MOApplyERP(TransType, Identification, cmd, language); //委外领料申请单发料 if (TransType == TransTypeEnum.OOApply.GetDescription()) - ICSOutsourcingService.OOApplyERP(TransType, Identification, cmd,language); + ICSOutsourcingService.OOApplyERP(TransType, Identification, cmd, language); //开立材料出库 if (TransType == TransTypeEnum.MOIssue.GetDescription()) - ICSManufactureService.MOIssueERP(TransType, Identification, cmd,language); + ICSManufactureService.MOIssueERP(TransType, Identification, cmd, language); //开立委外材料出库 if (TransType == TransTypeEnum.OOIssue.GetDescription()) - ICSOutsourcingService.OOIssueERP(TransType, Identification, cmd,language); + ICSOutsourcingService.OOIssueERP(TransType, Identification, cmd, language); //开立红字入库单 if (TransType == TransTypeEnum.PurchaseReceive.GetDescription()) ICSPurchaseService.PurchaseReceiveERP(TransType, Identification, cmd, language); //开立委外红字入库单 if (TransType == TransTypeEnum.OutsourcingReceiveDocNegative.GetDescription()) - ICSOutsourcingService.OutsourcingReceiveDocNegativeERP(TransType, Identification, cmd,language); + ICSOutsourcingService.OutsourcingReceiveDocNegativeERP(TransType, Identification, cmd, language); //借用 if (TransType == TransTypeEnum.BrrowDoc.GetDescription()) - ICSWareHouseService.BrrowDocERP(TransType, Identification, cmd,language); + ICSWareHouseService.BrrowDocERP(TransType, Identification, cmd, language); } DataTable table = GetData(Identification, 2, cmd); @@ -1693,7 +1693,7 @@ namespace ICSSoft.DataProject { throw new Exception(language.GetNameByCode("WMSAPIInfo011")); //"到货单信息创建失败!"); } - ICSPurchaseService.DeliveryNoticeERP(Code, item.WorkPoint, cmd,language); + ICSPurchaseService.DeliveryNoticeERP(Code, item.WorkPoint, cmd, language); asncodes += "'" + item.ASNCode + item.WorkPoint + "',"; } if (string.IsNullOrWhiteSpace(asncodes)) @@ -2012,23 +2012,7 @@ namespace ICSSoft.DataProject } } //校验退料数量是否超出领料数量 - sql = @"DECLARE @PickID VARCHAR(10) - SELECT @PickID=b.PickID - FROM ICSOApplyNegDetail a - INNER JOIN ICSOOPick b ON a.SourceDetailID=b.PickID AND a.WorkPoint=b.WorkPoint - INNER JOIN ICSOApplyNeg c ON a.OApplyNegCode=c.OApplyNegCode AND a.WorkPoint=c.WorkPoint - WHERE c.ID='{0}' AND a.WorkPoint='{1}' - GROUP BY b.PickID - HAVING MAX(b.Quantity) language) + { + string sql = string.Empty; + if (Type == "1") + { + sql = @"DECLARE @PickID VARCHAR(10) + SELECT @PickID=b.PickID + FROM ICSOApplyNegDetail a + INNER JOIN ICSOOPick b ON a.SourceDetailID=b.PickID AND a.WorkPoint=b.WorkPoint + INNER JOIN ICSOApplyNeg c ON a.OApplyNegCode=c.OApplyNegCode AND a.WorkPoint=c.WorkPoint + WHERE c.ID='{0}' AND c.Type='{2}' AND a.WorkPoint='{1}' + GROUP BY b.PickID + HAVING MAX(b.Quantity) /// 委外退料 修改 /// @@ -2181,23 +2233,7 @@ namespace ICSSoft.DataProject } } //校验退料数量是否超出领料数量 - sql = @"DECLARE @PickID VARCHAR(10) - SELECT @PickID=b.PickID - FROM ICSOApplyNegDetail a - INNER JOIN ICSOOPick b ON a.SourceDetailID=b.PickID AND a.WorkPoint=b.WorkPoint - INNER JOIN ICSOApplyNeg c ON a.OApplyNegCode=c.OApplyNegCode AND a.WorkPoint=c.WorkPoint - WHERE c.ID='{0}' AND a.WorkPoint='{1}' - GROUP BY b.PickID - HAVING MAX(b.Quantity) language) + { + string sql = string.Empty; + if (Type == "1") + { + sql = @"DECLARE @PickID VARCHAR(10) + SELECT @PickID=b.PickID + FROM ICSMOApplyNegDetail a + INNER JOIN ICSMOPick b ON a.SourceDetailID=b.PickID AND a.WorkPoint=b.WorkPoint + INNER JOIN ICSMOApplyNeg c ON a.ApplyNegCode=c.ApplyNegCode AND a.WorkPoint=c.WorkPoint + WHERE c.ID='{0}' AND c.Type='{2}' AND a.WorkPoint='{1}' + GROUP BY b.PickID + HAVING MAX(b.Quantity) /// 生产退料 修改 /// @@ -2982,23 +3068,7 @@ namespace ICSSoft.DataProject } } //校验退料数量是否超出领料数量 - sql = @"DECLARE @PickID VARCHAR(10) - SELECT @PickID=b.PickID - FROM ICSMOApplyNegDetail a - INNER JOIN ICSMOPick b ON a.SourceDetailID=b.PickID AND a.WorkPoint=b.WorkPoint - INNER JOIN ICSMOApplyNeg c ON a.ApplyNegCode=c.ApplyNegCode AND a.WorkPoint=c.WorkPoint - WHERE c.ID='{0}' AND a.WorkPoint='{1}' - GROUP BY b.PickID - HAVING MAX(b.Quantity)(), cmd, language); foreach (var info in item.detail) { //合并前日志 - ICSWareHouseLotInfoService.WareHouseLotInfoLog(Identification, info.CurrentLotNo, item.User, item.WorkPoint, "5", + ICSWareHouseLotInfoService.WareHouseLotInfoLog(Identification, info.CurrentLotNo, item.User, item.WorkPoint, "5", TransTypeEnum.LOTMergeBefore.GetDescription(), cmd, language); //更新条码信息 - ICSWareHouseLotInfoService.WareHouseLotInfoMerge(Identification, item.LotNo, info.CurrentLotNo, info.CurrentQuantity, item.User, item.WorkPoint, "5", + ICSWareHouseLotInfoService.WareHouseLotInfoMerge(Identification, item.LotNo, info.CurrentLotNo, info.CurrentQuantity, item.User, item.WorkPoint, "5", TransTypeEnum.LOTMergeAfter.GetDescription(), cmd, language); } //合并后日志 - ICSWareHouseLotInfoService.WareHouseLotInfoLog(Identification, item.LotNo, item.User, item.WorkPoint, "5", + ICSWareHouseLotInfoService.WareHouseLotInfoLog(Identification, item.LotNo, item.User, item.WorkPoint, "5", TransTypeEnum.LOTMergeAfter.GetDescription(), cmd, language); } DataTable table = GetData(Identification, 1, cmd); @@ -3486,18 +3556,18 @@ namespace ICSSoft.DataProject throw new Exception(language.GetNameByCode("WMSAPIInfo028"));//"明细信息不能为空!"); } //拆分前日志 - ICSWareHouseLotInfoService.WareHouseLotInfoLog(Identification, item.LotNo, item.User, item.WorkPoint, "4", + ICSWareHouseLotInfoService.WareHouseLotInfoLog(Identification, item.LotNo, item.User, item.WorkPoint, "4", TransTypeEnum.LOTSplitBefore.GetDescription(), cmd, language); foreach (var info in item.detail) { //更新条码信息 - ICSWareHouseLotInfoService.WareHouseLotInfoSplit(Identification, item.LotNo, info.CurrentLotNo, info.CurrentQuantity, item.User, item.WorkPoint, "4", + ICSWareHouseLotInfoService.WareHouseLotInfoSplit(Identification, item.LotNo, info.CurrentLotNo, info.CurrentQuantity, item.User, item.WorkPoint, "4", TransTypeEnum.LOTSplitAfter.GetDescription(), cmd, language); } //拆分后日志 - ICSWareHouseLotInfoService.WareHouseLotInfoLog(Identification, item.LotNo, item.User, item.WorkPoint, "4", + ICSWareHouseLotInfoService.WareHouseLotInfoLog(Identification, item.LotNo, item.User, item.WorkPoint, "4", TransTypeEnum.LOTSplitAfter.GetDescription(), cmd, language); } @@ -3648,7 +3718,7 @@ namespace ICSSoft.DataProject //2 - 提醒 //3 - 限制 sql = string.Format(sql, LotNo, WorkPoitCode); - if(!string.IsNullOrWhiteSpace(ScanLotCode)) + if (!string.IsNullOrWhiteSpace(ScanLotCode)) { sql = sql.Replace("1=1", "a.LotNO NOT IN (" + ScanLotCode + ")"); }